aboutsummaryrefslogtreecommitdiff
path: root/payloads/libpayload/curses
diff options
context:
space:
mode:
authorUwe Hermann <uwe@hermann-uwe.de>2008-04-08 23:30:22 +0000
committerUwe Hermann <uwe@hermann-uwe.de>2008-04-08 23:30:22 +0000
commitea72559d5d750b46c20ce2044f34efddc7d89032 (patch)
tree46d85c88f8af717171b130bbf3166a87b3d591c2 /payloads/libpayload/curses
parent672d0ae15655aa8c28e2ac0e698e501628347b7c (diff)
Small curses fixes/additions for libpayload (trivial).
- Properly set LINES and COLS, needed for a real curses application. - Implement notimeout() and wtimeout(), which are trivial. - Implement a dummy flushinp() for now as it's needed by a curses application I'm porting, will be replaced by something useful later. Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de> Acked-by: Uwe Hermann <uwe@hermann-uwe.de> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3224 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'payloads/libpayload/curses')
-rw-r--r--payloads/libpayload/curses/tinycurses.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/payloads/libpayload/curses/tinycurses.c b/payloads/libpayload/curses/tinycurses.c
index 6fcb43fcf8..9b87ec0828 100644
--- a/payloads/libpayload/curses/tinycurses.c
+++ b/payloads/libpayload/curses/tinycurses.c
@@ -79,8 +79,8 @@ int COLOR_PAIRS;
WINDOW *stdscr;
WINDOW *curscr;
WINDOW *newscr;
-int LINES;
-int COLS;
+int LINES = 25;
+int COLS = 80;
int TABSIZE;
int ESCDELAY;
// char ttytype[];
@@ -202,7 +202,7 @@ int endwin(void)
// char erasechar (void) {}
// void filter (void) {}
// int flash(void) {}
-// int flushinp (void) {}
+int flushinp(void) { /* TODO */ return 0; }
// WINDOW *getwin (FILE *) {}
bool has_colors (void) { /* TODO */ return(*(bool *)0); }
// bool has_ic (void) {}
@@ -322,7 +322,7 @@ WINDOW *newwin(int num_lines, int num_columns, int begy, int begx)
/* D */ int nonl(void) { SP->_nl = FALSE; return OK; }
// void noqiflush (void) {}
// int noraw (void) {}
-// int notimeout (WINDOW *,bool) {}
+/* D */ int notimeout (WINDOW *win, bool f) { win->_notimeout = f; return OK; }
// int overlay (const WINDOW*,WINDOW *) {}
// int overwrite (const WINDOW*,WINDOW *) {}
// int pair_content (short,short*,short*) {}
@@ -655,7 +655,7 @@ int wsetscrreg(WINDOW *win, int top, int bottom)
}
// void wsyncdown (WINDOW *) {}
// void wsyncup (WINDOW *) {}
-// void wtimeout (WINDOW *,int) {}
+/* D */ void wtimeout(WINDOW *win, int delay) { win->_delay = delay; }
/* D */ int wtouchln(WINDOW *win, int y, int n, int changed)
{
int i;