Path: utzoo!utgpu!utstat!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!decwrl!nestvx.dec.com!neideck From: neideck@nestvx.dec.com (Burkhard Neidecker-Lutz) Newsgroups: comp.windows.x Subject: Re: 8 bits per char Message-ID: <8903012115.AA15260@decwrl.dec.com> Date: 1 Mar 89 21:15:18 GMT Organization: Digital Equipment Corporation Lines: 76 To answer my own question about the required modification to allow xterm to deal with 8 bit characters, the following kludge seems to work. I hope I didn't miss anything important, but it works for me. *** xterm/charproc.c Thu Jan 12 12:25:24 1989 --- xterm8/charproc.c Wed Mar 1 15:24:35 1989 *************** VTparse( *** 381,387 **** { register TScreen *screen = &term->screen; register int *parsestate = groundtable; ! register int c; register char *cp; register int row, col, top, bot, scstype; extern int bitset(), bitclr(), finput(), TrackMouse(); --- 381,387 ---- { register TScreen *screen = &term->screen; register int *parsestate = groundtable; ! register int c,ps; register char *cp; register int row, col, top, bot, scstype; extern int bitset(), bitclr(), finput(), TrackMouse(); *************** VTparse( *** 388,395 **** if(setjmp(vtjmpbuf)) parsestate = groundtable; ! for( ; ; ) ! switch(parsestate[c = doinput()]) { case CASE_PRINT: /* printable characters */ top = bcnt > TEXT_BUF_SIZE ? TEXT_BUF_SIZE : bcnt; --- 388,403 ---- if(setjmp(vtjmpbuf)) parsestate = groundtable; ! for( ; ; ) { ! c = 0xff & doinput(); ! if (c < 0x80) { ! ps = parsestate[c]; ! } else if (c >= 0xa0 && parsestate == groundtable) { ! ps = CASE_PRINT; ! } else { ! continue; ! } ! switch(ps) { case CASE_PRINT: /* printable characters */ top = bcnt > TEXT_BUF_SIZE ? TEXT_BUF_SIZE : bcnt; *************** VTparse( *** 930,935 **** --- 938,944 ---- parsestate = groundtable; break; } + } } finput() *************** in_put( *** 1042,1050 **** } else if(bcnt == 0) Panic("input: read returned zero\n", 0); else { - /* strip parity bit */ - for(i = bcnt, cp = bptr ; i > 0 ; i--) - *cp++ &= CHAR; if(screen->scrollWidget && screen->scrollinput && screen->topline < 0) /* Scroll to bottom */ --- 1051,1056 ---- Burkhard Neidecker-Lutz, Digital CEC Karlsruhe, Project NESTOR