From: Eric S. Raymond Date: Thu, 3 Feb 2005 21:56:24 +0000 (+0000) Subject: Get rid of clearscreen(). X-Git-Tag: 2.0~400 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=fee8e83e1b2c4d61bd0346d282dd89074580140b;p=super-star-trek.git Get rid of clearscreen(). --- diff --git a/io.c b/io.c index ec30ccf..3090693 100644 --- a/io.c +++ b/io.c @@ -81,25 +81,6 @@ void ioend(void) { outro(0); } -void clearscreen(void) { - /* Somehow we need to clear the screen */ -#ifdef __BORLANDC__ - extern void clrscr(void); - clrscr(); -#else - if (curses) { - wclear(stdscr); - wrefresh(stdscr); - } else { - // proutn("\033[2J"); /* Hope for an ANSI display */ - /* much more in that old-TTY spirit to just throw linefeeds */ - int i; - for (i = 0; i < screenheight; i++) - putchar('\n'); - } -#endif -} - void waitfor(void) { /* wait for user action -- OK to do nothing if on a TTY */ #ifdef SERGEEV @@ -140,7 +121,10 @@ void pause_game(int i) { proutn(prompt); fgets(buf, sizeof(buf), stdin); if (i != 0) { - clearscreen(); + /* much more in that old-TTY spirit to throw linefeeds */ + int j; + for (j = 0; j < screenheight; j++) + putchar('\n'); } linecount = 0; } diff --git a/sst.h b/sst.h index 7d0b9c3..124abe5 100644 --- a/sst.h +++ b/sst.h @@ -433,7 +433,6 @@ void debugme(void); void attakreport(int); void movetho(void); void probe(void); -void clearscreen(void); void iostart(int); void ioend(void); void setwnd(short);