diff options
-rw-r--r-- | menudriver.c | 41 |
1 files changed, 4 insertions, 37 deletions
diff --git a/menudriver.c b/menudriver.c index 63fed32..7d517ef 100644 --- a/menudriver.c +++ b/menudriver.c @@ -78,13 +78,6 @@ int main(int argc, char *argv[]) fastback = !(*fb == 'N' || *fb == 'n'); } -#ifdef CURSES - setupterm(0, 1, &ok); - if (ok != 1) { - fprintf(stderr, "warning: cannot find terminfo entry\n"); - } -#endif - menudrive(argc == 1 ? "." : argv[1]); } @@ -252,7 +245,9 @@ void menudrive(char *dir) *np = '\0'; } } - } else if (strcmp(next, "???") == 0) { /* ask to see menudriver settings */ + + } else if (strcmp(next, "???") == 0) { + /* ask to see menudriver settings */ settings(); printf("[Hit return to continue]"); while (getchar() != '\n') { @@ -434,36 +429,8 @@ void poplast(void) strcpy(last, ++lastp); } -#ifndef CURSES - /* to clear screen */ void clrscr(void) { - printf("\x1b[2J\x1b[H"); - fflush(stdout); + system("tput clear"); } - -#else -/* alternative method needs curses lib, compile with -DCURSES, or -DUWIN - and -lncurses */ - -#ifdef UWIN -#include <ncurses/curses.h> -#include <ncurses/term.h> -#else -#include <curses.h> -#include <term.h> -#endif - -void clrscr(void) -{ - if (ok != 1) { - return; - } - - putp(clear_screen); - fflush(stdout); -} - -/* end of clrscr method using curses */ -#endif |