&& (ch > 255)) {
&& (c > 255)) {
Tekparse(void){    register TScreen *screen = &term->screen;    register int c = 0, x, y;    Char ch;    int nextstate;    for (;;) {	c = input();	/*	 * The parsing tables all have 256 entries.  If we're supporting	 * wide characters, we handle them by treating them the same as	 * printing characters.	 */#if OPT_WIDE_CHARS	if (c > 255) {	    nextstate = (Tparsestate == Talptable)		? CASE_PRINT		: CASE_IGNORE;	} else#endif	    nextstate = Tparsestate[c];	TRACE(("Tekparse %04X -> %d\n", c, nextstate));	switch (nextstate) {	case CASE_REPORT:	    TRACE(("case: report address\n"));	    if (screen->TekGIN) {		TekGINoff();		TekEnqMouse(0);	    } else {		c = 064;	/* has hard copy unit */		if (screen->margin == MARGIN2)		    c |= 02;		TekEnq(c, screen->cur_X, screen->cur_Y);	    }	    TekRecord->ptr[-1] = NAK;	/* remove from recording */	    Tparsestate = curstate;	    break;	case CASE_VT_MODE:	    TRACE(("case: special return to vt102 mode\n"));	    Tparsestate = curstate;	    TekRecord->ptr[-1] = NAK;	/* remove from recording */#ifdef ALLOWLOGGING	    if (screen->logging) {		FlushLog(screen);		screen->logstart = DecodedData(&(VTbuffer));	    }#endif	    return;	case CASE_SPT_STATE:	    TRACE(("case: Enter Special Point Plot mode\n"));	    if (screen->TekGIN)		TekGINoff();	    Tparsestate = curstate = Tspttable;	    break;	case CASE_GIN:	    TRACE(("case: Do Tek GIN mode\n"));	    screen->TekGIN = &TekRecord->ptr[-1];	    /* Set cross-hair cursor raster array */	    if ((GINcursor =		 make_colored_cursor(XC_tcross, screen->mousecolor,				     screen->mousecolorback)) != 0) {		XDefineCursor(screen->display, TWindow(screen),			      GINcursor);	    }	    Tparsestate = Tbyptable;	/* Bypass mode */	    break;	case CASE_BEL:	    TRACE(("case: BEL\n"));	    if (screen->TekGIN)		TekGINoff();	    if (!TekRefresh)		Bell(XkbBI_TerminalBell, 0);	    Tparsestate = curstate;	/* clear bypass condition */	    break;	case CASE_BS:	    TRACE(("case: BS\n"));	    if (screen->TekGIN)		TekGINoff();	    Tparsestate = curstate;	/* clear bypass condition */	    TCursorBack();	    break;	case CASE_PT_STATE:	    TRACE(("case: Enter Tek Point Plot mode\n"));	    if (screen->TekGIN)		TekGINoff();	    Tparsestate = curstate = Tpttable;	    break;	case CASE_PLT_STATE:	    TRACE(("case: Enter Tek Plot mode\n"));	    if (screen->TekGIN)		TekGINoff();	    Tparsestate = curstate = Tplttable;	    if ((c = input()) == BEL)		screen->pen = PENDOWN;	    else {		unput(c);		screen->pen = PENUP;	    }	    break;	case CASE_TAB:	    TRACE(("case: HT\n"));	    if (screen->TekGIN)		TekGINoff();	    Tparsestate = curstate;	/* clear bypass condition */	    TCursorForward();	    break;	case CASE_IPL_STATE:	    TRACE(("case: Enter Tek Incremental Plot mode\n"));	    if (screen->TekGIN)		TekGINoff();	    Tparsestate = curstate = Tipltable;	    break;	case CASE_ALP_STATE:	    TRACE(("case: Enter Tek Alpha mode from any other mode\n"));	    if (screen->TekGIN)		TekGINoff();	    /* if in one of graphics states, move alpha cursor */	    if (nplot > 0)	/* flush line Tbuffer */		TekFlush();	    Tparsestate = curstate = Talptable;	    break;	case CASE_UP:	    TRACE(("case: cursor up\n"));	    if (screen->TekGIN)		TekGINoff();	    Tparsestate = curstate;	/* clear bypass condition */	    TCursorUp();	    break;	case CASE_COPY:	    TRACE(("case: make copy\n"));	    if (screen->TekGIN)		TekGINoff();	    TekCopy();	    TekRecord->ptr[-1] = NAK;	/* remove from recording */	    Tparsestate = curstate;	/* clear bypass condition */	    break;	case CASE_PAGE:	    TRACE(("case: Page Function\n"));	    if (screen->TekGIN)		TekGINoff();	    TekPage();		/* clear bypass condition */	    break;	case CASE_BES_STATE:	    TRACE(("case: Byp: an escape char\n"));	    Tparsestate = Tbestable;	    break;	case CASE_BYP_STATE:	    TRACE(("case: set bypass condition\n"));	    Tparsestate = Tbyptable;	    break;	case CASE_IGNORE:	    TRACE(("case: Esc: totally ignore CR, ESC, LF, ~\n"));	    break;	case CASE_ASCII:	    TRACE(("case: Select ASCII char set\n"));	    /* ignore for now */	    Tparsestate = curstate;	    break;	case CASE_APL:	    TRACE(("case: Select APL char set\n"));	    /* ignore for now */	    Tparsestate = curstate;	    break;	case CASE_CHAR_SIZE:	    TRACE(("case: character size selector\n"));	    TekSetFontSize(c & 03);	    Tparsestate = curstate;	    break;	case CASE_BEAM_VEC:	    TRACE(("case: beam and vector selector\n"));	    /* only line types */	    if ((c &= LINEMASK) != screen->cur.linetype) {		if (nplot > 0)		    TekFlush();		if (c <= TEKNUMLINES)		    screen->cur.linetype = c;	    }	    Tparsestate = curstate;	    break;	case CASE_CURSTATE:	    Tparsestate = curstate;	    break;	case CASE_PENUP:	    TRACE(("case: Ipl: penup\n"));	    screen->pen = PENUP;	    break;	case CASE_PENDOWN:	    TRACE(("case: Ipl: pendown\n"));	    screen->pen = PENDOWN;	    break;	case CASE_IPL_POINT:	    TRACE(("case: Ipl: point\n"));	    x = screen->cur_X;	    y = screen->cur_Y;	    if (c & NORTH)		y++;	    else if (c & SOUTH)		y--;	    if (c & EAST)		x++;	    else if (c & WEST)		x--;	    if (screen->pen == PENDOWN)		TekDraw(x, y);	    else		TekMove(x, y);	    break;	case CASE_PLT_VEC:	    TRACE(("case: Plt: vector\n"));	    unput(c);	    if (getpoint()) {		if (screen->pen == PENDOWN) {		    TekDraw(screen->cur.x, screen->cur.y);		} else {		    TekMove(screen->cur.x, screen->cur.y);		}		screen->pen = PENDOWN;	    }	    break;	case CASE_PT_POINT:	    TRACE(("case: Pt: point\n"));	    unput(c);	    if (getpoint()) {		TekMove(screen->cur.x, screen->cur.y);		TekDraw(screen->cur.x, screen->cur.y);	    }	    break;	case CASE_SPT_POINT:	    TRACE(("case: Spt: point\n"));	    /* ignore intensity character in c */	    if (getpoint()) {		TekMove(screen->cur.x, screen->cur.y);		TekDraw(screen->cur.x, screen->cur.y);	    }	    break;	case CASE_CR:	    TRACE(("case: CR\n"));	    if (screen->TekGIN)		TekGINoff();	    if (nplot > 0)	/* flush line Tbuffer */		TekFlush();	    screen->cur_X = screen->margin == MARGIN1 ? 0 :		TEKWIDTH / 2;	    Tparsestate = curstate = Talptable;	    break;	case CASE_ESC_STATE:	    TRACE(("case: ESC\n"));	    Tparsestate = Tesctable;	    break;	case CASE_LF:	    TRACE(("case: LF\n"));	    if (screen->TekGIN)		TekGINoff();	    TCursorDown();	    if (!TekRefresh)		do_xevents();	    break;	case CASE_SP:	    TRACE(("case: SP\n"));	    TCursorForward();	    break;	case CASE_PRINT:	    TRACE(("case: printable character\n"));	    ch = c;	    c = screen->cur.fontsize;	    x = (int) (screen->cur_X * TekScale(screen))		+ screen->border;	    y = (int) ((TEKHEIGHT + TEKTOPPAD - screen->cur_Y) * TekScale(screen))		+ screen->border;#if OPT_WIDE_CHARS	    if (screen->wide_chars		&& (ch > 255)) {		XChar2b sbuf;		sbuf.byte2 = CharOf(ch);		sbuf.byte1 = CharOf(ch >> 8);		XDrawImageString16(screen->display,				   TWindow(screen),				   screen->TnormalGC,				   x,				   y,				   &sbuf,				   1);	    } else#endif		XDrawString(screen->display,			    TWindow(screen),			    screen->TnormalGC,			    x,			    y,			    (char *) &ch,			    1);	    TCursorForward();	    break;	case CASE_OSC:	    /* FIXME:  someone should disentangle the input queues	     * of this code so that it can be state-driven.	     */	    TRACE(("case: do osc escape\n"));	    {		Char buf2[512];		int c2, len = 0;		while ((c2 = Tinput()) != BEL) {		    if (!isprint(c2 & 0x7f)			|| len + 2 >= (int) sizeof(buf2))			break;		    buf2[len++] = c2;		}		if (c2 == BEL)		    do_osc(buf2, len, BEL);	    }	    Tparsestate = curstate;	    break;	}    }}