send_CharSet(row);	 send_SGR(0); while (last--) { if (((*a & SGR_MASK) != attr) && *c) { send_SGR(attr = (*a & SGR_MASK));
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);
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;	TRACE(("printLine(row=%d, chr=%d)\n", row, chr))	while (last > 0) {		if ((a[last-1] & CHARDRAWN) == 0)			last--;		else			break;	}	if (last) {		send_CharSet(row);	/* FIXME: is this needed? */		send_SGR(0);		while (last--) {			if (((*a & SGR_MASK) != attr) && *c) {				send_SGR(attr = (*a & SGR_MASK));			}			charToPrinter(*c ? *c : ' ');			c++;			a++;		}		send_SGR(0);	}	charToPrinter('\r');	charToPrinter(chr);}