screen->save_ptr[i] = 0; bzero( screen->save_ptr[i+ OFF_CHARS], size); memset(screen->save_ptr[i+ OFF_ATTRS], flags, size); memset(screen->save_ptr[i+ OFF_COLOR], xtermColorPair(), size);
for (j = 0; j < MAX_PTRS; j++) { if (j < BUF_HEAD) screen->save_ptr[i+j] = 0; else if (j == OFF_ATTRS) memset(screen->save_ptr[i+j], flags, size); #if OPT_ISO_COLORS #if OPT_EXT_COLORS else if (j == OFF_FGRND) memset(screen->save_ptr[i+j], term->sgr_foreground, size); else if (j == OFF_BGRND) memset(screen->save_ptr[i+j], term->cur_background, size); #else else if (j == OFF_COLOR) memset(screen->save_ptr[i+j], xtermColorPair(), size); #endif #endif else bzero( screen->save_ptr[i+j], size); }
ScrnClearLines (TScreen *screen, ScrnBuf sb, int where, int n, int size){	register int i, j;	size_t len = ScrnPointers(screen, n);	int last = (n * MAX_PTRS);	/* save n lines at where */	memcpy ( (char *) screen->save_ptr,		 (char *) &sb[MAX_PTRS * where],		 len);	/* clear contents of old rows */	if (TERM_COLOR_FLAGS) {		int flags = TERM_COLOR_FLAGS;		for (i = 0; i < last; i += MAX_PTRS) {			screen->save_ptr[i] = 0;			bzero( screen->save_ptr[i+ OFF_CHARS], size);			memset(screen->save_ptr[i+ OFF_ATTRS], flags, size);			memset(screen->save_ptr[i+ OFF_COLOR], xtermColorPair(), size);		}	} else {		for (i = 0; i < last; i += MAX_PTRS) {			for (j = 0; j < BUF_HEAD; j++)				screen->save_ptr[i+j] = 0;			for (j = BUF_HEAD; j < MAX_PTRS; j++)				bzero (screen->save_ptr[i+j], size);		}	}}