tomw@orac.esd.sgi.com (Tom Weinstein) (09/14/90)
Submitted-by: Tom Weinstein <tomw@orac.esd.sgi.com> Posting-number: Volume 9, Issue 35 Archive-name: colxterm/part05 #! /bin/sh # This is a shell archive. Remove anything before this line, then feed it # into a shell via "sh file" or similar. To overwrite existing files, # type "sh file -c". # The tool that generated this appeared in the comp.sources.unix newsgroup; # send mail to comp-sources-unix@uunet.uu.net if you want that tool. # If this archive is complete, you will see the following message at the end: # "End of archive 5 (of 14)." # Contents: xterm/VTPrsTbl.c.ab xterm/charproc.c.aa # Wrapped by argv@turnpike on Thu Sep 13 20:42:21 1990 PATH=/bin:/usr/bin:/usr/ucb ; export PATH if test -f 'xterm/VTPrsTbl.c.ab' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'xterm/VTPrsTbl.c.ab'\" else echo shar: Extracting \"'xterm/VTPrsTbl.c.ab'\" \(22756 characters\) sed "s/^X//" >'xterm/VTPrsTbl.c.ab' <<'END_OF_FILE' XCASE_GROUND_STATE, X/* oslash ugrave uacute ucircumflex */ XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, X/* udiaeresis yacute thorn ydiaeresis */ XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, X}; X Xint eigtable[] = { X/* NUL SOH STX ETX */ XCASE_IGNORE, XCASE_IGNORE, XCASE_IGNORE, XCASE_IGNORE, X/* EOT ENQ ACK BEL */ XCASE_IGNORE, XCASE_IGNORE, XCASE_IGNORE, XCASE_BELL, X/* BS HT NL VT */ XCASE_BS, XCASE_TAB, XCASE_VMOT, XCASE_VMOT, X/* NP CR SO SI */ XCASE_VMOT, XCASE_CR, XCASE_SO, XCASE_SI, X/* DLE DC1 DC2 DC3 */ XCASE_IGNORE, XCASE_IGNORE, XCASE_IGNORE, XCASE_IGNORE, X/* DC4 NAK SYN ETB */ XCASE_IGNORE, XCASE_IGNORE, XCASE_IGNORE, XCASE_IGNORE, X/* CAN EM SUB ESC */ XCASE_IGNORE, XCASE_IGNORE, XCASE_IGNORE, XCASE_ESC, X/* FS GS RS US */ XCASE_IGNORE, XCASE_IGNORE, XCASE_IGNORE, XCASE_IGNORE, X/* SP ! " # */ XCASE_IGNORE, XCASE_IGNORE, XCASE_IGNORE, XCASE_IGNORE, X/* $ % & ' */ XCASE_IGNORE, XCASE_IGNORE, XCASE_IGNORE, XCASE_IGNORE, X/* ( ) * + */ XCASE_IGNORE, XCASE_IGNORE, XCASE_IGNORE, XCASE_IGNORE, X/* , X - . / */ XCASE_IGNORE, XCASE_IGNORE, XCASE_IGNORE, XCASE_IGNORE, X/* 0 1 2 3 */ XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, X/* 4 5 6 7 */ XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, X/* 8 9 : ; */ XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, X/* < = > ? */ XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, X/* @ A B C */ XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, X/* D E F G */ XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, X/* H I J K */ XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, X/* L M N O */ XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, X/* P Q R S */ XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, X/* T U V W */ XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, X/* X Y Z [ */ XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, X/* \ ] ^ _ */ XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, X/* ` a b c */ XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, X/* d e f g */ XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, X/* h i j k */ XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, X/* l m n o */ XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, X/* p q r s */ XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, X/* t u v w */ XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, X/* x y z { */ XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, X/* | } ~ DEL */ XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, X/* 0x80 0x81 0x82 0x83 */ XCASE_IGNORE, XCASE_IGNORE, XCASE_IGNORE, XCASE_IGNORE, X/* 0x84 0x85 0x86 0x87 */ XCASE_IGNORE, XCASE_IGNORE, XCASE_IGNORE, XCASE_IGNORE, X/* 0x88 0x89 0x8a 0x8b */ XCASE_IGNORE, XCASE_IGNORE, XCASE_IGNORE, XCASE_IGNORE, X/* 0x8c 0x8d 0x8e 0x8f */ XCASE_IGNORE, XCASE_IGNORE, XCASE_IGNORE, XCASE_IGNORE, X/* 0x90 0x91 0x92 0x93 */ XCASE_IGNORE, XCASE_IGNORE, XCASE_IGNORE, XCASE_IGNORE, X/* 0x94 0x95 0x96 0x97 */ XCASE_IGNORE, XCASE_IGNORE, XCASE_IGNORE, XCASE_IGNORE, X/* 0x99 0x99 0x9a 0x9b */ XCASE_IGNORE, XCASE_IGNORE, XCASE_IGNORE, XCASE_IGNORE, X/* 0x9c 0x9d 0x9e 0x9f */ XCASE_IGNORE, XCASE_IGNORE, XCASE_IGNORE, XCASE_IGNORE, X/* nobreakspace exclamdown cent sterling */ XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, X/* currency yen brokenbar section */ XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, X/* diaeresis copyright ordfeminine guillemotleft */ XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, X/* notsign hyphen registered macron */ XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, X/* degree plusminus twosuperior threesuperior */ XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, X/* acute mu paragraph periodcentered */ XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, X/* cedilla onesuperior masculine guillemotright */ XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, X/* onequarter onehalf threequarters questiondown */ XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, X/* Agrave Aacute Acircumflex Atilde */ XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, X/* Adiaeresis Aring AE Ccedilla */ XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, X/* Egrave Eacute Ecircumflex Ediaeresis */ XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, X/* Igrave Iacute Icircumflex Idiaeresis */ XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, X/* Eth Ntilde Ograve Oacute */ XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, X/* Ocircumflex Otilde Odiaeresis multiply */ XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, X/* Ooblique Ugrave Uacute Ucircumflex */ XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, X/* Udiaeresis Yacute Thorn ssharp */ XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, X/* agrave aacute acircumflex atilde */ XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, X/* adiaeresis aring ae ccedilla */ XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, X/* egrave eacute ecircumflex ediaeresis */ XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, X/* igrave iacute icircumflex idiaeresis */ XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, X/* eth ntilde ograve oacute */ XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, X/* ocircumflex otilde odiaeresis division */ XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, X/* oslash ugrave uacute ucircumflex */ XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, X/* udiaeresis yacute thorn ydiaeresis */ XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, X}; X Xint esctable[] = { X/* NUL SOH STX ETX */ XCASE_IGNORE, XCASE_IGNORE, XCASE_IGNORE, XCASE_IGNORE, X/* EOT ENQ ACK BEL */ XCASE_IGNORE, XCASE_IGNORE, XCASE_IGNORE, XCASE_BELL, X/* BS HT NL VT */ XCASE_BS, XCASE_TAB, XCASE_VMOT, XCASE_VMOT, X/* NP CR SO SI */ XCASE_VMOT, XCASE_CR, XCASE_SO, XCASE_SI, X/* DLE DC1 DC2 DC3 */ XCASE_IGNORE, XCASE_IGNORE, XCASE_IGNORE, XCASE_IGNORE, X/* DC4 NAK SYN ETB */ XCASE_IGNORE, XCASE_IGNORE, XCASE_IGNORE, XCASE_IGNORE, X/* CAN EM SUB ESC */ XCASE_IGNORE, XCASE_IGNORE, XCASE_IGNORE, XCASE_ESC, X/* FS GS RS US */ XCASE_IGNORE, XCASE_IGNORE, XCASE_IGNORE, XCASE_IGNORE, X/* SP ! " # */ XCASE_ESC_IGNORE, XCASE_ESC_IGNORE, XCASE_ESC_IGNORE, XCASE_SCR_STATE, X/* $ % & ' */ XCASE_ESC_IGNORE, XCASE_ESC_IGNORE, XCASE_ESC_IGNORE, XCASE_ESC_IGNORE, X/* ( ) * + */ XCASE_SCS0_STATE, XCASE_SCS1_STATE, XCASE_SCS2_STATE, XCASE_SCS3_STATE, X/* , - . / */ XCASE_ESC_IGNORE, XCASE_ESC_IGNORE, XCASE_ESC_IGNORE, XCASE_ESC_IGNORE, X/* 0 1 2 3 */ XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, X/* 4 5 6 7 */ XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_DECSC, X/* 8 9 : ; */ XCASE_DECRC, XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, X/* < = > ? */ XCASE_GROUND_STATE, XCASE_DECKPAM, XCASE_DECKPNM, XCASE_GROUND_STATE, X/* @ A B C */ XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, X/* D E F G */ XCASE_IND, XCASE_NEL, XCASE_GROUND_STATE, XCASE_GROUND_STATE, X/* H I J K */ XCASE_HTS, XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, X/* L M N O */ XCASE_GROUND_STATE, XCASE_RI, XCASE_SS2, XCASE_SS3, X/* P Q R S */ XCASE_IGNORE_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, X/* T U V W */ XCASE_XTERM_TITLE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, X/* X Y Z [ */ XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_DECID, XCASE_CSI_STATE, X/* \ ] ^ _ */ XCASE_GROUND_STATE, XCASE_OSC, XCASE_IGNORE_STATE, XCASE_IGNORE_STATE, X/* ` a b c */ XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_RIS, X/* d e f g */ XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, X/* h i j k */ XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, X/* l m n o */ XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_LS2, XCASE_LS3, X/* p q r s */ XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, X/* t u v w */ XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, X/* x y z { */ XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, X/* | } ~ DEL */ XCASE_LS3R, XCASE_LS2R, XCASE_LS1R, XCASE_GROUND_STATE, X/* 0x80 0x81 0x82 0x83 */ XCASE_IGNORE, XCASE_IGNORE, XCASE_IGNORE, XCASE_IGNORE, X/* 0x84 0x85 0x86 0x87 */ XCASE_IGNORE, XCASE_IGNORE, XCASE_IGNORE, XCASE_IGNORE, X/* 0x88 0x89 0x8a 0x8b */ XCASE_IGNORE, XCASE_IGNORE, XCASE_IGNORE, XCASE_IGNORE, X/* 0x8c 0x8d 0x8e 0x8f */ XCASE_IGNORE, XCASE_IGNORE, XCASE_IGNORE, XCASE_IGNORE, X/* 0x90 0x91 0x92 0x93 */ XCASE_IGNORE, XCASE_IGNORE, XCASE_IGNORE, XCASE_IGNORE, X/* 0x94 0x95 0x96 0x97 */ XCASE_IGNORE, XCASE_IGNORE, XCASE_IGNORE, XCASE_IGNORE, X/* 0x99 0x99 0x9a 0x9b */ XCASE_IGNORE, XCASE_IGNORE, XCASE_IGNORE, XCASE_IGNORE, X/* 0x9c 0x9d 0x9e 0x9f */ XCASE_IGNORE, XCASE_IGNORE, XCASE_IGNORE, XCASE_IGNORE, X/* nobreakspace exclamdown cent sterling */ XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, X/* currency yen brokenbar section */ XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, X/* diaeresis copyright ordfeminine guillemotleft */ XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, X/* notsign hyphen registered macron */ XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, X/* degree plusminus twosuperior threesuperior */ XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, X/* acute mu paragraph periodcentered */ XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, X/* cedilla onesuperior masculine guillemotright */ XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, X/* onequarter onehalf threequarters questiondown */ XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, X/* Agrave Aacute Acircumflex Atilde */ XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, X/* Adiaeresis Aring AE Ccedilla */ XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, X/* Egrave Eacute Ecircumflex Ediaeresis */ XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, X/* Igrave Iacute Icircumflex Idiaeresis */ XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, X/* Eth Ntilde Ograve Oacute */ XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, X/* Ocircumflex Otilde Odiaeresis multiply */ XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, X/* Ooblique Ugrave Uacute Ucircumflex */ XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, X/* Udiaeresis Yacute Thorn ssharp */ XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, X/* agrave aacute acircumflex atilde */ XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, X/* adiaeresis aring ae ccedilla */ XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, X/* egrave eacute ecircumflex ediaeresis */ XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, X/* igrave iacute icircumflex idiaeresis */ XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, X/* eth ntilde ograve oacute */ XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, X/* ocircumflex otilde odiaeresis division */ XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, X/* oslash ugrave uacute ucircumflex */ XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, X/* udiaeresis yacute thorn ydiaeresis */ XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, X}; X Xint iestable[] = { X/* NUL SOH STX ETX */ XCASE_IGNORE_STATE, XCASE_IGNORE_STATE, XCASE_IGNORE_STATE, XCASE_IGNORE_STATE, X/* EOT ENQ ACK BEL */ XCASE_IGNORE_STATE, XCASE_IGNORE_STATE, XCASE_IGNORE_STATE, XCASE_IGNORE_STATE, X/* BS HT NL VT */ XCASE_IGNORE_STATE, XCASE_IGNORE_STATE, XCASE_IGNORE_STATE, XCASE_IGNORE_STATE, X/* NP CR SO SI */ XCASE_IGNORE_STATE, XCASE_IGNORE_STATE, XCASE_IGNORE_STATE, XCASE_IGNORE_STATE, X/* DLE DC1 DC2 DC3 */ XCASE_IGNORE_STATE, XCASE_IGNORE_STATE, XCASE_IGNORE_STATE, XCASE_IGNORE_STATE, X/* DC4 NAK SYN ETB */ XCASE_IGNORE_STATE, XCASE_IGNORE_STATE, XCASE_IGNORE_STATE, XCASE_IGNORE_STATE, X/* CAN EM SUB ESC */ XCASE_IGNORE_STATE, XCASE_IGNORE_STATE, XCASE_IGNORE_STATE, XCASE_IGNORE_STATE, X/* FS GS RS US */ XCASE_IGNORE_STATE, XCASE_IGNORE_STATE, XCASE_IGNORE_STATE, XCASE_IGNORE_STATE, X/* SP ! " # */ XCASE_IGNORE_STATE, XCASE_IGNORE_STATE, XCASE_IGNORE_STATE, XCASE_IGNORE_STATE, X/* $ % & ' */ XCASE_IGNORE_STATE, XCASE_IGNORE_STATE, XCASE_IGNORE_STATE, XCASE_IGNORE_STATE, X/* ( ) * + */ XCASE_IGNORE_STATE, XCASE_IGNORE_STATE, XCASE_IGNORE_STATE, XCASE_IGNORE_STATE, X/* , - . / */ XCASE_IGNORE_STATE, XCASE_IGNORE_STATE, XCASE_IGNORE_STATE, XCASE_IGNORE_STATE, X/* 0 1 2 3 */ XCASE_IGNORE_STATE, XCASE_IGNORE_STATE, XCASE_IGNORE_STATE, XCASE_IGNORE_STATE, X/* 4 5 6 7 */ XCASE_IGNORE_STATE, XCASE_IGNORE_STATE, XCASE_IGNORE_STATE, XCASE_IGNORE_STATE, X/* 8 9 : ; */ XCASE_IGNORE_STATE, XCASE_IGNORE_STATE, XCASE_IGNORE_STATE, XCASE_IGNORE_STATE, X/* < = > ? */ XCASE_IGNORE_STATE, XCASE_IGNORE_STATE, XCASE_IGNORE_STATE, XCASE_IGNORE_STATE, X/* @ A B C */ XCASE_IGNORE_STATE, XCASE_IGNORE_STATE, XCASE_IGNORE_STATE, XCASE_IGNORE_STATE, X/* D E F G */ XCASE_IGNORE_STATE, XCASE_IGNORE_STATE, XCASE_IGNORE_STATE, XCASE_IGNORE_STATE, X/* H I J K */ XCASE_IGNORE_STATE, XCASE_IGNORE_STATE, XCASE_IGNORE_STATE, XCASE_IGNORE_STATE, X/* L M N O */ XCASE_IGNORE_STATE, XCASE_IGNORE_STATE, XCASE_IGNORE_STATE, XCASE_IGNORE_STATE, X/* P Q R S */ XCASE_IGNORE_STATE, XCASE_IGNORE_STATE, XCASE_IGNORE_STATE, XCASE_IGNORE_STATE, X/* T U V W */ XCASE_IGNORE_STATE, XCASE_IGNORE_STATE, XCASE_IGNORE_STATE, XCASE_IGNORE_STATE, X/* X Y Z [ */ XCASE_IGNORE_STATE, XCASE_IGNORE_STATE, XCASE_IGNORE_STATE, XCASE_IGNORE_STATE, X/* \ ] ^ _ */ XCASE_GROUND_STATE, XCASE_IGNORE_STATE, XCASE_IGNORE_STATE, XCASE_IGNORE_STATE, X/* ` a b c */ XCASE_IGNORE_STATE, XCASE_IGNORE_STATE, XCASE_IGNORE_STATE, XCASE_IGNORE_STATE, X/* d e f g */ XCASE_IGNORE_STATE, XCASE_IGNORE_STATE, XCASE_IGNORE_STATE, XCASE_IGNORE_STATE, X/* h i j k */ XCASE_IGNORE_STATE, XCASE_IGNORE_STATE, XCASE_IGNORE_STATE, XCASE_IGNORE_STATE, X/* l m n o */ XCASE_IGNORE_STATE, XCASE_IGNORE_STATE, XCASE_IGNORE_STATE, XCASE_IGNORE_STATE, X/* p q r s */ XCASE_IGNORE_STATE, XCASE_IGNORE_STATE, XCASE_IGNORE_STATE, XCASE_IGNORE_STATE, X/* t u v w */ XCASE_IGNORE_STATE, XCASE_IGNORE_STATE, XCASE_IGNORE_STATE, XCASE_IGNORE_STATE, X/* x y z { */ XCASE_IGNORE_STATE, XCASE_IGNORE_STATE, XCASE_IGNORE_STATE, XCASE_IGNORE_STATE, X/* | } ~ DEL */ XCASE_IGNORE_STATE, XCASE_IGNORE_STATE, XCASE_IGNORE_STATE, XCASE_IGNORE_STATE, X/* 0x80 0x81 0x82 0x83 */ XCASE_IGNORE, XCASE_IGNORE, XCASE_IGNORE, XCASE_IGNORE, X/* 0x84 0x85 0x86 0x87 */ XCASE_IGNORE, XCASE_IGNORE, XCASE_IGNORE, XCASE_IGNORE, X/* 0x88 0x89 0x8a 0x8b */ XCASE_IGNORE, XCASE_IGNORE, XCASE_IGNORE, XCASE_IGNORE, X/* 0x8c 0x8d 0x8e 0x8f */ XCASE_IGNORE, XCASE_IGNORE, XCASE_IGNORE, XCASE_IGNORE, X/* 0x90 0x91 0x92 0x93 */ XCASE_IGNORE, XCASE_IGNORE, XCASE_IGNORE, XCASE_IGNORE, X/* 0x94 0x95 0x96 0x97 */ XCASE_IGNORE, XCASE_IGNORE, XCASE_IGNORE, XCASE_IGNORE, X/* 0x99 0x99 0x9a 0x9b */ XCASE_IGNORE, XCASE_IGNORE, XCASE_IGNORE, XCASE_IGNORE, X/* 0x9c 0x9d 0x9e 0x9f */ XCASE_IGNORE, XCASE_IGNORE, XCASE_IGNORE, XCASE_IGNORE, X/* nobreakspace exclamdown cent sterling */ XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, X/* currency yen brokenbar section */ XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, X/* diaeresis copyright ordfeminine guillemotleft */ XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, X/* notsign hyphen registered macron */ XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, X/* degree plusminus twosuperior threesuperior */ XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, X/* acute mu paragraph periodcentered */ XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, X/* cedilla onesuperior masculine guillemotright */ XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, X/* onequarter onehalf threequarters questiondown */ XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, X/* Agrave Aacute Acircumflex Atilde */ XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, X/* Adiaeresis Aring AE Ccedilla */ XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, X/* Egrave Eacute Ecircumflex Ediaeresis */ XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, X/* Igrave Iacute Icircumflex Idiaeresis */ XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, X/* Eth Ntilde Ograve Oacute */ XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, X/* Ocircumflex Otilde Odiaeresis multiply */ XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, X/* Ooblique Ugrave Uacute Ucircumflex */ XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, X/* Udiaeresis Yacute Thorn ssharp */ XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, X/* agrave aacute acircumflex atilde */ XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, X/* adiaeresis aring ae ccedilla */ XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, X/* egrave eacute ecircumflex ediaeresis */ XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, X/* igrave iacute icircumflex idiaeresis */ XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, X/* eth ntilde ograve oacute */ XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, X/* ocircumflex otilde odiaeresis division */ XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, X/* oslash ugrave uacute ucircumflex */ XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, X/* udiaeresis yacute thorn ydiaeresis */ XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, XCASE_GROUND_STATE, X}; X Xint igntable[] = { X/* NUL SOH STX ETX */ XCASE_IGNORE, XCASE_IGNORE, XCASE_IGNORE, XCASE_IGNORE, X/* EOT ENQ ACK BEL */ XCASE_IGNORE, XCASE_IGNORE, XCASE_IGNORE, XCASE_IGNORE, X/* BS HT NL VT */ XCASE_IGNORE, XCASE_IGNORE, XCASE_IGNORE, XCASE_IGNORE, X/* NP CR SO SI */ END_OF_FILE if test 22756 -ne `wc -c <'xterm/VTPrsTbl.c.ab'`; then echo shar: \"'xterm/VTPrsTbl.c.ab'\" unpacked with wrong size! fi # end of 'xterm/VTPrsTbl.c.ab' fi if test -f 'xterm/charproc.c.aa' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'xterm/charproc.c.aa'\" else echo shar: Extracting \"'xterm/charproc.c.aa'\" \(29680 characters\) sed "s/^X//" >'xterm/charproc.c.aa' <<'END_OF_FILE' X/* X * $XConsortium: charproc.c,v 1.127 90/06/08 13:58:12 jim Exp $ X */ X X X#include <X11/copyright.h> X#include <X11/Xlib.h> X#include <X11/Xatom.h> X#include <X11/Xmu/Atoms.h> X X/* X * Copyright 1988 Massachusetts Institute of Technology X * Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. X * X * All Rights Reserved X * X * Permission to use, copy, modify, and distribute this software and its X * documentation for any purpose and without fee is hereby granted, X * provided that the above copyright notice appear in all copies and that X * both that copyright notice and this permission notice appear in X * supporting documentation, and that the name of Digital Equipment X * Corporation not be used in advertising or publicity pertaining to X * distribution of the software without specific, written prior permission. X * X * X * DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING X * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL X * DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR X * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, X * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, X * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS X * SOFTWARE. X */ X X X/* charproc.c */ X X#ifdef att X#ifndef STREAMSCONN X#define STREAMSCONN X#endif X#endif X X#include <stdio.h> X#include <X11/Xos.h> X#ifndef CRAY X#include <sgtty.h> X#endif X#include <ctype.h> X#include <errno.h> X#include <setjmp.h> X#if defined(macII) || defined(CRAY) X#undef FIOCLEX /* redefined from sgtty.h */ X#undef FIONCLEX /* redefined from sgtty.h */ X#endif X#include "ptyx.h" X#include "VTparse.h" X#include "data.h" X#include <X11/Xutil.h> X#include "error.h" X#include "main.h" X#include <X11/cursorfont.h> X#include <X11/StringDefs.h> X#include "menu.h" X X#if !defined(EWOULDBLOCK) && defined(EAGAIN) X#define EWOULDBLOCK EAGAIN X#endif X Xextern Widget toplevel; Xextern void exit(), bcopy(); Xstatic void VTallocbuf(); X X#define DEFAULT -1 X#define TEXT_BUF_SIZE 256 X#define TRACKTIMESEC 4L X#define TRACKTIMEUSEC 0L X X#define XtNalwaysHighlight "alwaysHighlight" X#define XtNboldFont "boldFont" X#define XtNc132 "c132" X#define XtNcharClass "charClass" X#define XtNcurses "curses" X#define XtNcursorColor "cursorColor" X#define XtNcolor0 "color0" X#define XtNcolor1 "color1" X#define XtNcolor2 "color2" X#define XtNcolor3 "color3" X#define XtNcolor4 "color4" X#define XtNcolor5 "color5" X#define XtNcolor6 "color6" X#define XtNcolor7 "color7" X#define XtNcutNewline "cutNewline" X#define XtNcutToBeginningOfLine "cutToBeginningOfLine" X#define XtNeightBitInput "eightBitInput" X#define XtNeightBitOutput "eightBitOutput" X#define XtNgeometry "geometry" X#define XtNtekGeometry "tekGeometry" X#define XtNinternalBorder "internalBorder" X#define XtNjumpScroll "jumpScroll" X#define XtNbltScroll "bltScroll" X#define XtNlogFile "logFile" X#define XtNlogging "logging" X#define XtNlogInhibit "logInhibit" X#define XtNloginShell "loginShell" X#define XtNmarginBell "marginBell" X#define XtNpointerColor "pointerColor" X#define XtNpointerColorBackground "pointerColorBackground" X#define XtNpointerShape "pointerShape" X#define XtNmultiClickTime "multiClickTime" X#define XtNmultiScroll "multiScroll" X#define XtNnMarginBell "nMarginBell" X#define XtNreverseWrap "reverseWrap" X#define XtNautoWrap "autoWrap" X#define XtNsaveLines "saveLines" X#define XtNscrollBar "scrollBar" X#define XtNscrollTtyOutput "scrollTtyOutput" X#define XtNscrollKey "scrollKey" X#define XtNscrollLines "scrollLines" X#define XtNscrollPos "scrollPos" X#define XtNsignalInhibit "signalInhibit" X#define XtNtekInhibit "tekInhibit" X#define XtNtekSmall "tekSmall" X#define XtNtekStartup "tekStartup" X#define XtNtiteInhibit "titeInhibit" X#define XtNvisualBell "visualBell" X#define XtNallowSendEvents "allowSendEvents" X X#define XtCAlwaysHighlight "AlwaysHighlight" X#define XtCC132 "C132" X#define XtCCharClass "CharClass" X#define XtCCurses "Curses" X#define XtCCutNewline "CutNewline" X#define XtCCutToBeginningOfLine "CutToBeginningOfLine" X#define XtCEightBitInput "EightBitInput" X#define XtCEightBitOutput "EightBitOutput" X#define XtCGeometry "Geometry" X#define XtCJumpScroll "JumpScroll" X#define XtCBltScroll "BltScroll" X#define XtCLogfile "Logfile" X#define XtCLogging "Logging" X#define XtCLogInhibit "LogInhibit" X#define XtCLoginShell "LoginShell" X#define XtCMarginBell "MarginBell" X#define XtCMultiClickTime "MultiClickTime" X#define XtCMultiScroll "MultiScroll" X#define XtCColumn "Column" X#define XtCReverseWrap "ReverseWrap" X#define XtCAutoWrap "AutoWrap" X#define XtCSaveLines "SaveLines" X#define XtCScrollBar "ScrollBar" X#define XtCScrollLines "ScrollLines" X#define XtCScrollPos "ScrollPos" X#define XtCScrollCond "ScrollCond" X#define XtCSignalInhibit "SignalInhibit" X#define XtCTekInhibit "TekInhibit" X#define XtCTekSmall "TekSmall" X#define XtCTekStartup "TekStartup" X#define XtCTiteInhibit "TiteInhibit" X#define XtCVisualBell "VisualBell" X#define XtCAllowSendEvents "AllowSendEvents" X X#define doinput() (bcnt-- > 0 ? *bptr++ : in_put()) X X#ifndef lint Xstatic char rcs_id[] = "$XConsortium: charproc.c,v 1.127 90/06/08 13:58:12 jim Exp $"; X#endif /* lint */ X Xstatic int nparam; Xstatic ANSI reply; Xstatic int param[NPARAM]; X Xstatic unsigned long ctotal; Xstatic unsigned long ntotal; Xstatic jmp_buf vtjmpbuf; X Xextern int groundtable[]; Xextern int csitable[]; Xextern int dectable[]; Xextern int eigtable[]; Xextern int esctable[]; Xextern int iestable[]; Xextern int igntable[]; Xextern int scrtable[]; Xextern int scstable[]; X X X/* event handlers */ Xextern void HandleKeyPressed(), HandleEightBitKeyPressed(); Xextern void HandleStringEvent(); Xextern void HandleEnterWindow(); Xextern void HandleLeaveWindow(); Xextern void HandleFocusChange(); Xstatic void HandleKeymapChange(); Xextern void HandleInsertSelection(); Xextern void HandleSelectStart(), HandleKeyboardSelectStart(); Xextern void HandleSelectExtend(), HandleSelectSet(); Xextern void HandleSelectEnd(), HandleKeyboardSelectEnd(); Xextern void HandleStartExtend(), HandleKeyboardStartExtend(); Xstatic void HandleBell(); Xstatic void HandleIgnore(); Xextern void HandleSecure(); Xextern void HandleScrollForward(); Xextern void HandleScrollBack(); Xextern void HandleCreateMenu(), HandlePopupMenu(); Xextern void HandleSetFont(); Xextern void SetVTFont(); X X/* X * NOTE: VTInitialize zeros out the entire ".screen" component of the X * XtermWidget, so make sure to add an assignment statement in VTInitialize() X * for each new ".screen" field added to this resource list. X */ X X/* Defaults */ Xstatic Boolean defaultFALSE = FALSE; Xstatic Boolean defaultTRUE = TRUE; Xstatic int defaultBorderWidth = DEFBORDERWIDTH; Xstatic int defaultIntBorder = DEFBORDER; Xstatic int defaultSaveLines = SAVELINES; Xstatic int defaultScrollLines = SCROLLLINES; Xstatic int defaultNMarginBell = N_MARGINBELL; Xstatic int defaultMultiClickTime = MULTICLICKTIME; Xstatic char * _Font_Selected_ = "yes"; /* string is arbitrary */ X X/* X * Warning, the following must be kept under 1024 bytes or else some X * compilers (particularly AT&T 6386 SVR3.2) will barf). Workaround is to X * declare a static buffer and copy in at run time (the the Athena text widget X * does). Yuck. X */ Xstatic char defaultTranslations[] = X"\ X Shift <KeyPress> Prior: scroll-back(1,halfpage) \n\ X Shift <KeyPress> Next: scroll-forw(1,halfpage) \n\ X Shift <KeyPress> Select: select-cursor-start() select-cursor-end(PRIMARY, CUT_BUFFER0) \n\ X Shift <KeyPress> Insert: insert-selection(PRIMARY, CUT_BUFFER0) \n\ X ~Meta<KeyPress>: insert-seven-bit() \n\ X Meta<KeyPress>: insert-eight-bit() \n\ X Ctrl ~Meta<Btn1Down>: popup-menu(mainMenu) \n\ X ~Meta <Btn1Down>: select-start() \n\ X ~Meta <Btn1Motion>: select-extend() \n\ X Ctrl ~Meta <Btn2Down>: popup-menu(vtMenu) \n\ X~Ctrl ~Meta <Btn2Down>: ignore() \n\ X~Ctrl ~Meta <Btn2Up>: insert-selection(PRIMARY, CUT_BUFFER0) \n\ X Ctrl ~Meta <Btn3Down>: popup-menu(fontMenu) \n\ X~Ctrl ~Meta <Btn3Down>: start-extend() \n\ X ~Meta <Btn3Motion>: select-extend() \n\ X~Ctrl ~Meta <BtnUp>: select-end(PRIMARY, CUT_BUFFER0) \n\ X <BtnDown>: bell(0) \ X"; X Xstatic XtActionsRec actionsList[] = { X { "bell", HandleBell }, X { "create-menu", HandleCreateMenu }, X { "ignore", HandleIgnore }, X { "insert", HandleKeyPressed }, /* alias for insert-seven-bit */ X { "insert-seven-bit", HandleKeyPressed }, X { "insert-eight-bit", HandleEightBitKeyPressed }, X { "insert-selection", HandleInsertSelection }, X { "keymap", HandleKeymapChange }, X { "popup-menu", HandlePopupMenu }, X { "secure", HandleSecure }, X { "select-start", HandleSelectStart }, X { "select-extend", HandleSelectExtend }, X { "select-end", HandleSelectEnd }, X { "select-set", HandleSelectSet }, X { "select-cursor-start", HandleKeyboardSelectStart }, X { "select-cursor-end", HandleKeyboardSelectEnd }, X { "set-vt-font", HandleSetFont }, X { "start-extend", HandleStartExtend }, X { "start-cursor-extend", HandleKeyboardStartExtend }, X { "string", HandleStringEvent }, X { "scroll-forw", HandleScrollForward }, X { "scroll-back", HandleScrollBack }, X /* menu actions */ X { "allow-send-events", HandleAllowSends }, X { "set-visual-bell", HandleVisualBell }, X { "set-logging", HandleLogging }, X { "redraw", HandleRedraw }, X { "send-signal", HandleSendSignal }, X { "quit", HandleQuit }, X { "set-scrollbar", HandleScrollbar }, X { "set-jumpscroll", HandleJumpscroll }, X { "set-bltscroll", HandleBltscroll }, X { "set-reverse-video", HandleReverseVideo }, X { "set-autowrap", HandleAutoWrap }, X { "set-reversewrap", HandleReverseWrap }, X { "set-autolinefeed", HandleAutoLineFeed }, X { "set-appcursor", HandleAppCursor }, X { "set-appkeypad", HandleAppKeypad }, X { "set-scroll-on-key", HandleScrollKey }, X { "set-scroll-on-tty-output", HandleScrollTtyOutput }, X { "set-allow132", HandleAllow132 }, X { "set-cursesemul", HandleCursesEmul }, X { "set-marginbell", HandleMarginBell }, X { "set-altscreen", HandleAltScreen }, X { "soft-reset", HandleSoftReset }, X { "hard-reset", HandleHardReset }, X { "set-terminal-type", HandleSetTerminalType }, X { "set-visibility", HandleVisibility }, X { "set-tek-text", HandleSetTekText }, X { "tek-page", HandleTekPage }, X { "tek-reset", HandleTekReset }, X { "tek-copy", HandleTekCopy }, X}; X Xstatic XtResource resources[] = { X{XtNfont, XtCFont, XtRString, sizeof(char *), X XtOffset(XtermWidget, misc.f_n), XtRString, X DEFFONT}, X{XtNboldFont, XtCFont, XtRString, sizeof(char *), X XtOffset(XtermWidget, misc.f_b), XtRString, X DEFBOLDFONT}, X{XtNc132, XtCC132, XtRBoolean, sizeof(Boolean), X XtOffset(XtermWidget, screen.c132), X XtRBoolean, (caddr_t) &defaultFALSE}, X{XtNcharClass, XtCCharClass, XtRString, sizeof(char *), X XtOffset(XtermWidget, screen.charClass), X XtRString, (caddr_t) NULL}, X{XtNcurses, XtCCurses, XtRBoolean, sizeof(Boolean), X XtOffset(XtermWidget, screen.curses), X XtRBoolean, (caddr_t) &defaultFALSE}, X{XtNcutNewline, XtCCutNewline, XtRBoolean, sizeof(Boolean), X XtOffset(XtermWidget, screen.cutNewline), X XtRBoolean, (caddr_t) &defaultTRUE}, X{XtNcutToBeginningOfLine, XtCCutToBeginningOfLine, XtRBoolean, sizeof(Boolean), X XtOffset(XtermWidget, screen.cutToBeginningOfLine), X XtRBoolean, (caddr_t) &defaultTRUE}, X{XtNbackground, XtCBackground, XtRPixel, sizeof(Pixel), X XtOffset(XtermWidget, core.background_pixel), X XtRString, "XtDefaultBackground"}, X{XtNforeground, XtCForeground, XtRPixel, sizeof(Pixel), X XtOffset(XtermWidget, screen.foreground), X XtRString, "XtDefaultForeground"}, X{XtNcursorColor, XtCForeground, XtRPixel, sizeof(Pixel), X XtOffset(XtermWidget, screen.cursorcolor), X XtRString, "XtDefaultForeground"}, X{XtNcolor0, XtCForeground, XtRPixel, sizeof(Pixel), X XtOffset(XtermWidget, screen.colors[COLOR_0]), X XtRString, "XtDefaultForeground"}, X{XtNcolor1, XtCForeground, XtRPixel, sizeof(Pixel), X XtOffset(XtermWidget, screen.colors[COLOR_1]), X XtRString, "XtDefaultForeground"}, X{XtNcolor2, XtCForeground, XtRPixel, sizeof(Pixel), X XtOffset(XtermWidget, screen.colors[COLOR_2]), X XtRString, "XtDefaultForeground"}, X{XtNcolor3, XtCForeground, XtRPixel, sizeof(Pixel), X XtOffset(XtermWidget, screen.colors[COLOR_3]), X XtRString, "XtDefaultForeground"}, X{XtNcolor4, XtCForeground, XtRPixel, sizeof(Pixel), X XtOffset(XtermWidget, screen.colors[COLOR_4]), X XtRString, "XtDefaultForeground"}, X{XtNcolor5, XtCForeground, XtRPixel, sizeof(Pixel), X XtOffset(XtermWidget, screen.colors[COLOR_5]), X XtRString, "XtDefaultForeground"}, X{XtNcolor6, XtCForeground, XtRPixel, sizeof(Pixel), X XtOffset(XtermWidget, screen.colors[COLOR_6]), X XtRString, "XtDefaultForeground"}, X{XtNcolor7, XtCForeground, XtRPixel, sizeof(Pixel), X XtOffset(XtermWidget, screen.colors[COLOR_7]), X XtRString, "XtDefaultForeground"}, X{XtNeightBitInput, XtCEightBitInput, XtRBoolean, sizeof(Boolean), X XtOffset(XtermWidget, screen.input_eight_bits), X XtRBoolean, (caddr_t) &defaultTRUE}, X{XtNeightBitOutput, XtCEightBitOutput, XtRBoolean, sizeof(Boolean), X XtOffset(XtermWidget, screen.output_eight_bits), X XtRBoolean, (caddr_t) &defaultTRUE}, X{XtNgeometry,XtCGeometry, XtRString, sizeof(char *), X XtOffset(XtermWidget, misc.geo_metry), X XtRString, (caddr_t) NULL}, X{XtNalwaysHighlight,XtCAlwaysHighlight,XtRBoolean, X sizeof(Boolean),XtOffset(XtermWidget, screen.always_highlight), X XtRBoolean, (caddr_t) &defaultFALSE}, X{XtNtekGeometry,XtCGeometry, XtRString, sizeof(char *), X XtOffset(XtermWidget, misc.T_geometry), X XtRString, (caddr_t) NULL}, X{XtNinternalBorder,XtCBorderWidth,XtRInt, sizeof(int), X XtOffset(XtermWidget, screen.border), X XtRInt, (caddr_t) &defaultIntBorder}, X{XtNjumpScroll, XtCJumpScroll, XtRBoolean, sizeof(Boolean), X XtOffset(XtermWidget, screen.jumpscroll), X XtRBoolean, (caddr_t) &defaultTRUE}, X{XtNbltScroll, XtCBltScroll, XtRBoolean, sizeof(Boolean), X XtOffset(XtermWidget, screen.bltscroll), X XtRBoolean, (caddr_t) &defaultTRUE}, X{XtNlogFile, XtCLogfile, XtRString, sizeof(char *), X XtOffset(XtermWidget, screen.logfile), X XtRString, (caddr_t) NULL}, X{XtNlogging, XtCLogging, XtRBoolean, sizeof(Boolean), X XtOffset(XtermWidget, misc.log_on), X XtRBoolean, (caddr_t) &defaultFALSE}, X{XtNlogInhibit, XtCLogInhibit, XtRBoolean, sizeof(Boolean), X XtOffset(XtermWidget, misc.logInhibit), X XtRBoolean, (caddr_t) &defaultFALSE}, X{XtNloginShell, XtCLoginShell, XtRBoolean, sizeof(Boolean), X XtOffset(XtermWidget, misc.login_shell), X XtRBoolean, (caddr_t) &defaultFALSE}, X{XtNmarginBell, XtCMarginBell, XtRBoolean, sizeof(Boolean), X XtOffset(XtermWidget, screen.marginbell), X XtRBoolean, (caddr_t) &defaultFALSE}, X{XtNpointerColor, XtCForeground, XtRPixel, sizeof(Pixel), X XtOffset(XtermWidget, screen.mousecolor), X XtRString, "XtDefaultForeground"}, X{XtNpointerColorBackground, XtCBackground, XtRPixel, sizeof(Pixel), X XtOffset(XtermWidget, screen.mousecolorback), X XtRString, "XtDefaultBackground"}, X{XtNpointerShape,XtCCursor, XtRCursor, sizeof(Cursor), X XtOffset(XtermWidget, screen.pointer_cursor), X XtRString, (caddr_t) "xterm"}, X{XtNmultiClickTime,XtCMultiClickTime, XtRInt, sizeof(int), X XtOffset(XtermWidget, screen.multiClickTime), X XtRInt, (caddr_t) &defaultMultiClickTime}, X{XtNmultiScroll,XtCMultiScroll, XtRBoolean, sizeof(Boolean), X XtOffset(XtermWidget, screen.multiscroll), X XtRBoolean, (caddr_t) &defaultFALSE}, X{XtNnMarginBell,XtCColumn, XtRInt, sizeof(int), X XtOffset(XtermWidget, screen.nmarginbell), X XtRInt, (caddr_t) &defaultNMarginBell}, X{XtNreverseVideo,XtCReverseVideo,XtRBoolean, sizeof(Boolean), X XtOffset(XtermWidget, misc.re_verse), X XtRBoolean, (caddr_t) &defaultFALSE}, X{XtNreverseWrap,XtCReverseWrap, XtRBoolean, sizeof(Boolean), X XtOffset(XtermWidget, misc.reverseWrap), X XtRBoolean, (caddr_t) &defaultFALSE}, X{XtNautoWrap,XtCAutoWrap, XtRBoolean, sizeof(Boolean), X XtOffset(XtermWidget, misc.autoWrap), X XtRBoolean, (caddr_t) &defaultTRUE}, X{XtNsaveLines, XtCSaveLines, XtRInt, sizeof(int), X XtOffset(XtermWidget, screen.savelines), X XtRInt, (caddr_t) &defaultSaveLines}, X{XtNscrollBar, XtCScrollBar, XtRBoolean, sizeof(Boolean), X XtOffset(XtermWidget, misc.scrollbar), X XtRBoolean, (caddr_t) &defaultFALSE}, X{XtNscrollTtyOutput,XtCScrollCond, XtRBoolean, sizeof(Boolean), X XtOffset(XtermWidget, screen.scrollttyoutput), X XtRBoolean, (caddr_t) &defaultTRUE}, X{XtNscrollKey, XtCScrollCond, XtRBoolean, sizeof(Boolean), X XtOffset(XtermWidget, screen.scrollkey), X XtRBoolean, (caddr_t) &defaultFALSE}, X{XtNscrollLines, XtCScrollLines, XtRInt, sizeof(int), X XtOffset(XtermWidget, screen.scrolllines), X XtRInt, (caddr_t) &defaultScrollLines}, X{XtNsignalInhibit,XtCSignalInhibit,XtRBoolean, sizeof(Boolean), X XtOffset(XtermWidget, misc.signalInhibit), X XtRBoolean, (caddr_t) &defaultFALSE}, X{XtNtekInhibit, XtCTekInhibit, XtRBoolean, sizeof(Boolean), X XtOffset(XtermWidget, misc.tekInhibit), X XtRBoolean, (caddr_t) &defaultFALSE}, X{XtNtekSmall, XtCTekSmall, XtRBoolean, sizeof(Boolean), X XtOffset(XtermWidget, misc.tekSmall), X XtRBoolean, (caddr_t) &defaultFALSE}, X{XtNtekStartup, XtCTekStartup, XtRBoolean, sizeof(Boolean), X XtOffset(XtermWidget, screen.TekEmu), X XtRBoolean, (caddr_t) &defaultFALSE}, X{XtNtiteInhibit, XtCTiteInhibit, XtRBoolean, sizeof(Boolean), X XtOffset(XtermWidget, misc.titeInhibit), X XtRBoolean, (caddr_t) &defaultFALSE}, X{XtNvisualBell, XtCVisualBell, XtRBoolean, sizeof(Boolean), X XtOffset(XtermWidget, screen.visualbell), X XtRBoolean, (caddr_t) &defaultFALSE}, X{XtNallowSendEvents, XtCAllowSendEvents, XtRBoolean, sizeof(Boolean), X XtOffset(XtermWidget, screen.allowSendEvents), X XtRBoolean, (caddr_t) &defaultFALSE}, X{"font1", "Font1", XtRString, sizeof(String), X XtOffset(XtermWidget, screen.menu_font_names[fontMenu_font1]), X XtRString, (caddr_t) NULL}, X{"font2", "Font2", XtRString, sizeof(String), X XtOffset(XtermWidget, screen.menu_font_names[fontMenu_font2]), X XtRString, (caddr_t) NULL}, X{"font3", "Font3", XtRString, sizeof(String), X XtOffset(XtermWidget, screen.menu_font_names[fontMenu_font3]), X XtRString, (caddr_t) NULL}, X{"font4", "Font4", XtRString, sizeof(String), X XtOffset(XtermWidget, screen.menu_font_names[fontMenu_font4]), X XtRString, (caddr_t) NULL}, X{"dynamicColors", "DynamicColors", XtRBoolean, sizeof(Boolean), X XtOffset(XtermWidget, misc.dynamicColors), X XtRBoolean, (caddr_t) &defaultTRUE} X}; X X Xstatic void VTInitialize(), VTRealize(), VTExpose(), VTResize(); Xstatic void VTDestroy(); X XWidgetClassRec xtermClassRec = { X { X/* core_class fields */ X /* superclass */ (WidgetClass) &widgetClassRec, X /* class_name */ "VT100", X /* widget_size */ sizeof(XtermWidgetRec), X /* class_initialize */ NULL, X /* class_part_initialize */ NULL, X /* class_inited */ FALSE, X /* initialize */ VTInitialize, X /* initialize_hook */ NULL, X /* realize */ VTRealize, X /* actions */ actionsList, X /* num_actions */ XtNumber(actionsList), X /* resources */ resources, X /* num_resources */ XtNumber(resources), X /* xrm_class */ NULLQUARK, X /* compress_motion */ TRUE, X /* compress_exposure */ FALSE, X /* compress_enterleave */ TRUE, X /* visible_interest */ FALSE, X /* destroy */ VTDestroy, X /* resize */ VTResize, X /* expose */ VTExpose, X /* set_values */ NULL, X /* set_values_hook */ NULL, X /* set_values_almost */ NULL, X /* get_values_hook */ NULL, X /* accept_focus */ NULL, X /* version */ XtVersion, X /* callback_offsets */ NULL, X /* tm_table */ defaultTranslations, X /* query_geometry */ XtInheritQueryGeometry, X /* display_accelerator*/ XtInheritDisplayAccelerator, X /* extension */ NULL X } X}; X XWidgetClass xtermWidgetClass = (WidgetClass)&xtermClassRec; X XVTparse() X{ X register TScreen *screen = &term->screen; X register int *parsestate = groundtable; X register unsigned int c; X register unsigned char *cp; X register int row, col, top, bot, scstype; X extern int bitset(), bitclr(), finput(), TrackMouse(); X X if(setjmp(vtjmpbuf)) X parsestate = groundtable; X for( ; ; ) { X switch (parsestate[c = doinput()]) { X case CASE_PRINT: X /* printable characters */ X top = bcnt > TEXT_BUF_SIZE ? TEXT_BUF_SIZE : bcnt; X cp = bptr; X *--bptr = c; X while(top > 0 && isprint(*cp & 0x7f)) { X top--; X bcnt--; X cp++; X } X if(screen->curss) { X dotext(screen, term->flags, X term->cur_foreground, X term->cur_background, X screen->gsets[screen->curss], bptr, bptr + 1); X screen->curss = 0; X bptr++; X } X if(bptr < cp) X dotext(screen, term->flags, X term->cur_foreground, X term->cur_background, X screen->gsets[screen->curgl], bptr, cp); X bptr = cp; X break; X X case CASE_GROUND_STATE: X /* exit ignore mode */ X parsestate = groundtable; X break; X X case CASE_IGNORE_STATE: X /* Ies: ignore anything else */ X parsestate = igntable; X break; X X case CASE_IGNORE_ESC: X /* Ign: escape */ X parsestate = iestable; X break; X X case CASE_IGNORE: X /* Ignore character */ X break; X X case CASE_BELL: X /* bell */ X Bell(); X break; X X case CASE_BS: X /* backspace */ X CursorBack(screen, 1); X break; X X case CASE_CR: X /* carriage return */ X CarriageReturn(screen); X break; X X case CASE_ESC: X /* escape */ X parsestate = esctable; X break; X X case CASE_VMOT: X /* X * form feed, line feed, vertical tab X */ X Index(screen, 1); X if (term->flags & LINEFEED) X CarriageReturn(screen); X if (screen->display->qlen > 0 || X GetBytesAvailable (screen->display->fd) > 0) X xevents(); X break; X X case CASE_TAB: X /* tab */ X screen->cur_col = TabNext(term->tabs, screen->cur_col); X if (screen->cur_col > screen->max_col) X screen->cur_col = screen->max_col; X break; X X case CASE_SI: X screen->curgl = 0; X break; X X case CASE_SO: X screen->curgl = 1; X break; X X case CASE_SCR_STATE: X /* enter scr state */ X parsestate = scrtable; X break; X X case CASE_SCS0_STATE: X /* enter scs state 0 */ X scstype = 0; X parsestate = scstable; X break; X X case CASE_SCS1_STATE: X /* enter scs state 1 */ X scstype = 1; X parsestate = scstable; X break; X X case CASE_SCS2_STATE: X /* enter scs state 2 */ X scstype = 2; X parsestate = scstable; X break; X X case CASE_SCS3_STATE: X /* enter scs state 3 */ X scstype = 3; X parsestate = scstable; X break; X X case CASE_ESC_IGNORE: X /* unknown escape sequence */ X parsestate = eigtable; X break; X X case CASE_ESC_DIGIT: X /* digit in csi or dec mode */ X if((row = param[nparam - 1]) == DEFAULT) X row = 0; X param[nparam - 1] = 10 * row + (c - '0'); X break; X X case CASE_ESC_SEMI: X /* semicolon in csi or dec mode */ X param[nparam++] = DEFAULT; X break; X X case CASE_DEC_STATE: X /* enter dec mode */ X parsestate = dectable; X break; X X case CASE_ICH: X /* ICH */ X if((row = param[0]) < 1) X row = 1; X InsertChar(screen, row); X parsestate = groundtable; X break; X X case CASE_CUU: X /* CUU */ X if((row = param[0]) < 1) X row = 1; X CursorUp(screen, row); X parsestate = groundtable; X break; X X case CASE_CUD: X /* CUD */ X if((row = param[0]) < 1) X row = 1; X CursorDown(screen, row); X parsestate = groundtable; X break; X X case CASE_CUF: X /* CUF */ X if((row = param[0]) < 1) X row = 1; X CursorForward(screen, row); X parsestate = groundtable; X break; X X case CASE_CUB: X /* CUB */ X if((row = param[0]) < 1) X row = 1; X CursorBack(screen, row); X parsestate = groundtable; X break; X X case CASE_CUP: X /* CUP | HVP */ X if((row = param[0]) < 1) X row = 1; X if(nparam < 2 || (col = param[1]) < 1) X col = 1; X CursorSet(screen, row-1, col-1, term->flags); X parsestate = groundtable; X break; X X case CASE_ED: X /* ED */ X switch (param[0]) { X case DEFAULT: X case 0: X ClearBelow(screen); X break; X X case 1: X ClearAbove(screen); X break; X X case 2: X ClearScreen(screen); X break; X } X parsestate = groundtable; X break; X X case CASE_EL: X /* EL */ X switch (param[0]) { X case DEFAULT: X case 0: X ClearRight(screen); X break; X case 1: X ClearLeft(screen); X break; X case 2: X ClearLine(screen); X break; X } X parsestate = groundtable; X break; X X case CASE_IL: X /* IL */ X if((row = param[0]) < 1) X row = 1; X InsertLine(screen, row); X parsestate = groundtable; X break; X X case CASE_DL: X /* DL */ X if((row = param[0]) < 1) X row = 1; X DeleteLine(screen, row); X parsestate = groundtable; X break; X X case CASE_DCH: X /* DCH */ X if((row = param[0]) < 1) X row = 1; X DeleteChar(screen, row); X parsestate = groundtable; X break; X X case CASE_TRACK_MOUSE: X /* Track mouse as long as in window and between X specified rows */ X TrackMouse(param[0], param[2]-1, param[1]-1, X param[3]-1, param[4]-2); X break; X X case CASE_DECID: X param[0] = -1; /* Default ID parameter */ X /* Fall through into ... */ X case CASE_DA1: X /* DA1 */ X if (param[0] <= 0) { /* less than means DEFAULT */ X reply.a_type = CSI; X reply.a_pintro = '?'; X reply.a_nparam = 2; X reply.a_param[0] = 1; /* VT102 */ X reply.a_param[1] = 2; /* VT102 */ X reply.a_inters = 0; X reply.a_final = 'c'; X unparseseq(&reply, screen->respond); X } X parsestate = groundtable; X break; X X case CASE_TBC: X /* TBC */ X if ((row = param[0]) <= 0) /* less than means default */ X TabClear(term->tabs, screen->cur_col); X else if (row == 3) X TabZonk(term->tabs); X parsestate = groundtable; X break; X X case CASE_SET: X /* SET */ X modes(term, bitset); X parsestate = groundtable; X break; X X case CASE_RST: X /* RST */ X modes(term, bitclr); X parsestate = groundtable; X break; X X case CASE_SGR: X /* SGR */ X for (row=0; row<nparam; ++row) { X switch (param[row]) { X case DEFAULT: X case 0: X term->flags &= X ~(INVERSE|BOLD|UNDERLINE|FG_COLOR| X BG_COLOR|DIM); X break; X case 1: X case 5: /* Blink, really. */ X term->flags |= BOLD; X break; X case 2: X term->flags |= DIM; X break; X case 4: /* Underscore */ X term->flags |= UNDERLINE; X break; X case 7: X term->flags |= INVERSE; X break; X case 30: X case 31: X case 32: X case 33: X case 34: X case 35: X case 36: X case 37: X term->flags |= FG_COLOR; X term->cur_foreground = param[row] - 30; X break; X case 40: X case 41: X case 42: X case 43: X case 44: X case 45: X case 46: X case 47: X term->flags |= BG_COLOR; X term->cur_background = param[row] - 40; X break; X } X } X parsestate = groundtable; X break; X X case CASE_CPR: X /* CPR */ X if ((row = param[0]) == 5) { X reply.a_type = CSI; X reply.a_pintro = 0; X reply.a_nparam = 1; X reply.a_param[0] = 0; X reply.a_inters = 0; X reply.a_final = 'n'; X unparseseq(&reply, screen->respond); X } else if (row == 6) { X reply.a_type = CSI; X reply.a_pintro = 0; X reply.a_nparam = 2; X reply.a_param[0] = screen->cur_row+1; X reply.a_param[1] = screen->cur_col+1; X reply.a_inters = 0; X reply.a_final = 'R'; X unparseseq(&reply, screen->respond); X } X parsestate = groundtable; X break; X X case CASE_DECSTBM: X /* DECSTBM */ X if((top = param[0]) < 1) X top = 1; X if(nparam < 2 || (bot = param[1]) == DEFAULT X || bot > screen->max_row + 1 X || bot == 0) X bot = screen->max_row+1; X if (bot > top) { X if(screen->scroll_amt) X FlushScroll(screen); X screen->top_marg = top-1; X screen->bot_marg = bot-1; X CursorSet(screen, 0, 0, term->flags); X } X parsestate = groundtable; X break; X X case CASE_DECREQTPARM: X /* DECREQTPARM */ X if ((row = param[0]) == DEFAULT) X row = 0; X if (row == 0 || row == 1) { X reply.a_type = CSI; X reply.a_pintro = 0; X reply.a_nparam = 7; X reply.a_param[0] = row + 2; X reply.a_param[1] = 1; /* no parity */ X reply.a_param[2] = 1; /* eight bits */ X reply.a_param[3] = 112; /* transmit 9600 baud */ X reply.a_param[4] = 112; /* receive 9600 baud */ X reply.a_param[5] = 1; /* clock multiplier ? */ X reply.a_param[6] = 0; /* STP flags ? */ X reply.a_inters = 0; X reply.a_final = 'x'; X unparseseq(&reply, screen->respond); X } X parsestate = groundtable; X break; X X case CASE_DECSET: X /* DECSET */ X dpmodes(term, bitset); X parsestate = groundtable; X if(screen->TekEmu) X return; X break; X X case CASE_DECRST: X /* DECRST */ X dpmodes(term, bitclr); X parsestate = groundtable; X break; X X case CASE_DECALN: X /* DECALN */ X if(screen->cursor_state) X HideCursor(); X for(row = screen->max_row ; row >= 0 ; row--) { X bzero(screen->buf[4 * row + 1], X col = screen->max_col + 1); X for(cp = (unsigned char *)screen->buf[4 * row] ; col > 0 ; col--) X *cp++ = (unsigned char) 'E'; X } X ScrnRefresh(screen, 0, 0, screen->max_row + 1, X screen->max_col + 1, False); X parsestate = groundtable; X break; X X case CASE_GSETS: X screen->gsets[scstype] = c; X parsestate = groundtable; X break; X X case CASE_DECSC: X /* DECSC */ X CursorSave(term, &screen->sc); X parsestate = groundtable; X break; X X case CASE_DECRC: X /* DECRC */ X CursorRestore(term, &screen->sc); X parsestate = groundtable; X break; X X case CASE_DECKPAM: X /* DECKPAM */ X term->keyboard.flags |= KYPD_APL; X update_appkeypad(); END_OF_FILE if test 29680 -ne `wc -c <'xterm/charproc.c.aa'`; then echo shar: \"'xterm/charproc.c.aa'\" unpacked with wrong size! fi # end of 'xterm/charproc.c.aa' fi echo shar: End of archive 5 \(of 14\). cp /dev/null ark5isdone MISSING="" for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 ; do if test ! -f ark${I}isdone ; then MISSING="${MISSING} ${I}" fi done if test "${MISSING}" = "" ; then echo You have unpacked all 14 archives. rm -f ark[1-9]isdone ark[1-9][0-9]isdone else echo You still need to unpack the following archives: echo " " ${MISSING} fi ## End of shell archive. exit 0 dan ---------------------------------------------------- O'Reilly && Associates argv@sun.com / argv@ora.com Opinions expressed reflect those of the author only.