MANIFEST | 2 package/debian/changelog | 6 + package/freebsd/Makefile | 2 package/xterm.spec | 4 screen.c | 10 - version.h | 6 - xterm.log.html | 22 +++ xterm.man | 272 ++++++++++++++++++++++++++++++++++++++--------- 8 files changed, 263 insertions(+), 61 deletions(-)
New commits: commit 28524407360a133196c96a6ed941967756b8fde1 Author: Sven Joachim <svenj...@gmx.de> Date: Mon Mar 30 18:09:41 2015 +0200 Imported Upstream version 317 diff --git a/MANIFEST b/MANIFEST index 658e7b6..4e9809b 100644 --- a/MANIFEST +++ b/MANIFEST @@ -1,4 +1,4 @@ -MANIFEST for xterm-316, version xterm-316 +MANIFEST for xterm-317, version xterm-317 -------------------------------------------------------------------------------- MANIFEST this file 256colres.h resource-definitions for 256-color mode diff --git a/package/debian/changelog b/package/debian/changelog index 566c90d..14c135e 100644 --- a/package/debian/changelog +++ b/package/debian/changelog @@ -1,3 +1,9 @@ +xterm-dev (317) unstable; urgency=low + + * maintenance updates + + -- Thomas E. Dickey <dic...@invisible-island.net> Fri, 20 Mar 2015 19:54:44 -0400 + xterm-dev (316) unstable; urgency=low * maintenance updates diff --git a/package/freebsd/Makefile b/package/freebsd/Makefile index 7997e45..b209fc9 100644 --- a/package/freebsd/Makefile +++ b/package/freebsd/Makefile @@ -5,7 +5,7 @@ # and "make makesum". PORTNAME= xterm -PORTVERSION= 316 +PORTVERSION= 317 CATEGORIES= x11 MASTER_SITES= ftp://invisible-island.net/xterm/ \ CRITICAL diff --git a/package/xterm.spec b/package/xterm.spec index 438fecb..a07cce0 100644 --- a/package/xterm.spec +++ b/package/xterm.spec @@ -1,11 +1,11 @@ -# $XTermId: xterm.spec,v 1.81 2015/03/05 20:52:59 tom Exp $ +# $XTermId: xterm.spec,v 1.82 2015/03/20 23:54:44 tom Exp $ Summary: X terminal emulator (development version) %global my_middle xterm %global my_suffix -dev %global fullname %{my_middle}%{my_suffix} %global my_class XTermDev Name: %{fullname} -Version: 316 +Version: 317 Release: 1 License: X11 Group: User Interface/X diff --git a/screen.c b/screen.c index c8f5f58..5dd02f4 100644 --- a/screen.c +++ b/screen.c @@ -1,4 +1,4 @@ -/* $XTermId: screen.c,v 1.510 2015/03/07 01:19:23 tom Exp $ */ +/* $XTermId: screen.c,v 1.512 2015/03/22 14:47:02 tom Exp $ */ /* * Copyright 1999-2014,2015 by Thomas E. Dickey @@ -1248,7 +1248,7 @@ ScrnInsertChar(XtermWidget xw, unsigned n) TScreen *screen = TScreenOf(xw); int first = ScrnLeftMargin(xw); - int last = ScrnRightMargin(xw) + 1; + int last = ScrnRightMargin(xw); int row = screen->cur_row; int col = screen->cur_col; int j; @@ -1258,13 +1258,13 @@ ScrnInsertChar(XtermWidget xw, unsigned n) TRACE(("ScrnInsertChar - col %d outside [%d..%d]\n", col, first, last)); return; } else if (last < (col + (int) n)) { - n = (unsigned) (last - col); + n = (unsigned) (last + 1 - col); } assert(screen->cur_col >= 0); assert(screen->cur_row >= 0); assert((int) n >= 0); - assert(last >= (int) n); + assert((last + 1) >= (int) n); if_OPT_WIDE_CHARS(screen, { int xx = screen->cur_row; @@ -1273,7 +1273,7 @@ ScrnInsertChar(XtermWidget xw, unsigned n) if (DamagedCells(screen, n, &kl, (int *) 0, xx, kr) && kr > kl) { ClearCells(xw, 0, (unsigned) (kr - kl + 1), row, kl); } - kr = last - (int) n; + kr = last - (int) n + 1; if (DamagedCells(screen, n, &kl, (int *) 0, xx, kr) && kr > kl) { ClearCells(xw, 0, (unsigned) (kr - kl + 1), row, kl); } diff --git a/version.h b/version.h index 65e0063..99025aa 100644 --- a/version.h +++ b/version.h @@ -1,4 +1,4 @@ -/* $XTermId: version.h,v 1.408 2015/03/08 00:29:53 tom Exp $ */ +/* $XTermId: version.h,v 1.410 2015/03/27 08:35:36 tom Exp $ */ /* * Copyright 1998-2014,2015 by Thomas E. Dickey @@ -38,8 +38,8 @@ * version of X to which this version of xterm has been built. The resulting * number in parentheses is my patch number (Thomas E. Dickey). */ -#define XTERM_PATCH 316 -#define XTERM_DATE 2015-03-07 +#define XTERM_PATCH 317 +#define XTERM_DATE 2015-03-27 #ifndef __vendorversion__ #define __vendorversion__ "XTerm" diff --git a/xterm.log.html b/xterm.log.html index 5631165..a9323be 100644 --- a/xterm.log.html +++ b/xterm.log.html @@ -30,7 +30,7 @@ * sale, use or other dealings in this Software without prior written * * authorization. * ***************************************************************************** - $XTermId: xterm.log.html,v 1.1591 2015/03/08 00:30:07 tom Exp $ + $XTermId: xterm.log.html,v 1.1597 2015/03/27 08:35:56 tom Exp $ --> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> @@ -72,6 +72,8 @@ CHANGELOG</a>).</p> <ul> + <li><a href="#xterm_317">Patch #317 - 2015/03/27</a></li> + <li><a href="#xterm_316">Patch #316 - 2015/03/07</a></li> <li><a href="#xterm_315">Patch #315 - 2015/03/02</a></li> @@ -917,6 +919,24 @@ <li><a href="#xterm_01">Patch #1 - 1996/1/6</a></li> </ul> + <h1><a name="xterm_317" id="xterm_317">Patch #317 - + 2015/03/27</a></h1> + + <ul> + <li>adapt example for <code>exec-formatted</code> from <a href= + "http://lukas.zapletalovi.com/2013/07/hidden-gems-of-xterm.html"> + Lukáš Zapletal's</a> webpage to manual (Debian + #780008).</li> + + <li>add a short usage section to the xterm manual, including + notes on setting the window title (Debian #742477).</li> + + <li>revise a change made to <code>ICH</code> in <a href= + "#xterm_314">patch #314</a> to address limit-checks + (reports/testcases by Zoltán Kéri and Joe + Peterson, also reported by Christian Weisgerber).</li> + </ul> + <h1><a name="xterm_316" id="xterm_316">Patch #316 - 2015/03/07</a></h1> diff --git a/xterm.man b/xterm.man index 7b9d08a..44a89fb 100644 --- a/xterm.man +++ b/xterm.man @@ -1,5 +1,5 @@ '\" t -.\" $XTermId: xterm.man,v 1.597 2015/02/15 19:24:23 tom Exp $ +.\" $XTermId: xterm.man,v 1.610 2015/03/27 00:22:23 tom Exp $ .\" .\" Copyright 1996-2014,2015 by Thomas E. Dickey .\" @@ -5750,52 +5750,6 @@ by echoing the event's position ^X ESC G <line+\*(`` \*(''> <col+\*(`` \*(''> .in -8 .TP 8 -.B "fullscreen(\fIon/off/toggle\fP)" -This action sets, unsets or toggles the \fBfullscreen\fP resource. -.TP 8 -.B "iconify()" -Iconifies the window. -.TP 8 -.B "hard-reset()" -This action resets the scrolling region, tabs, window size, and cursor keys -and clears the screen. -It is also invoked from the \fBhardreset\fP -entry in \fIvtMenu\fP. -.TP 8 -.B "ignore()" -This action ignores the event but checks for special pointer position -escape sequences. -.TP 8 -.B "insert()" -This action inserts the character or string associated with -the key that was pressed. -.TP 8 -.B "insert-eight-bit()" -This action inserts an eight-bit (Meta) version of the character or string -associated with the key that was pressed. -Only single-byte values are treated specially. -The exact action depends on the value of -the \fBaltSendsEscape\fP and -the \fBmetaSendsEscape\fP and -the \fBeightBitInput\fP resources. -The \fBmetaSendsEscape\fP resource is tested first. -See the \fBeightBitInput\fP resource for a full discussion. -.IP -The term \*(``eight-bit\*('' is misleading: -\fI\*n\fP checks if the key is in the range 128 to 255 -(the eighth bit is set). -If the value is in that range, -depending on the resource values, -\fI\*n\fP may then do one of the following: -.RS -.bP -add 128 to the value, setting its eighth bit, -.bP -send an ESC byte before the key, or -.bP -send the key unaltered. -.RE -.TP 8 .B "exec-formatted(\fIformat\fP, \fIsourcename\fP [, ...])" Execute an external command, using the current selection for part of the command's parameters. @@ -5843,6 +5797,14 @@ using the same convention as \*(``%V\*(''. After constructing the command-string, \fI\*n\fP forks a subprocess and executes the command, which completes independently of \fI\*n\fP. +.IP +For example, this translation would invoke a new \fI\*n\fP process +to view a file whose name is selected while holding the shift key down. +The new process is started when the mouse button is released: +.NS +*VT100*translations: #override Shift \\ + <Btn1Up>: exec-formatted("xterm -e view '%t'", SELECT) +.NE .TP 8 .B "exec-selectable(\fIformat\fP, \fIonClicks\fP)" Execute an external command, @@ -5852,6 +5814,52 @@ the basic command as in \fBexec-formatted\fP. The second parameter specifies the method for copying the data as in the \fBonClicks\fP resource. .TP 8 +.B "fullscreen(\fIon/off/toggle\fP)" +This action sets, unsets or toggles the \fBfullscreen\fP resource. +.TP 8 +.B "iconify()" +Iconifies the window. +.TP 8 +.B "hard-reset()" +This action resets the scrolling region, tabs, window size, and cursor keys +and clears the screen. +It is also invoked from the \fBhardreset\fP +entry in \fIvtMenu\fP. +.TP 8 +.B "ignore()" +This action ignores the event but checks for special pointer position +escape sequences. +.TP 8 +.B "insert()" +This action inserts the character or string associated with +the key that was pressed. +.TP 8 +.B "insert-eight-bit()" +This action inserts an eight-bit (Meta) version of the character or string +associated with the key that was pressed. +Only single-byte values are treated specially. +The exact action depends on the value of +the \fBaltSendsEscape\fP and +the \fBmetaSendsEscape\fP and +the \fBeightBitInput\fP resources. +The \fBmetaSendsEscape\fP resource is tested first. +See the \fBeightBitInput\fP resource for a full discussion. +.IP +The term \*(``eight-bit\*('' is misleading: +\fI\*n\fP checks if the key is in the range 128 to 255 +(the eighth bit is set). +If the value is in that range, +depending on the resource values, +\fI\*n\fP may then do one of the following: +.RS +.bP +add 128 to the value, setting its eighth bit, +.bP +send an ESC byte before the key, or +.bP +send the key unaltered. +.RE +.TP 8 .B "insert-formatted(\fIformat\fP, \fIsourcename\fP [, ...])" Insert the current selection or data related to it, formatted. The first parameter, \fIformat\fP gives the template for the data @@ -6564,10 +6572,176 @@ That can be set up by altering the translations resource, e.g., <BtnUp>: NotifyScroll(Proportional) EndScroll() .NE .SH "CONTROL SEQUENCES AND KEYBOARD" -The \fIXterm Control Sequences\fP document lists the control sequences which +Applications can send sequences of characters to the terminal to change its +behavior. +Often they are referred to as +\*(``ANSI escape sequences\*('' or just plain +\*(``escape sequences\*('' but both terms are misleading: +.bP +ANSI x3.64 (obsolete) which was replaced by ISO 6429 (ECMA-48) gave rules +for the \fIformat\fP of these sequences of characters. +.bP +While the original VT100 was claimed to be ANSI-compatible (against x3.64), +there is no freely available version of the ANSI standard to show where +the VT100 differs. +Most of the documents which mention the ANSI standard have +additions not found in the original (such as those +based on \fBansi.sys\fP). +So this discussion focuses on the ISO standards. +.bP +The standard describes only sequences sent from the host to the terminal. +There is no standard for sequences sent by special keys from the terminal +to the host. +By convention (and referring to existing terminals), the format of those +sequences usually conforms to the host-to-terminal standard. +.bP +Some of \fI\*n\fP's sequences do not fit into the standard scheme. +Technically those are \*(``unspecified\*(''. +As an example, +DEC Screen Alignment Test (DECALN) is this three-character sequence: +.NS +\fIESC\fP # 8 +.NE +.PP +.bP +Some sequences fit into the standard format, +but are not listed in the standard. +These include the sequences used for setting up scrolling margins +and doing forward/reverse scrolling. +.bP +Some of the sequences (in particular, the single-character functions +such as tab and backspace) +do not include the \fIescape\fP character. +.PP +With all of that in mind, the standard refers to these sequences of +characters as \*(``control sequences\*(''. +.PP +The \fI\*N Control Sequences\fP document lists the control sequences which an application can send \fI\*n\fP to make it perform various operations. Most of these operations are standardized, from either the DEC or Tektronix terminals, or from more widely used standards such as ISO-6429. +.PP +A few examples of usage are given in this section. +.SS Window Titles +.PP +Some scripts use \fBecho\fP with options \fB\-e\fP and \fB\-n\fP to tell +the shell to interpret the string \*(``\\e\*('' as the \fIescape\fP character and +to suppress a trailing newline on output. +Those are not portable, not recommended. +Instead, use \fBprintf\fP (POSIX). +.PP +For example, to set the \fIwindow title\fP to \*(``Hello world!\*('', +you could use one of these commands in a script: +.NS +printf '\\033]2;Hello world!\\033\\' +printf '\\033]2;Hello world!\\007' +printf '\\033]2;%s\\033\\' "Hello world!" +printf '\\033]2;%s\\007' "Hello world!" +.NE +.PP +The \fBprintf\fP command interprets the octal value \*(``\\033\*('' for +\fIescape\fP, and (since it was not given in the format) omits a trailing +newline from the output. +.PP +Some programs (such as \fBscreen\fP(1)) set both window- and icon-titles +at the same time, using a slightly different control sequence. +. +.SS Special Keys +.PP +\fI\*N\fP, like any VT100-compatible terminal emulator, +has two modes for the \fIspecial keys\fP (cursor-keys, numeric keypad, +and certain function-keys): +.bP +\fInormal mode\fP, which makes the special keys transmit +\*(``useful\*('' sequences such as the control sequence for cursor-up +when pressing the up-arrow, and +.bP +\fIapplication mode\fP, +which uses a different control sequence that cannot be mistaken for +the +\*(``useful\*('' sequences. +.PP +The main difference between the two modes is that normal mode sequences +start with \fICSI\fP (\fIescape\ [\fP) and application mode sequences +start with \fISS3\fP (\fIescape\ O\fP). +.PP +The terminal is initialized into one of these two modes (usually the +normal mode), based on the terminal description (termcap or terminfo). +The terminal description also has capabilities (strings) defined for +the keypad mode used in curses applications. +.PP +There is a problem in using the terminal description for applications +that are not intended to be full-screen curses applications: +the definitions of special keys are only correct for this keypad mode. +For example, some shells +(unlike \fBksh\fP(1), which appears to be hard-coded, not even using termcap) +allow their users to customize key-bindings, +assigning shell actions to special keys. +.bP +\fBbash\fP(1) allows \fIconstant\fP strings to be assigned +to functions. +This is only successful if the terminal is initialized to application +mode by default, +because \fBbash\fP lacks flexibility in this area. +It uses a (less expressive than \fBbash\fP's) +\fBreadline\fP scripting language for setting up key bindings, +which relies upon the user to statically enumerate the possible bindings for +given values of $TERM. +.bP +\fBzsh\fP(1) provides an analogous feature, +but it accepts runtime expressions, +as well as providing a \fB$terminfo\fP array for scripts. +In particular, one can use the terminal database, +transforming when defining a key-binding. +By transforming the output so that \fICSI\fP and \fISS3\fP are equated, +\fBzsh\fP can use the terminal database to obtain useful definitions +for its command-line use regardless of whether the terminal uses +normal or application mode initially. +Here is an example: +.NS +[[ "$terminfo[kcuu1]" == "^[O"* ]] && \\ +bindkey -M viins "${terminfo[kcuu1]/O/[}" \\ +vi-up-line-or-history +.NE +. +. +.SS Changing Colors +.PP +A few shell programs provide the ability for users to add color and other +video attributes to the shell prompt strings. +Users can do this by setting $PS1 (the primary prompt string). +Again, \fBbash\fP and \fBzsh\fP have provided features not found in \fBksh\fP. +There is a problem, however: the prompt's width on the screen will not +necessarily be the same as the number of characters. +Because there is no guidance in the POSIX standard, each shell addresses +the problem in a different way: +.bP +\fBbash\fP treats characters within +\*(``\\[\*('' and +\*(``\\]\*('' +as nonprinting (using no width on the screen). +.bP +\fBzsh\fP treats characters within +\*(``%{\*('' and +\*(``%}\*('' +as nonprinting. +.PP +In addition to the difference in syntax, +the shells provide different methods for obtaining useful escape sequences: +.bP +As noted in \fISpecial Keys\fP, \fBzsh\fP initializes the $terminfo array +with the terminal capabilities. +.IP +It also provides a function \fBechoti\fP which works like \fBtput\fP(1) +to convert a terminal capability with its parameters into a string +that can be written to the terminal. +.bP +Shells lacking a comparable feature (such as \fBbash\fP) can always +use the program \fBtput\fP to do this transformation. +.PP +Hard-coded escape sequences are supported by each shell, +but are not recommended because those rely upon particular configurations +and cannot be easily moved between different user environments. . . .SH ENVIRONMENT @@ -6936,6 +7110,8 @@ tty(4) http://invisible-island.net/xterm/xterm.html .br http://invisible-island.net/xterm/ctlseqs/ctlseqs.html +.br +http://invisible-island.net/xterm/xterm.faq.html . . .SH AUTHORS -- To UNSUBSCRIBE, email to debian-x-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/e1ycef1-0001bf...@moszumanska.debian.org