TRACE(("In printer:%d\n", chr))
TRACE(("In printer:%d\n", chr));
int xtermPrinterControl(int chr){	register TScreen *screen = &term->screen;	static struct {		Char seq[5];		int active;	} tbl[] = {		{ { CSI,     '5', 'i' }, 2 },		{ { CSI,     '4', 'i' }, 0 },		{ { ESC, LB, '5', 'i' }, 2 },		{ { ESC, LB, '4', 'i' }, 0 },	};	static Char bfr[10];	static size_t length;	size_t n;	TRACE(("In printer:%d\n", chr))	switch (chr) {	case 0:	case 'Q' & 0x1f:	case 'S' & 0x1f:		return 0;	/* ignored by application */	case CSI:	case ESC:	case '[':	case '4':	case '5':	case 'i':		bfr[length++] = chr;		for (n = 0; n < sizeof(tbl)/sizeof(tbl[0]); n++) {			size_t len = Strlen(tbl[n].seq);			if (length == len			 && Strcmp(bfr, tbl[n].seq) == 0) {				screen->printer_controlmode = tbl[n].active;				TRACE(("Set printer controller mode %sactive\n",					tbl[n].active ? "" : "in"))				if (screen->printer_autoclose				 && screen->printer_controlmode == 0)					closePrinter();				length = 0;				return 0;			} else if (len > length			 && Strncmp(bfr, tbl[n].seq, length) == 0) {				return 0;			}		}		length--;		/* FALLTHRU */	default:		for (n = 0; n < length; n++)			charToPrinter(bfr[n]);		bfr[0] = chr;		length = 1;		return 0;	}}