libpayload: fix wborder()
authorPatrick Georgi <Patrick.Georgi@secunet.com>
Tue, 15 Mar 2011 11:34:04 +0000 (12:34 +0100)
committerPatrick Georgi <patrick@georgi-clan.de>
Thu, 7 Jul 2011 20:29:18 +0000 (22:29 +0200)
wborder didn't provide default characters to draw a border.

Change-Id: Ib746ed16be341598fd9fa1f1b7577606d1abd9e5
Signed-off-by: Patrick Georgi <patrick.georgi@secunet.com>
Reviewed-on: http://review.coreboot.org/84
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
payloads/libpayload/curses/tinycurses.c

index 4d3e8e1be247178874bdd1862617b08170ea70b1..fb492b6cea73889eed5004c3e7bc7dd74b1d3db9 100644 (file)
@@ -584,6 +584,15 @@ int wborder(WINDOW *win, chtype ls, chtype rs, chtype ts, chtype bs,
 {
        int x, y;
 
+       if (ls == 0) ls = ACS_VLINE;
+       if (rs == 0) rs = ACS_VLINE;
+       if (ts == 0) ts = ACS_HLINE;
+       if (bs == 0) bs = ACS_HLINE;
+       if (tl == 0) tl = ACS_ULCORNER;
+       if (tr == 0) tr = ACS_URCORNER;
+       if (bl == 0) bl = ACS_LLCORNER;
+       if (br == 0) br = ACS_LRCORNER;
+
        for(y = 0; y <= win->_maxy; y++) {
 
                if (y == 0) {