xterm: Changes to 'debian-unstable'
MANIFEST | 2 +-
THANKS | 7 +++++--
button.c | 33 +++++++++++++++++++++++----------
debian/changelog | 8 ++++++++
main.c | 4 ++--
package/debian/changelog | 6 ++++++
package/freebsd/Makefile | 2 +-
package/xterm.spec | 4 ++--
version.h | 6 +++---
xstrings.c | 29 ++++++++++++++++++++++++++++-
xstrings.h | 5 +++--
xterm.log.html | 27 ++++++++++++++++++++++++---
xterm.man | 19 ++++++++++++++-----
13 files changed, 120 insertions(+), 32 deletions(-)
New commits:
commit 1b404b75709e5af6131930ea6f29d5d3e49d6ee0
Author: Sven Joachim <svenjoac@gmx.de>
Date: Sat Aug 29 08:59:23 2015 +0200
Close bug #797008
diff --git a/debian/changelog b/debian/changelog
index b7fe8c0..e32c0d1 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,8 @@
xterm (320-1) UNRELEASED; urgency=medium
* New upstream release.
+ - Amend fix for bug #794201 (report forwarded from Christian Jachmann
+ by Emanuel Haupt, Closes: #797008).
-- Sven Joachim <svenjoac@gmx.de> Sat, 29 Aug 2015 08:57:26 +0200
commit c56e0ae532bbfa9feab062fb9f85b3d7a50c59c4
Author: Sven Joachim <svenjoac@gmx.de>
Date: Sat Aug 29 08:57:32 2015 +0200
New upstream release
diff --git a/debian/changelog b/debian/changelog
index ea86db3..b7fe8c0 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+xterm (320-1) UNRELEASED; urgency=medium
+
+ * New upstream release.
+
+ -- Sven Joachim <svenjoac@gmx.de> Sat, 29 Aug 2015 08:57:26 +0200
+
xterm (319-1) unstable; urgency=low
* New upstream release.
commit e53d527194aa459a043487f7f83265b2f9eaaf94
Author: Sven Joachim <svenjoac@gmx.de>
Date: Sat Aug 29 08:54:39 2015 +0200
Imported Upstream version 320
diff --git a/MANIFEST b/MANIFEST
index 424d573..ff79fa6 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -1,4 +1,4 @@
-MANIFEST for xterm-319, version xterm-319
+MANIFEST for xterm-320, version xterm-320
--------------------------------------------------------------------------------
MANIFEST this file
256colres.h resource-definitions for 256-color mode
diff --git a/THANKS b/THANKS
index e953827..f2af2bf 100644
--- a/THANKS
+++ b/THANKS
@@ -1,4 +1,4 @@
--- $XTermId: THANKS,v 1.14 2014/07/12 14:41:17 tom Exp $
+-- $XTermId: THANKS,v 1.15 2015/08/28 08:17:31 tom Exp $
-- vile:txtmode fk=8bit
There's no AUTHORS file in this distribution; it would be redundant since
I (Thomas E. Dickey) have done more than 80% of the work on xterm since 1996.
@@ -61,7 +61,6 @@ Denis Zaitsev
Dennis Preiser
Dennis Schneider
Dimitrios Christidis
-Dr Werner Fink
Ed Schouten
Eddy De Greef
Edward S Arthur
@@ -74,6 +73,7 @@ Frank Giessler
Frank Guangxin Liu
Frank Liu
Gael Roualland
+George Nachman
George Peter Staplin
Gertjan Halkes
Greg Badros
@@ -120,6 +120,8 @@ Marius Tolzmann
Mark Waggoner
Markus Kuhn
Martin Pirker
+Martin Tournoij
+Matthew Green
Matthias Baake
Matthias Scheler
Matthieu Herrb
@@ -188,6 +190,7 @@ Tor Lillqvist
Torrey Lyons
Victor Stinner
Vincent Lefevre
+Werner Fink
Werner Lemberg
Will Day
Zdenek Sekera
diff --git a/button.c b/button.c
index fb922d1..e407136 100644
--- a/button.c
+++ b/button.c
@@ -1,4 +1,4 @@
-/* $XTermId: button.c,v 1.492 2015/04/10 10:16:19 tom Exp $ */
+/* $XTermId: button.c,v 1.494 2015/08/27 23:47:56 tom Exp $ */
/*
* Copyright 1999-2014,2015 by Thomas E. Dickey
@@ -4927,6 +4927,20 @@ formatVideoAttrs(XtermWidget xw, char *buffer, CELL *cell)
}
}
+static char *
+formatStrlen(char *target, char *source, int freeit)
+{
+ if (source != 0) {
+ sprintf(target, "%u", (unsigned) strlen(source));
+ if (freeit) {
+ free(source);
+ }
+ } else {
+ strcpy(target, "0");
+ }
+ return target;
+}
+
/* substitute data into format, reallocating the result */
static char *
expandFormat(XtermWidget xw,
@@ -4971,21 +4985,20 @@ expandFormat(XtermWidget xw,
finish->col + 1);
value = numbers;
break;
+ case 'R':
+ value = formatStrlen(numbers, x_strrtrim(data), 1);
+ break;
+ case 'r':
+ value = x_strrtrim(data);
+ break;
case 'S':
- sprintf(numbers, "%u", (unsigned) strlen(data));
- value = numbers;
+ value = formatStrlen(numbers, data, 0);
break;
case 's':
value = data;
break;
case 'T':
- if ((value = x_strtrim(data)) != 0) {
- sprintf(numbers, "%u", (unsigned) strlen(value));
- free(value);
- } else {
- strcpy(numbers, "0");
- }
- value = numbers;
+ value = formatStrlen(numbers, x_strtrim(data), 1);
break;
case 't':
value = x_strtrim(data);
diff --git a/main.c b/main.c
index d992486..8ed2e29 100644
--- a/main.c
+++ b/main.c
@@ -1,4 +1,4 @@
-/* $XTermId: main.c,v 1.772 2015/08/19 00:25:35 tom Exp $ */
+/* $XTermId: main.c,v 1.773 2015/08/26 23:39:36 tom Exp $ */
/*
* Copyright 2002-2014,2015 by Thomas E. Dickey
@@ -3679,7 +3679,7 @@ spawnXTerm(XtermWidget xw)
added_utmp_entry = False;
#if defined(USE_UTEMPTER)
#undef UTMP
- if (xw->misc.login_shell && !resource.utmpInhibit) {
+ if ((xw->misc.login_shell || !command_to_exec) && !resource.utmpInhibit) {
struct UTMP_STR dummy;
/* Note: utempter may trim it anyway */
diff --git a/package/debian/changelog b/package/debian/changelog
index 9fd174a..f47483c 100644
--- a/package/debian/changelog
+++ b/package/debian/changelog
@@ -1,3 +1,9 @@
+xterm-dev (320) unstable; urgency=low
+
+ * maintenance updates
+
+ -- Thomas E. Dickey <dickey@invisible-island.net> Wed, 26 Aug 2015 17:52:20 -0400
+
xterm-dev (319) unstable; urgency=low
* maintenance updates
diff --git a/package/freebsd/Makefile b/package/freebsd/Makefile
index 9472904..5e8806f 100644
--- a/package/freebsd/Makefile
+++ b/package/freebsd/Makefile
@@ -5,7 +5,7 @@
# and "make makesum".
PORTNAME= xterm
-PORTVERSION= 319
+PORTVERSION= 320
CATEGORIES= x11
MASTER_SITES= ftp://invisible-island.net/xterm/ \
CRITICAL
diff --git a/package/xterm.spec b/package/xterm.spec
index 1493eba..bd2aff7 100644
--- a/package/xterm.spec
+++ b/package/xterm.spec
@@ -1,11 +1,11 @@
-# $XTermId: xterm.spec,v 1.84 2015/04/23 00:44:42 tom Exp $
+# $XTermId: xterm.spec,v 1.85 2015/08/26 21:52:20 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: 319
+Version: 320
Release: 1
License: X11
Group: User Interface/X
diff --git a/version.h b/version.h
index 865da51..eb1526f 100644
--- a/version.h
+++ b/version.h
@@ -1,4 +1,4 @@
-/* $XTermId: version.h,v 1.415 2015/08/20 01:02:57 tom Exp $ */
+/* $XTermId: version.h,v 1.418 2015/08/28 08:40:40 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 319
-#define XTERM_DATE 2015-08-19
+#define XTERM_PATCH 320
+#define XTERM_DATE 2015-08-28
#ifndef __vendorversion__
#define __vendorversion__ "XTerm"
diff --git a/xstrings.c b/xstrings.c
index dbc6c1c..6526c65 100644
--- a/xstrings.c
+++ b/xstrings.c
@@ -1,4 +1,4 @@
-/* $XTermId: xstrings.c,v 1.61 2015/04/10 00:23:33 Ross.Combs Exp $ */
+/* $XTermId: xstrings.c,v 1.62 2015/08/27 23:30:42 Martin.Tournoij Exp $ */
/*
* Copyright 2000-2014,2015 by Thomas E. Dickey
@@ -474,6 +474,33 @@ x_strtrim(const char *source)
}
/*
+ * Trims trailing whitespace from a copy of the string.
+ */
+char *
+x_strrtrim(const char *source)
+{
+ char *result;
+ char *s;
+
+ if (source != 0 && *source != '\0') {
+ char *t = x_strdup(source);
+ if (t != 0) {
+ s = t;
+ if (*t != '\0') {
+ s = t + strlen(t);
+ while (s != t && IsSpace(CharOf(s[-1]))) {
+ *--s = '\0';
+ }
+ }
+ }
+ result = t;
+ } else {
+ result = x_strdup("");
+ }
+ return result;
+}
+
+/*
* Avoid using system locale for upper/lowercase conversion, since there are
* a few locales where toupper(tolower(c)) != c.
*/
diff --git a/xstrings.h b/xstrings.h
index fb8676d..c8c7042 100644
--- a/xstrings.h
+++ b/xstrings.h
@@ -1,7 +1,7 @@
-/* $XTermId: xstrings.h,v 1.28 2012/11/26 21:55:10 tom Exp $ */
+/* $XTermId: xstrings.h,v 1.29 2015/08/27 23:31:23 Martin.Tournoij Exp $ */
/*
- * Copyright 2000-2011,2012 by Thomas E. Dickey
+ * Copyright 2000-2012,2015 by Thomas E. Dickey
*
* All Rights Reserved
*
@@ -53,6 +53,7 @@ extern char *x_getlogin(uid_t /* uid */, struct passwd * /* in_out */);
extern char *x_strdup(const char * /* s */);
extern char *x_strindex(char * /* s1 */, const char * /* s2 */);
extern char *x_strtrim(const char * /* s */);
+extern char *x_strrtrim(const char * /* s */);
extern char x_toupper(int /* ch */);
extern int x_hex2int(int /* ch */);
extern int x_strcasecmp(const char * /* s1 */, const char * /* s2 */);
diff --git a/xterm.log.html b/xterm.log.html
index 5ea3682..01adfe5 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.1617 2015/08/20 01:02:38 tom Exp $
+ $XTermId: xterm.log.html,v 1.1624 2015/08/28 08:40:19 tom Exp $
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
@@ -72,6 +72,8 @@
CHANGELOG</a>).</p>
<ul>
+ <li><a href="#xterm_320">Patch #320 - 2015/08/28</a></li>
+
<li><a href="#xterm_319">Patch #319 - 2015/08/19</a></li>
<li><a href="#xterm_318">Patch #318 - 2015/04/12</a></li>
@@ -923,6 +925,25 @@
<li><a href="#xterm_01">Patch #1 - 1996/1/6</a></li>
</ul>
+ <h1><a name="xterm_320" id="xterm_320">Patch #320 -
+ 2015/08/28</a></h1>
+
+ <ul>
+ <li>correct documentation for <code>%t</code> format (report by
+ Martin Tournoij).</li>
+
+ <li>add <code>%R</code> for consistency to
+ <code>exec-formatted()</code> and
+ <code>insert-formatted()</code> actions.</li>
+
+ <li>add <code>%r</code> format to <code>exec-formatted()</code>
+ and <code>insert-formatted()</code> actions (patch by Martin
+ Tournoij).</li>
+
+ <li>Amend fix for Debian #794201 (report forwarded from
+ Christian Jachmann by Emanuel Haupt, Debian #797008).</li>
+ </ul>
+
<h1><a name="xterm_319" id="xterm_319">Patch #319 -
2015/08/19</a></h1>
@@ -959,7 +980,7 @@
<li>fix a few minor bugs found with Coverity.</li>
- <li>update pixelvector handling (patch by Ross Combs):
+ <li>update pixelvector handling (Ross Combs):
<ul>
<li>split pixel-based and coord-based functions with common
@@ -1358,7 +1379,7 @@
<ul>
<li>mention <code>xclip</code> in manpage as an alternative
workaround for copying clipboard data, noting that
- <code>selectToClipboard</code> (from <a href="#xterm_209">patch
+ <code>selectToClipboard</code> (see <a href="#xterm_209">patch
#209</a>) is the recommended approach (Debian #639094).</li>
<li>correct comparison in do_select_regex() of working position
diff --git a/xterm.man b/xterm.man
index 11b0138..68a9eb6 100644
--- a/xterm.man
+++ b/xterm.man
@@ -1,5 +1,5 @@
'\" t
-.\" $XTermId: xterm.man,v 1.612 2015/07/20 09:22:41 tom Exp $
+.\" $XTermId: xterm.man,v 1.617 2015/08/28 08:48:38 tom Exp $
.\"
.\" Copyright 1996-2014,2015 by Thomas E. Dickey
.\"
@@ -678,6 +678,7 @@ a reference, if available.
Turn on the \fBuseInsertMode\fP resource,
which forces use of insert mode by adding appropriate entries to the TERMCAP
environment variable.
+(This option is ignored on most systems, because TERMCAP is not used).
.TP 8
.B +im
Turn off the \fBuseInsertMode\fP resource.
@@ -1787,6 +1788,7 @@ i.e., \fI\*n\fP initializes the terminal to match that value.
Force use of insert mode by adding appropriate entries to the TERMCAP
environment variable.
This is useful if the system termcap is broken.
+(This resource is ignored on most systems, because TERMCAP is not used).
The default is \*(``false\*(''.
.TP 8
.B "utmpDisplayId (\fPclass\fB UtmpDisplayId)"
@@ -2793,10 +2795,10 @@ via a control sequence.
The corresponding terminfo capabilities \fBsmm\fP (set meta mode)
and \fBrmm\fP (reset meta mode)
have been recognized by \fIbash\fP for some time.
-Interestingly enough, \fIbash\fP's notion of "meta mode"
+Interestingly enough, \fIbash\fP's notion of \*(``meta mode\*(''
differs from the standard definition (in the \fIterminfo\fP manual),
which describes the change to the eighth bit of a character.
-It happens that \fIbash\fP views "meta mode"
+It happens that \fIbash\fP views \*(``meta mode\*(''
as the ESC character that \fI\*n\fP puts before a character when a
special meta key is pressed.
\fIbash\fP's early documentation talks about the ESC character
@@ -5781,8 +5783,14 @@ the content of the selection, unmodified.
the length of the string that \*(``%t\*('' would insert.
.TP 5
%t
-the selection, trimmed of leading/trailing whitespace, and newlines
-changed to single spaces.
+the selection, trimmed of leading/trailing whitespace.
+Embedded spaces (and newlines) are copied as is.
+.TP 5
+%R
+the length of the string that \*(``%r\*('' would insert.
+.TP 5
+%r
+the selection, trimmed of trailing whitespace.
.TP 5
%V
the video attributes at the beginning of the highlighted region,
@@ -7125,6 +7133,7 @@ Jim Gettys (MIT-Athena), Bob Scheifler (MIT X Consortium), Doug Mink (SAO),
Steve Pitschke (Stellar), Ron Newman (MIT-Athena), Jim Fulton (MIT X
Consortium), Dave Serisky (HP), Jonathan Kamens (MIT-Athena),
Jason Bacon,
+Ross Combs,
Stephen P. Wall,
David Wexelblat, and
Thomas Dickey (invisible-island.net).
Reply to: