XFree86 3.1.2Gb - xterm patch #29 - T.Dickey
This patch does the following:
+ corrects the restoration of color for bold/underline color mode
+ adds a resource 'decTerminalID' to control the reporting level of
xterm (e.g., VT100, VT220).
+ uses the new resource to implement/correct the DA1, DA2 and
DECRPTUI reports.
+ change valid-response code in DECRQSS from 0 to 1 (the manual says 0,
but the VT420 terminal I've been testing on says 1).
All of these changes are based on vttest 2.6
(Most of the volume in the patch is to add 2 more state tables for parsing
the 2nd/3rd device-attribute controls).
--------------------------------------------------------------------------------
doc/specs/xterm/ctlseqs.ms | 4
programs/xterm/VTPrsTbl.c | 656 ++++++++++++++++++++++++++++++++++++++++++++!
programs/xterm/VTparse.def | 4
programs/xterm/VTparse.h | 6
programs/xterm/charproc.c | 117 +++++!!!
programs/xterm/misc.c | 2
programs/xterm/ptyx.h | 4
programs/xterm/xterm.man | 14
8 files changed, 754 insertions, 1 deletion, 52 modifications
--------------------------------------------------------------------------------
Index: ctlseqs.ms
*** /build/x11r6/XFree86-3.1.2Gb/xc/doc/specs/xterm/ctlseqs.ms Tue Aug 13 14:51:20 1996
--- /build/x11r6/XFree86-current/xc/doc/specs/xterm/ctlseqs.ms Sun Sep 15 22:00:25 1996
***************
*** 462,472 ****
\*m \(-> SGR
.br
\fIxterm\fP responds with
! \*(Dc\*0\*$\*r\*(Pt\*s\*(ST
for valid requests, replacing the \*(Pt with the corresponding \*(Cs
string,
or
! \*(Dc\*1\*$\*r\*(Pt\*s\*(ST
for invalid requests.
.
.sp
--- 462,472 ----
\*m \(-> SGR
.br
\fIxterm\fP responds with
! \*(Dc\*1\*$\*r\*(Pt\*s\*(ST
for valid requests, replacing the \*(Pt with the corresponding \*(Cs
string,
or
! \*(Dc\*0\*$\*r\*(Pt\*s\*(ST
for invalid requests.
.
.sp
Index: VTPrsTbl.c
*** /build/x11r6/XFree86-3.1.2Gb/xc/programs/xterm/VTPrsTbl.c Tue Aug 13 14:51:20 1996
--- /build/x11r6/XFree86-current/xc/programs/xterm/VTPrsTbl.c Sun Sep 15 21:51:25 1996
***************
*** 357,363 ****
CASE_PRINT,
};
! Const PARSE_T csi_table[] = /* ESC [ */
{
/* NUL SOH STX ETX */
CASE_IGNORE,
--- 357,363 ----
CASE_PRINT,
};
! Const PARSE_T csi_table[] = /* CSI */
{
/* NUL SOH STX ETX */
CASE_IGNORE,
***************
*** 436,443 ****
CASE_ESC_SEMI,
/* < = > ? */
CASE_IGNORE,
! CASE_IGNORE,
! CASE_IGNORE,
CASE_DEC_STATE,
/* @ A B C */
CASE_ICH,
--- 436,443 ----
CASE_ESC_SEMI,
/* < = > ? */
CASE_IGNORE,
! CASE_DEC3_STATE,
! CASE_DEC2_STATE,
CASE_DEC_STATE,
/* @ A B C */
CASE_ICH,
***************
*** 1005,1011 ****
CASE_GROUND_STATE,
};
! Const PARSE_T dec_table[] = /* ESC [ ? */
{
/* NUL SOH STX ETX */
CASE_IGNORE,
--- 1005,1011 ----
CASE_GROUND_STATE,
};
! Const PARSE_T dec_table[] = /* CSI ? */
{
/* NUL SOH STX ETX */
CASE_IGNORE,
***************
*** 1152,1157 ****
--- 1152,1805 ----
CASE_GROUND_STATE,
CASE_XTERM_RESTORE,
CASE_XTERM_SAVE,
+ /* t u v w */
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ /* x y z { */
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ /* | } ~ DEL */
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ /* 0x80 0x81 0x82 0x83 */
+ CASE_IGNORE,
+ CASE_IGNORE,
+ CASE_IGNORE,
+ CASE_IGNORE,
+ /* 0x84 0x85 0x86 0x87 */
+ CASE_IGNORE,
+ CASE_IGNORE,
+ CASE_IGNORE,
+ CASE_IGNORE,
+ /* 0x88 0x89 0x8a 0x8b */
+ CASE_IGNORE,
+ CASE_IGNORE,
+ CASE_IGNORE,
+ CASE_IGNORE,
+ /* 0x8c 0x8d 0x8e 0x8f */
+ CASE_IGNORE,
+ CASE_IGNORE,
+ CASE_IGNORE,
+ CASE_IGNORE,
+ /* 0x90 0x91 0x92 0x93 */
+ CASE_IGNORE,
+ CASE_IGNORE,
+ CASE_IGNORE,
+ CASE_IGNORE,
+ /* 0x94 0x95 0x96 0x97 */
+ CASE_IGNORE,
+ CASE_IGNORE,
+ CASE_IGNORE,
+ CASE_IGNORE,
+ /* 0x98 0x99 0x9a 0x9b */
+ CASE_IGNORE,
+ CASE_IGNORE,
+ CASE_IGNORE,
+ CASE_IGNORE,
+ /* 0x9c 0x9d 0x9e 0x9f */
+ CASE_IGNORE,
+ CASE_IGNORE,
+ CASE_IGNORE,
+ CASE_IGNORE,
+ /* nobreakspace exclamdown cent sterling */
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ /* currency yen brokenbar section */
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ /* diaeresis copyright ordfeminine guillemotleft */
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ /* notsign hyphen registered macron */
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ /* degree plusminus twosuperior threesuperior */
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ /* acute mu paragraph periodcentered */
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ /* cedilla onesuperior masculine guillemotright */
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ /* onequarter onehalf threequarters questiondown */
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ /* Agrave Aacute Acircumflex Atilde */
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ /* Adiaeresis Aring AE Ccedilla */
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ /* Egrave Eacute Ecircumflex Ediaeresis */
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ /* Igrave Iacute Icircumflex Idiaeresis */
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ /* Eth Ntilde Ograve Oacute */
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ /* Ocircumflex Otilde Odiaeresis multiply */
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ /* Ooblique Ugrave Uacute Ucircumflex */
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ /* Udiaeresis Yacute Thorn ssharp */
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ /* agrave aacute acircumflex atilde */
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ /* adiaeresis aring ae ccedilla */
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ /* egrave eacute ecircumflex ediaeresis */
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ /* igrave iacute icircumflex idiaeresis */
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ /* eth ntilde ograve oacute */
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ /* ocircumflex otilde odiaeresis division */
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ /* oslash ugrave uacute ucircumflex */
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ /* udiaeresis yacute thorn ydiaeresis */
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ };
+
+ Const PARSE_T dec2_table[] = /* CSI > */
+ {
+ /* NUL SOH STX ETX */
+ CASE_IGNORE,
+ CASE_IGNORE,
+ CASE_IGNORE,
+ CASE_IGNORE,
+ /* EOT ENQ ACK BEL */
+ CASE_IGNORE,
+ CASE_IGNORE,
+ CASE_IGNORE,
+ CASE_BELL,
+ /* BS HT NL VT */
+ CASE_BS,
+ CASE_TAB,
+ CASE_VMOT,
+ CASE_VMOT,
+ /* NP CR SO SI */
+ CASE_VMOT,
+ CASE_CR,
+ CASE_SO,
+ CASE_SI,
+ /* DLE DC1 DC2 DC3 */
+ CASE_IGNORE,
+ CASE_IGNORE,
+ CASE_IGNORE,
+ CASE_IGNORE,
+ /* DC4 NAK SYN ETB */
+ CASE_IGNORE,
+ CASE_IGNORE,
+ CASE_IGNORE,
+ CASE_IGNORE,
+ /* CAN EM SUB ESC */
+ CASE_IGNORE,
+ CASE_IGNORE,
+ CASE_IGNORE,
+ CASE_ESC,
+ /* FS GS RS US */
+ CASE_IGNORE,
+ CASE_IGNORE,
+ CASE_IGNORE,
+ CASE_IGNORE,
+ /* SP ! " # */
+ CASE_ESC_IGNORE,
+ CASE_ESC_IGNORE,
+ CASE_ESC_IGNORE,
+ CASE_ESC_IGNORE,
+ /* $ % & ' */
+ CASE_ESC_IGNORE,
+ CASE_ESC_IGNORE,
+ CASE_ESC_IGNORE,
+ CASE_ESC_IGNORE,
+ /* ( ) * + */
+ CASE_ESC_IGNORE,
+ CASE_ESC_IGNORE,
+ CASE_ESC_IGNORE,
+ CASE_ESC_IGNORE,
+ /* , - . / */
+ CASE_ESC_IGNORE,
+ CASE_ESC_IGNORE,
+ CASE_ESC_IGNORE,
+ CASE_ESC_IGNORE,
+ /* 0 1 2 3 */
+ CASE_ESC_DIGIT,
+ CASE_ESC_DIGIT,
+ CASE_ESC_DIGIT,
+ CASE_ESC_DIGIT,
+ /* 4 5 6 7 */
+ CASE_ESC_DIGIT,
+ CASE_ESC_DIGIT,
+ CASE_ESC_DIGIT,
+ CASE_ESC_DIGIT,
+ /* 8 9 : ; */
+ CASE_ESC_DIGIT,
+ CASE_ESC_DIGIT,
+ CASE_IGNORE,
+ CASE_ESC_SEMI,
+ /* < = > ? */
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ /* @ A B C */
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ /* D E F G */
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ /* H I J K */
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_DECSED,
+ CASE_DECSEL,
+ /* L M N O */
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ /* P Q R S */
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ /* T U V W */
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ /* X Y Z [ */
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ /* \ ] ^ _ */
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ /* ` a b c */
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_DA2,
+ /* d e f g */
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ /* h i j k */
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ /* l m n o */
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ /* p q r s */
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ /* t u v w */
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ /* x y z { */
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ /* | } ~ DEL */
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ /* 0x80 0x81 0x82 0x83 */
+ CASE_IGNORE,
+ CASE_IGNORE,
+ CASE_IGNORE,
+ CASE_IGNORE,
+ /* 0x84 0x85 0x86 0x87 */
+ CASE_IGNORE,
+ CASE_IGNORE,
+ CASE_IGNORE,
+ CASE_IGNORE,
+ /* 0x88 0x89 0x8a 0x8b */
+ CASE_IGNORE,
+ CASE_IGNORE,
+ CASE_IGNORE,
+ CASE_IGNORE,
+ /* 0x8c 0x8d 0x8e 0x8f */
+ CASE_IGNORE,
+ CASE_IGNORE,
+ CASE_IGNORE,
+ CASE_IGNORE,
+ /* 0x90 0x91 0x92 0x93 */
+ CASE_IGNORE,
+ CASE_IGNORE,
+ CASE_IGNORE,
+ CASE_IGNORE,
+ /* 0x94 0x95 0x96 0x97 */
+ CASE_IGNORE,
+ CASE_IGNORE,
+ CASE_IGNORE,
+ CASE_IGNORE,
+ /* 0x98 0x99 0x9a 0x9b */
+ CASE_IGNORE,
+ CASE_IGNORE,
+ CASE_IGNORE,
+ CASE_IGNORE,
+ /* 0x9c 0x9d 0x9e 0x9f */
+ CASE_IGNORE,
+ CASE_IGNORE,
+ CASE_IGNORE,
+ CASE_IGNORE,
+ /* nobreakspace exclamdown cent sterling */
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ /* currency yen brokenbar section */
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ /* diaeresis copyright ordfeminine guillemotleft */
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ /* notsign hyphen registered macron */
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ /* degree plusminus twosuperior threesuperior */
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ /* acute mu paragraph periodcentered */
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ /* cedilla onesuperior masculine guillemotright */
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ /* onequarter onehalf threequarters questiondown */
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ /* Agrave Aacute Acircumflex Atilde */
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ /* Adiaeresis Aring AE Ccedilla */
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ /* Egrave Eacute Ecircumflex Ediaeresis */
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ /* Igrave Iacute Icircumflex Idiaeresis */
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ /* Eth Ntilde Ograve Oacute */
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ /* Ocircumflex Otilde Odiaeresis multiply */
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ /* Ooblique Ugrave Uacute Ucircumflex */
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ /* Udiaeresis Yacute Thorn ssharp */
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ /* agrave aacute acircumflex atilde */
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ /* adiaeresis aring ae ccedilla */
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ /* egrave eacute ecircumflex ediaeresis */
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ /* igrave iacute icircumflex idiaeresis */
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ /* eth ntilde ograve oacute */
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ /* ocircumflex otilde odiaeresis division */
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ /* oslash ugrave uacute ucircumflex */
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ /* udiaeresis yacute thorn ydiaeresis */
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ };
+
+ Const PARSE_T dec3_table[] = /* CSI = */
+ {
+ /* NUL SOH STX ETX */
+ CASE_IGNORE,
+ CASE_IGNORE,
+ CASE_IGNORE,
+ CASE_IGNORE,
+ /* EOT ENQ ACK BEL */
+ CASE_IGNORE,
+ CASE_IGNORE,
+ CASE_IGNORE,
+ CASE_BELL,
+ /* BS HT NL VT */
+ CASE_BS,
+ CASE_TAB,
+ CASE_VMOT,
+ CASE_VMOT,
+ /* NP CR SO SI */
+ CASE_VMOT,
+ CASE_CR,
+ CASE_SO,
+ CASE_SI,
+ /* DLE DC1 DC2 DC3 */
+ CASE_IGNORE,
+ CASE_IGNORE,
+ CASE_IGNORE,
+ CASE_IGNORE,
+ /* DC4 NAK SYN ETB */
+ CASE_IGNORE,
+ CASE_IGNORE,
+ CASE_IGNORE,
+ CASE_IGNORE,
+ /* CAN EM SUB ESC */
+ CASE_IGNORE,
+ CASE_IGNORE,
+ CASE_IGNORE,
+ CASE_ESC,
+ /* FS GS RS US */
+ CASE_IGNORE,
+ CASE_IGNORE,
+ CASE_IGNORE,
+ CASE_IGNORE,
+ /* SP ! " # */
+ CASE_ESC_IGNORE,
+ CASE_ESC_IGNORE,
+ CASE_ESC_IGNORE,
+ CASE_ESC_IGNORE,
+ /* $ % & ' */
+ CASE_ESC_IGNORE,
+ CASE_ESC_IGNORE,
+ CASE_ESC_IGNORE,
+ CASE_ESC_IGNORE,
+ /* ( ) * + */
+ CASE_ESC_IGNORE,
+ CASE_ESC_IGNORE,
+ CASE_ESC_IGNORE,
+ CASE_ESC_IGNORE,
+ /* , - . / */
+ CASE_ESC_IGNORE,
+ CASE_ESC_IGNORE,
+ CASE_ESC_IGNORE,
+ CASE_ESC_IGNORE,
+ /* 0 1 2 3 */
+ CASE_ESC_DIGIT,
+ CASE_ESC_DIGIT,
+ CASE_ESC_DIGIT,
+ CASE_ESC_DIGIT,
+ /* 4 5 6 7 */
+ CASE_ESC_DIGIT,
+ CASE_ESC_DIGIT,
+ CASE_ESC_DIGIT,
+ CASE_ESC_DIGIT,
+ /* 8 9 : ; */
+ CASE_ESC_DIGIT,
+ CASE_ESC_DIGIT,
+ CASE_IGNORE,
+ CASE_ESC_SEMI,
+ /* < = > ? */
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ /* @ A B C */
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ /* D E F G */
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ /* H I J K */
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_DECSED,
+ CASE_DECSEL,
+ /* L M N O */
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ /* P Q R S */
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ /* T U V W */
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ /* X Y Z [ */
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ /* \ ] ^ _ */
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ /* ` a b c */
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_DECRPTUI,
+ /* d e f g */
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ /* h i j k */
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ /* l m n o */
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ /* p q r s */
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
+ CASE_GROUND_STATE,
/* t u v w */
CASE_GROUND_STATE,
CASE_GROUND_STATE,
Index: VTparse.def
*** /build/x11r6/XFree86-3.1.2Gb/xc/programs/xterm/VTparse.def Tue Aug 13 14:51:20 1996
--- /build/x11r6/XFree86-current/xc/programs/xterm/VTparse.def Sun Sep 15 21:42:20 1996
***************
*** 108,110 ****
--- 108,114 ----
CASE_ANSI_LEVEL_2
CASE_ANSI_LEVEL_3
CASE_MC
+ CASE_DEC2_STATE
+ CASE_DA2
+ CASE_DEC3_STATE
+ CASE_DECRPTUI
Index: VTparse.h
*** /build/x11r6/XFree86-3.1.2Gb/xc/programs/xterm/VTparse.h Tue Aug 13 14:51:20 1996
--- /build/x11r6/XFree86-current/xc/programs/xterm/VTparse.h Sun Sep 15 21:48:11 1996
***************
*** 39,44 ****
--- 39,46 ----
extern Const PARSE_T csi_quo_table[];
extern Const PARSE_T csi_table[];
extern Const PARSE_T dec_table[];
+ extern Const PARSE_T dec2_table[];
+ extern Const PARSE_T dec3_table[];
extern Const PARSE_T eigtable[];
extern Const PARSE_T esc_sp_table[];
extern Const PARSE_T esc_table[];
***************
*** 162,164 ****
--- 164,170 ----
#define CASE_ANSI_LEVEL_2 99
#define CASE_ANSI_LEVEL_3 100
#define CASE_MC 101
+ #define CASE_DEC2_STATE 102
+ #define CASE_DA2 103
+ #define CASE_DEC3_STATE 104
+ #define CASE_DECRPTUI 105
Index: charproc.c
*** /build/x11r6/XFree86-3.1.2Gb/xc/programs/xterm/charproc.c Sun Sep 1 07:56:12 1996
--- /build/x11r6/XFree86-current/xc/programs/xterm/charproc.c Sun Sep 15 21:47:26 1996
***************
*** 238,243 ****
--- 238,244 ----
#define XtNcolorBDMode "colorBDMode"
#define XtNdynamicColors "dynamicColors"
#define XtNunderLine "underLine"
+ #define XtNdecTerminalID "decTerminalID"
#define XtCAlwaysHighlight "AlwaysHighlight"
#define XtCAppcursorDefault "AppcursorDefault"
***************
*** 286,291 ****
--- 287,293 ----
#define XtCColorMode "ColorMode"
#define XtCDynamicColors "DynamicColors"
#define XtCUnderLine "UnderLine"
+ #define XtCDecTerminalID "DecTerminalID"
#define doinput() (bcnt-- > 0 ? *bptr++ : in_put())
***************
*** 319,324 ****
--- 321,327 ----
static int defaultNMarginBell = N_MARGINBELL;
static int defaultMultiClickTime = MULTICLICKTIME;
static int defaultBellSuppressTime = BELLSUPPRESSMSEC;
+ static int default_DECID = MIN_DECID;
static char * _Font_Selected_ = "yes"; /* string is arbitrary */
#if OPT_BLINK_CURS
***************
*** 684,689 ****
--- 687,695 ----
{XtNunderLine, XtCUnderLine, XtRBoolean, sizeof(Boolean),
XtOffsetOf(XtermWidgetRec, screen.underline),
XtRBoolean, (XtPointer) &defaultTRUE},
+ {XtNdecTerminalID, XtCDecTerminalID, XtRInt, sizeof(int),
+ XtOffsetOf(XtermWidgetRec, screen.terminal_id),
+ XtRInt, (XtPointer) &default_DECID},
};
static void VTClassInit PROTO((void));
***************
*** 1050,1055 ****
--- 1056,1071 ----
parsestate = dec_table;
break;
+ case CASE_DEC2_STATE:
+ /* enter dec2 mode */
+ parsestate = dec2_table;
+ break;
+
+ case CASE_DEC3_STATE:
+ /* enter dec3 mode */
+ parsestate = dec3_table;
+ break;
+
case CASE_ICH:
/* ICH */
if((row = param[0]) < 1)
***************
*** 1191,1212 ****
case CASE_DA1:
/* DA1 */
if (param[0] <= 0) { /* less than means DEFAULT */
count = 0;
reply.a_type = CSI;
! reply.a_pintro = '?';
! if (screen->ansi_level >= 1) {
! reply.a_param[count++] = screen->ansi_level + 60;
! reply.a_param[count++] = 1; /* 132-columns */
! reply.a_param[count++] = 2; /* printer */
! if (screen->ansi_level > 1) {
! reply.a_param[count++] = 6; /* selective-erase */
! reply.a_param[count++] = 8; /* user-defined-keys */
! }
! reply.a_param[count++] = 15; /* technical characters */
! } else {
! reply.a_param[count++] = 1; /* STP: VT100 */
! reply.a_param[count++] = 2; /* AVO: 132-columns */
! }
reply.a_nparam = count;
reply.a_inters = 0;
reply.a_final = 'c';
--- 1207,1264 ----
case CASE_DA1:
/* DA1 */
if (param[0] <= 0) { /* less than means DEFAULT */
+ count = 0;
+ reply.a_type = CSI;
+ reply.a_pintro = '?';
+
+ /* The first param corresponds to the highest
+ * operating level (i.e., service level) of the
+ * emulation. A DEC terminal can be setup to
+ * respond with a different DA response, but
+ * there's no control sequence that modifies this.
+ * We set it via a resource.
+ */
+ if (screen->terminal_id < 200) {
+ switch (screen->terminal_id) {
+ case 102:
+ reply.a_param[count++] = 6; /* VT102 */
+ break;
+ case 101:
+ reply.a_param[count++] = 1; /* VT101 */
+ reply.a_param[count++] = 0; /* no options */
+ break;
+ default: /* VT100 */
+ reply.a_param[count++] = 1; /* VT100 */
+ reply.a_param[count++] = 2; /* AVO */
+ break;
+ }
+ } else {
+ reply.a_param[count++] = 60 + screen->terminal_id/100;
+ reply.a_param[count++] = 1; /* 132-columns */
+ /* reply.a_param[count++] = 2; NO printer */
+ reply.a_param[count++] = 6; /* selective-erase */
+ reply.a_param[count++] = 8; /* user-defined-keys */
+ reply.a_param[count++] = 15; /* technical characters */
+ }
+ reply.a_nparam = count;
+ reply.a_inters = 0;
+ reply.a_final = 'c';
+ unparseseq(&reply, screen->respond);
+ }
+ parsestate = groundtable;
+ break;
+
+ case CASE_DA2:
+ /* DA2 */
+ if ((screen->terminal_id >= 200)
+ && (param[0] <= 0)) { /* less than means DEFAULT */
count = 0;
reply.a_type = CSI;
! reply.a_pintro = '>';
!
! reply.a_param[count++] = 1; /* VT220 */
! reply.a_param[count++] = 0; /* Version */
! reply.a_param[count++] = 0; /* options (none) */
reply.a_nparam = count;
reply.a_inters = 0;
reply.a_final = 'c';
***************
*** 1215,1220 ****
--- 1267,1285 ----
parsestate = groundtable;
break;
+ case CASE_DECRPTUI:
+ /* DECRPTUI */
+ if ((screen->terminal_id >= 400)
+ && (param[0] <= 0)) { /* less than means DEFAULT */
+ unparseputc1(DCS, screen->respond);
+ unparseputc('!', screen->respond);
+ unparseputc('|', screen->respond);
+ unparseputc('0', screen->respond);
+ unparseputc1(ST, screen->respond);
+ }
+ parsestate = groundtable;
+ break;
+
case CASE_TBC:
/* TBC */
if ((row = param[0]) <= 0) /* less than means default */
***************
*** 1372,1379 ****
/* keyboard status */
reply.a_param[count++] = 27;
reply.a_param[count++] = 1; /* North American */
! reply.a_param[count++] = 0; /* ready */
! reply.a_param[count++] = 0; /* LK201 */
break;
}
--- 1437,1446 ----
/* keyboard status */
reply.a_param[count++] = 27;
reply.a_param[count++] = 1; /* North American */
! if (screen->terminal_id >= 400) {
! reply.a_param[count++] = 0; /* ready */
! reply.a_param[count++] = 0; /* LK201 */
! }
break;
}
***************
*** 1419,1427 ****
case CASE_DECREQTPARM:
/* DECREQTPARM */
! if ((row = param[0]) == DEFAULT)
row = 0;
! if (row == 0 || row == 1) {
reply.a_type = CSI;
reply.a_pintro = 0;
reply.a_nparam = 7;
--- 1486,1495 ----
case CASE_DECREQTPARM:
/* DECREQTPARM */
! if (screen->terminal_id < 200) { /* VT102 */
! if ((row = param[0]) == DEFAULT)
row = 0;
! if (row == 0 || row == 1) {
reply.a_type = CSI;
reply.a_pintro = 0;
reply.a_nparam = 7;
***************
*** 1435,1440 ****
--- 1503,1509 ----
reply.a_inters = 0;
reply.a_final = 'x';
unparseseq(&reply, screen->respond);
+ }
}
parsestate = groundtable;
break;
***************
*** 1482,1487 ****
--- 1551,1562 ----
case CASE_DECRC:
/* DECRC */
CursorRestore(term, &screen->sc);
+ if_OPT_ISO_COLORS(screen,{
+ if (term->flags & BOLD)
+ setColorBD();
+ if (term->flags & UNDERLINE)
+ setColorUL();
+ })
parsestate = groundtable;
break;
***************
*** 3159,3164 ****
--- 3234,3245 ----
new->screen.scrolllines = request->screen.scrolllines;
new->screen.scrollttyoutput = request->screen.scrollttyoutput;
new->screen.scrollkey = request->screen.scrollkey;
+ new->screen.terminal_id = request->screen.terminal_id;
+ if (new->screen.terminal_id < MIN_DECID)
+ new->screen.terminal_id = MIN_DECID;
+ if (new->screen.terminal_id > MAX_DECID)
+ new->screen.terminal_id = MAX_DECID;
+ new->screen.ansi_level = (new->screen.terminal_id / 100);
new->screen.visualbell = request->screen.visualbell;
new->screen.TekEmu = request->screen.TekEmu;
new->misc.re_verse = request->misc.re_verse;
Index: misc.c
*** /build/x11r6/XFree86-3.1.2Gb/xc/programs/xterm/misc.c Tue Aug 20 15:08:28 1996
--- /build/x11r6/XFree86-current/xc/programs/xterm/misc.c Sun Sep 15 21:59:28 1996
***************
*** 881,887 ****
okay = False;
unparseputc1(DCS, screen->respond);
! unparseputc(okay ? '0' : '1', screen->respond);
unparseputc('$', screen->respond);
unparseputc('r', screen->respond);
if (okay)
--- 881,887 ----
okay = False;
unparseputc1(DCS, screen->respond);
! unparseputc(okay ? '1' : '0', screen->respond);
unparseputc('$', screen->respond);
unparseputc('r', screen->respond);
if (okay)
Index: ptyx.h
*** /build/x11r6/XFree86-3.1.2Gb/xc/programs/xterm/ptyx.h Fri Aug 23 12:47:18 1996
--- /build/x11r6/XFree86-current/xc/programs/xterm/ptyx.h Sun Sep 15 21:27:09 1996
***************
*** 188,193 ****
--- 188,196 ----
#define APC 0x9F
#define RDEL 0xFF
+ #define MIN_DECID 100 /* emulate VT100 */
+ #define MAX_DECID 420 /* ...through VT420 */
+
#define NMENUFONTS 9 /* entries in fontMenu */
#define NBOX 5 /* Number of Points in box */
***************
*** 462,467 ****
--- 465,471 ----
char curgl; /* Current GL setting. */
char curgr; /* Current GR setting. */
char curss; /* Current single shift. */
+ int terminal_id; /* 100=vt100, 220=vt220, etc. */
int ansi_level; /* 0=vt100, 1,2,3 = vt100 ... vt320 */
int scroll_amt; /* amount to scroll */
int refresh_amt; /* amount to refresh */
Index: xterm.man
*** /build/x11r6/XFree86-3.1.2Gb/xc/programs/xterm/xterm.man Fri Aug 23 12:47:18 1996
--- /build/x11r6/XFree86-current/xc/programs/xterm/xterm.man Sun Sep 15 19:58:11 1996
***************
*** 702,711 ****
This specifies the color to use to display underlined characters if
the ``colorULMode'' resource is enabled.
.TP 8
! .B "underLine (\fPclass\fB UnderLine)"
! This specifies whether or not text with the underline attribute should be
! underlined. It may be desirable to disable underlining when color is being
! used for the underline attribute.
.TP 8
.B "dynamicColors (\fPclass\fB DynamicColors)"
Specifies whether or not escape sequences to change colors assigned to
--- 702,711 ----
This specifies the color to use to display underlined characters if
the ``colorULMode'' resource is enabled.
.TP 8
! .B "decTerminalID (\fPclass\fB DecTerminalID)"
! Specifies the emulation level (100=VT100, 220=VT220, etc.), used to determine
! the type of response to a DA control sequence.
! The default is 100.
.TP 8
.B "dynamicColors (\fPclass\fB DynamicColors)"
Specifies whether or not escape sequences to change colors assigned to
***************
*** 900,905 ****
--- 900,910 ----
Specifies the key and button bindings for menus, selections, ``programmed
strings,'' etc. See \fBACTIONS\fP below.
.TP 8
+ .B "underLine (\fPclass\fB UnderLine)"
+ This specifies whether or not text with the underline attribute should be
+ underlined. It may be desirable to disable underlining when color is being
+ used for the underline attribute.
+ .TP 8
.B "visualBell (\fPclass\fB VisualBell)"
Specifies whether or not a visible bell (i.e. flashing) should be used instead
of an audible bell when Control-G is received. The default is ``false.''
***************
*** 1224,1230 ****
.PP
Clicking button two moves the display to a position in the saved text
that corresponds to the pointer's position in the scrollbar.
- .PP
.PP
Unlike the VT102 window, the Tektronix window does not allow the copying of
text.
--- 1229,1234 ----