├── package ├── debian │ ├── compat │ ├── source │ │ └── format │ ├── watch │ ├── xterm-dev.docs │ ├── xterm-xres.sed │ ├── color.sed │ ├── xterm-dev.menu │ ├── control │ ├── changelog │ └── rules └── freebsd │ ├── pkg-descr │ ├── pkg-message │ ├── pkg-plist │ └── Makefile ├── THANKS ├── README.md ├── icons ├── xterm.png ├── xterm-color.png ├── filled-xterm.png ├── mini.xterm_16x16.png ├── mini.xterm_32x32.png ├── mini.xterm_48x48.png ├── mini.xterm_256x256.png ├── xterm_16x16.xpm ├── make-xpms ├── xterm_32x32.xpm ├── xterm-color_16x16.xpm ├── mini.xterm_16x16.xpm ├── xterm-color_32x32.xpm ├── xterm_48x48.xpm ├── terminal_48x48.xpm ├── xterm-color_48x48.xpm ├── filled-xterm_16x16.xpm ├── xterm.xpms ├── mini.xterm.svg └── mini.xterm_32x32.xpm ├── tektests ├── imtest.tek ├── imtesth.tek └── ocpred.tek ├── keysym2ucs.h ├── precompose.h ├── unicode ├── precompose.c.head ├── make-precompose.sh ├── precompose.c.tail └── README ├── wcwidth.h ├── xterm_axp.opt ├── charclass.h ├── README ├── vms.h ├── Tests ├── xutf8.h ├── xterm.desktop ├── uxterm.desktop ├── vttests ├── 88colors.pl ├── 256colors.pl ├── fonts.sh ├── dynamic.sh ├── title.sh ├── acolors.sh ├── 8colors.sh ├── resize.sh ├── dynamic2.sh ├── doublechars.sh ├── 16colors.sh ├── dynamic.pl ├── resize.pl ├── paste64.pl └── query-color.pl ├── AAA_README_VMS.txt ├── version.h ├── plink.sh ├── make.com ├── run-tic.sh ├── Tekparse.def ├── KOI8RXTerm.ad ├── version.c ├── xstrings.h ├── README.os390 ├── Tekparse.h ├── link_axp.com ├── 256colres.pl ├── 88colres.pl ├── xcharmouse.h ├── df-install.in ├── uxterm.man ├── xtermcap.h ├── UXTerm.ad ├── koi8rxterm.man ├── error.h ├── uxterm ├── data.c ├── koi8rxterm ├── scrollback.c ├── VTparse.def └── 88colres.h /package/debian/compat: -------------------------------------------------------------------------------- 1 | 5 2 | -------------------------------------------------------------------------------- /package/debian/source/format: -------------------------------------------------------------------------------- 1 | 3.0 (native) 2 | -------------------------------------------------------------------------------- /THANKS: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joejulian/xterm/HEAD/THANKS -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | xterm-288 2 | ========= 3 | 4 | Source code for the latest xterm 5 | -------------------------------------------------------------------------------- /icons/xterm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joejulian/xterm/HEAD/icons/xterm.png -------------------------------------------------------------------------------- /icons/xterm-color.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joejulian/xterm/HEAD/icons/xterm-color.png -------------------------------------------------------------------------------- /icons/filled-xterm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joejulian/xterm/HEAD/icons/filled-xterm.png -------------------------------------------------------------------------------- /tektests/imtest.tek: -------------------------------------------------------------------------------- 1 |  ` @ `?_ `?_8m?_8m?_8m @8m @ ` @!r#D(0,0) ` @8m?_ `?_8m @,p @ 2 | -------------------------------------------------------------------------------- /icons/mini.xterm_16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joejulian/xterm/HEAD/icons/mini.xterm_16x16.png -------------------------------------------------------------------------------- /icons/mini.xterm_32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joejulian/xterm/HEAD/icons/mini.xterm_32x32.png -------------------------------------------------------------------------------- /icons/mini.xterm_48x48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joejulian/xterm/HEAD/icons/mini.xterm_48x48.png -------------------------------------------------------------------------------- /icons/mini.xterm_256x256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joejulian/xterm/HEAD/icons/mini.xterm_256x256.png -------------------------------------------------------------------------------- /tektests/imtesth.tek: -------------------------------------------------------------------------------- 1 |  `` @ c`?_ c`?_8om?_8om?_8lm @8lm @ `` @!`r#D(0,0) `` @8om?_ c`?_8lm @,`p @ 2 | -------------------------------------------------------------------------------- /package/debian/watch: -------------------------------------------------------------------------------- 1 | version=3 2 | 3 | opts=passive ftp://invisible-island.net/xterm/current/xterm\.tar.gz \ 4 | debian uupdate 5 | -------------------------------------------------------------------------------- /package/debian/xterm-dev.docs: -------------------------------------------------------------------------------- 1 | INSTALL 2 | README.i18n 3 | THANKS 4 | ctlseqs.ms 5 | ctlseqs.txt 6 | termcap 7 | terminfo 8 | xterm.log.html 9 | -------------------------------------------------------------------------------- /package/debian/xterm-xres.sed: -------------------------------------------------------------------------------- 1 | /\*tek4014\*fontSmall:[ ]*6x10/a\ 2 | \ 3 | ! Debian package customizations follow.\ 4 | *backarrowKeyIsErase: true\ 5 | *ptyInitialErase: true 6 | /!*allowWindowOps: false/a\ 7 | *allowWindowOps: true 8 | -------------------------------------------------------------------------------- /keysym2ucs.h: -------------------------------------------------------------------------------- 1 | /* $XFree86: xc/programs/xterm/keysym2ucs.h,v 1.1 1999/06/12 15:37:18 dawes Exp $ */ 2 | /* 3 | * This module converts keysym values into the corresponding ISO 10646-1 4 | * (UCS, Unicode) values. 5 | */ 6 | 7 | #include 8 | 9 | long keysym2ucs(KeySym keysym); 10 | -------------------------------------------------------------------------------- /precompose.h: -------------------------------------------------------------------------------- 1 | /* $XFree86: xc/programs/xterm/precompose.h,v 1.1 2000/08/26 04:33:54 dawes Exp $ */ 2 | 3 | #ifndef PRECOMPOSE_H 4 | #define PRECOMPOSE_H 5 | 6 | int do_precomposition(int base, int comb); 7 | 8 | /* returns unicode value if a canonical composition exists, 9 | otherwise -1 */ 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /package/debian/color.sed: -------------------------------------------------------------------------------- 1 | s/! Uncomment this for "white" text on a dark background./! Set the default text foreground and background colors./ 2 | s/!\*VT100\*foreground: gray90/*VT100*foreground: gray90/ 3 | s/!\*VT100\*background: black/*VT100*background: black/ 4 | /!\*VT100.scrollbar.thumb:[ ]*vlines2/,/!lines[ ]*-1,0,0,0,0,-1/s/!// 5 | -------------------------------------------------------------------------------- /unicode/precompose.c.head: -------------------------------------------------------------------------------- 1 | /* 2 | * Canonical Compositions 3 | * 4 | * DO NOT EDIT BY HAND! This is generated by the script 5 | * unicode/make-precompose.sh 6 | */ 7 | /* @XTermId@ */ 8 | /* @XFree86@ */ 9 | 10 | #include 11 | 12 | static struct { 13 | int replacement; 14 | int base; 15 | int comb; 16 | } precompositions[] = { 17 | -------------------------------------------------------------------------------- /wcwidth.h: -------------------------------------------------------------------------------- 1 | /* $XFree86: xc/programs/xterm/wcwidth.h,v 1.5 2005/05/03 00:38:25 dickey Exp $ */ 2 | 3 | #ifndef included_wcwidth_h 4 | #define included_wcwidth_h 1 5 | 6 | #include 7 | 8 | extern int mk_wcswidth(const wchar_t * pwcs, size_t n); 9 | extern int mk_wcswidth_cjk(const wchar_t * pwcs, size_t n); 10 | extern int mk_wcwidth(wchar_t ucs); 11 | extern int mk_wcwidth_cjk(wchar_t ucs); 12 | extern int wcswidth_cjk(const wchar_t * pwcs, size_t n); 13 | 14 | #endif /* included_wcwidth_h */ 15 | -------------------------------------------------------------------------------- /xterm_axp.opt: -------------------------------------------------------------------------------- 1 | BUTTON.OBJ 2 | CHARPROC.OBJ 3 | CHARSETS.OBJ 4 | CURSOR.OBJ 5 | DATA.OBJ 6 | DOUBLECHR.OBJ 7 | FONTUTILS.OBJ 8 | INPUT.OBJ 9 | KEYSYM2UCS.OBJ 10 | MAIN.OBJ 11 | MENU.OBJ 12 | MISC.OBJ 13 | PRINT.OBJ 14 | PTYDATA.OBJ 15 | SCREEN.OBJ 16 | SCROLLBAR.OBJ 17 | TABS.OBJ 18 | TEKPROC.OBJ 19 | TEKPRSTBL.OBJ 20 | TRACE.OBJ 21 | TTYSVR.OBJ 22 | UTIL.OBJ 23 | VMS.OBJ 24 | VTPRSTBL.OBJ 25 | XAW3DLIB.OLB/LIB 26 | XMULIB.OLB/LIB 27 | SYS$SHARE:DECW$XTLIBSHRR5.EXE/SHARE 28 | SYS$SHARE:DECW$XLIBSHR.EXE/SHARE 29 | -------------------------------------------------------------------------------- /icons/xterm_16x16.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static char * xterm_16x16_xpm[] = { 3 | "16 16 2 1", 4 | " c None", 5 | ". c #000000", 6 | " ", 7 | " . ", 8 | " .... . ", 9 | " .. . ", 10 | " .. . ", 11 | " .. . . ", 12 | " . ", 13 | " .... .. . ", 14 | " . . . .. . ", 15 | " . . ", 16 | " . . ", 17 | " . ", 18 | " . ", 19 | " ", 20 | " ", 21 | " . "}; 22 | -------------------------------------------------------------------------------- /package/freebsd/pkg-descr: -------------------------------------------------------------------------------- 1 | The xterm program is the standard terminal emulator for the X 2 | Window System. It provides DEC VT102/VT220 and Tektronix 4014 3 | compatible terminals for programs that can't use the window 4 | system directly. If the underlying operating system supports 5 | terminal resizing capabilities (for example, the SIGWINCH 6 | signal in systems derived from 4.3bsd), xterm will use the 7 | facilities to notify programs running in the window whenever it 8 | is resized. 9 | 10 | WWW: http://invisible-island.net/xterm/ 11 | -------------------------------------------------------------------------------- /charclass.h: -------------------------------------------------------------------------------- 1 | /* $XTermId: charclass.h,v 1.6 2006/02/13 01:14:58 tom Exp $ */ 2 | 3 | /* $XFree86: xc/programs/xterm/charclass.h,v 1.3 2006/02/13 01:14:58 dickey Exp $ */ 4 | 5 | #ifndef CHARCLASS_H 6 | #define CHARCLASS_H 7 | 8 | extern void init_classtab(void); 9 | /* intialise the table. needs calling before either of the 10 | others. */ 11 | 12 | extern int SetCharacterClassRange(int low, int high, int value); 13 | extern int CharacterClass(int c); 14 | 15 | #ifdef NO_LEAKS 16 | extern void noleaks_CharacterClass(void); 17 | #endif 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /package/debian/xterm-dev.menu: -------------------------------------------------------------------------------- 1 | ?package(xterm-dev):\ 2 | needs="x11"\ 3 | section="Applications/Terminal Emulators"\ 4 | longtitle="XTerm: terminal emulator for X (development)"\ 5 | title="XTermDev"\ 6 | icon="/usr/share/pixmaps/xterm-dev-color_32x32.xpm"\ 7 | command="xterm" 8 | ?package(xterm-dev):\ 9 | needs="x11"\ 10 | section="Applications/Terminal Emulators"\ 11 | longtitle="XTerm: terminal emulator for X with Unicode support (development)"\ 12 | title="XTermDev (Unicode)"\ 13 | icon="/usr/share/pixmaps/xterm-dev-color_32x32.xpm"\ 14 | command="uxterm" 15 | -------------------------------------------------------------------------------- /package/freebsd/pkg-message: -------------------------------------------------------------------------------- 1 | ================================================================================ 2 | You installed xterm with wide chars support. This introduces some limitations 3 | comparing to the plain single chars version: this version of xterm will use 4 | UTF-8 charset for selection buffers, breaking 8-bit copy/paste support unless 5 | you are using UTF-8 or ISO8859-1 locale. If you want 8-bit charset selections to 6 | work as before, use "eightBitSelectTypes" XTerm resource setting. 7 | 8 | For further information refer to the SELECT/PASTE section of xterm(1) manual 9 | page. 10 | ================================================================================ 11 | -------------------------------------------------------------------------------- /unicode/make-precompose.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # $XTermId: make-precompose.sh,v 1.6 2007/02/05 01:06:36 Thomas.Wolff Exp $ 3 | # $XFree86: xc/programs/xterm/unicode/make-precompose.sh,v 1.4 2005/03/29 04:00:32 tsi Exp $ 4 | 5 | cat precompose.c.head | sed -e's/@/$/g' 6 | 7 | # extract canonical decomposition data from UnicodeData.txt, 8 | # pad hex values to 5 digits, 9 | # sort numerically on base character, then combining character, 10 | # then reduce to 4 digits again where possible 11 | cut UnicodeData.txt -d ";" -f 1,6 | 12 | grep ";[0-9,A-F]" | grep " " | 13 | sed -e "s/ /, 0x/;s/^/{ 0x/;s/;/, 0x/;s/$/},/" | 14 | sed -e "s,0x\(....\)\([^0-9A-Fa-f]\),0x0\1\2,g" | 15 | (sort -k 3 || sort +2) | 16 | sed -e "s,0x0\(...[0-9A-Fa-f]\),0x\1,g" 17 | 18 | cat precompose.c.tail 19 | -------------------------------------------------------------------------------- /unicode/precompose.c.tail: -------------------------------------------------------------------------------- 1 | }; 2 | 3 | #define UNICODE_SHIFT 21 4 | 5 | int do_precomposition(int base, int comb) { 6 | int min = 0; 7 | int max = sizeof(precompositions) / sizeof(precompositions[0]) - 1; 8 | int mid; 9 | unsigned long sought = ((unsigned) base << UNICODE_SHIFT) | (unsigned) comb; 10 | unsigned long that; 11 | 12 | /* binary search */ 13 | while (max >= min) { 14 | mid = (min + max) / 2; 15 | that = ((unsigned) precompositions[mid].base << UNICODE_SHIFT) | ((unsigned) precompositions[mid].comb); 16 | if (that < sought) { 17 | min = mid + 1; 18 | } else if (that > sought) { 19 | max = mid - 1; 20 | } else { 21 | return precompositions[mid].replacement; 22 | } 23 | } 24 | /* no match */ 25 | return -1; 26 | } 27 | -------------------------------------------------------------------------------- /icons/make-xpms: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # $XTermId: make-xpms,v 1.6 2012/10/07 22:50:56 tom Exp $ 3 | # some files are generated from other icons... 4 | for name in mini.xterm filled-xterm xterm xterm-color 5 | do 6 | target=${name}.xpms 7 | NAME=`echo "$target" | sed -e 's/[\.-]/_/g'` 8 | LIST= 9 | echo "** creating $target" 10 | rm -f $target 11 | echo "/* @XTermId@ */" | sed -e 's/@/$/g' >$target 12 | echo "/* generated by $0 $* */" >>$target 13 | echo "/* vile:xpmmode */" >>$target 14 | for source in ${name}_*[0-9]x[1-9]*.xpm 15 | do 16 | echo ".. from $source" 17 | BASE=`basename "$source" .xpm` 18 | PART=`echo "$source" | sed -e 's/[\.-]/_/g'` 19 | test -n "$LIST" && LIST="$LIST, " 20 | LIST="$LIST 21 | { \"$BASE\", $PART }" 22 | sed -e 's/char \*/const char * const/' $source >>$target 23 | done 24 | echo "static const XPM_DATA $NAME[] = {$LIST 25 | };" >>$target 26 | done 27 | -------------------------------------------------------------------------------- /package/freebsd/pkg-plist: -------------------------------------------------------------------------------- 1 | bin/koi8rxterm-dev 2 | bin/resize-dev 3 | bin/uxterm-dev 4 | bin/xterm-dev 5 | lib/X11/app-defaults/KOI8RXTermDev 6 | lib/X11/app-defaults/KOI8RXTermDev-color 7 | lib/X11/app-defaults/UXTermDev 8 | lib/X11/app-defaults/UXTermDev-color 9 | lib/X11/app-defaults/XTermDev 10 | lib/X11/app-defaults/XTermDev-color 11 | share/applications/xterm-dev.desktop 12 | share/pixmaps/filled-xterm-dev_32x32.xpm 13 | share/pixmaps/filled-xterm-dev_48x48.xpm 14 | share/pixmaps/mini.xterm-dev_32x32.xpm 15 | share/pixmaps/mini.xterm-dev_48x48.xpm 16 | share/pixmaps/xterm-dev-color_32x32.xpm 17 | share/pixmaps/xterm-dev-color_48x48.xpm 18 | share/pixmaps/xterm-dev_32x32.xpm 19 | share/pixmaps/xterm-dev_48x48.xpm 20 | @dirrmtry share/applications 21 | %%GNOME%%@exec %%LOCALBASE%%/bin/update-desktop-database > /dev/null || /usr/bin/true 22 | %%GNOME%%@unexec %%LOCALBASE%%/bin/update-desktop-database > /dev/null || /usr/bin/true 23 | -------------------------------------------------------------------------------- /unicode/README: -------------------------------------------------------------------------------- 1 | -- $XTermId: README,v 1.10 2004/12/01 01:27:49 tom Exp $ 2 | -- $XFree86: xc/programs/xterm/unicode/README,v 1.5 2004/12/01 01:27:49 dickey Exp $ 3 | -- Thomas E. Dickey 4 | 5 | These are some scripts and datafiles used for generating tables used in the 6 | experimental UTF-8 implementation in xterm. 7 | 8 | To run the convmap.pl script, you will need a copy of UnicodeData-Latest.txt 9 | which is currently available as 10 | 11 | ftp://ftp.unicode.org/Public/UNIDATA/UnicodeData.txt 12 | 13 | It is a large file (~877kb), so it is not included in this distribution. 14 | 15 | convmap.pl is used to generate ../keysym2ucs.c, e.g., 16 | 17 | ./convmap.pl >../keysym2ucs.c 18 | 19 | keysym.map is input data for convmap.pl 20 | 21 | 22 | The make-precompose.sh script makes the precompose.c file, which is used to 23 | handle canonical composition. This also needs UnicodeData-Latest.txt. It uses 24 | precompose.c.head and precompose.c.tail as templates. 25 | -------------------------------------------------------------------------------- /package/debian/control: -------------------------------------------------------------------------------- 1 | Source: xterm-dev 2 | Section: x11 3 | Priority: optional 4 | Maintainer: Thomas E. Dickey 5 | Homepage: http://invisible-island.net/xterm/ 6 | Build-Depends: debhelper (>= 7) 7 | Standards-Version: 3.8.2 8 | 9 | Package: xterm-dev 10 | Architecture: any 11 | Depends: ${misc:Depends} 12 | Provides: x-terminal-emulator 13 | Recommends: x11-utils | xutils | bluit 14 | Description: X terminal emulator (development version) 15 | xterm is the standard terminal emulator for the X Window System. 16 | It provides DEC VT102 and Tektronix 4014 compatible terminals for 17 | programs that cannot use the window system directly. This version 18 | implements ISO/ANSI colors, Unicode, and most of the control sequences 19 | used by DEC VT220 terminals. 20 | . 21 | This package contains a development version of xterm. It is 22 | configured to use "xterm-dev" and "XTermDev" for the program 23 | and its resource class, to avoid conflict with other packages. 24 | -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | -- $XTermId: README,v 1.3 2007/05/24 19:49:19 tom Exp $ 2 | -- Below is the original README for xterm from 1991, for your amusement. 3 | -- For a better overview, see http://invisible-island.net/xterm/ 4 | ------------------------------------------------------------------------------- 5 | Abandon All Hope, Ye Who Enter Here 6 | 7 | 8 | This is undoubtedly the most ugly program in the distribution. It was one of 9 | the first "serious" programs ported, and still has a lot of historical baggage. 10 | Ideally, there would be a general tty widget and then vt102 and tek4014 11 | subwidgets so that they could be used in other programs. We are trying to 12 | clean things up as we go, but there is still a lot of work to do. 13 | 14 | If you are porting this to a machine that has problems with overlapping 15 | bcopy's, watch out! 16 | 17 | There are two documents on xterm: the man page, xterm.man, which describes 18 | how to use it, and ctlseqs.ms, which describes the control sequences it 19 | understands. 20 | -------------------------------------------------------------------------------- /vms.h: -------------------------------------------------------------------------------- 1 | /* $XFree86: xc/programs/xterm/vms.h,v 1.1 2000/02/08 17:19:45 dawes Exp $ */ 2 | 3 | /* vms.h 4 | */ 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | struct IOSB 19 | { 20 | short int status; 21 | short int len; 22 | int unused; 23 | } mbx_read_iosb,iosb; 24 | 25 | #define MAXITEMLIST 5 26 | 27 | short int tt_chan; /* channel to the Pseudo terminal */ 28 | short int mbx_chan; /* channel to the mailbox */ 29 | struct accdef mbx_buf; /* mailbox buffer */ 30 | short int mbxunit; /* mailbox unit number */ 31 | int pid; /* PID of created process */ 32 | static $DESCRIPTOR (image, "SYS$SYSTEM:LOGINOUT.EXE"); 33 | 34 | static struct items { 35 | short int buflen; 36 | short int code; 37 | int buffer; 38 | int return_addr; 39 | } itemlist[MAXITEMLIST]; 40 | 41 | int tt_write(const char *tt_write_buf,int size); 42 | -------------------------------------------------------------------------------- /icons/xterm_32x32.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static char * xterm_32x32_xpm[] = { 3 | "32 32 2 1", 4 | " c None", 5 | ". c #000000", 6 | " ", 7 | " . .. ", 8 | " . ................... ... ", 9 | " . . ... . ", 10 | " . ... . ", 11 | " . .. ... ... . ", 12 | " . . . ... . ", 13 | " . .. ... . ", 14 | " . .. ... . ", 15 | " . .. ... . ", 16 | " . . . ... . ", 17 | " . ... .. ... . ", 18 | " . ... . ", 19 | " . ... . ", 20 | " . ........ ... .. ..... . ", 21 | " . . . . . ........ . ", 22 | " . . ... .. . . .... . ", 23 | " . . . . . . . .... . ", 24 | " . . ... . .. . .... . ", 25 | " . . .... ", 26 | " . . . ... ", 27 | " . .. ", 28 | " ....................... ", 29 | " ", 30 | " ........................ ", 31 | " . .. ", 32 | " .. ", 33 | " . . . ", 34 | " . . ", 35 | " . . ................. .. . ", 36 | " . .. ", 37 | " "}; 38 | -------------------------------------------------------------------------------- /Tests: -------------------------------------------------------------------------------- 1 | Tests for xterm: 2 | 3 | If system supports window size (i.e., some combination of SIGWINCH, 4 | TIOCSSIZE, TIOCSWINSZ), start a full-screen program (e.g., Emacs, 5 | Jove, vi) and resize the xterm window. The program must immediately 6 | update its screen image for the new size. 7 | 8 | If compiled with -DUTMP, starting a new xterm should create a new utmp 9 | entry. ("who" will show this info.) Exiting xterm should remove the 10 | entry. Killing the xterm window (or other unnatural exit) should also 11 | remove the entry. When should entries be made in the wtmp file? 12 | 13 | Process group stuff should be correct. 14 | 15 | Should work without access to /dev/tty, say started from an xdm 16 | started from a boot-time script. 17 | 18 | If "xterm -help" offers the -C option, it should work. 19 | 20 | echo "test" > /dev/tty 21 | 22 | vi with lines that wrap. 23 | 24 | Exec'ing things other than shells. 25 | 26 | Another thing that has caused problems in the past is process groups, 27 | especially w.r.t. signal propagation to the child. 28 | 29 | Popup menu signals: running only a shell, click on "Send INT Signal." 30 | Do you get a new prompt from the shell? (Same as typing ^C at it.) 31 | 32 | Should scroll *fast* with jumpScroll enabled. 33 | 34 | While a mouse button is down tracing out a selection, output to the 35 | screen should be suspended. 36 | 37 | Selections more than one screen long. 38 | 39 | start xterm running only Tek widget: "xterm -t" 40 | 41 | 42 | Please add to this list if you find xterm failing in some way. 43 | -------------------------------------------------------------------------------- /xutf8.h: -------------------------------------------------------------------------------- 1 | /* 2 | * $XTermId: xutf8.h,v 1.4 2010/10/10 14:10:12 Jeremy.Huddleston Exp $ 3 | */ 4 | /* 5 | Copyright (c) 2001 by Juliusz Chroboczek 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy 8 | of this software and associated documentation files (the "Software"), to deal 9 | in the Software without restriction, including without limitation the rights 10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in 15 | all copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | THE SOFTWARE. 24 | */ 25 | 26 | #include 27 | 28 | #ifndef X_HAVE_UTF8_STRING 29 | 30 | #undef XA_UTF8_STRING 31 | Atom _xa_utf8_string(Display*); 32 | #define XA_UTF8_STRING(dpy) _xa_utf8_string(dpy) 33 | 34 | #undef XUTF8StringStyle 35 | #define XUTF8StringStyle 4 36 | 37 | int Xutf8TextPropertyToTextList( 38 | Display *, 39 | const XTextProperty *, 40 | char ***, 41 | int * 42 | ); 43 | int 44 | Xutf8TextListToTextProperty( 45 | Display *, 46 | char **, 47 | int, 48 | XICCEncodingStyle, 49 | XTextProperty * 50 | ); 51 | int Xutf8LookupString( 52 | XIC, 53 | XKeyPressedEvent *, 54 | char *, 55 | int, 56 | KeySym *, 57 | Status * 58 | ); 59 | #else 60 | void xutf8_dummy(void); 61 | #endif 62 | -------------------------------------------------------------------------------- /xterm.desktop: -------------------------------------------------------------------------------- 1 | # $XTermId: xterm.desktop,v 1.14 2012/06/24 22:20:29 tom Exp $ 2 | # ----------------------------------------------------------------------------- 3 | # this file is part of xterm 4 | # 5 | # Copyright 2006-2010,2012 by Thomas E. Dickey 6 | # 7 | # All Rights Reserved 8 | # 9 | # Permission is hereby granted, free of charge, to any person obtaining a 10 | # copy of this software and associated documentation files (the 11 | # "Software"), to deal in the Software without restriction, including 12 | # without limitation the rights to use, copy, modify, merge, publish, 13 | # distribute, sublicense, and/or sell copies of the Software, and to 14 | # permit persons to whom the Software is furnished to do so, subject to 15 | # the following conditions: 16 | # 17 | # The above copyright notice and this permission notice shall be included 18 | # in all copies or substantial portions of the Software. 19 | # 20 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 21 | # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 22 | # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 23 | # IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY 24 | # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 25 | # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 26 | # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 27 | # 28 | # Except as contained in this notice, the name(s) of the above copyright 29 | # holders shall not be used in advertising or otherwise to promote the 30 | # sale, use or other dealings in this Software without prior written 31 | # authorization. 32 | # ----------------------------------------------------------------------------- 33 | [Desktop Entry] 34 | Name=XTerm 35 | #GenericName=Terminal 36 | Comment=standard terminal emulator for the X window system 37 | Exec=xterm 38 | Terminal=false 39 | Type=Application 40 | Encoding=UTF-8 41 | Icon=xterm-color_48x48 42 | Categories=System;TerminalEmulator; 43 | -------------------------------------------------------------------------------- /uxterm.desktop: -------------------------------------------------------------------------------- 1 | # $XTermId: uxterm.desktop,v 1.13 2012/06/24 22:20:29 tom Exp $ 2 | # ----------------------------------------------------------------------------- 3 | # this file is part of xterm 4 | # 5 | # Copyright 2006-2010,2012 by Thomas E. Dickey 6 | # 7 | # All Rights Reserved 8 | # 9 | # Permission is hereby granted, free of charge, to any person obtaining a 10 | # copy of this software and associated documentation files (the 11 | # "Software"), to deal in the Software without restriction, including 12 | # without limitation the rights to use, copy, modify, merge, publish, 13 | # distribute, sublicense, and/or sell copies of the Software, and to 14 | # permit persons to whom the Software is furnished to do so, subject to 15 | # the following conditions: 16 | # 17 | # The above copyright notice and this permission notice shall be included 18 | # in all copies or substantial portions of the Software. 19 | # 20 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 21 | # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 22 | # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 23 | # IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY 24 | # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 25 | # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 26 | # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 27 | # 28 | # Except as contained in this notice, the name(s) of the above copyright 29 | # holders shall not be used in advertising or otherwise to promote the 30 | # sale, use or other dealings in this Software without prior written 31 | # authorization. 32 | # ----------------------------------------------------------------------------- 33 | [Desktop Entry] 34 | Name=UXTerm 35 | #GenericName=Terminal 36 | Comment=standard terminal emulator for the X window system 37 | Exec=uxterm 38 | Terminal=false 39 | Type=Application 40 | Encoding=UTF-8 41 | Icon=xterm-color_48x48 42 | Categories=System;TerminalEmulator; 43 | -------------------------------------------------------------------------------- /vttests/88colors.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | # $XTermId: 88colors.pl,v 1.3 1999/09/27 20:12:18 tom Exp $ 3 | # ----------------------------------------------------------------------------- 4 | # this file is part of xterm 5 | # 6 | # Copyright 1999 by Thomas E. Dickey 7 | # 8 | # All Rights Reserved 9 | # 10 | # Permission is hereby granted, free of charge, to any person obtaining a 11 | # copy of this software and associated documentation files (the 12 | # "Software"), to deal in the Software without restriction, including 13 | # without limitation the rights to use, copy, modify, merge, publish, 14 | # distribute, sublicense, and/or sell copies of the Software, and to 15 | # permit persons to whom the Software is furnished to do so, subject to 16 | # the following conditions: 17 | # 18 | # The above copyright notice and this permission notice shall be included 19 | # in all copies or substantial portions of the Software. 20 | # 21 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 22 | # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 23 | # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 24 | # IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY 25 | # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 26 | # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 27 | # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 28 | # 29 | # Except as contained in this notice, the name(s) of the above copyright 30 | # holders shall not be used in advertising or otherwise to promote the 31 | # sale, use or other dealings in this Software without prior written 32 | # authorization. 33 | # ----------------------------------------------------------------------------- 34 | # Made from 256colors.pl 35 | 36 | for ($bg = 0; $bg < 88; $bg++) { 37 | print "\x1b[9;1H\x1b[48;5;${bg}m\x1b[2J"; 38 | for ($fg = 0; $fg < 88; $fg++) { 39 | print "\x1b[38;5;${fg}m"; 40 | printf "%03.3d/%03.3d ", $fg, $bg; 41 | } 42 | sleep 1; 43 | print "\n"; 44 | } 45 | -------------------------------------------------------------------------------- /AAA_README_VMS.txt: -------------------------------------------------------------------------------- 1 | http://dickey.his.com/xterm/xterm.html 2 | 3 | Downloaded 1.22 variant (current Linux version) on 18-JAN-2000. 4 | 5 | Port stalled for a few days because OpenVMS X11 lacks XtGravity. 6 | 7 | X11KIT shared libraries almost work, but missing _XA_ symbols 8 | for some reason. 9 | 10 | Copied X11KIT [.xaw3d] and [.xmu] into [.lib], put together simplified 11 | build procedures. Made a few mods. Merged in some changes from 12 | Patrick Young. Now these build mostly ok except for tons of bcopy 13 | related warnings and problems with LAYOUT.C. 14 | 15 | Merged changes from Xterm021 into here. 16 | 17 | Made changes here and there to get it all to work. 18 | 19 | 25-JAN-2000, more or less done. Logging doesn't work but PRINT 20 | does, as does regular VT emulation, TEK emulation, 80 and 132 wide 21 | modes. The resource file needs work. Cleaned up a really nasty problem 22 | with infinite loops on copy/paste in button.c (see tt_pasting). 23 | 24 | To build this, if you have DECC, DW 1.2-5 and VMS 7.2-1 (the latter 25 | probably doesn't matter) do: 26 | 27 | $ @make 28 | 29 | in the top directory. Expect a bunch of I and W warnings, but nothing 30 | worse. Then define a foreign symbol for xterm for the resulting .exe. 31 | 32 | 26-JAN-2000. Enabled logging. When this is turned on from the menu 33 | it creates a new file SYS$SCRATCH:XTERM_LOG.TXT and writes everything that 34 | goes to the screen into it. This may slow down output a bit as each block 35 | of data read must be copied to disk. The log file has RMS format stream-lf 36 | and typically has a at the end of each line. 37 | 38 | 27-JAN-2000. Discovered a bug when doing an X11 paste into an EDT session, 39 | had to add a tt_start_read() in button.c after the paste to reenable the 40 | read AST. Rearranged code in VMS.C to make the compiler happy and 41 | eliminate warnings. 42 | 43 | David Mathog 44 | mathog@seqaxp.bio.caltech.edu 45 | Manager, sequence analysis facility, biology division, Caltech 46 | 47 | 48 | $XFree86: xc/programs/xterm/AAA_README_VMS.txt,v 1.2 2000/06/13 02:28:37 dawes Exp $ 49 | -------------------------------------------------------------------------------- /icons/xterm-color_16x16.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static char * xterm_color_16x16_xpm[] = { 3 | "16 16 80 1", 4 | ". c None", 5 | " c #555500", 6 | "+ c #545400", 7 | "@ c #3A3A00", 8 | "# c #222200", 9 | "$ c #2A2A00", 10 | "% c #2B2B00", 11 | "& c #151500", 12 | "* c #5E5E00", 13 | "= c #5A5A00", 14 | "- c #909098", 15 | "; c #3E3E3E", 16 | "> c #000000", 17 | ", c #F2F2F2", 18 | "' c #2E2E36", 19 | ") c #343400", 20 | "! c #4C0000", 21 | "~ c #140000", 22 | "{ c #7C0000", 23 | "] c #7F7F7F", 24 | "^ c #858588", 25 | "/ c #EA0000", 26 | "( c #0B0000", 27 | "_ c #460000", 28 | ": c #8E0000", 29 | "< c #A80000", 30 | "[ c #474747", 31 | "} c #868686", 32 | "| c #404548", 33 | "1 c #8F3400", 34 | "2 c #451200", 35 | "3 c #299000", 36 | "4 c #1F6C00", 37 | "5 c #192E48", 38 | "6 c #1B3448", 39 | "7 c #888888", 40 | "8 c #CF4C00", 41 | "9 c #3B0700", 42 | "0 c #39C700", 43 | "a c #42E800", 44 | "b c #2D5181", 45 | "c c #55A3E3", 46 | "d c #305C81", 47 | "e c #989898", 48 | "f c #D84F00", 49 | "g c #3A0600", 50 | "h c #258100", 51 | "i c #376599", 52 | "j c #396D99", 53 | "k c #7E7E7E", 54 | "l c #010100", 55 | "m c #000101", 56 | "n c #9A9A9A", 57 | "o c #101000", 58 | "p c #5B5B00", 59 | "q c #3D3D00", 60 | "r c #272700", 61 | "s c #2F2F00", 62 | "t c #303000", 63 | "u c #1A1A00", 64 | "v c #464636", 65 | "w c #7A7A7F", 66 | "x c #8B8B90", 67 | "y c #1B1B00", 68 | "z c #0F0F00", 69 | "A c #FFFFFF", 70 | "B c #5B5B5B", 71 | "C c #C9C9C9", 72 | "D c #BFBFBF", 73 | "E c #B5B5B5", 74 | "F c #5C5C5C", 75 | "G c #79797F", 76 | "H c #7F7F88", 77 | "I c #484835", 78 | "J c #3C3C00", 79 | "K c #1E1E00", 80 | "L c #909090", 81 | "M c #333336", 82 | "N c #464600", 83 | "O c #575700", 84 | ".+@#$$$$$$$$%&*+", 85 | ".=-;>>>>>>>>>,')", 86 | ".=>!~{>>>>>>>>]^", 87 | ".=>>/(>>>>>>>>]]", 88 | ".=>_:<>>>>>>>>]]", 89 | ".=>>>>>>>>>>>>]]", 90 | ".=>[}|12345>6>]]", 91 | ".=>>7>890abcd>]]", 92 | ".=>>e>fgh0i>j>k^", 93 | ".=>>>l>>>>>m>>no", 94 | ".=-;>>>>>>>>>,>p", 95 | ".+qrsssssssstu*.", 96 | ".pvwwwwwwwwwwxy.", 97 | "+zABABCDDDEAFG*.", 98 | "*HBABAEDDDCBAIJ.", 99 | "KL]]]]]]]]]]MNO."}; 100 | -------------------------------------------------------------------------------- /vttests/256colors.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | # $XTermId: 256colors.pl,v 1.4 2006/09/29 21:49:03 tom Exp $ 3 | # ----------------------------------------------------------------------------- 4 | # this file is part of xterm 5 | # 6 | # Copyright 1999,2006 by Thomas E. Dickey 7 | # 8 | # All Rights Reserved 9 | # 10 | # Permission is hereby granted, free of charge, to any person obtaining a 11 | # copy of this software and associated documentation files (the 12 | # "Software"), to deal in the Software without restriction, including 13 | # without limitation the rights to use, copy, modify, merge, publish, 14 | # distribute, sublicense, and/or sell copies of the Software, and to 15 | # permit persons to whom the Software is furnished to do so, subject to 16 | # the following conditions: 17 | # 18 | # The above copyright notice and this permission notice shall be included 19 | # in all copies or substantial portions of the Software. 20 | # 21 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 22 | # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 23 | # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 24 | # IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY 25 | # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 26 | # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 27 | # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 28 | # 29 | # Except as contained in this notice, the name(s) of the above copyright 30 | # holders shall not be used in advertising or otherwise to promote the 31 | # sale, use or other dealings in this Software without prior written 32 | # authorization. 33 | # ----------------------------------------------------------------------------- 34 | # 35 | # This uses 33 print-lines on an 80-column display. Printing the numbers in 36 | # hexadecimal would make it compact enough for 24x80, but less readable. 37 | 38 | for ($bg = 0; $bg < 256; $bg++) { 39 | # print "\x1b[9;1H\x1b[2J"; 40 | for ($fg = 0; $fg < 256; $fg++) { 41 | print "\x1b[48;5;${bg}m\x1b[38;5;${fg}m"; 42 | printf "%03.3d/%03.3d ", $fg, $bg; 43 | } 44 | print "\n"; 45 | sleep 1; 46 | } 47 | -------------------------------------------------------------------------------- /icons/mini.xterm_16x16.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static char * mini_xterm_16x16_xpm[] = { 3 | "16 16 84 1", 4 | " c None", 5 | ". c #FF3200", 6 | "+ c #FF3C00", 7 | "@ c #FF3F00", 8 | "# c #FF3B00", 9 | "$ c #FF3800", 10 | "% c #FF2000", 11 | "& c #FF1100", 12 | "* c #FF3D00", 13 | "= c #FF3900", 14 | "- c #FF2200", 15 | "; c #FF0A00", 16 | "> c #FF5D00", 17 | ", c #FF1300", 18 | "' c #FF0500", 19 | ") c #D0412F", 20 | "! c #DD6722", 21 | "~ c #DA3E25", 22 | "{ c #D84727", 23 | "] c #D03C2F", 24 | "^ c #0023F3", 25 | "/ c #000BF2", 26 | "( c #0E21E6", 27 | "_ c #4433B4", 28 | ": c #352EC3", 29 | "< c #0010F2", 30 | "[ c #0004F1", 31 | "} c #2C33CB", 32 | "| c #3E2ABA", 33 | "1 c #011EF3", 34 | "2 c #0012F3", 35 | "3 c #022DF5", 36 | "4 c #F2140D", 37 | "5 c #FF5E00", 38 | "6 c #052AF0", 39 | "7 c #0013F3", 40 | "8 c #DD4822", 41 | "9 c #002CF5", 42 | "0 c #004FF7", 43 | "a c #003AF6", 44 | "b c #1529E1", 45 | "c c #D83827", 46 | "d c #0037F7", 47 | "e c #004CF8", 48 | "f c #FF5900", 49 | "g c #182EDE", 50 | "h c #FF2100", 51 | "i c #152CE1", 52 | "j c #DD3B22", 53 | "k c #FF2300", 54 | "l c #FF2A00", 55 | "m c #0C28E9", 56 | "n c #E1571E", 57 | "o c #FF2E00", 58 | "p c #012AF4", 59 | "q c #E1661E", 60 | "r c #FF3600", 61 | "s c #FF3500", 62 | "t c #0028F4", 63 | "u c #0011F2", 64 | "v c #D64E29", 65 | "w c #FF5C00", 66 | "x c #FF2B00", 67 | "y c #FF1D00", 68 | "z c #FF2F00", 69 | "A c #000EF2", 70 | "B c #0003F1", 71 | "C c #8C4072", 72 | "D c #FF4C00", 73 | "E c #FF2D00", 74 | "F c #0360F6", 75 | "G c #0031F6", 76 | "H c #0016F3", 77 | "I c #0827EE", 78 | "J c #3D47BE", 79 | "K c #E5631A", 80 | "L c #FF4300", 81 | "M c #FF3E00", 82 | "N c #FF2400", 83 | "O c #FF0700", 84 | "P c #FF3400", 85 | "Q c #FF5700", 86 | "R c #FF5600", 87 | "S c #FF3700", 88 | " .+@#$% &$$*=- ", 89 | " ;>#, '+ ", 90 | " )!~ {] ", 91 | " ^/(_:<[}|1/2 ", 92 | " 2345=678 97 ", 93 | " 0a =>b7c de ", 94 | " fg7 ", 95 | " hg7 ", 96 | " $i7j ", 97 | " klm7no ", 98 | " # p7qr ", 99 | " sk tuvwx ", 100 | " yz ABCfDE ", 101 | " = FGHHIJKr ", 102 | " $LM$N O$PQRS- ", 103 | " "}; 104 | -------------------------------------------------------------------------------- /version.h: -------------------------------------------------------------------------------- 1 | /* $XTermId: version.h,v 1.360 2013/02/26 23:48:28 tom Exp $ */ 2 | 3 | /* 4 | * Copyright 1998-2012,2013 by Thomas E. Dickey 5 | * 6 | * All Rights Reserved 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a 9 | * copy of this software and associated documentation files (the 10 | * "Software"), to deal in the Software without restriction, including 11 | * without limitation the rights to use, copy, modify, merge, publish, 12 | * distribute, sublicense, and/or sell copies of the Software, and to 13 | * permit persons to whom the Software is furnished to do so, subject to 14 | * the following conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be included 17 | * in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | * IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY 23 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | * 27 | * Except as contained in this notice, the name(s) of the above copyright 28 | * holders shall not be used in advertising or otherwise to promote the 29 | * sale, use or other dealings in this Software without prior written 30 | * authorization. 31 | */ 32 | 33 | #ifndef included_version_h 34 | #define included_version_h 35 | /* 36 | * These definitions are used to build the string that's printed in response to 37 | * "xterm -version", or embedded in "xterm -help". It usually indicates the 38 | * version of X to which this version of xterm has been built. The resulting 39 | * number in parentheses is my patch number (Thomas E. Dickey). 40 | */ 41 | #define XTERM_PATCH 291 42 | #define XTERM_DATE 2013-02-26 43 | 44 | #ifndef __vendorversion__ 45 | #define __vendorversion__ "XTerm" 46 | #endif 47 | 48 | extern char *xtermVersion(void); 49 | 50 | #endif /* included_version_h */ 51 | -------------------------------------------------------------------------------- /plink.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # $XTermId: plink.sh,v 1.7 2010/11/28 23:55:35 tom Exp $ 3 | # ----------------------------------------------------------------------------- 4 | # this file is part of xterm 5 | # 6 | # Copyright 2001-2005,2010 by Thomas E. Dickey 7 | # 8 | # All Rights Reserved 9 | # 10 | # Permission is hereby granted, free of charge, to any person obtaining a 11 | # copy of this software and associated documentation files (the 12 | # "Software"), to deal in the Software without restriction, including 13 | # without limitation the rights to use, copy, modify, merge, publish, 14 | # distribute, sublicense, and/or sell copies of the Software, and to 15 | # permit persons to whom the Software is furnished to do so, subject to 16 | # the following conditions: 17 | # 18 | # The above copyright notice and this permission notice shall be included 19 | # in all copies or substantial portions of the Software. 20 | # 21 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 22 | # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 23 | # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 24 | # IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY 25 | # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 26 | # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 27 | # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 28 | # 29 | # Except as contained in this notice, the name(s) of the above copyright 30 | # holders shall not be used in advertising or otherwise to promote the 31 | # sale, use or other dealings in this Software without prior written 32 | # authorization. 33 | # ----------------------------------------------------------------------------- 34 | # 35 | # Reduce the number of dynamic libraries used to link an executable. 36 | LINKIT= 37 | while test $# != 0 38 | do 39 | OPT="$1" 40 | shift 41 | case $OPT in 42 | -k*) 43 | OPT=`echo "$OPT" | sed -e 's/^-k/-l/'` 44 | LINKIT="$LINKIT $OPT" 45 | ;; 46 | -l*) 47 | echo "testing if $OPT is needed" 48 | if ( eval $LINKIT $* >/dev/null 2>/dev/null ) 49 | then 50 | : echo ...no 51 | else 52 | echo ...yes 53 | LINKIT="$LINKIT $OPT" 54 | fi 55 | ;; 56 | *) 57 | LINKIT="$LINKIT $OPT" 58 | ;; 59 | esac 60 | done 61 | eval $LINKIT 62 | -------------------------------------------------------------------------------- /make.com: -------------------------------------------------------------------------------- 1 | $! make.com 2 | $! 25-JAN-2000, David Mathog 3 | $! builds xaw3d, xmu, and then xterm. 4 | $! 5 | $! $XFree86: xc/programs/xterm/make.com,v 1.1 2000/02/08 17:19:37 dawes Exp $ 6 | $! 7 | $!************************************************************ 8 | $! 9 | $! set up logicals for XAW, XMU and so forth 10 | $! 11 | $ define x11_directory decw$include 12 | $ thisfile = f$environment("PROCEDURE") 13 | $ thisis = f$parse(thisfile,,,"DEVICE") + f$parse(thisfile,,,"DIRECTORY") 14 | $ thisis = thisis - "]" 15 | $ define xaw_directory "''thisis'.lib.xaw3d]" 16 | $ define xmu_directory "''thisis'.lib.xmu]" 17 | $ define bitmap_directory "''thisis'.lib.bitmaps]" 18 | $ define/trans=(concealed) thisX11 "''thisis.lib.]" 19 | $ define X11 thisx11,decw$include 20 | $! 21 | $! note, ansi doesn't work with this variant of X11R5. 22 | $! 23 | $! don't build libs in debug mode 24 | $ if(P1 .eqs. "" .AND. P2 .eqs. "") 25 | $ then 26 | $! 27 | $! build XMU 28 | $! 29 | $ set ver 30 | $ set def [.lib.xmu] 31 | $ @make 32 | $! 33 | $! build XAW3D 34 | $! 35 | $ set def [-.xaw3d] 36 | $ @make 37 | $ set def [--] 38 | $ set nover 39 | $! 40 | $! move the two libraries to this level 41 | $! 42 | $ rename [.lib...]*.olb [] 43 | $ endif 44 | $! 45 | $ if(P1 .nes. "") 46 | $ then 47 | $ ccstub := cc/standard=vaxc/include=[]/debug/noopt 48 | $ mylink :== link/debug 49 | $ else 50 | $ ccstub := cc/standard=vaxc/include=[] 51 | $ mylink :== link 52 | $ endif 53 | $ mycc :== 'ccstub' - 54 | /define=(VMS,OPT_TEK4014,ALLOWLOGGING,OPT_NUM_LOCK) 55 | $! 56 | $! OPT_TOOLBAR doesn't work - it pulls in calls through Xaw3d and Xmu for 57 | $! XSHAPECOMBINEMASK and XSHAPEQUERYEXTENSION 58 | $! which seem not to exist in DW MOtif 1.2-5 59 | $! 60 | $! 61 | $ set ver 62 | $ mycc BUTTON.C 63 | $ mycc CHARPROC.C 64 | $ mycc CHARSETS.C 65 | $ mycc CURSOR.C 66 | $ mycc DATA.C 67 | $ mycc DOUBLECHR.C 68 | $ mycc FONTUTILS.C 69 | $ mycc INPUT.C 70 | $ mycc KEYSYM2UCS.C 71 | $ mycc MAIN.C 72 | $ mycc MENU.C 73 | $ mycc MISC.C 74 | $ mycc PRINT.C 75 | $ mycc PTYDATA.C 76 | $! mycc RESIZE.C 77 | $ mycc SCREEN.C 78 | $ mycc SCROLLBAR.C 79 | $ mycc TABS.C 80 | $ mycc TEKPROC.C 81 | $ mycc TEKPRSTBL.C 82 | $ mycc TRACE.C 83 | $ mycc TTYSVR.C 84 | $ mycc UTIL.C 85 | $ mycc VMS.C 86 | $ mycc VTPRSTBL.C 87 | $! 88 | $ mylink/exe=xterm.exe xterm_axp.opt/option 89 | $ set nover 90 | $ exit 91 | -------------------------------------------------------------------------------- /run-tic.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # $XTermId: run-tic.sh,v 1.4 2007/06/17 15:30:03 tom Exp $ 3 | # ----------------------------------------------------------------------------- 4 | # this file is part of xterm 5 | # 6 | # Copyright 2006,2007 by Thomas E. Dickey 7 | # 8 | # All Rights Reserved 9 | # 10 | # Permission is hereby granted, free of charge, to any person obtaining a 11 | # copy of this software and associated documentation files (the 12 | # "Software"), to deal in the Software without restriction, including 13 | # without limitation the rights to use, copy, modify, merge, publish, 14 | # distribute, sublicense, and/or sell copies of the Software, and to 15 | # permit persons to whom the Software is furnished to do so, subject to 16 | # the following conditions: 17 | # 18 | # The above copyright notice and this permission notice shall be included 19 | # in all copies or substantial portions of the Software. 20 | # 21 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 22 | # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 23 | # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 24 | # IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY 25 | # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 26 | # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 27 | # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 28 | # 29 | # Except as contained in this notice, the name(s) of the above copyright 30 | # holders shall not be used in advertising or otherwise to promote the 31 | # sale, use or other dealings in this Software without prior written 32 | # authorization. 33 | # ----------------------------------------------------------------------------- 34 | # 35 | # Run tic, either using ncurses' extension feature or filtering out harmless 36 | # messages for the extensions which are otherwise ignored by other versions of 37 | # tic. 38 | 39 | TMP=run-tic$$.log 40 | VER=`tic -V 2>/dev/null` 41 | OPT= 42 | 43 | case .$VER in 44 | .ncurses*) 45 | OPT="-x" 46 | ;; 47 | esac 48 | 49 | echo "** tic $OPT" "$@" 50 | tic $OPT "$@" 2>$TMP 51 | RET=$? 52 | 53 | fgrep -v 'Unknown Capability' $TMP | \ 54 | fgrep -v 'Capability is not recognized:' | \ 55 | fgrep -v 'tic: Warning near line ' >&2 56 | rm -f $TMP 57 | 58 | exit $RET 59 | -------------------------------------------------------------------------------- /icons/xterm-color_32x32.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static char * xterm_color_32x32_xpm[] = { 3 | "32 32 60 1", 4 | ". c None", 5 | " c #FFFFFF", 6 | "+ c #000000", 7 | "@ c #EFEFEF", 8 | "# c #FEFEFE", 9 | "$ c #FBFBFB", 10 | "% c #F3F3F3", 11 | "& c #ADADAD", 12 | "* c #909090", 13 | "= c #737373", 14 | "- c #D2D2D2", 15 | "; c #646464", 16 | "> c #9A9A9A", 17 | ", c #8D8D8D", 18 | "' c #D3D3D3", 19 | ") c #0E0E0E", 20 | "! c #F6F6F6", 21 | "~ c #5E5E5E", 22 | "{ c #B1B1B1", 23 | "] c #777777", 24 | "^ c #949494", 25 | "/ c #757575", 26 | "( c #C4C4C4", 27 | "_ c #E7E7E7", 28 | ": c #F1F1F1", 29 | "< c #F8F8F8", 30 | "[ c #EEEEEE", 31 | "} c #F0F0F0", 32 | "| c #FAFAFA", 33 | "1 c #7B7B7B", 34 | "2 c #3D3D3D", 35 | "3 c #868686", 36 | "4 c #4F4F4F", 37 | "5 c #ABABAB", 38 | "6 c #545454", 39 | "7 c #5B5B5B", 40 | "8 c #AFAFAF", 41 | "9 c #292929", 42 | "0 c #181818", 43 | "a c #C7C7C7", 44 | "b c #CFCFCF", 45 | "c c #7F7F7F", 46 | "d c #A3A3A3", 47 | "e c #4D4D4D", 48 | "f c #6A6A6A", 49 | "g c #A1A1A1", 50 | "h c #8E8E8E", 51 | "i c #696969", 52 | "j c #474747", 53 | "k c #5A5A5A", 54 | "l c #959595", 55 | "m c #767676", 56 | "n c #8B8B8B", 57 | "o c #BCBCBC", 58 | "p c #BFBFBF", 59 | "q c #D7D7D7", 60 | "r c #404040", 61 | "s c #636363", 62 | "t c #989898", 63 | "u c #8A8A8A", 64 | "................................", 65 | ".....+++++++++++++++++++++++....", 66 | "....+..+++++++++++++++++++..++..", 67 | "....+.+...................+.+.+.", 68 | "....++.@#.$%................+..+", 69 | "....++.&*.=-................+..+", 70 | "....++..;>,.................+..+", 71 | "....++..')!.................+..+", 72 | "....++.#~{].................+..+", 73 | "....++.^{./(................+..+", 74 | "....++......................+..+", 75 | "....++......................+..+", 76 | "....++.____:___<_[..<}..[|..+..+", 77 | "....++.1;21341156]7.89$:0a..+..+", 78 | "....++..bc.8^__8d.e.8fghia..+..+", 79 | "....++..bc.84115jkl.887mna..+..+", 80 | "....++..bc.8d..8dof.88pqna..+..+", 81 | "....++..bc.8rss5d.tu88..na..+...", 82 | "....++......................+.+.", 83 | "....++......................+.+.", 84 | "....+.+...................+.++..", 85 | "....+..+++++++++++++++++++..+...", 86 | ".....+++++++++++++++++++++++....", 87 | "................................", 88 | ".....++++++++++++++++++++++++...", 89 | "....+.......................+...", 90 | "...+.......................+....", 91 | "...+..++..++.++..++..+..++.+....", 92 | "....++..++..+..++..++.++........", 93 | "..+.......................+.+...", 94 | ".+.......................+......", 95 | ".++++++++++++++++++++++++++....."}; 96 | -------------------------------------------------------------------------------- /Tekparse.def: -------------------------------------------------------------------------------- 1 | # $XTermId: Tekparse.def,v 1.4 2006/02/12 22:43:56 tom Exp $ 2 | # 3 | # vile:confmode rs=lf 4 | # ----------------------------------------------------------------------------- 5 | # this file is part of xterm 6 | # 7 | # Copyright 2002,2006 by Thomas E. Dickey 8 | # 9 | # All Rights Reserved 10 | # 11 | # Permission is hereby granted, free of charge, to any person obtaining a 12 | # copy of this software and associated documentation files (the 13 | # "Software"), to deal in the Software without restriction, including 14 | # without limitation the rights to use, copy, modify, merge, publish, 15 | # distribute, sublicense, and/or sell copies of the Software, and to 16 | # permit persons to whom the Software is furnished to do so, subject to 17 | # the following conditions: 18 | # 19 | # The above copyright notice and this permission notice shall be included 20 | # in all copies or substantial portions of the Software. 21 | # 22 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 23 | # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 24 | # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 25 | # IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY 26 | # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 27 | # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 28 | # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 29 | # 30 | # Except as contained in this notice, the name(s) of the above copyright 31 | # holders shall not be used in advertising or otherwise to promote the 32 | # sale, use or other dealings in this Software without prior written 33 | # authorization. 34 | # ----------------------------------------------------------------------------- 35 | # 36 | # List of symbols that need to be defined for Tekparse.h. If you need to 37 | # change any of the CASE_ macros, make the change here and rerun the command 38 | # shown in Tekparse.h. 39 | # 40 | 41 | CASE_REPORT 42 | CASE_VT_MODE 43 | CASE_SPT_STATE 44 | CASE_GIN 45 | CASE_BEL 46 | CASE_BS 47 | CASE_PT_STATE 48 | CASE_PLT_STATE 49 | CASE_TAB 50 | CASE_IPL_STATE 51 | CASE_ALP_STATE 52 | CASE_UP 53 | CASE_COPY 54 | CASE_PAGE 55 | CASE_BES_STATE 56 | CASE_BYP_STATE 57 | CASE_IGNORE 58 | CASE_ASCII 59 | CASE_APL 60 | CASE_CHAR_SIZE 61 | CASE_BEAM_VEC 62 | CASE_CURSTATE 63 | CASE_PENUP 64 | CASE_PENDOWN 65 | CASE_IPL_POINT 66 | CASE_PLT_VEC 67 | CASE_PT_POINT 68 | CASE_SPT_POINT 69 | CASE_CR 70 | CASE_ESC_STATE 71 | CASE_LF 72 | CASE_SP 73 | CASE_PRINT 74 | CASE_OSC 75 | -------------------------------------------------------------------------------- /KOI8RXTerm.ad: -------------------------------------------------------------------------------- 1 | ! $XTermId: KOI8RXTerm.ad,v 1.4 2010/03/04 01:17:49 tom Exp $ 2 | ! ----------------------------------------------------------------------------- 3 | ! this file is part of xterm 4 | ! 5 | ! Copyright 2007,2010 by Thomas E. Dickey 6 | ! 7 | ! All Rights Reserved 8 | ! 9 | ! Permission is hereby granted, free of charge, to any person obtaining a 10 | ! copy of this software and associated documentation files (the 11 | ! "Software"), to deal in the Software without restriction, including 12 | ! without limitation the rights to use, copy, modify, merge, publish, 13 | ! distribute, sublicense, and/or sell copies of the Software, and to 14 | ! permit persons to whom the Software is furnished to do so, subject to 15 | ! the following conditions: 16 | ! 17 | ! The above copyright notice and this permission notice shall be included 18 | ! in all copies or substantial portions of the Software. 19 | ! 20 | ! THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 21 | ! OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 22 | ! MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 23 | ! IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY 24 | ! CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 25 | ! TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 26 | ! SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 27 | ! 28 | ! Except as contained in this notice, the name(s) of the above copyright 29 | ! holders shall not be used in advertising or otherwise to promote the 30 | ! sale, use or other dealings in this Software without prior written 31 | ! authorization. 32 | ! ----------------------------------------------------------------------------- 33 | ! This is based on the UXTerm app-defaults file. 34 | ! ----------------------------------------------------------------------------- 35 | ! Use 36 | ! xterm -class KOI8RXTerm 37 | ! to set resources for KOI8-R mode with corresponding fonts. 38 | 39 | #include "XTerm" 40 | 41 | *fontMenu.Label: KOI8-R Fonts 42 | *VT100*allowC1Printable: true 43 | 44 | ! Use Cyrillic instead of Latin fonts. 45 | *VT100.font: -misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-koi8-r 46 | *VT100.font2: -misc-fixed-medium-r-normal--8-80-75-75-c-50-koi8-r 47 | *VT100.font3: -misc-fixed-medium-r-normal--14-130-75-75-c-70-koi8-r 48 | *VT100.font4: -misc-fixed-medium-r-normal--13-120-75-75-c-80-koi8-r 49 | *VT100.font5: -misc-fixed-medium-r-normal--18-120-100-100-c-90-koi8-r 50 | *VT100.font6: -misc-fixed-medium-r-normal--20-200-75-75-c-100-koi8-r 51 | -------------------------------------------------------------------------------- /icons/xterm_48x48.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static char * xterm_48x48_xpm[] = { 3 | "48 48 2 1", 4 | " c None", 5 | ". c #000000", 6 | " ", 7 | " .................................. ", 8 | " . .. ", 9 | " . ............................ . . ", 10 | " . . . . . ", 11 | " . . . . . ", 12 | " . . . . . ", 13 | " . . ... ... . . . ", 14 | " . . . . . . . ", 15 | " . . . . . . . ", 16 | " . . . . . . . ", 17 | " . . .. . . . ", 18 | " . . .. . . . ", 19 | " . . . . . . . ", 20 | " . . . . . . . ", 21 | " . . . . . . . ", 22 | " . . ... ... . . . ", 23 | " . . . . . ", 24 | " . . . . . ", 25 | " . . . . . ", 26 | " . . . . . ", 27 | " . . ..... ..... .... . . . . . ", 28 | " . . . . . . .. .. . . . ", 29 | " . . . . . . .. .. . . . ", 30 | " . . . ..... .... . . . . . . . ", 31 | " . . . . . . . ... . . . .. ", 32 | " . . . . . . . . . . . . ", 33 | " . . . ..... . . . . . . .. ", 34 | " . . . . . ", 35 | " . . . . .. ", 36 | " . . . . . ", 37 | " . ............................ ... ", 38 | " . .. ", 39 | " .................................. ", 40 | " ", 41 | " ", 42 | " .................................... ", 43 | " . .. ", 44 | " . . . . . . . . . . . . . . . . . ... ", 45 | " . . . ", 46 | " . . . . . . . . . . . . . . . . . .. . ", 47 | " . . . ", 48 | " .. . . . . . . . . . . . . . . . . .. . ", 49 | " . . . ", 50 | " .. .. .......................... .... . ", 51 | " . . . ", 52 | " ..................................... ", 53 | " "}; 54 | -------------------------------------------------------------------------------- /icons/terminal_48x48.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static char * terminal_48x48_xpm[] = { 3 | "48 48 2 1", 4 | " c #000000", 5 | ". c #FFFFFF", 6 | "................................................", 7 | "...... ........", 8 | "..... .................................. ......", 9 | "..... ... ... . .....", 10 | "..... .. ............................ .. .. ....", 11 | "..... . .............................. . ... ...", 12 | "..... . .............................. . .... ..", 13 | "..... . .............................. . .... ..", 14 | "..... . .............................. . .... ..", 15 | "..... . .............................. . .... ..", 16 | "..... . .............................. . .... ..", 17 | "..... . .............................. . .... ..", 18 | "..... . .............................. . .... ..", 19 | "..... . .............................. . .... ..", 20 | "..... . .............................. . .... ..", 21 | "..... . .............................. . .... ..", 22 | "..... . .............................. . .... ..", 23 | "..... . .............................. . .... ..", 24 | "..... . .............................. . .... ..", 25 | "..... . .............................. . .... ..", 26 | "..... . .............................. . .... ..", 27 | "..... . .............................. . .... ..", 28 | "..... . .............................. . .... ..", 29 | "..... . .............................. . .... ..", 30 | "..... . .............................. . .... ..", 31 | "..... . .............................. . ... ...", 32 | "..... . .............................. . ... ...", 33 | "..... . .............................. . .. ....", 34 | "..... . .............................. . .. ....", 35 | "..... . .............................. . . .....", 36 | "..... .. ............................ .. . .....", 37 | "..... ... ... ......", 38 | "..... .................................. ......", 39 | "...... ........", 40 | "................................................", 41 | "................................................", 42 | "...... ......", 43 | "..... .................................. ......", 44 | "..... . . . . . . . . . . . . . . . . .. ......", 45 | ".... .................................. . ......", 46 | ".... . . . . . . . . . . . . . . . . .. . ......", 47 | "... .................................. .. ......", 48 | "... . . . . . . . . . . . . . . . . .. .. ......", 49 | ".. .................................. .. .......", 50 | ".. . . . . . ........", 51 | ". .................................. . .........", 52 | ". ..........", 53 | "................................................"}; 54 | -------------------------------------------------------------------------------- /version.c: -------------------------------------------------------------------------------- 1 | /* $XTermId: version.c,v 1.1 2013/01/01 12:10:44 tom Exp $ */ 2 | 3 | /* 4 | * Copyright 2013 by Thomas E. Dickey 5 | * 6 | * All Rights Reserved 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a 9 | * copy of this software and associated documentation files (the 10 | * "Software"), to deal in the Software without restriction, including 11 | * without limitation the rights to use, copy, modify, merge, publish, 12 | * distribute, sublicense, and/or sell copies of the Software, and to 13 | * permit persons to whom the Software is furnished to do so, subject to 14 | * the following conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be included 17 | * in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | * IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY 23 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | * 27 | * Except as contained in this notice, the name(s) of the above copyright 28 | * holders shall not be used in advertising or otherwise to promote the 29 | * sale, use or other dealings in this Software without prior written 30 | * authorization. 31 | */ 32 | 33 | #include 34 | #include 35 | #include 36 | 37 | /* 38 | * Returns the version-string used in the "-v' message as well as a few other 39 | * places. It is derived (when possible) from the __vendorversion__ symbol 40 | * that some newer imake configurations define. 41 | */ 42 | char * 43 | xtermVersion(void) 44 | { 45 | static char vendor_version[] = __vendorversion__; 46 | static char *result; 47 | 48 | if (result == 0) { 49 | char *vendor = vendor_version; 50 | char first[BUFSIZ]; 51 | char second[BUFSIZ]; 52 | 53 | result = CastMallocN(char, strlen(vendor) + 9); 54 | if (result == 0) 55 | result = vendor; 56 | else { 57 | /* some vendors leave trash in this string */ 58 | for (;;) { 59 | if (!strncmp(vendor, "Version ", (size_t) 8)) 60 | vendor += 8; 61 | else if (isspace(CharOf(*vendor))) 62 | ++vendor; 63 | else 64 | break; 65 | } 66 | if (strlen(vendor) < BUFSIZ && 67 | sscanf(vendor, "%[0-9.] %[A-Za-z_0-9.]", first, second) == 2) 68 | sprintf(result, "%s %s(%d)", second, first, XTERM_PATCH); 69 | else 70 | sprintf(result, "%s(%d)", vendor, XTERM_PATCH); 71 | } 72 | } 73 | return result; 74 | } 75 | -------------------------------------------------------------------------------- /package/freebsd/Makefile: -------------------------------------------------------------------------------- 1 | # $FreeBSD$ 2 | # This is adapted from the FreeBSD port, installing as "xterm-dev" with 3 | # separate resource- and manpage files. 4 | # copy "xterm-${PORTVERSION}.tgz to the port's distfiles directory 5 | # and "make makesum". 6 | 7 | PORTNAME= xterm 8 | PORTVERSION= 291 9 | CATEGORIES= x11 10 | MASTER_SITES= ftp://invisible-island.net/xterm/ \ 11 | CRITICAL 12 | PKGNAMESUFFIX= -dev 13 | EXTRACT_SUFX= .tgz 14 | 15 | MAINTAINER= dickey@invisible-island.net 16 | COMMENT= Terminal emulator for the X Window System (development) 17 | 18 | CONFLICTS= x11iraf-[0-9]* 19 | 20 | USE_XORG= xaw xft 21 | WANT_GNOME= desktopfileutils 22 | GNU_CONFIGURE= yes 23 | 24 | CONFIGURE_ENV+= LIBS="-L${LOCALBASE}/lib" 25 | CONFIGURE_ARGS+= --with-utempter --enable-narrowproto --enable-256-color 26 | 27 | CPPFLAGS+= -I${LOCALBASE}/include 28 | 29 | OPTIONS_DEFINE= WCHAR LUIT DECTERM PCRE GNOME DABBREV TOOLBAR 30 | 31 | TOOLBAR_DESC= Enable support menu/toolbar 32 | DABBREV_DESC= Enable support for dabbrev-expand 33 | DECTERM_DESC= Enable DECterm Locator support 34 | LUIT_DESC= Use LUIT for locale convertion from/to UTF-8 35 | WCHAR_DESC= Enable wide-character support 36 | 37 | PKG_CLASS= XTermDev 38 | 39 | .include 40 | 41 | CONFIGURE_ARGS+= --program-suffix=${PKGNAMESUFFIX} --with-app-class=${PKG_CLASS} --without-xterm-symlink 42 | 43 | .if ${PORT_OPTIONS:MLUIT} 44 | CONFIGURE_ARGS+= --enable-luit 45 | BUILD_DEPENDS= luit:${PORTSDIR}/x11/luit 46 | .endif 47 | 48 | .if ${PORT_OPTIONS:MWCHAR} 49 | CONFIGURE_ARGS+= --enable-wide-chars 50 | .endif 51 | 52 | .if ${PORT_OPTIONS:MDECTERM} 53 | CONFIGURE_ARGS+= --enable-dec-locator 54 | .endif 55 | 56 | .if ${PORT_OPTIONS:MPCRE} 57 | CONFIGURE_ARGS+= --with-pcre 58 | LIB_DEPENDS= pcre:${PORTSDIR}/devel/pcre 59 | .endif 60 | 61 | .if ${PORT_OPTIONS:MDABBREV} 62 | CONFIGURE_ARGS+= --enable-dabbrev 63 | .endif 64 | 65 | .if ${PORT_OPTIONS:MTOOLBAR} 66 | CONFIGURE_ARGS+= --enable-toolbar 67 | .endif 68 | 69 | .if ${PORT_OPTIONS:MGNOME} 70 | USE_GNOME= desktopfileutils 71 | PLIST_SUB+= GNOME="" 72 | .else 73 | PLIST_SUB+= GNOME="@comment " 74 | .endif 75 | 76 | MAN1= resize${PKGNAMESUFFIX}.1 koi8rxterm${PKGNAMESUFFIX}.1 uxterm${PKGNAMESUFFIX}.1 xterm${PKGNAMESUFFIX}.1 77 | 78 | .include 79 | 80 | .if ${OSVERSION} < 900004 81 | LIB_DEPENDS+= utempter:${PORTSDIR}/sysutils/libutempter 82 | .endif 83 | 84 | post-install: 85 | .for f in koi8rxterm resize uxterm xterm 86 | @${CHMOD} ${BINMODE} ${PREFIX}/bin/${f} 87 | .endfor 88 | .if ${PORT_OPTIONS:MGNOME} 89 | @${MKDIR} ${PREFIX}/share/applications/ 90 | @${INSTALL_DATA} ${WRKSRC}/xterm.desktop ${PREFIX}/share/applications/ 91 | @-update-desktop-database 92 | .endif 93 | 94 | .if ${PORT_OPTIONS:MWCHAR} 95 | @${CAT} ${PKGMESSAGE} 96 | .endif 97 | 98 | .include 99 | -------------------------------------------------------------------------------- /icons/xterm-color_48x48.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static char * xterm_color_48x48_xpm[] = { 3 | "48 48 10 1", 4 | ". c None", 5 | " c #555500", 6 | "+ c #000000", 7 | "@ c #FFFFFF", 8 | "# c #FF0000", 9 | "$ c #070700", 10 | "% c #0B0B00", 11 | "& c #FF8400", 12 | "* c #49FF00", 13 | "= c #60B7FF", 14 | "................................................", 15 | "......++++++++++++++++++++++++++++++++++........", 16 | ".....+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@++......", 17 | ".....+@@@++++++++++++++++++++++++++++@@@+@+.....", 18 | ".....+@@++++++++++++++++++++++++++++++@@+@@+....", 19 | ".....+@++++++++++++++++++++++++++++++++@+@@@+...", 20 | ".....+@++###++++###++++++++++++++++++++@+@@@@+..", 21 | ".....+@+++##++++##+++++++++++++++++++++@+@@@@+..", 22 | ".....+@++++##++##++++++++++++++++++++++@+@@@@+..", 23 | ".....+@++++##++##++++++++++++++++++++++@+@@@@+..", 24 | ".....+@+++++####+++++++++++++++++++++++@+@@@@+..", 25 | ".....+@+++++####+++++++++++++++++++++++@+@@@@+..", 26 | ".....+@++++++##++++++++++++++++++++++++@+@@@@+..", 27 | ".....+@+++++####+++++++++++++++++++++++@+@@@@+..", 28 | ".....+@+++++####+++++++++++++++++++++++@+@@@@+..", 29 | ".....+@++++##++##++++++++++++++++++++++@+@@@@+..", 30 | ".....+@++++##++##++++++++++++++++++++++@+@@@@+..", 31 | ".....+@+++##++++##+++++++++++++++++++++@+@@@@+..", 32 | ".....+@++###++++###++++++++++++++++++++@+@@@@+..", 33 | ".....+@++++++++++++++++++++++++++++++++@+@@@@+..", 34 | ".....+@$+++++++++++++++++++++++++++++++@+@@@@+..", 35 | ".....+@%@@@@@@@+&&&&&++****+++==+++==++@+@@@@+..", 36 | ".....+@++++@++++&++++++*+++*++==+++==++@+@@@@+..", 37 | ".....+@++++@++++&++++++*+++*++=+=+=+=++@+@@@@+..", 38 | ".....+@++++@++++&&&&+++****+++=+=+=+=++@+@@@@+..", 39 | ".....+@++++@++++&++++++*+*++++=++=++=++@+@@@+...", 40 | ".....+@++++@++++&++++++*++*+++=++=++=++@+@@@+...", 41 | ".....+@++++@++++&&&&&++*+++*++=+++++=++@+@@+....", 42 | ".....+@++++++++++++++++++++++++++++++++@+@@+....", 43 | ".....+@++++++++++++++++++++++++++++++++@+@+.....", 44 | ".....+@@++++++++++++++++++++++++++++++@@+@+.....", 45 | ".....+@@@++++++++++++++++++++++++++++@@@++......", 46 | ".....+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@++......", 47 | "......++++++++++++++++++++++++++++++++++........", 48 | "................................................", 49 | "................................................", 50 | "......++++++++++++++++++++++++++++++++++++......", 51 | ".....+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@++......", 52 | ".....+@+@+@+@+@+@+@+@+@+@+@+@+@+@+@+@+@@++......", 53 | "....+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@+@+......", 54 | "....+@+@+@+@+@+@+@+@+@+@+@+@+@+@+@+@+@@+@+......", 55 | "...+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@+@@+......", 56 | "...+@+@+@+@+@+@+@+@+@+@+@+@+@+@+@+@+@@+@@+......", 57 | "..+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@+@@+.......", 58 | "..+@++@++++++++++++++++++++++++++@++@+@+........", 59 | ".+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@+@+.........", 60 | ".+++++++++++++++++++++++++++++++++++++..........", 61 | "................................................"}; 62 | -------------------------------------------------------------------------------- /vttests/fonts.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # $XTermId: fonts.sh,v 1.11 2011/12/11 16:21:22 tom Exp $ 3 | # ----------------------------------------------------------------------------- 4 | # this file is part of xterm 5 | # 6 | # Copyright 1999-2003,2011 by Thomas E. Dickey 7 | # 8 | # All Rights Reserved 9 | # 10 | # Permission is hereby granted, free of charge, to any person obtaining a 11 | # copy of this software and associated documentation files (the 12 | # "Software"), to deal in the Software without restriction, including 13 | # without limitation the rights to use, copy, modify, merge, publish, 14 | # distribute, sublicense, and/or sell copies of the Software, and to 15 | # permit persons to whom the Software is furnished to do so, subject to 16 | # the following conditions: 17 | # 18 | # The above copyright notice and this permission notice shall be included 19 | # in all copies or substantial portions of the Software. 20 | # 21 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 22 | # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 23 | # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 24 | # IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY 25 | # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 26 | # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 27 | # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 28 | # 29 | # Except as contained in this notice, the name(s) of the above copyright 30 | # holders shall not be used in advertising or otherwise to promote the 31 | # sale, use or other dealings in this Software without prior written 32 | # authorization. 33 | # ----------------------------------------------------------------------------- 34 | # Demonstrate the use of dynamic colors by setting the background successively 35 | # to different values. 36 | 37 | ESC="" 38 | CMD='/bin/echo' 39 | OPT='-n' 40 | SUF='' 41 | TMP=/tmp/xterm$$ 42 | eval '$CMD $OPT >$TMP || echo fail >$TMP' 2>/dev/null 43 | ( test ! -f $TMP || test -s $TMP ) && 44 | for verb in printf print ; do 45 | rm -f $TMP 46 | eval '$verb "\c" >$TMP || echo fail >$TMP' 2>/dev/null 47 | if test -f $TMP ; then 48 | if test ! -s $TMP ; then 49 | CMD="$verb" 50 | OPT= 51 | SUF='\c' 52 | break 53 | fi 54 | fi 55 | done 56 | rm -f $TMP 57 | 58 | exec /dev/tty 63 | read original 64 | 65 | stty $old 66 | original="${original}${SUF}" 67 | 68 | if ( trap "echo exit" EXIT 2>/dev/null ) >/dev/null 69 | then 70 | trap '$CMD $OPT "$original" >/dev/tty; exit' EXIT HUP INT TRAP TERM 71 | else 72 | trap '$CMD $OPT "$original" >/dev/tty; exit' 0 1 2 5 15 73 | fi 74 | 75 | F=1 76 | D=1 77 | T=6 78 | while true 79 | do 80 | $CMD $OPT "${ESC}]50;#$F${SUF}" >/dev/tty 81 | #sleep 1 82 | if test .$D = .1 ; then 83 | test $F = $T && D=-1 84 | else 85 | test $F = 1 && D=1 86 | fi 87 | F=`expr $F + $D` 88 | done 89 | -------------------------------------------------------------------------------- /vttests/dynamic.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # $XTermId: dynamic.sh,v 1.17 2011/12/11 16:21:22 tom Exp $ 3 | # ----------------------------------------------------------------------------- 4 | # this file is part of xterm 5 | # 6 | # Copyright 1999-2003,2011 by Thomas E. Dickey 7 | # 8 | # All Rights Reserved 9 | # 10 | # Permission is hereby granted, free of charge, to any person obtaining a 11 | # copy of this software and associated documentation files (the 12 | # "Software"), to deal in the Software without restriction, including 13 | # without limitation the rights to use, copy, modify, merge, publish, 14 | # distribute, sublicense, and/or sell copies of the Software, and to 15 | # permit persons to whom the Software is furnished to do so, subject to 16 | # the following conditions: 17 | # 18 | # The above copyright notice and this permission notice shall be included 19 | # in all copies or substantial portions of the Software. 20 | # 21 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 22 | # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 23 | # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 24 | # IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY 25 | # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 26 | # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 27 | # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 28 | # 29 | # Except as contained in this notice, the name(s) of the above copyright 30 | # holders shall not be used in advertising or otherwise to promote the 31 | # sale, use or other dealings in this Software without prior written 32 | # authorization. 33 | # ----------------------------------------------------------------------------- 34 | # Demonstrate the use of dynamic colors by setting the background successively 35 | # to different values. 36 | 37 | ESC="" 38 | CMD='/bin/echo' 39 | OPT='-n' 40 | SUF='' 41 | TMP=/tmp/xterm$$ 42 | eval '$CMD $OPT >$TMP || echo fail >$TMP' 2>/dev/null 43 | ( test ! -f $TMP || test -s $TMP ) && 44 | for verb in printf print ; do 45 | rm -f $TMP 46 | eval '$verb "\c" >$TMP || echo fail >$TMP' 2>/dev/null 47 | if test -f $TMP ; then 48 | if test ! -s $TMP ; then 49 | CMD="$verb" 50 | OPT= 51 | SUF='\c' 52 | break 53 | fi 54 | fi 55 | done 56 | rm -f $TMP 57 | 58 | LIST="00 30 80 d0 ff" 59 | 60 | exec /dev/tty 65 | read original 66 | stty $old 67 | original=${original}${SUF} 68 | 69 | if ( trap "echo exit" EXIT 2>/dev/null ) >/dev/null 70 | then 71 | trap '$CMD $OPT "$original" >/dev/tty; exit' EXIT HUP INT TRAP TERM 72 | else 73 | trap '$CMD $OPT "$original" >/dev/tty; exit' 0 1 2 5 15 74 | fi 75 | 76 | while true 77 | do 78 | for R in $LIST 79 | do 80 | for G in $LIST 81 | do 82 | for B in $LIST 83 | do 84 | $CMD $OPT "${ESC}]11;rgb:$R/$G/$B${SUF}" >/dev/tty 85 | sleep 1 86 | done 87 | done 88 | done 89 | done 90 | -------------------------------------------------------------------------------- /icons/filled-xterm_16x16.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static char * filled_xterm_16x16_xpm[] = { 3 | "16 16 110 2", 4 | " c None", 5 | ". c #BAA9A9", 6 | "+ c #C59C9C", 7 | "@ c #C49999", 8 | "# c #C6AAAA", 9 | "$ c #4D4242", 10 | "% c #F0E4E4", 11 | "& c #CEBABA", 12 | "* c #D5BEBE", 13 | "= c #C6B5B5", 14 | "- c #CEBEBE", 15 | "; c #796D6D", 16 | "> c #DEC5C5", 17 | ", c #B19B9B", 18 | "' c #C6B8B8", 19 | ") c #B19696", 20 | "! c #EBE5E5", 21 | "~ c #FFFFFF", 22 | "{ c #D6D6D6", 23 | "] c #D0BDBD", 24 | "^ c #FFF4F4", 25 | "/ c #FEFDFD", 26 | "( c #706969", 27 | "_ c #CCC3C3", 28 | ": c #FFF0F0", 29 | "< c #978989", 30 | "[ c #A9A5A5", 31 | "} c #A7A3A3", 32 | "| c #E3E1E1", 33 | "1 c #DACBCB", 34 | "2 c #DEDEDE", 35 | "3 c #FFF8F8", 36 | "4 c #FFF6F6", 37 | "5 c #FFFCFC", 38 | "6 c #FFFEFE", 39 | "7 c #D2D2D2", 40 | "8 c #9C9C9C", 41 | "9 c #9B8787", 42 | "0 c #B3A0A0", 43 | "a c #FFD5D5", 44 | "b c #D4C2C2", 45 | "c c #FFE7E7", 46 | "d c #7A6F6F", 47 | "e c #786F6F", 48 | "f c #C2C2C2", 49 | "g c #B4B4B4", 50 | "h c #FFE3E3", 51 | "i c #E1CECE", 52 | "j c #FED8D8", 53 | "k c #908888", 54 | "l c #878080", 55 | "m c #898383", 56 | "n c #F3ECEC", 57 | "o c #D8C2C2", 58 | "p c #FFFAFA", 59 | "q c #FFF2F2", 60 | "r c #FFF9F9", 61 | "s c #EFEFEF", 62 | "t c #FEFEFE", 63 | "u c #C8C3C3", 64 | "v c #D2BFBF", 65 | "w c #8A8383", 66 | "x c #FCE5E5", 67 | "y c #D9B6B6", 68 | "z c #DDBCBC", 69 | "A c #BCA0A0", 70 | "B c #F0D2D2", 71 | "C c #AB9C9C", 72 | "D c #000000", 73 | "E c #B0A2A2", 74 | "F c #AE9F9F", 75 | "G c #C6ABAB", 76 | "H c #B48E8E", 77 | "I c #C8ABAB", 78 | "J c #C39A9A", 79 | "K c #D0B2B2", 80 | "L c #C3A0A0", 81 | "M c #CFB2B2", 82 | "N c #C59999", 83 | "O c #CCC1C1", 84 | "P c #3C3535", 85 | "Q c #A39C9C", 86 | "R c #FAEDED", 87 | "S c #FEFCFC", 88 | "T c #F9F2F2", 89 | "U c #FEF7F7", 90 | "V c #FAEBEB", 91 | "W c #FEFAFA", 92 | "X c #F9F1F1", 93 | "Y c #FEF4F4", 94 | "Z c #FAEFEF", 95 | "` c #EBE0E0", 96 | " . c #DFB9B9", 97 | ".. c #E8E3E3", 98 | "+. c #BBB0B0", 99 | "@. c #BBA9A9", 100 | "#. c #CEC8C8", 101 | "$. c #BCADAD", 102 | "%. c #CDC8C8", 103 | "&. c #C78D8D", 104 | "*. c #E3B2B2", 105 | "=. c #E3BCBC", 106 | "-. c #BBAAAA", 107 | ";. c #746C6C", 108 | ">. c #858585", 109 | ",. c #8A7F7F", 110 | "'. c #977878", 111 | "). c #A38686", 112 | "!. c #A78686", 113 | "~. c #201717", 114 | " . + @ @ @ @ @ @ @ @ # $ ", 115 | " % & * * * * * * * * = - ; ", 116 | " > , ' ) ! ~ ~ ~ ~ ~ { ] ^ ", 117 | " > / ( _ ~ ~ ~ ~ ~ ~ { ] : ", 118 | " > ~ < [ ~ ~ ~ ~ ~ ~ { ] : ", 119 | " > } | 1 2 ~ ~ ~ ~ ~ { ] : ", 120 | " > ~ ~ 3 ~ 4 4 5 6 4 7 ] : ", 121 | " > 7 8 9 0 a b c d e f ] : ", 122 | " > ~ g h i j k c l m f ] n ", 123 | " o ~ ~ p ~ q 6 r s t u v w ", 124 | " x y z z z z z z A z B C ", 125 | " D ", 126 | " E F G H I J K L M N O P ", 127 | " Q R S T U V W X Y Z U ` Q ", 128 | " ...+._ @.#.$.%.&.*.=.-.;. ", 129 | " >.>.>.,.'.).).).).).!.~. "}; 130 | -------------------------------------------------------------------------------- /xstrings.h: -------------------------------------------------------------------------------- 1 | /* $XTermId: xstrings.h,v 1.28 2012/11/26 21:55:10 tom Exp $ */ 2 | 3 | /* 4 | * Copyright 2000-2011,2012 by Thomas E. Dickey 5 | * 6 | * All Rights Reserved 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a 9 | * copy of this software and associated documentation files (the 10 | * "Software"), to deal in the Software without restriction, including 11 | * without limitation the rights to use, copy, modify, merge, publish, 12 | * distribute, sublicense, and/or sell copies of the Software, and to 13 | * permit persons to whom the Software is furnished to do so, subject to 14 | * the following conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be included 17 | * in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | * IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY 23 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | * 27 | * Except as contained in this notice, the name(s) of the above copyright 28 | * holders shall not be used in advertising or otherwise to promote the 29 | * sale, use or other dealings in this Software without prior written 30 | * authorization. 31 | */ 32 | 33 | #ifndef included_xstrings_h 34 | #define included_xstrings_h 1 35 | /* *INDENT-OFF* */ 36 | 37 | #include 38 | #include 39 | 40 | #define OkPasswd(p) ((p)->pw_name != 0 && (p)->pw_name[0] != 0) 41 | 42 | extern Boolean x_getpwnam(const char * /* name */, struct passwd * /* result */); 43 | extern Boolean x_getpwuid(uid_t /* uid */, struct passwd * /* result */); 44 | extern String x_nonempty(String /* s */); 45 | extern String x_skip_blanks(String /* s */); 46 | extern String x_skip_nonblanks(String /* s */); 47 | extern char **x_splitargs(const char * /* command */); 48 | extern char *x_basename(char * /* name */); 49 | extern char *x_decode_hex(const char * /* source */, const char ** /* next */); 50 | extern char *x_encode_hex(const char * /* source */); 51 | extern char *x_getenv(const char * /* name */); 52 | extern char *x_getlogin(uid_t /* uid */, struct passwd * /* in_out */); 53 | extern char *x_strdup(const char * /* s */); 54 | extern char *x_strindex(char * /* s1 */, const char * /* s2 */); 55 | extern char *x_strtrim(const char * /* s */); 56 | extern char x_toupper(int /* ch */); 57 | extern int x_hex2int(int /* ch */); 58 | extern int x_strcasecmp(const char * /* s1 */, const char * /* s2 */); 59 | extern int x_strncasecmp(const char * /* s1 */, const char * /* s2 */, unsigned /* n */); 60 | extern unsigned x_countargv(char ** /* argv */); 61 | extern void x_appendargv(char ** /* target */, char ** /* source */); 62 | extern void x_freeargs(char ** /* argv */); 63 | 64 | /* *INDENT-ON* */ 65 | 66 | #endif /* included_xstrings_h */ 67 | -------------------------------------------------------------------------------- /vttests/title.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # $XTermId: title.sh,v 1.18 2011/12/11 16:21:22 tom Exp $ 3 | # ----------------------------------------------------------------------------- 4 | # this file is part of xterm 5 | # 6 | # Copyright 1999-2003,2011 by Thomas E. Dickey 7 | # 8 | # All Rights Reserved 9 | # 10 | # Permission is hereby granted, free of charge, to any person obtaining a 11 | # copy of this software and associated documentation files (the 12 | # "Software"), to deal in the Software without restriction, including 13 | # without limitation the rights to use, copy, modify, merge, publish, 14 | # distribute, sublicense, and/or sell copies of the Software, and to 15 | # permit persons to whom the Software is furnished to do so, subject to 16 | # the following conditions: 17 | # 18 | # The above copyright notice and this permission notice shall be included 19 | # in all copies or substantial portions of the Software. 20 | # 21 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 22 | # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 23 | # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 24 | # IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY 25 | # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 26 | # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 27 | # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 28 | # 29 | # Except as contained in this notice, the name(s) of the above copyright 30 | # holders shall not be used in advertising or otherwise to promote the 31 | # sale, use or other dealings in this Software without prior written 32 | # authorization. 33 | # ----------------------------------------------------------------------------- 34 | # Obtain the current title of the window, set up a simple clock which runs 35 | # until this script is interrupted, then restore the title. 36 | 37 | ESC="" 38 | CMD='/bin/echo' 39 | OPT='-n' 40 | SUF='' 41 | TMP=/tmp/xterm$$ 42 | eval '$CMD $OPT >$TMP || echo fail >$TMP' 2>/dev/null 43 | ( test ! -f $TMP || test -s $TMP ) && 44 | for verb in printf print ; do 45 | rm -f $TMP 46 | eval '$verb "\c" >$TMP || echo fail >$TMP' 2>/dev/null 47 | if test -f $TMP ; then 48 | if test ! -s $TMP ; then 49 | CMD="$verb" 50 | OPT= 51 | SUF='\c' 52 | break 53 | fi 54 | fi 55 | done 56 | rm -f $TMP 57 | 58 | exec /dev/tty 63 | read original 64 | 65 | stty $old 66 | 67 | # We actually get this terminated by an backslash, but the backslash 68 | # is lost. We may lose doublequote characters when restoring the title, 69 | # depending on the shell. 70 | original=`echo "$original" |sed -e 's/^...//' -e 's/.$//'` 71 | original=${ESC}]2\;"${original}"${SUF} 72 | 73 | if ( trap "echo exit" EXIT 2>/dev/null ) >/dev/null 74 | then 75 | trap '$CMD $OPT "$original" >/dev/tty; exit' EXIT HUP INT TRAP TERM 76 | else 77 | trap '$CMD $OPT "$original" >/dev/tty; exit' 0 1 2 5 15 78 | fi 79 | 80 | while true 81 | do 82 | sleep 1 83 | $CMD $OPT "${ESC}]2;`date`" >/dev/tty 84 | done 85 | -------------------------------------------------------------------------------- /README.os390: -------------------------------------------------------------------------------- 1 | -- $XFree86: xc/programs/xterm/README.os390,v 1.3 2000/09/22 10:42:05 alanh Exp $ 2 | 3 | Below are install instructions for os/390 2.5 & below and 4 | for os/390 2.6 & above. The basic reasons for exporting 5 | the LIBS and CFLAGS variables is to get the configure 6 | script to run properly under os/390. configure, when 7 | checking for X, attempts to compile a program something like 8 | 9 | int main() { 10 | XtMalloc() 11 | ; return 0; } 12 | 13 | using 'cc -o conftest conftest.c -lXt'. However this results 14 | in a number of linkedit messages such as: 15 | 16 | IEW2456E 9207 SYMBOL xcatd UNRESOLVED. MEMBER COULD NOT BE INCLUDED FROM THE 17 | DESIGNATED CALL LIBRARY. NAME SPACE = 3 18 | IEW2456E 9207 SYMBOL XrmQGetResource UNRESOLVED. MEMBER COULD NOT BE INCLUDED 19 | FROM THE DESIGNATED CALL LIBRARY. 20 | IEW2456E 9207 SYMBOL XrmGetDatabase UNRESOLVED. MEMBER COULD NOT BE INCLUDED 21 | FROM THE DESIGNATED CALL LIBRARY. 22 | 23 | The only way I can get this program to compile and link is to 24 | use 'cc -o conftest conftest.c -lXt -lX11 -lSM -lICE'. 25 | With os/390 2.6 and above, IBM has provided X functions in dlls; 26 | this is the reason for the separate install steps. In fact, 27 | trying to use the X archive files (eg -lX11) when linking xterm 28 | results in an abend0C1 in low storage when X tries to call the 29 | initialize function (at least on my system). This has something 30 | to do with the calling X routine thinking it has a function pointer 31 | descriptor (c++) when it actually has just a function pointer (c). 32 | Unfortunately, I have been unable to recreate the problem in a 33 | simple testcase, so I haven't reported it to IBM. Anyway, for os/390 34 | 2.6 and above, configure will build a Makefile with the following line: 35 | 36 | LIBS = -lXaw -lXext -lXmu -lXt -lSM -lICE -lX11 /usr/lib/Xaw.x /usr/lib/SM.x /usr/lib/ICE.x /usr/lib/X11.x -lcurses 37 | 38 | The '-lXaw -lXext -lXmu -lXt -lSM -lICE -lX11' should be manually removed; 39 | this isn't strictly necessary, but will reduce the size of the executable 40 | by about 4M. 41 | 42 | The '-Wl,EDIT=NO' causes the Binder to produce a non-editable executable, 43 | dramatically reducing the size of the executable file. 44 | 45 | Good Luck!! 46 | Greg Smith 47 | rys@trex.rtpnc.epa.gov 48 | 49 | 50 | 51 | Install instructions for os/390 2.5 and *below*: 52 | ------------------------------------------------ 53 | gunzip xterm.tar.gz 54 | pax -o from=ISO8859-1,to=IBM-1047 -rf xterm.tar 55 | cd xterm 56 | export LIBS='-lXt -lX11 -lSM -lICE' 57 | export CFLAGS='-D_ALL_SOURCE -Wl,EDIT=NO' 58 | ./configure 59 | make 60 | export DISPLAY=my.xserver.name:0 61 | ./xterm 62 | 63 | 64 | Install instructions for os/390 2.6 and *above*: 65 | ------------------------------------------------ 66 | gunzip xterm.tar.gz 67 | pax -o from=ISO8859-1,to=IBM-1047 -rf xterm.tar 68 | cd xterm 69 | ./configure # LIBS, CFLAGS, and CC are defined by configure for os/390 2.6. 70 | [optional: edit the Makefile and remove '-lXaw -lXext -lXmu -lXt -lSM -lICE -lX11' 71 | from the LIBS assignment] 72 | make 73 | export DISPLAY=my.xserver.name:0 74 | ./xterm 75 | -------------------------------------------------------------------------------- /tektests/ocpred.tek: -------------------------------------------------------------------------------- 1 | +gd5U+fd6T+fi6T*f6T+fd6T+dd7S+di7S*d7S+dd7S+gd8Q+gi8Q*g8Q+gd8Q+ed9P+ei9P*e9P+ed9P+dd:O+di:O*d:O+dd:O+fd;M+fi;M*f;M+fd;M+edI+fi>I*f>I+fd>I+dd?H+di?H*d?H+dd?H+dd?H+gd5U,cc5U,cc5Z,cc5P,cc5U-ka5U-ka5Z-ka5P-ka5U.g`5U.g`5Z.g`5P.g`5U.o~5U.o~5Z.o~5P.o~5U/k}5U/k}5Z/k}5P/k}5U0c|5U0c|5Z0c|5P0c|5U1oz5U1oz5Z1oz5P1oz5U2gy5U2gy5Z2gy5P2gy5U3cx5U3cx5Z3cx5P3cx5U4kv5U4kv5Z4kv5P4kv5U4kv5U+gd5U+ed4W*e4W+ei4W+ed4W+fd3X*f3X+fi3X+fd3X+dd2Z*d2Z+di2Z+dd2Z+ed1[*e1[+ei1[+ed1[+gd0\*g0\+gi0\+gd0\+dd/^*d/^+di/^+dd/^+fd._*f._+fi._+fd._+gd.@*g.@+gi.@+gd.@+ed-B*e-B+ei-B+ed-B+fd,C*f,C+fi,C+fd,C+fd,C+gd5U*oe5U*oe5P*oe5Z*oe5U)cg5U)cg5P)cg5Z)cg5U(kh5U(kh5P(kh5Z(kh5U'oi5U'oi5P'oi5Z'oi5U&gk5U&gk5P&gk5Z&gk5U%kl5U%kl5P%kl5Z%kl5U$cn5U$cn5P$cn5Z$cn5U#go5U#go5P#go5Z#go5U"op5U"op5P"op5Z"op5U!cr5U!cr5P!cr5Z!cr5U!cr5U4kv5U4k{5PN+fd,C*hl,FE!cr5U cy5PS+dd?H*hl>YW%`o @,cc5U,nb5T,nb5S,mb5R,ib5Q,db5P,`b5O,oa5M,ka5L,fa5K,o`5J,k`5I,``5I+h5H+`5G+h~5F+a~5E+j}5D+c}5C+g|5B+h{5B+a{5A+fz5@+ky4_+lx4_+bx4^+gw4]+iv4]+ju4\+lt4\+bt4[+ds4[+fr4Z+dq4Z+fp4Y+eo4Y+kn4X+fm4X+el4X+`k4X+cj4W+nh4W+mg4W+if4W+ie4W+ed4W+ac4W+ab4W+m`4W*n4W*k~4W*h}4X*e|4X*f{4X*cz4X*ey4Y*fx4Y*hw4Z*jv4Z*hu4[*jt4[*ls4\*bs4\*dr4]*gq4]*jp4^*lo4_*co4_*fn5@*im5A*`m5B*gl5B*nk5C*bk5D*ij5E*`j5F*ki5F*ci5G*kh5H*ch5I*og5J*fg5K*cg5L*of5M*hf5O*df5P*af5Q*me5R*ne5S*ne5T*oe5U*le5W*le5X*me5Y*af5Z*ff5[*jf5\*of5]*cg5^*dg6@*og6@*og6@*ch6A*jh6B*bi6C*ji6D*bj6E*ij6F*`k6G*kk6G*gl6H*bm6I*im6J*dn6K*co6K*no6L*hp6M*gq6M*ar6N*`s6O*ns6O*ht6P*fu6P*dv6Q*fw6Q*dx6R*ey6R*cz6R*d{6S*e|6S*j}6S*k~6S*l6T+m`6T+ab6T+ac6T+fd6T+ie6T+if6T+mg6T+lh6T+cj6S+bk6S+el6S+dm6S+kn6R+eo6R+dp6R+bq6Q+`r6Q+bs6P+`t6P+nt6O+hu6O+fv6N+gw6M+`x6M+nx6L+ky6K+dz6K+a{6J+j{6I+g|6H+l|6H+h}6G+a~6F+j~6E+c6D+k6C,c`6B,k`6A,o`6@,da6@,ka5^,oa5],bb5\,fb5[,ib5Z,mb5Y,lb5X,lb5W,cc5U$`l?@$`l?J$`l?E%`u?E%`u?@%`u?J%`j9Y 0.1"$`t9Y 2148 km#`v9YStar position#``9Yin sky plane"`j9YFrom 2:40: 0!`t9YEach 0: 1: 0+fd,C+fi,RSUN->.ke7[.di7[.na7\.ke7[-k{8@SAA.ke7[.`b7L.me7K-g~7L.`b7L-h~6\.eb6[-oz6\-h~6\-lz6L-i~6K-cw6L-lz6L-dw5\-a{5[-ks5\-dw5\-ms5L-jw5K-`p5M-ms5L-ap4\-ns4[-dl4]-ap4\-il4L-fp4K-lh4M-il4L-ai3\-nl3[-de3]-ai3\-fe3L-ci3K-ia3M-fe3L-na2\-ke2[,a~2]-na2\,b~2L-oa2K,ez2M,b~2L,kz1\,d~1\,nv1],kz1\,cw1L,lz1L,fs1M,cw1L,ds0],aw0\,ko0],ds0],lo0M,is0L,cl0M,lo0M,dl/],ap/\,kh/],dl/],ih/M,fl/L,ld/N,ih/M,ae.],nh.\,da.^,ae.],fa.M,ce.L+i}.N,fa.M+n}-],ka-\+az-^+n}-]+gz-M+`~-M+jv-N+gz-M+kv,]+dz,]+nr,^+kv,]+`s,N+mv,M+go,N+`s,N7lv @May 4 1986 Occultation of nepklem 1026 by Triton (N1)7h` @Observed from SAAO Sutherland 74" Long= -20 48 44.3 Lat= -32 22 43.46dj @13.11-magnitude star at RA= 18h 24m 16.1231s Dec=-22d 13' 22.807" 2 | 5`t @ (1950) RA= 18h 22m 5.3070s Dec=-22d 14' 27.910" 3 | 4l} @Closest at 2:45:30 U.T. 4hg @ Radial= 4158.7 km = 0.19"3dq @ Planet= 1600.0 km = 0.07"2`{ @ ET - UT = 56.1709 sec DE-1182ld @ P.A.= 12.7 deg.1hn @ Phase = 1.5 deg = 100.0%0dx @ Alt= 75 d, Az= -36 d0`b @ Sun alt=-30 d, Az= 90 d/lk @ Sun:127.8 d, Moon: 11.9 d.hu @ V =0.0007 "/s = 14.22 km/s-d @ D = 29.619079 A.U.-`i @Doug Mink 16: 4 Nov 11 1985-`i @ 4 | -------------------------------------------------------------------------------- /vttests/acolors.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # $XTermId: acolors.sh,v 1.7 2011/12/11 16:21:22 tom Exp $ 3 | # ----------------------------------------------------------------------------- 4 | # this file is part of xterm 5 | # 6 | # Copyright 2002-2003,2011 by Thomas E. Dickey 7 | # 8 | # All Rights Reserved 9 | # 10 | # Permission is hereby granted, free of charge, to any person obtaining a 11 | # copy of this software and associated documentation files (the 12 | # "Software"), to deal in the Software without restriction, including 13 | # without limitation the rights to use, copy, modify, merge, publish, 14 | # distribute, sublicense, and/or sell copies of the Software, and to 15 | # permit persons to whom the Software is furnished to do so, subject to 16 | # the following conditions: 17 | # 18 | # The above copyright notice and this permission notice shall be included 19 | # in all copies or substantial portions of the Software. 20 | # 21 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 22 | # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 23 | # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 24 | # IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY 25 | # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 26 | # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 27 | # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 28 | # 29 | # Except as contained in this notice, the name(s) of the above copyright 30 | # holders shall not be used in advertising or otherwise to promote the 31 | # sale, use or other dealings in this Software without prior written 32 | # authorization. 33 | # ----------------------------------------------------------------------------- 34 | # Demonstrate the use of the control sequence for changing ANSI colors. 35 | 36 | ESC="" 37 | CMD='/bin/echo' 38 | OPT='-n' 39 | SUF='' 40 | TMP=/tmp/xterm$$ 41 | eval '$CMD $OPT >$TMP || echo fail >$TMP' 2>/dev/null 42 | ( test ! -f $TMP || test -s $TMP ) && 43 | for verb in printf print ; do 44 | rm -f $TMP 45 | eval '$verb "\c" >$TMP || echo fail >$TMP' 2>/dev/null 46 | if test -f $TMP ; then 47 | if test ! -s $TMP ; then 48 | CMD="$verb" 49 | OPT= 50 | SUF='\c' 51 | break 52 | fi 53 | fi 54 | done 55 | rm -f $TMP 56 | 57 | LIST="00 30 80 d0 ff" 58 | 59 | exec /dev/tty 64 | read original 65 | stty $old 66 | original=${original}${SUF} 67 | 68 | if ( trap "echo exit" EXIT 2>/dev/null ) >/dev/null 69 | then 70 | trap '$CMD $OPT "$original" >/dev/tty; exit' EXIT HUP INT TRAP TERM 71 | else 72 | trap '$CMD $OPT "$original" >/dev/tty; exit' 0 1 2 5 15 73 | fi 74 | 75 | $CMD "${ESC}[0;1;34mThis message is BLUE" 76 | $CMD "${ESC}[0;1;31mThis message is RED ${ESC}[0;31m(sometimes)" 77 | $CMD "${ESC}[0;1;32mThis message is GREEN${ESC}[0m" 78 | while true 79 | do 80 | for R in $LIST 81 | do 82 | for G in $LIST 83 | do 84 | for B in $LIST 85 | do 86 | # color "9" is bold-red 87 | test $R != 00 && test $G = 00 && test $B = 00 && $CMD $OPT "" >/dev/tty 88 | $CMD $OPT "${ESC}]4;9;rgb:$R/$G/$B${SUF}" >/dev/tty 89 | sleep 1 90 | done 91 | done 92 | done 93 | done 94 | -------------------------------------------------------------------------------- /Tekparse.h: -------------------------------------------------------------------------------- 1 | /* $XTermId: Tekparse.h,v 1.7 2006/02/13 01:14:57 tom Exp $ */ 2 | 3 | /* 4 | * Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. 5 | * 6 | * All Rights Reserved 7 | * 8 | * Permission to use, copy, modify, and distribute this software and its 9 | * documentation for any purpose and without fee is hereby granted, 10 | * provided that the above copyright notice appear in all copies and that 11 | * both that copyright notice and this permission notice appear in 12 | * supporting documentation, and that the name of Digital Equipment 13 | * Corporation not be used in advertising or publicity pertaining to 14 | * distribution of the software without specific, written prior permission. 15 | * 16 | * 17 | * DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING 18 | * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL 19 | * DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR 20 | * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, 21 | * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, 22 | * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS 23 | * SOFTWARE. 24 | */ 25 | /* $XFree86: xc/programs/xterm/Tekparse.h,v 1.6 2006/02/13 01:14:57 dickey Exp $ */ 26 | 27 | 28 | /* @(#)Tekparse.h X10/6.6 11/7/86 */ 29 | 30 | #ifndef included_Tekparse_h 31 | #define included_Tekparse_h 1 32 | 33 | #ifndef Const 34 | # if defined(__STDC__) && !defined(__cplusplus) 35 | # define Const const 36 | # else 37 | # define Const /**/ 38 | # endif 39 | #endif 40 | 41 | extern Const int Talptable[]; 42 | extern Const int Tbestable[]; 43 | extern Const int Tbyptable[]; 44 | extern Const int Tesctable[]; 45 | extern Const int Tipltable[]; 46 | extern Const int Tplttable[]; 47 | extern Const int Tpttable[]; 48 | extern Const int Tspttable[]; 49 | 50 | /* 51 | * The following list of definitions is generated from Tekparse.def using the 52 | * following command line: 53 | * 54 | * egrep -v '^CASE_' Tekparse.def | \ 55 | * awk 'BEGIN {n = 0;} {printf "#define %s %d\n", $1, n; n++}' 56 | * 57 | * You you need to change something, change Tekparse.def and regenerate the 58 | * definitions. This would have been automatic, but since this doesn't change 59 | * very often, it isn't worth the makefile hassle. 60 | */ 61 | 62 | #define CASE_REPORT 0 63 | #define CASE_VT_MODE 1 64 | #define CASE_SPT_STATE 2 65 | #define CASE_GIN 3 66 | #define CASE_BEL 4 67 | #define CASE_BS 5 68 | #define CASE_PT_STATE 6 69 | #define CASE_PLT_STATE 7 70 | #define CASE_TAB 8 71 | #define CASE_IPL_STATE 9 72 | #define CASE_ALP_STATE 10 73 | #define CASE_UP 11 74 | #define CASE_COPY 12 75 | #define CASE_PAGE 13 76 | #define CASE_BES_STATE 14 77 | #define CASE_BYP_STATE 15 78 | #define CASE_IGNORE 16 79 | #define CASE_ASCII 17 80 | #define CASE_APL 18 81 | #define CASE_CHAR_SIZE 19 82 | #define CASE_BEAM_VEC 20 83 | #define CASE_CURSTATE 21 84 | #define CASE_PENUP 22 85 | #define CASE_PENDOWN 23 86 | #define CASE_IPL_POINT 24 87 | #define CASE_PLT_VEC 25 88 | #define CASE_PT_POINT 26 89 | #define CASE_SPT_POINT 27 90 | #define CASE_CR 28 91 | #define CASE_ESC_STATE 29 92 | #define CASE_LF 30 93 | #define CASE_SP 31 94 | #define CASE_PRINT 32 95 | #define CASE_OSC 33 96 | 97 | #endif /* included_Tekparse_h */ 98 | -------------------------------------------------------------------------------- /link_axp.com: -------------------------------------------------------------------------------- 1 | $! $XFree86: xc/programs/xterm/link_axp.com,v 1.1 2000/02/08 17:19:35 dawes Exp $ 2 | $ SAVE_VERIFY='F$VERIFY(0) 3 | $ if p1 .Eqs. "CLEAN" then goto clean 4 | $ if p1 .Eqs. "CLOBBER" then goto clobber 5 | $ if p1 .Eqs. "INSTALL" then goto install 6 | $! 7 | $! Compile the X11R4 Xterm application 8 | $! 9 | $ Set Symbol/Scope=NoGlobal 10 | $! 11 | $! Define logicals pointing to the needed directories 12 | $! 13 | $ x11lib_device = f$parse("[.lib]",,,"DEVICE") 14 | $ x11lib_directory = f$parse("[.lib]",,,"DIRECTORY") 15 | $ define/nolog x11lib 'x11lib_device''x11lib_directory' 16 | $! 17 | $ x11inc_device = f$parse("[]",,,"DEVICE") 18 | $ x11inc_directory = f$parse("[]",,,"DIRECTORY") 19 | $ define/nolog x11inc 'x11inc_device''x11inc_directory' 20 | $! 21 | $ xmu_device = f$parse("[.lib.xmu]",,,"DEVICE") 22 | $ xmu_directory = f$parse("[.lib.xmu]",,,"DIRECTORY") 23 | $ define/nolog x11xmu 'xmu_device''xmu_directory' 24 | $! 25 | $ xbm_device = f$parse("[.lib.x11]",,,"DEVICE") 26 | $ xbm_directory = f$parse("[.lib.x11]",,,"DIRECTORY") 27 | $ define/nolog x11xbm 'xbm_device''xbm_directory' 28 | $! 29 | $ xaw_device = f$parse("[.lib.xaw]",,,"DEVICE") 30 | $ xaw_directory = f$parse("[.lib.xaw]",,,"DIRECTORY") 31 | $ define/nolog x11xaw 'xaw_device''xaw_directory' 32 | $! 33 | $ x11vms_device = f$parse("[.lib.misc]",,,"DEVICE") 34 | $ x11vms_directory = f$parse("[.lib.misc]",,,"DIRECTORY") 35 | $ define/nolog x11vms 'x11vms_device''x11vms_directory' 36 | $! 37 | $! Get the compiler options via the logical name COPTS 38 | $! 39 | $ cc_options = f$trnlnm("COPTS") 40 | $! 41 | $! Get the linker options via the logical name LOPTS 42 | $! 43 | $ link_options = f$trnlnm("LOPTS") 44 | $! 45 | $ write sys$output "Building XTERM Image" 46 | $ CALL MAKE XTERM.EXE "LINK ''link_options' /EXE=XTERM.EXE_AXP/CROSS/FULL/MAP=XTERM.MAP XTERM_AXP/OPT" *.OBJ 47 | $! 48 | $ deassign x11lib 49 | $ deassign x11vms 50 | $ deassign x11xmu 51 | $ deassign x11xbm 52 | $ deassign x11xaw 53 | $! 54 | $ exit 55 | $! 56 | $ Clobber: ! Delete executables, Purge directory and clean up object files and listings 57 | $ Delete/noconfirm/log *.exe;* 58 | $! 59 | $ Clean: ! Purge directory, clean up object files and listings 60 | $ Purge 61 | $ Delete/noconfirm/log *.lis;* 62 | $ Delete/noconfirm/log *.obj;* 63 | $! 64 | $ exit 65 | $! 66 | $ Install: 67 | $ Copy/log *.exe x11bin: 68 | $ exit 69 | $! 70 | $MAKE: SUBROUTINE !SUBROUTINE TO CHECK DEPENDENCIES 71 | $ V = 'F$Verify(0) 72 | $! P1 = What we are trying to make 73 | $! P2 = Command to make it 74 | $! P3 - P8 What it depends on 75 | $ 76 | $ If F$Search(P1) .Eqs. "" Then Goto Makeit 77 | $ Time = F$CvTime(F$File(P1,"RDT")) 78 | $arg=3 79 | $Loop: 80 | $ Argument = P'arg 81 | $ If Argument .Eqs. "" Then Goto Exit 82 | $ El=0 83 | $Loop2: 84 | $ File = F$Element(El," ",Argument) 85 | $ If File .Eqs. " " Then Goto Endl 86 | $ AFile = "" 87 | $Loop3: 88 | $ OFile = AFile 89 | $ AFile = F$Search(File) 90 | $ If AFile .Eqs. "" .Or. AFile .Eqs. OFile Then Goto NextEl 91 | $ If F$CvTime(F$File(AFile,"RDT")) .Ges. Time Then Goto Makeit 92 | $ Goto Loop3 93 | $NextEL: 94 | $ El = El + 1 95 | $ Goto Loop2 96 | $EndL: 97 | $ arg=arg+1 98 | $ If arg .Le. 8 Then Goto Loop 99 | $ Goto Exit 100 | $ 101 | $Makeit: 102 | $ Set Verify 103 | $ 'P2 104 | $ VV='F$Verify(0) 105 | $Exit: 106 | $ If V Then Set Verify 107 | $ENDSUBROUTINE 108 | -------------------------------------------------------------------------------- /256colres.pl: -------------------------------------------------------------------------------- 1 | #! /usr/bin/perl 2 | # $XTermId: 256colres.pl,v 1.16 2007/06/08 23:58:37 tom Exp $ 3 | # ----------------------------------------------------------------------------- 4 | # this file is part of xterm 5 | # 6 | # Copyright 1999-2002,2007 by Thomas E. Dickey 7 | # 8 | # All Rights Reserved 9 | # 10 | # Permission is hereby granted, free of charge, to any person obtaining a 11 | # copy of this software and associated documentation files (the 12 | # "Software"), to deal in the Software without restriction, including 13 | # without limitation the rights to use, copy, modify, merge, publish, 14 | # distribute, sublicense, and/or sell copies of the Software, and to 15 | # permit persons to whom the Software is furnished to do so, subject to 16 | # the following conditions: 17 | # 18 | # The above copyright notice and this permission notice shall be included 19 | # in all copies or substantial portions of the Software. 20 | # 21 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 22 | # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 23 | # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 24 | # IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY 25 | # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 26 | # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 27 | # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 28 | # 29 | # Except as contained in this notice, the name(s) of the above copyright 30 | # holders shall not be used in advertising or otherwise to promote the 31 | # sale, use or other dealings in this Software without prior written 32 | # authorization. 33 | # ----------------------------------------------------------------------------- 34 | 35 | # Construct a header file defining default resources for the 256-color model 36 | # of xterm. This is modeled after the 256colors2.pl script. 37 | 38 | # use the resources for colors 0-15 - usually more-or-less a 39 | # reproduction of the standard ANSI colors, but possibly more 40 | # pleasing shades 41 | 42 | use strict; 43 | 44 | our ( $line1, $line2, $line3 ); 45 | our ( $red, $green, $blue, $gray ); 46 | our ( $level, $code, @steps ); 47 | 48 | print < 0 ) { $level += 23.18181818; } 86 | $code = 80 + $gray; 87 | printf($line1, $code); 88 | printf($line2, $code); 89 | printf($line3, 90 | int($level), int($level), int($level)); 91 | } 92 | 93 | print < 6 | 7 | All Rights Reserved 8 | 9 | Permission to use, copy, modify, and distribute this software and its 10 | documentation for any purpose and without fee is hereby granted, 11 | provided that the above copyright notice appear in all copies and that 12 | both that copyright notice and this permission notice appear in 13 | supporting documentation, and that the name of the above listed 14 | copyright holder(s) not be used in advertising or publicity pertaining 15 | to distribution of the software without specific, written prior 16 | permission. 17 | 18 | THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD 19 | TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 20 | AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE 21 | LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 22 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 23 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 24 | OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 25 | 26 | ********************************************************/ 27 | 28 | #ifndef included_xcharmouse_h 29 | #define included_xcharmouse_h 30 | /* *INDENT-OFF* */ 31 | 32 | /* 33 | * Macros for dpmodes (Thomas Dickey and others): 34 | * J. Bacon, acadix@execpc.com, June 1998 35 | * Steve Wall, September 1999 36 | * Ilya Zakharevich, August 2002 37 | * Ryan Johnson, August 2010 38 | * Egmont Koblinger, December 2011 39 | */ 40 | 41 | /* DECSET arguments for turning on mouse reporting modes */ 42 | #define SET_X10_MOUSE 9 43 | #define SET_VT200_MOUSE 1000 44 | #define SET_VT200_HIGHLIGHT_MOUSE 1001 45 | #define SET_BTN_EVENT_MOUSE 1002 46 | #define SET_ANY_EVENT_MOUSE 1003 47 | 48 | #if OPT_FOCUS_EVENT 49 | #define SET_FOCUS_EVENT_MOUSE 1004 /* can be combined with above */ 50 | #endif 51 | 52 | /* Extend mouse tracking for terminals wider(taller) than 223 cols(rows) */ 53 | #define SET_EXT_MODE_MOUSE 1005 /* compatible with above */ 54 | #define SET_SGR_EXT_MODE_MOUSE 1006 55 | #define SET_URXVT_EXT_MODE_MOUSE 1015 56 | 57 | #define SET_ALTERNATE_SCROLL 1007 /* wheel mouse may send cursor-keys */ 58 | 59 | #define SET_BUTTON1_MOVE_POINT 2001 /* click1 emit Esc seq to move point*/ 60 | #define SET_BUTTON2_MOVE_POINT 2002 /* press2 emit Esc seq to move point*/ 61 | #define SET_DBUTTON3_DELETE 2003 /* Double click-3 deletes */ 62 | #define SET_PASTE_IN_BRACKET 2004 /* Surround paste by escapes */ 63 | #define SET_PASTE_QUOTE 2005 /* Quote each char during paste */ 64 | #define SET_PASTE_LITERAL_NL 2006 /* Paste "\n" as C-j */ 65 | 66 | #if OPT_DEC_LOCATOR 67 | 68 | /* Bit fields for screen->locator_events */ 69 | #define LOC_BTNS_DN 0x1 70 | #define LOC_BTNS_UP 0x2 71 | 72 | /* Special values for screen->loc_filter_* */ 73 | #define LOC_FILTER_POS -1 74 | 75 | #endif /* OPT_DEC_LOCATOR */ 76 | 77 | /* Values for screen->send_mouse_pos */ 78 | typedef enum { 79 | MOUSE_OFF 80 | ,X10_MOUSE 81 | ,VT200_MOUSE 82 | ,VT200_HIGHLIGHT_MOUSE 83 | ,BTN_EVENT_MOUSE 84 | ,ANY_EVENT_MOUSE 85 | ,DEC_LOCATOR 86 | } XtermMouseModes; 87 | 88 | /* *INDENT-ON* */ 89 | 90 | #endif /* included_xcharmouse_h */ 91 | -------------------------------------------------------------------------------- /df-install.in: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # $XTermId: df-install.in,v 1.14 2012/08/27 01:07:19 tom Exp $ 3 | # ----------------------------------------------------------------------------- 4 | # this file is part of xterm 5 | # 6 | # Copyright 2011,2012 by Thomas E. Dickey 7 | # 8 | # All Rights Reserved 9 | # 10 | # Permission is hereby granted, free of charge, to any person obtaining a 11 | # copy of this software and associated documentation files (the 12 | # "Software"), to deal in the Software without restriction, including 13 | # without limitation the rights to use, copy, modify, merge, publish, 14 | # distribute, sublicense, and/or sell copies of the Software, and to 15 | # permit persons to whom the Software is furnished to do so, subject to 16 | # the following conditions: 17 | # 18 | # The above copyright notice and this permission notice shall be included 19 | # in all copies or substantial portions of the Software. 20 | # 21 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 22 | # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 23 | # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 24 | # IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY 25 | # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 26 | # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 27 | # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 28 | # 29 | # Except as contained in this notice, the name(s) of the above copyright 30 | # holders shall not be used in advertising or otherwise to promote the 31 | # sale, use or other dealings in this Software without prior written 32 | # authorization. 33 | # ----------------------------------------------------------------------------- 34 | # 35 | # Install desktop-files, substituting the category to customize the file 36 | # to the current system's conventions. 37 | # 38 | # Parameters are passed to the desktop-file-install program. The last 39 | # parameter is the name of the ".desktop" file to install. 40 | OPTS= 41 | 42 | if test $# != 0 43 | then 44 | APP_NAME=$1 45 | shift 1 46 | fi 47 | 48 | CDPATH=: 49 | export CDPATH 50 | 51 | while test $# != 0 52 | do 53 | case .$1 in #(vi 54 | *.desktop) #(vi 55 | if test $# = 1 56 | then 57 | OLD_FILE=$1 58 | else 59 | OPTS="$OPTS $1" 60 | fi 61 | ;; 62 | *) 63 | OPTS="$OPTS $1" 64 | ;; 65 | esac 66 | shift 1 67 | done 68 | 69 | MY_TEMP=tempdir$$ 70 | rm -rf $MY_TEMP 71 | 72 | if test -z "$OLD_FILE" 73 | then 74 | echo "? not found: $OLD_FILE" 75 | exit 1 76 | elif ! mkdir $MY_TEMP 77 | then 78 | echo "? cannot mkdir: $MY_TEMP" 79 | exit 1 80 | fi 81 | 82 | # The newer dfi whines about deprecation of encoding, but no release provides 83 | # --version or equivalent. really. 84 | if desktop-file-install --help-all >/dev/null 2>&1 85 | then 86 | NO_ENCODING="#Encoding" 87 | else 88 | NO_ENCODING="Encoding" 89 | fi 90 | 91 | NEW_FILE=`basename $OLD_FILE` 92 | sed \ 93 | -e '/^Encoding=/s%Encoding%'$NO_ENCODING'%' \ 94 | -e '/^[^#]*Icon=/s%=.*%=xterm-color%' \ 95 | -e '/^[^#]*Category=/s%=.*%=@DESKTOP_CATEGORY@%' \ 96 | -e '/^[^#]*Categories=/s%=.*%=@DESKTOP_CATEGORY@%' \ 97 | -e '/^[^#]/s%xterm%'$APP_NAME'%g' \ 98 | -e '/^[^#]/s%XTerm%@APP_CLASS@%g' \ 99 | $OLD_FILE >$MY_TEMP/$NEW_FILE 100 | diff -u $OLD_FILE $MY_TEMP/$NEW_FILE 101 | cd $MY_TEMP 102 | 103 | desktop-file-install $OPTS $NEW_FILE 104 | 105 | cd .. 106 | rm -rf $MY_TEMP 107 | 108 | # vi:ts=4 sw=4 109 | -------------------------------------------------------------------------------- /vttests/8colors.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # $XTermId: 8colors.sh,v 1.14 2011/12/11 16:21:22 tom Exp $ 3 | # ----------------------------------------------------------------------------- 4 | # this file is part of xterm 5 | # 6 | # Copyright 1999-2003,2011 by Thomas E. Dickey 7 | # 8 | # All Rights Reserved 9 | # 10 | # Permission is hereby granted, free of charge, to any person obtaining a 11 | # copy of this software and associated documentation files (the 12 | # "Software"), to deal in the Software without restriction, including 13 | # without limitation the rights to use, copy, modify, merge, publish, 14 | # distribute, sublicense, and/or sell copies of the Software, and to 15 | # permit persons to whom the Software is furnished to do so, subject to 16 | # the following conditions: 17 | # 18 | # The above copyright notice and this permission notice shall be included 19 | # in all copies or substantial portions of the Software. 20 | # 21 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 22 | # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 23 | # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 24 | # IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY 25 | # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 26 | # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 27 | # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 28 | # 29 | # Except as contained in this notice, the name(s) of the above copyright 30 | # holders shall not be used in advertising or otherwise to promote the 31 | # sale, use or other dealings in this Software without prior written 32 | # authorization. 33 | # ----------------------------------------------------------------------------- 34 | # Show a simple 8-color test pattern 35 | 36 | ESC="" 37 | CMD='/bin/echo' 38 | OPT='-n' 39 | SUF='' 40 | TMP=/tmp/xterm$$ 41 | eval '$CMD $OPT >$TMP || echo fail >$TMP' 2>/dev/null 42 | ( test ! -f $TMP || test -s $TMP ) && 43 | for verb in printf print ; do 44 | rm -f $TMP 45 | eval '$verb "\c" >$TMP || echo fail >$TMP' 2>/dev/null 46 | if test -f $TMP ; then 47 | if test ! -s $TMP ; then 48 | CMD="$verb" 49 | OPT= 50 | SUF='\c' 51 | break 52 | fi 53 | fi 54 | done 55 | rm -f $TMP 56 | 57 | if ( trap "echo exit" EXIT 2>/dev/null ) >/dev/null 58 | then 59 | trap '$CMD $OPT ""; exit' EXIT HUP INT TRAP TERM 60 | else 61 | trap '$CMD $OPT ""; exit' 0 1 2 5 15 62 | fi 63 | 64 | echo "" 65 | while true 66 | do 67 | for AT in 0 1 4 7 68 | do 69 | case $AT in 70 | 0) attr="normal ";; 71 | 1) attr="bold ";; 72 | 4) attr="under ";; 73 | 7) attr="reverse ";; 74 | esac 75 | for FG in 0 1 2 3 4 5 6 7 76 | do 77 | case $FG in 78 | 0) fcolor="black ";; 79 | 1) fcolor="red ";; 80 | 2) fcolor="green ";; 81 | 3) fcolor="yellow ";; 82 | 4) fcolor="blue ";; 83 | 5) fcolor="magenta ";; 84 | 6) fcolor="cyan ";; 85 | 7) fcolor="white ";; 86 | esac 87 | $CMD $OPT "[0;${AT}m$attr" 88 | $CMD $OPT "[3${FG}m$fcolor" 89 | for BG in 1 2 3 4 5 6 7 90 | do 91 | case $BG in 92 | 0) bcolor="black ";; 93 | 1) bcolor="red ";; 94 | 2) bcolor="green ";; 95 | 3) bcolor="yellow ";; 96 | 4) bcolor="blue ";; 97 | 5) bcolor="magenta ";; 98 | 6) bcolor="cyan ";; 99 | 7) bcolor="white ";; 100 | esac 101 | $CMD $OPT "[4${BG}m$bcolor" 102 | done 103 | echo "" 104 | done 105 | sleep 1 106 | done 107 | done 108 | -------------------------------------------------------------------------------- /uxterm.man: -------------------------------------------------------------------------------- 1 | .\" $XTermId: uxterm.man,v 1.6 2013/01/01 00:40:55 tom Exp $ 2 | .\" 3 | .\" Copyright 2001, 2004 Branden Robinson 4 | .\" 5 | .\" Permission is hereby granted, free of charge, to any person obtaining a 6 | .\" copy of this software and associated documentation files (the "Software"), 7 | .\" to deal in the Software without restriction, including without limitation 8 | .\" the rights to use, copy, modify, merge, publish, distribute, sublicense, 9 | .\" and/or sell copies of the Software, and to permit persons to whom the 10 | .\" Software is furnished to do so, subject to the following conditions: 11 | .\" 12 | .\" The above copyright notice and this permission notice shall be included in 13 | .\" all copies or substantial portions of the Software. 14 | .\" 15 | .\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | .\" IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | .\" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 | .\" SOFTWARE IN THE PUBLIC INTEREST, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR 19 | .\" OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 20 | .\" ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 21 | .\" DEALINGS IN THE SOFTWARE. 22 | .\" 23 | .ds N Uxterm 24 | .ds n uxterm 25 | .\" Escape single quotes in literal strings from groff's Unicode transform. 26 | .ie \n(.g .ds AQ \(aq 27 | .el .ds AQ ' 28 | .ie \n(.g .ds `` \(lq 29 | .el .ds `` `` 30 | .ie \n(.g .ds '' \(rq 31 | .el .ds '' '' 32 | .\" 33 | .TH UXTERM 1 "__app_date__" "__app_version__" "X Window System" 34 | .SH NAME 35 | uxterm \- X terminal emulator for Unicode (UTF-8) environments 36 | .SH SYNOPSIS 37 | .B \*n 38 | [ 39 | .I xterm-options 40 | ] 41 | .SH DESCRIPTION 42 | .B \*n 43 | is a wrapper around the 44 | .BR xterm(1) 45 | program that invokes the latter program with the \*(``U__default_class__\*('' X resource 46 | class set. 47 | All arguments to 48 | .B \*n 49 | are passed to 50 | .B xterm 51 | without processing; the 52 | .B \-class 53 | and 54 | .B \-u8 55 | options should not be specified because they are used by the wrapper. 56 | See the 57 | .B xterm 58 | manual page for more information on 59 | .IR xterm-options . 60 | .PP 61 | The environment's locale settings (see \*(``ENVIRONMENT\*('' below) are 62 | used to discern the locale's character set. 63 | If no current locale can be determined, the locale \*(``en_US\*('' (the 64 | English language as used in the territory of the United States) is assumed. 65 | The 66 | .BR locale(1) 67 | utility is used to determine whether the system supports the selected 68 | locale. 69 | If it does not, 70 | .B \*n 71 | will exit with an error and report the output of 72 | .BR locale . 73 | .PP 74 | .B Note: \*n 75 | may produce unexpected results if the current locale is set to one in which 76 | the UTF-8 character encoding is not supported, or if fonts using the ISO 77 | 10646-1 character set are not available. 78 | In the Debian system, the \*(``xfonts\-base\*('' package provides the fonts 79 | that 80 | .B \*n 81 | uses by default. 82 | To change the fonts 83 | .B \*n 84 | uses, edit the 85 | .I __apploaddir__/U__default_class__ 86 | file. 87 | .PP 88 | A similar wrapper, 89 | .BR koi8rxterm(1), 90 | is available for KOI8-R environments. 91 | .SH ENVIRONMENT 92 | .TP 93 | .B LC_ALL\fR, \fBLC_CTYPE\fR, \fBLANG 94 | The values of these variables are checked, in order, to determine the 95 | character set used by the current locale. 96 | .SH AUTHOR 97 | Thomas Dickey 98 | .SH "SEE ALSO" 99 | .BR locale(1), 100 | .BR locale(7), 101 | .BR koi8rxterm(1), 102 | .BR xterm(1) 103 | -------------------------------------------------------------------------------- /vttests/resize.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # $XTermId: resize.sh,v 1.17 2011/12/11 16:21:22 tom Exp $ 3 | # ----------------------------------------------------------------------------- 4 | # this file is part of xterm 5 | # 6 | # Copyright 1999-2003,2011 by Thomas E. Dickey 7 | # 8 | # All Rights Reserved 9 | # 10 | # Permission is hereby granted, free of charge, to any person obtaining a 11 | # copy of this software and associated documentation files (the 12 | # "Software"), to deal in the Software without restriction, including 13 | # without limitation the rights to use, copy, modify, merge, publish, 14 | # distribute, sublicense, and/or sell copies of the Software, and to 15 | # permit persons to whom the Software is furnished to do so, subject to 16 | # the following conditions: 17 | # 18 | # The above copyright notice and this permission notice shall be included 19 | # in all copies or substantial portions of the Software. 20 | # 21 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 22 | # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 23 | # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 24 | # IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY 25 | # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 26 | # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 27 | # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 28 | # 29 | # Except as contained in this notice, the name(s) of the above copyright 30 | # holders shall not be used in advertising or otherwise to promote the 31 | # sale, use or other dealings in this Software without prior written 32 | # authorization. 33 | # ----------------------------------------------------------------------------- 34 | # Obtain the current screen size, then resize the terminal to the nominal 35 | # screen width/height, and restore the size. 36 | 37 | ESC="" 38 | CMD='/bin/echo' 39 | OPT='-n' 40 | SUF='' 41 | TMP=/tmp/xterm$$ 42 | eval '$CMD $OPT >$TMP || echo fail >$TMP' 2>/dev/null 43 | ( test ! -f $TMP || test -s $TMP ) && 44 | for verb in printf print ; do 45 | rm -f $TMP 46 | eval '$verb "\c" >$TMP || echo fail >$TMP' 2>/dev/null 47 | if test -f $TMP ; then 48 | if test ! -s $TMP ; then 49 | CMD="$verb" 50 | OPT= 51 | SUF='\c' 52 | break 53 | fi 54 | fi 55 | done 56 | rm -f $TMP 57 | 58 | exec /dev/tty 63 | IFS=';' read junk high wide 64 | 65 | $CMD $OPT "${ESC}[19t${SUF}" > /dev/tty 66 | IFS=';' read junk maxhigh maxwide 67 | 68 | stty $old 69 | 70 | wide=`echo $wide|sed -e 's/t.*//'` 71 | maxwide=`echo $maxwide|sed -e 's/t.*//'` 72 | original=${ESC}[8\;${high}\;${wide}t${SUF} 73 | 74 | test $maxwide = 0 && maxwide=`expr $wide \* 2` 75 | test $maxhigh = 0 && maxhigh=`expr $high \* 2` 76 | 77 | if ( trap "echo exit" EXIT 2>/dev/null ) >/dev/null 78 | then 79 | trap '$CMD $OPT "$original" >/dev/tty; exit' EXIT HUP INT TRAP TERM 80 | else 81 | trap '$CMD $OPT "$original" >/dev/tty; exit' 0 1 2 5 15 82 | fi 83 | 84 | w=$wide 85 | h=$high 86 | a=1 87 | while true 88 | do 89 | # sleep 1 90 | echo resizing to $h by $w 91 | $CMD $OPT "${ESC}[8;${h};${w}t" >/dev/tty 92 | if test $a = 1 ; then 93 | if test $w = $maxwide ; then 94 | h=`expr $h + $a` 95 | if test $h = $maxhigh ; then 96 | a=-1 97 | fi 98 | else 99 | w=`expr $w + $a` 100 | fi 101 | else 102 | if test $w = $wide ; then 103 | h=`expr $h + $a` 104 | if test $h = $high ; then 105 | a=1 106 | fi 107 | else 108 | w=`expr $w + $a` 109 | fi 110 | fi 111 | done 112 | -------------------------------------------------------------------------------- /xtermcap.h: -------------------------------------------------------------------------------- 1 | /* $XTermId: xtermcap.h,v 1.18 2011/09/11 14:59:33 tom Exp $ */ 2 | 3 | /* 4 | * Copyright 2007-2010,2011 by Thomas E. Dickey 5 | * 6 | * All Rights Reserved 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a 9 | * copy of this software and associated documentation files (the 10 | * "Software"), to deal in the Software without restriction, including 11 | * without limitation the rights to use, copy, modify, merge, publish, 12 | * distribute, sublicense, and/or sell copies of the Software, and to 13 | * permit persons to whom the Software is furnished to do so, subject to 14 | * the following conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be included 17 | * in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | * IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY 23 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | * 27 | * Except as contained in this notice, the name(s) of the above copyright 28 | * holders shall not be used in advertising or otherwise to promote the 29 | * sale, use or other dealings in this Software without prior written 30 | * authorization. 31 | */ 32 | 33 | /* 34 | * Common/useful definitions for XTERM termcap interface. 35 | */ 36 | #ifndef included_xtermcap_h 37 | #define included_xtermcap_h 38 | 39 | #include 40 | 41 | #include 42 | 43 | #ifndef HAVE_TIGETSTR 44 | #undef USE_TERMINFO 45 | #endif 46 | 47 | #ifndef USE_TERMINFO 48 | #define USE_TERMINFO 0 49 | #endif 50 | 51 | #if !USE_TERMINFO 52 | #undef HAVE_TIGETSTR 53 | #ifndef USE_TERMCAP 54 | #define USE_TERMCAP 1 55 | #endif 56 | #endif 57 | 58 | #undef ERR /* workaround for glibc 2.1.3 */ 59 | 60 | #ifdef HAVE_NCURSES_CURSES_H 61 | #include 62 | #else 63 | #include 64 | #endif 65 | 66 | #ifndef NCURSES_VERSION 67 | #ifdef HAVE_TERMCAP_H 68 | #include 69 | #endif 70 | #endif 71 | 72 | #ifdef HAVE_NCURSES_TERM_H 73 | #include 74 | #elif defined(HAVE_TERM_H) 75 | #include /* tgetent() */ 76 | #endif 77 | 78 | /* 79 | * Get rid of conflicting symbols from term.h 80 | */ 81 | #undef bell 82 | 83 | /***====================================================================***/ 84 | 85 | #ifdef __cplusplus 86 | extern "C" { 87 | #endif 88 | 89 | #define MOD_NONE 1 90 | #define MOD_SHIFT 1 91 | #define MOD_ALT 2 92 | #define MOD_CTRL 4 93 | #define MOD_META 8 94 | 95 | #define MODIFIER_NAME(parm, name) \ 96 | (((parm > MOD_NONE) && ((parm - MOD_NONE) & name)) ? " "#name : "") 97 | 98 | /* xtermcap.c */ 99 | extern Bool get_termcap(XtermWidget /* xw */, char * /* name */); 100 | extern void set_termcap(XtermWidget /* xw */, const char * /* name */); 101 | extern void free_termcap(XtermWidget /* xw */); 102 | 103 | extern char *get_tcap_buffer(XtermWidget /* xw */); 104 | extern char *get_tcap_erase(XtermWidget /* xw */); 105 | 106 | #if OPT_TCAP_FKEYS 107 | extern int xtermcapString(XtermWidget /* xw */, int /* keycode */, unsigned /* mask */); 108 | #endif 109 | 110 | #if OPT_TCAP_QUERY 111 | extern int xtermcapKeycode(XtermWidget /* xw */, const char ** /* params */, unsigned * /* state */, Bool * /* fkey */); 112 | #endif 113 | 114 | #ifdef __cplusplus 115 | } 116 | #endif 117 | 118 | #endif /* included_xtermcap_h */ 119 | -------------------------------------------------------------------------------- /UXTerm.ad: -------------------------------------------------------------------------------- 1 | ! $XTermId: UXTerm.ad,v 1.13 2010/03/04 01:17:07 tom Exp $ 2 | ! ----------------------------------------------------------------------------- 3 | ! this file is part of xterm 4 | ! 5 | ! Copyright 2000-2006,2010 by Thomas E. Dickey 6 | ! 7 | ! All Rights Reserved 8 | ! 9 | ! Permission is hereby granted, free of charge, to any person obtaining a 10 | ! copy of this software and associated documentation files (the 11 | ! "Software"), to deal in the Software without restriction, including 12 | ! without limitation the rights to use, copy, modify, merge, publish, 13 | ! distribute, sublicense, and/or sell copies of the Software, and to 14 | ! permit persons to whom the Software is furnished to do so, subject to 15 | ! the following conditions: 16 | ! 17 | ! The above copyright notice and this permission notice shall be included 18 | ! in all copies or substantial portions of the Software. 19 | ! 20 | ! THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 21 | ! OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 22 | ! MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 23 | ! IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY 24 | ! CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 25 | ! TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 26 | ! SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 27 | ! 28 | ! Except as contained in this notice, the name(s) of the above copyright 29 | ! holders shall not be used in advertising or otherwise to promote the 30 | ! sale, use or other dealings in this Software without prior written 31 | ! authorization. 32 | ! ----------------------------------------------------------------------------- 33 | ! Use 34 | ! xterm -class UXTerm 35 | ! to set resources for UTF-8 mode with corresponding fonts. 36 | ! See the uxterm script for an example. 37 | 38 | #include "XTerm" 39 | 40 | *fontMenu.Label: Unicode Fonts 41 | *VT100.utf8: 1 42 | 43 | ! This includes "XTerm-color" which includes "XTerm", which defines fonts. 44 | ! Why set them here? 45 | ! 46 | ! Here is a simple description. A technically precise one would be very long. 47 | ! When xterm starts up, it uses the 48 | ! 49 | ! *VT100.font 50 | ! 51 | ! resource, and if it is told to switch to wide-character (UTF-8) mode, it 52 | ! checks if the given font is "wide", and if not looks for the 53 | ! 54 | ! *VT100.utf8Fonts.font 55 | ! 56 | ! to obtain a wide font. A "wide" font has more than 256 glyphs. Typical 57 | ! wide fonts have 10,000 glyphs. If the original "*VT100.font" is not wide, 58 | ! and xterm can load the *VT100.utf8Fonts.font, it will use that. 59 | ! 60 | ! Making the wide fonts associated with *VT100.font in this file allows uxterm 61 | ! to skip that step. It will use the fonts that the XTerm file gives for the 62 | ! *VT100.uft8Fonts.font pattern. 63 | *VT100.font2: -misc-fixed-medium-r-normal--8-80-75-75-c-50-iso10646-1 64 | *VT100.font: -misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso10646-1 65 | *VT100.font3: -misc-fixed-medium-r-normal--14-130-75-75-c-70-iso10646-1 66 | *VT100.font4: -misc-fixed-medium-r-normal--13-120-75-75-c-80-iso10646-1 67 | *VT100.font5: -misc-fixed-medium-r-normal--18-120-100-100-c-90-iso10646-1 68 | *VT100.font6: -misc-fixed-medium-r-normal--20-200-75-75-c-100-iso10646-1 69 | 70 | ! Here is an alternate set of fonts with better support for bold: 71 | !*VT100.font2: -efont-biwidth-medium-r-normal--10-100-75-75-p-50-iso10646-1 72 | !*VT100.font: -efont-biwidth-medium-r-normal--10-100-75-75-p-50-iso10646-1 73 | !*VT100.font3: -efont-biwidth-medium-r-normal--12-120-75-75-p-60-iso10646-1 74 | !*VT100.font4: -efont-biwidth-medium-r-normal--14-140-75-75-p-70-iso10646-1 75 | !*VT100.font5: -efont-biwidth-medium-r-normal--16-160-75-75-p-80-iso10646-1 76 | !*VT100.font6: -efont-biwidth-medium-r-normal--24-240-75-75-p-120-iso10646-1 77 | -------------------------------------------------------------------------------- /koi8rxterm.man: -------------------------------------------------------------------------------- 1 | .\" $XTermId: koi8rxterm.man,v 1.6 2013/01/01 00:43:18 tom Exp $ 2 | .\" 3 | .\" Copyright 2004 Branden Robinson 4 | .\" 5 | .\" Permission is hereby granted, free of charge, to any person obtaining a 6 | .\" copy of this software and associated documentation files (the "Software"), 7 | .\" to deal in the Software without restriction, including without limitation 8 | .\" the rights to use, copy, modify, merge, publish, distribute, sublicense, 9 | .\" and/or sell copies of the Software, and to permit persons to whom the 10 | .\" Software is furnished to do so, subject to the following conditions: 11 | .\" 12 | .\" The above copyright notice and this permission notice shall be included in 13 | .\" all copies or substantial portions of the Software. 14 | .\" 15 | .\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | .\" IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | .\" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 | .\" SOFTWARE IN THE PUBLIC INTEREST, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR 19 | .\" OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 20 | .\" ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 21 | .\" DEALINGS IN THE SOFTWARE. 22 | .\" 23 | .ds N Koi8rxterm 24 | .ds n koi8rxterm 25 | .\" 26 | .ie \n(.g .ds AQ \(aq 27 | .el .ds AQ ' 28 | .ie \n(.g .ds `` \(lq 29 | .el .ds `` `` 30 | .ie \n(.g .ds '' \(rq 31 | .el .ds '' '' 32 | .\" 33 | .TH KOI8RXTERM 1 "__app_date__" "__app_version__" "X Window System" 34 | .SH NAME 35 | koi8rxterm \- X terminal emulator for KOI8-R environments 36 | .SH SYNOPSIS 37 | .B \*n 38 | [ 39 | .I xterm-options 40 | ] 41 | .SH DESCRIPTION 42 | .B \*n 43 | is a wrapper around the 44 | .BR xterm(1) 45 | program that invokes the latter program with the \*(``KOI8R__default_class__\*('' X 46 | resource class set. 47 | All arguments to 48 | .B \*n 49 | are passed to 50 | .B xterm 51 | without processing; the 52 | .B \-class 53 | and 54 | .B \-k8 55 | options should not be specified because they are used by the wrapper. 56 | See the 57 | .BR xterm 58 | manual page for more information on 59 | .IR xterm-options . 60 | .PP 61 | The environment's locale settings (see \*(``ENVIRONMENT\*('' below) are 62 | used to discern the locale's character set. 63 | If no current locale can be determined, the locale \*(``ru_RU.KOI8-R\*('' 64 | (the Russian language as used in the territory of Russia, with the KOI8-R 65 | character set) is assumed. 66 | The 67 | .BR locale(1) 68 | utility is used to determine whether the system supports the selected 69 | locale. 70 | If it does not, 71 | .B \*n 72 | will exit with an error and report the output of 73 | .BR locale . 74 | .PP 75 | .B Note: \*n 76 | may produce unexpected results if the current locale is set to one in which 77 | the KOI8-R character encoding is not supported, or if fonts using that 78 | encoding are not available. 79 | In the Debian system, the \*(``xfonts\-cyrillic\*('' package provides the 80 | fonts that 81 | .B \*n 82 | uses by default. 83 | To change the fonts 84 | .B \*n 85 | uses, edit the 86 | .I __apploaddir__/KOI8R__default_class__ 87 | file. 88 | .PP 89 | A similar wrapper, 90 | .BR uxterm(1), 91 | is available for Unicode UTF-8 environments. 92 | .SH ENVIRONMENT 93 | .TP 94 | .B LC_ALL\fR, \fBLC_CTYPE\fR, \fBLANG 95 | The values of these variables are checked, in order, to determine the 96 | character set used by the current locale. 97 | .SH AUTHOR 98 | .B \*n 99 | was written by Branden Robinson and is very heavily based on 100 | .BR uxterm , 101 | by Thomas Dickey. 102 | The assistance of Jurij Smakov was invaluable in sanity-checking its 103 | operation. 104 | .SH "SEE ALSO" 105 | .BR locale(1), 106 | .BR locale(7), 107 | .BR uxterm(1), 108 | .BR xterm(1) 109 | -------------------------------------------------------------------------------- /vttests/dynamic2.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # $XTermId: dynamic2.sh,v 1.3 2011/12/11 16:21:22 tom Exp $ 3 | # ----------------------------------------------------------------------------- 4 | # this file is part of xterm 5 | # 6 | # Copyright 2006,2011 by Thomas E. Dickey 7 | # 8 | # All Rights Reserved 9 | # 10 | # Permission is hereby granted, free of charge, to any person obtaining a 11 | # copy of this software and associated documentation files (the 12 | # "Software"), to deal in the Software without restriction, including 13 | # without limitation the rights to use, copy, modify, merge, publish, 14 | # distribute, sublicense, and/or sell copies of the Software, and to 15 | # permit persons to whom the Software is furnished to do so, subject to 16 | # the following conditions: 17 | # 18 | # The above copyright notice and this permission notice shall be included 19 | # in all copies or substantial portions of the Software. 20 | # 21 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 22 | # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 23 | # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 24 | # IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY 25 | # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 26 | # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 27 | # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 28 | # 29 | # Except as contained in this notice, the name(s) of the above copyright 30 | # holders shall not be used in advertising or otherwise to promote the 31 | # sale, use or other dealings in this Software without prior written 32 | # authorization. 33 | # ----------------------------------------------------------------------------- 34 | # Demonstrate the use of dynamic colors by setting each dynamic color 35 | # successively to different values. 36 | 37 | ESC="" 38 | CMD='/bin/echo' 39 | OPT='-n' 40 | SUF='' 41 | TMP=/tmp/xterm$$ 42 | eval '$CMD $OPT >$TMP || echo fail >$TMP' 2>/dev/null 43 | ( test ! -f $TMP || test -s $TMP ) && 44 | for verb in printf print ; do 45 | rm -f $TMP 46 | eval '$verb "\c" >$TMP || echo fail >$TMP' 2>/dev/null 47 | if test -f $TMP ; then 48 | if test ! -s $TMP ; then 49 | CMD="$verb" 50 | OPT= 51 | SUF='\c' 52 | break 53 | fi 54 | fi 55 | done 56 | rm -f $TMP 57 | 58 | LIST="00 30 80 d0 ff" 59 | FULL="10 11 12 13 14 15 16 17 18" 60 | 61 | echo "reading current color settings" 62 | 63 | exec /dev/tty 71 | read reply 72 | eval original$N='${reply}${SUF}' 73 | original=${original}${reply}${SUF} 74 | done 75 | stty $old 76 | 77 | if ( trap "echo exit" EXIT 2>/dev/null ) >/dev/null 78 | then 79 | trap '$CMD $OPT "$original" >/dev/tty; exit' EXIT HUP INT TRAP TERM 80 | else 81 | trap '$CMD $OPT "$original" >/dev/tty; exit' 0 1 2 5 15 82 | fi 83 | 84 | while true 85 | do 86 | for N in $FULL 87 | do 88 | case $N in 89 | 10) echo "coloring text foreground";; 90 | 11) echo "coloring text background";; 91 | 12) echo "coloring text cursor";; 92 | 13) echo "coloring mouse foreground";; 93 | 14) echo "coloring mouse background";; 94 | 15) echo "coloring tektronix foreground";; 95 | 16) echo "coloring tektronix background";; 96 | 17) echo "coloring highlight background";; 97 | 18) echo "coloring tektronix cursor";; 98 | esac 99 | for R in $LIST 100 | do 101 | for G in $LIST 102 | do 103 | for B in $LIST 104 | do 105 | $CMD $OPT "${ESC}]$N;rgb:$R/$G/$B${SUF}" >/dev/tty 106 | sleep 1 107 | done 108 | done 109 | done 110 | eval 'restore=$'original$N 111 | $CMD $OPT "$restore" >/dev/tty 112 | sleep 1 113 | done 114 | done 115 | -------------------------------------------------------------------------------- /error.h: -------------------------------------------------------------------------------- 1 | /* $XTermId: error.h,v 1.25 2012/10/05 00:17:51 tom Exp $ */ 2 | 3 | /* 4 | * Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. 5 | * 6 | * All Rights Reserved 7 | * 8 | * Permission to use, copy, modify, and distribute this software and its 9 | * documentation for any purpose and without fee is hereby granted, 10 | * provided that the above copyright notice appear in all copies and that 11 | * both that copyright notice and this permission notice appear in 12 | * supporting documentation, and that the name of Digital Equipment 13 | * Corporation not be used in advertising or publicity pertaining to 14 | * distribution of the software without specific, written prior permission. 15 | * 16 | * 17 | * DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING 18 | * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL 19 | * DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR 20 | * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, 21 | * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, 22 | * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS 23 | * SOFTWARE. 24 | */ 25 | 26 | /* @(#)error.h X10/6.6 11/6/86 */ 27 | 28 | /* main.c */ 29 | #define ERROR_FIONBIO 11 /* main: ioctl() failed on FIONBIO */ 30 | #define ERROR_F_GETFL 12 /* main: ioctl() failed on F_GETFL */ 31 | #define ERROR_F_SETFL 13 /* main: ioctl() failed on F_SETFL */ 32 | #define ERROR_OPDEVTTY 14 /* spawn: open() failed on /dev/tty */ 33 | #define ERROR_TIOCGETP 15 /* spawn: ioctl() failed on TIOCGETP */ 34 | #define ERROR_PTSNAME 17 /* spawn: ptsname() failed */ 35 | #define ERROR_OPPTSNAME 18 /* spawn: open() failed on ptsname */ 36 | #define ERROR_PTEM 19 /* spawn: ioctl() failed on I_PUSH/"ptem" */ 37 | #define ERROR_CONSEM 20 /* spawn: ioctl() failed on I_PUSH/"consem" */ 38 | #define ERROR_LDTERM 21 /* spawn: ioctl() failed on I_PUSH/"ldterm" */ 39 | #define ERROR_TTCOMPAT 22 /* spawn: ioctl() failed on I_PUSH/"ttcompat" */ 40 | #define ERROR_TIOCSETP 23 /* spawn: ioctl() failed on TIOCSETP */ 41 | #define ERROR_TIOCSETC 24 /* spawn: ioctl() failed on TIOCSETC */ 42 | #define ERROR_TIOCSETD 25 /* spawn: ioctl() failed on TIOCSETD */ 43 | #define ERROR_TIOCSLTC 26 /* spawn: ioctl() failed on TIOCSLTC */ 44 | #define ERROR_TIOCLSET 27 /* spawn: ioctl() failed on TIOCLSET */ 45 | #define ERROR_INIGROUPS 28 /* spawn: initgroups() failed */ 46 | #define ERROR_FORK 29 /* spawn: fork() failed */ 47 | #define ERROR_EXEC 30 /* spawn: exec() failed */ 48 | #define ERROR_PTYS 32 /* get_pty: not enough ptys */ 49 | #define ERROR_PTY_EXEC 34 /* waiting for initial map */ 50 | #define ERROR_SETUID 35 /* spawn: setuid() failed */ 51 | #define ERROR_INIT 36 /* spawn: can't initialize window */ 52 | #define ERROR_TIOCKSET 46 /* spawn: ioctl() failed on TIOCKSET */ 53 | #define ERROR_TIOCKSETC 47 /* spawn: ioctl() failed on TIOCKSETC */ 54 | #define ERROR_LUMALLOC 49 /* luit: command-line malloc failed */ 55 | 56 | /* charproc.c */ 57 | #define ERROR_SELECT 50 /* in_put: select() failed */ 58 | #define ERROR_VINIT 54 /* VTInit: can't initialize window */ 59 | #define ERROR_KMMALLOC1 57 /* HandleKeymapChange: malloc failed */ 60 | 61 | /* Tekproc.c */ 62 | #define ERROR_TSELECT 60 /* Tinput: select() failed */ 63 | #define ERROR_TINIT 64 /* TekInit: can't initialize window */ 64 | 65 | /* button.c */ 66 | #define ERROR_BMALLOC2 71 /* SaltTextAway: malloc() failed */ 67 | 68 | /* misc.c */ 69 | #define ERROR_LOGEXEC 80 /* StartLog: exec() failed */ 70 | #define ERROR_XERROR 83 /* xerror: XError event */ 71 | #define ERROR_XIOERROR 84 /* xioerror: X I/O error */ 72 | #define ERROR_ICEERROR 85 /* ice_error: ICE I/O error */ 73 | 74 | /* screen.c */ 75 | #define ERROR_SCALLOC 90 /* Alloc: calloc() failed on base */ 76 | #define ERROR_SCALLOC2 91 /* Alloc: calloc() failed on rows */ 77 | #define ERROR_SAVE_PTR 102 /* ScrnPointers: malloc/realloc() failed */ 78 | -------------------------------------------------------------------------------- /vttests/doublechars.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # $XTermId: doublechars.sh,v 1.17 2011/12/11 16:21:22 tom Exp $ 3 | # ----------------------------------------------------------------------------- 4 | # this file is part of xterm 5 | # 6 | # Copyright 1999-2003,2011 by Thomas E. Dickey 7 | # 8 | # All Rights Reserved 9 | # 10 | # Permission is hereby granted, free of charge, to any person obtaining a 11 | # copy of this software and associated documentation files (the 12 | # "Software"), to deal in the Software without restriction, including 13 | # without limitation the rights to use, copy, modify, merge, publish, 14 | # distribute, sublicense, and/or sell copies of the Software, and to 15 | # permit persons to whom the Software is furnished to do so, subject to 16 | # the following conditions: 17 | # 18 | # The above copyright notice and this permission notice shall be included 19 | # in all copies or substantial portions of the Software. 20 | # 21 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 22 | # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 23 | # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 24 | # IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY 25 | # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 26 | # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 27 | # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 28 | # 29 | # Except as contained in this notice, the name(s) of the above copyright 30 | # holders shall not be used in advertising or otherwise to promote the 31 | # sale, use or other dealings in this Software without prior written 32 | # authorization. 33 | # ----------------------------------------------------------------------------- 34 | # Illustrate the use of double-size characters by drawing successive lines in 35 | # the commonly used video attributes. 36 | # 37 | # Use the -w option to force the output to wrap. It will look ugly, because 38 | # the double-high lines will be split. 39 | 40 | ESC="" 41 | CMD='/bin/echo' 42 | OPT='-n' 43 | SUF='' 44 | TMP=/tmp/xterm$$ 45 | eval '$CMD $OPT >$TMP || echo fail >$TMP' 2>/dev/null 46 | ( test ! -f $TMP || test -s $TMP ) && 47 | for verb in printf print ; do 48 | rm -f $TMP 49 | eval '$verb "\c" >$TMP || echo fail >$TMP' 2>/dev/null 50 | if test -f $TMP ; then 51 | if test ! -s $TMP ; then 52 | CMD="$verb" 53 | OPT= 54 | SUF='\c' 55 | break 56 | fi 57 | fi 58 | done 59 | rm -f $TMP 60 | 61 | SAVE=yes 62 | WRAP=no 63 | if test $# != 0 ; then 64 | while test $# != 0 65 | do 66 | case $1 in 67 | -n) SAVE=no ;; 68 | -w) WRAP=yes ;; 69 | esac 70 | shift 71 | done 72 | fi 73 | 74 | if test $SAVE = yes ; then 75 | exec /dev/tty 80 | IFS=';' read junk high wide 81 | 82 | stty $old 83 | 84 | wide=`echo $wide|sed -e 's/t.*//'` 85 | original=${ESC}[8\;${high}\;${wide}t${SUF} 86 | 87 | if ( trap "echo exit" EXIT 2>/dev/null ) >/dev/null 88 | then 89 | trap '$CMD $OPT "$original" >/dev/tty; exit' EXIT HUP INT TRAP TERM 90 | else 91 | trap '$CMD $OPT "$original" >/dev/tty; exit' 0 1 2 5 15 92 | fi 93 | 94 | fi 95 | 96 | if test $WRAP = yes ; then 97 | # turn on wrapping and force the screen to 80 columns 98 | $CMD $OPT "${ESC}[?7h" >/dev/tty 99 | $CMD $OPT "${ESC}[?40l" >/dev/tty 100 | else 101 | # force the screen to 132 columns 102 | $CMD $OPT "${ESC}[?40h" >/dev/tty 103 | $CMD $OPT "${ESC}[?3h" >/dev/tty 104 | fi 105 | 106 | for SGR in 0 1 4 5 7 107 | do 108 | $CMD $OPT "${ESC}[0;${SGR}m" >/dev/tty 109 | for DBL in 5 3 4 6 5 110 | do 111 | $CMD $OPT "${ESC}#${DBL}" >/dev/tty 112 | echo "The quick brown fox jumps over the lazy dog" >/dev/tty 113 | done 114 | echo 115 | done 116 | $CMD $OPT "${ESC}[0m" >/dev/tty 117 | -------------------------------------------------------------------------------- /vttests/16colors.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # $XTermId: 16colors.sh,v 1.14 2011/12/11 16:21:22 tom Exp $ 3 | # ----------------------------------------------------------------------------- 4 | # this file is part of xterm 5 | # 6 | # Copyright 1999-2003,2011 by Thomas E. Dickey 7 | # 8 | # All Rights Reserved 9 | # 10 | # Permission is hereby granted, free of charge, to any person obtaining a 11 | # copy of this software and associated documentation files (the 12 | # "Software"), to deal in the Software without restriction, including 13 | # without limitation the rights to use, copy, modify, merge, publish, 14 | # distribute, sublicense, and/or sell copies of the Software, and to 15 | # permit persons to whom the Software is furnished to do so, subject to 16 | # the following conditions: 17 | # 18 | # The above copyright notice and this permission notice shall be included 19 | # in all copies or substantial portions of the Software. 20 | # 21 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 22 | # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 23 | # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 24 | # IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY 25 | # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 26 | # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 27 | # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 28 | # 29 | # Except as contained in this notice, the name(s) of the above copyright 30 | # holders shall not be used in advertising or otherwise to promote the 31 | # sale, use or other dealings in this Software without prior written 32 | # authorization. 33 | # ----------------------------------------------------------------------------- 34 | # Show a simple 16-color test pattern. It is a little more confusing than 35 | # 8colors.sh, since everything is abbreviated to fit on an 80-column line. 36 | # The high (8-15) combinations for foreground or background are marked with 37 | # a '+' sign. 38 | 39 | ESC="" 40 | CMD='/bin/echo' 41 | OPT='-n' 42 | SUF='' 43 | TMP=/tmp/xterm$$ 44 | eval '$CMD $OPT >$TMP || echo fail >$TMP' 2>/dev/null 45 | ( test ! -f $TMP || test -s $TMP ) && 46 | for verb in printf print ; do 47 | rm -f $TMP 48 | eval '$verb "\c" >$TMP || echo fail >$TMP' 2>/dev/null 49 | if test -f $TMP ; then 50 | if test ! -s $TMP ; then 51 | CMD="$verb" 52 | OPT= 53 | SUF='\c' 54 | break 55 | fi 56 | fi 57 | done 58 | rm -f $TMP 59 | 60 | if ( trap "echo exit" EXIT 2>/dev/null ) >/dev/null 61 | then 62 | trap '$CMD ""; exit' EXIT HUP INT TRAP TERM 63 | else 64 | trap '$CMD ""; exit' 0 1 2 5 15 65 | fi 66 | 67 | echo "" 68 | while true 69 | do 70 | for AT in 0 1 4 7 71 | do 72 | case $AT in 73 | 0) attr=" ";; 74 | 1) attr="BO ";; 75 | 4) attr="UN ";; 76 | 7) attr="RV ";; 77 | esac 78 | for FG in 0 1 2 3 4 5 6 7 79 | do 80 | case $FG in 81 | 0) fcolor="BLK ";; 82 | 1) fcolor="RED ";; 83 | 2) fcolor="GRN ";; 84 | 3) fcolor="YEL ";; 85 | 4) fcolor="BLU ";; 86 | 5) fcolor="MAG ";; 87 | 6) fcolor="CYN ";; 88 | 7) fcolor="WHT ";; 89 | esac 90 | for HI in 3 9 91 | do 92 | if test $HI = 3 ; then 93 | color=" $fcolor" 94 | else 95 | color="+$fcolor" 96 | fi 97 | $CMD $OPT "[0;${AT}m$attr$SUF" 98 | $CMD $OPT "[${HI}${FG}m$color$SUF" 99 | for BG in 1 2 3 4 5 6 7 100 | do 101 | case $BG in 102 | 0) bcolor="BLK ";; 103 | 1) bcolor="RED ";; 104 | 2) bcolor="GRN ";; 105 | 3) bcolor="YEL ";; 106 | 4) bcolor="BLU ";; 107 | 5) bcolor="MAG ";; 108 | 6) bcolor="CYN ";; 109 | 7) bcolor="WHT ";; 110 | esac 111 | $CMD $OPT "[4${BG}m$bcolor$SUF" 112 | $CMD $OPT "[10${BG}m+$bcolor$SUF" 113 | done 114 | echo "" 115 | done 116 | done 117 | sleep 1 118 | done 119 | done 120 | -------------------------------------------------------------------------------- /vttests/dynamic.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl -w 2 | # $XTermId: dynamic.pl,v 1.2 2011/07/05 09:32:53 tom Exp $ 3 | # ----------------------------------------------------------------------------- 4 | # this file is part of xterm 5 | # 6 | # Copyright 2011 by Thomas E. Dickey 7 | # 8 | # All Rights Reserved 9 | # 10 | # Permission is hereby granted, free of charge, to any person obtaining a 11 | # copy of this software and associated documentation files (the 12 | # "Software"), to deal in the Software without restriction, including 13 | # without limitation the rights to use, copy, modify, merge, publish, 14 | # distribute, sublicense, and/or sell copies of the Software, and to 15 | # permit persons to whom the Software is furnished to do so, subject to 16 | # the following conditions: 17 | # 18 | # The above copyright notice and this permission notice shall be included 19 | # in all copies or substantial portions of the Software. 20 | # 21 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 22 | # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 23 | # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 24 | # IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY 25 | # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 26 | # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 27 | # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 28 | # 29 | # Except as contained in this notice, the name(s) of the above copyright 30 | # holders shall not be used in advertising or otherwise to promote the 31 | # sale, use or other dealings in this Software without prior written 32 | # authorization. 33 | # ----------------------------------------------------------------------------- 34 | # Test the dynamic-color query option of xterm. 35 | # The programs xtermcontrol and xtermset provide more options. 36 | 37 | use strict; 38 | 39 | use Getopt::Std; 40 | use IO::Handle; 41 | 42 | our @color_names = ( 43 | "VT100 text foreground", 44 | "VT100 text background", 45 | "text cursor", 46 | "mouse foreground", 47 | "mouse background", 48 | "Tektronix foreground", 49 | "Tektronix background", 50 | "highlight background", 51 | "Tektronix cursor", 52 | "highlight foreground" 53 | ); 54 | 55 | our ($opt_c, $opt_r); 56 | &getopts('c:r') || die("Usage: $0 [options]\n 57 | Options:\n 58 | -c XXX set cursor-color 59 | -r reset colors 60 | "); 61 | 62 | sub no_reply($) { 63 | open TTY, "+; 81 | close TTY; 82 | system "stty $old"; 83 | if ( defined $reply ) { 84 | die("^C received\n") if ( "$reply" eq "\003" ); 85 | } 86 | return $reply; 87 | } 88 | 89 | sub query_color($) { 90 | my $code = $_[0]; 91 | my $param1 = $code + 10; 92 | my $reply; 93 | 94 | $reply=get_reply("\x1b]$param1;?\007"); 95 | 96 | return unless defined $reply; 97 | if ( $reply =~ /\x1b]$param1;.*\007/ ) { 98 | my $value = $reply; 99 | 100 | $value =~ s/^\x1b]$param1;//; 101 | $value =~ s/\007//; 102 | 103 | printf "%24s = %s\n", $color_names[$code], $value; 104 | } 105 | } 106 | 107 | sub query_colors() { 108 | my $n; 109 | 110 | for ( $n = 0; $n <= 9; ++$n) { 111 | &query_color($n); 112 | } 113 | } 114 | 115 | sub reset_colors() { 116 | my $n; 117 | 118 | for ( $n = 0; $n <= 9; ++$n) { 119 | my $code = 110 + $n; 120 | &no_reply("\x1b]$code\007"); 121 | } 122 | } 123 | 124 | if ( defined ($opt_c) ) { 125 | &no_reply("\x1b]12;$opt_c\007"); 126 | } 127 | if ( defined ($opt_r) ) { 128 | &reset_colors(); 129 | } 130 | 131 | &query_colors(); 132 | -------------------------------------------------------------------------------- /vttests/resize.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | # $XTermId: resize.pl,v 1.3 2004/03/04 02:21:58 tom Exp $ 3 | # ----------------------------------------------------------------------------- 4 | # this file is part of xterm 5 | # 6 | # Copyright 2004 by Thomas E. Dickey 7 | # 8 | # All Rights Reserved 9 | # 10 | # Permission is hereby granted, free of charge, to any person obtaining a 11 | # copy of this software and associated documentation files (the 12 | # "Software"), to deal in the Software without restriction, including 13 | # without limitation the rights to use, copy, modify, merge, publish, 14 | # distribute, sublicense, and/or sell copies of the Software, and to 15 | # permit persons to whom the Software is furnished to do so, subject to 16 | # the following conditions: 17 | # 18 | # The above copyright notice and this permission notice shall be included 19 | # in all copies or substantial portions of the Software. 20 | # 21 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 22 | # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 23 | # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 24 | # IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY 25 | # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 26 | # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 27 | # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 28 | # 29 | # Except as contained in this notice, the name(s) of the above copyright 30 | # holders shall not be used in advertising or otherwise to promote the 31 | # sale, use or other dealings in this Software without prior written 32 | # authorization. 33 | # ----------------------------------------------------------------------------- 34 | # resize.sh rewritten into Perl for comparison. 35 | # See also Term::ReadKey. 36 | 37 | use IO::Handle; 38 | 39 | sub write_tty { 40 | open TTY, "+; 54 | close TTY; 55 | system "stty $old"; 56 | return $reply; 57 | } 58 | 59 | sub csi_field { 60 | my $first = @_[0]; 61 | my $second = @_[1]; 62 | $first =~ s/^[^0-9]+//; 63 | while ( --$second > 0 ) { 64 | $first =~ s/^[\d]+//; 65 | $first =~ s/^[^\d]+//; 66 | } 67 | $first =~ s/[^\d]+.*$//; 68 | return $first; 69 | } 70 | 71 | $original=get_reply("\x1b[18t"); 72 | if ( $original =~ /\x1b\[8;\d+;\d+t/ ) { 73 | $high=csi_field($original,2); 74 | $wide=csi_field($original,3); 75 | printf "parsed terminal size $high,$wide\n"; 76 | } else { 77 | die "Cannot get terminal size via escape sequence\n"; 78 | } 79 | # 80 | $maximize=get_reply("\x1b[19t"); 81 | if ( $maximize =~ /\x1b\[9;\d+;\d+t/ ) { 82 | $maxhigh=csi_field($maximize,2); 83 | $maxwide=csi_field($maximize,3); 84 | $maxhigh != 0 or $maxhigh = $high * 2; 85 | $maxwide != 0 or $maxwide = $wide * 2; 86 | printf "parsed terminal maxsize $maxhigh,$maxwide\n"; 87 | } else { 88 | die "Cannot get terminal size via escape sequence\n"; 89 | } 90 | 91 | sub catch_zap { 92 | $zapped++; 93 | } 94 | $SIG{INT} = \&catch_zap; 95 | $SIG{QUIT} = \&catch_zap; 96 | $SIG{KILL} = \&catch_zap; 97 | $SIG{HUP} = \&catch_zap; 98 | $SIG{TERM} = \&catch_zap; 99 | 100 | $w=$wide; 101 | $h=$high; 102 | $a=1; 103 | $zapped=0; 104 | while ( $zapped == 0 ) 105 | { 106 | # sleep 1 107 | printf "resizing to $h by $w\n"; 108 | write_tty("\x1b[8;$h;$w" . "t"); 109 | if ( $a == 1 ) { 110 | if ( $w == $maxwide ) { 111 | $h += $a; 112 | if ( $h = $maxhigh ) { 113 | $a = -1; 114 | } 115 | } else { 116 | $w += $a; 117 | } 118 | } else { 119 | if ( $w == $wide ) { 120 | $h += $a; 121 | if ( $h = $high ) { 122 | $a=1; 123 | } 124 | } else { 125 | $w += $a; 126 | } 127 | } 128 | } 129 | write_tty($original); 130 | -------------------------------------------------------------------------------- /uxterm: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # $XTermId: uxterm,v 1.26 2007/12/30 16:33:36 tom Exp $ 3 | # ----------------------------------------------------------------------------- 4 | # this file is part of xterm 5 | # 6 | # Copyright 2001-2006,2007 by Thomas E. Dickey 7 | # 8 | # All Rights Reserved 9 | # 10 | # Permission is hereby granted, free of charge, to any person obtaining a 11 | # copy of this software and associated documentation files (the 12 | # "Software"), to deal in the Software without restriction, including 13 | # without limitation the rights to use, copy, modify, merge, publish, 14 | # distribute, sublicense, and/or sell copies of the Software, and to 15 | # permit persons to whom the Software is furnished to do so, subject to 16 | # the following conditions: 17 | # 18 | # The above copyright notice and this permission notice shall be included 19 | # in all copies or substantial portions of the Software. 20 | # 21 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 22 | # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 23 | # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 24 | # IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY 25 | # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 26 | # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 27 | # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 28 | # 29 | # Except as contained in this notice, the name(s) of the above copyright 30 | # holders shall not be used in advertising or otherwise to promote the 31 | # sale, use or other dealings in this Software without prior written 32 | # authorization. 33 | # ----------------------------------------------------------------------------- 34 | # 35 | # wrapper script to setup xterm with UTF-8 locale 36 | 37 | whoami=uxterm 38 | 39 | : ${XTERM_PROGRAM=xterm} 40 | 41 | # Check if there is a workable locale program. If there is not, we will read 42 | # something via the standard error. Ignore whatever is written to the 43 | # standard output. 44 | locale=`sh -c "LC_ALL=C LC_CTYPE=C LANG=C locale >/dev/null" 2>&1` 45 | found=no 46 | 47 | # Check for -version and -help options, to provide a simple return without 48 | # requiring the program to create a window: 49 | if test $# = 1 50 | then 51 | case $1 in 52 | -v|-ver*|-h|-he*) 53 | $XTERM_PROGRAM "$@" 54 | exit $? 55 | ;; 56 | esac 57 | fi 58 | 59 | # Check environment variables that xterm does, in the same order: 60 | for name in LC_ALL LC_CTYPE LANG 61 | do 62 | eval 'value=$'$name 63 | if test -n "$value" ; then 64 | case $value in 65 | *.utf8|*.UTF8|*.utf-8|*.UTF-8) 66 | found=yes 67 | ;; 68 | *.utf8@*|*.UTF8@*|*.utf-8@*|*.UTF-8@*) 69 | found=yes 70 | ;; 71 | C|POSIX) 72 | # Yes, I know this is not the same - but why are you 73 | # here then? 74 | value=en_US 75 | ;; 76 | esac 77 | break 78 | fi 79 | done 80 | 81 | # If we didn't find one that used UTF-8, modify the safest one. Not everyone 82 | # has a UTF-8 locale installed (and there appears to be no trivial/portable way 83 | # to determine whether it is, from a shell script). We could check if the 84 | # user's shell does not reset unknown locale specifiers, but not all shells do. 85 | if test $found != yes ; then 86 | if test -n "$value" ; then 87 | value=`echo ${value} |sed -e 's/[.@].*//'`.UTF-8 88 | else 89 | name="LC_CTYPE" 90 | value="en_US.UTF-8" 91 | fi 92 | eval save=\$${name} 93 | eval ${name}=${value} 94 | eval export ${name} 95 | if test -z "$locale" ; then 96 | # The 'locale' program tries to do a sanity check. 97 | check=`sh -c "locale >/dev/null" 2>&1` 98 | if test -n "$check" ; then 99 | eval ${name}=${save} 100 | eval export ${name} 101 | 102 | echo "$whoami tried to use locale $value by setting \$$name" >&2 103 | xmessage -file - < 55 | 56 | Widget toplevel; /* top-most widget in xterm */ 57 | 58 | #if OPT_TEK4014 59 | Char *Tpushb; 60 | Char *Tpushback; 61 | TekLink *tekRefreshList; 62 | TekWidget tekWidget; 63 | Widget tekshellwidget; 64 | int T_lastx = -1; 65 | int T_lasty = -1; 66 | int Ttoggled = 0; 67 | jmp_buf Tekend; 68 | #endif 69 | 70 | char *ProgramName; 71 | 72 | Arg ourTopLevelShellArgs[] = 73 | { 74 | {XtNallowShellResize, (XtArgVal) True}, 75 | {XtNinput, (XtArgVal) True}, 76 | }; 77 | Cardinal number_ourTopLevelShellArgs = 2; 78 | 79 | Atom wm_delete_window; /* for ICCCM delete window */ 80 | 81 | XTERM_RESOURCE resource; 82 | 83 | PtyData *VTbuffer; 84 | 85 | jmp_buf VTend; 86 | 87 | #ifdef DEBUG 88 | int debug = 0; /* true causes error messages to be displayed */ 89 | #endif /* DEBUG */ 90 | 91 | XtAppContext app_con; 92 | XtermWidget term; /* master data structure for client */ 93 | 94 | int hold_screen; 95 | SIG_ATOMIC_T need_cleanup = False; 96 | 97 | int am_slave = -1; /* set to file-descriptor if we're a slave process */ 98 | int max_plus1; 99 | PtySelect Select_mask; 100 | PtySelect X_mask; 101 | PtySelect pty_mask; 102 | char *ptydev; 103 | char *ttydev; 104 | 105 | #if HANDLE_STRUCT_NOTIFY 106 | int mapstate = -1; 107 | #endif /* HANDLE_STRUCT_NOTIFY */ 108 | 109 | #if OPT_SESSION_MGT 110 | int ice_fd = -1; 111 | #endif 112 | 113 | #ifdef USE_IGNORE_RC 114 | int ignore_unused; 115 | #endif 116 | -------------------------------------------------------------------------------- /koi8rxterm: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # $XTermId: koi8rxterm,v 1.5 2007/12/30 16:33:06 tom Exp $ 3 | # ----------------------------------------------------------------------------- 4 | # this file is part of xterm 5 | # 6 | # Copyright 2007 by Thomas E. Dickey 7 | # 8 | # All Rights Reserved 9 | # 10 | # Permission is hereby granted, free of charge, to any person obtaining a 11 | # copy of this software and associated documentation files (the 12 | # "Software"), to deal in the Software without restriction, including 13 | # without limitation the rights to use, copy, modify, merge, publish, 14 | # distribute, sublicense, and/or sell copies of the Software, and to 15 | # permit persons to whom the Software is furnished to do so, subject to 16 | # the following conditions: 17 | # 18 | # The above copyright notice and this permission notice shall be included 19 | # in all copies or substantial portions of the Software. 20 | # 21 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 22 | # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 23 | # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 24 | # IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY 25 | # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 26 | # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 27 | # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 28 | # 29 | # Except as contained in this notice, the name(s) of the above copyright 30 | # holders shall not be used in advertising or otherwise to promote the 31 | # sale, use or other dealings in this Software without prior written 32 | # authorization. 33 | # ----------------------------------------------------------------------------- 34 | # This is a wrapper script to set up xterm with a KOI8-R locale; based on 35 | # uxterm by Branden Robinson. 36 | 37 | whoami=koi8rxterm 38 | 39 | : ${XTERM_PROGRAM=xterm} 40 | 41 | # Check if there is a workable locale program. If there is not, we will read 42 | # something via the standard error. Ignore whatever is written to the 43 | # standard output. 44 | locale=`sh -c "LC_ALL=C LC_CTYPE=C LANG=C locale >/dev/null" 2>&1` 45 | found=no 46 | 47 | # Check for -version and -help options, to provide a simple return without 48 | # requiring the program to create a window: 49 | if test $# = 1 50 | then 51 | case $1 in 52 | -v|-ver*|-h|-he*) 53 | $XTERM_PROGRAM "$@" 54 | exit $? 55 | ;; 56 | esac 57 | fi 58 | 59 | # Check environment variables that xterm does, in the same order: 60 | for name in LC_ALL LC_CTYPE LANG 61 | do 62 | eval 'value=$'$name 63 | if test -n "$value" ; then 64 | case $value in 65 | *.koi8r|*.KOI8R|*.koi8-r|*.KOI8-R) 66 | found=yes 67 | ;; 68 | *.koi8r@*|*.KOI8R@*|*.koi8-r@*|*.KOI8-R*) 69 | found=yes 70 | ;; 71 | *) 72 | # The user may not have configured his or her 73 | # locale; try to muddle through anyway. 74 | value=ru_RU.KOI8-R 75 | ;; 76 | esac 77 | break 78 | fi 79 | done 80 | 81 | # If we didn't find one that uses KOI8-R, modify the safest one. Not everyone 82 | # has a KOI8-R locale installed (and there appears to be no trivial/portable 83 | # way to determine whether it is, from a shell script). We could check if the 84 | # user's shell does not reset unknown locale specifiers, but not all shells do. 85 | if test $found != yes ; then 86 | if test -n "$value" ; then 87 | value=`echo ${value} |sed -e 's/[.@].*//'`.KOI8-R 88 | else 89 | name="LC_CTYPE" 90 | value="ru_RU.KOI8-R" 91 | fi 92 | eval save=\$${name} 93 | eval ${name}=${value} 94 | eval export ${name} 95 | if test -z "$locale" ; then 96 | # The 'locale' program tries to do a sanity check. 97 | check=`sh -c "locale >/dev/null" 2>&1` 98 | if test -n "$check" ; then 99 | eval ${name}=${save} 100 | eval export ${name} 101 | 102 | echo "$whoami tried to use locale $value by setting \$$name" >&2 103 | xmessage -file - < 34 | 35 | #define REAL_ROW(screen, row) ((row) + 1 + (screen)->saved_fifo) 36 | #define ROW2FIFO(screen, row) \ 37 | (unsigned) (REAL_ROW(screen, row) % (screen)->savelines) 38 | 39 | /* 40 | * Given a row-number, find the corresponding data for the line in the VT100 41 | * widget's saved-line FIFO. The row-number (from getLineData) is negative. 42 | * So we just count backwards from the last saved line. 43 | */ 44 | LineData * 45 | getScrollback(TScreen * screen, int row) 46 | { 47 | LineData *result = 0; 48 | 49 | if (screen->saved_fifo > 0 && REAL_ROW(screen, row) >= 0) { 50 | unsigned which = ROW2FIFO(screen, row); 51 | ScrnBuf where = scrnHeadAddr(screen, screen->saveBuf_index, which); 52 | result = (LineData *) where; 53 | } 54 | 55 | TRACE(("getScrollback %d -> %d -> %p\n", 56 | row, ROW2FIFO(screen, row), 57 | (void *) result)); 58 | return result; 59 | } 60 | 61 | /* 62 | * Allocate a new row in the scrollback FIFO, returning a pointer to it. 63 | */ 64 | LineData * 65 | addScrollback(TScreen * screen) 66 | { 67 | ScrnBuf where = 0; 68 | unsigned which; 69 | unsigned ncols = (unsigned) MaxCols(screen); 70 | Char *block; 71 | 72 | if (screen->saveBuf_index != 0) { 73 | screen->saved_fifo++; 74 | TRACE(("addScrollback %lu\n", screen->saved_fifo)); 75 | 76 | /* first, see which index we'll use */ 77 | which = (unsigned) (screen->saved_fifo % screen->savelines); 78 | where = scrnHeadAddr(screen, screen->saveBuf_index, which); 79 | 80 | /* discard any obsolete index data */ 81 | if (screen->saved_fifo > screen->savelines) { 82 | LineData *prior = (LineData *) where; 83 | /* 84 | * setupLineData uses the attribs as the first address used from the 85 | * data block. 86 | */ 87 | if (prior->attribs != 0) { 88 | TRACE(("...freeing prior FIFO data in slot %d: %p->%p\n", 89 | which, (void *) prior, prior->attribs)); 90 | free(prior->attribs); 91 | prior->attribs = 0; 92 | } 93 | } 94 | 95 | /* allocate the new data */ 96 | block = allocScrnData(screen, 1, ncols); 97 | 98 | /* record the new data in the index */ 99 | setupLineData(screen, where, (Char *) block, 1, ncols); 100 | 101 | TRACE(("...storing new FIFO data in slot %d: %p->%p\n", 102 | which, (void *) where, block)); 103 | 104 | } 105 | return (LineData *) where; 106 | } 107 | 108 | void 109 | deleteScrollback(TScreen * screen, int row) 110 | { 111 | unsigned which = ROW2FIFO(screen, row); 112 | ScrnBuf where = scrnHeadAddr(screen, screen->saveBuf_index, which); 113 | LineData *prior = (LineData *) where; 114 | /* 115 | * setupLineData uses the attribs as the first address used from the 116 | * data block. 117 | */ 118 | if (prior->attribs != 0) { 119 | TRACE(("...freeing prior FIFO data in slot %d: %p->%p\n", 120 | which, (void *) prior, prior->attribs)); 121 | free(prior->attribs); 122 | prior->attribs = 0; 123 | } 124 | } 125 | -------------------------------------------------------------------------------- /VTparse.def: -------------------------------------------------------------------------------- 1 | # $XTermId: VTparse.def,v 1.46 2012/09/10 23:26:44 tom Exp $ 2 | # 3 | # vile:confmode rs=lf 4 | # ----------------------------------------------------------------------------- 5 | # this file is part of xterm 6 | # 7 | # Copyright 1996-2011,2012 by Thomas E. Dickey 8 | # 9 | # All Rights Reserved 10 | # 11 | # Permission is hereby granted, free of charge, to any person obtaining a 12 | # copy of this software and associated documentation files (the 13 | # "Software"), to deal in the Software without restriction, including 14 | # without limitation the rights to use, copy, modify, merge, publish, 15 | # distribute, sublicense, and/or sell copies of the Software, and to 16 | # permit persons to whom the Software is furnished to do so, subject to 17 | # the following conditions: 18 | # 19 | # The above copyright notice and this permission notice shall be included 20 | # in all copies or substantial portions of the Software. 21 | # 22 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 23 | # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 24 | # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 25 | # IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY 26 | # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 27 | # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 28 | # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 29 | # 30 | # Except as contained in this notice, the name(s) of the above copyright 31 | # holders shall not be used in advertising or otherwise to promote the 32 | # sale, use or other dealings in this Software without prior written 33 | # authorization. 34 | # ----------------------------------------------------------------------------- 35 | # 36 | # List of symbols that need to be defined for VTparse.h. If you need to 37 | # change any of the CASE_ macros, make the change here and rerun the command 38 | # shown in VTparse.h. 39 | # 40 | 41 | CASE_GROUND_STATE 42 | CASE_IGNORE 43 | CASE_BELL 44 | CASE_BS 45 | CASE_CR 46 | CASE_ESC 47 | CASE_VMOT 48 | CASE_TAB 49 | CASE_SI 50 | CASE_SO 51 | CASE_SCR_STATE 52 | CASE_SCS0_STATE 53 | CASE_SCS1_STATE 54 | CASE_SCS2_STATE 55 | CASE_SCS3_STATE 56 | CASE_ESC_IGNORE 57 | CASE_ESC_DIGIT 58 | CASE_ESC_SEMI 59 | CASE_DEC_STATE 60 | CASE_ICH 61 | CASE_CUU 62 | CASE_CUD 63 | CASE_CUF 64 | CASE_CUB 65 | CASE_CUP 66 | CASE_ED 67 | CASE_EL 68 | CASE_IL 69 | CASE_DL 70 | CASE_DCH 71 | CASE_DA1 72 | CASE_TRACK_MOUSE 73 | CASE_TBC 74 | CASE_SET 75 | CASE_RST 76 | CASE_SGR 77 | CASE_CPR 78 | CASE_DECSTBM 79 | CASE_DECREQTPARM 80 | CASE_DECSET 81 | CASE_DECRST 82 | CASE_DECALN 83 | CASE_GSETS 84 | CASE_DECSC 85 | CASE_DECRC 86 | CASE_DECKPAM 87 | CASE_DECKPNM 88 | CASE_IND 89 | CASE_NEL 90 | CASE_HTS 91 | CASE_RI 92 | CASE_SS2 93 | CASE_SS3 94 | CASE_CSI_STATE 95 | CASE_OSC 96 | CASE_RIS 97 | CASE_LS2 98 | CASE_LS3 99 | CASE_LS3R 100 | CASE_LS2R 101 | CASE_LS1R 102 | CASE_PRINT 103 | CASE_XTERM_SAVE 104 | CASE_XTERM_RESTORE 105 | CASE_XTERM_TITLE 106 | CASE_DECID 107 | CASE_HP_MEM_LOCK 108 | CASE_HP_MEM_UNLOCK 109 | CASE_HP_BUGGY_LL 110 | CASE_HPA 111 | CASE_VPA 112 | CASE_XTERM_WINOPS 113 | CASE_ECH 114 | CASE_CHT 115 | CASE_CPL 116 | CASE_CNL 117 | CASE_CBT 118 | CASE_SU 119 | CASE_SD 120 | CASE_S7C1T 121 | CASE_S8C1T 122 | CASE_ESC_SP_STATE 123 | CASE_ENQ 124 | CASE_DECSCL 125 | CASE_DECSCA 126 | CASE_DECSED 127 | CASE_DECSEL 128 | CASE_DCS 129 | CASE_PM 130 | CASE_SOS 131 | CASE_ST 132 | CASE_APC 133 | CASE_EPA 134 | CASE_SPA 135 | CASE_CSI_QUOTE_STATE 136 | CASE_DSR 137 | CASE_ANSI_LEVEL_1 138 | CASE_ANSI_LEVEL_2 139 | CASE_ANSI_LEVEL_3 140 | CASE_MC 141 | CASE_DEC2_STATE 142 | CASE_DA2 143 | CASE_DEC3_STATE 144 | CASE_DECRPTUI 145 | CASE_VT52_CUP 146 | CASE_REP 147 | CASE_CSI_EX_STATE 148 | CASE_DECSTR 149 | CASE_DECDHL 150 | CASE_DECSWL 151 | CASE_DECDWL 152 | CASE_DEC_MC 153 | CASE_ESC_PERCENT 154 | CASE_UTF8 155 | CASE_CSI_TICK_STATE 156 | CASE_DECELR 157 | CASE_DECRQLP 158 | CASE_DECEFR 159 | CASE_DECSLE 160 | CASE_CSI_IGNORE 161 | CASE_VT52_IGNORE 162 | CASE_VT52_FINISH 163 | CASE_CSI_DOLLAR_STATE 164 | CASE_DECCRA 165 | CASE_DECERA 166 | CASE_DECFRA 167 | CASE_DECSERA 168 | CASE_DECSACE 169 | CASE_DECCARA 170 | CASE_DECRARA 171 | CASE_CSI_STAR_STATE 172 | CASE_SET_MOD_FKEYS 173 | CASE_SET_MOD_FKEYS0 174 | CASE_HIDE_POINTER 175 | CASE_SCS1A_STATE 176 | CASE_SCS2A_STATE 177 | CASE_SCS3A_STATE 178 | CASE_CSI_SPACE_STATE 179 | CASE_DECSCUSR 180 | CASE_SM_TITLE 181 | CASE_RM_TITLE 182 | CASE_DECSMBV 183 | CASE_DECSWBV 184 | CASE_DECLL 185 | CASE_DECRQM 186 | CASE_RQM 187 | CASE_CSI_DEC_DOLLAR_STATE 188 | CASE_SL 189 | CASE_SR 190 | CASE_DECDC 191 | CASE_DECIC 192 | CASE_DECBI 193 | CASE_DECFI 194 | CASE_DECRQCRA 195 | CASE_HPR 196 | CASE_VPR 197 | CASE_ANSI_SC 198 | CASE_ANSI_RC 199 | CASE_ESC_COLON 200 | -------------------------------------------------------------------------------- /88colres.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This header file was generated by ./88colres.pl 3 | */ 4 | /* $XTermId: 88colres.h,v 1.11 2007/06/12 00:44:21 tom Exp $ */ 5 | 6 | #ifndef included_88colres_h 7 | #define included_88colres_h 8 | 9 | COLOR_RES("16", screen.Acolors[16], DFT_COLOR("rgb:00/00/00")), 10 | COLOR_RES("17", screen.Acolors[17], DFT_COLOR("rgb:00/00/8b")), 11 | COLOR_RES("18", screen.Acolors[18], DFT_COLOR("rgb:00/00/cd")), 12 | COLOR_RES("19", screen.Acolors[19], DFT_COLOR("rgb:00/00/ff")), 13 | COLOR_RES("20", screen.Acolors[20], DFT_COLOR("rgb:00/8b/00")), 14 | COLOR_RES("21", screen.Acolors[21], DFT_COLOR("rgb:00/8b/8b")), 15 | COLOR_RES("22", screen.Acolors[22], DFT_COLOR("rgb:00/8b/cd")), 16 | COLOR_RES("23", screen.Acolors[23], DFT_COLOR("rgb:00/8b/ff")), 17 | COLOR_RES("24", screen.Acolors[24], DFT_COLOR("rgb:00/cd/00")), 18 | COLOR_RES("25", screen.Acolors[25], DFT_COLOR("rgb:00/cd/8b")), 19 | COLOR_RES("26", screen.Acolors[26], DFT_COLOR("rgb:00/cd/cd")), 20 | COLOR_RES("27", screen.Acolors[27], DFT_COLOR("rgb:00/cd/ff")), 21 | COLOR_RES("28", screen.Acolors[28], DFT_COLOR("rgb:00/ff/00")), 22 | COLOR_RES("29", screen.Acolors[29], DFT_COLOR("rgb:00/ff/8b")), 23 | COLOR_RES("30", screen.Acolors[30], DFT_COLOR("rgb:00/ff/cd")), 24 | COLOR_RES("31", screen.Acolors[31], DFT_COLOR("rgb:00/ff/ff")), 25 | COLOR_RES("32", screen.Acolors[32], DFT_COLOR("rgb:8b/00/00")), 26 | COLOR_RES("33", screen.Acolors[33], DFT_COLOR("rgb:8b/00/8b")), 27 | COLOR_RES("34", screen.Acolors[34], DFT_COLOR("rgb:8b/00/cd")), 28 | COLOR_RES("35", screen.Acolors[35], DFT_COLOR("rgb:8b/00/ff")), 29 | COLOR_RES("36", screen.Acolors[36], DFT_COLOR("rgb:8b/8b/00")), 30 | COLOR_RES("37", screen.Acolors[37], DFT_COLOR("rgb:8b/8b/8b")), 31 | COLOR_RES("38", screen.Acolors[38], DFT_COLOR("rgb:8b/8b/cd")), 32 | COLOR_RES("39", screen.Acolors[39], DFT_COLOR("rgb:8b/8b/ff")), 33 | COLOR_RES("40", screen.Acolors[40], DFT_COLOR("rgb:8b/cd/00")), 34 | COLOR_RES("41", screen.Acolors[41], DFT_COLOR("rgb:8b/cd/8b")), 35 | COLOR_RES("42", screen.Acolors[42], DFT_COLOR("rgb:8b/cd/cd")), 36 | COLOR_RES("43", screen.Acolors[43], DFT_COLOR("rgb:8b/cd/ff")), 37 | COLOR_RES("44", screen.Acolors[44], DFT_COLOR("rgb:8b/ff/00")), 38 | COLOR_RES("45", screen.Acolors[45], DFT_COLOR("rgb:8b/ff/8b")), 39 | COLOR_RES("46", screen.Acolors[46], DFT_COLOR("rgb:8b/ff/cd")), 40 | COLOR_RES("47", screen.Acolors[47], DFT_COLOR("rgb:8b/ff/ff")), 41 | COLOR_RES("48", screen.Acolors[48], DFT_COLOR("rgb:cd/00/00")), 42 | COLOR_RES("49", screen.Acolors[49], DFT_COLOR("rgb:cd/00/8b")), 43 | COLOR_RES("50", screen.Acolors[50], DFT_COLOR("rgb:cd/00/cd")), 44 | COLOR_RES("51", screen.Acolors[51], DFT_COLOR("rgb:cd/00/ff")), 45 | COLOR_RES("52", screen.Acolors[52], DFT_COLOR("rgb:cd/8b/00")), 46 | COLOR_RES("53", screen.Acolors[53], DFT_COLOR("rgb:cd/8b/8b")), 47 | COLOR_RES("54", screen.Acolors[54], DFT_COLOR("rgb:cd/8b/cd")), 48 | COLOR_RES("55", screen.Acolors[55], DFT_COLOR("rgb:cd/8b/ff")), 49 | COLOR_RES("56", screen.Acolors[56], DFT_COLOR("rgb:cd/cd/00")), 50 | COLOR_RES("57", screen.Acolors[57], DFT_COLOR("rgb:cd/cd/8b")), 51 | COLOR_RES("58", screen.Acolors[58], DFT_COLOR("rgb:cd/cd/cd")), 52 | COLOR_RES("59", screen.Acolors[59], DFT_COLOR("rgb:cd/cd/ff")), 53 | COLOR_RES("60", screen.Acolors[60], DFT_COLOR("rgb:cd/ff/00")), 54 | COLOR_RES("61", screen.Acolors[61], DFT_COLOR("rgb:cd/ff/8b")), 55 | COLOR_RES("62", screen.Acolors[62], DFT_COLOR("rgb:cd/ff/cd")), 56 | COLOR_RES("63", screen.Acolors[63], DFT_COLOR("rgb:cd/ff/ff")), 57 | COLOR_RES("64", screen.Acolors[64], DFT_COLOR("rgb:ff/00/00")), 58 | COLOR_RES("65", screen.Acolors[65], DFT_COLOR("rgb:ff/00/8b")), 59 | COLOR_RES("66", screen.Acolors[66], DFT_COLOR("rgb:ff/00/cd")), 60 | COLOR_RES("67", screen.Acolors[67], DFT_COLOR("rgb:ff/00/ff")), 61 | COLOR_RES("68", screen.Acolors[68], DFT_COLOR("rgb:ff/8b/00")), 62 | COLOR_RES("69", screen.Acolors[69], DFT_COLOR("rgb:ff/8b/8b")), 63 | COLOR_RES("70", screen.Acolors[70], DFT_COLOR("rgb:ff/8b/cd")), 64 | COLOR_RES("71", screen.Acolors[71], DFT_COLOR("rgb:ff/8b/ff")), 65 | COLOR_RES("72", screen.Acolors[72], DFT_COLOR("rgb:ff/cd/00")), 66 | COLOR_RES("73", screen.Acolors[73], DFT_COLOR("rgb:ff/cd/8b")), 67 | COLOR_RES("74", screen.Acolors[74], DFT_COLOR("rgb:ff/cd/cd")), 68 | COLOR_RES("75", screen.Acolors[75], DFT_COLOR("rgb:ff/cd/ff")), 69 | COLOR_RES("76", screen.Acolors[76], DFT_COLOR("rgb:ff/ff/00")), 70 | COLOR_RES("77", screen.Acolors[77], DFT_COLOR("rgb:ff/ff/8b")), 71 | COLOR_RES("78", screen.Acolors[78], DFT_COLOR("rgb:ff/ff/cd")), 72 | COLOR_RES("79", screen.Acolors[79], DFT_COLOR("rgb:ff/ff/ff")), 73 | COLOR_RES("80", screen.Acolors[80], DFT_COLOR("rgb:2e/2e/2e")), 74 | COLOR_RES("81", screen.Acolors[81], DFT_COLOR("rgb:5c/5c/5c")), 75 | COLOR_RES("82", screen.Acolors[82], DFT_COLOR("rgb:73/73/73")), 76 | COLOR_RES("83", screen.Acolors[83], DFT_COLOR("rgb:8b/8b/8b")), 77 | COLOR_RES("84", screen.Acolors[84], DFT_COLOR("rgb:a2/a2/a2")), 78 | COLOR_RES("85", screen.Acolors[85], DFT_COLOR("rgb:b9/b9/b9")), 79 | COLOR_RES("86", screen.Acolors[86], DFT_COLOR("rgb:d0/d0/d0")), 80 | COLOR_RES("87", screen.Acolors[87], DFT_COLOR("rgb:e7/e7/e7")), 81 | 82 | #endif /* included_88colres_h */ 83 | -------------------------------------------------------------------------------- /icons/xterm.xpms: -------------------------------------------------------------------------------- 1 | /* $XTermId: xterm.xpms,v 1.3 2012/10/07 22:58:01 tom Exp $ */ 2 | /* generated by ./make-xpms */ 3 | /* vile:xpmmode */ 4 | /* XPM */ 5 | static const char * const xterm_16x16_xpm[] = { 6 | "16 16 2 1", 7 | " c None", 8 | ". c #000000", 9 | " ", 10 | " . ", 11 | " .... . ", 12 | " .. . ", 13 | " .. . ", 14 | " .. . . ", 15 | " . ", 16 | " .... .. . ", 17 | " . . . .. . ", 18 | " . . ", 19 | " . . ", 20 | " . ", 21 | " . ", 22 | " ", 23 | " ", 24 | " . "}; 25 | /* XPM */ 26 | static const char * const xterm_32x32_xpm[] = { 27 | "32 32 2 1", 28 | " c None", 29 | ". c #000000", 30 | " ", 31 | " . .. ", 32 | " . ................... ... ", 33 | " . . ... . ", 34 | " . ... . ", 35 | " . .. ... ... . ", 36 | " . . . ... . ", 37 | " . .. ... . ", 38 | " . .. ... . ", 39 | " . .. ... . ", 40 | " . . . ... . ", 41 | " . ... .. ... . ", 42 | " . ... . ", 43 | " . ... . ", 44 | " . ........ ... .. ..... . ", 45 | " . . . . . ........ . ", 46 | " . . ... .. . . .... . ", 47 | " . . . . . . . .... . ", 48 | " . . ... . .. . .... . ", 49 | " . . .... ", 50 | " . . . ... ", 51 | " . .. ", 52 | " ....................... ", 53 | " ", 54 | " ........................ ", 55 | " . .. ", 56 | " .. ", 57 | " . . . ", 58 | " . . ", 59 | " . . ................. .. . ", 60 | " . .. ", 61 | " "}; 62 | /* XPM */ 63 | static const char * const xterm_48x48_xpm[] = { 64 | "48 48 2 1", 65 | " c None", 66 | ". c #000000", 67 | " ", 68 | " .................................. ", 69 | " . .. ", 70 | " . ............................ . . ", 71 | " . . . . . ", 72 | " . . . . . ", 73 | " . . . . . ", 74 | " . . ... ... . . . ", 75 | " . . . . . . . ", 76 | " . . . . . . . ", 77 | " . . . . . . . ", 78 | " . . .. . . . ", 79 | " . . .. . . . ", 80 | " . . . . . . . ", 81 | " . . . . . . . ", 82 | " . . . . . . . ", 83 | " . . ... ... . . . ", 84 | " . . . . . ", 85 | " . . . . . ", 86 | " . . . . . ", 87 | " . . . . . ", 88 | " . . ..... ..... .... . . . . . ", 89 | " . . . . . . .. .. . . . ", 90 | " . . . . . . .. .. . . . ", 91 | " . . . ..... .... . . . . . . . ", 92 | " . . . . . . . ... . . . .. ", 93 | " . . . . . . . . . . . . ", 94 | " . . . ..... . . . . . . .. ", 95 | " . . . . . ", 96 | " . . . . .. ", 97 | " . . . . . ", 98 | " . ............................ ... ", 99 | " . .. ", 100 | " .................................. ", 101 | " ", 102 | " ", 103 | " .................................... ", 104 | " . .. ", 105 | " . . . . . . . . . . . . . . . . . ... ", 106 | " . . . ", 107 | " . . . . . . . . . . . . . . . . . .. . ", 108 | " . . . ", 109 | " .. . . . . . . . . . . . . . . . . .. . ", 110 | " . . . ", 111 | " .. .. .......................... .... . ", 112 | " . . . ", 113 | " ..................................... ", 114 | " "}; 115 | static const XPM_DATA xterm_xpms[] = { 116 | { "xterm_16x16", xterm_16x16_xpm }, 117 | { "xterm_32x32", xterm_32x32_xpm }, 118 | { "xterm_48x48", xterm_48x48_xpm } 119 | }; 120 | -------------------------------------------------------------------------------- /vttests/paste64.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl -w 2 | # $XTermId: paste64.pl,v 1.10 2006/03/13 01:28:02 tom Exp $ 3 | # ----------------------------------------------------------------------------- 4 | # this file is part of xterm 5 | # 6 | # Copyright 2006 by Thomas E. Dickey 7 | # 8 | # All Rights Reserved 9 | # 10 | # Permission is hereby granted, free of charge, to any person obtaining a 11 | # copy of this software and associated documentation files (the 12 | # "Software"), to deal in the Software without restriction, including 13 | # without limitation the rights to use, copy, modify, merge, publish, 14 | # distribute, sublicense, and/or sell copies of the Software, and to 15 | # permit persons to whom the Software is furnished to do so, subject to 16 | # the following conditions: 17 | # 18 | # The above copyright notice and this permission notice shall be included 19 | # in all copies or substantial portions of the Software. 20 | # 21 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 22 | # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 23 | # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 24 | # IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY 25 | # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 26 | # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 27 | # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 28 | # 29 | # Except as contained in this notice, the name(s) of the above copyright 30 | # holders shall not be used in advertising or otherwise to promote the 31 | # sale, use or other dealings in this Software without prior written 32 | # authorization. 33 | # ----------------------------------------------------------------------------- 34 | # Test the paste64 option of xterm. 35 | 36 | use strict; 37 | 38 | use Term::ReadKey; 39 | use IO::Handle; 40 | use MIME::Base64; 41 | 42 | our $target = ""; 43 | 44 | sub to_hex($) { 45 | my $value = $_[0]; 46 | my $result = ""; 47 | my $n; 48 | 49 | for ( $n = 0; $n < length($value); ++$n) { 50 | $result .= sprintf("%02X", ord substr($value,$n,1)); 51 | } 52 | return $result; 53 | } 54 | 55 | sub show_string($) { 56 | my $value = $_[0]; 57 | my $n; 58 | 59 | my $result = ""; 60 | for ( $n = 0; $n < length($value); $n += 1) { 61 | my $c = ord substr($value,$n,1); 62 | if ( $c == ord '\\' ) { 63 | $result .= "\\\\"; 64 | } elsif ( $c == 0x1b ) { 65 | $result .= "\\E"; 66 | } elsif ( $c == 0x7f ) { 67 | $result .= "^?"; 68 | } elsif ( $c == 32 ) { 69 | $result .= "\\s"; 70 | } elsif ( $c < 32 ) { 71 | $result .= sprintf("^%c", $c + 64); 72 | } elsif ( $c > 128 ) { 73 | $result .= sprintf("\\%03o", $c); 74 | } else { 75 | $result .= chr($c); 76 | } 77 | } 78 | 79 | printf "%s\r\n", $result; 80 | } 81 | 82 | sub get_reply($) { 83 | my $command = $_[0]; 84 | my $reply = ""; 85 | 86 | printf "send: "; 87 | show_string($command); 88 | 89 | print STDOUT $command; 90 | autoflush STDOUT 1; 91 | while (1) { 92 | my $test=ReadKey 1; 93 | last if not defined $test; 94 | #printf "%d:%s\r\n", length($reply), to_hex($test); 95 | $reply .= $test; 96 | } 97 | return $reply; 98 | } 99 | 100 | sub get_paste() { 101 | my $reply = get_reply("\x1b]52;" . $target . ";?\x1b\\"); 102 | 103 | printf "read: "; 104 | show_string($reply); 105 | 106 | my $data = $reply; 107 | $data =~ s/^\x1b]52;[[:alnum:]]*;//; 108 | $data =~ s/\x1b\\$//; 109 | printf "chop: "; 110 | show_string($data); 111 | 112 | $data = decode_base64($data); 113 | printf "data: "; 114 | show_string($data); 115 | } 116 | 117 | sub put_paste() { 118 | ReadMode 1; 119 | 120 | printf "data: "; 121 | my $data = ReadLine 0; 122 | chomp $data; 123 | ReadMode 5; 124 | 125 | $data = encode_base64($data); 126 | chomp $data; 127 | printf "data: "; 128 | show_string($data); 129 | 130 | my $send = "\x1b]52;" . $target . ";" . $data . "\x1b\\"; 131 | 132 | printf "send: "; 133 | show_string($send); 134 | } 135 | 136 | sub set_target() { 137 | ReadMode 1; 138 | 139 | printf "target: "; 140 | $target = ReadLine 0; 141 | $target =~ s/[^[:alnum:]]//g; 142 | ReadMode 5; 143 | printf "result: %s\r\n", $target; 144 | } 145 | 146 | ReadMode 5, 'STDIN'; # allow single-character inputs 147 | while (1) { 148 | my $cmd; 149 | 150 | printf "\r\nCommand (? for help):"; 151 | $cmd = ReadKey 0; 152 | if ( $cmd eq "?" ) { 153 | printf "\r\np=put selection, g=get selection, q=quit, r=reset target, s=set target\r\n"; 154 | } elsif ($cmd eq "p") { 155 | printf " ...put selection\r\n"; 156 | put_paste(); 157 | } elsif ($cmd eq "g") { 158 | printf " ...get selection\r\n"; 159 | get_paste(); 160 | } elsif ($cmd eq "q") { 161 | printf " ...quit\r\n"; 162 | last; 163 | } elsif ($cmd eq "r") { 164 | printf " ...reset\r\n"; 165 | $target = ""; 166 | } elsif ($cmd eq "s") { 167 | printf " ...set target\r\n"; 168 | set_target(); 169 | } 170 | } 171 | ReadMode 0, 'STDIN'; # Reset tty mode before exiting 172 | -------------------------------------------------------------------------------- /package/debian/changelog: -------------------------------------------------------------------------------- 1 | xterm-dev (291) unstable; urgency=low 2 | 3 | * Fix a different #282 change (Redhat #874327). 4 | 5 | -- Thomas E. Dickey Tue, 26 Feb 2013 19:09:32 -0500 6 | 7 | xterm-dev (290) unstable; urgency=low 8 | 9 | * Fix incomplete revert of #282 change. 10 | 11 | -- Thomas E. Dickey Tue, 12 Feb 2013 19:48:21 -0500 12 | 13 | xterm-dev (289) unstable; urgency=low 14 | 15 | * Miscellaneous fixes. 16 | * Fix regression with XTERM_SHELL feature. 17 | 18 | -- Thomas E. Dickey Sun, 03 Feb 2013 13:59:20 -0500 19 | 20 | xterm-dev (288) unstable; urgency=low 21 | 22 | * Miscellaneous fixes. 23 | 24 | -- Thomas E. Dickey Mon, 26 Nov 2012 20:53:23 -0500 25 | 26 | xterm-dev (287) unstable; urgency=low 27 | 28 | * Miscellaneous fixes. 29 | * Redhat #874327, #875305. 30 | 31 | -- Thomas E. Dickey Mon, 19 Nov 2012 04:53:39 -0500 32 | 33 | xterm-dev (286) unstable; urgency=low 34 | 35 | * Redhat #869959 36 | 37 | -- Thomas E. Dickey Thu, 25 Oct 2012 06:56:35 -0400 38 | 39 | xterm-dev (285) unstable; urgency=low 40 | 41 | * Miscellaneous fixes. 42 | 43 | -- Thomas E. Dickey Mon, 15 Oct 2012 06:57:38 -0400 44 | 45 | xterm-dev (284) unstable; urgency=low 46 | 47 | * fix documentation errata 48 | * fix regression in --enable-regex 49 | 50 | -- Thomas E. Dickey Wed, 10 Oct 2012 18:17:35 -0400 51 | 52 | xterm-dev (283) unstable; urgency=low 53 | 54 | * Miscellaneous fixes. 55 | 56 | -- Thomas E. Dickey Mon, 01 Oct 2012 20:45:50 -0400 57 | 58 | xterm-dev (282) unstable; urgency=low 59 | 60 | * Miscellaneous fixes. 61 | 62 | -- Thomas E. Dickey Mon, 20 Aug 2012 17:55:32 -0400 63 | 64 | xterm-dev (281) unstable; urgency=low 65 | 66 | * fix regression in keyboard configuration. 67 | 68 | -- Thomas E. Dickey Tue, 26 Jun 2012 04:36:36 -0400 69 | 70 | xterm-dev (280) unstable; urgency=low 71 | 72 | * Add Debian menu-file. 73 | * modify to support icon-theme 74 | * Miscellaneous fixes. 75 | 76 | -- Thomas E. Dickey Fri, 25 May 2012 05:36:50 -0400 77 | 78 | xterm-dev (279) unstable; urgency=low 79 | 80 | * Miscellaneous fixes. 81 | 82 | -- Thomas E. Dickey Wed, 14 Mar 2012 20:33:27 -0400 83 | 84 | xterm-dev (278) unstable; urgency=low 85 | 86 | * Fix regression in eightBitInput logic. 87 | * Fix regression in Darwin 9.x 88 | 89 | -- Thomas E. Dickey Thu, 12 Jan 2012 08:10:50 -0500 90 | 91 | xterm-dev (277) unstable; urgency=low 92 | 93 | * Minor keyboard fix. 94 | 95 | -- Thomas E. Dickey Tue, 11 Oct 2011 20:12:14 -0400 96 | 97 | xterm-dev (276) unstable; urgency=low 98 | 99 | * Regressions in #272, #274. 100 | 101 | -- Thomas E. Dickey Wed, 28 Sep 2011 17:34:20 -0400 102 | 103 | xterm-dev (275) unstable; urgency=low 104 | 105 | * Regressions in #272, #274. 106 | 107 | -- Thomas E. Dickey Sun, 11 Sep 2011 09:46:57 -0400 108 | 109 | xterm-dev (274) unstable; urgency=low 110 | 111 | * Various build-fixes. 112 | 113 | -- Thomas E. Dickey Sun, 28 Aug 2011 20:07:29 -0400 114 | 115 | xterm-dev (273) unstable; urgency=low 116 | 117 | * Build-fixes/regressions from #272. 118 | 119 | -- Thomas E. Dickey Thu, 25 Aug 2011 05:42:58 -0400 120 | 121 | xterm-dev (272) unstable; urgency=low 122 | 123 | * Build-fix for termcap systems. 124 | 125 | -- Thomas E. Dickey Fri, 15 Jul 2011 20:41:30 -0400 126 | 127 | xterm-dev (271) unstable; urgency=low 128 | 129 | * Ubuntu #756273 (accommodate function keys as popup-menu triggers) 130 | 131 | -- Thomas E. Dickey Fri, 29 Apr 2011 20:30:29 -0400 132 | 133 | xterm-dev (270) unstable; urgency=low 134 | 135 | * more fixes for fullscreen toggle. 136 | 137 | -- Thomas E. Dickey Sun, 20 Mar 2011 14:53:54 -0400 138 | 139 | xterm-dev (269) unstable; urgency=low 140 | 141 | * amend translations for fullscreen toggle. 142 | 143 | -- Thomas E. Dickey Sun, 13 Feb 2011 19:20:48 -0500 144 | 145 | xterm-dev (268) unstable; urgency=low 146 | 147 | * build-fixes, etc. 148 | 149 | -- Thomas E. Dickey Wed, 24 Nov 2010 06:17:16 -0500 150 | 151 | xterm-dev (267) unstable; urgency=low 152 | 153 | * build-fixes, etc. 154 | 155 | -- Thomas E. Dickey Wed, 10 Nov 2010 18:46:41 -0500 156 | 157 | xterm-dev (266) unstable; urgency=low 158 | 159 | * add build-script for testing, adapted from Debian xterm package. 160 | 161 | -- Thomas E. Dickey Fri, 22 Oct 2010 17:15:59 -0400 162 | -------------------------------------------------------------------------------- /vttests/query-color.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl -w 2 | # $XTermId: query-color.pl,v 1.3 2012/10/22 11:45:58 tom Exp $ 3 | # ----------------------------------------------------------------------------- 4 | # this file is part of xterm 5 | # 6 | # Copyright 2012 by Thomas E. Dickey 7 | # 8 | # All Rights Reserved 9 | # 10 | # Permission is hereby granted, free of charge, to any person obtaining a 11 | # copy of this software and associated documentation files (the 12 | # "Software"), to deal in the Software without restriction, including 13 | # without limitation the rights to use, copy, modify, merge, publish, 14 | # distribute, sublicense, and/or sell copies of the Software, and to 15 | # permit persons to whom the Software is furnished to do so, subject to 16 | # the following conditions: 17 | # 18 | # The above copyright notice and this permission notice shall be included 19 | # in all copies or substantial portions of the Software. 20 | # 21 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 22 | # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 23 | # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 24 | # IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY 25 | # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 26 | # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 27 | # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 28 | # 29 | # Except as contained in this notice, the name(s) of the above copyright 30 | # holders shall not be used in advertising or otherwise to promote the 31 | # sale, use or other dealings in this Software without prior written 32 | # authorization. 33 | # ----------------------------------------------------------------------------- 34 | # Test the color-query features of xterm using OSC 4. 35 | 36 | # TODO: extend to the OSC 5 colors 37 | # TODO: show result in #rrggbb format. 38 | 39 | use strict; 40 | 41 | use Getopt::Std; 42 | use IO::Handle; 43 | 44 | our ( $opt_s ); 45 | &getopts('s') || die( 46 | "Usage: $0 [options] [color1[-color2]]\n 47 | Options:\n 48 | -s use ^G rather than ST 49 | " 50 | ); 51 | 52 | our $ST = $opt_s ? "\007" : "\x1b\\"; 53 | 54 | sub no_reply($) { 55 | open TTY, "+; 73 | close TTY; 74 | system "stty $old"; 75 | if ( defined $reply ) { 76 | die("^C received\n") if ( "$reply" eq "\003" ); 77 | } 78 | return $reply; 79 | } 80 | 81 | sub visible($) { 82 | my $reply = $_[0]; 83 | my $n; 84 | my $result = ""; 85 | for ( $n = 0 ; $n < length($reply) ; ) { 86 | my $c = substr( $reply, $n, 1 ); 87 | if ( $c =~ /[[:print:]]/ ) { 88 | $result .= $c; 89 | } 90 | else { 91 | my $k = ord substr( $reply, $n, 1 ); 92 | if ( ord $k == 0x1b ) { 93 | $result .= "\\E"; 94 | } 95 | elsif ( $k == 0x7f ) { 96 | $result .= "^?"; 97 | } 98 | elsif ( $k == 32 ) { 99 | $result .= "\\s"; 100 | } 101 | elsif ( $k < 32 ) { 102 | $result .= sprintf( "^%c", $k + 64 ); 103 | } 104 | elsif ( $k > 128 ) { 105 | $result .= sprintf( "\\%03o", $k ); 106 | } 107 | else { 108 | $result .= chr($k); 109 | } 110 | } 111 | $n += 1; 112 | } 113 | 114 | return $result; 115 | } 116 | 117 | sub query_color($) { 118 | my $param = $_[0]; 119 | my $reply; 120 | my $n; 121 | my $st = $opt_s ? qr/\007/ : qr/\x1b\\/; 122 | my $op = 4; 123 | my $osc = qr/\x1b]$op/; 124 | my $match = qr/${osc}.*${st}/; 125 | 126 | $reply = get_reply( "\x1b]$op;" . $param . ";?" . $ST ); 127 | 128 | printf "query{%s}%*s", &visible($param), 3 - length($param), " "; 129 | 130 | if ( defined $reply ) { 131 | printf "%2d ", length($reply); 132 | if ( $reply =~ /${match}/ ) { 133 | 134 | $reply =~ s/^${osc}//; 135 | $reply =~ s/^;//; 136 | $reply =~ s/${st}$//; 137 | } 138 | else { 139 | printf "? "; 140 | } 141 | 142 | printf "{%s}", visible($reply); 143 | } 144 | printf "\n"; 145 | } 146 | 147 | sub query_colors($$) { 148 | my $lo = $_[0]; 149 | my $hi = $_[1]; 150 | my $n; 151 | for ( $n = $lo ; $n <= $hi ; ++$n ) { 152 | query_color($n); 153 | } 154 | } 155 | 156 | if ( $#ARGV >= 0 ) { 157 | while ( $#ARGV >= 0 ) { 158 | if ( $ARGV[0] =~ /-/ ) { 159 | my @args = split /-/, $ARGV[0]; 160 | &query_colors ( $args[0], $args[1] ); 161 | } else { 162 | &query_colors ( $ARGV[0], $ARGV[0] ); 163 | } 164 | shift @ARGV; 165 | } 166 | } else { 167 | &query_colors(0,7); 168 | } 169 | -------------------------------------------------------------------------------- /icons/mini.xterm.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 20 | 22 | 29 | 30 | 50 | 56 | 57 | 59 | 60 | 62 | image/svg+xml 63 | 65 | XTerm mini-icon 66 | August 21, 2012 67 | 68 | 69 | Thomas E. Dickey 70 | 71 | 72 | 74 | 75 | 77 | 79 | 81 | 83 | 85 | 87 | 88 | 89 | 90 | 96 | X 109 | 110 | 114 | T 127 | 128 | 129 | -------------------------------------------------------------------------------- /package/debian/rules: -------------------------------------------------------------------------------- 1 | #!/usr/bin/make -f 2 | # Made with the aid of dh_make, by Craig Small 3 | # Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess. 4 | # Some lines taken from debmake, by Cristoph Lameter. 5 | 6 | # Uncomment this to turn on verbose mode. 7 | #export DH_VERBOSE=1 8 | 9 | # These are used for cross-compiling and for saving the configure script 10 | # from having to guess our platform (since we know it already) 11 | DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) 12 | DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) 13 | 14 | DESKTOP_VENDOR = dickey 15 | 16 | PKG_SUFFIX = -dev 17 | PKG_CLASS = XTermDev 18 | 19 | PACKAGE := $(shell dpkg-parsechangelog| \ 20 | sed -n 's/^Source: \(.*\)$$/\1/p') 21 | 22 | PKG_APPDEFAULTS := /etc/X11/app-defaults 23 | PKG_DESKTOP := /usr/share/applications 24 | 25 | DSTDIR := $(CURDIR)/debian/$(PACKAGE) 26 | MY_DESKTOP := $(DSTDIR)/usr/share/applications 27 | 28 | CFLAGS = 29 | 30 | ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS))) 31 | DEBOP=--enable-debug 32 | else 33 | DEBOP= 34 | endif 35 | 36 | ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) 37 | CFLAGS += -O0 38 | else 39 | CFLAGS += -O2 40 | endif 41 | ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) 42 | INSTALL_PROGRAM += -s 43 | endif 44 | 45 | configure: configure-stamp 46 | configure-stamp: 47 | dh_testdir 48 | 49 | ./configure \ 50 | --host=$(DEB_HOST_GNU_TYPE) \ 51 | --build=$(DEB_BUILD_GNU_TYPE) \ 52 | --program-suffix=$(PKG_SUFFIX) \ 53 | --prefix=/usr \ 54 | --libexecdir=\$${prefix}/lib \ 55 | --mandir=\$${prefix}/share/man \ 56 | --sysconfdir=/etc/$(PACKAGE) \ 57 | --localstatedir=/var \ 58 | --libdir=/etc/$(PACKAGE) \ 59 | --with-app-class=$(PKG_CLASS) \ 60 | --without-xterm-symlink \ 61 | --disable-imake \ 62 | --enable-256-color \ 63 | --enable-88-color \ 64 | --enable-dabbrev \ 65 | --enable-dec-locator \ 66 | --enable-exec-xterm \ 67 | --enable-hp-fkeys \ 68 | --enable-load-vt-fonts \ 69 | --enable-logfile-exec \ 70 | --enable-logging \ 71 | --enable-mini-luit \ 72 | --enable-paste64 \ 73 | --enable-rectangles \ 74 | --enable-sco-fkeys \ 75 | --enable-tcap-fkeys \ 76 | --enable-tcap-query \ 77 | --enable-toolbar \ 78 | --enable-wide-chars \ 79 | --enable-xmc-glitch \ 80 | --with-app-defaults=$(PKG_APPDEFAULTS) \ 81 | --with-icondir=\$${prefix}/share/icons \ 82 | --with-pixmapdir=\$${prefix}/share/pixmaps \ 83 | --with-own-terminfo=\$${prefix}/share/terminfo \ 84 | --with-icon-theme \ 85 | --with-terminal-type=xterm-new \ 86 | --with-utempter \ 87 | --with-icon-name=mini.xterm \ 88 | --with-xpm ${DEBOP} 89 | 90 | touch configure-stamp 91 | 92 | build: build-stamp 93 | build-stamp: configure-stamp 94 | dh_testdir 95 | 96 | $(MAKE) 97 | 98 | touch build-stamp 99 | 100 | clean: 101 | dh_testdir 102 | dh_testroot 103 | 104 | [ ! -f Makefile ] || $(MAKE) distclean 105 | 106 | dh_clean 107 | 108 | install: install-stamp 109 | install-stamp: build-stamp 110 | dh_testdir 111 | dh_testroot 112 | dh_clean -k 113 | dh_installdirs 114 | 115 | $(MAKE) install \ 116 | DESTDIR=$(CURDIR)/debian/$(PACKAGE) 117 | 118 | touch install-stamp 119 | 120 | install: install-indep install-arch 121 | install-indep: 122 | 123 | install-arch: 124 | dh_testdir 125 | dh_testroot 126 | dh_prep -s 127 | dh_installdirs -s 128 | 129 | $(MAKE) install-bin \ 130 | DESTDIR=$(DSTDIR) 131 | 132 | # Build architecture-independent files here. 133 | binary-indep: build install 134 | dh_testdir 135 | dh_testroot 136 | 137 | # This overwrites the Debian package's copy of app-defaults and icons. 138 | # But the resources are not the same; they are patched. 139 | sed -i -f package/debian/color.sed XTerm-col.ad 140 | sed -i -f package/debian/xterm-xres.sed XTerm.ad 141 | 142 | $(MAKE) install-app \ 143 | install-icon \ 144 | install-man \ 145 | DESTDIR=$(DSTDIR) 146 | 147 | # Follow-up with a check against the installed resource files. 148 | ( cd $(DSTDIR)$(PKG_APPDEFAULTS) \ 149 | && $(SHELL) -c 'for p in *; do \ 150 | test -f $(PKG_APPDEFAULTS)/$$p && \ 151 | diff -u $(PKG_APPDEFAULTS)/$$p $$p; \ 152 | done' ; \ 153 | exit 0 ) 154 | 155 | # The Debian package does not install desktop files. 156 | # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=486317 157 | $(MAKE) install-desktop \ 158 | DESKTOP_FLAGS="--vendor='$(DESKTOP_VENDOR)' --dir $(MY_DESKTOP)" 159 | 160 | ( cd $(DSTDIR)$(PKG_DESKTOP) \ 161 | && $(SHELL) -c 'for p in *;do \ 162 | test -f $(PKG_DESKTOP)/$$p && \ 163 | diff -u $(PKG_DESKTOP)/$$p $$p; \ 164 | test -n "$(PKG_SUFFIX)" && mv $$p `basename $$p .desktop`$(PKG_SUFFIX).desktop; \ 165 | done' ; \ 166 | exit 0 ) 167 | 168 | dh_icons 169 | 170 | # Build architecture-dependent files here. 171 | binary-arch: build install 172 | dh_testdir 173 | dh_testroot 174 | dh_installdebconf 175 | dh_installdocs 176 | dh_installmenu 177 | dh_installmime 178 | dh_installexamples tektests vttests 179 | dh_installchangelogs 180 | dh_install 181 | dh_link 182 | dh_strip 183 | dh_compress 184 | dh_fixperms 185 | dh_installdeb 186 | dh_shlibdeps 187 | dh_gencontrol 188 | dh_md5sums 189 | dh_builddeb 190 | 191 | binary: binary-indep binary-arch 192 | .PHONY: build clean binary-indep binary-arch binary install install-stamp 193 | -------------------------------------------------------------------------------- /icons/mini.xterm_32x32.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static char * mini_xterm_32x32_xpm[] = { 3 | "32 32 143 2", 4 | " c None", 5 | ". c #FF0000", 6 | "+ c #FF1900", 7 | "@ c #FF1F00", 8 | "# c #FF0B00", 9 | "$ c #FF1D00", 10 | "% c #FF4A00", 11 | "& c #FF5100", 12 | "* c #FF5B00", 13 | "= c #FF5E00", 14 | "- c #FF5300", 15 | "; c #FF3600", 16 | "> c #FF0C00", 17 | ", c #FF5A00", 18 | "' c #FF5C00", 19 | ") c #FF0A00", 20 | "! c #FF0D00", 21 | "~ c #FF2E00", 22 | "{ c #FF5800", 23 | "] c #FF2700", 24 | "^ c #FF0500", 25 | "/ c #0073FB", 26 | "( c #0041F7", 27 | "_ c #0074FB", 28 | ": c #0059F9", 29 | "< c #0000F1", 30 | "[ c #0505EC", 31 | "} c #3A44BE", 32 | "| c #615A9A", 33 | "1 c #784285", 34 | "2 c #3466C8", 35 | "3 c #004DF8", 36 | "4 c #0053F8", 37 | "5 c #006CF9", 38 | "6 c #3C44BD", 39 | "7 c #2729CF", 40 | "8 c #002CF5", 41 | "9 c #2D2EC9", 42 | "0 c #8D6E71", 43 | "a c #E96416", 44 | "b c #FF4400", 45 | "c c #FF1800", 46 | "d c #0019F3", 47 | "e c #FF1400", 48 | "f c #D66729", 49 | "g c #73498A", 50 | "h c #091FEB", 51 | "i c #002CF4", 52 | "j c #006FFC", 53 | "k c #0002F1", 54 | "l c #0059F8", 55 | "m c #AD3252", 56 | "n c #FF1700", 57 | "o c #FF2B00", 58 | "p c #B84A47", 59 | "q c #0026F4", 60 | "r c #FF0700", 61 | "s c #FF1600", 62 | "t c #003FF6", 63 | "u c #0003F1", 64 | "v c #006FFA", 65 | "w c #0058F9", 66 | "x c #0055FA", 67 | "y c #FF3D00", 68 | "z c #C3363C", 69 | "A c #FF0400", 70 | "B c #FF3F00", 71 | "C c #FF1000", 72 | "D c #003DF6", 73 | "E c #005AF8", 74 | "F c #002AF4", 75 | "G c #FF0100", 76 | "H c #FF5600", 77 | "I c #C3643C", 78 | "J c #A73958", 79 | "K c #FF3100", 80 | "L c #0020F3", 81 | "M c #002DF5", 82 | "N c #0089FD", 83 | "O c #0022F4", 84 | "P c #0085FD", 85 | "Q c #C36E3C", 86 | "R c #BC3943", 87 | "S c #FF1300", 88 | "T c #007AFC", 89 | "U c #FF2200", 90 | "V c #C3693C", 91 | "W c #FF4600", 92 | "X c #C3563C", 93 | "Y c #FF1100", 94 | "Z c #BD6C42", 95 | "` c #C12F3E", 96 | " . c #B13B4E", 97 | ".. c #C32F3C", 98 | "+. c #C0283F", 99 | "@. c #C34D3C", 100 | "#. c #FF2400", 101 | "$. c #BC3E43", 102 | "%. c #C36D3C", 103 | "&. c #FF3400", 104 | "*. c #FF0800", 105 | "=. c #C36B3C", 106 | "-. c #FF4E00", 107 | ";. c #C3523C", 108 | ">. c #FF3E00", 109 | ",. c #FF1C00", 110 | "'. c #FF0200", 111 | "). c #BF3240", 112 | "!. c #FF1A00", 113 | "~. c #B4624B", 114 | "{. c #FF5900", 115 | "]. c #FF1200", 116 | "^. c #B82E47", 117 | "/. c #FF4800", 118 | "(. c #FF3A00", 119 | "_. c #001EF4", 120 | ":. c #001DF4", 121 | "<. c #7D4882", 122 | "[. c #FF4F00", 123 | "}. c #0076FB", 124 | "|. c #000CF2", 125 | "1. c #0276F9", 126 | "2. c #FF3800", 127 | "3. c #FF5D00", 128 | "4. c #004CF7", 129 | "5. c #004CF8", 130 | "6. c #FB0104", 131 | "7. c #FF5500", 132 | "8. c #B53E4A", 133 | "9. c #0055F8", 134 | "0. c #0038F6", 135 | "a. c #0028F4", 136 | "b. c #0039F6", 137 | "c. c #0254F6", 138 | "d. c #C66E39", 139 | "e. c #FF3500", 140 | "f. c #248ADB", 141 | "g. c #785587", 142 | "h. c #DE3121", 143 | "i. c #FF1E00", 144 | "j. c #FF2800", 145 | "k. c #FF5700", 146 | "l. c #FF1B00", 147 | " ", 148 | " ", 149 | " . + @ @ @ @ @ @ @ @ @ # $ . @ @ @ @ @ @ @ @ . ", 150 | " . % & & * = = = - & & ; @ > & & & , ' & & & ) ", 151 | " . . . . ! = = = ~ . . . . . . . { ] ^ . . . ", 152 | " / ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( _ ", 153 | " : < < < [ } | 1 2 3 < < < < 4 5 6 7 < < < < : ", 154 | " 8 < < 9 0 a = b c d < < d e f g h < < i ", 155 | " j k < l m n = = = o p q < < q r { ] s t < u v ", 156 | " w < x . y = = ' z q < < q A % B C D < E ", 157 | " 8 F G H = = I q < < q J K & ! L M ", 158 | " N O P r = = Q q < < q R ' S T O N ", 159 | " . U = Q q < < q V ] s ", 160 | " . W Q q < < q X Y ", 161 | " G Z q < < q ` ", 162 | " .q < < q .. ", 163 | " +.q < < q @.#. ", 164 | " $.q < < q %.+ &. ", 165 | " *.=.q < < q Q - Y ", 166 | " A -.;.q < < q Q = >.,. ", 167 | " '.; -.).q < < q Q = = U ~ ", 168 | " !., Y q < < q ~.= = {.]. ", 169 | " *., U q < < q ^., = = /.s ", 170 | " A -.(.]. _.< < :.<.C = = = ~ ] ", 171 | " '.; [.! }.|.< < |.1.. 2.= = 3.s ", 172 | " !., Y 4.< < < < 5. 6.7.= = & ]. ", 173 | " *., U 8.9.0.a.< < < < < < a.b.c.d.= = (.@ ", 174 | " A -.e.# f. g.h.= = = i.j. ", 175 | " . @ @ ,.y , Y ,.@ @ G '.@ ,.].* = = k.l.@ @ . ", 176 | " . & & & & & & & & & ) ,.& & & & & & & & & & ) ", 177 | " . . . . . . . . . . . . . . . . . . . . . . . ", 178 | " "}; 179 | --------------------------------------------------------------------------------