xterm-33.patch.txt

xterm - patch #32 - 1996/11/24 - T.E.Dickey <dickey@clark.net>
 
This adds to the reset-fix by Matthieu Herrb <Mathieu.Herrb@mipnet.fr> a small
change to make xterm able to output 8-bit characters in VT100 mode. 
 
Applications that run on real VT100's don't do that anyway, and this feature
should be removed sometime after finishing off the VT220 emulation (VT220's can
do 8-bit characters).  That would be a good time to change the default
terminal-id to 220.
 
--------------------------------------------------------------------------------
 charproc.c |   14 ++++++++++++--
 1 files changed, 12 insertions, 2 deletions
--------------------------------------------------------------------------------
Index: charproc.c
--- xterm-32/charproc.c Mon Nov 18 13:58:37 1996
+++ xterm-33/charproc.c Sun Nov 24 20:43:55 1996
@@ -862,8 +862,11 @@
 
        /* We longjmp back to this point in VTReset() */
        (void)setjmp(vtjmpbuf);
-
+#if OPT_VT52_MODE
        groundtable = screen->ansi_level ? ansi_table : vt52_table;
+#else
+       groundtable = ansi_table;
+#endif
        parsestate = groundtable;
        scstype = 0;
        private_function = False;
@@ -918,7 +921,14 @@
                        *--bptr = c;
                        while(top > 0 && isprint(*cp & 0x7f)) {
 #if OPT_VT52_MODE
-                               if (screen->ansi_level <= 1)
+                               /*
+                                * Strip output text to 7-bits for VT52.  We
+                                * should do this for VT100 also (which is a
+                                * 7-bit device), but since xterm has been
+                                * doing this for so long we shouldn't change
+                                * this behavior.
+                                */
+                               if (screen->ansi_level < 1)
                                        *cp &= 0x7f;
 #endif
                                top--;