hunt/display.c
/*
 * display_clear_the_screen:
 *	clear the screen; move cursor to top left
 */
clear the screen; move cursor to top left
clear the screen ; move cursor to top left
void
display_clear_the_screen()
{
        int     i;
        if (blanks[0] == '\0')   
                for (i = 0; i < SCREEN_WIDTH; i++)
                        blanks[i] = ' ';
        if (CL != NULL) {
                tputs(CL, LINES, __cputchar);
                for (i = 0; i < SCREEN_HEIGHT; i++)
                        memcpy(screen[i], blanks, SCREEN_WIDTH);
        } else {
                for (i = 0; i < SCREEN_HEIGHT; i++) {
                        mvcur(cur_row, cur_col, i, 0);
                        cur_row = i;
                        cur_col = 0;
                        display_clear_eol();
                }
                mvcur(cur_row, cur_col, 0, 0);
        }
        cur_row = cur_col = 0;
}
void display_clear_the_screen ( ) { int i ; if ( blanks [ 0 ] == ' \0 ' ) for ( i = 0 ; i < SCREEN_WIDTH ; i ++ ) blanks [ i ] = ' ' ; if ( CL != NULL ) { tputs ( CL , LINES , __cputchar ) ; for ( i = 0 ; i < SCREEN_HEIGHT ; i ++ ) memcpy ( screen [ i ] , blanks , SCREEN_WIDTH ) ; } else { for ( i = 0 ; i < SCREEN_HEIGHT ; i ++ ) { mvcur ( cur_row , cur_col , i , 0 ) ; cur_row = i ; cur_col = 0 ; display_clear_eol ( ) ; } mvcur ( cur_row , cur_col , 0 , 0 ) ; } cur_row = cur_col = 0 ; }
display_clear_the_screen:
      clear the screen; move cursor to top left
display_clear_the_screen : clear the screen ; move cursor to top left