diff options
-rw-r--r-- | app/xterm/MANIFEST | 4 | ||||
-rw-r--r-- | app/xterm/THANKS | 7 | ||||
-rw-r--r-- | app/xterm/button.c | 4 | ||||
-rw-r--r-- | app/xterm/charproc.c | 7 | ||||
-rw-r--r-- | app/xterm/configure.in | 8 | ||||
-rw-r--r-- | app/xterm/fontutils.c | 6 | ||||
-rw-r--r-- | app/xterm/koi8rxterm.man | 6 | ||||
-rw-r--r-- | app/xterm/main.c | 460 | ||||
-rw-r--r-- | app/xterm/minstall.in (renamed from app/xterm/minstall.sh) | 12 | ||||
-rw-r--r-- | app/xterm/misc.c | 152 | ||||
-rw-r--r-- | app/xterm/package/debian/changelog | 12 | ||||
-rw-r--r-- | app/xterm/package/xterm.spec | 4 | ||||
-rw-r--r-- | app/xterm/ptyx.h | 9 | ||||
-rw-r--r-- | app/xterm/resize.man | 24 | ||||
-rw-r--r-- | app/xterm/termcap | 48 | ||||
-rw-r--r-- | app/xterm/terminfo | 24 | ||||
-rw-r--r-- | app/xterm/trace.c | 88 | ||||
-rw-r--r-- | app/xterm/trace.h | 12 | ||||
-rw-r--r-- | app/xterm/uxterm.man | 6 | ||||
-rw-r--r-- | app/xterm/version.h | 4 | ||||
-rw-r--r-- | app/xterm/xstrings.c | 75 | ||||
-rw-r--r-- | app/xterm/xstrings.h | 10 | ||||
-rw-r--r-- | app/xterm/xterm.h | 12 | ||||
-rw-r--r-- | app/xterm/xterm.log.html | 76 | ||||
-rw-r--r-- | app/xterm/xterm.man | 110 |
25 files changed, 892 insertions, 288 deletions
diff --git a/app/xterm/MANIFEST b/app/xterm/MANIFEST index 757e8e00e..083ef515b 100644 --- a/app/xterm/MANIFEST +++ b/app/xterm/MANIFEST @@ -1,4 +1,4 @@ -MANIFEST for xterm-271, version xterm-271 +MANIFEST for xterm-273, version xterm-273 -------------------------------------------------------------------------------- MANIFEST this file 256colres.h resource-definitions for 256-color mode @@ -60,7 +60,7 @@ main.h default definitions for 'xterm' make.com build-script for VMS port of 'xterm' menu.c popup/pulldown menus for 'xterm' menu.h interface of menu.c -minstall.sh script for installing manpages +minstall.in script for installing manpages misc.c miscellaneous utility functions for 'xterm' os2main.c main program for OS/2 EMX port of 'xterm' plink.sh script to prune unneeded libraries from link diff --git a/app/xterm/THANKS b/app/xterm/THANKS index 97d533c15..223c10d50 100644 --- a/app/xterm/THANKS +++ b/app/xterm/THANKS @@ -1,4 +1,4 @@ --- $XTermId: THANKS,v 1.4 2011/02/11 10:55:53 tom Exp $ +-- $XTermId: THANKS,v 1.5 2011/08/21 00:52:56 tom Exp $ -- vile:txtmode fk=8bit There's no AUTHORS file in this distribution; it would be redundant since I (Thomas E. Dickey) have done more than 80% of the work on xterm since 1996. @@ -65,6 +65,7 @@ Frank Guangxin Liu Frank Liu Gael Roualland George Peter Staplin +Gertjan Halkes Greg Badros Greg Klanderman Greg Smith @@ -99,8 +100,10 @@ Kevin Schoedel Kiyokazu Suto Larry Riedel Lee Olsen +Loďc Minier Marc Bevand Marc La France +Marco Peereboom Marius Tolzmann Mark Waggoner Markus Kuhn @@ -121,6 +124,7 @@ Miroslav Lichvar Nam SungHyun Nelson Beebe Németh Márton +Nicolas George Ovidiu Gheorghioiu Paul Gilmartin Paul Giordano @@ -150,6 +154,7 @@ Stuart Lissaman Sven Verdoolaege Taneli Huuskonen Ted Phelps +Thierry Reding Thomas Wolff Tim Adye Tim Pope diff --git a/app/xterm/button.c b/app/xterm/button.c index 2c2df45b1..c8678d0ff 100644 --- a/app/xterm/button.c +++ b/app/xterm/button.c @@ -1,4 +1,4 @@ -/* $XTermId: button.c,v 1.398 2011/07/04 21:49:39 tom Exp $ */ +/* $XTermId: button.c,v 1.399 2011/08/19 00:09:26 Marco.Peereboom Exp $ */ /* * Copyright 1999-2010,2011 by Thomas E. Dickey @@ -2312,7 +2312,7 @@ SelectSet(XtermWidget xw, if (!isSameCELL(&(screen->startSel), &(screen->endSel))) { SaltTextAway(xw, &(screen->startSel), &(screen->endSel), params, num_params); } else { - DisownSelection(xw); + ScrnDisownSelection(xw); } } diff --git a/app/xterm/charproc.c b/app/xterm/charproc.c index ac780d3e2..ec212f815 100644 --- a/app/xterm/charproc.c +++ b/app/xterm/charproc.c @@ -1,4 +1,4 @@ -/* $XTermId: charproc.c,v 1.1126 2011/07/10 23:19:26 tom Exp $ */ +/* $XTermId: charproc.c,v 1.1127 2011/08/22 23:36:42 tom Exp $ */ /* * Copyright 1999-2010,2011 by Thomas E. Dickey @@ -5435,8 +5435,11 @@ VTRun(XtermWidget xw) } #endif screen->is_running = True; + if (screen->embed_high && screen->embed_wide) { + ScreenResize(xw, screen->embed_wide, screen->embed_high, &(xw->flags)); + } #if OPT_MAXIMIZE - if (resource.fullscreen == esTrue || resource.fullscreen == esAlways) + else if (resource.fullscreen == esTrue || resource.fullscreen == esAlways) FullScreen(term, True); #endif if (!setjmp(VTend)) diff --git a/app/xterm/configure.in b/app/xterm/configure.in index 8c4731e89..a72e4fc0f 100644 --- a/app/xterm/configure.in +++ b/app/xterm/configure.in @@ -1,4 +1,4 @@ -dnl $XTermId: configure.in,v 1.274 2011/07/07 00:06:11 tom Exp $ +dnl $XTermId: configure.in,v 1.277 2011/08/19 09:13:07 tom Exp $ dnl dnl ----------------------------------------------------------------------------- dnl this file is part of xterm @@ -282,7 +282,7 @@ CF_WITH_IMAKE_CFLAGS($(MAIN_DEFINES) $(VENDORMANDEFS)) # If we have already established that there is a full termcap implementation, # suppress the definitions for terminfo that we make have imported from the # imake-file. -if test "x$cf_cv_lib_tgetent" != xno ; then +if test "x$cf_cv_lib_tgetent" != xno || test "x$cf_cv_lib_part_tgetent" != xno ; then case "$IMAKE_CFLAGS" in *-DUSE_TERMINFO\ -DHAVE_TIGETSTR*) CF_UNDO_CFLAGS(IMAKE_CFLAGS,terminfo,[-DUSE_TERMINFO[[ ]]*-DHAVE_TIGETSTR[[ ]]*]) @@ -304,6 +304,7 @@ vt*) default_termid=`echo $default_termid | sed -e 's/^..//'` ;; esac AC_DEFINE_UNQUOTED(DFT_DECID,"$default_termid") +AC_SUBST(default_termid) AC_MSG_CHECKING(for default terminal-type) AC_ARG_WITH(terminal-type, @@ -312,6 +313,7 @@ AC_ARG_WITH(terminal-type, [default_TERM=xterm]) AC_MSG_RESULT($default_TERM) AC_DEFINE_UNQUOTED(DFT_TERMTYPE,"$default_TERM") +AC_SUBST(default_TERM) AC_CHECK_PROG(cf_tic_prog,tic,yes,no) if test "$cf_tic_prog" = yes ; then @@ -974,4 +976,4 @@ then fi ### output xtermcfg.h, etc -AC_OUTPUT(Makefile df-install) +AC_OUTPUT(Makefile df-install minstall:minstall.in) diff --git a/app/xterm/fontutils.c b/app/xterm/fontutils.c index ee6e96f05..c15609053 100644 --- a/app/xterm/fontutils.c +++ b/app/xterm/fontutils.c @@ -1,4 +1,4 @@ -/* $XTermId: fontutils.c,v 1.360 2011/07/13 09:54:49 tom Exp $ */ +/* $XTermId: fontutils.c,v 1.361 2011/07/17 22:26:05 tom Exp $ */ /************************************************************ @@ -971,7 +971,7 @@ xtermLoadFont(XtermWidget xw, * and 12x13ja as the corresponding fonts for 9x18 and 6x13. */ if_OPT_WIDE_CHARS(screen, { - Bool derived; + Boolean derived; char bold[MAX_FONTNAME]; if (check_fontname(myfonts.f_w)) { @@ -1010,7 +1010,7 @@ xtermLoadFont(XtermWidget xw, &fnts[fWBold], (screen->utf8_fonts ? warn[fWBold] - : (xw->misc.fontWarnings + 1)), + : (fontWarningTypes) (xw->misc.fontWarnings + 1)), False); if (derived diff --git a/app/xterm/koi8rxterm.man b/app/xterm/koi8rxterm.man index 169df49fe..a48c74e2b 100644 --- a/app/xterm/koi8rxterm.man +++ b/app/xterm/koi8rxterm.man @@ -1,4 +1,4 @@ -.\" $XTermId: koi8rxterm.man,v 1.3 2007/12/30 15:46:00 tom Exp $ +.\" $XTermId: koi8rxterm.man,v 1.4 2011/08/16 09:44:32 tom Exp $ .\" .\" Copyright 2004 Branden Robinson .\" @@ -31,7 +31,7 @@ koi8rxterm \- X terminal emulator for KOI8-R environments .B koi8rxterm is a wrapper around the .BR xterm(1) -program that invokes the latter program with the \(oqKOI8RXTerm\(cq X +program that invokes the latter program with the \(oqKOI8R__default_class__\(cq X resource class set. All arguments to .B koi8rxterm @@ -72,7 +72,7 @@ uses by default. To change the fonts .B koi8rxterm uses, edit the -.I __apploaddir__/KOI8RXTerm +.I __apploaddir__/KOI8R__default_class__ file. .PP A similar wrapper, diff --git a/app/xterm/main.c b/app/xterm/main.c index 8cddcb9ba..c4d09cea2 100644 --- a/app/xterm/main.c +++ b/app/xterm/main.c @@ -1,4 +1,4 @@ -/* $XTermId: main.c,v 1.638 2011/07/14 00:18:58 tom Exp $ */ +/* $XTermId: main.c,v 1.656 2011/08/25 08:55:31 tom Exp $ */ /* * W A R N I N G @@ -135,6 +135,9 @@ SOFTWARE. #include <grp.h> /* initgroups() */ #endif +static void Syntax(char *) GCC_NORETURN; +static void HsSysError(int) GCC_NORETURN; + #ifdef USE_ISPTS_FLAG static Bool IsPts = False; #endif @@ -491,6 +494,7 @@ static char **command_to_exec = NULL; #if OPT_LUIT_PROG static char **command_to_exec_with_luit = NULL; +static unsigned command_length_with_luit = 0; #endif #define TERMCAP_ERASE "kb" @@ -998,7 +1002,6 @@ static XrmOptionDescRec optionDescList[] = { {"+k8", "*allowC1Printable", XrmoptionNoArg, (XPointer) "off"}, #endif {"-kt", "*keyboardType", XrmoptionSepArg, (XPointer) NULL}, -{"+kt", "*keyboardType", XrmoptionSepArg, (XPointer) NULL}, /* parse logging options anyway for compatibility */ {"-l", "*logging", XrmoptionNoArg, (XPointer) "on"}, {"+l", "*logging", XrmoptionNoArg, (XPointer) "off"}, @@ -1173,6 +1176,7 @@ static OptionHelp xtermOptions[] = { { "-/+hm", "turn on/off selection-color override" }, { "-selbg color", "selection background color" }, { "-selfg color", "selection foreground color" }, +/* -hc is deprecated, not shown in help message */ #endif #if OPT_HP_FUNC_KEYS { "-/+hf", "turn on/off HP Function Key escape codes" }, @@ -1233,6 +1237,7 @@ static OptionHelp xtermOptions[] = { #if OPT_LUIT_PROG { "-/+lc", "turn on/off locale mode using luit" }, { "-lcc path", "filename of locale converter (" DEFLOCALEFILTER ")" }, +/* -en is deprecated, not shown in help message */ #endif { "-/+uc", "turn on/off underline cursor" }, { "-/+ulc", "turn off/on display of underline as color" }, @@ -1350,10 +1355,195 @@ decode_keyvalue(char **ptr, int termcap) } static int -abbrev(const char *tst, const char *cmp, size_t need) +matchArg(XrmOptionDescRec * table, const char *param) { - size_t len = strlen(tst); - return ((len >= need) && (!strncmp(tst, cmp, len))); + int result = -1; + int n; + int ch; + + for (n = 0; (ch = table->option[n]) != '\0'; ++n) { + if (param[n] == ch) { + result = n; + } else { + if (param[n] != '\0') + result = -1; + break; + } + } + + return result; +} + +/* return the number of argv[] entries which constitute arguments of option */ +static int +countArg(XrmOptionDescRec * item) +{ + int result = 0; + + switch (item->argKind) { + case XrmoptionNoArg: + /* FALLTHRU */ + case XrmoptionIsArg: + /* FALLTHRU */ + case XrmoptionStickyArg: + break; + case XrmoptionSepArg: + /* FALLTHRU */ + case XrmoptionResArg: + /* FALLTHRU */ + case XrmoptionSkipArg: + result = 1; + break; + case XrmoptionSkipLine: + break; + case XrmoptionSkipNArgs: + result = (int) (long) (item->value); + break; + } + return result; +} + +#define isOption(string) ((string)[0] == '-' || (string)[0] == '+') + +/* + * Parse the argument list, more/less as XtInitialize, etc., would do, so we + * can find our own "-help" and "-version" options reliably. Improve on just + * doing that, by detecting ambiguous options (things that happen to match the + * abbreviated option we are examining), and making it smart enough to handle + * "-d" as an abbreviation for "-display". Doing this requires checking the + * standard table (something that the X libraries should do). + */ +static XrmOptionDescRec * +parseArg(int *num, char **argv, char **valuep) +{ + /* table adapted from XtInitialize, used here to improve abbreviations */ + /* *INDENT-OFF* */ +#define DATA(option,kind) { option, NULL, kind, (XtPointer) NULL } + static XrmOptionDescRec opTable[] = { + DATA("+rv", XrmoptionNoArg), + DATA("+synchronous", XrmoptionNoArg), + DATA("-background", XrmoptionSepArg), + DATA("-bd", XrmoptionSepArg), + DATA("-bg", XrmoptionSepArg), + DATA("-bordercolor", XrmoptionSepArg), + DATA("-borderwidth", XrmoptionSepArg), + DATA("-bw", XrmoptionSepArg), + DATA("-display", XrmoptionSepArg), + DATA("-fg", XrmoptionSepArg), + DATA("-fn", XrmoptionSepArg), + DATA("-font", XrmoptionSepArg), + DATA("-foreground", XrmoptionSepArg), + DATA("-geometry", XrmoptionSepArg), + DATA("-iconic", XrmoptionNoArg), + DATA("-name", XrmoptionSepArg), + DATA("-reverse", XrmoptionNoArg), + DATA("-rv", XrmoptionNoArg), + DATA("-selectionTimeout", XrmoptionSepArg), + DATA("-synchronous", XrmoptionNoArg), + DATA("-title", XrmoptionSepArg), + DATA("-xnllanguage", XrmoptionSepArg), + DATA("-xrm", XrmoptionResArg), + DATA("-xtsessionID", XrmoptionSepArg), + /* These xterm options are processed after XtOpenApplication */ +#if defined(TIOCCONS) || defined(SRIOCSREDIR) + DATA("-C", XrmoptionNoArg), +#endif /* TIOCCONS */ + DATA("-S", XrmoptionStickyArg), + DATA("-D", XrmoptionNoArg), + }; +#undef DATA + /* *INDENT-ON* */ + + XrmOptionDescRec *result = 0; + Cardinal inlist; + Cardinal limit = XtNumber(optionDescList) + XtNumber(opTable); + int atbest = -1; + int best = -1; + int test; + +#define ITEM(n) ((Cardinal)(n) < XtNumber(optionDescList) \ + ? &optionDescList[n] \ + : &opTable[(Cardinal)(n) - XtNumber(optionDescList)]) + + if (argv[*num] != 0) { + Boolean need_value; + Boolean have_value = False; + + TRACE(("parseArg %s\n", argv[*num])); + if (argv[(*num) + 1] != 0) { + char *value = argv[(*num) + 1]; + have_value = (Boolean) ! isOption(value); + } + for (inlist = 0; inlist < limit; ++inlist) { + XrmOptionDescRec *check = ITEM(inlist); + + test = matchArg(check, argv[*num]); + if (test < 0) + continue; + + /* check for exact match */ + if ((test + 1) == (int) strlen(check->option)) { + if (check->argKind == XrmoptionStickyArg) { + if (strlen(argv[*num]) > strlen(check->option)) { + atbest = (int) inlist; + break; + } + } else if ((test + 1) == (int) strlen(argv[*num])) { + atbest = (int) inlist; + break; + } + } + + need_value = (Boolean) (test > 0 && countArg(check) > 0); + + if (need_value ^ have_value) { + TRACE(("...skipping, need %d vs have %d\n", need_value, have_value)); + continue; + } + + /* special-case for our own options - always allow abbreviation */ + if (test > 0 + && ITEM(inlist)->argKind >= XrmoptionSkipArg) { + atbest = (int) inlist; + break; + } + if (test > best) { + best = test; + atbest = (int) inlist; + } else if (test == best) { + if (atbest >= 0) { + if (atbest > 0) { + fprintf(stderr, + "%s: ambiguous option \"%s\" vs \"%s\"\n", + ProgramName, check->option, + ITEM(atbest)->option); + } + atbest = -1; + } + } + } + } + + *valuep = 0; + if (atbest >= 0) { + result = ITEM(atbest); + TRACE(("...result %s\n", result->option)); + /* expand abbreviations */ + if (result->argKind != XrmoptionStickyArg + && strcmp(argv[*num], x_strdup(result->option))) { + argv[*num] = x_strdup(result->option); + } + + /* adjust (*num) to skip option value */ + (*num) += countArg(result); + TRACE(("...next %s\n", NonNull(argv[*num]))); + if (result->argKind == XrmoptionSkipArg) { + *valuep = argv[*num]; + TRACE(("...parameter %s\n", NonNull(*valuep))); + } + } +#undef ITEM + return result; } static void @@ -1363,6 +1553,7 @@ Syntax(char *badOption) OptionHelp *list = sortedOpts(xtermOptions, optionDescList, XtNumber(optionDescList)); int col; + TRACE(("Syntax error at %s\n", badOption)); fprintf(stderr, "%s: bad command line option \"%s\"\r\n\n", ProgramName, badOption); @@ -1427,42 +1618,6 @@ ConvertConsoleSelection(Widget w GCC_UNUSED, } #endif /* TIOCCONS */ -#if OPT_SESSION_MGT -static void -die_callback(Widget w GCC_UNUSED, - XtPointer client_data GCC_UNUSED, - XtPointer call_data GCC_UNUSED) -{ - Cleanup(0); -} - -static void -save_callback(Widget w GCC_UNUSED, - XtPointer client_data GCC_UNUSED, - XtPointer call_data) -{ - XtCheckpointToken token = (XtCheckpointToken) call_data; - /* we have nothing to save */ - token->save_success = True; -} - -static void -icewatch(IceConn iceConn, - IcePointer clientData GCC_UNUSED, - Bool opening, - IcePointer * watchData GCC_UNUSED) -{ - if (opening) { - ice_fd = IceConnectionNumber(iceConn); - TRACE(("got IceConnectionNumber %d\n", ice_fd)); - } else { - ice_fd = -1; - TRACE(("reset IceConnectionNumber\n")); - } -} - -#endif /* OPT_SESSION_MGT */ - /* * DeleteWindow(): Action proc to implement ICCCM delete_window. */ @@ -1835,30 +1990,56 @@ main(int argc, char *argv[]ENVP_ARG) TRACE_OPTS(xtermOptions, optionDescList, XtNumber(optionDescList)); TRACE_ARGV("Before XtOpenApplication", argv); if (argc > 1) { + XrmOptionDescRec *option_ptr; + char *option_value; int n; - size_t unique = 2; Bool quit = False; for (n = 1; n < argc; n++) { - TRACE(("parsing %s\n", argv[n])); - if (abbrev(argv[n], "-version", unique)) { + if ((option_ptr = parseArg(&n, argv, &option_value)) == 0) { + if (isOption(argv[n])) { + Syntax(argv[n]); + } else if (explicit_shname != 0) { + fprintf(stderr, "Explicit shell already was %s\n", explicit_shname); + Syntax(argv[n]); + } + explicit_shname = xtermFindShell(argv[n], True); + if (explicit_shname == 0) + exit(0); + TRACE(("...explicit shell %s\n", explicit_shname)); + } else if (!strcmp(option_ptr->option, "-e")) { + command_to_exec = (argv + n + 1); + if (!command_to_exec[0]) + Syntax(argv[n]); + break; + } else if (!strcmp(option_ptr->option, "-version")) { Version(); quit = True; - } else if (abbrev(argv[n], "-help", unique)) { + } else if (!strcmp(option_ptr->option, "-help")) { Help(); quit = True; - } else if (abbrev(argv[n], "-class", (size_t) 3)) { - if ((my_class = argv[++n]) == 0) { + } else if (!strcmp(option_ptr->option, "-class")) { + if ((my_class = x_strdup(option_value)) == 0) { Help(); quit = True; } + } else if (!strcmp(option_ptr->option, "-into")) { + char *endPtr; + winToEmbedInto = (Window) strtol(option_value, &endPtr, 0); } } if (quit) exit(0); + /* + * If there is anything left unparsed, and we're not using "-e", + * then give up. + */ + if (n < argc && !command_to_exec) { + Syntax(argv[n]); + } } - /* This dumps core on HP-UX 9.05 with X11R5 */ + /* This dumped core on HP-UX 9.05 with X11R5 */ #if OPT_I18N_SUPPORT XtSetLanguageProc(NULL, NULL, NULL); #endif @@ -1992,23 +2173,14 @@ main(int argc, char *argv[]ENVP_ARG) TRACE_IDS; #endif - XtSetErrorHandler(xt_error); -#if OPT_SESSION_MGT - toplevel = XtOpenApplication(&app_con, my_class, - optionDescList, - XtNumber(optionDescList), - &argc, argv, fallback_resources, - sessionShellWidgetClass, - NULL, 0); - IceAddConnectionWatch(icewatch, NULL); -#else - toplevel = XtAppInitialize(&app_con, my_class, - optionDescList, - XtNumber(optionDescList), - &argc, argv, fallback_resources, - NULL, 0); -#endif /* OPT_SESSION_MGT */ - XtSetErrorHandler((XtErrorHandler) 0); + toplevel = xtermOpenApplication(&app_con, + my_class, + optionDescList, + XtNumber(optionDescList), + &argc, argv, + fallback_resources, + sessionShellWidgetClass, + NULL, 0); XtGetApplicationResources(toplevel, (XtPointer) &resource, application_resources, @@ -2091,27 +2263,18 @@ main(int argc, char *argv[]ENVP_ARG) /* Parse the rest of the command line */ TRACE_ARGV("After XtOpenApplication", argv); for (argc--, argv++; argc > 0; argc--, argv++) { + if (!isOption(*argv)) { #ifdef VMS - if (**argv != '-') Syntax(*argv); #else - if (**argv != '-') { if (argc > 1) Syntax(*argv); - if (command_to_exec == 0) /* if no "-e" option */ - explicit_shname = xtermFindShell(*argv, True); continue; - } #endif + } TRACE(("parsing %s\n", argv[0])); switch (argv[0][1]) { - case 'h': /* -help */ - Help(); - exit(0); - case 'v': /* -version */ - Version(); - exit(0); case 'C': #if defined(TIOCCONS) || defined(SRIOCSREDIR) #ifndef __sgi @@ -2141,26 +2304,20 @@ main(int argc, char *argv[]ENVP_ARG) debug = True; continue; #endif /* DEBUG */ - case 'c': /* -class param */ - if (strcmp(argv[0] + 1, "class") == 0) - argc--, argv++; - else + case 'c': + if (strcmp(argv[0], "-class")) Syntax(*argv); + argc--, argv++; continue; case 'e': - if (argc <= 1) + if (strcmp(argv[0], "-e")) Syntax(*argv); - command_to_exec = ++argv; + command_to_exec = (argv + 1); break; case 'i': - if (argc <= 1) { + if (strcmp(argv[0], "-into")) Syntax(*argv); - } else { - char *endPtr; - --argc; - ++argv; - winToEmbedInto = (Window) strtol(argv[0], &endPtr, 10); - } + argc--, argv++; continue; default: @@ -2218,13 +2375,7 @@ main(int argc, char *argv[]ENVP_ARG) ShowToolbar(resource.toolBar); #endif -#if OPT_SESSION_MGT - if (resource.sessionMgt) { - TRACE(("Enabling session-management callbacks\n")); - XtAddCallback(toplevel, XtNdieCallback, die_callback, NULL); - XtAddCallback(toplevel, XtNsaveCallback, save_callback, NULL); - } -#endif + xtermOpenSession(); /* * Set title and icon name if not specified @@ -2252,33 +2403,36 @@ main(int argc, char *argv[]ENVP_ARG) } #if OPT_LUIT_PROG if (term->misc.callfilter) { - int u = (term->misc.use_encoding ? 2 : 0); - if (command_to_exec) { - int n; - char **c; - for (n = 0, c = command_to_exec; *c; n++, c++) ; - c = TypeMallocN(char *, (unsigned) (n + 3 + u)); - if (c == NULL) - SysError(ERROR_LUMALLOC); - memcpy(c + 2 + u, command_to_exec, (unsigned) (n + 1) * sizeof(char *)); - c[0] = term->misc.localefilter; - if (u) { - c[1] = "-encoding"; - c[2] = term->misc.locale_str; - } - c[1 + u] = "--"; - command_to_exec_with_luit = c; - } else { - static char *luit[6]; - luit[0] = term->misc.localefilter; - if (u) { - luit[1] = "-encoding"; - luit[2] = term->misc.locale_str; - luit[3] = NULL; - } else - luit[1] = NULL; - command_to_exec_with_luit = luit; + char **split_filter = x_splitargs(term->misc.localefilter); + unsigned count_split = x_countargv(split_filter); + unsigned count_exec = x_countargv(command_to_exec); + unsigned count_using = (term->misc.use_encoding ? 2 : 0); + + command_to_exec_with_luit = TypeCallocN(char *, + (count_split + + count_exec + + count_using + + 8)); + if (command_to_exec_with_luit == NULL) + SysError(ERROR_LUMALLOC); + + x_appendargv(command_to_exec_with_luit, split_filter); + if (count_using) { + char *encoding_opt[4]; + encoding_opt[0] = "-encoding"; + encoding_opt[1] = term->misc.locale_str; + encoding_opt[2] = 0; + x_appendargv(command_to_exec_with_luit, encoding_opt); + } + command_length_with_luit = x_countargv(command_to_exec_with_luit); + if (count_exec) { + char *delimiter[2]; + delimiter[0] = "--"; + delimiter[1] = 0; + x_appendargv(command_to_exec_with_luit, delimiter); + x_appendargv(command_to_exec_with_luit, command_to_exec); } + TRACE_ARGV("luit command", command_to_exec_with_luit); } #endif @@ -2396,21 +2550,7 @@ main(int argc, char *argv[]ENVP_ARG) } #endif - TRACE(("checking winToEmbedInto %#lx\n", winToEmbedInto)); - if (winToEmbedInto != None) { - XtRealizeWidget(toplevel); - /* - * This should probably query the tree or check the attributes of - * winToEmbedInto in order to verify that it exists, but I'm still not - * certain what is the best way to do it -GPS - */ - TRACE(("...reparenting toplevel %#lx into %#lx\n", - XtWindow(toplevel), - winToEmbedInto)); - XReparentWindow(XtDisplay(toplevel), - XtWindow(toplevel), - winToEmbedInto, 0, 0); - } + xtermEmbedWindow(winToEmbedInto); #if OPT_COLOR_RES TRACE(("checking reverseVideo before rv %s fg %s, bg %s\n", term->misc.re_verse0 ? "reverse" : "normal", @@ -4392,11 +4532,23 @@ spawnXTerm(XtermWidget xw) #endif /* OPT_PTY_HANDSHAKE */ signal(SIGHUP, SIG_DFL); + /* + * If we have an explicit program 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". + */ + unsetenv("SHELL"); if ((ptr = explicit_shname) == NULL) { - if (((ptr = x_getenv("SHELL")) == NULL) && - ((pw == NULL && (pw = getpwuid(screen->uid)) == NULL) || - *(ptr = pw->pw_shell) == 0)) { - ptr = x_strdup("/bin/sh"); + if ((ptr = x_getenv("SHELL")) == NULL) { + if ((pw == NULL && (pw = getpwuid(screen->uid)) == NULL) + || *(ptr = pw->pw_shell) == 0) { + ptr = x_strdup("/bin/sh"); + } else if (ptr != 0) { + xtermSetenv("SHELL", ptr); + } } } else { xtermSetenv("SHELL", explicit_shname); @@ -4415,7 +4567,7 @@ spawnXTerm(XtermWidget xw) if (command_to_exec_with_luit && command_to_exec) { xtermSetenv("XTERM_SHELL", xtermFindShell(*command_to_exec_with_luit, False)); - TRACE(("spawning command \"%s\"\n", *command_to_exec_with_luit)); + TRACE_ARGV("spawning luit command", command_to_exec_with_luit); execvp(*command_to_exec_with_luit, command_to_exec_with_luit); /* print error message on screen */ fprintf(stderr, "%s: Can't execvp %s: %s\n", @@ -4427,7 +4579,7 @@ spawnXTerm(XtermWidget xw) if (command_to_exec) { xtermSetenv("XTERM_SHELL", xtermFindShell(*command_to_exec, False)); - TRACE(("spawning command \"%s\"\n", *command_to_exec)); + TRACE_ARGV("spawning command", command_to_exec); execvp(*command_to_exec, command_to_exec); if (command_to_exec[1] == 0) execlp(ptr, shname, "-c", command_to_exec[0], (void *) 0); @@ -4444,8 +4596,9 @@ spawnXTerm(XtermWidget xw) (void) strcpy(shname_minus, "-"); (void) strcat(shname_minus, shname); #ifndef TERMIO_STRUCT - ldisc = XStrCmp("csh", shname + strlen(shname) - 3) == 0 ? - NTTYDISC : 0; + ldisc = (!XStrCmp("csh", shname + strlen(shname) - 3) + ? NTTYDISC + : 0); ioctl(0, TIOCSETD, (char *) &ldisc); #endif /* !TERMIO_STRUCT */ @@ -4457,12 +4610,15 @@ spawnXTerm(XtermWidget xw) #if OPT_LUIT_PROG if (command_to_exec_with_luit) { if (xw->misc.login_shell) { - int u; - u = (term->misc.use_encoding ? 2 : 0); - command_to_exec_with_luit[u + 1] = x_strdup("-argv0"); - command_to_exec_with_luit[u + 2] = shname_minus; - command_to_exec_with_luit[u + 3] = NULL; + char *params[4]; + params[0] = x_strdup("-argv0"); + params[1] = shname_minus; + params[2] = NULL; + x_appendargv(command_to_exec_with_luit + + command_length_with_luit, + params); } + TRACE_ARGV("final luit command", command_to_exec_with_luit); execvp(*command_to_exec_with_luit, command_to_exec_with_luit); /* Exec failed. */ fprintf(stderr, "%s: Can't execvp %s: %s\n", ProgramName, @@ -4790,9 +4946,7 @@ Exit(int n) /* XrmSetDatabase(dpy, 0); increases leaks ;-) */ XtCloseDisplay(dpy); XtDestroyApplicationContext(app_con); -#if OPT_SESSION_MGT - IceRemoveConnectionWatch(icewatch, NULL); -#endif + xtermCloseSession(); TRACE(("closed display\n")); } TRACE_CLOSE(); diff --git a/app/xterm/minstall.sh b/app/xterm/minstall.in index 8c9421955..e0f7f1641 100644 --- a/app/xterm/minstall.sh +++ b/app/xterm/minstall.in @@ -1,9 +1,9 @@ #!/bin/sh -# $XTermId: minstall.sh,v 1.20 2010/03/03 23:44:49 tom Exp $ +# $XTermId: minstall.in,v 1.5 2011/08/16 09:50:03 tom Exp $ # ----------------------------------------------------------------------------- # this file is part of xterm # -# Copyright 2001-2009,2010 by Thomas E. Dickey +# Copyright 2001-2010,2011 by Thomas E. Dickey # # All Rights Reserved # @@ -40,6 +40,10 @@ # $2 = manpage to install # $3 = final installed-path # $4 = app-defaults directory +# $5 = app-defaults class +# +# Other values correspond to definitions in xtermcfg.h, and cannot be directly +# modified using "make". They are substituted directly into this script. # # override locale... @@ -64,6 +68,7 @@ MINSTALL="$1" OLD_FILE="$2" END_FILE="$3" APPS_DIR="$4" +APP_TYPE="$5" suffix=`echo "$END_FILE" | sed -e 's%^.*\.%%'` NEW_FILE=temp$$ @@ -110,6 +115,9 @@ X_MANSECT=`man X 2>&1 | tr '\012' '\020' | sed -e 's/^[^0123456789]*\([^) ][^) ] test -z "$X_MANSECT" && X_MANSECT=$suffix sed -e 's%__vendorversion__%"X Window System"%' \ + -e s%__default_termname__%@default_TERM@% \ + -e s%__default_termid__%@default_termid@% \ + -e s%__default_class__%$APP_TYPE% \ -e s%__apploaddir__%$APPS_DIR% \ -e s%__mansuffix__%$MY_MANSECT%g \ -e s%__miscmansuffix__%$X_MANSECT%g \ diff --git a/app/xterm/misc.c b/app/xterm/misc.c index a4dfbaf71..7ae1d758f 100644 --- a/app/xterm/misc.c +++ b/app/xterm/misc.c @@ -1,4 +1,4 @@ -/* $XTermId: misc.c,v 1.530 2011/07/11 00:16:41 tom Exp $ */ +/* $XTermId: misc.c,v 1.539 2011/08/23 01:03:18 tom Exp $ */ /* * Copyright 1999-2010,2011 by Thomas E. Dickey @@ -4766,3 +4766,153 @@ getXtermWidget(Widget w) TRACE2(("getXtermWidget %p -> %p\n", w, xw)); return xw; } + +#if OPT_SESSION_MGT +static void +die_callback(Widget w GCC_UNUSED, + XtPointer client_data GCC_UNUSED, + XtPointer call_data GCC_UNUSED) +{ + Cleanup(0); +} + +static void +save_callback(Widget w GCC_UNUSED, + XtPointer client_data GCC_UNUSED, + XtPointer call_data) +{ + XtCheckpointToken token = (XtCheckpointToken) call_data; + /* we have nothing to save */ + token->save_success = True; +} + +static void +icewatch(IceConn iceConn, + IcePointer clientData GCC_UNUSED, + Bool opening, + IcePointer * watchData GCC_UNUSED) +{ + if (opening) { + ice_fd = IceConnectionNumber(iceConn); + TRACE(("got IceConnectionNumber %d\n", ice_fd)); + } else { + ice_fd = -1; + TRACE(("reset IceConnectionNumber\n")); + } +} + +void +xtermOpenSession(void) +{ + if (resource.sessionMgt) { + TRACE(("Enabling session-management callbacks\n")); + XtAddCallback(toplevel, XtNdieCallback, die_callback, NULL); + XtAddCallback(toplevel, XtNsaveCallback, save_callback, NULL); + } +} + +void +xtermCloseSession(void) +{ + IceRemoveConnectionWatch(icewatch, NULL); +} +#endif /* OPT_SESSION_MGT */ + +Widget +xtermOpenApplication(XtAppContext * app_context_return, + String my_class, + XrmOptionDescRec * options, + Cardinal num_options, + int *argc_in_out, + String * argv_in_out, + String * fallback_resources, + WidgetClass widget_class, + ArgList args, + Cardinal num_args) +{ + Widget result; + + XtSetErrorHandler(xt_error); +#if OPT_SESSION_MGT + result = XtOpenApplication(app_context_return, + my_class, + options, + num_options, + argc_in_out, + argv_in_out, + fallback_resources, + widget_class, + args, + num_args); + IceAddConnectionWatch(icewatch, NULL); +#else + result = XtAppInitialize(app_conp, + my_class, + optionDescList, + XtNumber(optionDescList), + &argc, argv, + fallback_resources, + NULL, 0); +#endif /* OPT_SESSION_MGT */ + XtSetErrorHandler((XtErrorHandler) 0); + + return result; +} + +static int x11_errors; + +static int +catch_x11_error(Display * display, XErrorEvent * error_event) +{ + (void) display; + (void) error_event; + ++x11_errors; + return 0; +} + +static Boolean +validWindow(Display * dpy, Window win, XWindowAttributes * attrs) +{ + Boolean result = False; + Status code; + + if (win != None) { + XErrorHandler save = XSetErrorHandler(catch_x11_error); + x11_errors = 0; + code = XGetWindowAttributes(dpy, win, attrs); + XSetErrorHandler(save); + result = (Boolean) ((code != 0) && !x11_errors); + if (result) { + TRACE_WIN_ATTRS(attrs); + } else { + fprintf(stderr, "%s: invalid window-id %ld\n", + ProgramName, (long) win); + } + } + return result; +} + +void +xtermEmbedWindow(Window winToEmbedInto) +{ + Display *dpy = XtDisplay(toplevel); + XWindowAttributes attrs; + + TRACE(("checking winToEmbedInto %#lx\n", winToEmbedInto)); + if (validWindow(dpy, winToEmbedInto, &attrs)) { + XtermWidget xw = term; + TScreen *screen = TScreenOf(xw); + + XtRealizeWidget(toplevel); + + TRACE(("...reparenting toplevel %#lx into %#lx\n", + XtWindow(toplevel), + winToEmbedInto)); + XReparentWindow(dpy, + XtWindow(toplevel), + winToEmbedInto, 0, 0); + + screen->embed_high = (Dimension) attrs.height; + screen->embed_wide = (Dimension) attrs.width; + } +} diff --git a/app/xterm/package/debian/changelog b/app/xterm/package/debian/changelog index d47ec3d75..aef201f67 100644 --- a/app/xterm/package/debian/changelog +++ b/app/xterm/package/debian/changelog @@ -1,3 +1,15 @@ +xterm-dev (273) unstable; urgency=low + + * Build-fixes/regressions from #272. + + -- Thomas E. Dickey <dickey@invisible-island.net> Thu, 25 Aug 2011 05:42:58 -0400 + +xterm-dev (272) unstable; urgency=low + + * Build-fix for termcap systems. + + -- Thomas E. Dickey <dickey@invisible-island.net> Fri, 15 Jul 2011 20:41:30 -0400 + xterm-dev (271) unstable; urgency=low * Ubuntu #756273 (accommodate function keys as popup-menu triggers) diff --git a/app/xterm/package/xterm.spec b/app/xterm/package/xterm.spec index 028f173c7..869a84851 100644 --- a/app/xterm/package/xterm.spec +++ b/app/xterm/package/xterm.spec @@ -1,7 +1,7 @@ -# $XTermId: xterm.spec,v 1.13 2011/07/14 22:15:37 tom Exp $ +# $XTermId: xterm.spec,v 1.15 2011/08/25 09:42:35 tom Exp $ Summary: A text-based Web browser Name: xterm-dev -Version: 271 +Version: 273 Release: 1 License: X11 Group: Applications/Internet diff --git a/app/xterm/ptyx.h b/app/xterm/ptyx.h index 6ff967d88..bd3819cdd 100644 --- a/app/xterm/ptyx.h +++ b/app/xterm/ptyx.h @@ -1,4 +1,4 @@ -/* $XTermId: ptyx.h,v 1.700 2011/07/12 08:33:58 tom Exp $ */ +/* $XTermId: ptyx.h,v 1.702 2011/08/23 01:02:53 tom Exp $ */ /* * Copyright 1999-2010,2011 by Thomas E. Dickey @@ -1844,6 +1844,9 @@ typedef struct { int copy_dest_x; int copy_dest_y; + Dimension embed_wide; + Dimension embed_high; + Boolean c132; /* allow change to 132 columns */ Boolean curses; /* kludge line wrap for more */ Boolean hp_ll_bc; /* kludge HP-style ll for xdb */ @@ -2661,6 +2664,10 @@ typedef struct Tek_Link #define TRACE_TRANS(name,w) /*nothing*/ #endif +#ifndef TRACE_WIN_ATTRS +#define TRACE_WIN_ATTRS(w) /*nothing*/ +#endif + #ifndef TRACE_WM_HINTS #define TRACE_WM_HINTS(w) /*nothing*/ #endif diff --git a/app/xterm/resize.man b/app/xterm/resize.man index 56d95d12d..76ec39675 100644 --- a/app/xterm/resize.man +++ b/app/xterm/resize.man @@ -1,4 +1,4 @@ -.\" $XTermId: resize.man,v 1.17 2009/04/11 17:43:39 tom Exp $ +.\" $XTermId: resize.man,v 1.19 2011/08/16 09:10:05 tom Exp $ .\" .\" updated by Thomas E. Dickey for XFree86, 1998-2006. .\" @@ -12,18 +12,18 @@ .el .ds '' '' .TH RESIZE 1 __vendorversion__ .SH NAME -resize \- set TERMCAP and terminal settings to current xterm window size +resize \- set environment and terminal settings to current xterm window size .SH SYNOPSIS .B resize [ \fB\-u\fP | \fB\-c\fP ] [ \fB\-s\fP [ \fIrow col\fP ] ] .SH DESCRIPTION .I Resize -prints a shell command for setting the TERM and TERMCAP environment variables +prints a shell command for setting the appropriate environment variables to indicate the current size of \fIxterm\fP window from which the command is run. For this output to take effect, \fIresize\fP must either be evaluated as part of the command line (usually done with a shell alias or function) or else redirected to a file which can then be read in. From the C shell (usually -known as \fI/bin/csh\fP), the following alias could be defined in the +known as \fI/bin/csh\fP), the following alias could be defined in the user's \fI.cshrc\fP: .sp .nf @@ -36,7 +36,7 @@ After resizing the window, the user would type: % rs .fi .sp -Users of versions of the Bourne shell (usually known as \fI/bin/sh\fP) that +Users of versions of the Bourne shell (usually known as \fI/bin/sh\fP) that don't have command functions will need to send the output to a temporary file and then read it back in with the \*(``.\*('' command: @@ -49,7 +49,7 @@ in with the \*(``.\*('' command: The following options may be used with \fIresize\fP: .TP 8 .B \-u -This option indicates that Bourne shell commands should be generated even if +This option indicates that Bourne shell commands should be generated even if the user's current shell isn't \fI/bin/sh\fP. .TP 8 .B \-c @@ -57,7 +57,7 @@ This option indicates that C shell commands should be generated even if the user's current shell isn't \fI/bin/csh\fP. .TP 8 .B \-s \fR[\fIrows columns\fP] -This option indicates that Sun console escape sequences will be used +This option indicates that Sun console escape sequences will be used instead of the VT100-style \fIxterm\fP escape codes. If \fIrows\fP and \fIcolumns\fP are given, \fIresize\fP will ask the \fIxterm\fP to resize @@ -79,6 +79,16 @@ for the base termcap entry to modify. .TP 15 ~/.cshrc user's alias for the command. +.SH ENVIRONMENT +.TP 15 +TERM +set to "__default_termname__" if not already set. +.TP 15 +TERMCAP +variable set on systems using termcap +.TP 15 +COLUMNS, LINES +variables set on systems using terminfo .SH "SEE ALSO" csh(1), tset(1), xterm(__mansuffix__) .SH AUTHORS diff --git a/app/xterm/termcap b/app/xterm/termcap index 91111ae50..1b6286126 100644 --- a/app/xterm/termcap +++ b/app/xterm/termcap @@ -1,11 +1,11 @@ -# $XTermId: termcap,v 1.78 2009/11/09 00:24:26 tom Exp $ +# $XTermId: termcap,v 1.79 2011/08/16 23:24:17 tom Exp $ # # These are termcap entries that correspond to xterm's terminfo file. # The file is formatted using ncurses' "tic -CNx", but is not mechanically # derived from the terminfo. # #------------------------------------------------------------------------------ -# Copyright 1996-2007,2009 by Thomas E. Dickey +# Copyright 1996-2009,2010 by Thomas E. Dickey # # All Rights Reserved # @@ -65,11 +65,12 @@ xb|xterm-basic|modern xterm common:\ :as=\E(0:bl=^G:cd=\E[J:ce=\E[K:cl=\E[H\E[2J:\ :cm=\E[%i%d;%dH:cs=\E[%i%d;%dr:ct=\E[3g:dc=\E[P:dl=\E[M:\ :ei=\E[4l:ho=\E[H:im=\E[4h:is=\E[!p\E[?3;4l\E[4l\E>:\ - :kD=\E[3~:kb=^H:ke=\E[?1l\E>:ks=\E[?1h\E=:le=^H:md=\E[1m:\ + :kD=\E[3~:ke=\E[?1l\E>:ks=\E[?1h\E=:le=^H:md=\E[1m:\ :me=\E[m:ml=\El:mr=\E[7m:mu=\Em:nd=\E[C:op=\E[39;49m:\ :rc=\E8:rs=\E[!p\E[?3;4l\E[4l\E>:sc=\E7:se=\E[27m:sf=^J:\ :so=\E[7m:sr=\EM:st=\EH:te=\E[?1049l:ti=\E[?1049h:\ - :ue=\E[24m:up=\E[A:us=\E[4m:ve=\E[?12l\E[?25h:vi=\E[?25l:vs=\E[?12;25h: + :ue=\E[24m:up=\E[A:us=\E[4m:ve=\E[?12l\E[?25h:vi=\E[?25l:\ + :vs=\E[?12;25h:tc=xterm+kbs: # The xterm-new description has all of the features, but is not completely # compatible with vt220. If you are using a Sun or PC keyboard, set the @@ -146,13 +147,13 @@ x8|xterm-8bit|xterm terminal emulator 8-bit controls (X Window System):\ :is=\E[62"p\E G\233m\233?7h\E>\E7\233?1;3;4;6l\2334l\233r\E8:\ :k1=\23311~:k2=\23312~:k3=\23313~:k4=\23314~:k5=\23315~:\ :k6=\23317~:k7=\23318~:k8=\23319~:k9=\23320~:kD=\2333~:\ - :kI=\2332~:kN=\2336~:kP=\2335~:kb=^H:kd=\217B:\ - :ke=\233?1l\E>:kh=\2331~:kl=\217D:kr=\217C:ks=\233?1h\E=:\ - :ku=\217A:le=^H:mb=\2335m:md=\2331m:me=\233m:mr=\2337m:\ - :nd=\233C:rc=\E8:sc=\E7:se=\23327m:sf=^J:so=\2337m:sr=\215:\ - :st=\210:ta=^I:te=\233?1049l:ti=\233?1049h:ue=\23324m:\ - :up=\233A:us=\2334m:vb=\233?5h\233?5l:ve=\233?25l\233?25h:\ - :vs=\233?12;25h:vi=\233?25l: + :kI=\2332~:kN=\2336~:kP=\2335~:kd=\217B:ke=\233?1l\E>:\ + :kh=\2331~:kl=\217D:kr=\217C:ks=\233?1h\E=:ku=\217A:le=^H:\ + :mb=\2335m:md=\2331m:me=\233m:mr=\2337m:nd=\233C:rc=\E8:\ + :sc=\E7:se=\23327m:sf=^J:so=\2337m:sr=\215:st=\210:ta=^I:\ + :te=\233?1049l:ti=\233?1049h:ue=\23324m:up=\233A:\ + :us=\2334m:vb=\233?5h\233?5l:ve=\233?25l\233?25h:\ + :vi=\233?25l:vs=\233?12;25h:tc=xterm+kbs: # hp|xterm-hp|xterm with hpterm function keys:\ :@7=\EF:k1=\Ep:k2=\Eq:k3=\Er:k4=\Es:k5=\Et:k6=\Eu:k7=\Ev:\ @@ -171,8 +172,8 @@ v5|xterm-vt52|xterm emulating vt52:\ :bs:\ :co#80:it#8:li#24:\ :ae=\EG:as=\EF:bl=^G:cd=\EJ:ce=\EK:cl=\EH\EJ:cm=\EY%+ %+ :\ - :cr=^M:do=\EB:ho=\EH:kb=^H:kd=\EB:kl=\ED:kr=\EC:ku=\EA:\ - :le=\ED:nd=\EC:nw=^M^J:sf=^J:sr=\EI:ta=^I:up=\EA: + :cr=^M:do=\EB:ho=\EH:kd=\EB:kl=\ED:kr=\EC:ku=\EA:le=\ED:\ + :nd=\EC:nw=^M^J:sf=^J:sr=\EI:ta=^I:up=\EA:tc=xterm+kbs: # xs|xterm-sun|xterm with Sun functionkeys:\ :%1=\E[196z:&8=\E[195z:@0=\E[200z:@5=\E[197z:@7=\E[220z:\ @@ -202,12 +203,12 @@ r6|xterm-r6|xterm-old|X11R6 xterm:\ :is=\E[m\E[?7h\E[4l\E>\E7\E[r\E[?1;3;4;6l\E8:\ :k1=\E[11~:k2=\E[12~:k3=\E[13~:k4=\E[14~:k5=\E[15~:\ :k6=\E[17~:k7=\E[18~:k8=\E[19~:k9=\E[20~:k;=\E[21~:\ - :kD=\E[3~:kI=\E[2~:kN=\E[6~:kP=\E[5~:kb=^H:kd=\EOB:\ - :ke=\E[?1l\E>:kh=\E[1~:kl=\EOD:kr=\EOC:ks=\E[?1h\E=:\ - :ku=\EOA:md=\E[1m:me=\E[m:ml=\El:mr=\E[7m:mu=\Em:nd=\E[C:\ - :rc=\E8:rs=\E[m\E[?7h\E[4l\E>\E7\E[r\E[?1;3;4;6l\E8:\ - :sc=\E7:se=\E[m:sf=^J:so=\E[7m:sr=\EM:te=\E[2J\E[?47l\E8:\ - :ti=\E7\E[?47h:ue=\E[m:up=\E[A:us=\E[4m: + :kD=\E[3~:kI=\E[2~:kN=\E[6~:kP=\E[5~:kd=\EOB:ke=\E[?1l\E>:\ + :kh=\E[1~:kl=\EOD:kr=\EOC:ks=\E[?1h\E=:ku=\EOA:md=\E[1m:\ + :me=\E[m:ml=\El:mr=\E[7m:mu=\Em:nd=\E[C:rc=\E8:\ + :rs=\E[m\E[?7h\E[4l\E>\E7\E[r\E[?1;3;4;6l\E8:sc=\E7:\ + :se=\E[m:sf=^J:so=\E[7m:sr=\EM:te=\E[2J\E[?47l\E8:\ + :ti=\E7\E[?47h:ue=\E[m:up=\E[A:us=\E[4m:tc=xterm+kbs: # # Compatible with the R5 xterm r5|xterm-r5|X11R5 xterm X11R5:\ @@ -218,12 +219,12 @@ r5|xterm-r5|X11R5 xterm X11R5:\ :cm=\E[%i%d;%dH:cs=\E[%i%d;%dr:ct=\E[3g:dc=\E[P:dl=\E[M:\ :ei=\E[4l:ho=\E[H:im=\E[4h:\ :is=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;3;4;6l\E[4l:\ - :k1=\E[11~:k2=\E[12~:k3=\E[13~:k4=\E[14~:kb=^H:kd=\EOB:\ + :k1=\E[11~:k2=\E[12~:k3=\E[13~:k4=\E[14~:kd=\EOB:\ :ke=\E[?1l\E>:kh=\E[1~:kl=\EOD:kr=\EOC:ks=\E[?1h\E=:\ :ku=\EOA:md=\E[1m:me=\E[m:mr=\E[7m:nd=\E[C:rc=\E8:\ :rs=\E>\E[?1;3;4;5;6l\E[4l\E[?7h\E[m\E[r\E[2J\E[H:\ :sc=\E7:se=\E[m:sf=^J:so=\E[7m:sr=\EM:te=\E[2J\E[?47l\E8:\ - :ti=\E7\E[?47h:ue=\E[m:up=\E[A:us=\E[4m: + :ti=\E7\E[?47h:ue=\E[m:up=\E[A:us=\E[4m:tc=xterm+kbs: # # Customization begins here. x0|xterm-xfree86|xterm terminal emulator (XFree86):\ @@ -235,3 +236,8 @@ x0|xterm-xfree86|xterm terminal emulator (XFree86):\ v0|xterm|X11 terminal emulator:\ :tc=xterm-new: # :tc=xterm-r6: + +# This fragment is for people who cannot agree on what the backspace key +# should send. +xterm+kbs|fragment for backspace key:\ + :kb=^H: diff --git a/app/xterm/terminfo b/app/xterm/terminfo index 5d1b297cf..9c365e6e9 100644 --- a/app/xterm/terminfo +++ b/app/xterm/terminfo @@ -1,4 +1,4 @@ -# $XTermId: terminfo,v 1.156 2011/07/04 11:11:43 tom Exp $ +# $XTermId: terminfo,v 1.158 2011/08/16 22:27:46 tom Exp $ # # $XFree86: xc/programs/xterm/terminfo,v 3.59 2006/02/13 01:14:59 dickey Exp $ # @@ -939,7 +939,6 @@ xterm-basic|modern xterm terminal emulator - common, ind=^J, invis=\E[8m, is2=\E[!p\E[?3;4l\E[4l\E>, - kbs=^H, kmous=\E[M, mc0=\E[i, mc4=\E[4i, @@ -981,6 +980,7 @@ xterm-basic|modern xterm terminal emulator - common, u8=\E[?1;2c, u9=\E[c, vpa=\E[%i%p1%dd, + use=xterm+kbs, # # The xterm-new description has all of the features, but is not completely # compatible with vt220. If you are using a Sun or PC keyboard, set the @@ -1054,7 +1054,6 @@ xterm-vt52|xterm emulating dec vt52, home=\EH, ht=^I, ind=^J, - kbs=^H, kcub1=\ED, kcud1=\EB, kcuf1=\EC, @@ -1063,6 +1062,7 @@ xterm-vt52|xterm emulating dec vt52, ri=\EI, rmacs=\EG, smacs=\EF, + use=xterm+kbs, # # Sun does not number the function keys this way in their sparse termcap; their # terminal descriptions ignore the keypads. kb(7M) states that there are codes @@ -1419,13 +1419,14 @@ xterm-16color|xterm with 16 colors, setaf=\E[%?%p1%{8}%<%t%p1%{30}%+%e%p1%{82}%+%;%dm, setb=%p1%{8}%/%{6}%*%{4}%+\E[%d%p1%{8}%m%Pa%?%ga%{1}%=%t4%e%ga%{3}%=%t6%e%ga%{4}%=%t1%e%ga%{6}%=%t3%e%ga%d%;m, setf=%p1%{8}%/%{6}%*%{3}%+\E[%d%p1%{8}%m%Pa%?%ga%{1}%=%t4%e%ga%{3}%=%t6%e%ga%{4}%=%t1%e%ga%{6}%=%t3%e%ga%d%;m, + use=xterm+256color, use=xterm-new, # # This uses RGB values 0..1000 # # 256 colors should give 65536 pairs, but terminfo stores numbers in a signed # short. Most people will not notice problems with only 32767 pairs. -xterm-256color|xterm with 256 colors, +xterm+256color|xterm 256-color feature, ccc, colors#256, pairs#32767, @@ -1434,6 +1435,8 @@ xterm-256color|xterm with 256 colors, setaf=\E[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;m, setb@, setf@, +xterm-256color|xterm with 256 colors, + use=xterm+256color, use=xterm-new, xterm-88color|xterm with 88 colors, colors#88, @@ -1508,7 +1511,6 @@ xterm-8bit|xterm terminal emulator with 8-bit controls (X Window System), ka3=\217u, kb2=\217y, kbeg=\217E, - kbs=^H, kc1=\217q, kc3=\217s, kcbt=\233Z, @@ -1582,6 +1584,7 @@ xterm-8bit|xterm terminal emulator with 8-bit controls (X Window System), u8=\233[?1;2c, u9=\E[c, vpa=\233%i%p1%dd, + use=xterm+kbs, # xterm-xf86-v44|xterm terminal emulator (XFree86 4.4 Window System), OTbs, @@ -1649,7 +1652,6 @@ xterm-xf86-v44|xterm terminal emulator (XFree86 4.4 Window System), kPRV=\E[5;2~, kRIT=\E[1;2C, kb2=\EOE, - kbs=^H, kcbt=\E[Z, kcub1=\EOD, kcud1=\EOB, @@ -1754,6 +1756,7 @@ xterm-xf86-v44|xterm terminal emulator (XFree86 4.4 Window System), kb1=\EOt, kb3=\EOv, kc2=\EOr, + use=xterm+kbs, xterm-xfree86|xterm terminal emulator (XFree86 4.4 Window System), use=xterm-xf86-v44, # @@ -1802,7 +1805,6 @@ xterm-r6|xterm-old|xterm X11R6 version, il1=\E[L, ind=^J, is2=\E[m\E[?7h\E[4l\E>\E7\E[r\E[?1;3;4;6l\E8, - kbs=^H, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, @@ -1854,6 +1856,7 @@ xterm-r6|xterm-old|xterm X11R6 version, u7=\E[6n, u8=\E[?1;2c, u9=\E[c, + use=xterm+kbs, use=xterm+decedit, # # Compatible with the R5 xterm, with the following changes: @@ -1905,7 +1908,6 @@ xterm-r5|xterm R5 version, il=\E[%p1%dL, il1=\E[L, ind=^J, - kbs=^H, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, @@ -1953,6 +1955,7 @@ xterm-r5|xterm R5 version, u7=\E[6n, u8=\E[?1;2c, u9=\E[c, + use=xterm+kbs, # # # Customization begins here. @@ -1963,3 +1966,8 @@ xterm-r5|xterm R5 version, xterm|X11 terminal emulator, use=xterm-new, # use=xterm-r6, + +# This fragment is for people who cannot agree on what the backspace key +# should send. +xterm+kbs|fragment for backspace key, + kbs=^H, diff --git a/app/xterm/trace.c b/app/xterm/trace.c index 885578c41..23f3c13d0 100644 --- a/app/xterm/trace.c +++ b/app/xterm/trace.c @@ -1,4 +1,4 @@ -/* $XTermId: trace.c,v 1.125 2011/07/12 09:31:05 tom Exp $ */ +/* $XTermId: trace.c,v 1.129 2011/08/22 09:56:16 tom Exp $ */ /* * Copyright 1997-2010,2011 by Thomas E. Dickey @@ -555,6 +555,83 @@ TraceSizeHints(XSizeHints * hints) TRACE((" gravity %d\n", hints->win_gravity)); } +static void +TraceEventMask(const char *tag, long mask) +{ +#define DATA(name) { name##Mask, #name } + /* *INDENT-OFF* */ + static struct { + long mask; + const char *name; + } table[] = { + DATA(KeyPress), + DATA(KeyRelease), + DATA(ButtonPress), + DATA(ButtonRelease), + DATA(EnterWindow), + DATA(LeaveWindow), + DATA(PointerMotion), + DATA(PointerMotionHint), + DATA(Button1Motion), + DATA(Button2Motion), + DATA(Button3Motion), + DATA(Button4Motion), + DATA(Button5Motion), + DATA(ButtonMotion), + DATA(KeymapState), + DATA(Exposure), + DATA(VisibilityChange), + DATA(StructureNotify), + DATA(ResizeRedirect), + DATA(SubstructureNotify), + DATA(SubstructureRedirect), + DATA(FocusChange), + DATA(PropertyChange), + DATA(ColormapChange), + DATA(OwnerGrabButton), + }; +#undef DATA + Cardinal n; + /* *INDENT-ON* */ + + for (n = 0; n < XtNumber(table); ++n) { + if (table[n].mask & mask) { + TRACE(("%s %s\n", tag, table[n].name)); + } + } +} + +void +TraceWindowAttributes(XWindowAttributes * attrs) +{ + TRACE(("window attributes:\n")); + TRACE((" position %d,%d\n", attrs->y, attrs->x)); + TRACE((" size %dx%d\n", attrs->height, attrs->width)); + TRACE((" border %d\n", attrs->border_width)); + TRACE((" depth %d\n", attrs->depth)); + TRACE((" bit_gravity %d\n", attrs->bit_gravity)); + TRACE((" win_gravity %d\n", attrs->win_gravity)); + TRACE((" root %#lx\n", (long) attrs->root)); + TRACE((" class %s\n", ((attrs->class == InputOutput) + ? "InputOutput" + : ((attrs->class == InputOnly) + ? "InputOnly" + : "unknown")))); + TRACE((" map_state %s\n", ((attrs->map_state == IsUnmapped) + ? "IsUnmapped" + : ((attrs->map_state == IsUnviewable) + ? "IsUnviewable" + : ((attrs->map_state == IsViewable) + ? "IsViewable" + : "unknown"))))); + TRACE((" all_events\n")); + TraceEventMask(" ", attrs->all_event_masks); + TRACE((" your_events\n")); + TraceEventMask(" ", attrs->your_event_mask); + TRACE((" no_propagate\n")); + TraceEventMask(" ", attrs->do_not_propagate_mask); +} + void TraceWMSizeHints(XtermWidget xw) { @@ -603,17 +680,20 @@ TraceTranslations(const char *name, Widget w) XSetErrorHandler(save); } -int +XtGeometryResult TraceResizeRequest(const char *fn, int ln, Widget w, unsigned reqwide, unsigned reqhigh, Dimension * gotwide, Dimension * gothigh) { - int rc; + XtGeometryResult rc; TRACE(("%s@%d ResizeRequest %ux%u\n", fn, ln, reqhigh, reqwide)); - rc = XtMakeResizeRequest((Widget) w, reqwide, reqhigh, gotwide, gothigh); + rc = XtMakeResizeRequest((Widget) w, + (Dimension) reqwide, + (Dimension) reqhigh, + gotwide, gothigh); TRACE(("... ResizeRequest -> ")); if (gothigh && gotwide) TRACE(("%dx%d ", *gothigh, *gotwide)); diff --git a/app/xterm/trace.h b/app/xterm/trace.h index 5b5727511..d6ae6b81f 100644 --- a/app/xterm/trace.h +++ b/app/xterm/trace.h @@ -1,8 +1,8 @@ -/* $XTermId: trace.h,v 1.57 2011/07/08 10:51:08 tom Exp $ */ +/* $XTermId: trace.h,v 1.60 2011/08/21 23:44:01 tom Exp $ */ /* * - * Copyright 1997-2009,2010 by Thomas E. Dickey + * Copyright 1997-2010,2011 by Thomas E. Dickey * * All Rights Reserved * @@ -37,6 +37,7 @@ */ #ifndef included_trace_h #define included_trace_h +/* *INDENT-OFF* */ #include <xterm.h> @@ -93,6 +94,10 @@ extern void TraceTranslations(const char *, Widget); #undef TRACE_TRANS #define TRACE_TRANS(name,w) TraceTranslations(name,w) +extern void TraceWindowAttributes(XWindowAttributes *); +#undef TRACE_WIN_ATTRS +#define TRACE_WIN_ATTRS(a) TraceWindowAttributes(a) + extern void TraceWMSizeHints(XtermWidget); #undef TRACE_WM_HINTS #define TRACE_WM_HINTS(w) TraceWMSizeHints(w) @@ -101,7 +106,7 @@ extern void TraceXtermResources(void); #undef TRACE_XRES #define TRACE_XRES() TraceXtermResources() -extern int TraceResizeRequest(const char * /* fn */, int /* ln */, Widget /* w */, unsigned /* reqwide */, unsigned /* reqhigh */, Dimension * /* gotwide */, Dimension * /* gothigh */); +extern XtGeometryResult TraceResizeRequest(const char * /* fn */, int /* ln */, Widget /* w */, unsigned /* reqwide */, unsigned /* reqhigh */, Dimension * /* gotwide */, Dimension * /* gothigh */); #undef REQ_RESIZE #define REQ_RESIZE(w, reqwide, reqhigh, gotwide, gothigh) \ TraceResizeRequest(__FILE__, __LINE__, w, \ @@ -153,5 +158,6 @@ extern int TraceResizeRequest(const char * /* fn */, int /* ln */, Widget /* w #define init_Tres(offset) fill_Tres(wnew, request, offset) #endif +/* *INDENT-ON* */ #endif /* included_trace_h */ diff --git a/app/xterm/uxterm.man b/app/xterm/uxterm.man index c9e4cf084..3b5cd33fe 100644 --- a/app/xterm/uxterm.man +++ b/app/xterm/uxterm.man @@ -1,4 +1,4 @@ -.\" $XTermId: uxterm.man,v 1.3 2007/12/30 15:55:21 tom Exp $ +.\" $XTermId: uxterm.man,v 1.4 2011/08/16 09:44:32 tom Exp $ .\" .\" Copyright 2001, 2004 Branden Robinson .\" @@ -31,7 +31,7 @@ uxterm \- X terminal emulator for Unicode (UTF-8) environments .B uxterm is a wrapper around the .BR xterm(1) -program that invokes the latter program with the \(oqUXTerm\(cq X resource +program that invokes the latter program with the \(oqU__default_class__\(cq X resource class set. All arguments to .B uxterm @@ -71,7 +71,7 @@ uses by default. To change the fonts .B uxterm uses, edit the -.I __apploaddir__/UXTerm +.I __apploaddir__/U__default_class__ file. .PP A similar wrapper, diff --git a/app/xterm/version.h b/app/xterm/version.h index 5f12d3de2..b49726f76 100644 --- a/app/xterm/version.h +++ b/app/xterm/version.h @@ -1,5 +1,5 @@ /* - * $XTermId: version.h,v 1.329 2011/04/29 23:01:38 tom Exp $ + * $XTermId: version.h,v 1.331 2011/08/25 09:05:00 tom Exp $ * ---------------------------------------------------------------------------- * this file is part of xterm * @@ -39,7 +39,7 @@ * version of X to which this version of xterm has been built. The number in * parentheses is my patch number (Thomas E. Dickey). */ -#define XTERM_PATCH 271 +#define XTERM_PATCH 273 #ifndef __vendorversion__ #define __vendorversion__ "XTerm/OpenBSD" diff --git a/app/xterm/xstrings.c b/app/xterm/xstrings.c index 142f27631..a2be441b1 100644 --- a/app/xterm/xstrings.c +++ b/app/xterm/xstrings.c @@ -1,8 +1,8 @@ -/* $XTermId: xstrings.c,v 1.37 2010/04/04 22:34:17 tom Exp $ */ +/* $XTermId: xstrings.c,v 1.40 2011/08/25 08:55:55 tom Exp $ */ /************************************************************ -Copyright 2000-2009,2010 by Thomas E. Dickey +Copyright 2000-2010,2011 by Thomas E. Dickey All Rights Reserved @@ -41,6 +41,15 @@ authorization. #include <xstrings.h> +void +x_appendargv(char **target, char **source) +{ + if (target && source) { + target += x_countargv(target); + while ((*target++ = *source++) != 0) ; + } +} + char * x_basename(char *name) { @@ -54,6 +63,18 @@ x_basename(char *name) return (cp ? cp + 1 : name); } +unsigned +x_countargv(char **argv) +{ + unsigned result = 0; + if (argv) { + while (*argv++) { + ++result; + } + } + return result; +} + /* * Decode a hexadecimal string, returning the decoded string. * On return, 'next' points to the first character not part of the input. @@ -164,6 +185,54 @@ x_skip_nonblanks(String s) return s; } +/* + * Split a command-string into an argv[]-style array. + */ +char ** +x_splitargs(const char *command) +{ + char **result = 0; + + if (command != 0) { + char *blob = x_strdup(command); + size_t count; + size_t n; + int state; + int pass; + + for (pass = 0; pass < 2; ++pass) { + for (n = count = 0, state = 0; command[n] != '\0'; ++n) { + switch (state) { + case 0: + if (!isspace(command[n])) { + state = 1; + if (pass) + result[count] = blob + n; + ++count; + } else { + blob[n] = '\0'; + } + break; + case 1: + if (isspace(command[n])) { + blob[n] = '\0'; + state = 0; + } + break; + } + } + if (!pass) { + result = TypeCallocN(char *, count + 1); + if (!result) + break; + } + } + } else { + result = TypeCalloc(char *); + } + return result; +} + int x_strcasecmp(const char *s1, const char *s2) { @@ -200,7 +269,7 @@ x_strdup(const char *s) char *result = 0; if (s != 0) { - char *t = CastMallocN(char, strlen(s)); + char *t = CastMallocN(char, strlen(s) + 1); if (t != 0) { strcpy(t, s); } diff --git a/app/xterm/xstrings.h b/app/xterm/xstrings.h index 569f71012..b1543ae0a 100644 --- a/app/xterm/xstrings.h +++ b/app/xterm/xstrings.h @@ -1,8 +1,8 @@ -/* $XTermId: xstrings.h,v 1.19 2009/12/06 15:50:18 tom Exp $ */ +/* $XTermId: xstrings.h,v 1.21 2011/08/21 17:23:33 tom Exp $ */ /************************************************************ -Copyright 2000-2008,2009 by Thomas E. Dickey +Copyright 2000-2009,2011 by Thomas E. Dickey All Rights Reserved @@ -34,12 +34,14 @@ authorization. #ifndef included_xstrings_h #define included_xstrings_h 1 +/* *INDENT-OFF* */ #include <X11/Intrinsic.h> extern String x_nonempty(String /* s */); extern String x_skip_blanks(String /* s */); extern String x_skip_nonblanks(String /* s */); +extern char **x_splitargs(const char * /* command */); extern char *x_basename(char * /* name */); extern char *x_decode_hex(const char * /* source */, const char ** /* next */); extern char *x_encode_hex(const char * /* source */); @@ -51,5 +53,9 @@ extern char x_toupper(int /* ch */); extern int x_hex2int(int /* ch */); extern int x_strcasecmp(const char * /* s1 */, const char * /* s2 */); extern int x_strncasecmp(const char * /* s1 */, const char * /* s2 */, unsigned /* n */); +extern unsigned x_countargv(char ** /* argv */); +extern void x_appendargv(char ** /* target */, char ** /* source */); + +/* *INDENT-ON* */ #endif /* included_xstrings_h */ diff --git a/app/xterm/xterm.h b/app/xterm/xterm.h index 0224de18f..f118616f7 100644 --- a/app/xterm/xterm.h +++ b/app/xterm/xterm.h @@ -1,4 +1,4 @@ -/* $XTermId: xterm.h,v 1.654 2011/07/12 08:39:49 tom Exp $ */ +/* $XTermId: xterm.h,v 1.656 2011/08/20 00:20:20 tom Exp $ */ /************************************************************ @@ -955,6 +955,7 @@ extern void show_8bit_control (Bool /* value */); extern Bool AllocateTermColor(XtermWidget, ScrnColors *, int, const char *, Bool); extern Cursor make_colored_cursor (unsigned /* cursorindex */, unsigned long /* fg */, unsigned long /* bg */); extern OptionHelp * sortedOpts(OptionHelp *, XrmOptionDescRec *, Cardinal); +extern Widget xtermOpenApplication(XtAppContext * /* app_context_return */, String /* application_class */, XrmOptionDescRec */* options */, Cardinal /* num_options */, int * /* argc_in_out */, String */* argv_in_out */, String * /* fallback_resources */, WidgetClass /* widget_class */, ArgList /* args */, Cardinal /* num_args */); extern Window WMFrameWindow(XtermWidget /* termw */); extern XrmOptionDescRec * sortedOptDescs(XrmOptionDescRec *, Cardinal); extern XtermWidget getXtermWidget(Widget /* w */); @@ -1011,6 +1012,7 @@ extern void xt_error (String /* message */); extern void xtermBell(XtermWidget /* xw */, int /* which */, int /* percent */); extern void xtermCopyEnv (char ** /* oldenv */); extern void xtermDisplayCursor (XtermWidget /* xw */); +extern void xtermEmbedWindow(Window /* winToEmbedInfo */); extern void xtermSetenv (const char * /* var */, const char * /* value */); extern void xtermShowPointer (XtermWidget /* xw */, Bool /* enable */); @@ -1040,6 +1042,14 @@ extern void xtermClearLEDs (TScreen * /* screen */); #define GetScrollLock(screen) /* nothing */ #endif +#if OPT_SESSION_MGT +extern void xtermCloseSession (void); +extern void xtermOpenSession (void); +#else +#define xtermCloseSession() /* nothing */ +#define xtermOpenSession() /* nothing */ +#endif + #if OPT_WIDE_CHARS extern Bool xtermEnvUTF8(void); #else diff --git a/app/xterm/xterm.log.html b/app/xterm/xterm.log.html index 9c3b29bf3..925b87a64 100644 --- a/app/xterm/xterm.log.html +++ b/app/xterm/xterm.log.html @@ -31,7 +31,7 @@ * sale, use or other dealings in this Software without prior written * * authorization. * ***************************************************************************** - $XTermId: xterm.log.html,v 1.1063 2011/07/15 00:51:57 tom Exp $ + $XTermId: xterm.log.html,v 1.1081 2011/08/25 09:29:41 tom Exp $ --> <HTML> <HEAD> @@ -56,6 +56,8 @@ Most of these are summarized in the XFree86 CHANGELOG is the latest version of this file. <UL> +<LI><A HREF="#xterm_273">Patch #273 - 2011/08/25</A> +<LI><A HREF="#xterm_272">Patch #272 - 2011/08/24</A> <LI><A HREF="#xterm_271">Patch #271 - 2011/07/14</A> <LI><A HREF="#xterm_270">Patch #270 - 2011/04/26</A> <LI><A HREF="#xterm_269">Patch #269 - 2011/02/19</A> @@ -330,6 +332,78 @@ is the latest version of this file. <LI><A HREF="#xterm_01">Patch #1 - 1996/1/6</A> </UL> +<H1><A NAME="xterm_273">Patch #273 - 2011/08/25</A></H1> +<ul> + <li>build-fix for out-of-tree "make docs" rule. + + <li>correct a typo in <code>x_strdup</code>, from + <a href="#xterm_198">patch #198</a> + changes. + + <li>correct initialization for <code>-e</code> option, broken in + <a href="#xterm_272">patch #272</a> + changes (report by Gabriele Balducci). + + <li>build-fix for out-of-tree builds to address <code>minstall</code> + script changes in + <a href="#xterm_272">patch #272</a> + (patch by Thierry Reding). +</ul> + +<H1><A NAME="xterm_272">Patch #272 - 2011/08/24</A></H1> +<ul> + <li>document limitation of <code>Gtk</code> in connection with xterm's + <code>-into</code> option, in the manpage (Ubuntu #806969). + + <li>improve <code>-into</code> by checking for and using the size + of the window within which xterm is embedded, overriding other + clues. + + <li>modify logic for <code>localeFilter</code> resource to allow that + to include command-line options of luit. + + <li>improve <code>-into</code> by checking for invalid window-id, + and allowing hexadecimal/decimal/octal values. + + <li>improve <code>keepSelection</code>, adding the case where the + highlighting is cleared, + overlooked in <a href="#xterm_230">patch #230</a> + (patch by Marco Peereboom). + + <li>improve command-line parsing to make abbreviate options work + consistently across xterm-specific versus standard X toolkit + options, and report cases where an abbreviated option happens + to be ambiguous. In particular, <code>-d</code> now works as + an abbreviation for <code>-display</code>. + + <li>fix regression in command-line parsing introduced in + <a href="#xterm_271">patch #271</a> changes + for Debian #629358, + (Debian #637910). + + <li>split-out new termcap/terminfo building block + <code>xterm+kbs</code> for configurability. + + <li>modify <code>terminfo</code> file to reflect changes in ncurses + for <code>xterm-16color</code> and <code>xterm-256color</code>. + + <li>modify <code>minstall.sh</code>, etc., to reflect the default + default class, + <code>$TERM</code> and + <code>decTerminalID</code> values. + + <li>reword <code>resize</code> manpage to reflect the fact that + <code>$TERMCAP</code> is not set on all systems (patch by + Alan Coopersmith). + + <li>work around combined Xaw6/Xaw7 package in DragonFlyBSD which + omits the usual symbolic link to the preferred library name. + + <li>further improve build-fix for termcap systems by checking for + some which are only partial implementations, e.g., termcap + 2.08 in CentOS 5.2 +</ul> + <H1><A NAME="xterm_271">Patch #271 - 2011/07/14</A></H1> <ul> <li>omit permissions adjustments to pty on exit except for diff --git a/app/xterm/xterm.man b/app/xterm/xterm.man index 7b1ec9aed..1f8e2ce49 100644 --- a/app/xterm/xterm.man +++ b/app/xterm/xterm.man @@ -1,5 +1,5 @@ '\" t -.\" $XTermId: xterm.man,v 1.501 2011/07/13 08:59:37 tom Exp $ +.\" $XTermId: xterm.man,v 1.507 2011/08/23 00:50:07 tom Exp $ .\" .\" Copyright 1996-2010,2011 by Thomas E. Dickey .\" @@ -124,7 +124,7 @@ The VT220 emulation does not support soft fonts, it is otherwise complete. entries that work with .I xterm include -an optional platform-specific entry, +an optional platform-specific entry (\*(``__default_termname__\*(''), \*(``xterm,\*('' \*(``vt102,\*('' \*(``vt100,\*('' @@ -253,10 +253,9 @@ or a \*(``\fB+\fR\fIoption\fP\*('' turns the feature on or off, since some features historically have been one or the other. \fIXterm\fP generates a concise help message (multiple options per line) when an unknown option is used, e.g., -.RS - \fBxterm \-z\fP -.RE -.IP +.NS +\fBxterm \-z\fP +.NE If the logic for a particular option such as logging is not compiled into \fIxterm\fP, the help text for that option also is not displayed by the \fB\-help\fP option. @@ -382,8 +381,8 @@ Reset the \fBcjkWidth\fP resource. .TP 8 .BI \-class " string" This option allows you to override \fIxterm\fP's resource class. -Normally it is \*(``XTerm\*('', but -can be set to another class such as \*(``UXTerm\*('' to override selected resources. +Normally it is \*(``__default_class__\*('', but +can be set to another class such as \*(``U__default_class__\*('' to override selected resources. .TP 8 .B "\-cm" This option disables recognition of ANSI color-change escape sequences. @@ -601,9 +600,15 @@ environment variable. Turn off the \fBuseInsertMode\fP resource. .TP 8 .BI \-into " windowId" -Given an X window identifier (a decimal integer), +Given an X window identifier (an integer, which can be hexadecimal, +octal or decimal according to whether it begins with "0x", "0" or neither), \fIxterm\fP will reparent its top-level shell widget to that window. This is used to embed \fIxterm\fP within other applications. +.PP +For instance, there are scripts for Tcl/Tk and Gtk which can be used +to demonstrate the feature. +When using Gtk, there is a limitation of that toolkit which requires +that \fIxterm\fP's \fBallowSendEvents\fP resource is enabled. .TP 8 .B \-j This option indicates that \fIxterm\fP should do jump scrolling. @@ -721,10 +726,9 @@ result of ~/.profile might interfere with that. .IP If you do want the effect of \fB\-ls\fP and \fB\-e\fP simultaneously, you may get away with something like -.RS 15 +.NS 15 xterm \-e /bin/bash \-l \-c "my command here" -.RE -.IP +.NE Finally, \fB\-ls\fP is not completely ignored, because \fIxterm\ \-ls\ \-e\fP does write a \fI/etc/wtmp\fP entry (if configured to do so), @@ -959,7 +963,7 @@ It also specifies the emulation level, used to determine the type of response to a DA control sequence. Valid values include vt52, vt100, vt101, vt102, and vt220 (the \*(``vt\*('' is optional). -The default is \*(``vt100\*(''. +The default is \*(``vt__default_termid__\*(''. The term_id argument specifies the terminal ID to use. (This is the same as the \fBdecTerminalID\fP resource). .TP 8 @@ -1097,15 +1101,11 @@ the pseudo-terminal name, the remainder is the file descriptor. Examples (the first two are equivalent since the descriptor follows the last \*(``/\*(''): -.sp -.nf -.RS 15 +.NS 15 -S/dev/pts/123/45 -S123/45 -Sab34 -.RE -.fi -.IP +.NE Note that \fIxterm\fP does not close any file descriptor which it did not open for its own use. It is possible (though probably not portable) to have an application @@ -1225,7 +1225,7 @@ useful for setting resources that do not have separate command line options. . .SH RESOURCES The program understands all of the core X Toolkit resource names and classes. -Application specific resources (e.g., \*(``\fBXTerm.\fP\fINAME\fP\*('') follow: +Application specific resources (e.g., \*(``\fB__default_class__.\fP\fINAME\fP\*('') follow: .TP 8 .B "backarrowKeyIsErase (\fPclass\fB BackarrowKeyIsErase)" Tie the VTxxx \fBbackarrowKey\fP and \fBptyInitialErase\fP resources @@ -1550,14 +1550,14 @@ The default is \*(``false.\*('' .PP The following resources are specified as part of the \fIvt100\fP widget (class \fIVT100\fP). -They are specified by patterns such as \*(``\fBXTerm.vt100.\fP\fINAME\fP\*(''. +They are specified by patterns such as \*(``\fB__default_class__.vt100.\fP\fINAME\fP\*(''. .PP If your \fIxterm\fP is configured to support the \*(``toolbar\*('', then those patterns need an extra level for the form-widget which holds the toolbar and vt100 widget. A wildcard between the top-level -\*(``XTerm\*('' and the \*(``vt100\*('' widget makes the resource settings work for -either, e.g., \*(``\fBXTerm*vt100.\fP\fINAME\fP\*(''. +\*(``__default_class__\*('' and the \*(``vt100\*('' widget makes the resource settings work for +either, e.g., \*(``\fB__default_class__*vt100.\fP\fINAME\fP\*(''. .TP 8 .B "activeIcon (\fPclass\fB ActiveIcon)" Specifies whether or not active icon windows are to be used when the @@ -1824,21 +1824,19 @@ the font server may not cooperate. Since X11R6, bitmap fonts have been scaled. The font server claims to provide the bold font that \fIxterm\fP requests, but the result is not always readable. -XFree86 provides a feature which can be used to suppress the scaling. +XFree86 introduced a feature which can be used to suppress the scaling. In the X server's configuration file (e.g., \*(``/etc/X11/XFree86\*(''), you can add \*(``:unscaled\*('' to the end of the directory specification for the \*(``misc\*('' fonts, which comprise the fixed-pitch fonts that are used by \fIxterm\fP. For example -.RS - FontPath "/usr/lib/X11/fonts/misc/" -.RE -.IP +.NS +FontPath "/usr/lib/X11/fonts/misc/" +.NE would become -.RS - FontPath "/usr/lib/X11/fonts/misc/:unscaled" -.RE -.IP +.NS +FontPath "/usr/lib/X11/fonts/misc/:unscaled" +.NE Depending on your configuration, the font server may have its own configuration file. The same \*(``:unscaled\*('' can be added to its configuration file at the @@ -2159,7 +2157,7 @@ Specifies the emulation level (100=VT100, 220=VT220, etc.), used to determine the type of response to a DA control sequence. Leading non-digit characters are ignored, e.g., \*(``vt100\*('' and \*(``100\*('' are the same. -The default is \*(``100\*(''. +The default is \*(``__default_termid__\*(''. .TP 8 .B "defaultString (\fPclass\fB DefaultString)" Specify the character (or string) which \fIxterm\fP will substitute when @@ -2479,20 +2477,17 @@ See the discussion of the \fBlocale\fP resource, which describes how this font may be overridden. .IP NOTE: some resource files use patterns such as -.RS +.NS *font: fixed -.RE -.IP +.NE which are overly broad, affecting both -.RS +.NS xterm.vt100.font -.RE -.IP +.NE and -.RS +.NS xterm.vt100.utf8Fonts.font -.RE -.IP +.NE which is probably not what you intended. .TP 8 .B "fastScroll (\fPclass\fB FastScroll)" @@ -2841,7 +2836,12 @@ The help message shown by \*(``xterm \-help\*('' lists the default value, which depends on your system configuration. .IP If the encoding converter requires command-line parameters, -you should put those within a shell script to execute the converter, +you can add those after the command, e.g., +.NS +*localeFilter: xterm-filter -p +.NE +Alternatively, +you may put those parameter within a shell script to execute the converter, and set this resource to point to the shell script. .TP 8 .B "loginShell (\fPclass\fB LoginShell)" @@ -3130,7 +3130,7 @@ Set this resource to the prefix of the filename .IP The default is an empty string, i.e., \*(``\*('', However, when the \fBprint-immediate\fP action is invoked, -if the string is empty, then \*(``XTerm\*('' is used. +if the string is empty, then \*(``__default_class__\*('' is used. .TP 8 .B "printFileOnXError (\fPPrintFileOnXError)" If \fIxterm\fP exits with an X error, @@ -3727,7 +3727,7 @@ The \fBximFont\fP resource is provided to override this default font setting. .PP The following resources are specified as part of the \fItek4014\fP widget (class \fITek4014\fP). -These are specified by patterns such as \*(``\fBXTerm.tek4014.\fP\fINAME\fP\*('': +These are specified by patterns such as \*(``\fB__default_class__.tek4014.\fP\fINAME\fP\*('': .TP 8 .B "font2 (\fPclass\fB Font)" Specifies font number 2 to use in the Tektronix window. @@ -4774,16 +4774,15 @@ If the latter is set to \*(``always\*('', the checkmark is disabled. Likewise, if there are no fonts given in the \fButf8Fonts\fP subresources, then the checkmark also is disabled. .IP -The standard \fBXTerm\fP app-defaults file defines both sets of fonts, -while the \fBUXTerm\fP app-defaults file defines only one set. +The standard \fB__default_class__\fP app-defaults file defines both sets of fonts, +while the \fBU__default_class__\fP app-defaults file defines only one set. assuming the standard app-defaults files, this command will launch \fIxterm\fP able to switch between UTF-8 and ISO-8859-1 encoded fonts: .NS -uxterm -class XTerm +uxterm -class __default_class__ .NE .RE -.PP The fourth section allows you to enable or disable special operations which can be controlled by writing escape sequences to the terminal. These are disabled if the SendEvents feature is enabled: @@ -5710,7 +5709,6 @@ which is set by the \fBselectToClipboard\fP resource: <BtnUp>:select-end(SELECT, CUT_BUFFER0) \\n\\\& <BtnDown>:ignore() .NE -.PP The default bindings for the scrollbar widget are separate from the VT100 widget: .NS @@ -5723,7 +5721,6 @@ are separate from the VT100 widget: <Btn2Motion>: MoveThumb() NotifyThumb() \\n\\\& <BtnUp>: NotifyScroll(Proportional) EndScroll() .NE -.PP The default bindings in the Tektronix window are: .NS .ta 2.5i @@ -5744,7 +5741,6 @@ The default bindings in the Tektronix window are: Shift ~Meta<Btn3Down>: gin-press(R) \\n\\\& ~Meta<Btn3Down>: gin-press(r) .NE -.PP Here is an example which uses shifted select/paste to copy to the clipboard, and unshifted select/paste for the primary selection. In each case, a (different) cut buffer is @@ -5763,8 +5759,7 @@ But you can still paste from the corresponding cut buffer. ~Shift<BtnUp>: select-end(PRIMARY, CUT_BUFFER0) \\n\\\& Shift<BtnUp>: select-end(CLIPBOARD, CUT_BUFFER1) .NE -.PP -Below is a sample how of the \fBkeymap()\fP action is used to add special +Below is a sample of how the \fBkeymap()\fP action is used to add special keys for entering commonly-typed works: .NS .ta .5i 1.5i @@ -5776,7 +5771,6 @@ keys for entering commonly-typed works: <Key>F19: string("continue") string(0x0d) \\n\\\& <Key>F20: string("print ") insert-selection(PRIMARY, CUT_BUFFER0) .NE -.PP Some people prefer using the left pointer button for dragging the scrollbar thumb. That can be setup by altering the translations resource, e.g., @@ -5868,10 +5862,10 @@ the system logfile, which records user logins. \fI/etc/wtmp\fP the system logfile, which records user logins and logouts. .TP 5 -.I __apploaddir__/XTerm +.I __apploaddir__/__default_class__ the \fIxterm\fP default application resources. .TP 5 -.I __apploaddir__/XTerm\-color +.I __apploaddir__/__default_class__\-color the \fIxterm\fP color application resources. If your display supports color, use this .in +10 @@ -5879,7 +5873,7 @@ If your display supports color, use this .in -10 in your .Xdefaults file to automatically use this resource file rather than -.IR __apploaddir__/XTerm . +.IR __apploaddir__/__default_class__ . If you do not do this, \fIxterm\fP uses its compiled-in default resource settings for colors. . |