xterm: Changes to 'upstream-unstable'
MANIFEST | 2
Makefile.in | 21 ++++-
charproc.c | 30 +++++---
data.h | 7 +
main.c | 26 ++++---
minstall.in | 10 +-
misc.c | 174 ++++++++++++++++++++++++++++-------------------
package/debian/changelog | 6 +
package/debian/control | 2
package/debian/rules | 2
package/freebsd/Makefile | 2
package/xterm.spec | 39 +++++++++-
ptyx.h | 26 +++++--
trace.c | 7 +
version.h | 6 -
vttests/256colors.pl | 13 ++-
vttests/256colors2.pl | 13 +--
vttests/88colors.pl | 11 ++
vttests/88colors2.pl | 13 +--
vttests/dynamic.pl | 7 +
vttests/paste64.pl | 8 +-
vttests/query-color.pl | 7 +
vttests/query-fonts.pl | 7 +
vttests/resize.pl | 28 +++++--
vttests/tcapquery.pl | 7 +
xterm.h | 4 -
xterm.log.html | 53 ++++++++++++++
xterm.man | 53 ++++++++++----
28 files changed, 413 insertions(+), 171 deletions(-)
New commits:
commit f5a1486f17c95692747293c2400117ea79439c88
Author: Sven Joachim <svenjoac@gmx.de>
Date: Mon Mar 3 18:44:37 2014 +0100
Imported Upstream version 302
diff --git a/MANIFEST b/MANIFEST
index 95ab9da..bc11abb 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -1,4 +1,4 @@
-MANIFEST for xterm-301, version xterm-301
+MANIFEST for xterm-302, version xterm-302
--------------------------------------------------------------------------------
MANIFEST this file
256colres.h resource-definitions for 256-color mode
diff --git a/Makefile.in b/Makefile.in
index a468ff5..1dc71ef 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1,8 +1,8 @@
-## $XTermId: Makefile.in,v 1.223 2013/06/23 23:40:18 tom Exp $
+## $XTermId: Makefile.in,v 1.225 2014/03/01 15:15:26 tom Exp $
# -----------------------------------------------------------------------------
# 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
#
@@ -189,6 +189,21 @@ resize$x : $(OBJS2)
perl $(srcdir)/88colres.pl > $@
charproc$o : main.h @CHARPROC_DEPS@
+
+misc$o : builtin_icons.h
+
+# do this to quiet gcc -Wcast-qual warnings
+builtin_icons.h :
+ @echo "#if OPT_BUILTIN_XPMS" >$@
+ @echo "#include <icons/mini.xterm.xpms>" >>$@
+ @echo "#include <icons/filled-xterm.xpms>" >>$@
+ @echo "#include <icons/xterm.xpms>" >>$@
+ @echo "#include <icons/xterm-color.xpms>" >>$@
+ @echo "#else" >>$@
+ @sed -e 's/static char \* /static const char * /' $(srcdir)/icons/mini.xterm_48x48.xpm >>$@
+ @echo "#endif" >>$@
+ @echo "made $@"
+
################################################################################
actual_xterm = `echo xterm| sed '$(transform)'`
actual_resize = `echo resize| sed '$(transform)'`
@@ -418,7 +433,7 @@ mostlyclean :
-$(RM) *$o *.[is] XtermLog.* .pure core *~ *.bak *.BAK *.out *.tmp
clean : mostlyclean
- -$(RM) $(PROGRAMS)
+ -$(RM) $(PROGRAMS) builtin_icons.h
distclean :: clean
-$(RM) Makefile config.status config.cache config.log xtermcfg.h
diff --git a/charproc.c b/charproc.c
index 4991f68..1ebd75d 100644
--- a/charproc.c
+++ b/charproc.c
@@ -1,7 +1,7 @@
-/* $XTermId: charproc.c,v 1.1319 2013/11/26 20:38:11 tom Exp $ */
+/* $XTermId: charproc.c,v 1.1322 2014/03/02 23:32:05 tom Exp $ */
/*
- * Copyright 1999-2012,2013 by Thomas E. Dickey
+ * Copyright 1999-2013,2014 by Thomas E. Dickey
*
* All Rights Reserved
*
@@ -3924,12 +3924,16 @@ doparsing(XtermWidget xw, unsigned c, struct ParseState *sp)
* command-line, allow it to be enabled/disabled by
* control sequence.
*/
+ TRACE(("CASE_UTF8 wide:%d, utf8:%d, req:%s\n",
+ screen->wide_chars,
+ screen->utf8_mode,
+ BtoS(c == 'G')));
+ if ((!screen->wide_chars) && (c == 'G')) {
+ WriteNow();
+ ChangeToWide(xw);
+ }
if (screen->wide_chars
- && screen->utf8_mode != uAlways) {
- if (!screen->wide_chars) {
- WriteNow();
- ChangeToWide(xw);
- }
+ && !screen->utf8_always) {
switchPtyData(screen, c == 'G');
TRACE(("UTF8 mode %s\n",
BtoS(screen->utf8_mode)));
@@ -6937,6 +6941,7 @@ VTInitialize_locale(XtermWidget xw)
TRACE(("... request screen.utf8_mode = %d\n", screen->utf8_mode));
TRACE(("... request screen.utf8_fonts = %d\n", screen->utf8_fonts));
+ screen->utf8_always = (screen->utf8_mode == uAlways);
if (screen->utf8_mode < 0)
screen->utf8_mode = uFalse;
@@ -7397,6 +7402,11 @@ VTInitialize(Widget wrequest,
*/
TScreenOf(wnew)->display = wnew->core.screen->display;
+ /* prep getVisualInfo() */
+ wnew->visInfo = 0;
+ wnew->numVisuals = 0;
+ (void) getVisualInfo(wnew);
+
/*
* We use the default foreground/background colors to compare/check if a
* color-resource has been set.
@@ -8334,15 +8344,17 @@ VTDestroy(Widget w GCC_UNUSED)
#endif
if (screen->selection_atoms)
- XtFree((char *) (screen->selection_atoms));
+ XtFree((void *) (screen->selection_atoms));
- XtFree((char *) (screen->selection_data));
+ XtFree((void *) (screen->selection_data));
TRACE_FREE_LEAK(xtermClassRec.core_class.tm_table);
TRACE_FREE_LEAK(xw->keyboard.extra_translations);
TRACE_FREE_LEAK(xw->keyboard.shell_translations);
TRACE_FREE_LEAK(xw->keyboard.xterm_translations);
+ XtFree((void *) (xw->visInfo));
+
#if OPT_WIDE_CHARS
FreeTypedBuffer(XChar2b);
FreeTypedBuffer(char);
diff --git a/data.h b/data.h
index a3e093a..c2ee4c8 100644
--- a/data.h
+++ b/data.h
@@ -1,7 +1,7 @@
-/* $XTermId: data.h,v 1.123 2013/11/23 17:00:45 tom Exp $ */
+/* $XTermId: data.h,v 1.124 2014/03/02 12:01:26 tom Exp $ */
/*
- * Copyright 2002-2012,2013 by Thomas E. Dickey
+ * Copyright 2002-2013,2014 by Thomas E. Dickey
*
* All Rights Reserved
*
@@ -205,6 +205,9 @@ typedef struct XTERM_RESOURCE {
Boolean ptyHandshake; /* use pty-handshaking */
Boolean ptySttySize; /* reset TTY size after pty handshake */
#endif
+#if OPT_REPORT_COLORS
+ Boolean reportColors; /* show color information as allocated */
+#endif
#if OPT_REPORT_FONTS
Boolean reportFonts; /* show bitmap-font information as loaded */
#endif
diff --git a/main.c b/main.c
index 7de9790..6157068 100644
--- a/main.c
+++ b/main.c
@@ -1,4 +1,4 @@
-/* $XTermId: main.c,v 1.741 2014/01/16 02:12:25 tom Exp $ */
+/* $XTermId: main.c,v 1.748 2014/03/03 01:15:27 tom Exp $ */
/*
* Copyright 2002-2013,2014 by Thomas E. Dickey
@@ -871,6 +871,9 @@ static XtResource application_resources[] =
Bres("ptyHandshake", "PtyHandshake", ptyHandshake, True),
Bres("ptySttySize", "PtySttySize", ptySttySize, DEF_PTY_STTY_SIZE),
#endif
+#if OPT_REPORT_COLORS
+ Bres("reportColors", "ReportColors", reportColors, False),
+#endif
#if OPT_REPORT_FONTS
Bres("reportFonts", "ReportFonts", reportFonts, False),
#endif
@@ -1008,6 +1011,9 @@ static XrmOptionDescRec optionDescList[] = {
{"+s", "*multiScroll", XrmoptionNoArg, (XPointer) "off"},
{"-sb", "*scrollBar", XrmoptionNoArg, (XPointer) "on"},
{"+sb", "*scrollBar", XrmoptionNoArg, (XPointer) "off"},
+#if OPT_REPORT_COLORS
+{"-report-colors","*reportColors", XrmoptionNoArg, (XPointer) "on"},
+#endif
#if OPT_REPORT_FONTS
{"-report-fonts","*reportFonts", XrmoptionNoArg, (XPointer) "on"},
#endif
@@ -3145,6 +3151,7 @@ find_utmp(struct UTMP_STR *tofind)
/*
* Only set $SHELL for paths found in the standard location.
+ * ...or if $SHELL happens to give an absolute pathname to an executable.
*/
static Boolean
validShell(const char *pathname)
@@ -3156,8 +3163,7 @@ validShell(const char *pathname)
size_t rc;
FILE *fp;
- if (!IsEmpty(pathname)
- && access(pathname, X_OK) == 0
+ if (validProgram(pathname)
&& stat(ok_shells, &sb) == 0
&& (sb.st_mode & S_IFMT) == S_IFREG
&& (sb.st_size != 0)
@@ -3167,8 +3173,10 @@ validShell(const char *pathname)
if (rc == (size_t) sb.st_size) {
char *p = blob;
char *q, *r;
+ blob[rc] = '\0';
while (!result && (q = strtok(p, "\n")) != 0) {
if ((r = x_strtrim(q)) != 0) {
+ TRACE(("...test \"%s\"\n", q));
if (!strcmp(q, pathname)) {
result = True;
}
@@ -4561,6 +4569,7 @@ spawnXTerm(XtermWidget xw)
/*
* If we have an explicit shell to run, make that set $SHELL.
+ * Next, allow an existing setting of $SHELL, for absolute paths.
* Otherwise, if $SHELL is not set, determine it from the user's
* password information, if possible.
*
@@ -4568,10 +4577,11 @@ spawnXTerm(XtermWidget xw)
* program rather than choosing between $SHELL and "/bin/sh".
*/
if (validShell(explicit_shname)) {
- xtermSetenv("SHELL", explicit_shname);
- shell_path = explicit_shname;
- } else if (validShell(shell_path = x_getenv("SHELL"))) {
- ; /* OK */
+ xtermSetenv("SHELL", shell_path = explicit_shname);
+ } else if (validProgram(shell_path = x_getenv("SHELL"))) {
+ if (!validShell(shell_path)) {
+ xtermUnsetenv("SHELL");
+ }
} else if ((!OkPasswd(&pw) && !x_getpwuid(screen->uid, &pw))
|| *(shell_path = x_strdup(pw.pw_shell)) == 0) {
shell_path = resetShell(shell_path);
@@ -4588,8 +4598,8 @@ spawnXTerm(XtermWidget xw)
if (explicit_shname != 0 && access(explicit_shname, X_OK) == 0) {
free(shell_path);
shell_path = explicit_shname;
+ xtermSetenv("XTERM_SHELL", shell_path);
}
- xtermSetenv("XTERM_SHELL", shell_path);
shname = x_basename(shell_path);
TRACE(("shell path '%s' leaf '%s'\n", shell_path, shname));
diff --git a/minstall.in b/minstall.in
index 86a40bc..5ffdfbd 100644
--- a/minstall.in
+++ b/minstall.in
@@ -1,9 +1,9 @@
#!/bin/sh
-# $XTermId: minstall.in,v 1.20 2013/04/21 18:58:54 tom Exp $
+# $XTermId: minstall.in,v 1.21 2014/02/27 23:43:50 tom Exp $
# -----------------------------------------------------------------------------
# this file is part of xterm
#
-# Copyright 2001-2012,2013 by Thomas E. Dickey
+# Copyright 2001-2013,2014 by Thomas E. Dickey
#
# All Rights Reserved
#
@@ -116,8 +116,10 @@ done
WTMP_PATH=$WTMP_PATH/$WTMP_NAME
# "X" is usually in the miscellaneous section, along with "undocumented".
-# Use that to guess an appropriate section.
-X_MANSECT=`man X 2>&1 | tr '\012' '\020' | sed -e 's/^[^0123456789]*\([^) ][^) ]*\).*/\1/'`
+# Use that to guess an appropriate section. This relies on having the manpage
+# installed.
+X_MANPAGE=X
+X_MANSECT=`man $X_MANPAGE 2>&1 | grep $X_MANPAGE'([^)]*)' | head -n 1 | tr '\012' '\040' | sed -e 's/^[^0123456789]*\([^) ][^) ]*\).*/\1/'`
test -z "$X_MANSECT" && X_MANSECT=$suffix
VERSION_H=`echo "$OLD_FILE" | sed -e 's,/[^/]*$,/version.h,' -e s',^[^/]*$,version.h,'`
diff --git a/misc.c b/misc.c
index 1f3bad6..c70e34c 100644
--- a/misc.c
+++ b/misc.c
@@ -1,4 +1,4 @@
-/* $XTermId: misc.c,v 1.686 2014/01/19 16:12:25 Egmont.Koblinger Exp $ */
+/* $XTermId: misc.c,v 1.701 2014/03/03 01:19:15 tom Exp $ */
/*
* Copyright 1999-2013,2014 by Thomas E. Dickey
@@ -2177,23 +2177,47 @@ ReportAnsiColorRequest(XtermWidget xw, int colornum, int final)
}
}
-static void
-getColormapInfo(Display *display, unsigned *typep, unsigned *sizep)
+int
+getVisualInfo(XtermWidget xw)
{
- int numFound;
- XVisualInfo myTemplate, *visInfoPtr;
-
- myTemplate.visualid = XVisualIDFromVisual(DefaultVisual(display,
- XDefaultScreen(display)));
- visInfoPtr = XGetVisualInfo(display, (long) VisualIDMask,
- &myTemplate, &numFound);
- *typep = (numFound >= 1) ? (unsigned) visInfoPtr->class : 0;
- *sizep = (numFound >= 1) ? (unsigned) visInfoPtr->colormap_size : 0;
-
- XFree((char *) visInfoPtr);
+ TScreen *screen = TScreenOf(xw);
+ Display *dpy = screen->display;
+ XVisualInfo myTemplate;
+
+ if (xw->visInfo == 0 && xw->numVisuals == 0) {
+ myTemplate.visualid = XVisualIDFromVisual(DefaultVisual(dpy,
+ XDefaultScreen(dpy)));
+ xw->visInfo = XGetVisualInfo(dpy, (long) VisualIDMask,
+ &myTemplate, &xw->numVisuals);
+
+ if ((xw->visInfo != 0) && (xw->numVisuals > 0)) {
+ if (resource.reportColors) {
+ printf("getVisualInfo depth %d, type %d (%s), size %d\n",
+ xw->visInfo->depth,
+ xw->visInfo->class,
+ ((xw->visInfo->class & 1) ? "dynamic" : "static"),
+ xw->visInfo->colormap_size);
+ }
+ TRACE(("getVisualInfo depth %d, type %d (%s), size %d\n",
+ xw->visInfo->depth,
+ xw->visInfo->class,
+ ((xw->visInfo->class & 1) ? "dynamic" : "static"),
+ xw->visInfo->colormap_size));
+ }
+ }
+ return (xw->visInfo != 0) && (xw->numVisuals > 0);
+}
- TRACE(("getColormapInfo type %d (%s), size %d\n",
- *typep, ((*typep & 1) ? "dynamic" : "static"), *sizep));
+static void
+getColormapInfo(XtermWidget xw, unsigned *typep, unsigned *sizep)
+{
+ if (getVisualInfo(xw)) {
+ *typep = (unsigned) xw->visInfo->class;
+ *sizep = (unsigned) xw->visInfo->colormap_size;
+ } else {
+ *typep = 0;
+ *sizep = 0;
+ }
}
#define MAX_COLORTABLE 4096
@@ -2207,9 +2231,9 @@ loadColorTable(XtermWidget xw, unsigned length)
Colormap cmap = xw->core.colormap;
TScreen *screen = TScreenOf(xw);
unsigned i;
- Boolean result = False;
+ Boolean result = (screen->cmap_data != 0);
- if (screen->cmap_data == 0
+ if (!result
&& length != 0
&& length < MAX_COLORTABLE) {
screen->cmap_data = TypeMallocN(XColor, (size_t) length);
@@ -2258,7 +2282,7 @@ allocateClosestRGB(XtermWidget xw, Colormap cmap, XColor * def)
unsigned cmap_size;
unsigned i;
- getColormapInfo(screen->display, &cmap_type, &cmap_size);
+ getColormapInfo(xw, &cmap_type, &cmap_size);
if ((cmap_type & 1) != 0) {
@@ -2359,21 +2383,18 @@ static int
simpleColors(XColor * colortable, unsigned length)
{
unsigned n;
- int state = -1;
+ int state = 0;
int check;
for (n = 0; n < length; ++n) {
- if (state == -1) {
- CheckColor(state, colortable[n]);
- if (state == 0)
- state = -1;
- }
if (state > 0) {
CheckColor(check, colortable[n]);
if (check > 0 && check != state) {
state = 0;
break;
}
+ } else {
+ CheckColor(state, colortable[n]);
}
}
switch (state) {
@@ -2433,7 +2454,7 @@ searchColors(XColor * colortable, unsigned length, unsigned color, int state)
* actual RGB values allocated.
*
* That is, XAllocColor() should suffice unless the color map is full. In that
- * case, allocateClosesRGB() is useful for the dynamic display classes such as
+ * case, allocateClosestRGB() is useful for the dynamic display classes such as
* PseudoColor. It is not useful for TrueColor, since XQueryColors() does not
* return regular RGB triples (unless a different scheme was used for
* specifying the pixel values); only the blue value is filled in. However, it
@@ -2451,18 +2472,18 @@ allocateExactRGB(XtermWidget xw, Colormap cmap, XColor * def)
Boolean result = (Boolean) (XAllocColor(screen->display, cmap, def) != 0);
/*
- * If this is a statically allocated display, e.g., TrueColor, see if we
- * can improve on the result by using the color values actually supported
- * by the server.
+ * If this is a statically allocated display with too many items to store
+ * in our array, i.e., TrueColor, see if we can improve on the result by
+ * using the color values actually supported by the server.
*/
if (result) {
unsigned cmap_type;
unsigned cmap_size;
int state;
- getColormapInfo(screen->display, &cmap_type, &cmap_size);
+ getColormapInfo(xw, &cmap_type, &cmap_size);
- if ((cmap_type & 1) == 0) {
+ if (cmap_type == TrueColor) {
XColor temp = *def;
if (loadColorTable(xw, cmap_size)
@@ -2723,11 +2744,27 @@ xtermAllocColor(XtermWidget xw, XColor * def, const char *spec)
TScreen *screen = TScreenOf(xw);
Colormap cmap = xw->core.colormap;
- if (XParseColor(screen->display, cmap, spec, def)
- && allocateBestRGB(xw, def)) {
- TRACE(("xtermAllocColor -> %x/%x/%x\n",
- def->red, def->green, def->blue));
- result = True;
+ if (XParseColor(screen->display, cmap, spec, def)) {
+ XColor save_def = *def;
+ if (resource.reportColors) {
+ printf("color %04x/%04x/%04x = \"%s\"\n",
+ def->red, def->green, def->blue,
+ spec);
+ }
+ if (allocateBestRGB(xw, def)) {
+ if (resource.reportColors) {
+ if (def->red != save_def.red ||
+ def->green != save_def.green ||
+ def->blue != save_def.blue) {
+ printf("color %04x/%04x/%04x ~ \"%s\"\n",
+ def->red, def->green, def->blue,
+ spec);
+ }
+ }
+ TRACE(("xtermAllocColor -> %x/%x/%x\n",
+ def->red, def->green, def->blue));
+ result = True;
+ }
}
return result;
}
@@ -3142,12 +3179,13 @@ ChangeColorsRequest(XtermWidget xw,
if (names != NULL) {
*names++ = '\0';
}
- if (thisName != 0 && !strcmp(thisName, "?")) {
- ReportColorRequest(xw, ndx, final);
- } else if (!pOldColors->names[ndx]
- || (thisName
- && strcmp(thisName, pOldColors->names[ndx]))) {
- AllocateTermColor(xw, &newColors, ndx, thisName, False);
+ if (thisName != 0) {
+ if (!strcmp(thisName, "?")) {
+ ReportColorRequest(xw, ndx, final);
+ } else if (!pOldColors->names[ndx]
+ || strcmp(thisName, pOldColors->names[ndx])) {
+ AllocateTermColor(xw, &newColors, ndx, thisName, False);
+ }
}
}
}
@@ -4566,20 +4604,10 @@ which_icon_hint(void)
int
getVisualDepth(XtermWidget xw)
{
- Display *display = TScreenOf(xw)->display;
- XVisualInfo myTemplate, *visInfoPtr;
- int numFound;
int result = 0;
- myTemplate.visualid = XVisualIDFromVisual(DefaultVisual(display,
- XDefaultScreen(display)));
- visInfoPtr = XGetVisualInfo(display, (long) VisualIDMask,
- &myTemplate, &numFound);
- if (visInfoPtr != 0) {
- if (numFound != 0) {
- result = visInfoPtr->depth;
- }
- XFree(visInfoPtr);
+ if (getVisualInfo(xw)) {
+ result = xw->visInfo->depth;
}
return result;
}
@@ -4596,14 +4624,7 @@ xtermLoadIcon(XtermWidget xw)
Pixmap myMask = 0;
char *workname = 0;
ICON_HINT hint = which_icon_hint();
-#if OPT_BUILTIN_XPMS
-#include <icons/mini.xterm.xpms>
-#include <icons/filled-xterm.xpms>
-#include <icons/xterm.xpms>
-#include <icons/xterm-color.xpms>
-#else
-#include <icons/mini.xterm_48x48.xpm>
-#endif
+#include <builtin_icons.h>
TRACE(("xtermLoadIcon %p:%s\n", (void *) xw, NonNull(resource.icon_hint)));
@@ -5097,6 +5118,27 @@ Cleanup(int code)
Exit(code);
}
+#ifndef S_IXOTH
+#define S_IXOTH 1
+#endif
+
+Boolean
+validProgram(const char *pathname)
+{
+ Boolean result = False;
+ struct stat sb;
+
+ if (!IsEmpty(pathname)
+ && *pathname == '/'
+ && strstr(pathname, "/..") == 0
+ && stat(pathname, &sb) == 0
+ && (sb.st_mode & S_IFMT) == S_IFREG
+ && (sb.st_mode & S_IXOTH) != 0) {
+ result = True;
+ }
+ return result;
+}
+
#ifndef VMS
#ifndef PATH_MAX
#define PATH_MAX 512 /* ... is not defined consistently in Xos.h */
@@ -5142,9 +5184,7 @@ xtermFindShell(char *leaf, Bool warning)
if (skip)
++d;
s += (d - tmp);
- if (*tmp == '/'
- && strstr(tmp, "..") == 0
- && access(tmp, X_OK) == 0) {
+ if (validProgram(tmp)) {
result = x_strdup(tmp);
found = True;
allocated = True;
@@ -5161,9 +5201,7 @@ xtermFindShell(char *leaf, Bool warning)
}
}
TRACE(("...xtermFindShell(%s)\n", result));
- if (*result != '/'
- || strstr(result, "..") != 0
- || access(result, X_OK) != 0) {
+ if (!validProgram(result)) {
if (warning)
xtermWarning("No absolute path found for shell: %s\n", result);
if (allocated)
diff --git a/package/debian/changelog b/package/debian/changelog
index 71b9091..b8c242e 100644
--- a/package/debian/changelog
+++ b/package/debian/changelog
@@ -1,3 +1,9 @@
+xterm-dev (302) unstable; urgency=low
+
+ * maintenance updates
+
+ -- Thomas E. Dickey <dickey@invisible-island.net> Sat, 15 Feb 2014 16:19:35 -0500
+
xterm-dev (301) unstable; urgency=high
* miscellaneous fixes
diff --git a/package/debian/control b/package/debian/control
index b970db2..96995ec 100644
--- a/package/debian/control
+++ b/package/debian/control
@@ -3,7 +3,7 @@ Section: x11
Priority: optional
Maintainer: Thomas E. Dickey <dickey@invisible-island.net>
Homepage: http://invisible-island.net/xterm/
-Build-Depends: debhelper (>= 7)
+Build-Depends: debhelper (>= 7), xorg-docs-core
Standards-Version: 3.8.2
Package: xterm-dev
diff --git a/package/debian/rules b/package/debian/rules
index 1d5159f..8f818b5 100755
--- a/package/debian/rules
+++ b/package/debian/rules
@@ -181,7 +181,7 @@ binary-arch: build install
dh_install
dh_link
dh_strip
- dh_compress
+ dh_compress -Xexamples
dh_fixperms
dh_installdeb
dh_shlibdeps
diff --git a/package/freebsd/Makefile b/package/freebsd/Makefile
index c2f5632..ba96789 100644
--- a/package/freebsd/Makefile
+++ b/package/freebsd/Makefile
@@ -5,7 +5,7 @@
# and "make makesum".
PORTNAME= xterm
-PORTVERSION= 301
+PORTVERSION= 302
CATEGORIES= x11
MASTER_SITES= ftp://invisible-island.net/xterm/ \
CRITICAL
diff --git a/package/xterm.spec b/package/xterm.spec
index d4a6d84..f18b6db 100644
--- a/package/xterm.spec
+++ b/package/xterm.spec
@@ -1,18 +1,42 @@
-# $XTermId: xterm.spec,v 1.59 2013/12/09 12:59:32 tom Exp $
+# $XTermId: xterm.spec,v 1.65 2014/02/28 21:41:43 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: 301
+Version: 302
Release: 1
License: X11
Group: User Interface/X
Source: xterm-%{version}.tgz
-# URL: http://invisible-island.net/xterm/
+URL: ftp://invisible-island.net/xterm/
Provides: x-terminal-emulator
+# This part (the build-requires) would be useful if the various distributions
+# had provided stable package-naming, or virtual packages to cover transitions.
+# However, they have not done this in the past.
+%define use_x_manpage %(test "x$_use_x_manpage" = xyes && echo 1 || echo 0)
+%if "%{use_x_manpage}"
+
+%global is_mandriva %(test -f /etc/mandriva-release && echo %{use_x_manpage} || echo 0)
+%global is_redhat %(test -f /etc/redhat-release && echo %{use_x_manpage} || echo 0)
+%global is_suse %(test -f /etc/SuSE-release && echo %{use_x_manpage} || echo 0)
+
+%if %{is_mandriva}
+BuildRequires: x11-docs
+%else
+%if %{is_redhat}
+BuildRequires: xorg-x11-docs
+%else
+%if %{is_suse}
+BuildRequires: xorg-docs
+%endif
+%endif
+%endif
+
+%endif
+
%description
xterm is the standard terminal emulator for the X Window System.
It provides DEC VT102 and Tektronix 4014 compatible terminals for
@@ -46,14 +70,19 @@ for the program and its resource class, to avoid conflict with other packages.
%define desktop_utils %(if which desktop-file-install 2>&1 >/dev/null ; then echo 1 || echo 0 ; fi)
%define icon_theme %(test -d /usr/share/icons/hicolor && echo 1 || echo 0)
+%define apps_x11r6 %(test -d /usr/X11R6/lib/X11/app-defaults && echo 1 || echo 0)
%define apps_shared %(test -d /usr/share/X11/app-defaults && echo 1 || echo 0)
%define apps_syscnf %(test -d /etc/X11/app-defaults && echo 1 || echo 0)
+%if %{apps_x11r6}
+%define _xresdir %{_prefix}/X11R6/lib/X11/app-defaults
+%else
%if %{apps_shared}
%define _xresdir %{_datadir}/X11/app-defaults
%else
%define _xresdir %{_sysconfdir}/X11/app-defaults
%endif
+%endif
%define _iconsdir %{_datadir}/icons
%define _pixmapsdir %{_datadir}/pixmaps
@@ -142,7 +171,7 @@ make install-bin install-man install-app install-icon \
# The scripts are readable, but not executable, to let find-requires
# know that they do not depend on Perl packages.
- chmod 644 $RPM_BUILD_ROOT%{my_docdir}/vttests/*
+ chmod 644 $RPM_BUILD_ROOT%{my_docdir}/vttests/*.pl
%if "%{desktop_utils}"
make install-desktop \
@@ -164,6 +193,8 @@ if [ -x %{_bindir}/gtk-update-icon-cache ]; then
%{_bindir}/gtk-update-icon-cache %{_iconsdir}/hicolor || :
fi
%endif
+# find-requires does not care about at this point
+chmod +x %{my_docdir}/vttests/*.*
%postun
%if "%{icon_theme}"
diff --git a/ptyx.h b/ptyx.h
index 99ea119..24bd777 100644
--- a/ptyx.h
+++ b/ptyx.h
@@ -1,7 +1,7 @@
-/* $XTermId: ptyx.h,v 1.789 2013/11/23 17:04:26 tom Exp $ */
+/* $XTermId: ptyx.h,v 1.794 2014/03/02 22:38:51 tom Exp $ */
/*
- * Copyright 1999-2012,2013 by Thomas E. Dickey
+ * Copyright 1999-2013,2014 by Thomas E. Dickey
*
* All Rights Reserved
*
@@ -80,6 +80,13 @@
#include <stdio.h>
+#ifdef HAVE_STDINT_H
+#include <stdint.h>
+#define DECONST(type,s) ((type *)(intptr_t)(const type *)(s))
+#else
+#define DECONST(type,s) ((type *)(s))
+#endif
+
/* adapted from IntrinsicI.h */
#define MyStackAlloc(size, stack_cache_array) \
((size) <= sizeof(stack_cache_array) \
@@ -657,6 +664,10 @@ typedef struct {
#endif
#endif
+#ifndef OPT_REPORT_COLORS
+#define OPT_REPORT_COLORS 1 /* provide "-report-colors" option */
+#endif
+
#ifndef OPT_REPORT_FONTS
#define OPT_REPORT_FONTS 1 /* provide "-report-fonts" option */
#endif
@@ -1387,14 +1398,14 @@ typedef unsigned char IChar; /* for 8-bit characters */
#define Cres(name, class, offset, dftvalue) \
{RES_NAME(name), RES_CLASS(class), XtRPixel, sizeof(Pixel), \
- RES_OFFSET(offset), XtRString, (XtPointer) dftvalue}
+ RES_OFFSET(offset), XtRString, DECONST(char,dftvalue)}
#define Tres(name, class, offset, dftvalue) \
COLOR_RES2(name, class, screen.Tcolors[offset], dftvalue) \
#define Fres(name, class, offset, dftvalue) \
{RES_NAME(name), RES_CLASS(class), XtRFontStruct, sizeof(XFontStruct *), \
- RES_OFFSET(offset), XtRString, (XtPointer) dftvalue}
+ RES_OFFSET(offset), XtRString, DECONST(char,dftvalue)}
#define Ires(name, class, offset, dftvalue) \
{RES_NAME(name), RES_CLASS(class), XtRInt, sizeof(int), \
@@ -1402,11 +1413,11 @@ typedef unsigned char IChar; /* for 8-bit characters */
#define Dres(name, class, offset, dftvalue) \
{RES_NAME(name), RES_CLASS(class), XtRFloat, sizeof(float), \
- RES_OFFSET(offset), XtRString, (XtPointer) dftvalue}
+ RES_OFFSET(offset), XtRString, DECONST(char,dftvalue)}
#define Sres(name, class, offset, dftvalue) \
{RES_NAME(name), RES_CLASS(class), XtRString, sizeof(char *), \
- RES_OFFSET(offset), XtRString, (XtPointer) dftvalue}
+ RES_OFFSET(offset), XtRString, DECONST(char,dftvalue)}
#define Wres(name, class, offset, dftvalue) \
{RES_NAME(name), RES_CLASS(class), XtRWidget, sizeof(Widget), \
@@ -1869,6 +1880,7 @@ typedef struct {
char * utf8_mode_s; /* use UTF-8 decode/encode */
char * utf8_fonts_s; /* use UTF-8 decode/encode */
int utf8_nrc_mode; /* saved UTF-8 mode for DECNRCM */
+ Boolean utf8_always; /* special case for wideChars */
int utf8_mode; /* use UTF-8 decode/encode: 0-2 */
int utf8_fonts; /* use UTF-8 decode/encode: 0-2 */
int max_combining; /* maximum # of combining chars */
@@ -2647,6 +2659,8 @@ typedef unsigned Tabs [TAB_ARRAY_SIZE];
typedef struct _XtermWidgetRec {
CorePart core;
XSizeHints hints;
+ XVisualInfo *visInfo;
+ int numVisuals;
Bool init_menu;
TKeyboard keyboard; /* terminal keyboard */
TScreen screen; /* terminal screen */
diff --git a/trace.c b/trace.c
index 423f7fb..7d7edc2 100644
--- a/trace.c
+++ b/trace.c
@@ -1,7 +1,7 @@
-/* $XTermId: trace.c,v 1.153 2013/11/26 22:41:44 tom Exp $ */
+/* $XTermId: trace.c,v 1.154 2014/03/02 12:01:26 tom Exp $ */
/*
- * Copyright 1997-2012,2013 by Thomas E. Dickey
+ * Copyright 1997-2013,2014 by Thomas E. Dickey
*
* All Rights Reserved
*
@@ -917,6 +917,9 @@ TraceXtermResources(void)
XRES_B(ptyHandshake);
XRES_B(ptySttySize);
#endif
+#if OPT_REPORT_COLORS
+ XRES_B(reportColors);
+#endif
#if OPT_REPORT_FONTS
XRES_B(reportFonts);
#endif
diff --git a/version.h b/version.h
index 13964d4..2e85746 100644
--- a/version.h
+++ b/version.h
@@ -1,4 +1,4 @@
-/* $XTermId: version.h,v 1.378 2014/01/19 20:58:11 tom Exp $ */
+/* $XTermId: version.h,v 1.381 2014/03/03 01:57:01 tom Exp $ */
/*
* Copyright 1998-2013,2014 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 301
-#define XTERM_DATE 2014-01-19
+#define XTERM_PATCH 302
+#define XTERM_DATE 2014-03-02
#ifndef __vendorversion__
#define __vendorversion__ "XTerm"
diff --git a/vttests/256colors.pl b/vttests/256colors.pl
index 57976f7..a037368 100755
--- a/vttests/256colors.pl
+++ b/vttests/256colors.pl
@@ -1,9 +1,9 @@
-#!/usr/bin/perl
-# $XTermId: 256colors.pl,v 1.4 2006/09/29 21:49:03 tom Exp $
+#!/usr/bin/env perl
+# $XTermId: 256colors.pl,v 1.5 2014/02/26 20:16:12 tom Exp $
# -----------------------------------------------------------------------------
# this file is part of xterm
#
-# Copyright 1999,2006 by Thomas E. Dickey
+# Copyright 1999-2006,2014 by Thomas E. Dickey
#
# All Rights Reserved
#
@@ -31,10 +31,15 @@
# sale, use or other dealings in this Software without prior written
# authorization.
# -----------------------------------------------------------------------------
-#
+
+use strict;
+use warnings;
+
# This uses 33 print-lines on an 80-column display. Printing the numbers in
# hexadecimal would make it compact enough for 24x80, but less readable.
+our ($bg, $fg);
+
for ($bg = 0; $bg < 256; $bg++) {
# print "\x1b[9;1H\x1b[2J";
for ($fg = 0; $fg < 256; $fg++) {
diff --git a/vttests/256colors2.pl b/vttests/256colors2.pl
index af8d5b7..f0360ec 100755
--- a/vttests/256colors2.pl
+++ b/vttests/256colors2.pl
@@ -1,9 +1,9 @@
-#!/usr/bin/perl
-# $XTermId: 256colors2.pl,v 1.15 2012/09/19 23:32:48 tom Exp $
+#!/usr/bin/env perl
+# $XTermId: 256colors2.pl,v 1.16 2014/02/26 20:21:48 tom Exp $
# -----------------------------------------------------------------------------
# this file is part of xterm
#
-# Copyright 1999-2009,2012 by Thomas E. Dickey
+# Copyright 1999-2012,2014 by Thomas E. Dickey
# Copyright 2002 by Steve Wall
# Copyright 1999 by Todd Larason
#
@@ -39,6 +39,7 @@
# pleasing shades
use strict;
+use warnings;
use Getopt::Std;
use Encode 'encode_utf8';
@@ -128,9 +129,9 @@ for ($red = 0; $red < $cube; $red++) {
for ($blue = 0; $blue < $cube; $blue++) {
&define_color(
16 + (map_cube($red) * $cube * $cube) + (map_cube($green) * $cube) + map_cube($blue),
- int (@steps[$red]),
- int (@steps[$green]),
- int (@steps[$blue]));
+ int ($steps[$red]),
+ int ($steps[$green]),
+ int ($steps[$blue]));
}
}
}
diff --git a/vttests/88colors.pl b/vttests/88colors.pl
index 3db178c..efade56 100755
--- a/vttests/88colors.pl
+++ b/vttests/88colors.pl
@@ -1,9 +1,9 @@
-#!/usr/bin/perl
-# $XTermId: 88colors.pl,v 1.3 1999/09/27 20:12:18 tom Exp $
+#!/usr/bin/env perl
+# $XTermId: 88colors.pl,v 1.4 2014/02/26 20:16:26 tom Exp $
# -----------------------------------------------------------------------------
# this file is part of xterm
#
-# Copyright 1999 by Thomas E. Dickey
+# Copyright 1999,2014 by Thomas E. Dickey
#
# All Rights Reserved
#
@@ -33,6 +33,11 @@
# -----------------------------------------------------------------------------
# Made from 256colors.pl
+use strict;
+use warnings;
+
+our ($bg, $fg);
+
for ($bg = 0; $bg < 88; $bg++) {
print "\x1b[9;1H\x1b[48;5;${bg}m\x1b[2J";
for ($fg = 0; $fg < 88; $fg++) {
diff --git a/vttests/88colors2.pl b/vttests/88colors2.pl
index a96747f..eb0d9b1 100755
--- a/vttests/88colors2.pl
+++ b/vttests/88colors2.pl
@@ -1,9 +1,9 @@
-#!/usr/bin/perl
-# $XTermId: 88colors2.pl,v 1.11 2012/09/19 23:31:56 tom Exp $
+#!/usr/bin/env perl
+# $XTermId: 88colors2.pl,v 1.12 2014/02/26 20:16:53 tom Exp $
# -----------------------------------------------------------------------------
# this file is part of xterm
#
-# Copyright 1999-2009,2012 by Thomas E. Dickey
+# Copyright 1999-2012,2014 by Thomas E. Dickey
# Copyright 1999 by Steve Wall
#
# All Rights Reserved
Reply to: