1 /* Clear Screen + Header 2 3 * Copyright (C) 1998 J.A. Bezemer 4 * 5 * Licensed under the terms of the GNU General Public License. 6 * ABSOLUTELY NO WARRANTY. 7 * See the file `COPYING' in this directory. 8 */ 9 10 #include "clrscr.h" 11 #include <string.h> 12 #ifndef OLD_CURSES 13 #include <ncurses.h> 14 #else 15 #include <curses.h> 16 #endif 17 18 19 void header(char * headertext)20header (char *headertext) 21 { 22 int i; 23 mvaddstr (0, 1, PROGRAM_NAME); 24 25 mvaddstr (0, (80 - strlen (headertext) + 1) / 2, 26 headertext); 27 28 move (1, 0); 29 for (i = 0; i < 80; i++) 30 addch (ACS_S1); 31 } 32 33 void clearscreen(char * headertext)34clearscreen (char *headertext) 35 { 36 clear (); 37 refresh (); 38 39 header (headertext); 40 } 41