Author: uwe Date: 2008-04-09 01:30:22 +0200 (Wed, 09 Apr 2008) New Revision: 3224
Modified: trunk/payloads/libpayload/curses/tinycurses.c Log: 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
Modified: trunk/payloads/libpayload/curses/tinycurses.c =================================================================== --- trunk/payloads/libpayload/curses/tinycurses.c 2008-04-08 23:21:33 UTC (rev 3223) +++ trunk/payloads/libpayload/curses/tinycurses.c 2008-04-08 23:30:22 UTC (rev 3224) @@ -79,8 +79,8 @@ 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 @@ // 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 @@ /* 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 @@ } // 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;