Hello community,
here is the log from the commit of package xterm for openSUSE:Factory checked in at 2014-01-22 09:45:21
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/xterm (Old)
and /work/SRC/openSUSE:Factory/.xterm.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "xterm"
Changes:
--------
--- /work/SRC/openSUSE:Factory/xterm/xterm.changes 2013-12-03 14:28:04.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.xterm.new/xterm.changes 2014-01-23 15:58:55.000000000 +0100
@@ -1,0 +2,40 @@
+Mon Jan 20 14:20:46 UTC 2014 - pcerny@suse.com
+
+- Patch #301 - 2014/01/19
+ * OSC 104 and 105 did not accept parameter to reset a specific
+ color (patch by Egmont Koblinger).
+ * add configure check for initgroups, and use that function to
+ complement its use of setgid (prompted by patch by Miroslav
+ Lichvar).
+ * improve manpage description of scrollbar translations versus
+ the vt100 translations (Debian #723573).
+ * add a few paragraphs to manpage explaining the implications
+ of xterm's reliance on X Toolkit for command-line parsing.
+ * modify cursor-theme logic to check if the environment
+ variable XCURSOR_THEME is set to a nonempty value before
+ constructing a dummy them (prompted by similar check added in
+ OpenBSD CVS).
+ * add check for a case where TrueType bold font is missing a
+ glyph where the non-bold font has it. Temporarily switch to
+ the non-bold font to draw the glyph (report by David
+ Demelier).
+ * minor documentation fixes for ctlseqs.ms
+ * only set SHELL environment variable to programs found in
+ /etc/shells (prompted by patch/report by Al Poole).
+ * build-fix, when --disable-wide-chars --disable-boxchar is
+ used (prompted by patch by Andrey Panov).
+
+-------------------------------------------------------------------
+Thu Dec 5 10:24:02 UTC 2013 - pcerny@suse.com
+
+- Patch #300 - 2013/12/03
+ * amend workaround for Xcursor library from patch #298; the
+ suggested solution for Debian #466704 fell afoul of a bug in
+ Xcursor which treated an empty value for Inherits= as a valid
+ theme—and resulted in a stack overflow due to unbounded
+ recursion. Certain environments such as XFCE4 exposed the
+ bug. A related report in Debian #531679 was closed without
+ following the recommendation to limit stack recursion in this
+ library (reported by Sergey V Dyatko, Debian #731269).
+
+-------------------------------------------------------------------
Old:
----
xterm-299.tgz
xterm-299.tgz.asc
New:
----
xterm-301.tgz
xterm-301.tgz.asc
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ xterm.spec ++++++
--- /var/tmp/diff_new_pack.P4pRIg/_old 2014-01-23 15:58:55.000000000 +0100
+++ /var/tmp/diff_new_pack.P4pRIg/_new 2014-01-23 15:58:55.000000000 +0100
@@ -1,7 +1,7 @@
#
# spec file for package xterm
#
-# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -52,7 +52,7 @@
%if 0%{?suse_version} > 1210
Requires: luit
%endif
-Version: 299
+Version: 301
Release: 0
Summary: The basic X terminal program
License: MIT
++++++ xterm-299.tgz -> xterm-301.tgz ++++++
++++ 10133 lines of diff (skipped)
++++ retrying with extended exclude list
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xterm-299/MANIFEST new/xterm-301/MANIFEST
--- old/xterm-299/MANIFEST 2013-12-01 22:00:28.000000000 +0100
+++ new/xterm-301/MANIFEST 2013-12-09 13:59:54.000000000 +0100
@@ -1,4 +1,4 @@
-MANIFEST for xterm-299, version xterm-299
+MANIFEST for xterm-301, version xterm-301
--------------------------------------------------------------------------------
MANIFEST this file
256colres.h resource-definitions for 256-color mode
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xterm-299/configure.in new/xterm-301/configure.in
--- old/xterm-299/configure.in 2013-11-22 22:42:13.000000000 +0100
+++ new/xterm-301/configure.in 2014-01-16 02:44:05.000000000 +0100
@@ -1,9 +1,9 @@
-dnl $XTermId: configure.in,v 1.321 2013/11/22 21:42:13 tom Exp $
+dnl $XTermId: configure.in,v 1.322 2014/01/16 01:44:05 tom Exp $
dnl
dnl -----------------------------------------------------------------------------
dnl this file is part of xterm
dnl
-dnl Copyright 1997-2012,2013 by Thomas E. Dickey
+dnl Copyright 1997-2013,2014 by Thomas E. Dickey
dnl
dnl All Rights Reserved
dnl
@@ -91,6 +91,7 @@
AC_CHECK_FUNCS( \
gethostname \
getlogin \
+ initgroups \
mkdtemp \
putenv \
unsetenv \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xterm-299/ctlseqs.ms new/xterm-301/ctlseqs.ms
--- old/xterm-299/ctlseqs.ms 2013-11-11 01:23:36.000000000 +0100
+++ new/xterm-301/ctlseqs.ms 2014-01-14 00:02:06.000000000 +0100
@@ -1,9 +1,9 @@
.\"#! troff -ms $1 -*- Nroff -*-
.\" "Xterm Control Sequences" document
-.\" $XTermId: ctlseqs.ms,v 1.303 2013/11/11 00:23:36 tom Exp $
+.\" $XTermId: ctlseqs.ms,v 1.305 2014/01/13 23:02:06 tom Exp $
.\"
.\"
-.\" Copyright 1996-2012,2013 by Thomas E. Dickey
+.\" Copyright 1996-2013,2014 by Thomas E. Dickey
.\"
.\" All Rights Reserved
.\"
@@ -69,8 +69,8 @@
.\"
.ds XT XTerm
.ds xt xterm
-.ds LF Patch #298
-.ds RF 2013/11/10
+.ds LF Patch #301
+.ds RF 2014/01/13
.\"
.if n .pl 9999v \" no page breaks in nroff
.ND
@@ -789,15 +789,19 @@
Send Device Attributes (Primary DA).
\*(Ps = \*0 or omitted \(-> request attributes from terminal.
The response depends on the \fBdecTerminalID\fP resource setting.
- \(-> \*(Cs\*?\*1\*;\*2\*c (``VT100 with Advanced Video Option'')
- \(-> \*(Cs\*?\*1\*;\*0\*c (``VT101 with No Options'')
- \(-> \*(Cs\*?\*6\*c (``VT102'')
- \(-> \*(Cs\*?\*6\*0\*;\*1\*;\*2\*;\*6\*;\*8\*;\*9\*;\*1\*5\*;\*c (``VT220'')
+ \(->\ \*(Cs\*?\*1\*;\*2\*c (``VT100 with Advanced Video Option'')
+ \(->\ \*(Cs\*?\*1\*;\*0\*c (``VT101 with No Options'')
+ \(->\ \*(Cs\*?\*6\*c (``VT102'')
+ \(->\ \*(Cs\*?\*6\*2\*;\*(Ps\*c (``VT220'')
+ \(->\ \*(Cs\*?\*6\*3\*;\*(Ps\*c (``VT320'')
+ \(->\ \*(Cs\*?\*6\*4\*;\*(Ps\*c (``VT420'')
.br
The VT100-style response parameters do not mean anything by themselves.
-VT220 parameters do, telling the host what features the terminal supports:
+VT220 (and higher) parameters do, telling the host what features the terminal supports:
\*(Ps = \*1 \(-> 132-columns.
\*(Ps = \*2 \(-> Printer.
+ \*(Ps = \*3 \(-> ReGIS graphics.
+ \*(Ps = \*4 \(-> Sixel graphics.
\*(Ps = \*6 \(-> Selective erase.
\*(Ps = \*8 \(-> User-defined keys.
\*(Ps = \*9 \(-> National Replacement Character sets.
@@ -880,8 +884,8 @@
\*(Ps = \*4\*5 \(-> Reverse-wraparound Mode.
\*(Ps = \*4\*6 \(-> Start Logging.
This is normally disabled by a compile-time option.
- \*(Ps = \*4\*7 \(-> Use Alternate Screen Buffer. (This may be
-disabled by the \fBtiteInhibit\fP resource).
+ \*(Ps = \*4\*7 \(-> Use Alternate Screen Buffer.
+(This may be disabled by the \fBtiteInhibit\fP resource).
\*(Ps = \*6\*6 \(-> Application keypad (DECNKM).
\*(Ps = \*6\*7 \(-> Backarrow key sends backspace (DECBKM).
\*(Ps = \*6\*9 \(-> Enable left and right margin mode (DECLRMM), VT420 and up.
@@ -1687,6 +1691,7 @@
and have "real" alt and meta keys.
Here is an example:
.ID
+.ft CW
! put meta on mod3 to distinguish it from alt
keycode 64 = Alt_L
clear mod1
@@ -1694,6 +1699,7 @@
keycode 115 = Meta_L
clear mod3
add mod3 = Meta_L
+.ft 1
.DE
.lP
The \fBmetaSendsEscape\fP resource
@@ -2095,10 +2101,10 @@
so that the program can differentiate pasted text from typed-in text.
When bracketed paste mode is set,
the program will receive:
- \*(Es [ 200 ~,
+ \*(Es\*([[\*2\*0\*0\*~,
.br
followed by the pasted text, followed by
- \*(Es [ 201 ~.
+ \*(Es\*([[\*2\*0\*1\*~.
.
.Sh "Title Modes"
.LP
@@ -2165,6 +2171,7 @@
are defined in \fBxcharmouse.h\fP as follows:
.
.ID
+.ft CW
#define SET_X10_MOUSE 9
#define SET_VT200_MOUSE 1000
#define SET_VT200_HIGHLIGHT_MOUSE 1001
@@ -2178,6 +2185,7 @@
#define SET_URXVT_EXT_MODE_MOUSE 1015
#define SET_ALTERNATE_SCROLL 1007
+.ft 1
.DE
.br
The motion reporting modes are strictly \fIxterm\fP extensions, and are not
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xterm-299/ctlseqs.txt new/xterm-301/ctlseqs.txt
--- old/xterm-299/ctlseqs.txt 2013-11-11 01:23:36.000000000 +0100
+++ new/xterm-301/ctlseqs.txt 2014-01-14 00:03:18.000000000 +0100
@@ -21,7 +21,7 @@
Thomas Dickey
XFree86 Project (1996-2006)
invisible-island.net (2006-2013)
- updated for XTerm Patch #298 (2013/11/10)
+ updated for XTerm Patch #301 (2014/01/13)
@@ -299,12 +299,16 @@
-> CSI ? 1 ; 2 c (``VT100 with Advanced Video Option'')
-> CSI ? 1 ; 0 c (``VT101 with No Options'')
-> CSI ? 6 c (``VT102'')
- -> CSI ? 6 0 ; 1 ; 2 ; 6 ; 8 ; 9 ; 1 5 ; c (``VT220'')
+ -> CSI ? 6 2 ; Psc (``VT220'')
+ -> CSI ? 6 3 ; Psc (``VT320'')
+ -> CSI ? 6 4 ; Psc (``VT420'')
The VT100-style response parameters do not mean anything by
- themselves. VT220 parameters do, telling the host what fea-
- tures the terminal supports:
+ themselves. VT220 (and higher) parameters do, telling the
+ host what features the terminal supports:
Ps = 1 -> 132-columns.
Ps = 2 -> Printer.
+ Ps = 3 -> ReGIS graphics.
+ Ps = 4 -> Sixel graphics.
Ps = 6 -> Selective erase.
Ps = 8 -> User-defined keys.
Ps = 9 -> National Replacement Character sets.
@@ -1424,9 +1428,9 @@
When bracketed paste mode is set, pasted text is bracketed with control
sequences so that the program can differentiate pasted text from typed-
in text. When bracketed paste mode is set, the program will receive:
- ESC [ 200 ~,
+ ESC [ 2 0 0 ~ ,
followed by the pasted text, followed by
- ESC [ 201 ~.
+ ESC [ 2 0 1 ~ .
Title Modes
The window- and icon-labels can be set or queried using control
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xterm-299/fontutils.c new/xterm-301/fontutils.c
--- old/xterm-299/fontutils.c 2013-11-26 21:12:00.000000000 +0100
+++ new/xterm-301/fontutils.c 2013-12-09 13:20:31.000000000 +0100
@@ -1,4 +1,4 @@
-/* $XTermId: fontutils.c,v 1.399 2013/11/26 20:12:00 tom Exp $ */
+/* $XTermId: fontutils.c,v 1.400 2013/12/09 12:20:31 tom Exp $ */
/*
* Copyright 1998-2012,2013 by Thomas E. Dickey
@@ -122,7 +122,7 @@
static int lookupOneFontSize(XtermWidget, int);
#endif
-#if OPT_WIDE_CHARS
+#if OPT_REPORT_FONTS || OPT_WIDE_CHARS
static unsigned
countGlyphs(XFontStruct * fp)
{
@@ -140,7 +140,9 @@
}
return count;
}
+#endif
+#if OPT_WIDE_CHARS
/*
* Verify that the wide-bold font is at least a bold font with roughly as many
* glyphs as the wide font. The counts should be the same, but settle for
@@ -2307,7 +2309,7 @@
xtermSetCursorBox(screen);
}
-#if OPT_BOX_CHARS
+#if OPT_BOX_CHARS || OPT_REPORT_FONTS
/*
* Returns true if the given character is missing from the specified font.
@@ -2344,7 +2346,9 @@
}
return result;
}
+#endif
+#if OPT_BOX_CHARS
/*
* The grid is arbitrary, enough resolution that nothing's lost in
* initialization.
@@ -2714,6 +2718,7 @@
font_height - 1);
}
}
+#endif /* OPT_BOX_CHARS */
#if OPT_RENDERFONT
@@ -2741,9 +2746,7 @@
}
return result;
}
-#endif /* OPT_RENDERFONT && OPT_WIDE_CHARS */
-
-#endif /* OPT_BOX_CHARS */
+#endif /* OPT_RENDERFONT */
#if OPT_WIDE_CHARS
#define MY_UCS(ucs,dec) case ucs: result = dec; break
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xterm-299/fontutils.h new/xterm-301/fontutils.h
--- old/xterm-299/fontutils.h 2013-09-11 23:19:50.000000000 +0200
+++ new/xterm-301/fontutils.h 2013-12-09 13:18:01.000000000 +0100
@@ -1,4 +1,4 @@
-/* $XTermId: fontutils.h,v 1.88 2013/09/11 21:19:50 tom Exp $ */
+/* $XTermId: fontutils.h,v 1.89 2013/12/09 12:18:01 tom Exp $ */
/*
* Copyright 1998-2011,2013 by Thomas E. Dickey
@@ -88,12 +88,15 @@
: ((FontIsIncomplete(font) && xtermMissingChar(ch, font)) \
|| ForceBoxChars(screen, ch)))
-extern Bool xtermMissingChar (unsigned /* ch */, XTermFonts */* font */);
extern void xtermDrawBoxChar (XtermWidget /* xw */, unsigned /* ch */, unsigned /* flags */, GC /* gc */, int /* x */, int /* y */, int /* cols */);
#else
#define IsXtermMissingChar(screen, ch, font) False
#endif
+#if OPT_BOX_CHARS || OPT_REPORT_FONTS
+extern Bool xtermMissingChar (unsigned /* ch */, XTermFonts */* font */);
+#endif
+
#if OPT_LOAD_VTFONTS
extern void HandleLoadVTFonts PROTO_XT_ACTIONS_ARGS;
#endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xterm-299/main.c new/xterm-301/main.c
--- old/xterm-299/main.c 2013-11-27 01:41:23.000000000 +0100
+++ new/xterm-301/main.c 2014-01-16 03:12:25.000000000 +0100
@@ -1,7 +1,7 @@
-/* $XTermId: main.c,v 1.735 2013/11/27 00:41:23 tom Exp $ */
+/* $XTermId: main.c,v 1.741 2014/01/16 02:12:25 tom Exp $ */
/*
- * Copyright 2002-2012,2013 by Thomas E. Dickey
+ * Copyright 2002-2013,2014 by Thomas E. Dickey
*
* All Rights Reserved
*
@@ -180,7 +180,6 @@
#if defined(__GLIBC__) && !defined(linux)
#define USE_SYSV_PGRP
#define WTMP
-#define HAS_BSD_GROUPS
#endif
#if defined(USE_TTY_GROUP) || defined(USE_UTMP_SETGID)
@@ -222,12 +221,7 @@
/*
* now get system-specific includes
*/
-#ifdef CRAY
-#define HAS_BSD_GROUPS
-#endif
-
#ifdef macII
-#define HAS_BSD_GROUPS
#include
#undef USE_SYSV_ENVVARS
#undef FIOCLEX
@@ -238,18 +232,15 @@
#endif
#ifdef __hpux
-#define HAS_BSD_GROUPS
#include
#endif /* __hpux */
#ifdef __osf__
-#define HAS_BSD_GROUPS
#undef USE_SYSV_PGRP
#define setpgrp setpgid
#endif
#ifdef __sgi
-#define HAS_BSD_GROUPS
#include
#endif /* __sgi */
@@ -291,9 +282,6 @@
#else
#include
#endif
-#ifndef __INTERIX
-#define HAS_BSD_GROUPS
-#endif
#endif /* !VMS */
#endif /* !linux */
@@ -3156,6 +3144,60 @@
#endif
/*
+ * Only set $SHELL for paths found in the standard location.
+ */
+static Boolean
+validShell(const char *pathname)
+{
+ Boolean result = False;
+ const char *ok_shells = "/etc/shells";
+ char *blob;
+ struct stat sb;
+ size_t rc;
+ FILE *fp;
+
+ if (!IsEmpty(pathname)
+ && access(pathname, X_OK) == 0
+ && stat(ok_shells, &sb) == 0
+ && (sb.st_mode & S_IFMT) == S_IFREG
+ && (sb.st_size != 0)
+ && (blob = calloc((size_t) sb.st_size + 2, sizeof(char))) != 0) {
+ if ((fp = fopen(ok_shells, "r")) != 0) {
+ rc = fread(blob, sizeof(char), (size_t) sb.st_size, fp);
+ if (rc == (size_t) sb.st_size) {
+ char *p = blob;
+ char *q, *r;
+ while (!result && (q = strtok(p, "\n")) != 0) {
+ if ((r = x_strtrim(q)) != 0) {
+ if (!strcmp(q, pathname)) {
+ result = True;
+ }
+ free(r);
+ }
+ p = 0;
+ }
+ }
+ fclose(fp);
+ }
+ free(blob);
+ }
+ TRACE(("validShell %s ->%d\n", NonNull(pathname), result));
+ return result;
+}
+
+static char *
+resetShell(char *oldPath)
+{
+ char *newPath = x_strdup("/bin/sh");
+ char *envPath = getenv("SHELL");
+ if (oldPath != 0)
+ free(oldPath);
+ if (!IsEmpty(envPath))
+ xtermSetenv("SHELL", newPath);
+ return newPath;
+}
+
+/*
* Inits pty and tty and forks a login process.
* Does not close fd Xsocket.
* If slave, the pty named in passedPty is already open for use
@@ -4387,7 +4429,7 @@
IGNORE_RC(setgid(screen->gid));
TRACE_IDS;
-#ifdef HAS_BSD_GROUPS
+#ifdef HAVE_INITGROUPS
if (geteuid() == 0 && OkPasswd(&pw)) {
if (initgroups(login_name, pw.pw_gid)) {
perror("initgroups failed");
@@ -4518,31 +4560,34 @@
signal(SIGHUP, SIG_DFL);
/*
- * If we have an explicit program to run, make that set $SHELL.
+ * If we have an explicit shell to run, make that set $SHELL.
* Otherwise, if $SHELL is not set, determine it from the user's
* password information, if possible.
*
* Incidentally, our setting of $SHELL tells luit to use that
* program rather than choosing between $SHELL and "/bin/sh".
*/
- if ((shell_path = explicit_shname) == NULL) {
- if ((shell_path = x_getenv("SHELL")) == NULL) {
- if ((!OkPasswd(&pw) && !x_getpwuid(screen->uid, &pw))
- || *(shell_path = x_strdup(pw.pw_shell)) == 0) {
- if (shell_path)
- free(shell_path);
- shell_path = x_strdup("/bin/sh");
- } else if (shell_path != 0) {
- xtermSetenv("SHELL", shell_path);
- }
- }
- } else {
+ if (validShell(explicit_shname)) {
xtermSetenv("SHELL", explicit_shname);
+ shell_path = explicit_shname;
+ } else if (validShell(shell_path = x_getenv("SHELL"))) {
+ ; /* OK */
+ } else if ((!OkPasswd(&pw) && !x_getpwuid(screen->uid, &pw))
+ || *(shell_path = x_strdup(pw.pw_shell)) == 0) {
+ shell_path = resetShell(shell_path);
+ } else if (validShell(shell_path)) {
+ xtermSetenv("SHELL", shell_path);
+ } else {
+ shell_path = resetShell(shell_path);
}
- if (access(shell_path, X_OK) != 0) {
- xtermPerror("Cannot use '%s' as shell", shell_path);
+
+ /*
+ * Set $XTERM_SHELL, which is not necessarily a valid shell, but
+ * is executable.
+ */
+ if (explicit_shname != 0 && access(explicit_shname, X_OK) == 0) {
free(shell_path);
- shell_path = x_strdup("/bin/sh");
+ shell_path = explicit_shname;
}
xtermSetenv("XTERM_SHELL", shell_path);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xterm-299/misc.c new/xterm-301/misc.c
--- old/xterm-299/misc.c 2013-11-26 23:47:29.000000000 +0100
+++ new/xterm-301/misc.c 2014-01-19 17:12:25.000000000 +0100
@@ -1,7 +1,7 @@
-/* $XTermId: misc.c,v 1.681 2013/11/26 22:47:29 tom Exp $ */
+/* $XTermId: misc.c,v 1.686 2014/01/19 16:12:25 Egmont.Koblinger Exp $ */
/*
- * Copyright 1999-2012,2013 by Thomas E. Dickey
+ * Copyright 1999-2013,2014 by Thomas E. Dickey
*
* All Rights Reserved
*
@@ -706,42 +706,45 @@
const char *pattern = "xtermXXXXXX";
const char *tmp_dir;
char *filename;
+ char *env = getenv("XCURSOR_THEME");
size_t needed;
FILE *fp;
xterm_cursor_theme = 0;
- if ((tmp_dir = getenv("TMPDIR")) == 0)
- tmp_dir = P_tmpdir;
- needed = strlen(tmp_dir) + 4 + strlen(theme) + strlen(pattern);
- if ((filename = malloc(needed)) != 0) {
- sprintf(filename, "%s/%s", tmp_dir, pattern);
+ if (IsEmpty(env)) {
+ if ((tmp_dir = getenv("TMPDIR")) == 0) {
+ tmp_dir = P_tmpdir;
+ }
+ needed = strlen(tmp_dir) + 4 + strlen(theme) + strlen(pattern);
+ if ((filename = malloc(needed)) != 0) {
+ sprintf(filename, "%s/%s", tmp_dir, pattern);
#ifdef HAVE_MKDTEMP
- xterm_cursor_theme = mkdtemp(filename);
+ xterm_cursor_theme = mkdtemp(filename);
#else
- if (mktemp(filename) != 0
- && mkdir(filename, 0700) == 0) {
- xterm_cursor_theme = filename;
- }
+ if (mktemp(filename) != 0
+ && mkdir(filename, 0700) == 0) {
+ xterm_cursor_theme = filename;
+ }
#endif
- /*
- * Actually, Xcursor does what _we_ want just by steering its search
- * path away from home. We are setting up the complete theme just in
- * case the library ever acquires a maintainer.
- */
- if (xterm_cursor_theme != 0) {
- char *leaf = xterm_cursor_theme + strlen(xterm_cursor_theme);
- strcat(leaf, "/");
- strcat(leaf, theme);
- if ((fp = fopen(xterm_cursor_theme, "w")) != 0) {
- fprintf(fp, "[Icon Theme]\n");
- fprintf(fp, "Inherits=\n");
- fclose(fp);
- *leaf = '\0';
- xtermSetenv("XCURSOR_PATH", xterm_cursor_theme);
- *leaf = '/';
+ /*
+ * Actually, Xcursor does what _we_ want just by steering its
+ * search path away from home. We are setting up the complete
+ * theme just in case the library ever acquires a maintainer.
+ */
+ if (xterm_cursor_theme != 0) {
+ char *leaf = xterm_cursor_theme + strlen(xterm_cursor_theme);
+ strcat(leaf, "/");
+ strcat(leaf, theme);
+ if ((fp = fopen(xterm_cursor_theme, "w")) != 0) {
+ fprintf(fp, "[Icon Theme]\n");
+ fclose(fp);
+ *leaf = '\0';
+ xtermSetenv("XCURSOR_PATH", xterm_cursor_theme);
+ *leaf = '/';
+ }
+ atexit(cleanup_colored_cursor);
}
- atexit(cleanup_colored_cursor);
}
}
#endif /* HAVE_LIB_XCURSOR */
@@ -1264,6 +1267,7 @@
int save_err = errno;
va_list ap;
+ TRACE(("xtermWarning fmt='%s'\n", fmt));
fprintf(stderr, "%s: ", ProgramName);
va_start(ap, fmt);
vfprintf(stderr, fmt, ap);
@@ -1280,6 +1284,7 @@
char *msg = strerror(errno);
va_list ap;
+ TRACE(("xtermPerror fmt='%s', msg='%s'\n", fmt, NonNull(msg)));
fprintf(stderr, "%s: ", ProgramName);
va_start(ap, fmt);
vfprintf(stderr, fmt, ap);
@@ -3379,6 +3384,7 @@
int ansi_colors = 0;
#endif
Bool need_data = True;
+ Bool optional_data = False;
TRACE(("do_osc %s\n", oscbuf));
@@ -3462,6 +3468,9 @@
#if OPT_ISO_COLORS
case OSC_Reset(4):
case OSC_Reset(5):
+ need_data = False;
+ optional_data = True;
+ break;
case OSC_Reset(OSC_TEXT_FG):
case OSC_Reset(OSC_TEXT_BG):
case OSC_Reset(OSC_TEXT_CURSOR):
@@ -3494,8 +3503,8 @@
}
temp[0] = '\0';
buf = temp;
- } else if (!need_data) {
- TRACE(("do_osc found found unwanted data\n"));
+ } else if (!need_data && !optional_data) {
+ TRACE(("do_osc found unwanted data\n"));
return;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xterm-299/package/debian/changelog new/xterm-301/package/debian/changelog
--- old/xterm-299/package/debian/changelog 2013-12-01 17:48:45.000000000 +0100
+++ new/xterm-301/package/debian/changelog 2013-12-09 13:59:32.000000000 +0100
@@ -1,3 +1,15 @@
+xterm-dev (301) unstable; urgency=high
+
+ * miscellaneous fixes
+
+ -- Thomas E. Dickey Mon, 09 Dec 2013 07:59:24 -0500
+
+xterm-dev (300) unstable; urgency=high
+
+ * fix a regression from #298 changes
+
+ -- Thomas E. Dickey Tue, 03 Dec 2013 18:59:58 -0500
+
xterm-dev (299) unstable; urgency=low
* fix remaining regression from #297 changes
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xterm-299/package/debian/copyright new/xterm-301/package/debian/copyright
--- old/xterm-299/package/debian/copyright 2013-12-01 17:50:12.000000000 +0100
+++ new/xterm-301/package/debian/copyright 2014-01-13 01:48:52.000000000 +0100
@@ -35,7 +35,7 @@
Files: * */*
License: MIT-X11
-Copyright 1996-2012,2013 by Thomas E. Dickey
+Copyright 1996-2013,2014 by Thomas E. Dickey
(date ranges vary, depending on when the respective files were first changed
significantly, and run through the most recent change date).
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xterm-299/package/freebsd/Makefile new/xterm-301/package/freebsd/Makefile
--- old/xterm-299/package/freebsd/Makefile 2013-12-01 17:48:59.000000000 +0100
+++ new/xterm-301/package/freebsd/Makefile 2013-12-09 13:59:39.000000000 +0100
@@ -5,7 +5,7 @@
# and "make makesum".
PORTNAME= xterm
-PORTVERSION= 299
+PORTVERSION= 301
CATEGORIES= x11
MASTER_SITES= ftp://invisible-island.net/xterm/ \
CRITICAL
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xterm-299/package/xterm.spec new/xterm-301/package/xterm.spec
--- old/xterm-299/package/xterm.spec 2013-12-01 17:47:52.000000000 +0100
+++ new/xterm-301/package/xterm.spec 2013-12-09 13:59:32.000000000 +0100
@@ -1,11 +1,11 @@
-# $XTermId: xterm.spec,v 1.57 2013/12/01 16:47:52 tom Exp $
+# $XTermId: xterm.spec,v 1.59 2013/12/09 12:59:32 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: 299
+Version: 301
Release: 1
License: X11
Group: User Interface/X
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xterm-299/util.c new/xterm-301/util.c
--- old/xterm-299/util.c 2013-11-23 14:02:58.000000000 +0100
+++ new/xterm-301/util.c 2014-01-15 03:02:14.000000000 +0100
@@ -1,7 +1,7 @@
-/* $XTermId: util.c,v 1.619 2013/11/23 13:02:58 tom Exp $ */
+/* $XTermId: util.c,v 1.620 2014/01/15 02:02:14 tom Exp $ */
/*
- * Copyright 1999-2012,2013 by Thomas E. Dickey
+ * Copyright 1999-2013,2014 by Thomas E. Dickey
*
* All Rights Reserved
*
@@ -3309,11 +3309,11 @@
if (UsingRenderFont(xw)) {
VTwin *currentWin = WhichVWin(screen);
Display *dpy = screen->display;
- XftFont *font;
+ XftFont *font, *font0;
XGCValues values;
int ncells;
#if OPT_RENDERWIDE
- XftFont *wfont;
+ XftFont *wfont, *wfont0;
#endif
if (!screen->renderDraw) {
int scr;
@@ -3325,9 +3325,13 @@
screen->renderDraw = XftDrawCreate(dpy, draw, visual,
DefaultColormap(dpy, scr));
}
+#define IS_BOLD (flags & BOLDATTR(screen))
+#define NOT_BOLD (flags & ~BOLDATTR(screen))
font = getNormXftFont(xw, flags, &did_ul);
+ font0 = IS_BOLD ? getNormXftFont(xw, NOT_BOLD, &did_ul) : font;
#if OPT_RENDERWIDE
wfont = getWideXftFont(xw, flags);
+ wfont0 = IS_BOLD ? getWideXftFont(xw, NOT_BOLD) : wfont;
#endif
values.foreground = getCgsFore(xw, currentWin, gc);
values.background = getCgsBack(xw, currentWin, gc);
@@ -3393,15 +3397,22 @@
ch = part;
missing = True;
}
- } else if (xtermXftMissing(xw, currFont, ch)
- && (part = AsciiEquivs(ch)) != ch) {
- filler = needed - 1;
- ch = part;
- replace = True;
+ } else if (xtermXftMissing(xw, currFont, ch)) {
+ XftFont *test = pickXftFont(needed, font0, wfont0);
+ if (!xtermXftMissing(xw, test, ch)) {
+ currFont = test;
+ replace = True;
+ filler = needed - 1;
+ } else if ((part = AsciiEquivs(ch)) != ch) {
+ filler = needed - 1;
+ ch = part;
+ replace = True;
+ }
}
});
}
#else
+ XftFont *currFont = font;
if (xtermIsDecGraphic(ch)) {
/*
* Xft generally does not have the line-drawing characters
@@ -3410,7 +3421,7 @@
* Unicode position. Failing that, use our own
* box-characters.
*/
- if (xtermXftMissing(xw, font, ch)) {
+ if (xtermXftMissing(xw, currFont, ch)) {
missing = 1;
}
}
@@ -3424,7 +3435,7 @@
if (last > first) {
nc = drawClippedXftString(xw,
flags,
- font,
+ currFont,
getXftColor(xw, values.foreground),
curX,
y,
@@ -3448,7 +3459,7 @@
IChar ch2 = (IChar) ch;
nc = drawClippedXftString(xw,
flags,
- font,
+ currFont,
getXftColor(xw, values.foreground),
curX,
y,
@@ -3460,7 +3471,7 @@
ch2 = ' ';
nc = drawClippedXftString(xw,
flags,
- font,
+ currFont,
getXftColor(xw, values.foreground),
curX,
y,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xterm-299/version.h new/xterm-301/version.h
--- old/xterm-299/version.h 2013-12-01 17:38:13.000000000 +0100
+++ new/xterm-301/version.h 2014-01-19 21:58:11.000000000 +0100
@@ -1,7 +1,7 @@
-/* $XTermId: version.h,v 1.375 2013/12/01 16:38:13 tom Exp $ */
+/* $XTermId: version.h,v 1.378 2014/01/19 20:58:11 tom Exp $ */
/*
- * Copyright 1998-2012,2013 by Thomas E. Dickey
+ * Copyright 1998-2013,2014 by Thomas E. Dickey
*
* All Rights Reserved
*
@@ -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 299
-#define XTERM_DATE 2013-12-01
+#define XTERM_PATCH 301
+#define XTERM_DATE 2014-01-19
#ifndef __vendorversion__
#define __vendorversion__ "XTerm"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xterm-299/xterm.h new/xterm-301/xterm.h
--- old/xterm-299/xterm.h 2013-11-23 01:25:35.000000000 +0100
+++ new/xterm-301/xterm.h 2014-01-16 20:34:54.000000000 +0100
@@ -1,7 +1,7 @@
-/* $XTermId: xterm.h,v 1.724 2013/11/23 00:25:35 tom Exp $ */
+/* $XTermId: xterm.h,v 1.727 2014/01/16 19:34:54 tom Exp $ */
/*
- * Copyright 1999-2012,2013 by Thomas E. Dickey
+ * Copyright 1999-2013,2014 by Thomas E. Dickey
*
* All Rights Reserved
*
@@ -214,6 +214,10 @@
#define HAVE_POSIX_SAVED_IDS
#endif
+#if defined(linux) || defined(__GLIBC__) || (defined(SYSV) && (defined(CRAY) || defined(macII) || defined(__hpux) || defined(__osf__) || defined(__sgi))) || !(defined(SYSV) || defined(__QNX__) || defined(VMS) || defined(__INTERIX))
+#define HAVE_INITGROUPS
+#endif
+
#endif /* HAVE_CONFIG_H */
#ifndef HAVE_X11_DECKEYSYM_H
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xterm-299/xterm.log.html new/xterm-301/xterm.log.html
--- old/xterm-299/xterm.log.html 2013-12-01 21:56:56.000000000 +0100
+++ new/xterm-301/xterm.log.html 2014-01-19 21:57:30.000000000 +0100
@@ -2,7 +2,7 @@
*****************************************************************************
* this file is part of xterm *
* *
- * Copyright 1997-2012,2013 by Thomas E. Dickey *
+ * Copyright 1997-2013,2014 by Thomas E. Dickey *
* *
* All Rights Reserved *
* *
@@ -30,7 +30,7 @@
* sale, use or other dealings in this Software without prior written *
* authorization. *
*****************************************************************************
- $XTermId: xterm.log.html,v 1.1407 2013/12/01 20:56:56 tom Exp $
+ $XTermId: xterm.log.html,v 1.1420 2014/01/19 20:57:30 tom Exp $
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
@@ -50,7 +50,7 @@
<body>
<hr>
- <p>Copyright © 1997-2012,2013 by