static int tcapeeop(void) { int i, starting_col, starting_row; /* * If the terminal doesn't have back color erase, then we have to * erase manually to preserve the background color. */ if(pico_usingcolor() && (!_bce || !_cleartoeos)){ extern int ttcol, ttrow; starting_col = ttcol; starting_row = ttrow; tcapeeol(); /* rest of this line */ for(i = ttrow+1; i <= term.t_nrow; i++){ /* the remaining lines */ tcapmove(i, 0); tcapeeol(); } tcapmove(starting_row, starting_col); } else if(_cleartoeos) putpad(_cleartoeos); /* return ignored */ return(0); }
static void tcapclose(void) { #if OPT_VIDEO_ATTRS if (ME) /* end special attributes (including color) */ putpad(ME); #endif TTmove(term.t_nrow-1, 0); /* cf: dumbterm.c */ tcapeeol(); #if OPT_COLOR shown_fcolor = shown_bcolor = given_fcolor = given_bcolor = NO_COLOR; #endif }