🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.x
Article #23818

Re: xterm escape sequence query

#23818
From: der Mouse
Date: Tue, 18 Jun 1991 03:07
52 lines
2569 bytes
> [when an xterm received] Escape P (that is a capital P) the output
> ceased.  It took a hard reset of the terminal to get input and output
> to resume.

> I assume that xterm's state table interpreting escape sequences has a
> problem.  Unknown escape sequences should just fall out I would
> think- but instead are causing the program to [seize] up.

> Anyone know what the fix is for this problem?

ESC P is the 7-bit representation of X3.64's DCS (device control
sequence) initiator.  The DCS sequence is defined, according to the
notes I took while reading X3.64, as

	Control strings:
		intro delimiter, one of OSC, PM, APC, DCS
		Gs...Gs
		closing delimiter, ST
		Presence of other controls or 10/0-15/15 is error,
			recovery not specified

where Gs is "graphic character in a string, 2/0 to 7/14" and ST is
either 9/12 or its corresponding 7-bit sequence ESC \.

(Characters are specified in hexadecimal with the digits expressed in
decimal with a slash between them; thus 7/14 is 0x7e and 9/12 is 0x9c,
for example.  This is the way the standard reads; it is not clear to me
why ANSI chose such a weird way of writing them.  Surely anyone capable
of understanding their notation would be equally capable of
understanding normal hex.)

So xterm is entirely within its rights to go out to lunch; you are
sending it a sequence which is in error (a DCS string with CR and LF
and probably TAB control characters in it).

Of course, one could wish it recovered from the error a little more
gracefully :-)

If you want to do this, go into VTPrsTbl.c in the xterm source and edit
the definition of igntable and possibly iestable (see charproc.c for
their usage) to have it return to CASE_GROUND_STATE when it sees a
control character in igntable....

Or at least it looks as though that should work, based on a
thirty-second perusal of VTPrsTbl.c and charproc.c.  I haven't tried
this, for the simple reason that I don't use xterm.  (I believe mterm
does this better than xterm does.)

					der Mouse

			old: mcgill-vision!mouse
			new: mouse@larry.mcrcim.mcgill.edu
Technical Details
Message-ID: <9106180307.AA02044@lightning.McRCIM.McGill.EDU>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!cis.ohio-state.edu!ucbvax!bloom-beacon!dont-send-mail-to-path-lines

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!cis.ohio-state.edu!ucbvax!bloom-beacon!dont-send-mail-to-path-lines
From: mouse@lightning.mcrcim.mcgill.EDU (der Mouse)
Newsgroups: comp.windows.x
Subject: Re:  xterm escape sequence query
Message-ID: <9106180307.AA02044@lightning.McRCIM.McGill.EDU>
Date: 18 Jun 91 03:07:52 GMT
Sender: daemon@athena.mit.edu (Mr Background)
Organization: The Internet
Lines: 52