Module Name:    xsrc
Committed By:   mrg
Date:           Sat Jul 23 23:53:11 UTC 2011

Modified Files:
        xsrc/external/mit/xterm/dist: XTerm.ad misc.c ptyx.h xterm.man

Log Message:
merge xterm 271


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 xsrc/external/mit/xterm/dist/XTerm.ad
cvs rdiff -u -r1.8 -r1.9 xsrc/external/mit/xterm/dist/misc.c \
    xsrc/external/mit/xterm/dist/xterm.man
cvs rdiff -u -r1.7 -r1.8 xsrc/external/mit/xterm/dist/ptyx.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: xsrc/external/mit/xterm/dist/XTerm.ad
diff -u xsrc/external/mit/xterm/dist/XTerm.ad:1.6 xsrc/external/mit/xterm/dist/XTerm.ad:1.7
--- xsrc/external/mit/xterm/dist/XTerm.ad:1.6	Wed Feb 23 09:14:10 2011
+++ xsrc/external/mit/xterm/dist/XTerm.ad	Sat Jul 23 23:53:10 2011
@@ -1,4 +1,4 @@
-! $XTermId: XTerm.ad,v 1.94 2011/01/19 22:05:58 tom Exp $
+! $XTermId: XTerm.ad,v 1.97 2011/07/11 10:52:16 tom Exp $
 ! -----------------------------------------------------------------------------
 ! this file is part of xterm
 !
@@ -48,6 +48,8 @@
 *mainMenu*allowsends*Label:  Allow SendEvents
 *mainMenu*redraw*Label:  Redraw Window
 *mainMenu*logging*Label:  Log to File
+*mainMenu*print-immediate*Label:  Print-All Immediately
+*mainMenu*print-on-error*Label:  Print-All on Error
 *mainMenu*print*Label:  Print Window
 *mainMenu*print-redir*Label:  Redirect to Printer
 *mainMenu*8-bit control*Label: 8-Bit Controls
@@ -117,12 +119,14 @@
 *fontMenu*fontescape*Label:	Escape Sequence
 *fontMenu*fontsel*Label:	Selection
 !fontescape and fontsel overridden by application
-*fontMenu*font-linedrawing*Label: Line-Drawing Characters
+*fontMenu*allow-bold-fonts*Label:  Bold Fonts
+*fontMenu*font-linedrawing*Label:  Line-Drawing Characters
 *fontMenu*font-doublesize*Label: Doublesized Characters
 *fontMenu*font-loadable*Label:	VT220 Soft Fonts
 *fontMenu*font-packed*Label:	Packed Font
 *fontMenu*render-font*Label:	TrueType Fonts
-*fontMenu*utf8-mode*Label:	UTF-8
+*fontMenu*utf8-mode*Label:	UTF-8 Encoding
+*fontMenu*utf8-fonts*Label:	UTF-8 Fonts
 *fontMenu*utf8-title*Label:	UTF-8 Titles
 
 *fontMenu*allow-color-ops*Label:	Allow Color Ops

Index: xsrc/external/mit/xterm/dist/misc.c
diff -u xsrc/external/mit/xterm/dist/misc.c:1.8 xsrc/external/mit/xterm/dist/misc.c:1.9
--- xsrc/external/mit/xterm/dist/misc.c:1.8	Wed Feb 23 09:14:10 2011
+++ xsrc/external/mit/xterm/dist/misc.c	Sat Jul 23 23:53:10 2011
@@ -1,4 +1,4 @@
-/* $XTermId: misc.c,v 1.520 2011/02/13 21:03:21 tom Exp $ */
+/* $XTermId: misc.c,v 1.530 2011/07/11 00:16:41 tom Exp $ */
 
 /*
  * Copyright 1999-2010,2011 by Thomas E. Dickey
@@ -1495,7 +1495,7 @@
  *	 0 otherwise.
  */
 int
-creat_as(uid_t uid, gid_t gid, Bool append, char *pathname, int mode)
+creat_as(uid_t uid, gid_t gid, Bool append, char *pathname, unsigned mode)
 {
     int fd;
     pid_t pid;
@@ -1960,7 +1960,7 @@
 	} else {
 	    result = 1;
 	    SET_COLOR_RES(res, def.pixel);
-	    TRACE(("AllocateAnsiColor[%d] %s (pixel %#lx)\n",
+	    TRACE(("AllocateAnsiColor[%d] %s (pixel 0x%06lx)\n",
 		   (int) (res - screen->Acolors), spec, def.pixel));
 #if OPT_COLOR_RES
 	    if (!res->mode)
@@ -2387,7 +2387,7 @@
 		color.red,
 		color.green,
 		color.blue);
-	TRACE(("ReportColors %d: %#lx as %s\n",
+	TRACE(("ReportColorRequest #%d: 0x%06lx as %s\n",
 	       ndx, pOldColors->colors[ndx], buffer));
 	unparseputc1(xw, ANSI_OSC);
 	unparseputs(xw, buffer);
@@ -2735,6 +2735,8 @@
 
     TRACE(("do_osc %s\n", oscbuf));
 
+    (void) screen;
+
     /*
      * Lines should be of the form <OSC> number ; string <ST>, however
      * older xterms can accept <BEL> as a final character.  We will respond
@@ -3286,6 +3288,13 @@
 		});
 #endif
 		strcat(reply, "m");
+	    } else if (!strcmp(cp, " q")) {	/* DECSCUSR */
+		int code = 0;
+		if (screen->cursor_underline)
+		    code |= 2;
+		if (screen->cursor_blink)
+		    code |= 1;
+		sprintf(reply, "%d%s", code + 1, cp);
 	    } else
 		okay = False;
 
@@ -3523,10 +3532,10 @@
 	    break;
 #endif
 	case 18:		/* DECPFF: print form feed */
-	    result = MdBool(screen->printer_formfeed);
+	    result = MdBool(PrinterOf(screen).printer_formfeed);
 	    break;
 	case 19:		/* DECPEX: print extent */
-	    result = MdBool(screen->printer_extent);
+	    result = MdBool(PrinterOf(screen).printer_extent);
 	    break;
 	case 25:		/* DECTCEM: Show/hide cursor (VT200) */
 	    result = MdBool(screen->cursor_set);
@@ -3885,7 +3894,7 @@
     ChangeGroup(xw, XtNtitle, name);
 }
 
-#define Strlen(s) strlen((char *)(s))
+#define Strlen(s) strlen((const char *)(s))
 
 void
 ChangeXprop(char *buf)
@@ -3968,18 +3977,31 @@
 	Colormap cmap = xw->core.colormap;
 	char *newName;
 
-	if (XParseColor(screen->display, cmap, name, &def)
-	    && (XAllocColor(screen->display, cmap, &def)
-		|| find_closest_color(screen->display, cmap, &def))
+	result = True;
+	if (!x_strcasecmp(name, XtDefaultForeground)) {
+	    def.pixel = xw->old_foreground;
+	} else if (!x_strcasecmp(name, XtDefaultBackground)) {
+	    def.pixel = xw->old_background;
+	} else if (XParseColor(screen->display, cmap, name, &def)
+		   && (XAllocColor(screen->display, cmap, &def)
+		       || find_closest_color(screen->display, cmap, &def))) {
+	    ;			/*empty */
+	} else {
+	    result = False;
+	}
+
+	if (result
 	    && (newName = x_strdup(name)) != 0) {
-	    if (COLOR_DEFINED(pNew, ndx))
+	    if (COLOR_DEFINED(pNew, ndx)) {
 		free(pNew->names[ndx]);
+	    }
 	    SET_COLOR_VALUE(pNew, ndx, def.pixel);
 	    SET_COLOR_NAME(pNew, ndx, newName);
-	    TRACE(("AllocateTermColor #%d: %s (pixel %#lx)\n", ndx, newName, def.pixel));
-	    result = True;
+	    TRACE(("AllocateTermColor #%d: %s (pixel 0x%06lx)\n",
+		   ndx, newName, def.pixel));
 	} else {
 	    TRACE(("AllocateTermColor #%d: %s (failed)\n", ndx, name));
+	    result = False;
 	}
     }
     return result;
@@ -4268,6 +4290,18 @@
     return 0;			/* appease the compiler */
 }
 
+void
+ice_error(IceConn iceConn)
+{
+    (void) iceConn;
+
+    fprintf(stderr,
+	    "%s:  ICE IO error handler doing an exit(), pid = %ld, errno = %d\n",
+	    ProgramName, (long) getpid(), errno);
+
+    Exit(ERROR_ICEERROR);
+}
+
 /*ARGSUSED*/
 int
 xioerror(Display * dpy)
@@ -4554,7 +4588,7 @@
 	/* supply the "turn on/off" strings if needed */
 #if OPT_TRACE
 	for (j = 0; j < opt_count; j++) {
-	    if (!strncmp(opt_array[j].opt, "-/+", 3)) {
+	    if (!strncmp(opt_array[j].opt, "-/+", (size_t) 3)) {
 		char temp[80];
 		const char *name = opt_array[j].opt + 3;
 		for (k = 0; k < numDescs; ++k) {
@@ -4580,7 +4614,7 @@
 			    mesg = "turn off/on";
 			}
 			if (strncmp(mesg, opt_array[j].desc, strlen(mesg))) {
-			    if (strncmp(opt_array[j].desc, "turn ", 5)) {
+			    if (strncmp(opt_array[j].desc, "turn ", (size_t) 5)) {
 				char *s = CastMallocN(char,
 						      strlen(mesg)
 						      + 1
Index: xsrc/external/mit/xterm/dist/xterm.man
diff -u xsrc/external/mit/xterm/dist/xterm.man:1.8 xsrc/external/mit/xterm/dist/xterm.man:1.9
--- xsrc/external/mit/xterm/dist/xterm.man:1.8	Wed Feb 23 09:14:10 2011
+++ xsrc/external/mit/xterm/dist/xterm.man	Sat Jul 23 23:53:11 2011
@@ -1,5 +1,5 @@
 '\" t
-.\" $XTermId: xterm.man,v 1.481 2011/02/18 10:48:14 tom Exp $
+.\" $XTermId: xterm.man,v 1.501 2011/07/13 08:59:37 tom Exp $
 .\"
 .\" Copyright 1996-2010,2011 by Thomas E. Dickey
 .\"
@@ -235,18 +235,21 @@
 .RB ` \- ',
 the option is restored to its default value.
 The \fB\-version\fP and \fB\-help\fP options are interpreted even if \fIxterm\fP
-cannot open the display, and are useful for testing and configuration scripts:
+cannot open the display, and are useful for testing and configuration scripts.
+Along with \fB\-class\fP, they are checked before other options.
 .TP 8
 .B \-version
-This causes \fIxterm\fP to print a version number to the standard output.
+This causes \fIxterm\fP to print a version number to the standard output,
+and then exit.
 .TP 8
 .B \-help
 This causes \fIxterm\fP to print out a verbose message describing its options,
 one per line.
 The message is written to the standard output.
+After printing the message, \fIxterm\fP exits.
 \fIXterm\fP generates this message, sorting it and noting whether
-a "\fB\-option\fP"
-or a "\fB+option\fP" turns the feature on or off,
+a \*(``\fB\-\fR\fIoption\fP\*(''
+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.,
@@ -322,7 +325,7 @@
 the outer edge of the characters and the window border) in pixels.
 That is the \fIvt100\fP \fIinternalBorder\fP resource.
 The
-default is 2.
+default is \*(``2\*(''.
 .TP 8
 .B +bc
 turn off text cursor blinking.
@@ -541,7 +544,7 @@
 .TP 8
 .B \-fx \fIfont\fP
 This option specifies the font to be used for displaying the preedit string
-in the "OverTheSpot" input method.
+in the \*(``OverTheSpot\*('' input method.
 .IP
 See also the discussion of the \fBximFont\fP resource.
 .TP 8
@@ -582,11 +585,11 @@
 .TP 8
 .B \-ie
 Turn on the \fBptyInitialErase\fP resource, i.e.,
-use the pseudo-terminal's sense of the stty erase value.
+use the pseudo-terminal's sense of the \fIstty\fP erase value.
 .TP 8
 .B +ie
 Turn off the \fBptyInitialErase\fP resource, i.e.,
-set the stty erase value using the \fBkb\fP string from the termcap entry as
+set the \fIstty\fP erase value using the \fBkb\fP string from the termcap entry as
 a reference, if available.
 .TP 8
 .B \-im
@@ -779,7 +782,7 @@
 .BI \-nb " number"
 This option specifies the number of characters from the right end of a line
 at which the margin bell, if enabled, will ring.
-The default is 10.
+The default is \*(``10\*(''.
 .TP 8
 .B "\-nul"
 This option disables the display of underlining.
@@ -897,7 +900,7 @@
 This option specifies the number of lines to save that have been scrolled
 off the top of the screen.
 This corresponds to the \fBsaveLines\fP resource.
-The default is 64.
+The default is \*(``64\*(''.
 .TP 8
 .B \-sm
 This option, corresponding to the \fBsessionMgt\fR resource,
@@ -943,7 +946,7 @@
 indicates that \fIxterm\fR should display a toolbar (or menubar)
 at the top of its window.
 The buttons in the toolbar correspond to
-the popup menus, e.g., control/left/mouse for "Main Options".
+the popup menus, e.g., control/left/mouse for \*(``Main Options\*(''.
 .TP 8
 .B +tb
 This option indicates that \fIxterm\fR should
@@ -954,8 +957,9 @@
 correct response to terminal ID queries.
 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.
+Valid values include vt52, vt100, vt101, vt102, and vt220
+(the \*(``vt\*('' is optional).
+The default is \*(``vt100\*(''.
 The term_id argument specifies the terminal ID to use.
 (This is the same as the \fBdecTerminalID\fP resource).
 .TP 8
@@ -1064,7 +1068,7 @@
 Same as \fBzIconBeep\fP resource.
 If percent is non-zero, xterms that produce output while iconified
 will cause an XBell sound at the given volume
-and have "***" prepended to their icon titles.
+and have \*(``***\*('' prepended to their icon titles.
 Most window managers will detect this change immediately, showing you
 which window has the output.
 (A similar feature was in x10 \fIxterm\fP.)
@@ -1221,12 +1225,12 @@
 .
 .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., \*(``\fBXTerm.\fP\fINAME\fP\*('') follow:
 .TP 8
 .B "backarrowKeyIsErase (\fPclass\fB BackarrowKeyIsErase)"
 Tie the VTxxx \fBbackarrowKey\fP and \fBptyInitialErase\fP resources
 together by setting the DECBKM state according to whether the initial value of
-stty erase is a backspace (8) or delete (127) character.
+\fIstty\fP erase is a backspace (8) or delete (127) character.
 The default is \*(``false\*('', which disables this feature.
 .TP 8
 .B "fullscreen (\fPclass\fB Fullscreen)"
@@ -1277,7 +1281,7 @@
 .TP 8
 .B "iconName (\fPclass\fB IconName)"
 Specifies the icon name.
-The default is the application name.
+The default is the application name, e.g., \*(``xterm\*(''.
 .TP 8
 .B "keyboardType (\fPclass\fB KeyboardType)"
 Enables one (or none) of the various keyboard-type resources:
@@ -1294,10 +1298,14 @@
 \*(``vt220\*(''.
 The individual resources are provided for legacy support;
 this resource is simpler to use.
+.IP
+The default is
+\*(``unknown.\*('', i.e., none of the associated resources are set
+via this resource.
 .TP 8
 .B "maxBufSize (\fPclass\fB MaxBufSize)"
 Specify the maximum size of the input buffer.
-The default is 32768.
+The default is \*(``32768\*(''.
 You cannot set this to a value less than the \fBminBufSize\fR resource.
 It will be increased as needed to make that value evenly divide this one.
 .IP
@@ -1324,7 +1332,7 @@
 Use this to improve initialization performance of the Athena popup menus,
 which may load unnecessary (and very large) fonts, e.g.,
 in a locale having UTF-8 encoding.
-The default is the "C" (POSIX).
+The default is \*(``C\*('' (POSIX).
 .IP
 To use the current locale
 (only useful if you have localized the resource settings for the menu entries),
@@ -1333,7 +1341,7 @@
 .B "minBufSize (\fPclass\fB MinBufSize)"
 Specify the minimum size of the input buffer, i.e., the amount of data
 that \fIxterm\fR requests on each read.
-The default is 4096.
+The default is \*(``4096\*(''.
 You cannot set this to a value less than 64.
 .TP 8
 .B "omitTranslation (\fPclass\fB OmitTranslation)"
@@ -1361,9 +1369,9 @@
 The default is \*(``true\*(''.
 .TP 8
 .B "ptyInitialErase (\fPclass\fB PtyInitialErase)"
-If \*(``true\*('', \fIxterm\fP will use the pseudo-terminal's sense of the stty erase
+If \*(``true\*('', \fIxterm\fP will use the pseudo-terminal's sense of the \fIstty\fP erase
 value.
-If \*(``false\*('', \fIxterm\fP will set the stty erase value to match its own
+If \*(``false\*('', \fIxterm\fP will set the \fIstty\fP erase value to match its own
 configuration, using the \fBkb\fP string from the termcap entry as
 a reference, if available.
 In either case, the result is applied to the TERMCAP variable
@@ -1440,6 +1448,8 @@
 Specifies whether or not function key escape codes read from the
 termcap/terminfo entry should be generated for
 function keys instead of standard escape sequences.
+The default is
+\*(``false.\*('', i.e., this feature is disabled.
 .IP
 See also the \fBkeyboardType\fP resource.
 .TP 8
@@ -1487,7 +1497,7 @@
 This is very useful for overriding
 the default terminal settings without having to do an \fIstty\fP every time
 an \fIxterm\fP is started.
-Note, however, that the stty program on a given host may use different
+Note, however, that the \fIstty\fP program on a given host may use different
 keywords; \fIxterm\fR's table is built-in.
 .IP
 If the \fBttyModes\fP resource specifies a value for \fBerase\fP,
@@ -1530,7 +1540,7 @@
 Same as \-ziconbeep command line argument.
 If the value of this resource is non-zero, xterms that produce output
 while iconified will cause an XBell sound at the given volume
-and have "***" prepended to their icon titles.
+and have \*(``***\*('' prepended to their icon titles.
 Most window managers will detect this change immediately, showing you
 which window has the output.
 (A similar feature was in x10 \fIxterm\fR.)
@@ -1540,13 +1550,14 @@
 .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 \*(``\fBXTerm.vt100.\fP\fINAME\fP\*(''.
 .PP
-If your \fIxterm\fP is configured to support the "toolbar", then those
+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".
+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\*(''.
 .TP 8
 .B "activeIcon (\fPclass\fB ActiveIcon)"
 Specifies whether or not active icon windows are to be used when the
@@ -1559,6 +1570,11 @@
 will allow you to enter keystrokes into the active icon window.
 The default is \*(``false.\*(''
 .TP 8
+.B "allowBoldFonts (\fPclass\fB AllowBoldFonts)"
+When set to \*(``false.\*('', \fIxterm\fP will not use bold fonts.
+This overrides both the \fBalwaysBoldMode\fP and the \fBboldMode\fP resources.
+.B "alwaysBoldMode (\fPclass\fB AlwaysBoldMode)"
+.TP 8
 .B "allowC1Printable (\fPclass\fB AllowC1Printable)"
 If true, overrides the mapping of C1 controls
 (codes 128-159) to make them be treated
@@ -1592,7 +1608,8 @@
 \fBsaveLines\fP resource, then Scroll Lock has no further effect.
 .IP
 The reason for setting the default to \*(``false.\*('' is to avoid
-user surprise.  This key is generally unused in keyboard configurations,
+user surprise.
+This key is generally unused in keyboard configurations,
 and has not acquired a standard meaning even when it is used in that manner.
 Consequently, users have assigned it for ad hoc purposes.
 .TP 8
@@ -1610,7 +1627,7 @@
 should be allowed.
 The default is \*(``false.\*(''
 .IP
-A few programs, e.g,. \fIvim\fP, use this feature to get an accurate
+A few programs, e.g., \fIvim\fP, use this feature to get an accurate
 description of the terminal's capabilities,
 independent of the termcap/terminfo setting:
 .RS
@@ -1689,6 +1706,9 @@
 true	false	different	use font
 true	true	ignored	overstrike
 .TE
+.IP
+As an alternative, setting the \fBallowBoldFonts\fP resource to false
+overrides both the \fBalwaysBoldMode\fP and the \fBboldMode\fP resources.
 .TP 8
 .B "alwaysHighlight (\fPclass\fB AlwaysHighlight)"
 Specifies whether or not \fIxterm\fP should always display a highlighted
@@ -1805,9 +1825,10 @@
 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.
-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.
+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/"
@@ -1820,8 +1841,8 @@
 .IP
 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
-end of the directory specification for "misc".
+The same \*(``:unscaled\*('' can be added to its configuration file at the
+end of the directory specification for \*(``misc\*(''.
 .IP
 The bitmap scaling feature is also used by \fIxterm\fP to implement
 VT102 double-width and double-height characters.
@@ -2106,16 +2127,16 @@
 cursor on a black background.
 .TP 8
 .B "cursorOffTime (\fPclass\fB CursorOffTime)"
-Specifies the duration of the "off" part of the cursor blink cycle-time
+Specifies the duration of the \*(``off\*('' part of the cursor blink cycle-time
 in milliseconds.
 The same timer is used for text blinking.
-The default is 300.
+The default is \*(``300\*(''.
 .TP 8
 .B "cursorOnTime (\fPclass\fB CursorOnTime)"
-Specifies the duration of the "on" part of the cursor blink cycle-time,
+Specifies the duration of the \*(``on\*('' part of the cursor blink cycle-time,
 in milliseconds.
 The same timer is used for text blinking.
-The default is 600.
+The default is \*(``600\*(''.
 .TP 8
 .B "cutNewline (\fPclass\fB CutNewline)"
 If \*(``false\*('', triple clicking to select a line does not include the Newline
@@ -2136,8 +2157,9 @@
 .B "decTerminalID (\fPclass\fB DecTerminalID)"
 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.
+Leading non-digit characters are ignored,
+e.g., \*(``vt100\*('' and \*(``100\*('' are the same.
+The default is \*(``100\*(''.
 .TP 8
 .B "defaultString (\fPclass\fB DefaultString)"
 Specify the character (or string) which \fIxterm\fP will substitute when
@@ -2165,7 +2187,8 @@
 SetColor,GetColor,GetAnsiColor
 .RE
 .IP
-The names are listed below.  \fIxterm\fP ignores capitalization, but
+The names are listed below.
+\fIxterm\fP ignores capitalization, but
 they are shown in mixed-case for clarity.
 .RS
 .TP 5
@@ -2188,7 +2211,8 @@
 SetFont,GetFont
 .RE
 .IP
-The names are listed below.  \fIxterm\fP ignores capitalization, but
+The names are listed below.
+\fIxterm\fP ignores capitalization, but
 they are shown in mixed-case for clarity.
 .RS
 .TP 5
@@ -2207,7 +2231,8 @@
 SetTcap,GetTcap
 .RE
 .IP
-The names are listed below.  \fIxterm\fP ignores capitalization, but
+The names are listed below.
+\fIxterm\fP ignores capitalization, but
 they are shown in mixed-case for clarity.
 .RS
 .TP 5
@@ -2227,8 +2252,10 @@
 20,21,SetXprop,SetSelection
 .RE
 .IP
-The names are listed below.  \fIxterm\fP ignores capitalization, but
-they are shown in mixed-case for clarity.  Where a number can be used
+The names are listed below.
+\fIxterm\fP ignores capitalization, but
+they are shown in mixed-case for clarity.
+Where a number can be used
 as an alternative, it is given in parentheses after the name.
 .RS
 .TP 5
@@ -2323,10 +2350,11 @@
 The \fBmetaSendsEscape\fP and \fBaltSendsEscape\fP resources may override this.
 The default is \*(``true.\*(''
 .IP
-Generally keyboards do not have a key labeled "Meta",
-but "Alt" keys are common, and they are conventionally used for "Meta".
+Generally keyboards do not have a key labeled \*(``Meta\*('',
+but \*(``Alt\*('' keys are common,
+and they are conventionally used for \*(``Meta\*(''.
 If they were synonymous, it would have been reasonable to name this
-resource "altSendsEscape", reversing its sense.
+resource \*(``\fBaltSendsEscape\fP\*('', reversing its sense.
 For more background on this, see the \fBmeta\fP function in curses.
 .IP
 Note that the \fIAlt\fP key is not necessarily the same as the
@@ -2358,19 +2386,36 @@
 .B "eightBitSelectTypes (\fPclass\fB EightBitSelectTypes\fP)"
 Override \fIxterm\fP's default selection target list (see SELECT/PASTE) for
 selections in normal (ISO-8859-1) mode.
-The default is an empty string, which does not override anything.
+The default is an empty string, i.e., \*(``\*('',
+which does not override anything.
 .TP 8
 .B "faceName (\fPclass\fB FaceName)"
-Specify the pattern for fonts selected from the FreeType
+Specify the pattern for scalable fonts selected from the FreeType
 library if support for that library was compiled into \fIxterm\fR.
 There is no default value.
 .IP
 If not specified,
 or if there is no match for both normal and bold fonts,
-\fIxterm\fR uses the \fBfont\fP and related resources.
+\fIxterm\fR uses the bitmap \fBfont\fP and related resources.
+.IP
+It is possible to select suitable bitmap fonts using a script such as this:
+.NS
+\&#!/bin/sh
+\&FONT=`xfontsel -print`
+\&test -n "$FONT" && xfd -fn "$FONT"
+.NE
+However (even though \fIxfd\fP accepts a \*(``\fB\-fa\fP\*('' option
+to denote FreeType fonts),
+\fIxfontsel\fP has not been similarly extended.
+As a workaround, you may try
+.NS
+fc-list :scalable=true:spacing=mono: family
+.NE
+to find a list of scalable fixed-pitch fonts
+which may be used for the \fBfaceName\fP resource value.
 .TP 8
 .B "faceNameDoublesize (\fPclass\fB FaceNameDoublesize)"
-Specify an double-width font for cases where an application requires
+Specify a double-width scalable font for cases where an application requires
 this, e.g., in CJK applications.
 There is no default value.
 .IP
@@ -2380,14 +2425,14 @@
 .B "faceSize (\fPclass\fB FaceSize)"
 Specify the pointsize for fonts selected from the FreeType
 library if support for that library was compiled into \fIxterm\fR.
-The default is \*(``14.\*(''
+The default is \*(``14.0\*(''
 On the \fBVT\ Fonts\fP menu, this corresponds to the \fIDefault\fP entry.
 .IP
-Although the default is \*(``14.\*('',
+Although the default is \*(``14.0\*('',
 this may not be the same as the pointsize for the default bitmap font,
 i.e., that assigned with the \fB\-fn\fP option,
 or the \fBfont\fP resource.
-For example, the "fixed" font usually has a pointsize of \*(``8.\*(''.
+For example, the \*(``fixed\*('' font usually has a pointsize of \*(``8.0\*(''.
 If you set \fBfaceSize\fP to match the size of the bitmap font,
 then switching between bitmap and TrueType fonts via the font menu
 will give comparable sizes for the window.
@@ -2445,7 +2490,7 @@
 .IP
 and
 .RS
-xterm.vt100.utf8fonts.font
+xterm.vt100.utf8Fonts.font
 .RE
 .IP
 which is probably not what you intended.
@@ -2497,6 +2542,8 @@
 2
 Always report an error on failure to load a font.
 .RE
+.IP
+The default is \*(``1\*(''.
 .TP 8
 .B "forceBoxChars (\fPclass\fB ForceBoxChars)"
 Specifies whether \fIxterm\fP should assume the normal and bold fonts
@@ -2680,18 +2727,18 @@
 .B "iconBorderWidth (\fPclass\fB BorderWidth)"
 Specifies the border width for the active icon window if this feature
 is compiled into \fIxterm\fR.
-The default is 2.
+The default is \*(``2\*(''.
 Not all window managers will make the border visible.
 .TP 8
 .B "iconFont (\fPclass\fB IconFont)"
 Specifies the font for the miniature active icon window, if this feature
 is compiled into \fIxterm\fR.
-The default is "nil2".
+The default is \*(``nil2\*(''.
 .TP 8
 .B "initialFont (\fPclass\fB InitialFont)"
 Specifies which of the VT100 fonts to use initially.
 Values are the same as for the \fIset-vt-font\fP action.
-The default is \*(``d\*('', i.e., "default".
+The default is \*(``d\*('', i.e., \*(``default\*(''.
 .TP 8
 .B "inputMethod (\fPclass\fB XtCInputMethod)"
 Tells \fIxterm\fP which type of input method to use.
@@ -2699,7 +2746,7 @@
 .TP 8
 .B "internalBorder (\fPclass\fB BorderWidth)"
 Specifies the number of pixels between the characters and the window border.
-The default is 2.
+The default is \*(``2\*(''.
 .TP 8
 .B "italicULMode (\fPclass\fB ColorAttrMode)"
 Specifies whether characters with the underline attribute should be displayed
@@ -2780,10 +2827,10 @@
 the \fBload-vt-fonts(utf8Fonts,\ Utf8Fonts)\fP action
 to load font name subresources of the VT100 widget.
 That is,
-resource patterns such as "\fB*vt100.utf8Fonts.font\fP" will be loaded,
+resource patterns such as \*(``\fB*vt100.utf8Fonts.font\fP\*('' will be loaded,
 and (if this resource is enabled), override the normal fonts.
 If no subresources are found,
-the normal fonts such as "\fB*vt100.font\fP", etc., are used.
+the normal fonts such as \*(``\fB*vt100.font\fP\*('', etc., are used.
 The resource files distributed with \fIxterm\fP use ISO-10646-1 fonts,
 but do not rely on them unless you are using the locale mechanism.
 .TP 8
@@ -2912,7 +2959,7 @@
 .TP 8
 .B "modifyOtherKeys (\fPclass\fB ModifyOtherKeys\fP)"
 Like \fBmodifyCursorKeys\fP, tells \fIxterm\fP to construct an
-escape sequence for other keys (such as "2") when modified by
+escape sequence for other keys (such as \*(``2\*('') when modified by
 Control-, Alt- or Meta-modifiers.
 This feature does not apply to function keys and well-defined
 keys such as ESC or the control keys.
@@ -2934,7 +2981,7 @@
 .B "multiClickTime (\fPclass\fB MultiClickTime)"
 Specifies the maximum time in milliseconds between multi-click select
 events.
-The default is 250 milliseconds.
+The default is \*(``250\*('' milliseconds.
 .TP 8
 .B "multiScroll (\fPclass\fB MultiScroll)"
 Specifies whether or not scrolling should be done asynchronously.
@@ -2943,7 +2990,7 @@
 .B "nMarginBell (\fPclass\fB Column)"
 Specifies the number of characters from the right margin at which the margin
 bell should be rung, when enabled by the \fBmarginBell\fP resource.
-The default is 10.
+The default is \*(``10\*(''.
 .TP 8
 .B "numLock (\fPclass\fB NumLock)"
 If \*(``true\*('', \fIxterm\fR checks if NumLock is used as a modifier (see \fIxmodmap\fP(__mansuffix__)).
@@ -3063,11 +3110,100 @@
 Specifies whether to print graphic attributes along with the text.
 A real DEC VTxxx terminal will print the underline, highlighting codes
 but your printer may not handle these.
-A \*(``0\*('' disables the attributes.
-A \*(``1\*('' prints the normal set of attributes (bold, underline, inverse and blink)
+.RS
+.bP
+\*(``0\*('' disables the attributes.
+.bP
+\*(``1\*('' prints the normal set of attributes (bold, underline, inverse and blink)
 as VT100-style control sequences.
-A \*(``2\*('' prints ANSI color attributes as well.
-The default is \*(``1.\*(''
+.bP
+\*(``2\*('' prints ANSI color attributes as well.
+.RE
+.IP
+The default is \*(``1\*(''.
+.TP 8
+.B "printFileImmediate (\fPPrintFileImmediate)"
+When the \fBprint-immediate\fP action is invoked,
+\fIxterm\fP prints the screen contents directly to a file.
+Set this resource to the prefix of the filename
+(a timestamp will be appended to the actual name).
+.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.
+.TP 8
+.B "printFileOnXError (\fPPrintFileOnXError)"
+If \fIxterm\fP exits with an X error,
+e.g., your connection is broken when the server crashes,
+it can be told to write the contents of the screen to a file.
+To enable the feature, set this resource to the prefix of the filename
+(a timestamp will be appended to the actual name).
+.IP
+The default is an empty string, i.e., \*(``\*('',
+which disables this feature.
+However, when the \fBprint-on-error\fP action is invoked,
+if the string is empty, then \*(``XTermError\*('' is used.
+.IP
+These error codes are handled:
+ERROR_XERROR,
+ERROR_XIOERROR and
+ERROR_ICEERROR.
+.TP 8
+.B "printModeImmediate (\fPPrintModeImmediate)"
+When the \fBprint-immediate\fP action is invoked,
+\fIxterm\fP prints the screen contents directly to a file.
+You can use the \fBprintModeImmediate\fP resource to tell it to
+use escape sequences to reconstruct the video attributes and colors.
+This uses the same values as the \fBprintAttributes\fP resource.
+The default is \*(``0\*(''.
+.TP 8
+.B "printModeOnXError (\fPPrintModeOnXError)"
+\fIXterm\fP implements the \fBprintFileOnXError\fP feature using
+the printer feature, although the output is written directly to a file.
+You can use the \fBprintModeOnXError\fP resource to tell it to
+use escape sequences to reconstruct the video attributes and colors.
+This uses the same values as the \fBprintAttributes\fP resource.
+The default is \*(``0\*(''.
+.TP 8
+.B "printOptsImmediate (\fPPrintOptsImmediate)"
+Specify the range of text which is printed to a file when
+the \fBprint-immediately\fP action is invoked.
+.RS
+.bP
+If zero (0), then this selects the current (visible screen) plus the
+saved lines, except if the alternate screen is being used.
+In that case, only the alternate screen is selectd.
+.bP
+If nonzero,
+the bits of this resource value (checked in descending order)
+select the range:
+.RS
+.TP 3
+8 
+selects the saved lines.
+.TP 3
+4
+selects the alternate screen.
+.TP 3
+2
+selects the normal screen.
+.TP 3
+1
+selects the current screen,
+which can be either the normal or alternate screen.
+.RE
+.RE
+.IP
+The default is \*(``9\*('', which selects the current visible screen
+plus saved lines, with no special case for the alternated screen.
+.TP 8
+.B "printOptsOnXError (\fPPrintOptsOnXError)"
+Specify the range of text which is printed to a file when
+the \fBprint-on-error\fP action is invoked.
+The resource value is interpreted the same as in \fBprintOptsImmediate\fP.
+.IP
+The default is \*(``9\*('', which selects the current visible screen
+plus saved lines, with no special case for the alternated screen.
 .TP 8
 .B "printerAutoClose (\fPclass\fB PrinterAutoClose)"
 If \*(``true\*('', \fIxterm\fR will close the printer (a pipe) when the application switches
@@ -3079,8 +3215,8 @@
 .I xterm
 will open a pipe when the first
 MC (Media Copy) command is initiated.
-The default is a blank string.
-If the resource value is given as a blank string, the printer is disabled.
+The default is an empty string, i.e., \*(``\*(''.
+If the resource value is given as an empty string, the printer is disabled.
 .TP 8
 .B "printerControlMode (\fPclass\fB PrinterControlMode)"
 Specifies the printer control mode.
@@ -3091,7 +3227,7 @@
 autowrap occurs.
 Autoprint mode is overridden by printer controller mode (a \*(``2\*(''),
 which causes all of the output to be directed to the printer.
-The default is \*(``0.\*(''
+The default is \*(``0\*(''.
 .TP 8
 .B "printerExtent (\fPclass\fB PrinterExtent)"
 Controls whether a print page function will print the entire page (true), or
@@ -3200,7 +3336,7 @@
 others prefer white text on a black background.
 .bP
 After startup,
-the user can toggle the "Enable Reverse Video" menu entry.
+the user can toggle the \*(``Enable Reverse Video\*('' menu entry.
 This exchanges the current foreground and background colors
 of the VT100 widget,
 and repaints the screen.
@@ -3224,7 +3360,7 @@
 Extensions to the ANSI color controls (such as 16-, 88- or 256-colors)
 are treated similarly to the ANSI control.
 .bP
-Using other control sequences (the "\fIdynamic colors\fR" feature),
+Using other control sequences (the \*(``\fIdynamic colors\fR\*('' feature),
 a program can change the foreground and background colors.
 .RE
 .TP 8
@@ -3242,7 +3378,7 @@
 .B "saveLines (\fPclass\fB SaveLines)"
 Specifies the number of lines to save beyond the top of the screen when a
 scrollbar is turned on.
-The default is 64.
+The default is \*(``64\*(''.
 .TP 8
 .B "scrollBar (\fPclass\fB ScrollBar)"
 Specifies whether or not the scrollbar should be displayed.
@@ -3359,9 +3495,10 @@
 window- and icon-labels in ISO-8859-1
 (the default) or UTF-8.
 Either can be encoded in hexadecimal.
-The default for this resource is \*(``0.\*(''
+The default for this resource is \*(``0\*(''.
 .IP
-Each bit (bit "0" is 1, bit "1" is 2, etc) corresponds to one of the
+Each bit (bit \*(``0\*('' is 1, bit \*(``1\*('' is 2, etc.)
+corresponds to one of the
 parameters set by the title modes control sequence:
 .RS
 .TP 5
@@ -3416,26 +3553,31 @@
 .B "utf8 (\fPclass\fB Utf8)"
 This specifies whether \fIxterm\fP will run in UTF-8 mode.
 If you set this resource, \fIxterm\fP also sets the \fBwideChars\fP resource as a side-effect.
-The resource is an integer, expected to range from 0 to 3:
+The resource can be set via the menu entry \*(``UTF-8 Encoding\*(''.
+The default is \*(``default.\*(''
+.IP
+\fIXterm\fP accepts either a keyword (ignoring case)
+or the number shown in parentheses:
 .RS
 .TP 3
-0
+false (0)
 UTF-8 mode is initially off.
 The command-line option \fB+u8\fP sets the resource to this value.
 Escape sequences for turning UTF-8 mode on/off are allowed.
 .TP
-1
+true (1)
 UTF-8 mode is initially on.
 Escape sequences for turning UTF-8 mode on/off are allowed.
 .TP
-2
+always (2)
 The command-line option \fB\-u8\fP sets the resource to this value.
 Escape sequences for turning UTF-8 mode on/off are ignored.
 .TP
-3
+default (3)
 This is the default value of the resource.
 It is changed during initialization depending on
-whether the \fBlocale\fP resource was set, to 0 or 2.
+whether the \fBlocale\fP resource was set,
+to false (0) or always (2).
 See the \fBlocale\fR resource for additional discussion of non-UTF-8 locales.
 .RE
 .IP
@@ -3446,6 +3588,34 @@
 .TP 8
 .B "utf8Fonts (\fPclass\fB Utf8Fonts)"
 See the discussion of the \fBlocale\fP resource.
+This specifies whether \fIxterm\fP will use UTF-8 fonts specified via
+resource patterns such as \*(``\fB*vt100.utf8Fonts.font\fP\*('' 
+or normal (ISO-8859-1) fonts via patterns such as \*(``\fB*vt100.font\fP\*(''.
+The resource can be set via the menu entry \*(``UTF-8 Fonts\*(''.
+The default is \*(``default.\*(''
+.IP
+\fIXterm\fP accepts either a keyword (ignoring case)
+or the number shown in parentheses:
+.RS
+.TP
+false (0)
+Use the ISO-8859-1 fonts.
+The menu entry is enabled, allowing the choice of fonts to be changed
+at runtime.
+.TP
+true (1)
+Use the UTF-8 fonts.
+The menu entry is enabled, allowing the choice of fonts to be changed
+at runtime.
+.TP
+always (2)
+Always use the UTF-8 fonts.
+This also disables the menu entry.
+.TP
+default (3)
+At startup, the resource is set to true or false,
+according to the effective value of the \fButf8\fP resource.
+.RE
 .TP 8
 .B "utf8Latin1 (\fPclass\fB Utf8Latin1)"
 If true,
@@ -3457,7 +3627,8 @@
 .B "utf8SelectTypes (\fPclass\fB Utf8SelectTypes)"
 Override \fIxterm\fP's default selection target list (see SELECT/PASTE) for
 selections in wide-character (UTF-8) mode.
-The default is an empty string, which does not override anything.
+The default is an empty string, i.e., \*(``\*('',
+which does not override anything.
 .TP 8
 .B "utf8Title (\fPclass\fB Utf8Title)"
 Applications can set \fIxterm\fP's title by writing a control sequence.
@@ -3477,7 +3648,8 @@
 .IP
 This feature is available as a menu entry, since it is related to
 the particular applications you are running within \fIxterm\fP.
-You can also use a control sequence (see the discussion of "Title Modes"
+You can also use a control sequence
+(see the discussion of \*(``Title Modes\*(''
 in the control sequences document), to set an equivalent flag.
 The \fBtitleModes\fP resource sets the same value,
 which overrides this resource.
@@ -3497,7 +3669,7 @@
 .fi
 .RE
 .IP
-The default is \*(``0.\*(''
+The default is \*(``0\*(''.
 .TP 8
 .B "visualBell (\fPclass\fB VisualBell)"
 Specifies whether or not a visible bell (i.e., flashing) should be used instead
@@ -3538,15 +3710,15 @@
 .TP 8
 .B "ximFont (\fPclass\fB XimFont)"
 This option specifies the font to be used for displaying the preedit string
-in the "OverTheSpot" input method.
+in the \*(``OverTheSpot\*('' input method.
 .IP
-In "OverTheSpot" preedit type, the preedit (preconversion)
+In \*(``OverTheSpot\*('' preedit type, the preedit (preconversion)
 string is displayed at the position of the cursor.
 It is the XIM server's responsibility to display the preedit string.
 The XIM client must inform the XIM server of the cursor position.
 For best results, the preedit string must be displayed with a proper font.
 Therefore, \fIxterm\fP informs the XIM server of the proper font.
-The font is be supplied by a "fontset", whose default value is "*".
+The font is be supplied by a "fontset", whose default value is \*(``*\*(''.
 This matches every font, the X library automatically chooses fonts with
 proper charsets.
 The \fBximFont\fP resource is provided to override this default font setting.
@@ -3555,7 +3727,7 @@
 .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 \*(``\fBXTerm.tek4014.\fP\fINAME\fP\*('':
 .TP 8
 .B "font2 (\fPclass\fB Font)"
 Specifies font number 2 to use in the Tektronix window.
@@ -3592,7 +3764,7 @@
 the documentation for the Athena \fBSimpleMenu\fP widget.
 The name and classes
 of the entries in each of the menus are listed below.
-Resources named "\fBline\fR\fIN\fR" where \fIN\fR is a number
+Resources named \*(``\fBline\fR\fIN\fR\*('' where \fIN\fR is a number
 are separators with class \fBSmeLine\fR.
 .
 .PP
@@ -3613,6 +3785,12 @@
 .B "logging (\fPclass\fB SmeBSB)"
 This entry invokes the \fBlogging(toggle)\fP action.
 .TP 8
+.B "print-immediate (\fPclass\fB SmeBSB)"
+This entry invokes the \fBprint-immediate()\fP action.
+.TP 8
+.B "print-on-error (\fPclass\fB SmeBSB)"
+This entry invokes the \fBprint-on-error()\fP action.
+.TP 8
 .B "print (\fPclass\fB SmeBSB)"
 This entry invokes the \fBprint()\fP action.
 .TP 8
@@ -3980,11 +4158,11 @@
 provide the selection data in ways which help to retain character
 encoding information as it is pasted.
 .PP
-A user "selects" text on xterm, which highlights the selected text.
-A subsequent "paste" to another client forwards a request to the client owning
+A user \*(``selects\*('' text on xterm, which highlights the selected text.
+A subsequent \*(``paste\*('' to another client forwards a request to the client owning
 the selection.
 If \fIxterm\fP owns the primary selection, it makes the data
-available in the form of one or more "selection targets".
+available in the form of one or more \*(``selection targets\*(''.
 If it does not own the primary selection,
 e.g., if it has released it or another client has
 asserted ownership, it relies on cut-buffers to pass the data.
@@ -4041,7 +4219,8 @@
 For instance, you might have some specific locale setting
 which does not use UTF-8 encoding.
 The resource value is a comma-separated list of the selection targets,
-which consist of the names shown.  You can use the special name I18N
+which consist of the names shown.
+You can use the special name I18N
 to denote the optional inclusion of TEXT and COMPOUND_TEXT.
 The names are matched ignoring case, and can be abbreviated.
 The default list can be expressed in several ways, e.g.,
@@ -4088,7 +4267,7 @@
 .RS
 .TP
 Toolbar
-Clicking on the "Toolbar" menu entry hides the toolbar if it is visible,
+Clicking on the \*(``Toolbar\*('' menu entry hides the toolbar if it is visible,
 and shows it if it is not.
 .TP
 Secure Keyboard (securekbd)
@@ -4115,6 +4294,25 @@
 Captures text sent to the screen in a logfile,
 as in the \fB\-l\fP logging option.
 .TP
+Print-All Immediately
+Invokes the \fBprint-immediate\fP action,
+sending the text of the current window directly to a file,
+as specified by the
+\fBprintFileImmediate\fP,
+\fBprintModeImmediate\fP and
+\fBprintOptsImmediate\fP
+resources.
+.TP
+Print-All on Error
+Invokes the \fBprint-on-error\fP action,
+which toggles a flag telling \fIxterm\fP that if it exits with an X error,
+to send the text of the current window directly to a file,
+as specified by the
+\fBprintFileXError\fP,
+\fBprintModeXError\fP and
+\fBprintOptsXError\fP
+resources.
+.TP
 Print Window (print)
 Sends the text of the current window to the program given in the
 \fBprinterCommand\fP resource.
@@ -4522,6 +4720,11 @@
 The second section allows you to modify the way it is displayed:
 .RS
 .TP
+Bold Fonts
+This is normally checked (enabled).
+When unchecked, \fIxterm\fP will not use bold fonts.
+The setting corresponds to the \fBallowBoldFonts\fP resource.
+.TP
 Line-Drawing Characters (font-linedrawing)
 When set, tells \fIxterm\fP to draw its own line-drawing characters.
 Otherwise it relies on the font containing these.
@@ -4548,10 +4751,37 @@
 this is a further control whether \fIxterm\fP will actually use the
 Xft library calls to obtain a font.
 .TP
-UTF-8 (utf8-mode)
+UTF-8 Encoding (utf8-mode)
 This controls whether \fIxterm\fP uses UTF-8 encoding of input/output.
 It is useful for temporarily switching \fIxterm\fP to display
 text from an application which does not follow the locale settings.
+It corresponds to the \fButf8\fP resource.
+.TP
+UTF-8 Fonts (utf8-fonts)
+This controls whether \fIxterm\fP uses UTF-8 fonts for display.
+It is useful for temporarily switching \fIxterm\fP to display
+text from an application which does not follow the locale settings.
+It combines the \fButf8\fP and \fButf8Fonts\fP resources.
+.TP
+UTF-8 Titles (utf8-titles)
+This controls whether \fIxterm\fP accepts UTF-8 encoding for
+title control sequences.
+It corresponds to the \fButf8Fonts\fP resource.
+.IP
+Initially the checkmark is set according to both the \fButf8\fP
+and \fButf8Fonts\fP resource values.
+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.
+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
+.NE
 .RE
 .PP
 The fourth section allows you to enable or disable special operations
@@ -4919,11 +5149,12 @@
 the \fBeightBitInput\fP resources.
 The \fBmetaSendsEscape\fP resource is tested first.
 .IP
-The term "eight-bit" is misleading:
+The term \*(``eight-bit\*('' is misleading:
 \fIxterm\fP checks if the key's value is less than 128.
 If so, \fIxterm\fP adds 128 to the value, setting its eighth bit.
 Otherwise \fIxterm\fP sends an ESC byte before the key.
-In other applications' documentation, that is referred to as a "meta key".
+In other applications' documentation,
+that is referred to as a \*(``meta key\*(''.
 .TP 8
 .B "insert-selection(\fIsourcename\fP [, ...])"
 This action inserts the string found in the selection or cutbuffer indicated
@@ -4937,7 +5168,7 @@
 .TP 8
 .B "insert-seven-bit()"
 This action is a synonym for \fBinsert()\fP
-The term "seven-bit" is misleading:
+The term \*(``seven-bit\*('' is misleading:
 it only implies that \fIxterm\fP does not try to add 128 to the key's value
 as in \fBinsert-eight-bit()\fP.
 .TP 8
@@ -4946,8 +5177,8 @@
 the host.
 This works by inserting the control sequence at the front
 of the input buffer.
-Use "\\" to escape octal digits in the string.
-Xt does not allow you to put a null character (i.e., "\\000") in the string.
+Use \*(``\\\*('' to escape octal digits in the string.
+Xt does not allow you to put a null character (i.e., \*(``\\000\*('') in the string.
 .TP 8
 .B "keymap(\fIname\fP)"
 This action dynamically defines a new translation table whose resource
@@ -4960,7 +5191,8 @@
 .TP 8
 .B "load-vt-fonts(\fIname\fP[,\fIclass\fP])"
 Load fontnames from the given subresource name and class.
-That is, load the "*VT100.\fIname\fP.font", resource as "*VT100.font" etc.
+That is, load the \*(``*VT100.\fIname\fP.font\*('',
+resource as \*(``*VT100.font\*('' etc.
 If no name is given, the original set of fontnames is restored.
 .IP
 Unlike \fBset-vt-font()\fR, this does not affect the escape- and select-fonts,
@@ -5027,6 +5259,23 @@
 With a suitable printer command, the action can be used to load the text
 history in an editor.
 .TP 8
+.B "print-immediate()"
+Sends the text of the current window directly to a file,
+as specified by the
+\fBprintFileImmediate\fP,
+\fBprintModeImmediate\fP and
+\fBprintOptsImmediate\fP
+resources.
+.TP 8
+.B "print-on-error()"
+Toggles a flag telling \fIxterm\fP that if it exits with an X error,
+to send the text of the current window directly to a file,
+as specified by the
+\fBprintFileXError\fP,
+\fBprintModeXError\fP and
+\fBprintOptsXError\fP
+resources.
+.TP 8
 .B "print-redir()"
 This action toggles the \fBprinterControlMode\fR between 0 and 2.
 The corresponding popup menu entry is useful for switching the printer
@@ -5059,7 +5308,8 @@
 indicates the number of \fIunits\fP (which may be \fIpage\fP, \fIhalfpage\fP,
 \fIpixel\fP, or \fIline\fP) by which to scroll.
 .IP
-An adjustment can be specified for these values by appending a "+" or "\-"
+An adjustment can be specified for these values
+by appending a \*(``+\*('' or \*(``\-\*(''
 sign followed by a number,
 e.g., \fIpage\-2\fP to specify 2 lines less than a page.
 .IP
@@ -5341,12 +5591,12 @@
 .B "spawn-new-terminal(params)"
 Spawn a new \fIxterm\fP process.
 This is available on systems which have a modern version of the
-process filesystem, e.g., "/proc", which \fIxterm\fP can read.
+process filesystem, e.g., \*(``/proc\*('', which \fIxterm\fP can read.
 .IP
-Use the "cwd" process entry, e.g., /proc/12345/cwd to obtain the
+Use the \*(``cwd\*('' process entry, e.g., /proc/12345/cwd to obtain the
 working directory of the process which is running in the current \fIxterm\fP.
 .IP
-On systems which have the "exe" process entry, e.g., /proc/12345/exe,
+On systems which have the \*(``exe\*('' process entry, e.g., /proc/12345/exe,
 use this to obtain the actual executable.
 Otherwise, use the $PATH variable to find \fIxterm\fP.
 .IP
@@ -5584,13 +5834,13 @@
 following:
 .TP 5
 COLUMNS
-the width of the \fIxterm\fP in characters (cf: "stty columns").
+the width of the \fIxterm\fP in characters (cf: \*(``stty columns\*('').
 .TP 5
 HOME
 when \fIxterm\fP is configured to update utmp.
 .TP 5
 LINES
-the height of the \fIxterm\fP in characters (cf: "stty rows").
+the height of the \fIxterm\fP in characters (cf: \*(``stty rows\*('').
 .TP 5
 LOGNAME
 when \fIxterm\fP is configured to update utmp.
@@ -5820,6 +6070,11 @@
 .br
 xioerror: X I/O error
 .TP
+85
+ERROR_ICEERROR
+.br
+ICE I/O error
+.TP
 90
 ERROR_SCALLOC
 .br
@@ -5870,8 +6125,15 @@
 .
 .
 .SH "SEE ALSO"
-resize(__mansuffix__), luit(__mansuffix__), X(__miscmansuffix__), pty(4), tty(4)
-.br
+.na
+resize(__mansuffix__),
+luit(__mansuffix__),
+uxterm(__mansuffix__),
+X(__miscmansuffix__),
+pty(4),
+tty(4)
+.ad
+.PP
 \fIXterm Control Sequences\fP
 (this is the file ctlseqs.ms).
 .sp

Index: xsrc/external/mit/xterm/dist/ptyx.h
diff -u xsrc/external/mit/xterm/dist/ptyx.h:1.7 xsrc/external/mit/xterm/dist/ptyx.h:1.8
--- xsrc/external/mit/xterm/dist/ptyx.h:1.7	Wed Feb 23 09:14:10 2011
+++ xsrc/external/mit/xterm/dist/ptyx.h	Sat Jul 23 23:53:11 2011
@@ -1,4 +1,4 @@
-/* $XTermId: ptyx.h,v 1.684 2011/02/17 00:13:06 tom Exp $ */
+/* $XTermId: ptyx.h,v 1.700 2011/07/12 08:33:58 tom Exp $ */
 
 /*
  * Copyright 1999-2010,2011 by Thomas E. Dickey
@@ -74,6 +74,8 @@
 #include <X11/Xft/Xft.h>
 #endif
 
+#include <stdio.h>
+
 /* adapted from IntrinsicI.h */
 #define MyStackAlloc(size, stack_cache_array)     \
     ((size) <= sizeof(stack_cache_array)	  \
@@ -604,6 +606,10 @@
 #define OPT_PC_COLORS   1 /* true if xterm supports PC-style (bold) colors */
 #endif
 
+#ifndef OPT_PRINT_ON_EXIT
+#define OPT_PRINT_ON_EXIT 1 /* true allows xterm to dump screen on X error */
+#endif
+
 #ifndef OPT_PTY_HANDSHAKE
 #define OPT_PTY_HANDSHAKE USE_HANDSHAKE	/* avoid pty races on older systems */
 #endif
@@ -1443,9 +1449,24 @@
 	int	printer_formfeed;	/* print formfeed per function	*/
 	int	printer_newline;	/* print newline per function	*/
 	int	print_attributes;	/* 0=off, 1=normal, 2=color	*/
+	int	print_everything;	/* 0=all, 1=dft, 2=alt, 3=saved */
 } PrinterFlags;
 
 typedef struct {
+	FILE *	fp;			/* output file/pipe used	*/
+	Boolean isOpen;			/* output was opened/tried	*/
+	Boolean toFile;			/* true when directly to file	*/
+	String	printer_command;	/* pipe/shell command string	*/
+	Boolean printer_autoclose;	/* close printer when offline	*/
+	Boolean printer_extent;		/* print complete page		*/
+	Boolean printer_formfeed;	/* print formfeed per function	*/
+	Boolean printer_newline;	/* print newline per function	*/
+	int	printer_controlmode;	/* 0=off, 1=auto, 2=controller	*/
+	int	print_attributes;	/* 0=off, 1=normal, 2=color	*/
+	int	print_everything;	/* 0=all, 1=dft, 2=alt, 3=saved */
+} PrinterState;
+
+typedef struct {
 	unsigned	which;		/* must have NCOLORS bits */
 	Pixel		colors[NCOLORS];
 	char		*names[NCOLORS];
@@ -1523,6 +1544,20 @@
 } TKwin;
 
 typedef struct {
+    String f_n;			/* the normal font */
+    String f_b;			/* the bold font */
+#if OPT_WIDE_CHARS
+    String f_w;			/* the normal wide font */
+    String f_wb;		/* the bold wide font */
+#endif
+} VTFontNames;
+
+typedef struct {
+    VTFontNames default_font;
+    String menu_font_names[NMENUFONTS][fMAX];
+} SubResourceRec;
+
+typedef struct {
 /* These parameters apply to both windows */
 	Display		*display;	/* X display for screen		*/
 	int		respond;	/* socket for responses
@@ -1569,7 +1604,10 @@
 	Boolean		wide_chars;	/* true when 16-bit chars	*/
 	Boolean		vt100_graphics;	/* true to allow vt100-graphics	*/
 	Boolean		utf8_inparse;	/* true to enable UTF-8 parser	*/
+	char *		utf8_mode_s;	/* use UTF-8 decode/encode	*/
+	char *		utf8_fonts_s;	/* use UTF-8 decode/encode	*/
 	int		utf8_mode;	/* use UTF-8 decode/encode: 0-2	*/
+	int		utf8_fonts;	/* use UTF-8 decode/encode: 0-2	*/
 	int		max_combining;	/* maximum # of combining chars	*/
 	Boolean		utf8_latin1;	/* use UTF-8 with Latin-1 bias	*/
 	Boolean		utf8_title;	/* use UTF-8 titles		*/
@@ -1690,15 +1728,12 @@
 	Cursor		hidden_cursor;	/* hidden cursor in window	*/
 
 	String	answer_back;		/* response to ENQ		*/
-	String	printer_command;	/* pipe/shell command string	*/
-	Boolean printer_autoclose;	/* close printer when offline	*/
-	Boolean printer_extent;		/* print complete page		*/
-	Boolean printer_formfeed;	/* print formfeed per function	*/
-	Boolean printer_newline;	/* print newline per function	*/
-	int	printer_controlmode;	/* 0=off, 1=auto, 2=controller	*/
-	int	print_attributes;	/* 0=off, 1=normal, 2=color	*/
 
+	PrinterState	printer_state;	/* actual printer state		*/
 	PrinterFlags	printer_flags;	/* working copy of printer flags */
+#if OPT_PRINT_ON_EXIT
+	Boolean		write_error;
+#endif
 
 	Boolean		fnt_prop;	/* true if proportional fonts	*/
 	Boolean		fnt_boxes;	/* true if font has box-chars	*/
@@ -1712,6 +1747,7 @@
 	Dimension	fnt_high;
 	XTermFonts	fnts[fMAX];	/* normal/bold/etc for terminal	*/
 	Boolean		free_bold_box;	/* same_font_size's austerity	*/
+	Boolean		allowBoldFonts;	/* do we use bold fonts at all? */
 #ifndef NO_ACTIVE_ICON
 	XTermFonts	fnt_icon;	/* icon font			*/
 	String		icon_fontname;	/* name of icon font		*/
@@ -1959,6 +1995,11 @@
 #define MenuFontName(n) menu_font_names[n][fNorm]
 	long		menu_font_sizes[NMENUFONTS];
 	int		menu_font_number;
+#if OPT_WIDE_CHARS
+	Boolean		savedVTFonts;
+	Boolean		mergedVTFonts;
+	SubResourceRec	cacheVTFonts;
+#endif
 #if OPT_CLIP_BOLD
 	Boolean		use_clipping;
 #endif
@@ -1991,9 +2032,9 @@
 	unsigned char	dabbrev_erase_char;	/* used for deleting inserted completion */
 #endif
 	char		tcapbuf[TERMCAP_SIZE];
+	char		tcap_area[TERMCAP_SIZE];
 #if OPT_TCAP_FKEYS
 	char **		tcap_fkeys;
-	char		tcap_area[TERMCAP_SIZE];
 #endif
 } TScreen;
 
@@ -2077,10 +2118,11 @@
 } pointerModeTypes;
 
 typedef enum {			/* legal values for screen.utf8_mode */
-    uFalse = 0,
-    uTrue = 1,
-    uAlways = 2,
-    uDefault = 3
+    uFalse = 0
+    , uTrue = 1
+    , uAlways = 2
+    , uDefault = 3
+    , uLast
 } utf8ModeTypes;
 
 #if OPT_HP_FUNC_KEYS
@@ -2151,15 +2193,6 @@
 #endif
 } TKeyboard;
 
-typedef struct {
-    String f_n;			/* the normal font */
-    String f_b;			/* the bold font */
-#if OPT_WIDE_CHARS
-    String f_w;			/* the normal wide font */
-    String f_wb;		/* the bold wide font */
-#endif
-} VTFontNames;
-
 #define GravityIsNorthWest(w) ((w)->misc.resizeGravity == NorthWestGravity)
 #define GravityIsSouthWest(w) ((w)->misc.resizeGravity == SouthWestGravity)
 
@@ -2298,6 +2331,8 @@
     int		cur_background; /* current background color	*/
     Pixel	dft_foreground; /* default foreground color	*/
     Pixel	dft_background; /* default background color	*/
+    Pixel	old_foreground; /* original foreground color	*/
+    Pixel	old_background; /* original background color	*/
 #if OPT_ISO_COLORS
     int		sgr_foreground; /* current SGR foreground color */
     int		sgr_background; /* current SGR background color */
@@ -2383,10 +2418,17 @@
 /* The toplevel-call to drawXtermText() should have text-attributes guarded: */
 #define DRAWX_MASK	(ATTRIBUTES | CHARDRAWN)
 
+/*
+ * BOLDATTR is not only nonzero when we will use bold font, but uses the bits
+ * for BOLD/BLINK to match against the video attributes which were originally
+ * requested.
+ */
+#define USE_BOLD(screen) ((screen)->allowBoldFonts)
+
 #if OPT_BLINK_TEXT
-#define BOLDATTR(screen) (BOLD | ((screen)->blink_as_bold ? BLINK : 0))
+#define BOLDATTR(screen) (unsigned) (USE_BOLD(screen) ? (BOLD | ((screen)->blink_as_bold ? BLINK : 0)) : 0)
 #else
-#define BOLDATTR(screen) (BOLD | BLINK)
+#define BOLDATTR(screen) (unsigned) (USE_BOLD(screen) ? (BOLD | BLINK) : 0)
 #endif
 
 /*
@@ -2422,6 +2464,8 @@
 #define TScreenOf(xw)	(&(xw)->screen)
 #define TekScreenOf(tw) (&(tw)->screen)
 
+#define PrinterOf(screen) (screen)->printer_state
+
 #ifdef SCROLLBAR_RIGHT
 #define OriginX(screen) (((term->misc.useRight)?0:ScrollbarWidth(screen)) + screen->border)
 #else

Reply via email to