FillCurBackground (
ClearCurBackground (
ClearInLine(screen, row, col, len)	register TScreen *screen;	int row;	int col;	int len;{	int rc = 1;	int flags = TERM_COLOR_FLAGS;	/*	 * If we're clearing to the end of the line, we won't count this as	 * "drawn" characters.  We'll only do cut/paste on "drawn" characters,	 * so this has the effect of suppressing trailing blanks from a	 * selection.	 */	if (col + len + 1 < screen->max_col)		flags |= CHARDRAWN;	/* If we've marked protected text on the screen, we'll have to	 * check each time we do an erase.	 */	if (screen->protected_mode != OFF_PROTECT) {		register int n;		Char *attrs = SCRN_BUF_ATTRS(screen, row) + col;		int saved_mode = screen->protected_mode;		Bool done;		/* disable this branch during recursion */		screen->protected_mode = OFF_PROTECT;		do {			done = True;			for (n = 0; n < len; n++) {				if (attrs[n] & PROTECTED) {					rc = 0; /* found a protected segment */					if (n != 0)						ClearInLine(screen, row, col, n);					while ((n < len)					   &&  (attrs[n] & PROTECTED))						n++;					done = False;					break;				}			}			/* setup for another segment, past the protected text */			if (!done) {				attrs += n;				col += n;				len -= n;			}		} while (!done);		screen->protected_mode = saved_mode;		if (len <= 0)			return 0;	}	/* fall through to the final non-protected segment */	if(screen->cursor_state)		HideCursor();	screen->do_wrap = 0;	if (row - screen->topline <= screen->max_row) {		if(!AddToRefresh(screen)) {			if(screen->scroll_amt)				FlushScroll(screen);			FillCurBackground (				screen,				CurCursorX (screen, row, col),				CursorY (screen, row),				len * CurFontWidth(screen,row),				FontHeight(screen));		}	}	memset(SCRN_BUF_CHARS(screen, row) + col, ' ',   len);	memset(SCRN_BUF_ATTRS(screen, row) + col, flags, len);	if_OPT_ISO_COLORS(screen,{		memset(SCRN_BUF_COLOR(screen, row) + col, xtermColorPair(), len);	})	if_OPT_DEC_CHRSET({		memset(SCRN_BUF_CSETS(screen, row) + col, curXtermChrSet(screen->cur_row), len);	})	return rc;}