libpayload: fix wborder()
[coreboot.git] / payloads / libpayload / curses / tinycurses.c
index 6e0ab3cfdd5af9c78f77d71808d11fe0159bc4d8..fb492b6cea73889eed5004c3e7bc7dd74b1d3db9 100644 (file)
@@ -191,7 +191,9 @@ NCURSES_CH_T _nc_render(WINDOW *win, NCURSES_CH_T ch)
 int beep(void)
 {
        /* TODO: Flash the screen if beeping fails? */
+#ifdef CONFIG_SPEAKER
        speaker_tone(1760, 500);        /* 1760 == note A6 */
+#endif
        return OK;
 }
 // bool can_change_color(void) {}
@@ -582,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) {
@@ -969,7 +980,7 @@ int wsetscrreg(WINDOW *win, int top, int bottom)
 }
 // void wsyncdown (WINDOW *) {}
 // void wsyncup (WINDOW *) {}
-/* D */ void wtimeout(WINDOW *win, int delay) { win->_delay = delay; }
+/* D */ void wtimeout(WINDOW *win, int _delay) { win->_delay = _delay; }
 /* D */ int wtouchln(WINDOW *win, int y, int n, int changed)
 {
        int i;