# ------------------------------------------------------------------------------
# button.c | 42 ++++++++++-
# charproc.c | 2
# error.h | 5 +
# input.c | 13 +++
# main.c | 12 ++-
# screen.c | 7 -
# termcap | 50 ++++++++-----
# terminfo | 25 +++++-
# util.c | 2
# version.h | 2
# xterm.log.html | 44 +++++++++++
# xterm.man | 205 +++++++++++++++++++++++++++----------------------------
# 12 files changed, 270 insertions, 139 deletions
# ------------------------------------------------------------------------------
Index: button.c
--- xterm-83+/button.c Sun Aug 30 06:43:03 1998
+++ xterm-84/button.c Wed Sep 23 06:32:38 1998
@@ -89,6 +89,9 @@
/* Saved values of raw selection for extend to restore to */
static int saveStartRRow, saveStartRCol, saveEndRRow, saveEndRCol;
+/* Saved value of WORD selection for LINE processing to restore to */
+static int saveStartWRow, saveStartWCol;
+
/* Multi-click handling */
static int numberOfClicks = 0;
static Time lastButtonUpTime = 0;
@@ -985,7 +988,6 @@
register Char *ptr;
register int length;
register int class;
- int osc = startSCol;
if (Coordinate(startRow, startCol) <= Coordinate(endRow, endCol)) {
startSRow = startRRow = startRow;
@@ -1021,6 +1023,13 @@
do {
--startSCol;
--ptr;
+ if (startSCol <= 0
+ && ScrnTstWrapped(screen, startSRow - 1)) {
+ --startSRow;
+ startSCol = LastTextCol(startSRow);
+ ptr = SCRN_BUF_CHARS(screen, startSRow+screen->topline)
+ + startSCol;
+ }
} while (startSCol >= 0
&& charClass[*ptr] == class);
++startSCol;
@@ -1036,6 +1045,14 @@
do {
++endSCol;
++ptr;
+ if (endSCol > length
+ && ScrnTstWrapped(screen, endSRow)) {
+ endSCol = 0;
+ ++endSRow;
+ length = LastTextCol(endSRow);
+ ptr = SCRN_BUF_CHARS(screen, endSRow+screen->topline)
+ + endSCol;
+ }
} while (endSCol <= length
&& charClass[*ptr] == class);
/* Word select selects if pointing to any char
@@ -1047,12 +1064,31 @@
++endSRow;
}
}
+ saveStartWRow = startSRow;
+ saveStartWCol = startSCol;
break;
case SELECTLINE :
- if (term->screen.cutToBeginningOfLine) {
+ while (ScrnTstWrapped(screen, endSRow)) {
+ ++endSRow;
+ }
+ if (term->screen.cutToBeginningOfLine
+ || startSRow < saveStartWRow) {
startSCol = 0;
+ while (ScrnTstWrapped(screen, startSRow - 1)) {
+ --startSRow;
+ }
} else if (!extend) {
- startSCol = osc;
+ if ((startRow < saveStartWRow)
+ || (startRow == saveStartWRow
+ && startCol < saveStartWCol)) {
+ startSCol = 0;
+ while (ScrnTstWrapped(screen, startSRow - 1)) {
+ --startSRow;
+ }
+ } else {
+ startSRow = saveStartWRow;
+ startSCol = saveStartWCol;
+ }
}
if (term->screen.cutNewline) {
endSCol = 0;
Index: charproc.c
--- xterm-83+/charproc.c Sun Aug 30 06:43:03 1998
+++ xterm-84/charproc.c Wed Oct 7 20:54:07 1998
@@ -1031,6 +1031,8 @@
} else if (string_used+1 >= string_size) {
string_size += string_size;
string_area = (Char *)realloc(string_area, string_size);
+ if (string_area == NULL)
+ SysError(ERROR_VTREALLOC);
}
string_area[string_used++] = c;
} else if (parsestate != esc_table) {
Index: error.h
--- xterm-83+/error.h Fri Jun 5 16:23:53 1998
+++ xterm-84/error.h Fri Oct 9 06:56:12 1998
@@ -65,12 +65,14 @@
#define ERROR_TIOCKGETC 45 /* spawn: ioctl() failed on TIOCKGETC */
#define ERROR_TIOCKSET 46 /* spawn: ioctl() failed on TIOCKSET */
#define ERROR_TIOCKSETC 47 /* spawn: ioctl() failed on TIOCKSETC */
+#define ERROR_SPREALLOC 48 /* spawn: realloc of ttydev failed */
/* charproc.c */
#define ERROR_SELECT 50 /* in_put: select() failed */
#define ERROR_VINIT 54 /* VTInit: can't initialize window */
#define ERROR_CNMALLOC1 55 /* Changename: malloc failed */
#define ERROR_CNMALLOC2 56 /* Changename: malloc failed */
-#define ERROR_KMMALLOC1 57 /* HandleKeymapChange: malloc failed */
+#define ERROR_KMMALLOC1 57 /* HandleKeymapChange: malloc failed */
+#define ERROR_VTREALLOC 58 /* VTParse: realloc failed */
/* Tekproc.c */
#define ERROR_TSELECT 60 /* Tinput: select() failed */
#define ERROR_TINIT 64 /* TekInit: can't initialize window */
@@ -106,3 +108,4 @@
#define ERROR_SBRALLOC2 111 /* ScrollBarOn: realloc() failed on rows */
/* util.c */
#define ERROR_UBACK 120 /* ReverseVideo: can't make background */
+#define ERROR_MMALLOC 121 /* my_memmove: malloc/realloc failed */
Index: input.c
--- xterm-83+/input.c Sun Aug 30 06:43:03 1998
+++ xterm-84/input.c Wed Sep 23 07:04:09 1998
@@ -96,6 +96,15 @@
}
}
+/*
+ * Modifiers other than shift, control and numlock should be reserved for the
+ * user. We use the first two explicitly to support VT220 keyboard, and the
+ * third is used implicitly in keyboard configuration to make the keypad work.
+ */
+#define isModified(event) \
+ (event->state & \
+ (Mod1Mask | Mod2Mask | Mod3Mask | Mod4Mask | Mod5Mask ))
+
void
Input (
register TKeyboard *keyboard,
@@ -141,6 +150,7 @@
/* VT300 & up: backarrow toggle */
if ((nbytes == 1)
+ && !isModified(event)
&& (((term->keyboard.flags & MODE_DECBKM) == 0)
^ ((event->state & ControlMask) != 0))
&& (keysym == XK_BackSpace)) {
@@ -166,7 +176,7 @@
#if OPT_SUNPC_KBD
/* make an DEC editing-keypad from a Sun or PC editing-keypad */
- if (sunKeyboard) {
+ if (sunKeyboard && !isModified(event)) {
switch (keysym) {
case XK_Delete:
#ifdef DXK_Remove
@@ -262,6 +272,7 @@
* but no keypad(,) - it's a pain for users to work around.
*/
if (!sunFunctionKeys
+ && !isModified(event)
&& sunKeyboard
&& keysym == XK_KP_Add)
keysym = XK_KP_Separator;
Index: main.c
--- xterm-83+/main.c Sun Aug 30 06:43:03 1998
+++ xterm-84/main.c Wed Oct 7 20:56:04 1998
@@ -2213,10 +2213,8 @@
screen->uid = getuid();
screen->gid = getgid();
-#ifdef linux
- bzero(termcap, sizeof termcap);
- bzero(newtc, sizeof newtc);
-#endif
+ termcap[0] = '\0';
+ newtc[0] = '\0';
#ifdef SIGTTOU
/* so that TIOCSWINSZ || TIOCSIZE doesn't block */
@@ -2630,6 +2628,9 @@
free(ttydev);
ttydev = malloc((unsigned)
(strlen(handshake.buffer) + 1));
+ if (ttydev == NULL) {
+ SysError(ERROR_SPREALLOC);
+ }
strcpy(ttydev, handshake.buffer);
}
@@ -2641,6 +2642,9 @@
/* it may be bigger */
ttydev = realloc (ttydev,
(unsigned) (strlen(ptr) + 1));
+ if (ttydev == NULL) {
+ SysError(ERROR_SPREALLOC);
+ }
(void) strcpy(ttydev, ptr);
}
#if defined(SYSV) && defined(i386) && !defined(SVR4)
Index: screen.c
--- xterm-83+/screen.c Sun Aug 30 06:43:03 1998
+++ xterm-84/screen.c Fri Oct 9 06:29:03 1998
@@ -487,7 +487,6 @@
register Char *ptr = BUF_CHARS(sb, row);
register Char *attrs = BUF_ATTRS(sb, row);
register size_t nbytes = (size - n - col);
- int wrappedbit = ScrnTstWrapped(screen, row);
memmove (ptr + col, ptr + col + n, nbytes);
memmove (attrs + col, attrs + col + n, nbytes);
@@ -504,10 +503,7 @@
memmove(csets + col, csets + col + n, nbytes);
memset(csets + size - n, curXtermChrSet(row), n);
})
- if (wrappedbit)
- ScrnSetWrapped(screen, row);
- else
- ScrnClrWrapped(screen, row);
+ ScrnClrWrapped(screen, row);
}
/*
@@ -771,6 +767,7 @@
TRACE(("ClearBufRows %d..%d\n", first, last))
for (row = first; row <= last; row++) {
+ ScrnClrWrapped(screen, row);
bzero (BUF_CHARS(buf, row), len);
memset(BUF_ATTRS(buf, row), flags, len);
if_OPT_ISO_COLORS(screen,{
Index: termcap
--- xterm-83+/termcap Sun Jul 5 16:05:39 1998
+++ xterm-84/termcap Fri Oct 9 06:42:40 1998
@@ -8,9 +8,17 @@
# 'xtermm' drops color in favor of additional function keys. If you need
# both, use terminfo.
#
-xf|xterm-xfree86|xterm-new|xterm terminal emulator (XFree86):\
- :is=\E7\E[r\E[m\E[?7h\E[?1;3;4;6l\E[4l\E8\E>:\
- :rs=\E7\E[r\E[m\E[?7h\E[?1;3;4;6l\E[4l\E8\E>:\
+# The 1023-character limit applies to each entry after resolving the
+# "tc=" strings. Some implementations may discount all or part of the
+# formatting characters in the entry (i.e., the backslash newline tab
+# colon). GNU termcap does not have this limit.
+#
+# I checked the limits using ncurses "captoinfo -CrTv", which prints
+# the resolved length of each entry in a comment at the end - T.Dickey
+#
+xf|xterm-xfree86|XFree86 xterm:\
+ :is=\E[!p\E[?3;4l\E[4l\E>:\
+ :rs=\E[!p\E[?3;4l\E[4l\E>:\
:AL=\E[%dL:DL=\E[%dM:DC=\E[%dP:DO=\E[%dB:UP=\E[%dA:\
:LE=\E[%dD:RI=\E[%dC:\
:al=\E[L:am:bl=^G:\
@@ -23,49 +31,51 @@
:k5=\E[15~:k6=\E[17~:k7=\E[18~:k8=\E[19~:k9=\E[20~:\
:k;=\E[21~:F1=\E[23~:F2=\E[24~:\
:kn#12:\
- :@7=\E[4~:kh=\E[1~:\
+ :kH=\E[4~::@7=\E[4~:kh=\E[1~:\
:@0=\E[1~:kI=\E[2~:kD=\E[3~:\
:*6=\E[4~:kP=\E[5~:kN=\E[6~:\
:km:\
:kb=^H:ku=\EOA:kd=\EOB:kr=\EOC:kl=\EOD:\
:li#24:md=\E[1m:me=\E[m^O:mr=\E[7m:ms:nd=\E[C:\
- :eA=\E)0:as=^N:ae=^O:\
- :ml=\El:mu=\Em:\
- :sc=\E7:rc=\E8:sf=\n:so=\E[7m:se=\E[27m:sr=\EM:\
- :st=\EH:\
+ :eA=\E)0:as=^N:ae=^O:ml=\El:mu=\Em:\
+ :sc=\E7:rc=\E8:sf=\n:so=\E[7m:se=\E[27m:sr=\EM:st=\EH:\
:ti=\E7\E[?47h:te=\E[2J\E[?47l\E8:\
:vi=\E[?25l:ve=\E[?25h:\
:up=\E[A:us=\E[4m:ue=\E[24m:xn:\
:ut:Co#8:op=\E[39;49m:AB=\E[4%dm:AF=\E[3%dm:\
:pa#64:Sf=\E[3%dm:Sb=\E[4%dm:
-v1|xterm-24|xterms|vs100|xterm terminal emulator (X Window System):\
+v1|xterm-24|xterms|vs100|24x80 xterm:\
:li#24:\
:tc=xterm:
-v2|xterm-65|xterm with tall window 65x80 (X Window System):\
+v2|xterm-65|65x80 xterm:\
:li#65:tc=xterm:
-vb|xterm-bold|xterm with bold instead of underline (X Window System):\
+vb|xterm-bold|xterm with bold for underline:\
:us=\E[1m:tc=xterm:
-vb|xterm-boldso|xterm with bold for standout (X Window System):\
- :so=\E[1m:tc=xterm:
-vm|xtermm|monochrome xterm (X Window System):\
+vb|xterm-boldso|xterm with bold for standout:\
+ :se=\E[m:so=\E[1m:tc=xterm:
+vm|xtermm|monochrome xterm:\
:F1=\E[23~:F2=\E[24~:F3=\E[25~:F4=\E[26~:F5=\E[28~:\
:F6=\E[29~:F7=\E[31~:F8=\E[32~:F9=\E[33~:FA=\E[34~:\
:kn#20:\
:st@:ut@:Co@:NC@:op@:AB@:AF@:pa@:Sf@:Sb@:tc=xterm:
#
# This should work for the commonly used "color xterm" variations (XFree86
-# xterm, color_xterm, nxterm, rxvt):
-vc|xterm-color|generic "ANSI" color xterm (X Window System):\
+# xterm, color_xterm, nxterm, rxvt). You may have trouble with this using
+# conventional termcap because ncurses reports it is longer than 1023
+# characters. That is because resolving it adds the alternate character-set
+# (you can suppress it with "ac@").
+vc|xterm-color|generic "ANSI" color xterm:\
:Co#8:NC@:pa#64:op=\E[m:AB=\E[4%dm:AF=\E[3%dm:tc=xterm-r6:
vt|xterm-vt220|xterm emulating vt220:\
:tc=xterm-xfree86:
#
# vi may work better with this entry, because vi doesn't use insert mode much.
-vi|xterm-ic|xterm-vi|xterm with insert character instead of insert mode:\
+# |xterm-ic|xterm-vi|xterm with insert character instead of insert mode:\
+vi|xterm-ic|xterm-vi|xterm with insert char:\
:im@:ei@:mi@:ic=\E[@:IC=\E[%d@:tc=xterm:
#
# Compatible with the R6 xterm
-r6|xterm-r6|xterm-old|xterm X11R6 version:\
+r6|xterm-r6|xterm-old|X11R6 xterm:\
:is=\E7\E[r\E[m\E[?7h\E[?1;3;4;6l\E[4l\E8\E>:\
:rs=\E7\E[r\E[m\E[?7h\E[?1;3;4;6l\E[4l\E8\E>:\
:AL=\E[%dL:DL=\E[%dM:DC=\E[%dP:DO=\E[%dB:UP=\E[%dA:\
@@ -94,7 +104,7 @@
:up=\E[A:us=\E[4m:ue=\E[m:xn:
#
# Compatible with the R5 xterm
-r5|xterm-r5|xterm X11R5 version:\
+r5|xterm-r5|X11R5 xterm X11R5:\
:AL=\E[%dL:DC=\E[%dP:DL=\E[%dM:DO=\E[%dB:IC=\E[%d@:UP=\E[%dA:\
:al=\E[L:am:\
:bs:cd=\E[J:ce=\E[K:cl=\E[H\E[2J:cm=\E[%i%d;%dH:co#80:\
@@ -103,7 +113,7 @@
:im=\E[4h:ei=\E[4l:mi:\
:ho=\E[H:\
:is=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;3;4;6l\E[4l:\
- :rs=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;3;4;6l\E[4l\E<:\
+ :rs=\E>\E[?1;3;4;5;6l\E[4l\E[?7h\E[m\E[r\E[2J\E[H:\
:k1=\E[11~:k2=\E[12~:k3=\E[13~:k4=\E[14~:kb=^H:kd=\EOB:ke=\E[?1l\E>:\
:kl=\EOD:km:kn#4:kr=\EOC:ks=\E[?1h\E=:ku=\EOA:\
:@7=\E[4~:kh=\E[1~:\
Index: terminfo
--- xterm-83+/terminfo Sat Jul 18 13:11:26 1998
+++ xterm-84/terminfo Thu Oct 8 21:10:50 1998
@@ -18,6 +18,18 @@
# embed a \E[2J in the rmcup string. However, that behavior cannot
# be disabled via titeInhibit, making that resource not function as
# intended on systems with terminfo.
+# rs2/is2 are shorter with XFree86 xterm because it supports DECSTR. We
+# use the shorter sequence for compatibility with the termcap, which
+# is trimmed to keep it shorter than 1023 characters. It (escape \E[!p)
+# replaces these in the conventional vt100 reset-string:
+# \E7 - save cursor (fixes origin-mode side-effect)
+# \E[r - reset scrolling margins
+# \E[m - reset SGR (including color)
+# \E[?7h - reset wraparound mode (DECAWM)
+# \E[?1l - reset application cursor keys (DECCKM)
+# \E[?6l - reset origin mode (DECOM)
+# \E8 - restore cursor
+# DECSTR is recognized by XFree86 xterm even in vt52 mode.
#
# Editing Keypad:
# --------------
@@ -106,7 +118,7 @@
il1=\E[L,
ind=^J,
invis=\E[8m,
- is2=\E7\E[r\E[m\E[?7h\E[?1;3;4;6l\E[4l\E8\E>,
+ is2=\E[!p\E[?3;4l\E[4l\E>,
ka1=\EOw,
ka3=\EOu,
kb2=\EOy,
@@ -144,6 +156,7 @@
kfnd=\E[1~,
khome=\E[1~,
kich1=\E[2~,
+ kll=\E[4~,
kmous=\E[M,
knp=\E[6~,
kpp=\E[5~,
@@ -165,7 +178,7 @@
rmso=\E[27m,
rmul=\E[24m,
rs1=\Ec,
- rs2=\E7\E[r\E[m\E[?7h\E[?1;3;4;6l\E[4l\E8\E>,
+ rs2=\E[!p\E[?3;4l\E[4l\E>,
sc=\E7,
setab=\E[4%p1%dm,
setaf=\E[3%p1%dm,
@@ -547,6 +560,8 @@
# correctly, the F1 to F4 codes are commonly (but incorrectly) used.
# + moved reset string from rs1 to rs2, to correlate better with termcap.
# + make khome consistent with other entries.
+# + use rmul/smul, rmir/smir from termcap, but not rmcup/smcup because
+# not everyone wants the alternate screen.
xterm-r5|xterm R5 version,
am,
km,
@@ -614,14 +629,18 @@
rc=\E8,
rev=\E[7m,
ri=\EM,
+ rmir=\E[4l,
rmkx=\E[?1l\E>,
rmso=\E[m,
- rs2=\E>\E[1;3;4;5;6l\E[?7h\E[m\E[r\E[2J\E[H,
+ rmul=\E[m,
+ rs2=\E>\E[?1;3;4;5;6l\E[4l\E[?7h\E[m\E[r\E[2J\E[H,
sc=\E7,
sgr=\E[%?%p1%t;7%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;5%;%?%p6%t;1%;m,
sgr0=\E[m,
+ smir=\E[4h,
smkx=\E[?1h\E=,
smso=\E[7m,
+ smul=\E[4m,
tbc=\E[3g,
#
# This is the only entry which you should have to customize, since "xterm"
Index: util.c
--- xterm-83+/util.c Sat Jul 18 13:11:26 1998
+++ xterm-84/util.c Wed Oct 7 20:54:07 1998
@@ -1618,6 +1618,8 @@
bfr = (bfr != 0)
? realloc(bfr, length)
: malloc(length);
+ if (bfr == NULL)
+ SysError(ERROR_MMALLOC);
}
for (j = 0; j < n; j++)
bfr[j] = s2[j];
Index: version.h
--- xterm-83+/version.h Sun Aug 30 06:43:03 1998
+++ xterm-84/version.h Thu Oct 8 21:20:36 1998
@@ -6,4 +6,4 @@
* version of xterm has been built. The number in parentheses is my patch
* number (T.Dickey).
*/
-#define XTERM_VERSION "XFree86 3.9Nb(83)"
+#define XTERM_VERSION "XFree86 3.9Ni(84)"
Index: xterm.log.html
--- xterm-83+/xterm.log.html Sun Aug 30 06:43:03 1998
+++ xterm-84/xterm.log.html Fri Oct 9 06:41:23 1998
@@ -41,6 +41,8 @@
xc/programs/Xserver/hw/xfree86).
<UL>
+<LI><A HREF="#xterm_84">Patch #84 - 1998/10/9 - XFree86 3.9Ni and 3.3.2e</A>
+<LI><A HREF="#sync_83">Resync #83 - 1998/10/7 - XFree86 3.3.2e</A>
<LI><A HREF="#xterm_83">Patch #83 - 1998/8/25 - XFree86 3.9Nb</A>
<LI><A HREF="#xterm_82">Patch #82 - 1998/7/15 - XFree86 3.9Aj</A>
<LI><A HREF="#xterm_81">Patch #81 - 1998/7/14 - XFree86 3.9Aj</A>
@@ -125,6 +127,48 @@
<LI><A HREF="#xterm_02">Patch #2 - 1996/1/7</A>
<LI><A HREF="#xterm_01">Patch #1 - 1996/1/6</A>
</UL>
+
+<H1><A NAME="xterm_84">Patch #84 - 1998/10/9 - XFree86 3.9Ni</A> and 3.3.2e</H1>
+Several small fixes and enhancements, including a patch from
+Bjorn Helgaas:
+<ul>
+ <li>correct initialization of TERMCAP environment variable, which
+ was frequently set to garbage on non-Linux systems because
+ "termcap" and "newtc" contained random data from the stack.
+
+ <li>remove the LINEWRAPPED attribute from lines as they are cleared.
+ Previously, the attribute was set but never cleared.
+
+ <li>make word and line selections work even when lines are wrapped
+ by xterm. Previously, selections were limited to one screen line.
+</ul>
+as well as
+<ul>
+ <li>modify logic for line-wrapping to reset the associated flag if
+ the application deletes a character. This fixes a problem reported
+ by Bjorn Helgaas where word/line selection would still wrap even
+ after deleting characters from the first line.
+ <li>add kll/kH capabilities to xterm-xfree86 entries in termcap and
+ terminfo (request by Michael Schroeder).
+ <li>shorten descriptions in termcap to make resolved entries all
+ shorter than 1023 character limit.
+ <li>use DECSTR control sequence to shorten initialization and reset
+ strings in xterm-xfree86 termcap and terminfo.
+ <li>use rmul/smul and rmir/smir in xterm-r5 terminfo to match termcap.
+ <li>correct typos in initialization and reset strings in xterm-r5
+ termcap and terminfo.
+ <li>disable special translations of key symbols (the backarrow key,
+ the editing keypad and the keypad "+") when a modifier other than
+ shift, control or numlock is used. This makes xterm handle the meta
+ key as expected by people using emacs (reported by Pete Harlan
+ <harlan@pointofchoice.com> in linux.debian.user newsgroup).
+</ul>
+
+<H1><A NAME="sync_83">Resync #83 - 1998/10/7 - XFree86 3.3.2e</A></H1>
+
+Merge changes through patch #83 with the 3.3.2e version. This follows a
+patch by Matthieu Herrb <matthieu@laas.fr> to add checks for nonnull
+return from malloc.
<H1><A NAME="xterm_83">Patch #83 - 1998/8/25 - XFree86 3.9Nb</A></H1>
Several small fixes and enhancements:
Index: xterm.man
--- xterm-83+/xterm.man Sun Aug 30 06:43:03 1998
+++ xterm-84/xterm.man Wed Sep 23 06:32:53 1998
@@ -1,6 +1,6 @@
.\" $XConsortium: xterm.man /main/85 1996/12/09 17:10:53 kaleb $
.\" Copyright (c) 1989 X Consortium
-.\"
+.\"
.\" Permission is hereby granted, free of charge, to any person obtaining
.\" a copy of this software and associated documentation files (the
.\" "Software"), to deal in the Software without restriction, including
@@ -8,10 +8,10 @@
.\" distribute, sublicense, and/or sell copies of the Software, and to
.\" permit persons to whom the Software is furnished to do so, subject to
.\" the following conditions:
-.\"
+.\"
.\" The above copyright notice and this permission notice shall be included
.\" in all copies or substantial portions of the Software.
-.\"
+.\"
.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
@@ -19,7 +19,7 @@
.\" OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
.\" ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
.\" OTHER DEALINGS IN THE SOFTWARE.
-.\"
+.\"
.\" Except as contained in this notice, the name of the X Consortium shall
.\" not be used in advertising or otherwise to promote the sale, use or
.\" other dealings in this Software without prior written authorization
@@ -36,20 +36,20 @@
[\-\fItoolkitoption\fP ...] [\-option ...]
.SH DESCRIPTION
The \fIxterm\fP program is a terminal emulator for the X Window System.
-It provides DEC VT102/VT220 (VTxxx) and Tektronix 4014
+It provides DEC VT102/VT220 (VTxxx) and Tektronix 4014
compatible terminals for programs that can't
-use the window system directly. If the underlying operating system supports
-terminal resizing capabilities (for example, the SIGWINCH signal in systems
-derived from 4.3bsd), \fIxterm\fP will use the facilities to notify programs
+use the window system directly. If the underlying operating system supports
+terminal resizing capabilities (for example, the SIGWINCH signal in systems
+derived from 4.3bsd), \fIxterm\fP will use the facilities to notify programs
running in the window whenever it is resized.
.PP
The VT102 and Tektronix 4014 terminals each have their own window so that you
can edit text in one and look at graphics in the other at the same time.
To maintain the correct aspect ratio (height/width), Tektronix graphics will
-be restricted to the largest box with a 4014's aspect ratio that will fit in
+be restricted to the largest box with a 4014's aspect ratio that will fit in
the window. This box is located in the upper left area of the window.
.PP
-Although both windows may be displayed at the same time, one of them is
+Although both windows may be displayed at the same time, one of them is
considered the ``active'' window for receiving keyboard input and terminal
output. This is the window that contains the text cursor.
The active window can be chosen through escape sequences,
@@ -75,7 +75,7 @@
.I xterm
features may be modified under program control
through a set of escape sequences different from the standard VT102 escape
-sequences.
+sequences.
(See the
.I "Xterm Control Sequences"
document.)
@@ -126,7 +126,7 @@
allows the visual editor
.IR vi (1)
to switch to the alternate screen for editing and to restore the screen
-on exit.
+on exit.
.PP
In either VT102 or Tektronix mode, there are escape sequences to change the
name of the windows.
@@ -143,7 +143,7 @@
See \fIXterm Control Sequences\fP for details.
.SH OPTIONS
-The \fIxterm\fP terminal emulator
+The \fIxterm\fP terminal emulator
accepts all of the standard X Toolkit command line options as well as
the following (if the option begins with a
.RB ` + '
@@ -170,11 +170,11 @@
window will resize appropriately.
.TP 8
.B \-ah
-This option indicates that
+This option indicates that
.I xterm
should always highlight the text cursor. By default,
.I xterm
-will display a hollow text cursor whenever the focus is lost or the
+will display a hollow text cursor whenever the focus is lost or the
pointer leaves the window.
.TP 8
.B \+ah
@@ -231,7 +231,7 @@
This option enables recognition of ANSI color-change escape sequences.
.TP 8
.B "\-cn"
-This option indicates that newlines should not be cut in line-mode
+This option indicates that newlines should not be cut in line-mode
selections.
.TP 8
.B \+cn
@@ -273,11 +273,11 @@
This option specifies the program (and its command line arguments) to be
run in the \fIxterm\fP window. It also sets the window title and icon
name to be the basename of the program being executed if neither \fI\-T\fP
-nor \fI\-n\fP are given on the command line. \fBThis must be the last
+nor \fI\-n\fP are given on the command line. \fBThis must be the last
option on the command line.\fP
.TP 8
.BI \-fb " font"
-This option specifies a font to be used when displaying bold text.
+This option specifies a font to be used when displaying bold text.
This font must be the same height and width as the normal font.
If only one of the normal or bold fonts is specified, it will be used as the
normal font and the bold font will be produced by overstriking this font.
@@ -326,7 +326,7 @@
.TP 8
.B \-mb
This option indicates that \fIxterm\fP should ring a margin bell when
-the user types near the right end of a line. This option can be turned on
+the user types near the right end of a line. This option can be turned on
and off from the ``VT Options'' menu.
.TP 8
.B \+mb
@@ -378,19 +378,19 @@
.TP 8
.B \+s
This option indicates that \fIxterm\fP should scroll synchronously.
-.TP 8
-.B \-samename
-Doesn't send title and icon name change requests when the request
-would have no effect: the name isn't changed. This has the advantage
-of preventing flicker and the disadvantage of requiring an extra
-round trip to the server to find out the previous value. In practice
-this should never be a problem.
-.TP 8
-.B +samename
-Always send title and icon name change requests.
+.TP 8
+.B \-samename
+Doesn't send title and icon name change requests when the request
+would have no effect: the name isn't changed. This has the advantage
+of preventing flicker and the disadvantage of requiring an extra
+round trip to the server to find out the previous value. In practice
+this should never be a problem.
+.TP 8
+.B +samename
+Always send title and icon name change requests.
.TP 8
.B \-sb
-This option indicates that some number of lines that are scrolled off the top
+This option indicates that some number of lines that are scrolled off the top
of the window should be saved and that a scrollbar should be displayed so that
those lines can be viewed. This option may be turned on and off from the
``VT Options'' menu.
@@ -408,7 +408,7 @@
.TP 8
.B \-si
This option indicates that output to a window should not automatically
-reposition the screen to the bottom of the scrolling region.
+reposition the screen to the bottom of the scrolling region.
This option can be turned on and off from the ``VT Options'' menu.
.TP 8
.B \+si
@@ -416,7 +416,7 @@
scroll to the bottom.
.TP 8
.B \-sk
-This option indicates that pressing a key while
+This option indicates that pressing a key while
using the scrollbar to review previous lines of text should
cause the window to be repositioned automatically in the normal position at the
bottom of the scroll region.
@@ -426,7 +426,7 @@
should not cause the window to be repositioned.
.TP 8
.BI \-sl " number"
-This option specifies the number of lines to save that have been scrolled
+This option specifies the number of lines to save that have been scrolled
off the top of the screen. The default is 64.
.TP 8
.B \-sp
@@ -451,7 +451,7 @@
characters that should be bound to those functions, similar to the \fIstty\fP
program. Allowable keywords include: intr, quit, erase, kill, eof,
eol, swtch, start, stop, brk, susp, dsusp, rprnt, flush, weras, and lnext.
-Control characters may be specified as ^char (e.g. ^c or ^u) and ^? may be
+Control characters may be specified as ^char (e.g. ^c or ^u) and ^? may be
used to indicate delete.
.TP 8
.BI \-tn " name"
@@ -468,7 +468,7 @@
color rather than with underlining.
.TP 8
.B \-ut
-This option indicates that \fIxterm\fP shouldn't write a record into the
+This option indicates that \fIxterm\fP shouldn't write a record into the
the system log file \fI/etc/utmp\fP.
.TP 8
.B \+ut
@@ -492,15 +492,15 @@
.B \+wf
This option indicates that \fIxterm\fP show not wait before starting the
subprocess.
-.TP 8
-.B \-ziconbeep \fIpercent\fP
-Same as zIconBeep resource.
-If percent is non-zero, xterms that produce output while iconified
-will cause an XBell sound at the given volume
-and have "***" prepened to their icon titles.
-Most window managers will detect this change immediately, showing you
-which window has the output.
-(A similar feature was in x10 xterm.)
+.TP 8
+.B \-ziconbeep \fIpercent\fP
+Same as zIconBeep resource.
+If percent is non-zero, xterms that produce output while iconified
+will cause an XBell sound at the given volume
+and have "***" prepened to their icon titles.
+Most window managers will detect this change immediately, showing you
+which window has the output.
+(A similar feature was in x10 xterm.)
.TP 8
.B \-C
This option indicates that this window should receive console output. This
@@ -519,7 +519,7 @@
applications.
.PP
The following command line arguments are provided for compatibility with
-older versions. They may not be supported in the next release as the X
+older versions. They may not be supported in the next release as the X
Toolkit provides standard options that accomplish the same task.
.TP 8
.B "%\fIgeom\fP"
@@ -549,7 +549,7 @@
This option specifies the width in pixels of the border surrounding the window.
It is equivalent to \fB\-borderwidth\fP or \fB\-bw\fP.
.PP
-The following standard X Toolkit command line arguments are commonly used
+The following standard X Toolkit command line arguments are commonly used
with \fIxterm\fP:
.TP 8
.B \-bd \fIcolor\fP
@@ -557,7 +557,7 @@
The default is ``black.''
.TP 8
.B \-bg \fIcolor\fP
-This option specifies the color to use for the background of the window.
+This option specifies the color to use for the background of the window.
The default is ``white.''
.TP 8
.B \-bw \fInumber\fP
@@ -567,7 +567,7 @@
This option specifies the X server to contact; see \fIX(1)\fP.
.TP 8
.B \-fg \fIcolor\fP
-This option specifies the color to use for displaying text. The default is
+This option specifies the color to use for displaying text. The default is
``black.''
.TP 8
.B \-fn \fIfont\fP
@@ -579,7 +579,7 @@
see \fIX(1)\fP.
.TP 8
.B \-iconic
-This option indicates that \fIxterm\fP should ask the window manager to
+This option indicates that \fIxterm\fP should ask the window manager to
start it as an icon rather than as the normal window.
.TP 8
.B \-name \fIname\fP
@@ -611,14 +611,14 @@
.TP 8
.B "iconName (\fPclass\fB IconName)"
Specifies the icon name. The default is the application name.
-.TP 8
-.B "sameName (\fPclass\fB SameName)"
-If the value of this resource is "true", xterm doesn't send
-title and icon name change requests when the request
-would have no effect: the name isn't changed. This has the advantage
-of preventing flicker and the disadvantage of requiring an extra
-round trip to the server to find out the previous value. In practice
-this should never be a problem. The default is "true".
+.TP 8
+.B "sameName (\fPclass\fB SameName)"
+If the value of this resource is "true", xterm doesn't send
+title and icon name change requests when the request
+would have no effect: the name isn't changed. This has the advantage
+of preventing flicker and the disadvantage of requiring an extra
+round trip to the server to find out the previous value. In practice
+this should never be a problem. The default is "true".
.TP 8
.B "sunFunctionKeys (\fPclass\fB SunFunctionKeys)"
Specifies whether or not Sun Function Key escape codes should be generated for
@@ -641,8 +641,8 @@
.TP 8
.B "ttyModes (\fPclass\fB TtyModes)"
Specifies a string containing terminal setting keywords and the characters
-to which they may be bound. Allowable keywords include: intr, quit,
-erase, kill, eof, eol, swtch, start, stop, brk, susp, dsusp, rprnt, flush,
+to which they may be bound. Allowable keywords include: intr, quit,
+erase, kill, eof, eol, swtch, start, stop, brk, susp, dsusp, rprnt, flush,
weras, and lnext. Control characters may be specified as ^char (e.g. ^c or ^u)
and ^? may be used to indicate Delete. This is very useful for overriding
the default terminal settings without having to do an \fIstty\fP every time
@@ -660,15 +660,15 @@
.B "waitForMap (\fPclass\fB WaitForMap)"
Specifies whether or not \fIxterm\fP should wait for the initial window map
before starting the subprocess. The default is ``false.''
-.TP 8
-.B "zIconBeep (\fPclass\fB ZIconBeep)"
-Same as \-ziconbeep command line argument.
-If the value of this resource is non-zero, xterms that produce output
-while iconified will cause an XBell sound at the given volume
-and have "***" prepened to their icon titles.
-Most window managers will detect this change immediately, showing you
-which window has the output.
-(A similar feature was in x10 xterm.)
+.TP 8
+.B "zIconBeep (\fPclass\fB ZIconBeep)"
+Same as \-ziconbeep command line argument.
+If the value of this resource is non-zero, xterms that produce output
+while iconified will cause an XBell sound at the given volume
+and have "***" prepened to their icon titles.
+Most window managers will detect this change immediately, showing you
+which window has the output.
+(A similar feature was in x10 xterm.)
.\".in 11in
.sp
.PP
@@ -693,7 +693,7 @@
.sp
.TP 8
.B "alwaysHighlight (\fPclass\fB AlwaysHighlight)"
-Specifies whether or not \fIxterm\fP should always display a highlighted
+Specifies whether or not \fIxterm\fP should always display a highlighted
text cursor. By default, a hollow text cursor is displayed whenever the
pointer moves out of the window or the window loses the input focus.
.TP 8
@@ -721,7 +721,7 @@
The default (backspace) is ``true.''
.TP 8
.B "background (\fPclass\fB Background)"
-Specifies the color to use for the background of the window. The default is
+Specifies the color to use for the background of the window. The default is
``white.''
.TP 8
.B "bellSuppressTime (\fPclass\fB BellSuppressTime)"
@@ -830,7 +830,7 @@
.TP 8
.B "color15 (\fPclass\fB Foreground)"
These specify the colors for the ISO 6429 extension if the bold attribute
-is also enabled. The defaults are, respectively, black, red, green,
+is also enabled. The defaults are, respectively, black, red, green,
yellow, blue, magenta, cyan, and white.
.TP 8
.B "colorBD (\fPclass\fB Foreground)"
@@ -974,7 +974,7 @@
The default is ``false.''
.TP 8
.B "pointerColor (\fPclass\fB Foreground)"
-Specifies the foreground color of the pointer. The default is
+Specifies the foreground color of the pointer. The default is
``XtDefaultForeground.''
.TP 8
.B "pointerColorBackground (\fPclass\fB Background)"
@@ -1409,6 +1409,9 @@
selects by lines. Quadruple-clicking goes back to characters, etc.
Multiple-click is determined by the time from button up to
button down, so you can change the selection unit in the middle of a selection.
+Logical words and lines selected by double- or triple-clicking may wrap
+across more than one screen line if lines were wrapped by \fIxterm\fP
+itself rather than by the application running in the window.
If the key/button bindings specify that an X selection is to be made,
\fIxterm\fP will leave the selected text highlighted for as long as it
is the selection owner.
@@ -1427,7 +1430,7 @@
the left edge of the selection,
.I xterm
assumes you really meant the left edge, restores the original selection, then
-extends/contracts the left edge of the selection. Extension starts in the
+extends/contracts the left edge of the selection. Extension starts in the
selection unit mode
that the last selection or extension was performed in; you can multiple-click
to cycle through them.
@@ -1444,7 +1447,7 @@
The scroll region displays the position and amount of text currently showing
in the window (highlighted) relative to the amount of text actually saved.
As more text is saved (up to the maximum), the size of the highlighted area
-decreases.
+decreases.
.PP
Clicking button one with the pointer in the scroll region moves the
adjacent line to the top of the display window.
@@ -1593,7 +1596,7 @@
characters of the same class (e.g. letters, white space, punctuation) to be
selected. Since different people have different preferences for what should
be selected (for example, should filenames be selected as a whole or only
-the separate subnames), the default mapping can be overridden through the use
+the separate subnames), the default mapping can be overridden through the use
of the \fIcharClass\fP (class \fICharClass\fP) resource.
.PP
This resource is a
@@ -1630,7 +1633,7 @@
64, 48, 48, 48, 48, 48, 48, 48,
/* H I J K L M N O */
48, 48, 48, 48, 48, 48, 48, 48,
-/* P Q R S T U V W */
+/* P Q R S T U V W */
48, 48, 48, 48, 48, 48, 48, 48,
/* X Y Z [ \\ ] ^ _ */
48, 48, 48, 91, 92, 93, 94, 48,
@@ -1648,7 +1651,7 @@
.sp
For example, the string ``33:48,37:48,45-47:48,64:48'' indicates that the
exclamation mark, percent sign, dash, period, slash, and ampersand characters
-should be treated the same way as characters and numbers. This is useful
+should be treated the same way as characters and numbers. This is useful
for cutting and pasting electronic mailing addresses and filenames.
.SH ACTIONS
It is possible to rebind keys (or sequences of keys) to arbitrary strings
@@ -1709,20 +1712,20 @@
This action inserts the string found in the selection or cutbuffer indicated
by \fIsourcename\fP. Sources are checked in the order given (case is
significant) until one is found. Commonly-used selections include:
-\fIPRIMARY\fP, \fISECONDARY\fP, and \fICLIPBOARD\fP. Cut buffers are
+\fIPRIMARY\fP, \fISECONDARY\fP, and \fICLIPBOARD\fP. Cut buffers are
typically named \fICUT_BUFFER0\fP through \fICUT_BUFFER7\fP.
.TP 8
.B "insert-seven-bit()"
This action is a synonym for \fBinsert()\fP
.TP 8
.B "keymap(\fIname\fP)"
-This action dynamically defines a new translation table whose resource
+This action dynamically defines a new translation table whose resource
name is \fIname\fP with the suffix \fIKeymap\fP (case is significant).
The name \fINone\fP restores the original translation table.
.TP 8
.B "popup-menu(\fImenuname\fP)"
-This action displays the specified popup menu. Valid names (case is
-significant) include: \fImainMenu\fP, \fIvtMenu\fP, \fIfontMenu\fP,
+This action displays the specified popup menu. Valid names (case is
+significant) include: \fImainMenu\fP, \fIvtMenu\fP, \fIfontMenu\fP,
and \fItekMenu\fP.
.TP 8
.B "print()"
@@ -1761,11 +1764,11 @@
selection at the current text cursor position.
.TP 8
.B "select-end(\fIdestname\fP [, ...])"
-This action puts the currently selected text into all of the selections or
+This action puts the currently selected text into all of the selections or
cutbuffers specified by \fIdestname\fP.
.TP 8
.B "select-extend()"
-This action tracks the pointer and extends the selection. It
+This action tracks the pointer and extends the selection. It
should only be bound to Motion events.
.TP 8
.B "select-set()"
@@ -1786,7 +1789,7 @@
.BR hangup ,
.BR terminate ,
and
-.BR kill
+.BR kill
entries in \fImainMenu\fP. Allowable signal names are (case is
not significant):
\fItstp\fP (if supported by the operating system), \fIsuspend\fP (same
@@ -1803,11 +1806,11 @@
This action toggles between the alternate and current screens.
.TP 8
.B "set-appcursor(\fIon/off/toggle\fP)"
-This action toggles the handling Application Cursor Key mode
+This action toggles the handling Application Cursor Key mode
and is also invoked by the \fBappcursor\fP entry in \fIvtMenu\fP.
.TP 8
.B "set-appkeypad(\fIon/off/toggle\fP)"
-This action toggles the handling of Application Keypad mode and is also
+This action toggles the handling of Application Keypad mode and is also
invoked by the \fBappkeypad\fP entry in \fIvtMenu\fP.
.TP 8
.B "set-autolinefeed(\fIon/off/toggle\fP)"
@@ -1819,7 +1822,7 @@
the \fBautowrap\fP entry in \fIvtMenu\fP.
.TP 8
.B "set-cursesemul(\fIon/off/toggle\fP)"
-This action toggles the \fBcurses\fP resource and is also invoked from the
+This action toggles the \fBcurses\fP resource and is also invoked from the
\fBcursesemul\fP entry in \fIvtMenu\fP.
.TP 8
.B "set-jumpscroll(\fIon/off/toggle\fP)"
@@ -1830,7 +1833,7 @@
This action toggles the state of the logging option.
.TP 8
.B "set-marginbell(\fIon/off/toggle\fP)"
-This action toggles the \fBmarginBell\fP resource and is also invoked from
+This action toggles the \fBmarginBell\fP resource and is also invoked from
the \fBmarginbell\fP entry in \fIvtMenu\fP.
.TP 8
.B "set-reverse-video(\fIon/off/toggle\fP)"
@@ -1854,7 +1857,7 @@
the \fBscrollbar\fP entry in \fIvtMenu\fP.
.TP 8
.B "set-tek-text(\fIlarge/2/3/small\fP)"
-This action sets font used in the Tektronix window to the value of the
+This action sets font used in the Tektronix window to the value of the
resources \fBtektextlarge\fP, \fBtektext2\fP, \fBtektext3\fP, and
\fBtektextsmall\fP according to the argument. It is also by the entries
of the same names as the resources in \fItekMenu\fP.
@@ -1863,12 +1866,12 @@
This action directs output to either the \fIvt\fP or \fItek\fP windows,
according to the \fItype\fP string. It is also invoked by the
\fBtekmode\fP entry in \fIvtMenu\fP and the \fBvtmode\fP entry in
-\fItekMenu\fP.
+\fItekMenu\fP.
.TP 8
.B "set-visibility(\fIvt/tek\fP,\fIon/off/toggle\fP)"
This action controls whether or not the \fIvt\fP or \fItek\fP windows are
-visible. It is also invoked from the \fBtekshow\fP and \fBvthide\fP entries
-in \fIvtMenu\fP and the \fBvtshow\fP and \fBtekhide\fP entries in
+visible. It is also invoked from the \fBtekshow\fP and \fBvthide\fP entries
+in \fIvtMenu\fP and the \fBvtshow\fP and \fBtekhide\fP entries in
\fItekMenu\fP.
.TP 8
.B "set-visual-bell(\fIon/off/toggle\fP)"
@@ -1877,26 +1880,26 @@
.TP 8
.B "set-vt-font(\fId/1/2/3/4/5/6/e/s\fP [,\fInormalfont\fP [, \fIboldfont\fP]])"
This action sets the font or fonts currently being used in the VT102 window.
-The first argument is a single character that specifies the font to be
-used: \fId\fP or \fID\fP indicate the default font (the font initially
+The first argument is a single character that specifies the font to be
+used: \fId\fP or \fID\fP indicate the default font (the font initially
used when
-\fIxterm\fP was started), \fI1\fP through \fI6\fP indicate the fonts
+\fIxterm\fP was started), \fI1\fP through \fI6\fP indicate the fonts
specified by the \fIfont1\fP through \fIfont6\fP resources, \fIe\fP or \fIE\fP
-indicate the normal and bold fonts that have been set through escape codes
+indicate the normal and bold fonts that have been set through escape codes
(or specified as the second and third action arguments, respectively), and
\fIs\fP or \fIS\fP indicate the font selection (as made by programs such as
\fIxfontsel(1)\fP) indicated by the second action argument.
.TP 8
.B "soft-reset()"
-This action resets the scrolling region and is also invoked from the
+This action resets the scrolling region and is also invoked from the
\fBsoftreset\fP entry in \fIvtMenu\fP.
.TP 8
.B "start-extend()"
-This action is similar to \fBselect-start\fP except that the
+This action is similar to \fBselect-start\fP except that the
selection is extended to the current pointer location.
.TP 8
.B "start-cursor-extend()"
-This action is similar to \fBselect-extend\fP except that the
+This action is similar to \fBselect-extend\fP except that the
selection is extended to the current text cursor position.
.TP 8
.B "string(\fIstring\fP)"
@@ -2070,12 +2073,12 @@
.SH AUTHORS
Far too many people, including:
.sp
-Loretta Guarino Reid (DEC-UEG-WSL),
+Loretta Guarino Reid (DEC-UEG-WSL),
Joel McCormack (DEC-UEG-WSL), Terry Weissman (DEC-UEG-WSL),
Edward Moy (Berkeley), Ralph R. Swick (MIT-Athena),
Mark Vandevoorde (MIT-Athena), Bob McNamara (DEC-MAD),
Jim Gettys (MIT-Athena), Bob Scheifler (MIT X Consortium), Doug Mink (SAO),
-Steve Pitschke (Stellar), Ron Newman (MIT-Athena), Jim Fulton (MIT X
+Steve Pitschke (Stellar), Ron Newman (MIT-Athena), Jim Fulton (MIT X
Consortium), Dave Serisky (HP), Jonathan Kamens (MIT-Athena),
Jason Bacon <acadix@execpc.com>,
David Wexelblat, and