charToPrinter(c[col] ? c[col] : ' ');
if (ch == 0) ch = ' ';  cs = (ch >= ' ' && ch != 0x7f) ? CSET_IN : CSET_OUT; if (last_cs != cs) { if (screen->print_attributes) { charToPrinter((cs == CSET_OUT) ? SHIFT_OUT : SHIFT_IN); } last_cs = cs; }   charToPrinter((cs == CSET_OUT) ? (ch == 0x7f ? 0x5f : (ch + 0x5f)) : ch);
static void printLine(row, chr)	int row;	int chr;{	register TScreen *screen = &term->screen;	Char *c = SCRN_BUF_CHARS(screen, row);	Char *a = SCRN_BUF_ATTRS(screen, row);	Char attr = *a & SGR_MASK;	int last = screen->max_col;	int col;#if OPT_ISO_COLORS && OPT_PRINT_COLORS	register Char *fb = 0;#endif	int fg = -1, last_fg = -1;	int bg = -1, last_bg = -1;	TRACE(("printLine(row=%d, chr=%d)\n", row, chr))	if_OPT_ISO_COLORS(screen,{		fb = SCRN_BUF_COLOR(screen, row);	})	while (last > 0) {		if ((a[last-1] & CHARDRAWN) == 0)			last--;		else			break;	}	if (last) {		if (screen->print_attributes) {			send_CharSet(row);			send_SGR(0,-1,-1);		}		for (col = 0; col < last; col++) {#if OPT_PRINT_COLORS			if_OPT_ISO_COLORS(screen,{				if (screen->print_attributes > 1) {					fg = (a[col] & FG_COLOR)						? extract_fg(fb[col], a[col])						: -1;					bg = (a[col] & BG_COLOR)						? extract_bg(fb[col])						: -1;				}			})#endif			if ((((a[col] & SGR_MASK) != attr)#if OPT_PRINT_COLORS			    || (last_fg != fg) || (last_bg != bg)#endif			    )			 && c[col]) {				attr = (a[col] & SGR_MASK);				last_fg = fg;				last_bg = bg;				if (screen->print_attributes)					send_SGR(attr, fg, bg);			}			charToPrinter(c[col] ? c[col] : ' ');		}		if (screen->print_attributes)			send_SGR(0,-1,-1);	}	charToPrinter('\r');	charToPrinter(chr);}