X Strike Force XFree86 SVN commit: r2141 - in trunk/debian: . patches
Author: branden
Date: 2005-01-19 23:22:51 -0500 (Wed, 19 Jan 2005)
New Revision: 2141
Modified:
trunk/debian/CHANGESETS
trunk/debian/changelog
trunk/debian/patches/000_stolen_from_author_xterm.diff
Log:
Update XTerm to patch #199 (2004-01-17) from Thomas Dickey's website.
Modified: trunk/debian/CHANGESETS
===================================================================
--- trunk/debian/CHANGESETS 2005-01-18 00:08:50 UTC (rev 2140)
+++ trunk/debian/CHANGESETS 2005-01-20 04:22:51 UTC (rev 2141)
@@ -156,4 +156,7 @@
Add copyright notice and GPL license boilerplate to init scripts.
2139
+Update XTerm to patch #199 (2004-01-17) from Thomas Dickey's website.
+ 2141
+
vim:set ai et sts=4 sw=4 tw=80:
Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog 2005-01-18 00:08:50 UTC (rev 2140)
+++ trunk/debian/changelog 2005-01-20 04:22:51 UTC (rev 2141)
@@ -112,7 +112,7 @@
* Update patch #007 to fix the problem with XFree86-authored manpages
reporting "Version Version ..." in the footer.
- * Update XTerm to patch #198 (2004-01-13) from Thomas Dickey's website.
+ * Update XTerm to patch #199 (2004-01-17) from Thomas Dickey's website.
+ Make active-icon work properly when TrueType fonts are used.
(Closes: #286068)
Resync patches #059, #803, and #907.
@@ -124,7 +124,7 @@
* Add copyright notice and GPL license boilerplate to init scripts.
- -- Branden Robinson <branden@debian.org> Mon, 17 Jan 2005 19:03:11 -0500
+ -- Branden Robinson <branden@debian.org> Wed, 19 Jan 2005 19:25:13 -0500
xfree86 (4.3.0.dfsg.1-10) unstable; urgency=medium
Modified: trunk/debian/patches/000_stolen_from_author_xterm.diff
===================================================================
--- trunk/debian/patches/000_stolen_from_author_xterm.diff 2005-01-18 00:08:50 UTC (rev 2140)
+++ trunk/debian/patches/000_stolen_from_author_xterm.diff 2005-01-20 04:22:51 UTC (rev 2141)
@@ -1,11 +1,11 @@
$Id$
-This patch brings xterm up to patch #198. It is derived from Thomas
-Dickey's #198 release at:
+This patch brings xterm up to patch #199. It is derived from Thomas
+Dickey's #199 release at:
ftp://invisible-island.net/xterm/xterm.tar.gz
-(...as of 2004-01-17).
+(...as of 2004-01-19).
Historical note:
@@ -182,9 +182,9 @@
Look for, compile and link with the neXT Athena widget library.
diff -durN xc/programs/xterm~/Imakefile xc/programs/xterm/Imakefile
--- xc/programs/xterm~/Imakefile 2002-11-22 17:56:06.000000000 -0500
-+++ xc/programs/xterm/Imakefile 2005-01-13 20:50:02.000000000 -0500
++++ xc/programs/xterm/Imakefile 2005-01-17 15:40:01.000000000 -0500
@@ -1,3 +1,5 @@
-+XCOMM $XTermId: Imakefile,v 1.74 2005/01/14 01:50:02 tom Exp $
++XCOMM $XTermId: Imakefile,v 1.75 2005/01/17 20:40:01 tom Exp $
+XCOMM
XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:55:07 cpqbld Exp $
XCOMM
@@ -194,7 +194,7 @@
XCOMM or add -Dbcopy=mybcopy to the DEFINES list below.
XCOMM
-XCOMM $XFree86: xc/programs/xterm/Imakefile,v 3.49 2002/11/22 22:56:06 tsi Exp $
-+XCOMM $XFree86: xc/programs/xterm/Imakefile,v 3.56 2005/01/14 01:50:02 dickey Exp $
++XCOMM $XFree86: xc/programs/xterm/Imakefile,v 3.57 2005/01/17 20:40:01 dickey Exp $
XCOMM
/* Uncomment SCROLLBAR_RIGHT if you want the scroll bar to be on the right */
@@ -259,11 +259,11 @@
+/*
+ * Link with the termcap library if USE_TERMCAP is defined in resize.c
+ */
-+#if defined(NTOArchitecture) || \
-+ defined(SCOArchitecture) || \
-+ defined(LinuxArchitecture) || \
-+ defined(OpenBSDArchitecture)
-+ defined(SGIArchitecture) || \
++#if defined(NTOArchitecture) || \
++ defined(SCOArchitecture) || \
++ defined(LinuxArchitecture) || \
++ defined(OpenBSDArchitecture) || \
++ defined(SGIArchitecture) || \
+ defined(SunArchitecture)
+NormalProgramTarget(resize,$(OBJS2),$(DEPLIBS2),NullParameter,NullParameter)
+#else
@@ -275,10 +275,10 @@
/*
diff -durN xc/programs/xterm~/MANIFEST xc/programs/xterm/MANIFEST
--- xc/programs/xterm~/MANIFEST 2003-02-25 18:36:55.000000000 -0500
-+++ xc/programs/xterm/MANIFEST 2005-01-13 20:48:09.000000000 -0500
++++ xc/programs/xterm/MANIFEST 2005-01-17 21:01:43.000000000 -0500
@@ -1,4 +1,4 @@
-MANIFEST for xterm, version xterm-174
-+MANIFEST for xterm, version xterm-198
++MANIFEST for xterm, version xterm-199
--------------------------------------------------------------------------------
MANIFEST this file
256colres.h resource-definitions for 256-color mode
@@ -22277,9 +22277,9 @@
/* Don't disable any mods if "alwaysUseMods" is true. */
diff -durN xc/programs/xterm~/main.c xc/programs/xterm/main.c
--- xc/programs/xterm~/main.c 2002-12-27 16:05:22.000000000 -0500
-+++ xc/programs/xterm/main.c 2005-01-13 20:50:03.000000000 -0500
++++ xc/programs/xterm/main.c 2005-01-17 19:02:26.000000000 -0500
@@ -1,3 +1,5 @@
-+/* $XTermId: main.c,v 1.421 2005/01/14 01:50:03 tom Exp $ */
++/* $XTermId: main.c,v 1.422 2005/01/18 00:02:26 tom Exp $ */
+
#if !defined(lint) && 0
static char *rid = "$Xorg: main.c,v 1.7 2001/02/09 02:06:02 xorgcvs Exp $";
@@ -22298,7 +22298,7 @@
******************************************************************/
-/* $XFree86: xc/programs/xterm/main.c,v 3.162 2002/12/27 21:05:22 dickey Exp $ */
-+/* $XFree86: xc/programs/xterm/main.c,v 3.187 2005/01/14 01:50:03 dickey Exp $ */
++/* $XFree86: xc/programs/xterm/main.c,v 3.188 2005/01/18 00:02:26 dickey Exp $ */
/* main.c */
@@ -22883,13 +22883,14 @@
return result;
}
#endif
-@@ -1472,17 +1505,22 @@
+@@ -1472,17 +1505,23 @@
main(int argc, char *argv[]ENVP_ARG)
{
Widget form_top, menu_top;
- register TScreen *screen;
+ TScreen *screen;
int mode;
++ char *ptr;
char *my_class = DEFCLASS;
Window winToEmbedInto = None;
@@ -22909,7 +22910,7 @@
if (!ttydev || !ptydev)
#else
if (!ttydev)
-@@ -1509,8 +1547,8 @@
+@@ -1509,8 +1548,8 @@
TRACE_ARGV("Before XtOpenApplication", argv);
if (argc > 1) {
int n;
@@ -22920,7 +22921,7 @@
for (n = 1; n < argc; n++) {
TRACE(("parsing %s\n", argv[n]));
-@@ -1740,32 +1778,32 @@
+@@ -1740,32 +1779,32 @@
}
}
#ifdef HAS_LTCHARS /* { */
@@ -22965,19 +22966,22 @@
#endif
#endif /* } USE_TERMIOS */
#ifdef TIOCLSET /* { */
-@@ -1799,6 +1837,11 @@
+@@ -1799,6 +1838,14 @@
}
#endif
-+#ifdef HAVE_PUTENV
-+ if (getenv("DISPLAY") == 0)
-+ putenv("DISPLAY=:0");
-+#endif
++ /*
++ * Check for the obvious - Xt does a poor job of reporting this.
++ */
++ if ((ptr = getenv("DISPLAY")) == 0 || *x_strtrim(ptr) == '\0') {
++ fprintf(stderr, "%s: DISPLAY is not set\n", ProgramName);
++ exit(1);
++ }
+
XtSetErrorHandler(xt_error);
#if OPT_SESSION_MGT
toplevel = XtOpenApplication(&app_con, my_class,
-@@ -1816,9 +1859,10 @@
+@@ -1816,9 +1863,10 @@
#endif /* OPT_SESSION_MGT */
XtSetErrorHandler((XtErrorHandler) 0);
@@ -22989,7 +22993,7 @@
#ifdef HAS_SAVED_IDS_AND_SETEUID
if (seteuid(euid) == -1) {
-@@ -1933,12 +1977,12 @@
+@@ -1933,12 +1981,12 @@
if (!stat("/dev/console", &sbuf) &&
(sbuf.st_uid == getuid()) &&
!access("/dev/console", R_OK | W_OK)) {
@@ -23005,7 +23009,7 @@
#endif /* __sgi */
#endif /* TIOCCONS */
continue;
-@@ -1948,7 +1992,7 @@
+@@ -1948,7 +1996,7 @@
continue;
#ifdef DEBUG
case 'D':
@@ -23014,7 +23018,7 @@
continue;
#endif /* DEBUG */
case 'c': /* -class param */
-@@ -1971,7 +2015,7 @@
+@@ -1971,7 +2019,7 @@
++argv;
winToEmbedInto = (Window) strtol(argv[0], &endPtr, 10);
}
@@ -23023,7 +23027,7 @@
default:
Syntax(*argv);
-@@ -1989,10 +2033,14 @@
+@@ -1989,10 +2037,14 @@
XtNfromVert, menu_top,
XtNleft, XawChainLeft,
XtNright, XawChainRight,
@@ -23038,7 +23042,7 @@
#if OPT_HP_FUNC_KEYS
init_keyboard_type(keyboardIsHP, resource.hpFunctionKeys);
-@@ -2061,7 +2109,7 @@
+@@ -2061,7 +2113,7 @@
int n;
char **c;
for (n = 0, c = command_to_exec; *c; n++, c++) ;
@@ -23047,7 +23051,7 @@
if (c == NULL)
SysError(ERROR_LUMALLOC);
memcpy(c + 2 + u, command_to_exec, (n + 1) * sizeof(char *));
-@@ -2087,7 +2135,7 @@
+@@ -2087,7 +2139,7 @@
#endif
#if OPT_TEK4014
if (inhibit & I_TEK)
@@ -23056,7 +23060,7 @@
if (screen->TekEmu && !TekInit())
SysError(ERROR_INIT);
-@@ -2134,7 +2182,7 @@
+@@ -2134,7 +2186,7 @@
char buf[80];
buf[0] = '\0';
@@ -23065,7 +23069,7 @@
write(screen->respond, buf, strlen(buf));
}
-@@ -2176,6 +2224,15 @@
+@@ -2176,6 +2228,15 @@
SysError(ERROR_FIONBIO);
#endif /* USE_ANY_SYSV_TERMIO, etc */
@@ -23081,7 +23085,7 @@
FD_ZERO(&pty_mask);
FD_ZERO(&X_mask);
FD_ZERO(&Select_mask);
-@@ -2213,6 +2270,7 @@
+@@ -2213,6 +2274,7 @@
winToEmbedInto, 0, 0);
}
@@ -23089,7 +23093,7 @@
for (;;) {
#if OPT_TEK4014
if (screen->TekEmu)
-@@ -2246,9 +2304,9 @@
+@@ -2246,9 +2308,9 @@
seteuid(0);
if ((ttygrp = getgrnam(TTY_GROUP_NAME)) != 0) {
@@ -23101,7 +23105,7 @@
}
seteuid(getuid());
} else if (m_pty != -1) {
-@@ -2299,10 +2357,11 @@
+@@ -2299,10 +2361,11 @@
device types which need to be handled differently.
*/
result = pty_search(pty);
@@ -23114,7 +23118,7 @@
#ifdef __GLIBC__ /* if __GLIBC__ and USE_USG_PTYS, we know glibc >= 2.1 */
/* GNU libc 2 allows us to abstract away from having to know the
master pty device name. */
-@@ -2316,13 +2375,17 @@
+@@ -2316,13 +2379,17 @@
#elif defined(__MVS__)
result = pty_search(pty);
#else
@@ -23137,7 +23141,7 @@
#endif
#endif
-@@ -2375,8 +2438,15 @@
+@@ -2375,8 +2442,15 @@
* Use the clone device if it works, otherwise use pty_search logic.
*/
if ((*pty = open("/dev/ptym/clone", O_RDWR)) >= 0) {
@@ -23155,7 +23159,7 @@
} else {
result = pty_search(pty);
}
-@@ -2457,17 +2527,17 @@
+@@ -2457,17 +2531,17 @@
}
#endif /* USE_PTY_SEARCH */
@@ -23178,7 +23182,7 @@
}
/*
-@@ -2526,12 +2596,12 @@
+@@ -2526,12 +2600,12 @@
}
/*
@@ -23194,7 +23198,7 @@
typedef enum { /* c == child, p == parent */
PTY_BAD, /* c->p: can't open pty slave for some reason */
PTY_FATALERROR, /* c->p: we had a fatal error with the pty */
-@@ -2578,7 +2648,7 @@
+@@ -2578,7 +2652,7 @@
first_map_occurred(void)
{
handshake_t handshake;
@@ -23203,7 +23207,7 @@
handshake.status = PTY_EXEC;
handshake.rows = screen->max_row;
-@@ -2605,13 +2675,11 @@
+@@ -2605,13 +2679,11 @@
{
return;
}
@@ -23219,7 +23223,7 @@
{
if (chown(device, uid, gid) < 0) {
if (errno != ENOENT
-@@ -2623,6 +2691,39 @@
+@@ -2623,6 +2695,39 @@
chmod(device, mode);
}
@@ -23259,7 +23263,7 @@
static int
spawn(void)
/*
-@@ -2631,16 +2732,16 @@
+@@ -2631,16 +2736,16 @@
* If slave, the pty named in passedPty is already open for use
*/
{
@@ -23280,7 +23284,7 @@
#ifdef USE_ANY_SYSV_TERMIO
struct termio tio;
#ifdef TIOCLSET
-@@ -2667,27 +2768,36 @@
+@@ -2667,27 +2772,36 @@
char termcap[TERMCAP_SIZE];
char newtc[TERMCAP_SIZE];
char *ptr, *shname, *shname_minus;
@@ -23324,7 +23328,7 @@
screen->uid = getuid();
screen->gid = getgid();
-@@ -2720,12 +2830,12 @@
+@@ -2720,12 +2834,12 @@
signal(SIGALRM, hungtty);
alarm(2); /* alarm(1) might return too soon */
if (!sigsetjmp(env, 1)) {
@@ -23339,7 +23343,7 @@
errno = ENXIO;
}
#if OPT_INITIAL_ERASE
-@@ -2740,8 +2850,8 @@
+@@ -2740,8 +2854,8 @@
* seem to return EIO. Solaris 2.3 is said to return EINVAL.
* Cygwin returns ENOENT.
*/
@@ -23350,7 +23354,7 @@
if (tty_got_hung || errno == ENXIO || errno == EIO ||
#ifdef ENODEV
errno == ENODEV ||
-@@ -2750,7 +2860,7 @@
+@@ -2750,7 +2864,7 @@
errno == ENOENT ||
#endif
errno == EINVAL || errno == ENOTTY || errno == EACCES) {
@@ -23359,7 +23363,7 @@
#ifdef HAS_LTCHARS
ltc = d_ltc;
#endif /* HAS_LTCHARS */
-@@ -2780,30 +2890,30 @@
+@@ -2780,30 +2894,30 @@
* in which case we just use the defaults as above.
*/
#ifdef HAS_LTCHARS
@@ -23399,7 +23403,7 @@
jtc = d_jtc;
#endif /* sony */
#endif /* USE_ANY_SYSV_TERMIO */
-@@ -2829,9 +2939,7 @@
+@@ -2829,9 +2943,7 @@
}
#endif
@@ -23410,7 +23414,7 @@
}
if (get_pty(&screen->respond, XDisplayString(screen->display))) {
-@@ -2898,19 +3006,16 @@
+@@ -2898,19 +3010,16 @@
* the program to proceed (but not to set $TERMCAP) if the termcap
* entry is not found.
*/
@@ -23435,7 +23439,7 @@
envnew++;
}
}
-@@ -2948,48 +3053,48 @@
+@@ -2948,48 +3057,48 @@
}
#endif /* OPT_INITIAL_ERASE */
@@ -23510,7 +23514,7 @@
SysError(ERROR_FORK);
#endif
TRACE(("Forking...\n"));
-@@ -3001,7 +3106,7 @@
+@@ -3001,7 +3110,7 @@
* now in child process
*/
TRACE_CHILD
@@ -23519,7 +23523,7 @@
int pgrp = setsid(); /* variable may not be used... */
#else
int pgrp = getpid();
-@@ -3041,170 +3146,182 @@
+@@ -3041,170 +3150,182 @@
}
#endif /* SVR4 */
#endif /* I_PUSH */
@@ -23805,7 +23809,7 @@
#endif /* USE_TTY_GROUP */
/*
-@@ -3217,7 +3334,7 @@
+@@ -3217,7 +3338,7 @@
eg. by lineedit in the shell, or emacs, etc. then tio
will have bad values. Let's just get termio from the
new tty and tailor it. */
@@ -23814,7 +23818,7 @@
SysError(ERROR_TIOCGETP);
tio.c_lflag |= ECHOE;
#endif /* umips */
-@@ -3227,6 +3344,13 @@
+@@ -3227,6 +3348,13 @@
/* input: nl->nl, don't ignore cr, cr->nl */
tio.c_iflag &= ~(INLCR | IGNCR);
tio.c_iflag |= ICRNL;
@@ -23828,7 +23832,7 @@
/* ouput: cr->cr, nl is not return, no delays, ln->cr/nl */
#ifndef USE_POSIX_TERMIOS
tio.c_oflag &=
-@@ -3368,6 +3492,12 @@
+@@ -3368,6 +3496,12 @@
#ifdef VSTATUS
TMODE(XTTYMODE_status, tio.c_cc[VSTATUS]);
#endif
@@ -23841,7 +23845,7 @@
#ifdef HAS_LTCHARS
/* both SYSV and BSD have ltchars */
TMODE(XTTYMODE_susp, ltc.t_suspc);
-@@ -3385,18 +3515,18 @@
+@@ -3385,18 +3519,18 @@
ltc.t_rprntc = ltc.t_rprntc = ltc.t_flushc =
ltc.t_werasc = ltc.t_lnextc = _POSIX_VDISABLE;
#endif /* __hpux */
@@ -23864,7 +23868,7 @@
HsSysError(cp_pipe[1], ERROR_TIOCSETP);
#endif /* USE_POSIX_TERMIOS */
#else /* USE_ANY_SYSV_TERMIO or USE_POSIX_TERMIOS */
-@@ -3437,20 +3567,20 @@
+@@ -3437,20 +3571,20 @@
TMODE(XTTYMODE_lnext, ltc.t_lnextc);
}
@@ -23892,7 +23896,7 @@
HsSysError(cp_pipe[1], ERROR_TIOCKSETC);
#endif /* sony */
#endif /* !USE_ANY_SYSV_TERMIO */
-@@ -3458,13 +3588,13 @@
+@@ -3458,13 +3592,13 @@
if (Console) {
#ifdef TIOCCONS
int on = 1;
@@ -23908,7 +23912,7 @@
fprintf(stderr, "%s: cannot open console: %s\n",
xterm_name, strerror(errno));
(void) close(fd);
-@@ -3503,25 +3633,33 @@
+@@ -3503,25 +3637,33 @@
if (!resource.ptyInitialErase
&& !override_tty_modes
&& !ttymodelist[XTTYMODE_erase].set) {
@@ -23948,7 +23952,7 @@
#endif /* USE_ANY_SYSV_TERMIO */
TRACE(("%s setting erase to %d (was %d)\n",
rc ? "FAIL" : "OK", initial_erase, old_erase));
-@@ -3547,7 +3685,7 @@
+@@ -3547,7 +3689,7 @@
#else /* USE_SYSV_ENVVARS */
envsize += 1; /* TERMCAP */
#endif /* USE_SYSV_ENVVARS */
@@ -23957,7 +23961,7 @@
memmove((char *) envnew, (char *) environ, i * sizeof(char *));
environ = envnew;
xtermSetenv("TERM=", TermName);
-@@ -3555,7 +3693,7 @@
+@@ -3555,7 +3697,7 @@
*newtc = 0;
sprintf(buf, "%lu",
@@ -23966,7 +23970,7 @@
xtermSetenv("WINDOWID=", buf);
/* put the display into the environment of the shell */
-@@ -3567,7 +3705,8 @@
+@@ -3567,7 +3709,8 @@
*/
{
#if defined(CRAY) && (OSMAJORVERSION >= 6)
@@ -23976,7 +23980,7 @@
(void) close(0);
if (open("/dev/tty", O_RDWR)) {
-@@ -3580,14 +3719,14 @@
+@@ -3580,14 +3723,14 @@
#else
/* dup the tty */
for (i = 0; i <= 2; i++)
@@ -23995,7 +23999,7 @@
#endif
#endif /* CRAY */
}
-@@ -3638,9 +3777,13 @@
+@@ -3638,9 +3781,13 @@
|| (login_name = getenv("USER")) != NULL)
&& strcmp(login_name, pw->pw_name)) {
struct passwd *pw2 = getpwnam(login_name);
@@ -24012,7 +24016,7 @@
}
}
#endif
-@@ -3652,6 +3795,7 @@
+@@ -3652,6 +3799,7 @@
if (login_name != NULL) {
xtermSetenv("LOGNAME=", login_name); /* for POSIX */
}
@@ -24020,7 +24024,7 @@
#ifdef USE_SYSV_UTMP
/* Set up our utmp entry now. We need to do it here
* for the following reasons:
-@@ -3663,18 +3807,14 @@
+@@ -3663,18 +3811,14 @@
* user and group id's.
*/
(void) setutent();
@@ -24043,7 +24047,7 @@
(void) setutent();
}
}
-@@ -3701,15 +3841,7 @@
+@@ -3701,15 +3845,7 @@
my_pty_name(ttydev), sizeof(utmp.ut_line));
#ifdef HAVE_UTMP_UT_HOST
@@ -24060,7 +24064,7 @@
#endif
(void) strncpy(utmp.ut_name,
(login_name) ? login_name : "????",
-@@ -3730,12 +3862,14 @@
+@@ -3730,12 +3866,14 @@
if (!resource.utmpInhibit) {
errno = 0;
pututline(&utmp);
@@ -24079,7 +24083,7 @@
if (term->misc.login_shell)
updwtmpx(WTMPX_FILE, &utmp);
#elif defined(linux) && defined(__GLIBC__) && (__GLIBC__ >= 2) && !(defined(__powerpc__) && (__GLIBC__ == 2) && (__GLIBC_MINOR__ == 0))
-@@ -3768,9 +3902,7 @@
+@@ -3768,9 +3906,7 @@
(void) strncpy(utmp.ut_name, login_name,
sizeof(utmp.ut_name));
#ifdef HAVE_UTMP_UT_HOST
@@ -24090,7 +24094,7 @@
#endif
/* cast needed on Ultrix 4.4 */
time((time_t *) & utmp.ut_time);
-@@ -3801,11 +3933,25 @@
+@@ -3801,11 +3937,25 @@
/* Let's pass our ttyslot to our parent so that it can
* clean up after us.
*/
@@ -24119,7 +24123,7 @@
#ifdef USE_LASTLOG
if (term->misc.login_shell &&
(i = open(etc_lastlog, O_WRONLY)) >= 0) {
-@@ -3813,9 +3959,7 @@
+@@ -3813,9 +3963,7 @@
(void) strncpy(lastlog.ll_line,
my_pty_name(ttydev),
sizeof(lastlog.ll_line));
@@ -24130,7 +24134,7 @@
time(&lastlog.ll_time);
lseek(i, (long) (screen->uid * sizeof(struct lastlog)), 0);
write(i, (char *) &lastlog, sizeof(struct lastlog));
-@@ -3832,15 +3976,18 @@
+@@ -3832,15 +3980,18 @@
}
#endif
@@ -24155,7 +24159,7 @@
#endif /* HAVE_UTMP */
(void) setgid(screen->gid);
-@@ -3855,43 +4002,44 @@
+@@ -3855,43 +4006,44 @@
if (setuid(screen->uid)) {
SysError(ERROR_SETUID);
}
@@ -24233,7 +24237,7 @@
#ifdef USE_SYSV_ENVVARS
{
-@@ -3941,24 +4089,23 @@
+@@ -3941,24 +4093,23 @@
len--;
sprintf(newtc + len, ":%s=\\%03o:",
TERMCAP_ERASE,
@@ -24269,7 +24273,7 @@
signal(SIGHUP, SIG_DFL);
#ifdef HAVE_UTMP
-@@ -3993,7 +4140,7 @@
+@@ -3993,7 +4144,7 @@
TRACE(("spawning command \"%s\"\n", *command_to_exec));
execvp(*command_to_exec, command_to_exec);
if (command_to_exec[1] == 0)
@@ -24278,7 +24282,7 @@
/* print error message on screen */
fprintf(stderr, "%s: Can't execvp %s: %s\n",
xterm_name, *command_to_exec, strerror(errno));
-@@ -4003,7 +4150,7 @@
+@@ -4003,7 +4154,7 @@
signal(SIGHUP, SIG_DFL);
#endif
@@ -24287,7 +24291,7 @@
(void) strcpy(shname_minus, "-");
(void) strcat(shname_minus, shname);
#if !defined(USE_ANY_SYSV_TERMIO) && !defined(USE_POSIX_TERMIOS)
-@@ -4027,80 +4174,85 @@
+@@ -4027,80 +4178,85 @@
exit(ERROR_EXEC);
}
/* end if in child after fork */
@@ -24436,7 +24440,7 @@
}
/* end if no slave */
-@@ -4159,7 +4311,7 @@
+@@ -4159,7 +4315,7 @@
SIGNAL_T
Exit(int n)
{
@@ -24445,7 +24449,7 @@
#ifdef USE_UTEMPTER
if (!resource.utmpInhibit && added_utmp_entry)
-@@ -4168,9 +4320,6 @@
+@@ -4168,9 +4324,6 @@
#ifdef USE_SYSV_UTMP
struct UTMP_STR utmp;
struct UTMP_STR *utptr;
@@ -24455,7 +24459,7 @@
/* don't do this more than once */
if (xterm_exiting)
-@@ -4183,9 +4332,9 @@
+@@ -4183,9 +4336,9 @@
/* cleanup the utmp entry we forged earlier */
if (!resource.utmpInhibit
@@ -24468,7 +24472,7 @@
) {
#ifdef __OpenBSD__
if (utmpGid != -1) {
-@@ -4193,47 +4342,53 @@
+@@ -4193,47 +4346,53 @@
setegid(utmpGid);
}
#endif
@@ -24548,7 +24552,7 @@
struct utmp utmp;
if (!resource.utmpInhibit && added_utmp_entry &&
-@@ -4264,24 +4419,53 @@
+@@ -4264,24 +4423,53 @@
if (am_slave < 0) {
/* restore ownership of tty and pty */
@@ -24609,7 +24613,7 @@
TRACE(("resize %s\n", oldtc));
if ((ptr1 = x_strindex(oldtc, "co#")) == NULL) {
-@@ -4341,7 +4525,7 @@
+@@ -4341,7 +4529,7 @@
#else
union wait status;
#endif
@@ -24618,7 +24622,7 @@
pid = wait3(&status, WNOHANG, (struct rusage *) NULL);
#endif /* USE_POSIX_WAIT else */
-@@ -4436,13 +4620,17 @@
+@@ -4436,13 +4624,17 @@
TRACE(("parse_tty_modes\n"));
while (1) {
@@ -24637,7 +24641,7 @@
break;
}
if (!mp->name)
-@@ -4468,7 +4656,7 @@
+@@ -4468,7 +4660,7 @@
GetBytesAvailable(int fd)
{
#if defined(FIONREAD)
@@ -24646,7 +24650,7 @@
ioctl(fd, FIONREAD, (char *) &arg);
return (int) arg;
#elif defined(__CYGWIN__)
-@@ -4478,7 +4666,7 @@
+@@ -4478,7 +4670,7 @@
FD_ZERO(&set);
FD_SET(fd, &set);
@@ -28984,9 +28988,9 @@
+}
diff -durN xc/programs/xterm~/os2main.c xc/programs/xterm/os2main.c
--- xc/programs/xterm~/os2main.c 2002-12-27 16:05:22.000000000 -0500
-+++ xc/programs/xterm/os2main.c 2005-01-13 20:50:03.000000000 -0500
++++ xc/programs/xterm/os2main.c 2005-01-17 19:02:26.000000000 -0500
@@ -1,3 +1,5 @@
-+/* $XTermId: os2main.c,v 1.186 2005/01/14 01:50:03 tom Exp $ */
++/* $XTermId: os2main.c,v 1.187 2005/01/18 00:02:26 tom Exp $ */
+
/* removed all foreign stuff to get the code more clear (hv)
* and did some rewrite for the obscure OS/2 environment
@@ -28996,7 +29000,7 @@
static char *rid = "$XConsortium: main.c,v 1.227.1.2 95/06/29 18:13:15 kaleb Exp $";
#endif /* lint */
-/* $XFree86: xc/programs/xterm/os2main.c,v 3.57 2002/12/27 21:05:22 dickey Exp $ */
-+/* $XFree86: xc/programs/xterm/os2main.c,v 3.72 2005/01/14 01:50:03 dickey Exp $ */
++/* $XFree86: xc/programs/xterm/os2main.c,v 3.73 2005/01/18 00:02:26 dickey Exp $ */
/***********************************************************
@@ -29377,7 +29381,7 @@
{
switch (event->type) {
case MappingNotify:
-@@ -862,20 +862,19 @@
+@@ -862,21 +862,21 @@
}
}
@@ -29398,9 +29402,11 @@
- register TScreen *screen;
+ TScreen *screen;
int mode;
++ char *ptr;
char *my_class = DEFCLASS;
Window winToEmbedInto = None;
-@@ -886,8 +885,8 @@
+
+@@ -886,8 +886,8 @@
TRACE_ARGV("Before XtOpenApplication", argv);
if (argc > 1) {
int n;
@@ -29411,7 +29417,7 @@
for (n = 1; n < argc; n++) {
TRACE(("parsing %s\n", argv[n]));
-@@ -922,8 +921,8 @@
+@@ -922,8 +922,8 @@
/*debug opencons();*/
@@ -29422,20 +29428,23 @@
if (!ttydev || !ptydev) {
fprintf(stderr,
"%s: unable to allocate memory for ttydev or ptydev\n",
-@@ -950,7 +949,11 @@
+@@ -950,7 +950,14 @@
d_tio.c_cc[VEOF] = CEOF; /* '^D' */
d_tio.c_cc[VEOL] = CEOL; /* '^@' */
- /* Init the Toolkit. */
-+#ifdef HAVE_PUTENV
-+ if (getenv("DISPLAY") == 0)
-+ putenv("DISPLAY=:0");
-+#endif
++ /*
++ * Check for the obvious - Xt does a poor job of reporting this.
++ */
++ if ((ptr = getenv("DISPLAY")) == 0 || *x_strtrim(ptr) == '\0') {
++ fprintf(stderr, "%s: DISPLAY is not set\n", ProgramName);
++ exit(1);
++ }
+
XtSetErrorHandler(xt_error);
#if OPT_SESSION_MGT
toplevel = XtOpenApplication(&app_con, my_class,
-@@ -968,9 +971,10 @@
+@@ -968,9 +975,10 @@
#endif /* OPT_SESSION_MGT */
XtSetErrorHandler((XtErrorHandler) 0);
@@ -29447,7 +29456,7 @@
waiting_for_initial_map = resource.wait_for_map;
-@@ -1056,9 +1060,9 @@
+@@ -1056,9 +1064,9 @@
if (!stat("/dev/console", &sbuf) &&
(sbuf.st_uid == getuid()) &&
!access("/dev/console", R_OK | W_OK)) {
@@ -29459,7 +29468,7 @@
}
continue;
case 'S':
-@@ -1068,7 +1072,7 @@
+@@ -1068,7 +1076,7 @@
continue;
#ifdef DEBUG
case 'D':
@@ -29468,7 +29477,7 @@
continue;
#endif /* DEBUG */
case 'c': /* -class param */
-@@ -1091,7 +1095,7 @@
+@@ -1091,7 +1099,7 @@
++argv;
winToEmbedInto = (Window) strtol(argv[0], &endPtr, 10);
}
@@ -29477,7 +29486,7 @@
default:
Syntax(*argv);
-@@ -1109,6 +1113,7 @@
+@@ -1109,6 +1117,7 @@
XtNfromVert, menu_top,
XtNleft, XawChainLeft,
XtNright, XawChainRight,
@@ -29485,7 +29494,7 @@
XtNbottom, XawChainBottom,
#endif
(XtPointer) 0);
-@@ -1181,7 +1186,7 @@
+@@ -1181,7 +1190,7 @@
int n;
char **c;
for (n = 0, c = command_to_exec; *c; n++, c++) ;
@@ -29494,7 +29503,7 @@
if (c == NULL)
SysError(ERROR_LUMALLOC);
memcpy(c + 2 + u, command_to_exec, (n + 1) * sizeof(char *));
-@@ -1207,7 +1212,7 @@
+@@ -1207,7 +1216,7 @@
#endif
#if OPT_TEK4014
if (inhibit & I_TEK)
@@ -29503,7 +29512,7 @@
if (screen->TekEmu && !TekInit())
exit(ERROR_INIT);
-@@ -1246,7 +1251,7 @@
+@@ -1246,7 +1255,7 @@
char buf[80];
buf[0] = '\0';
@@ -29512,7 +29521,7 @@
write(screen->respond, buf, strlen(buf));
}
-@@ -1295,6 +1300,7 @@
+@@ -1295,6 +1304,7 @@
winToEmbedInto, 0, 0);
}
@@ -29520,7 +29529,7 @@
for (;;) {
#if OPT_TEK4014
if (screen->TekEmu)
-@@ -1329,6 +1335,8 @@
+@@ -1329,6 +1339,8 @@
ptioctl(*pty, XTY_TRACE, 0);
#endif
return 0;
@@ -29529,7 +29538,7 @@
}
}
return 1;
-@@ -1354,11 +1362,11 @@
+@@ -1354,11 +1366,11 @@
static void
get_terminal(void)
{
@@ -29544,7 +29553,7 @@
}
/*
-@@ -1427,14 +1435,14 @@
+@@ -1427,14 +1439,14 @@
void
first_map_occurred(void)
{
@@ -29561,7 +29570,7 @@
{
if (chown(device, uid, gid) < 0) {
if (errno != ENOENT
-@@ -1474,6 +1482,8 @@
+@@ -1474,6 +1486,8 @@
SIGNAL_RETURN;
}
@@ -29570,7 +29579,7 @@
static int
spawn(void)
/*
-@@ -1482,19 +1492,19 @@
+@@ -1482,19 +1496,19 @@
* If slave, the pty named in passedPty is already open for use
*/
{
@@ -29594,7 +29603,7 @@
int pgrp = getpid();
char numbuf[12], **envnew;
-@@ -1522,12 +1532,12 @@
+@@ -1522,12 +1536,12 @@
signal(SIGALRM, hungtty);
alarm(2); /* alarm(1) might return too soon */
if (!setjmp(env)) {
@@ -29609,7 +29618,7 @@
errno = ENXIO;
}
signal(SIGALRM, SIG_DFL);
-@@ -1538,10 +1548,10 @@
+@@ -1538,10 +1552,10 @@
* no controlling terminal, but some systems (e.g. SunOS 4.0)
* seem to return EIO. Solaris 2.3 is said to return EINVAL.
*/
@@ -29622,7 +29631,7 @@
tio = d_tio;
} else {
SysError(ERROR_OPDEVTTY);
-@@ -1554,12 +1564,10 @@
+@@ -1554,12 +1568,10 @@
* if started directly from xdm or xinit,
* in which case we just use the defaults as above.
*/
@@ -29637,7 +29646,7 @@
}
if (get_pty(&screen->respond)) {
-@@ -1606,19 +1614,16 @@
+@@ -1606,19 +1618,16 @@
* the program to proceed (but not to set $TERMCAP) if the termcap
* entry is not found.
*/
@@ -29662,7 +29671,7 @@
envnew++;
}
}
-@@ -1626,17 +1631,17 @@
+@@ -1626,17 +1635,17 @@
/* tell tty how big window is */
#if OPT_TEK4014
if (TEK4014_ACTIVE(screen)) {
@@ -29688,7 +29697,7 @@
}
if (am_slave < 0) {
-@@ -1647,7 +1652,7 @@
+@@ -1647,7 +1656,7 @@
* use an event sema for sync
*/
sprintf(sema, "\\SEM32\\xterm%s", &ptydev[8]);
@@ -29697,7 +29706,7 @@
SysError(ERROR_FORK);
switch ((screen->pid = fork())) {
-@@ -1670,7 +1675,7 @@
+@@ -1670,7 +1679,7 @@
/* Now is the time to set up our process group and
* open up the pty slave.
*/
@@ -29706,7 +29715,7 @@
/* dumm gelaufen */
fprintf(stderr, "Cannot open slave side of PTY\n");
exit(1);
-@@ -1680,10 +1685,9 @@
+@@ -1680,10 +1689,9 @@
* (from ttyname)
*/
#ifdef EMXNOTBOGUS
@@ -29719,7 +29728,7 @@
if (ttydev == NULL) {
SysError(ERROR_SPREALLOC);
}
-@@ -1693,18 +1697,18 @@
+@@ -1693,18 +1701,18 @@
ptr = ttydev;
#endif
/* for safety: enable DUPs */
@@ -29741,7 +29750,7 @@
t = d_tio;
t.c_iflag = ICRNL;
-@@ -1712,12 +1716,12 @@
+@@ -1712,12 +1720,12 @@
t.c_lflag = ISIG | ICANON | ECHO | ECHOE | ECHOK;
/* ignore error code, user will see it :-) */
@@ -29756,7 +29765,7 @@
fprintf(stderr, "%s: cannot open console\n", xterm_name);
}
}
-@@ -1738,7 +1742,7 @@
+@@ -1738,7 +1746,7 @@
envsize += 3; /* TERM, WINDOWID, DISPLAY */
envsize += 2; /* COLUMNS, LINES */
@@ -29765,7 +29774,7 @@
memmove((char *) envnew, (char *) gblenvp, i * sizeof(char *));
gblenvp = envnew;
xtermSetenv("TERM=", TermName);
-@@ -1746,7 +1750,7 @@
+@@ -1746,7 +1754,7 @@
*newtc = 0;
sprintf(buf, "%lu",
@@ -29774,7 +29783,7 @@
xtermSetenv("WINDOWID=", buf);
/* put the display into the environment of the shell */
-@@ -1758,26 +1762,26 @@
+@@ -1758,26 +1766,26 @@
*/
/* dup the tty */
for (i = 0; i <= 2; i++)
@@ -29811,7 +29820,7 @@
}
sprintf(numbuf, "%d", screen->max_col + 1);
-@@ -1789,7 +1793,7 @@
+@@ -1789,7 +1797,7 @@
environ = gblenvp;
/* need to reset after all the ioctl bashing we did above */
@@ -29820,7 +29829,7 @@
signal(SIGHUP, SIG_DFL);
-@@ -1895,7 +1899,7 @@
+@@ -1895,7 +1903,7 @@
SIGNAL_T
Exit(int n)
{
@@ -29829,7 +29838,7 @@
int pty = term->screen.respond; /* file descriptor of pty */
close(pty); /* close explicitly to avoid race with slave side */
#ifdef ALLOWLOGGING
-@@ -1904,8 +1908,8 @@
+@@ -1904,8 +1912,8 @@
#endif
if (am_slave < 0) {
/* restore ownership of tty and pty */
@@ -29840,7 +29849,7 @@
}
exit(n);
SIGNAL_RETURN;
-@@ -1913,7 +1917,7 @@
+@@ -1913,7 +1921,7 @@
/* ARGSUSED */
static void
@@ -29849,7 +29858,7 @@
{
}
-@@ -2032,7 +2036,7 @@
+@@ -2032,7 +2040,7 @@
switch (func) {
case TCGETA:
@@ -29858,7 +29867,7 @@
NULL, 0, NULL,
(ULONG *) & pt, sizeof(struct pt_termios), &len);
if (rc)
-@@ -2072,12 +2076,12 @@
+@@ -2072,12 +2080,12 @@
NULL, 0, NULL);
case TIOCSWINSZ:
return DosDevIOCtl(fd, XFREE86_PTY, XTY_TIOCSWINSZ,
@@ -36637,11 +36646,11 @@
diff -durN xc/programs/xterm~/version.h xc/programs/xterm/version.h
--- xc/programs/xterm~/version.h 2003-02-25 18:36:55.000000000 -0500
-+++ xc/programs/xterm/version.h 2005-01-13 20:50:03.000000000 -0500
++++ xc/programs/xterm/version.h 2005-01-17 15:40:01.000000000 -0500
@@ -1,10 +1,14 @@
-/* $XFree86: xc/programs/xterm/version.h,v 3.86 2003/02/25 23:36:55 dickey Exp $ */
-+/* $XTermId: version.h,v 1.237 2005/01/14 01:50:03 tom Exp $ */
-+/* $XFree86: xc/programs/xterm/version.h,v 3.109 2005/01/14 01:50:03 dickey Exp $ */
++/* $XTermId: version.h,v 1.238 2005/01/17 20:40:01 tom Exp $ */
++/* $XFree86: xc/programs/xterm/version.h,v 3.110 2005/01/17 20:40:01 dickey Exp $ */
/*
* These definitions are used to build the string that's printed in response to
@@ -36653,7 +36662,7 @@
*/
-#define XTERM_PATCH 174
-#define XFREE86_VERSION "XFree86 4.2.99.903"
-+#define XTERM_PATCH 198
++#define XTERM_PATCH 199
+
+#ifndef __vendorversion__
+#define __vendorversion__ "XTerm"
@@ -38080,7 +38089,7 @@
#endif
diff -durN xc/programs/xterm~/xterm.log.html xc/programs/xterm/xterm.log.html
--- xc/programs/xterm~/xterm.log.html 2003-02-25 18:36:55.000000000 -0500
-+++ xc/programs/xterm/xterm.log.html 2005-01-13 20:50:03.000000000 -0500
++++ xc/programs/xterm/xterm.log.html 2005-01-17 19:02:26.000000000 -0500
@@ -1,7 +1,7 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!--
@@ -38095,12 +38104,12 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. *
*****************************************************************************
- $XFree86: xc/programs/xterm/xterm.log.html,v 1.92 2003/02/25 23:36:55 dickey Exp $
-+ $XTermId: xterm.log.html,v 1.211 2005/01/14 01:50:03 tom Exp $
-+ $XFree86: xc/programs/xterm/xterm.log.html,v 1.132 2005/01/14 01:50:03 dickey Exp $
++ $XTermId: xterm.log.html,v 1.212 2005/01/18 00:02:26 tom Exp $
++ $XFree86: xc/programs/xterm/xterm.log.html,v 1.134 2005/01/18 00:02:26 dickey Exp $
-->
<HTML>
<HEAD>
-@@ -30,19 +31,45 @@
+@@ -30,19 +31,46 @@
</HEAD>
<BODY>
<HR>
@@ -38124,6 +38133,7 @@
+is the latest version of this file.
<UL>
++<LI><A HREF="#xterm_199">Patch #199 - 2005/1/17 - XFree86 4.4.99.22</A>
+<LI><A HREF="#xterm_198">Patch #198 - 2005/1/13 - XFree86 4.4.99.21</A>
+<LI><A HREF="#xterm_197">Patch #197 - 2004/11/30 - XFree86 4.4.99.19</A>
+<LI><A HREF="#xterm_196">Patch #196 - 2004/8/15 - XFree86 4.4.99.12</A>
@@ -38151,10 +38161,20 @@
<LI><A HREF="#xterm_174">Patch #174 - 2003/2/25 - XFree86 4.2.99.903</A>
<LI><A HREF="#xterm_173">Patch #173 - 2003/2/6 - XFree86 4.2.99.902</A>
<LI><A HREF="#xterm_172">Patch #172 - 2002/12/27 - XFree86 4.2.99.3</A>
-@@ -220,10 +247,1010 @@
+@@ -220,10 +248,1020 @@
<LI><A HREF="#xterm_01">Patch #1 - 1996/1/6</A>
</UL>
++<H1><A NAME="xterm_199">Patch #199 - 2005/1/17 - XFree86 4.4.99.22</A></H1>
++<ul>
++ <li>instead of setting <code>$DISPLAY</code>, check for the unset
++ variable and warn/exit on this condition (comments by H Merijn
++ Brand and Bernhard R Link).
++
++ <li>fix a typo in Imakefile from <a href="#xterm_198">patch #198</a>
++ (reports/patches by Stefan Dirsch, and Mike Castle).
++</ul>
++
+<H1><A NAME="xterm_198">Patch #198 - 2005/1/13 - XFree86 4.4.99.21</A></H1>
+<ul>
+ <li>set <code>$DISPLAY</code> to ":0" if it is not set.
@@ -39163,7 +39183,7 @@
Use the next lower window (report by Karl Rudolf Bauchspiess).
<li>add a resource setting to control whether the extended window
-@@ -257,7 +1284,7 @@
+@@ -257,7 +1295,7 @@
<li>merge <code>Error()</code> calls and some <code>exit()</code> calls
into <code>SysError()</code>, and change that to add the brief
@@ -39172,7 +39192,7 @@
Change a few <code>SysError()</code>, calls to avoid using code 1, to
avoid confusion with exit status from places that do not use
<code>SysError()</code>.
-@@ -393,7 +1420,7 @@
+@@ -393,7 +1431,7 @@
<li>add <code>-into</code> option, for embedding xterm in a Tcl/Tk
application (patch by George Peter Staplin <georgeps@xmission.com>).
@@ -39181,7 +39201,7 @@
So a session manager such as, e.g., xsm, should be able to respawn or
kill xterms without the help of an SM proxy (like smproxy), which is
a hack and almost always buggy (patch by David Madore).
-@@ -402,8 +1429,8 @@
+@@ -402,8 +1440,8 @@
<code>OPT_READLINE</code> in button.c (reported by Ilya Zakharevich).
<li>fix for inconsistent use of <code>struct utmp</code> versus
@@ -39192,7 +39212,7 @@
<li>modify logic for <code>metaSendsEscape</code> to allow it to work
in a setup where the Meta-key is not recognized as a modifier by
-@@ -648,8 +1675,8 @@
+@@ -648,8 +1686,8 @@
<ul>
<li>correct ifdef's for <code>__QNX__</code> and
<code>USE_SYSV_PGRP</code> in main.c call to <code>tcsetpgrp</code>,
@@ -39203,7 +39223,7 @@
<li>modify trace.c to fix missing definition of GCC_UNUSED for
compilers other than gcc when configured for trace code (report/patch
-@@ -660,7 +1687,7 @@
+@@ -660,7 +1698,7 @@
Nelson Beebe).
<li>modify xterm manual page and minstall.sh to allow imake rules
@@ -39212,7 +39232,7 @@
<li>review/update list of conflicting preprocesor symbols to remove
from $CPPFLAGS at the end of the configure script. In particular,
-@@ -936,7 +1963,8 @@
+@@ -936,7 +1974,8 @@
and 2001/4/18, respectively from
http://www.cl.cam.ac.uk/~mgk25/ucs/
@@ -39222,7 +39242,7 @@
reset the saved cursor position for normal/alternate screens
on a soft reset, but actually wiped out all of the saved cursor
information. Just reset the saved position for the current screen
-@@ -982,8 +2010,8 @@
+@@ -982,8 +2021,8 @@
<H1><A NAME="xterm_155">Patch #155 - 2001/4/20 - XFree86 4.0.3</A></H1>
<ul>
@@ -39233,7 +39253,7 @@
</ul>
<H1><A NAME="xterm_154">Patch #154 - 2001/4/11 - XFree86 4.0.3</A></H1>
-@@ -1606,9 +2634,9 @@
+@@ -1606,9 +2645,9 @@
codes, but the ones for the Sun keycodes are what cmdtool and
shelltool actually send.
Reply to: