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 - [email protected] + +- 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 - [email protected] + +- 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 <sys/ttychars.h> #undef USE_SYSV_ENVVARS #undef FIOCLEX @@ -238,18 +232,15 @@ #endif #ifdef __hpux -#define HAS_BSD_GROUPS #include <sys/ptyio.h> #endif /* __hpux */ #ifdef __osf__ -#define HAS_BSD_GROUPS #undef USE_SYSV_PGRP #define setpgrp setpgid #endif #ifdef __sgi -#define HAS_BSD_GROUPS #include <sys/sysmacros.h> #endif /* __sgi */ @@ -291,9 +282,6 @@ #else #include <sys/resource.h> #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 <[email protected]> Mon, 09 Dec 2013 07:59:24 -0500 + +xterm-dev (300) unstable; urgency=high + + * fix a regression from #298 changes + + -- Thomas E. Dickey <[email protected]> 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 <a href= + <p>Copyright © 1997-2013,2014 by <a href= "mailto:[email protected]">Thomas E. Dickey</a></p> <hr> @@ -69,6 +69,10 @@ CHANGELOG</a>).</p> <ul> + <li><a href="#xterm_301">Patch #301 - 2014/01/19</a></li> + + <li><a href="#xterm_300">Patch #300 - 2013/12/03</a></li> + <li><a href="#xterm_299">Patch #299 - 2013/12/01</a></li> <li><a href="#xterm_298">Patch #298 - 2013/11/27</a></li> @@ -880,6 +884,59 @@ <li><a href="#xterm_01">Patch #1 - 1996/1/6</a></li> </ul> + <h1><a name="xterm_301" id="xterm_301">Patch #301 - + 2014/01/19</a></h1> + + <ul> + <li>OSC 104 and 105 did not accept parameter to reset a + specific color (patch by Egmont Koblinger).</li> + + <li>add configure check for <code>initgroups</code>, and use + that function to complement its use of <code>setgid</code> + (prompted by patch by Miroslav Lichvar).</li> + + <li>improve manpage description of scrollbar translations + versus the vt100 translations (Debian #723573).</li> + + <li>add a few paragraphs to manpage explaining the implications + of xterm's reliance on X Toolkit for command-line parsing.</li> + + <li>modify cursor-theme logic to check if the environment + variable <code>XCURSOR_THEME</code> is set to a nonempty value + before constructing a dummy them (prompted by similar check + added in OpenBSD CVS).</li> + + <li>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).</li> + + <li>minor documentation fixes for ctlseqs.ms</li> + + <li>only set <code>SHELL</code> environment variable to + programs found in <code>/etc/shells</code> (prompted by + patch/report by Al Poole).</li> + + <li>build-fix, when <code>--disable-wide-chars</code> + <code>--disable-boxchar</code> is used (prompted by patch by + Andrey Panov).</li> + </ul> + + <h1><a name="xterm_300" id="xterm_300">Patch #300 - + 2013/12/03</a></h1> + + <ul> + <li>amend workaround for <code>Xcursor</code> library from + <a href="#xterm_298">patch #298</a>; the suggested solution for + Debian #466704 fell afoul of a bug in <code>Xcursor</code> + which treated an empty value for <code>Inherits=</code> 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).</li> + </ul> + <h1><a name="xterm_299" id="xterm_299">Patch #299 - 2013/12/01</a></h1> 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.man new/xterm-301/xterm.man --- old/xterm-299/xterm.man 2013-11-23 18:40:11.000000000 +0100 +++ new/xterm-301/xterm.man 2014-01-16 02:19:19.000000000 +0100 @@ -1,7 +1,7 @@ '\" t -.\" $XTermId: xterm.man,v 1.572 2013/11/23 17:40:11 tom Exp $ +.\" $XTermId: xterm.man,v 1.576 2014/01/16 01:19:19 tom Exp $ .\" -.\" Copyright 1996-2012,2013 by Thomas E. Dickey +.\" Copyright 1996-2013,2014 by Thomas E. Dickey .\" .\" All Rights Reserved .\" @@ -186,8 +186,7 @@ default configuration. . .SH "OTHER FEATURES" -.I Xterm -automatically highlights the text cursor when the +\fI\*N\fP automatically highlights the text cursor when the pointer enters the window (selected) and unhighlights it when the pointer leaves the window (unselected). If the window is the focus window, then the text cursor is @@ -221,13 +220,12 @@ on the screen. . .PP -.I Xterm -allows character-based applications to receive mouse events (currently +\fI\*N\fP allows character-based applications to receive mouse events (currently button-press and release events, and button-motion events) as keyboard control sequences. See \fIXterm Control Sequences\fP for details. . -. +.\" *************************************************************************** .SH OPTIONS The \fI\*n\fP terminal emulator accepts the standard X Toolkit command line options as well as @@ -237,9 +235,7 @@ instead of a .RB ` \- ', the option is restored to its default value. -The \fB\-version\fP and \fB\-help\fP options are interpreted even if \fI\*n\fP -cannot open the display, and are useful for testing and configuration scripts. -Along with \fB\-class\fP, they are checked before other options. +.\" *************************************************************************** .TP 8 .B \-version This causes \fI\*n\fP to print a version number to the standard output, @@ -259,15 +255,72 @@ .NS \fB\*n \-z\fP .NE -.PP +.IP If the logic for a particular option such as logging is not compiled into \fI\*n\fP, the help text for that option also is not displayed by the \fB\-help\fP option. -. +.\" *************************************************************************** +.PP +Most of the \fI\*n\fP options are actually parsed by the X Toolkit, +which sets resource values. +\fI\*N\fP provides the X Toolkit with a table of options. +A few of these are marked, telling the X Toolkit to ignore them +(\fB\-help\fP, +\fB\-version\fP, +\fB\-class\fP, +\fB\-e\fP, and +\fB\-into\fP). +After the X Toolkit has parsed the command-line parameters, +it removes those which it handles, +leaving the specially-marked parameters for \fI\*n\fP to handle. +.PP +The \fB\-version\fP and \fB\-help\fP options are interpreted even if \fI\*n\fP +cannot open the display, and are useful for testing and configuration scripts. +Along with \fB\-class\fP, they are checked before other options. +To do this, \fI\*n\fP has its own (much simpler) argument parser, +along with a table of the X Toolkit's built-in list of options. +.PP +Relying upon the X Toolkit to parse the options and associated values +has the advantages of simplicity and good integration with the X resource +mechanism. +There are a few drawbacks +.bP +\fI\*N\fP cannot tell easily whether a resource value was set by +one of the external resource- or application-defaults files, +or if it was set through the \fB\-xrm\fP option +or via some directly relevant command-line option. +\fI\*N\fP sees only the end-result: +a value supplied when creating its widgets. +.bP +\fI\*N\fP does not know the order in which particular options and +items in resource files are evaluated. +Rather, it sees all of the values for a given widget at the same time. +In the design of these options, +some are deemed more important, +and can override other options. +.IP +The X Toolkit uses patterns (constants and wildcards) to match resources. +Once a particular pattern has been used, +it will not modify it. +To override a given setting, +a more-specific pattern must be used, +e.g., replacing \*(``*\*('' with \*(``.\*(''. +Some poorly-designed resource files are too specific +to allow the command-line options to affect the relevant widget values. +.bP +In a few cases, +the X Toolkit combines its standard options in ways which do not work +well with \fI\*n\fP. +This happens with the color (\fB\-fg\fP, \fB\-B\fP) and reverse (\fB\-rv\fP) +options. +\fI\*N\fP makes a special case of these and +adjusts its sense of \*(``reverse\*('' +to lessen user surprise. +.\" *************************************************************************** .PP One parameter (after all options) may be given. That overrides \fI\*n\fP's built-in choice of shell program. -Normally \fI\*n\fP checks the SHELL variable. +Normally \fI\*n\fP checks the \*(``SHELL\*('' variable. If that is not set, \fI\*n\fP tries to use the shell program specified in the password file. If that is not set, \fI\*n\fP uses \fI/bin/sh\fP. @@ -277,6 +330,7 @@ In either case, it constructs an absolute path. The \fB\-e\fP option cannot be used with this parameter since it uses all parameters following the option. +.\" *************************************************************************** .PP The other options are used to control the appearance and behavior. Not all options are necessarily configured into your copy of \fI\*n\fP: @@ -4588,8 +4642,7 @@ .SH MENUS . .PP -.I Xterm -has four menus, named +\fI\*N\fP has four menus, named .IR mainMenu , .IR vtMenu , .IR fontMenu , @@ -5495,7 +5548,7 @@ Here is a resource setting for \fI\*n\fP which will do the same thing: .NS *VT100*translations: #override \\n\\\& - Meta <KeyPress> /:dabbrev-expand() + Meta <KeyPress> /:dabbrev-expand() .NE .TP 8 .B "deiconify()" @@ -6158,7 +6211,8 @@ .SS DEFAULT KEY BINDINGS .PP The default bindings in the VT102 window use the SELECT token, -which is set by the \fBselectToClipboard\fP resource: +which is set by the \fBselectToClipboard\fP resource. +These are for the \fBvt100\fP widget: .NS Shift <KeyPress> Prior:scroll-back(1,halfpage) \\n\\\& Shift <KeyPress> Next:scroll-forw(1,halfpage) \\n\\\& @@ -6205,19 +6259,8 @@ <BtnDown>:ignore() .NE .PP -The default bindings for the scrollbar widget -are separate from the VT100 widget: -.NS - <Btn5Down>: StartScroll(Forward) \\n\\\& - <Btn1Down>: StartScroll(Forward) \\n\\\& - <Btn2Down>: StartScroll(Continuous) MoveThumb() NotifyThumb() \\n\\\& - <Btn3Down>: StartScroll(Backward) \\n\\\& - <Btn4Down>: StartScroll(Backward) \\n\\\& - <Btn2Motion>: MoveThumb() NotifyThumb() \\n\\\& - <BtnUp>: NotifyScroll(Proportional) EndScroll() -.NE -.PP -The default bindings in the Tektronix window are: +The default bindings in the Tektronix window are analogous but less extensive. +These are for the \fBtek4014\fP widget: .NS ~Meta<KeyPress>: insert-seven-bit() \\n\\\& Meta<KeyPress>: insert-eight-bit() \\n\\\& @@ -6255,28 +6298,86 @@ Shift<BtnUp>: select-end(CLIPBOARD, CUT_BUFFER1) .NE .PP -Below is a sample of how the \fBkeymap()\fP action is used to add special +In the example, the class name \fBVT100\fP is used rather than the widget name. +These are different; +the class name provides a more-specific match than the widget name. +A leading \*(``*\*('' is used because the widget hierarchy above the +\fBvt100\fP widget depends on +whether the toolbar support is compiled into \fI\*n\fP. +.PP +Below is shown a sample of +how the \fBkeymap()\fP action may be used to add special keys for entering commonly-typed works: .NS *VT100.Translations: #override <Key>F13: keymap(dbx) *VT100.dbxKeymap.translations: \\\& - <Key>F14: keymap(None) \\n\\\& - <Key>F17: string("next") string(0x0d) \\n\\\& - <Key>F18: string("step") string(0x0d) \\n\\\& - <Key>F19: string("continue") string(0x0d) \\n\\\& - <Key>F20: string("print ") insert-selection(PRIMARY, CUT_BUFFER0) + <Key>F14: keymap(None) \\n\\\& + <Key>F17: string("next") string(0x0d) \\n\\\& + <Key>F18: string("step") string(0x0d) \\n\\\& + <Key>F19: string("continue") string(0x0d) \\n\\\& + <Key>F20: string("print ") insert-selection(PRIMARY, CUT_BUFFER0) +.NE +.SS DEFAULT SCROLLBAR BINDINGS +.PP +Key bindings are normally associated with the \fBvt100\fP or \fBtek4014\fP +widgets which act as terminal emulators. +\fI\*N\fP's scrollbar (and toolbar if it is configured) are separate widgets. +Because all of these use the X Toolkit, +they have corresponding \fBtranslations\fP resources. +Those resources are distinct, +and match different patterns, e.g., the differences in widget-name and +number of levels of widgets which they may contain. +.PP +The \fBscrollbar\fP widget is a child of the \fBvt100\fP widget. +It is positioned on top of the \fBvt100\fP widget. +Toggling the scrollbar on and off causes the \fBvt100\fP widget to resize. +.PP +The default bindings for the scrollbar widget use only mouse-button events: +.NS + <Btn5Down>: StartScroll(Forward) \\n\\\& + <Btn1Down>: StartScroll(Forward) \\n\\\& + <Btn2Down>: StartScroll(Continuous) MoveThumb() NotifyThumb() \\n\\\& + <Btn3Down>: StartScroll(Backward) \\n\\\& + <Btn4Down>: StartScroll(Backward) \\n\\\& + <Btn2Motion>: MoveThumb() NotifyThumb() \\n\\\& + <BtnUp>: NotifyScroll(Proportional) EndScroll() .NE .PP -Some people prefer using the left pointer button +Events which the \fBscrollbar\fP widget does not recognize at all are lost. +.PP +However, at startup, \fI\*n\fP augments these translations with the default +translations used for the \fBvt100\fP widget, +together with the resource \*(``actions\*('' which those translations use. +Because the \fBscrollbar\fP (or \fBmenubar\fP) widgets do not recognize these +actions (but because it has a corresponding \fBtranslation\fP), +they are passed on to the \fBvt100\fP widget. +.PP +This augmenting of the scrollbar's translations has a few limitations: +.bP +\fI\*N\fP knows what the default translations are, +but there is no suitable library interface for determining what +customizations a user may have added to the \fBvt100\fP widget. +All that \fI\*n\fP can do is augment the \fBscrollbar\fP widget to +give it the same starting point for further customization by the user. +.bP +Events in the gap between the widgets may be lost. +.bP +Compose sequences begun in one widget cannot be completed in the other, +because the input methods for each widget do not share context information. +.PP +Most customizations of the scrollbar translations do not concern key bindings. +Rather, users are generally more interested in changing the bindings of the +mouse buttons. +For example, some people prefer using the left pointer button for dragging the scrollbar thumb. -That can be setup by altering the translations resource, e.g., +That can be set up by altering the translations resource, e.g., .NS -*VT100.scrollbar.translations: #override \\n\\\& - <Btn5Down>: StartScroll(Forward) \\n\\\& - <Btn1Down>: StartScroll(Continuous) MoveThumb() NotifyThumb() \\n\\\& - <Btn4Down>: StartScroll(Backward) \\n\\\& - <Btn1Motion>: MoveThumb() NotifyThumb() \\n\\\& - <BtnUp>: NotifyScroll(Proportional) EndScroll() +*VT100.scrollbar.translations: #override \\n\\\& + <Btn5Down>: StartScroll(Forward) \\n\\\& + <Btn1Down>: StartScroll(Continuous) MoveThumb() NotifyThumb() \\n\\\& + <Btn4Down>: StartScroll(Backward) \\n\\\& + <Btn1Motion>: MoveThumb() NotifyThumb() \\n\\\& + <BtnUp>: NotifyScroll(Proportional) EndScroll() .NE .SH "CONTROL SEQUENCES AND KEYBOARD" The \fIXterm Control Sequences\fP document lists the control sequences which @@ -6286,8 +6387,7 @@ . . .SH ENVIRONMENT -.I Xterm -sets several environment variables: +\fI\*N\fP sets several environment variables: .TP 5 DISPLAY is the display name, 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/xtermcfg.hin new/xterm-301/xtermcfg.hin --- old/xterm-299/xtermcfg.hin 2013-11-22 22:42:40.000000000 +0100 +++ new/xterm-301/xtermcfg.hin 2014-01-16 02:45:00.000000000 +0100 @@ -1,7 +1,7 @@ -/* $XTermId: xtermcfg.hin,v 1.202 2013/11/22 21:42:40 tom Exp $ */ +/* $XTermId: xtermcfg.hin,v 1.203 2014/01/16 01:45:00 tom Exp $ */ /* - * Copyright 1997-2012,2013 by Thomas E. Dickey + * Copyright 1997-2013,2014 by Thomas E. Dickey * * All Rights Reserved * @@ -54,6 +54,7 @@ #undef HAVE_GETLOGIN /* AC_CHECK_FUNCS(getlogin) */ #undef HAVE_GRANTPT /* CF_FUNC_GRANTPT */ #undef HAVE_GRANTPT_PTY_ISATTY /* CF_FUNC_GRANTPT */ +#undef HAVE_INITGROUPS /* AC_CHECK_FUNCS(initgroups) */ #undef HAVE_LANGINFO_CODESET /* AM_LANGINFO_CODESET */ #undef HAVE_LASTLOG_H /* CF_LASTLOG */ #undef HAVE_LIBXPM /* CF_WITH_XPM */ -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
