summaryrefslogtreecommitdiff
path: root/app/xterm
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2011-08-18 19:47:44 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2011-08-18 19:47:44 +0000
commit89a9d00d92ea1a41217d9872e55921ca810f2f17 (patch)
tree93bf2b1ec082b82a2e0283bc5a51a5d7832966fb /app/xterm
parent4fb2f769ab80d79b4e1730b1688ee21b130596ed (diff)
Update to xterm 271. Tested by shadchin@ and ajacoutot@
Diffstat (limited to 'app/xterm')
-rw-r--r--app/xterm/INSTALL7
-rw-r--r--app/xterm/Imakefile7
-rw-r--r--app/xterm/MANIFEST3
-rw-r--r--app/xterm/Tekproc.c4
-rw-r--r--app/xterm/XTerm.ad4
-rw-r--r--app/xterm/button.c30
-rw-r--r--app/xterm/charproc.c151
-rw-r--r--app/xterm/configure.in15
-rw-r--r--app/xterm/ctlseqs.ms19
-rw-r--r--app/xterm/ctlseqs.txt20
-rw-r--r--app/xterm/data.h6
-rw-r--r--app/xterm/df-install.in20
-rw-r--r--app/xterm/fontutils.c61
-rw-r--r--app/xterm/main.c59
-rw-r--r--app/xterm/menu.c272
-rw-r--r--app/xterm/menu.h16
-rw-r--r--app/xterm/misc.c52
-rw-r--r--app/xterm/os2main.c25
-rw-r--r--app/xterm/package/debian/changelog6
-rw-r--r--app/xterm/package/debian/control4
-rw-r--r--app/xterm/package/debian/rules9
-rw-r--r--app/xterm/package/xterm.spec26
-rw-r--r--app/xterm/print.c239
-rw-r--r--app/xterm/ptyx.h40
-rw-r--r--app/xterm/terminfo696
-rw-r--r--app/xterm/trace.c18
-rw-r--r--app/xterm/trace.h6
-rw-r--r--app/xterm/version.h4
-rw-r--r--app/xterm/vttests/dynamic.pl131
-rw-r--r--app/xterm/xterm.h11
-rw-r--r--app/xterm/xterm.log.html102
-rw-r--r--app/xterm/xterm.man388
-rw-r--r--app/xterm/xterm_io.h6
-rw-r--r--app/xterm/xtermcap.c10
-rw-r--r--app/xterm/xutf8.c24
35 files changed, 1897 insertions, 594 deletions
diff --git a/app/xterm/INSTALL b/app/xterm/INSTALL
index 0cdf04adf..028375acc 100644
--- a/app/xterm/INSTALL
+++ b/app/xterm/INSTALL
@@ -1,4 +1,4 @@
--- $XTermId: INSTALL,v 1.124 2011/04/22 09:30:55 tom Exp $
+-- $XTermId: INSTALL,v 1.125 2011/07/07 01:01:14 tom Exp $
-------------------------------------------------------------------------------
-- Copyright 1997-2010,2011 by Thomas E. Dickey
--
@@ -499,6 +499,11 @@ The options (in alphabetic order):
Look for, compile and link with the Xaw Plus widget library.
+ --with-app-class=XXX X resource class (default: XTerm)
+
+ Rename the X resource class, e.g., for packaging a development version
+ of xterm with different result names.
+
--with-app-defaults=DIR directory in which to install resource files (default: EPREFIX/lib/X11/app-defaults)
autoconf scripts assume that all of the files should be installed
diff --git a/app/xterm/Imakefile b/app/xterm/Imakefile
index 5bfaba7ee..f65c30054 100644
--- a/app/xterm/Imakefile
+++ b/app/xterm/Imakefile
@@ -1,4 +1,4 @@
-XCOMM $XTermId: Imakefile,v 1.103 2011/02/19 13:09:15 tom Exp $
+XCOMM $XTermId: Imakefile,v 1.104 2011/07/02 00:48:49 tom Exp $
XCOMM
XCOMM Attention xterm porters
XCOMM
@@ -143,11 +143,14 @@ module.o: ; $(CC) -c defines $(CFLAGS) module.c
OSMINORVERSION = OSMinorVersion
#if defined(NTOArchitecture) || \
- defined(LinuxArchitecture) || \
defined(OpenBSDArchitecture) || \
defined(SGIArchitecture) || \
defined(SunArchitecture)
TERMCAPDEFINES=-DUSE_TERMINFO -DHAVE_TIGETSTR
+#elif defined(LinuxArchitecture)
+# if LinuxUsesNcurses
+TERMCAPDEFINES=-DUSE_TERMINFO -DHAVE_TIGETSTR
+# endif
#endif
#if !defined(OS2Architecture) && !defined(__GNU__)
diff --git a/app/xterm/MANIFEST b/app/xterm/MANIFEST
index 58226e820..757e8e00e 100644
--- a/app/xterm/MANIFEST
+++ b/app/xterm/MANIFEST
@@ -1,4 +1,4 @@
-MANIFEST for xterm-270, version xterm-270
+MANIFEST for xterm-271, version xterm-271
--------------------------------------------------------------------------------
MANIFEST this file
256colres.h resource-definitions for 256-color mode
@@ -155,6 +155,7 @@ vttests/88colors2.pl sample script showing 88-colors
vttests/8colors.sh test-script to illustrate 8-colors
vttests/acolors.sh demonstrate changing the ANSI colors
vttests/doublechars.sh test script to demonstrate doublesize chars
+vttests/dynamic.pl demo for dynamic colors
vttests/dynamic.sh script to illustrate the dynamic colors control sequence
vttests/dynamic2.sh complete example of dynamic colors
vttests/fonts.sh script to demonstrate font-switching sequences
diff --git a/app/xterm/Tekproc.c b/app/xterm/Tekproc.c
index dd14e5d78..f291ac85b 100644
--- a/app/xterm/Tekproc.c
+++ b/app/xterm/Tekproc.c
@@ -1,4 +1,4 @@
-/* $XTermId: Tekproc.c,v 1.188 2011/02/20 00:55:33 tom Exp $ */
+/* $XTermId: Tekproc.c,v 1.189 2011/07/10 22:19:32 tom Exp $ */
/*
* Copyright 2001-2010,2011 by Thomas E. Dickey
@@ -1897,7 +1897,7 @@ TekCopy(TekWidget tw)
TScreen *screen = TScreenOf(xw);
TekLink *Tp;
- char buf[32];
+ char buf[TIMESTAMP_LEN + 10];
char initbuf[5];
int tekcopyfd;
diff --git a/app/xterm/XTerm.ad b/app/xterm/XTerm.ad
index b6b4bc16a..c6de26447 100644
--- a/app/xterm/XTerm.ad
+++ b/app/xterm/XTerm.ad
@@ -1,4 +1,4 @@
-! $XTermId: XTerm.ad,v 1.96 2011/04/22 22:48:00 tom Exp $
+! $XTermId: XTerm.ad,v 1.97 2011/07/11 10:52:16 tom Exp $
! -----------------------------------------------------------------------------
! this file is part of xterm
!
@@ -49,6 +49,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
diff --git a/app/xterm/button.c b/app/xterm/button.c
index d29be1829..2c2df45b1 100644
--- a/app/xterm/button.c
+++ b/app/xterm/button.c
@@ -1,4 +1,4 @@
-/* $XTermId: button.c,v 1.397 2011/02/13 20:09:31 tom Exp $ */
+/* $XTermId: button.c,v 1.398 2011/07/04 21:49:39 tom Exp $ */
/*
* Copyright 1999-2010,2011 by Thomas E. Dickey
@@ -1407,13 +1407,15 @@ allocUtf8Targets(Widget w, TScreen * screen)
} else {
int n = 0;
- result[n++] = XA_UTF8_STRING(XtDisplay(w));
+ if (XSupportsLocale()) {
+ result[n++] = XA_UTF8_STRING(XtDisplay(w));
#ifdef X_HAVE_UTF8_STRING
- if (screen->i18nSelections) {
- result[n++] = XA_TEXT(XtDisplay(w));
- result[n++] = XA_COMPOUND_TEXT(XtDisplay(w));
- }
+ if (screen->i18nSelections) {
+ result[n++] = XA_TEXT(XtDisplay(w));
+ result[n++] = XA_COMPOUND_TEXT(XtDisplay(w));
+ }
#endif
+ }
result[n++] = XA_STRING;
result[n] = None;
}
@@ -1441,12 +1443,14 @@ alloc8bitTargets(Widget w, TScreen * screen)
} else {
int n = 0;
+ if (XSupportsLocale()) {
#ifdef X_HAVE_UTF8_STRING
- result[n++] = XA_UTF8_STRING(XtDisplay(w));
+ result[n++] = XA_UTF8_STRING(XtDisplay(w));
#endif
- if (screen->i18nSelections) {
- result[n++] = XA_TEXT(XtDisplay(w));
- result[n++] = XA_COMPOUND_TEXT(XtDisplay(w));
+ if (screen->i18nSelections) {
+ result[n++] = XA_TEXT(XtDisplay(w));
+ result[n++] = XA_COMPOUND_TEXT(XtDisplay(w));
+ }
}
result[n++] = XA_STRING;
result[n] = None;
@@ -1931,7 +1935,7 @@ SelectionReceived(Widget w,
text_prop.nitems));
#if OPT_WIDE_CHARS
- if (screen->wide_chars) {
+ if (XSupportsLocale() && screen->wide_chars) {
if (*type == XA_UTF8_STRING(dpy) ||
*type == XA_STRING ||
*type == XA_COMPOUND_TEXT(dpy)) {
@@ -1939,7 +1943,7 @@ SelectionReceived(Widget w,
if (Xutf8TextPropertyToTextList(dpy, &text_prop,
&text_list,
&text_list_count) < 0) {
- TRACE(("Conversion failed\n"));
+ TRACE(("default Xutf8 Conversion failed\n"));
text_list = NULL;
}
}
@@ -1962,7 +1966,7 @@ SelectionReceived(Widget w,
&text_list, &text_list_count);
} else
#endif
- if (*type == XA_STRING && screen->brokenSelections) {
+ if (*type == XA_STRING && (!XSupportsLocale() || screen->brokenSelections)) {
rc = XTextPropertyToStringList(&text_prop,
&text_list, &text_list_count);
} else {
diff --git a/app/xterm/charproc.c b/app/xterm/charproc.c
index 5e0cb2fff..ac780d3e2 100644
--- a/app/xterm/charproc.c
+++ b/app/xterm/charproc.c
@@ -1,4 +1,4 @@
-/* $XTermId: charproc.c,v 1.1121 2011/04/24 22:57:13 tom Exp $ */
+/* $XTermId: charproc.c,v 1.1126 2011/07/10 23:19:26 tom Exp $ */
/*
* Copyright 1999-2010,2011 by Thomas E. Dickey
@@ -138,6 +138,9 @@ typedef void (*BitFunc) (unsigned * /* p */ ,
static IChar doinput(void);
static int set_character_class(char * /*s */ );
static void FromAlternate(XtermWidget /* xw */ );
+static void ReallyReset(XtermWidget /* xw */ ,
+ Bool /* full */ ,
+ Bool /* saved */ );
static void RequestResize(XtermWidget /* xw */ ,
int /* rows */ ,
int /* cols */ ,
@@ -364,6 +367,8 @@ static XtActionsRec actionsList[] = {
};
/* *INDENT-ON* */
+#define SPS screen.printer_state
+
static XtResource xterm_resources[] =
{
Bres(XtNallowSendEvents, XtCAllowSendEvents, screen.allowSendEvent0, False),
@@ -411,10 +416,10 @@ static XtResource xterm_resources[] =
Bres(XtNmultiScroll, XtCMultiScroll, screen.multiscroll, False),
Bres(XtNoldXtermFKeys, XtCOldXtermFKeys, screen.old_fkeys, False),
Bres(XtNpopOnBell, XtCPopOnBell, screen.poponbell, False),
- Bres(XtNprinterAutoClose, XtCPrinterAutoClose, screen.printer_autoclose, False),
- Bres(XtNprinterExtent, XtCPrinterExtent, screen.printer_extent, False),
- Bres(XtNprinterFormFeed, XtCPrinterFormFeed, screen.printer_formfeed, False),
- Bres(XtNprinterNewLine, XtCPrinterNewLine, screen.printer_newline, True),
+ Bres(XtNprinterAutoClose, XtCPrinterAutoClose, SPS.printer_autoclose, False),
+ Bres(XtNprinterExtent, XtCPrinterExtent, SPS.printer_extent, False),
+ Bres(XtNprinterFormFeed, XtCPrinterFormFeed, SPS.printer_formfeed, False),
+ Bres(XtNprinterNewLine, XtCPrinterNewLine, SPS.printer_newline, True),
Bres(XtNquietGrab, XtCQuietGrab, screen.quiet_grab, False),
Bres(XtNreverseVideo, XtCReverseVideo, misc.re_verse, False),
Bres(XtNreverseWrap, XtCReverseWrap, misc.reverseWrap, False),
@@ -438,7 +443,7 @@ static XtResource xterm_resources[] =
Ires(XtNnMarginBell, XtCColumn, screen.nmarginbell, N_MARGINBELL),
Ires(XtNpointerMode, XtCPointerMode, screen.pointer_mode, DEF_POINTER_MODE),
Ires(XtNprinterControlMode, XtCPrinterControlMode,
- screen.printer_controlmode, 0),
+ SPS.printer_controlmode, 0),
Ires(XtNtitleModes, XtCTitleModes, screen.title_modes, DEF_TITLE_MODES),
Ires(XtNvisualBellDelay, XtCVisualBellDelay, screen.visualBellDelay, 100),
Ires(XtNsaveLines, XtCSaveLines, screen.savelines, SAVELINES),
@@ -471,7 +476,7 @@ static XtResource xterm_resources[] =
Sres(XtNfont, XtCFont, misc.default_font.f_n, DEFFONT),
Sres(XtNgeometry, XtCGeometry, misc.geo_metry, NULL),
Sres(XtNkeyboardDialect, XtCKeyboardDialect, screen.keyboard_dialect, DFT_KBD_DIALECT),
- Sres(XtNprinterCommand, XtCPrinterCommand, screen.printer_command, ""),
+ Sres(XtNprinterCommand, XtCPrinterCommand, SPS.printer_command, ""),
Sres(XtNtekGeometry, XtCGeometry, misc.T_geometry, NULL),
Tres(XtNcursorColor, XtCCursorColor, TEXT_CURSOR, XtDefaultForeground),
@@ -526,7 +531,7 @@ static XtResource xterm_resources[] =
#endif
#if OPT_BROKEN_ST
- Bres(XtNbrokenStringTerm, XtCBrokenStringTerm, screen.brokenStringTerm, True),
+ Bres(XtNbrokenStringTerm, XtCBrokenStringTerm, screen.brokenStringTerm, False),
#endif
#if OPT_C1_PRINT
@@ -626,7 +631,7 @@ static XtResource xterm_resources[] =
#endif
#if OPT_PRINT_COLORS
- Ires(XtNprintAttributes, XtCPrintAttributes, screen.print_attributes, 1),
+ Ires(XtNprintAttributes, XtCPrintAttributes, SPS.print_attributes, 1),
#endif
#if OPT_SHIFT_FONTS
@@ -1324,6 +1329,20 @@ illegal_parse(XtermWidget xw, unsigned c, struct ParseState *sp)
Bell(xw, XkbBI_MinorError, 0);
}
+static void
+init_parser(XtermWidget xw, struct ParseState *sp)
+{
+ TScreen *screen = TScreenOf(xw);
+
+ memset(sp, 0, sizeof(*sp));
+ sp->scssize = 94; /* number of printable/nonspace ASCII */
+ sp->lastchar = -1; /* not a legal IChar */
+ sp->nextstate = -1; /* not a legal state */
+
+ init_groundtable(screen, sp);
+ ResetState(sp);
+}
+
static Boolean
doparsing(XtermWidget xw, unsigned c, struct ParseState *sp)
{
@@ -1384,7 +1403,7 @@ doparsing(XtermWidget xw, unsigned c, struct ParseState *sp)
#endif
/* Intercept characters for printer controller mode */
- if (screen->printer_controlmode == 2) {
+ if (PrinterOf(screen).printer_controlmode == 2) {
if ((c = (unsigned) xtermPrinterControl(xw, (int) c)) == 0)
continue;
}
@@ -2621,7 +2640,8 @@ doparsing(XtermWidget xw, unsigned c, struct ParseState *sp)
* reset (RIS). VT220 manual states that it is a soft reset.
* Perhaps both are right (unlikely). Kermit says it's soft.
*/
- VTReset(xw, False, False);
+ ReallyReset(xw, False, False);
+ init_parser(xw, sp);
screen->vtXX_level = param[0] - 60;
if (param[0] > 61) {
switch (zero_if_default(1)) {
@@ -3256,18 +3276,9 @@ doparsing(XtermWidget xw, unsigned c, struct ParseState *sp)
static void
VTparse(XtermWidget xw)
{
- TScreen *screen;
-
/* We longjmp back to this point in VTReset() */
(void) setjmp(vtjmpbuf);
- screen = TScreenOf(xw);
- memset(&myState, 0, sizeof(myState));
- myState.scssize = 94; /* number of printable/nonspace ASCII */
- myState.lastchar = -1; /* not a legal IChar */
- myState.nextstate = -1; /* not a legal state */
-
- init_groundtable(screen, &myState);
- myState.parsestate = myState.groundtable;
+ init_parser(xw, &myState);
do {
} while (doparsing(xw, doinput(), &myState));
@@ -3446,6 +3457,28 @@ v_write(int f, const Char * data, unsigned len)
}
}
+static void
+updateCursor(TScreen * screen)
+{
+ if (screen->cursor_set != screen->cursor_state) {
+ if (screen->cursor_set)
+ ShowCursor();
+ else
+ HideCursor();
+ }
+}
+
+static void
+reallyStopBlinking(TScreen * screen)
+{
+ if (screen->cursor_state == BLINKED_OFF) {
+ /* force cursor to display if it is enabled */
+ screen->cursor_state = !screen->cursor_set;
+ updateCursor(screen);
+ xevents();
+ }
+}
+
#ifdef VMS
#define ptymask() (v_bufptr > v_bufstr ? pty_mask : 0)
@@ -3509,11 +3542,8 @@ in_put(XtermWidget xw)
#if OPT_INPUT_METHOD
PreeditPosition(screen);
#endif
- } else if (screen->cursor_set != screen->cursor_state) {
- if (screen->cursor_set)
- ShowCursor();
- else
- HideCursor();
+ } else {
+ updateCursor(screen);
}
if (QLength(screen->display)) {
@@ -3613,11 +3643,8 @@ in_put(XtermWidget xw)
#if OPT_INPUT_METHOD
PreeditPosition(screen);
#endif
- } else if (screen->cursor_set != screen->cursor_state) {
- if (screen->cursor_set)
- ShowCursor();
- else
- HideCursor();
+ } else {
+ updateCursor(screen);
}
XFlush(screen->display); /* always flush writes before waiting */
@@ -4020,7 +4047,9 @@ SetCursorBlink(TScreen * screen, Bool enable)
StartBlinking(screen);
} else {
/* EMPTY */
-#if !OPT_BLINK_TEXT
+#if OPT_BLINK_TEXT
+ reallyStopBlinking(screen);
+#else
StopBlinking(screen);
#endif
}
@@ -4191,10 +4220,10 @@ dpmodes(XtermWidget xw, BitFunc func)
break;
#endif
case 18: /* DECPFF: print form feed */
- set_bool_mode(screen->printer_formfeed);
+ set_bool_mode(PrinterOf(screen).printer_formfeed);
break;
case 19: /* DECPEX: print extent */
- set_bool_mode(screen->printer_extent);
+ set_bool_mode(PrinterOf(screen).printer_extent);
break;
case 25: /* DECTCEM: Show/hide cursor (VT200) */
set_bool_mode(screen->cursor_set);
@@ -4485,10 +4514,10 @@ savemodes(XtermWidget xw)
break;
#endif
case 18: /* DECPFF: print form feed */
- DoSM(DP_PRN_FORMFEED, screen->printer_formfeed);
+ DoSM(DP_PRN_FORMFEED, PrinterOf(screen).printer_formfeed);
break;
case 19: /* DECPEX: print extent */
- DoSM(DP_PRN_EXTENT, screen->printer_extent);
+ DoSM(DP_PRN_EXTENT, PrinterOf(screen).printer_extent);
break;
case 25: /* DECTCEM: Show/hide cursor (VT200) */
DoSM(DP_CRS_VISIBLE, screen->cursor_set);
@@ -4638,10 +4667,10 @@ restoremodes(XtermWidget xw)
break;
#endif
case 18: /* DECPFF: print form feed */
- DoRM(DP_PRN_FORMFEED, screen->printer_formfeed);
+ DoRM(DP_PRN_FORMFEED, PrinterOf(screen).printer_formfeed);
break;
case 19: /* DECPEX: print extent */
- DoRM(DP_PRN_EXTENT, screen->printer_extent);
+ DoRM(DP_PRN_EXTENT, PrinterOf(screen).printer_extent);
break;
case 25: /* DECTCEM: Show/hide cursor (VT200) */
DoRM(DP_CRS_VISIBLE, screen->cursor_set);
@@ -6084,14 +6113,20 @@ VTInitialize(Widget wrequest,
wnew->dft_foreground = MyBlackPixel(TScreenOf(wnew)->display);
wnew->dft_background = MyWhitePixel(TScreenOf(wnew)->display);
}
+
init_Tres(TEXT_FG);
init_Tres(TEXT_BG);
+ wnew->old_foreground = T_COLOR(TScreenOf(wnew), TEXT_FG);
+ wnew->old_background = T_COLOR(TScreenOf(wnew), TEXT_BG);
+
TRACE(("Color resource initialization:\n"));
- TRACE((" Default foreground %#lx\n", wnew->dft_foreground));
- TRACE((" Default background %#lx\n", wnew->dft_background));
- TRACE((" Screen foreground %#lx\n", T_COLOR(TScreenOf(wnew), TEXT_FG)));
- TRACE((" Screen background %#lx\n", T_COLOR(TScreenOf(wnew), TEXT_BG)));
+ TRACE((" Default foreground 0x%06lx\n", wnew->dft_foreground));
+ TRACE((" Default background 0x%06lx\n", wnew->dft_background));
+ TRACE((" Screen foreground 0x%06lx\n", T_COLOR(TScreenOf(wnew), TEXT_FG)));
+ TRACE((" Screen background 0x%06lx\n", T_COLOR(TScreenOf(wnew), TEXT_BG)));
+ TRACE((" Actual foreground 0x%06lx\n", wnew->old_foreground));
+ TRACE((" Actual background 0x%06lx\n", wnew->old_background));
TScreenOf(wnew)->mouse_button = -1;
TScreenOf(wnew)->mouse_row = -1;
@@ -6231,14 +6266,14 @@ VTInitialize(Widget wrequest,
init_Sres(screen.answer_back);
- init_Sres(screen.printer_command);
- init_Bres(screen.printer_autoclose);
- init_Bres(screen.printer_extent);
- init_Bres(screen.printer_formfeed);
- init_Bres(screen.printer_newline);
- init_Ires(screen.printer_controlmode);
+ init_Sres(SPS.printer_command);
+ init_Bres(SPS.printer_autoclose);
+ init_Bres(SPS.printer_extent);
+ init_Bres(SPS.printer_formfeed);
+ init_Bres(SPS.printer_newline);
+ init_Ires(SPS.printer_controlmode);
#if OPT_PRINT_COLORS
- init_Ires(screen.print_attributes);
+ init_Ires(SPS.print_attributes);
#endif
init_Sres(screen.keyboard_dialect);
@@ -8135,9 +8170,13 @@ StartBlinking(TScreen * screen)
static void
StopBlinking(TScreen * screen)
{
- if (screen->blink_timer)
+ if (screen->blink_timer) {
XtRemoveTimeOut(screen->blink_timer);
- screen->blink_timer = 0;
+ screen->blink_timer = 0;
+ reallyStopBlinking(screen);
+ } else {
+ screen->blink_timer = 0;
+ }
}
#if OPT_BLINK_TEXT
@@ -8282,8 +8321,8 @@ RestartBlinking(TScreen * screen GCC_UNUSED)
* + the popup menu offers a choice of resetting the savedLines, or not.
* (but the control sequence does this anyway).
*/
-void
-VTReset(XtermWidget xw, Bool full, Bool saved)
+static void
+ReallyReset(XtermWidget xw, Bool full, Bool saved)
{
static char empty[1];
@@ -8414,6 +8453,12 @@ VTReset(XtermWidget xw, Bool full, Bool saved)
screen->sc[screen->whichBuf].row =
screen->sc[screen->whichBuf].col = 0;
}
+}
+
+void
+VTReset(XtermWidget xw, Bool full, Bool saved)
+{
+ ReallyReset(xw, full, saved);
longjmp(vtjmpbuf, 1); /* force ground state in parser */
}
diff --git a/app/xterm/configure.in b/app/xterm/configure.in
index 05349aaae..8c4731e89 100644
--- a/app/xterm/configure.in
+++ b/app/xterm/configure.in
@@ -1,4 +1,4 @@
-dnl $XTermId: configure.in,v 1.272 2011/04/22 08:54:15 tom Exp $
+dnl $XTermId: configure.in,v 1.274 2011/07/07 00:06:11 tom Exp $
dnl
dnl -----------------------------------------------------------------------------
dnl this file is part of xterm
@@ -115,6 +115,7 @@ CF_POSIX_SAVED_IDS
CF_HELP_MESSAGE(Compile/Install Options:)
CF_FUNC_TGETENT
+CF_WITH_APP_CLASS(XTerm)
CF_WITH_APP_DEFAULTS
CF_WITH_ICONDIR
CF_DISABLE_DESKTOP(xterm)
@@ -278,6 +279,18 @@ AC_CHECK_FUNCS(Xutf8LookupString, [],[
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
+ case "$IMAKE_CFLAGS" in
+ *-DUSE_TERMINFO\ -DHAVE_TIGETSTR*)
+ CF_UNDO_CFLAGS(IMAKE_CFLAGS,terminfo,[-DUSE_TERMINFO[[ ]]*-DHAVE_TIGETSTR[[ ]]*])
+ CF_UNDO_CFLAGS(CPPFLAGS,terminfo,[-DUSE_TERMINFO[[ ]]*-DHAVE_TIGETSTR[[ ]]*])
+ ;;
+ esac
+fi
+
CF_HELP_MESSAGE(Terminal Configuration:)
AC_MSG_CHECKING(for default terminal-id)
diff --git a/app/xterm/ctlseqs.ms b/app/xterm/ctlseqs.ms
index b88ed2049..60799e2f8 100644
--- a/app/xterm/ctlseqs.ms
+++ b/app/xterm/ctlseqs.ms
@@ -1,6 +1,6 @@
.\"#! troff -ms $1 -*- Nroff -*-
.\" "Xterm Control Sequences" document
-.\" $XTermId: ctlseqs.ms,v 1.238 2011/02/16 11:57:19 tom Exp $
+.\" $XTermId: ctlseqs.ms,v 1.242 2011/07/04 22:56:23 tom Exp $
.\"
.\"
.\" Copyright 1996-2010,2011 by Thomas E. Dickey
@@ -317,7 +317,7 @@ X Consortium (1994)
Thomas Dickey
.AI
XFree86 Project (1996-2006)
-invisible-island.net (2006-2010)
+invisible-island.net (2006-2011)
.AU
.
.am BT \" add page numbers after first page
@@ -759,7 +759,7 @@ The response depends on the \fBdecTerminalID\fP resource setting.
\(-> \*(Cs\*?\*1\*;\*2\*c (``VT100 with Advanced Video Option'')
\(-> \*(Cs\*?\*1\*;\*0\*c (``VT101 with No Options'')
\(-> \*(Cs\*?\*6\*c (``VT102'')
- \(->\ \*(Cs\*?\*6\*0\*;\*1\*;\*2\*;\*6\*;\*8\*;\*9\*;\*1\*5\*;\*c (``VT220'')
+ \(-> \*(Cs\*?\*6\*0\*;\*1\*;\*2\*;\*6\*;\*8\*;\*9\*;\*1\*5\*;\*c (``VT220'')
.br
The VT100-style response parameters do not mean anything by themselves.
VT220 parameters do, telling the host what features the terminal supports:
@@ -1429,8 +1429,8 @@ to these codes in an \*(Os\*4 control:
\*(Pc = \*2 \(<- resource \fBcolorBL\fP (BLINK).
\*(Pc = \*3 \(<- resource \fBcolorRV\fP (REVERSE).
.sP
-The 8 colors (below) which may be set or queried
-using \*1\*0 through \*1\*7 are
+The 10 colors (below) which may be set or queried
+using \*1\*0 through \*1\*9 are
denoted \fIdynamic colors\fR, since the corresponding control sequences
were the first means for setting \fBxterm\fR's colors dynamically,
i.e., after it was started.
@@ -1487,13 +1487,13 @@ The parameter \*(Pt is parsed as
.br
\*(Pc\*;\*(Pd
.br
-The first, \*(Pc, may contain any character from the
+The first, \*(Pc, may contain zero or more characters from the
set \*c \*p \*(cs \*0 \*1 \*2 \*3 \*4 \*5 \*6 \*7.
It is used to construct a list of selection parameters for
clipboard,
primary,
select,
-or cut buffers 0 through 8 respectively,
+or cut buffers 0 through 7 respectively,
in the order given.
If the parameter is empty, \fIxterm\fP uses \*(cs\*0,
to specify the configurable primary/clipboard selection and cut buffer 0.
@@ -1506,6 +1506,9 @@ which is then available for pasting by other applications.
If the second parameter is a \*?,
\fIxterm\fP replies to the host with the selection
data encoded using the same protocol.
+.br
+If the second parameter is neither a base64 string nor \*?,
+then the selection is cleared.
.Ed
.sP
\*(Ps = \*1\*0\*4 ; \fIc\fP \(-> Reset Color Number \fIc\fP. It is reset to
@@ -2184,7 +2187,7 @@ Begin 4015 APL mode (ESC Ctrl-N). (This is ignored by \fIxterm\fP).
.IP \\*(Es\\*(Si
End 4015 APL mode (ESC Ctrl-O). (This is ignored by \fIxterm\fP).
.IP \\*(Es\\*(Eb
-COPY (Save Tektronix Codes to file COPYyyyy-mm-dd.hh:mm:ss).
+COPY (Save Tektronix Codes to file COPY\fIyyyy-mm-dd.hh:mm:ss\fP).
\*(Eb (end transmission block) is the same as Ctrl-W.
.IP \\*(Es\\*(Ca
Bypass Condition (ESC Ctrl-X).
diff --git a/app/xterm/ctlseqs.txt b/app/xterm/ctlseqs.txt
index 6f2d9c9a3..a9fa5f759 100644
--- a/app/xterm/ctlseqs.txt
+++ b/app/xterm/ctlseqs.txt
@@ -20,7 +20,7 @@
Thomas Dickey
XFree86 Project (1996-2006)
- invisible-island.net (2006-2010)
+ invisible-island.net (2006-2011)
@@ -879,8 +879,8 @@ OSC Ps ; Pt BEL
Pc = 2 <- resource colorBL (BLINK).
Pc = 3 <- resource colorRV (REVERSE).
- The 8 colors (below) which may be set or queried using 1 0
- through 1 7 are denoted dynamic colors, since the correspond-
+ The 10 colors (below) which may be set or queried using 1 0
+ through 1 9 are denoted dynamic colors, since the correspond-
ing control sequences were the first means for setting xterm's
colors dynamically, i.e., after it was started. They are not
the same as the ANSI colors. These controls may be disabled
@@ -931,18 +931,20 @@ OSC Ps ; Pt BEL
be disabled using the allowWindowOps resource. The parameter
Pt is parsed as
Pc; Pd
- The first, Pc, may contain any character from the set c p s
- 0 1 2 3 4 5 6 7 . It is used to construct a list of
- selection parameters for clipboard, primary, select, or cut
- buffers 0 through 8 respectively, in the order given. If the
- parameter is empty, xterm uses s 0 , to specify the config-
- urable primary/clipboard selection and cut buffer 0.
+ The first, Pc, may contain zero or more characters from the
+ set c p s 0 1 2 3 4 5 6 7 . It is used to construct
+ a list of selection parameters for clipboard, primary, select,
+ or cut buffers 0 through 7 respectively, in the order given.
+ If the parameter is empty, xterm uses s 0 , to specify the
+ configurable primary/clipboard selection and cut buffer 0.
The second parameter, Pd, gives the selection data. Normally
this is a string encoded in base64. The data becomes the new
selection, which is then available for pasting by other appli-
cations.
If the second parameter is a ? , xterm replies to the host
with the selection data encoded using the same protocol.
+ If the second parameter is neither a base64 string nor ? ,
+ then the selection is cleared.
Ps = 1 0 4 ; c -> Reset Color Number c. It is reset to the
color specified by the corresponding X resource. Any number
diff --git a/app/xterm/data.h b/app/xterm/data.h
index f9813a634..78ca72a1e 100644
--- a/app/xterm/data.h
+++ b/app/xterm/data.h
@@ -1,4 +1,4 @@
-/* $XTermId: data.h,v 1.117 2011/04/17 19:21:11 tom Exp $ */
+/* $XTermId: data.h,v 1.119 2011/07/12 08:37:24 tom Exp $ */
/*
* Copyright 2002-2009,2011 by Thomas E. Dickey
@@ -162,7 +162,11 @@ typedef struct XTERM_RESOURCE {
String keyboardType;
#if OPT_PRINT_ON_EXIT
+ int printModeNow;
int printModeOnXError;
+ int printOptsNow;
+ int printOptsOnXError;
+ String printFileNow;
String printFileOnXError;
#endif
#if OPT_SUNPC_KBD
diff --git a/app/xterm/df-install.in b/app/xterm/df-install.in
index 8486a4ae8..acef3c769 100644
--- a/app/xterm/df-install.in
+++ b/app/xterm/df-install.in
@@ -1,5 +1,5 @@
#!/bin/sh
-# $XTermId: df-install.in,v 1.4 2011/04/22 20:43:06 tom Exp $
+# $XTermId: df-install.in,v 1.5 2011/07/07 09:41:14 tom Exp $
# -----------------------------------------------------------------------------
# this file is part of xterm
#
@@ -37,9 +37,14 @@
#
# Parameters are passed to the desktop-file-install program. The last
# parameter is the name of the ".desktop" file to install.
-CATEGORY="@DESKTOP_CATEGORY@"
OPTS=
+if test $# != 0
+then
+ APP_NAME=$1
+ shift 1
+fi
+
CDPATH=:
export CDPATH
@@ -75,14 +80,13 @@ then
fi
NEW_FILE=`basename $OLD_FILE`
-sed -e '/^Category=/s%=.*%@DESKTOP_CATEGORY@%' $OLD_FILE >$MY_TEMP/$NEW_FILE
+sed \
+ -e '/^[^#]/s%xterm%'$APP_NAME'%g' \
+ -e '/^[^#]/s%XTerm%@APP_CLASS@%g' \
+ -e '/^Category=/s%=.*%@DESKTOP_CATEGORY@%' \
+ $OLD_FILE >$MY_TEMP/$NEW_FILE
cd $MY_TEMP
-if ! cmp -s $OLD_FILE $NEW_FILE
-then
- echo "** customizing desktop category"
- diff $OLD_FILE $NEW_FILE
-fi
desktop-file-install $OPTS $NEW_FILE
cd ..
diff --git a/app/xterm/fontutils.c b/app/xterm/fontutils.c
index 27f79c825..ee6e96f05 100644
--- a/app/xterm/fontutils.c
+++ b/app/xterm/fontutils.c
@@ -1,4 +1,4 @@
-/* $XTermId: fontutils.c,v 1.358 2011/04/24 22:58:56 tom Exp $ */
+/* $XTermId: fontutils.c,v 1.360 2011/07/13 09:54:49 tom Exp $ */
/************************************************************
@@ -976,7 +976,7 @@ xtermLoadFont(XtermWidget xw,
if (check_fontname(myfonts.f_w)) {
cache_menu_font_name(screen, fontnum, fWide, myfonts.f_w);
- } else if (!is_double_width_font(fnts[fNorm].fs)) {
+ } else if (screen->utf8_fonts && !is_double_width_font(fnts[fNorm].fs)) {
fp = get_font_name_props(screen->display, fnts[fNorm].fs, normal);
if (fp != 0) {
myfonts.f_w = wide_font_name(fp);
@@ -1005,17 +1005,32 @@ xtermLoadFont(XtermWidget xw,
if (check_fontname(myfonts.f_wb)) {
- xtermOpenFont(xw, myfonts.f_wb, &fnts[fWBold], warn[fWBold], False);
+ xtermOpenFont(xw,
+ myfonts.f_wb,
+ &fnts[fWBold],
+ (screen->utf8_fonts
+ ? warn[fWBold]
+ : (xw->misc.fontWarnings + 1)),
+ False);
if (derived
&& !compatibleWideCounts(fnts[fWide].fs, fnts[fWBold].fs)) {
xtermCloseFont(xw, &fnts[fWBold]);
}
if (fnts[fWBold].fs == 0) {
- myfonts.f_wb = myfonts.f_w;
- warn[fWBold] = fwAlways;
- xtermCopyFontInfo(&fnts[fWBold], &fnts[fWide]);
- TRACE(("...cannot load wide-bold, use wide %s\n", NonNull(myfonts.f_w)));
+ if (IsEmpty(myfonts.f_w)) {
+ myfonts.f_wb = myfonts.f_b;
+ warn[fWBold] = fwAlways;
+ xtermCopyFontInfo(&fnts[fWBold], &fnts[fBold]);
+ TRACE(("...cannot load wide-bold, use bold %s\n",
+ NonNull(myfonts.f_b)));
+ } else {
+ myfonts.f_wb = myfonts.f_w;
+ warn[fWBold] = fwAlways;
+ xtermCopyFontInfo(&fnts[fWBold], &fnts[fWide]);
+ TRACE(("...cannot load wide-bold, use wide %s\n",
+ NonNull(myfonts.f_w)));
+ }
} else {
TRACE(("...%s wide/bold %s\n",
derived ? "derived" : "given",
@@ -1251,6 +1266,14 @@ xtermLoadFont(XtermWidget xw,
TRACE(("MERGE_SUBFONT " #dst "." #name " found %s\n", NonNull(dst.name))); \
}
+#define INFER_SUBFONT(src,dst,name) \
+ if (IsEmpty(dst.name)) { \
+ TRACE(("INFER_SUBFONT " #dst "." #name " will infer\n")); \
+ dst.name = x_strdup(""); \
+ } else { \
+ TRACE(("INFER_SUBFONT " #dst "." #name " found %s\n", NonNull(dst.name))); \
+ }
+
#define COPY_MENU_FONTS(src,dst) \
TRACE(("COPY_MENU_FONTS " #src " to " #dst "\n")); \
for (n = fontMenu_default; n <= fontMenu_lastBuiltin; ++n) { \
@@ -1372,10 +1395,10 @@ xtermLoadVTFonts(XtermWidget xw, String myName, String myClass)
* If a particular resource value was not found, use the original.
*/
MERGE_SUBFONT(xw->misc, subresourceRec, default_font.f_n);
- MERGE_SUBFONT(xw->misc, subresourceRec, default_font.f_b);
+ INFER_SUBFONT(xw->misc, subresourceRec, default_font.f_b);
#if OPT_WIDE_CHARS
- MERGE_SUBFONT(xw->misc, subresourceRec, default_font.f_w);
- MERGE_SUBFONT(xw->misc, subresourceRec, default_font.f_wb);
+ INFER_SUBFONT(xw->misc, subresourceRec, default_font.f_w);
+ INFER_SUBFONT(xw->misc, subresourceRec, default_font.f_wb);
#endif
for (n = fontMenu_font1; n <= fontMenu_lastBuiltin; ++n)
MERGE_SUBFONT(xw->screen, subresourceRec, MenuFontName(n));
@@ -2227,8 +2250,10 @@ xtermMissingChar(unsigned ch, XTermFonts * font)
/*
* ...since we'll scale the values anyway.
*/
-#define SCALE_X(n) n = (n * (((int) font_width) - 1)) / (BOX_WIDE-1)
-#define SCALE_Y(n) n = (n * (((int) font_height) - 1)) / (BOX_HIGH-1)
+#define SCALED_X(n) ((int)(n) * (((int) font_width) - 1)) / (BOX_WIDE-1)
+#define SCALED_Y(n) ((int)(n) * (((int) font_height) - 1)) / (BOX_HIGH-1)
+#define SCALE_X(n) n = SCALED_X(n)
+#define SCALE_Y(n) n = SCALED_Y(n)
#define SEG(x0,y0,x1,y1) x0,y0, x1,y1
@@ -2515,10 +2540,10 @@ xtermDrawBoxChar(XtermWidget xw,
points[4].y = points[0].y;
for (n = 0; n < npoints; ++n) {
- SCALE_X(points[n].x);
- SCALE_Y(points[n].y);
- points[n].x += x;
- points[n].y += y;
+ points[n].x = (short) SCALED_X(points[n].x);
+ points[n].y = (short) SCALED_Y(points[n].y);
+ points[n].x = (short) (points[n].x + x);
+ points[n].y = (short) (points[n].y + y);
}
XFillPolygon(screen->display,
@@ -2532,7 +2557,7 @@ xtermDrawBoxChar(XtermWidget xw,
SCALE_X(x_coord);
SCALE_Y(y_coord);
- SCALE_X(width);
+ width = (unsigned) SCALED_X(width);
XDrawArc(screen->display,
VWindow(screen), gc2,
@@ -2546,7 +2571,7 @@ xtermDrawBoxChar(XtermWidget xw,
SCALE_X(x_coord);
SCALE_Y(y_coord);
- SCALE_X(width);
+ width = (unsigned) SCALED_X(width);
XDrawArc(screen->display,
VWindow(screen), gc2,
diff --git a/app/xterm/main.c b/app/xterm/main.c
index 7f78207f7..8cddcb9ba 100644
--- a/app/xterm/main.c
+++ b/app/xterm/main.c
@@ -1,4 +1,4 @@
-/* $XTermId: main.c,v 1.629 2011/04/22 23:09:15 tom Exp $ */
+/* $XTermId: main.c,v 1.638 2011/07/14 00:18:58 tom Exp $ */
/*
* W A R N I N G
@@ -847,7 +847,11 @@ static XtResource application_resources[] =
Sres("omitTranslation", "OmitTranslation", omitTranslation, NULL),
Sres("keyboardType", "KeyboardType", keyboardType, "unknown"),
#if OPT_PRINT_ON_EXIT
+ Ires("printModeImmediate", "PrintModeImmediate", printModeNow, 0),
+ Ires("printOptsImmediate", "PrintOptsImmediate", printOptsNow, 9),
+ Sres("printFileImmediate", "PrintFileImmediate", printFileNow, NULL),
Ires("printModeOnXError", "PrintModeOnXError", printModeOnXError, 0),
+ Ires("printOptsOnXError", "PrintOptsOnXError", printOptsOnXError, 9),
Sres("printFileOnXError", "PrintFileOnXError", printFileOnXError, NULL),
#endif
#if OPT_SUNPC_KBD
@@ -1833,24 +1837,21 @@ main(int argc, char *argv[]ENVP_ARG)
if (argc > 1) {
int n;
size_t unique = 2;
- Bool quit = True;
+ Bool quit = False;
for (n = 1; n < argc; n++) {
TRACE(("parsing %s\n", argv[n]));
if (abbrev(argv[n], "-version", unique)) {
Version();
+ quit = True;
} else if (abbrev(argv[n], "-help", unique)) {
Help();
+ quit = True;
} else if (abbrev(argv[n], "-class", (size_t) 3)) {
if ((my_class = argv[++n]) == 0) {
Help();
- } else {
- quit = False;
+ quit = True;
}
- unique = 3;
- } else {
- quit = False;
- unique = 3;
}
}
if (quit)
@@ -2107,10 +2108,10 @@ main(int argc, char *argv[]ENVP_ARG)
switch (argv[0][1]) {
case 'h': /* -help */
Help();
- continue;
+ exit(0);
case 'v': /* -version */
Version();
- continue;
+ exit(0);
case 'C':
#if defined(TIOCCONS) || defined(SRIOCSREDIR)
#ifndef __sgi
@@ -2286,11 +2287,11 @@ main(int argc, char *argv[]ENVP_ARG)
/* Set up stderr properly. Opening this log file cannot be
done securely by a privileged xterm process (although we try),
so the debug feature is disabled by default. */
- char dbglogfile[45];
+ char dbglogfile[TIMESTAMP_LEN + 20];
int i = -1;
if (debug) {
timestamp_filename(dbglogfile, "xterm.debug.log.");
- if (creat_as(save_ruid, save_rgid, False, dbglogfile, 0666) > 0) {
+ if (creat_as(save_ruid, save_rgid, False, dbglogfile, 0600) > 0) {
i = open(dbglogfile, O_WRONLY | O_TRUNC);
}
}
@@ -2395,6 +2396,7 @@ main(int argc, char *argv[]ENVP_ARG)
}
#endif
+ TRACE(("checking winToEmbedInto %#lx\n", winToEmbedInto));
if (winToEmbedInto != None) {
XtRealizeWidget(toplevel);
/*
@@ -2402,6 +2404,9 @@ main(int argc, char *argv[]ENVP_ARG)
* 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);
@@ -2947,8 +2952,7 @@ set_owner(char *device, uid_t uid, gid_t gid, mode_t mode)
strerror(why));
}
TRACE(("...chown failed: %s\n", strerror(why)));
- }
- if (chmod(device, mode) < 0) {
+ } else if (chmod(device, mode) < 0) {
why = errno;
if (why != ENOENT) {
struct stat sb;
@@ -4744,6 +4748,7 @@ Exit(int n)
*/
ttyFlush(screen->respond);
+#ifdef USE_PTY_SEARCH
if (am_slave < 0) {
TRACE_IDS;
/* restore ownership of tty and pty */
@@ -4752,6 +4757,7 @@ Exit(int n)
set_owner(ptydev, 0, 0, 0666U);
#endif
}
+#endif
/*
* Close after releasing ownership to avoid race condition: other programs
@@ -4763,30 +4769,7 @@ Exit(int n)
CloseLog(xw);
#endif
-#if OPT_PRINT_ON_EXIT
- /*
- * The user may have requested that the contents of the screen will be
- * written to a file if an X error occurs.
- */
- if (!IsEmpty(resource.printFileOnXError)) {
- switch (n) {
- case ERROR_XERROR:
- /* FALLTHRU */
- case ERROR_XIOERROR:
- /* FALLTHRU */
- case ERROR_ICEERROR:
- closePrinter(xw);
- screen->printToFile = True;
- screen->printer_command = resource.printFileOnXError;
- screen->printer_autoclose = True;
- screen->printer_formfeed = False;
- screen->printer_newline = True;
- screen->print_attributes = resource.printModeOnXError;
- xtermPrintEverything(xw, getPrinterFlags(xw, NULL, 0));
- break;
- }
- }
-#endif
+ xtermPrintOnXError(xw, n);
#ifdef NO_LEAKS
if (n == 0) {
diff --git a/app/xterm/menu.c b/app/xterm/menu.c
index b8b85a07f..1f34eeec0 100644
--- a/app/xterm/menu.c
+++ b/app/xterm/menu.c
@@ -1,4 +1,4 @@
-/* $XTermId: menu.c,v 1.289 2011/04/24 18:18:30 tom Exp $ */
+/* $XTermId: menu.c,v 1.295 2011/07/12 10:45:36 tom Exp $ */
/*
* Copyright 1999-2010,2011 by Thomas E. Dickey
@@ -215,6 +215,11 @@ static void do_num_lock PROTO_XT_CALLBACK_ARGS;
static void do_meta_esc PROTO_XT_CALLBACK_ARGS;
#endif
+#if OPT_PRINT_ON_EXIT
+static void do_write_now PROTO_XT_CALLBACK_ARGS;
+static void do_write_error PROTO_XT_CALLBACK_ARGS;
+#endif
+
#if OPT_RENDERFONT
static void do_font_renderfont PROTO_XT_CALLBACK_ARGS;
#endif
@@ -282,6 +287,10 @@ MenuEntry mainMenuEntries[] = {
#ifdef ALLOWLOGGING
{ "logging", do_logging, NULL },
#endif
+#ifdef OPT_PRINT_ON_EXIT
+ { "print-immediate", do_write_now, NULL },
+ { "print-on-error", do_write_error, NULL },
+#endif
{ "print", do_print, NULL },
{ "print-redir", do_print_redir, NULL },
{ "line2", NULL, NULL },
@@ -513,11 +522,89 @@ sizeof_menu(Widget w, MenuIndex num)
}
/*
- * create_menu - create a popup shell and stuff the menu into it.
+ * Return an array of flags telling if a given menu item is never going to
+ * be used, so we can reduce the size of menus.
*/
+static Boolean *
+unusedEntries(XtermWidget xw, MenuIndex num)
+{
+ static Boolean result[XtNumber(mainMenuEntries)
+ + XtNumber(vtMenuEntries)
+ + XtNumber(fontMenuEntries)
+#if OPT_TEK4014
+ + XtNumber(tekMenuEntries)
+#endif
+ ];
+ TScreen *screen = TScreenOf(xw);
+ memset(result, 0, sizeof(result));
+ switch (num) {
+ case mainMenu:
+ if (resource.fullscreen > 1) {
+ result[mainMenu_fullscreen] = True;
+ }
+#if OPT_NUM_LOCK
+ if (!screen->alt_is_not_meta) {
+ result[mainMenu_alt_esc] = True;
+ }
+#endif
+ if (!xtermHasPrinter(xw)) {
+ result[mainMenu_print] = True;
+ result[mainMenu_print_redir] = True;
+ }
+ if (screen->terminal_id < 200) {
+ result[mainMenu_8bit_ctrl] = True;
+ }
+#if !defined(SIGTSTP)
+ result[mainMenu_suspend] = True;
+#endif
+#if !defined(SIGCONT)
+ result[mainMenu_continue] = True;
+#endif
+#ifdef ALLOWLOGGING
+ if (screen->inhibit & I_LOG) {
+ result[mainMenu_logging] = True;
+ }
+#endif
+ if (screen->inhibit & I_SIGNAL) {
+ int n;
+ for (n = (int) mainMenu_suspend; n <= (int) mainMenu_quit; ++n) {
+ result[n] = True;
+ }
+ }
+ break;
+ case vtMenu:
+#ifndef NO_ACTIVE_ICON
+ if (!screen->fnt_icon.fs || !screen->iconVwin.window) {
+ result[vtMenu_activeicon] = True;
+ }
+#endif /* NO_ACTIVE_ICON */
+#if OPT_TEK4014
+ if (screen->inhibit & I_TEK) {
+ int n;
+ for (n = (int) vtMenu_tekshow; n <= (int) vtMenu_vthide; ++n) {
+ result[n] = True;
+ }
+ }
+#endif
+ break;
+ case fontMenu:
+ break;
+#if OPT_TEK4014
+ case tekMenu:
+ break;
+#endif
+ case noMenu:
+ break;
+ }
+ return result;
+}
+
+/*
+ * create_menu - create a popup shell and stuff the menu into it.
+ */
static Widget
-create_menu(Widget w, XtermWidget xtw, MenuIndex num)
+create_menu(Widget w, XtermWidget xw, MenuIndex num)
{
static XtCallbackRec cb[2] =
{
@@ -526,7 +613,7 @@ create_menu(Widget w, XtermWidget xtw, MenuIndex num)
static Arg arg =
{XtNcallback, (XtArgVal) cb};
- TScreen *screen = TScreenOf(xtw);
+ TScreen *screen = TScreenOf(xw);
MenuHeader *data = &menu_names[num];
MenuList *list = select_menu(w, num);
struct _MenuEntry *entries = data->entry_list;
@@ -548,8 +635,8 @@ create_menu(Widget w, XtermWidget xtw, MenuIndex num)
};
screen->menu_item_bitmap =
- XCreateBitmapFromData(XtDisplay(xtw),
- RootWindowOfScreen(XtScreen(xtw)),
+ XCreateBitmapFromData(XtDisplay(xw),
+ RootWindowOfScreen(XtScreen(xw)),
(char *) check_bits, check_width, check_height);
}
#if !OPT_TOOLBAR
@@ -560,17 +647,23 @@ create_menu(Widget w, XtermWidget xtw, MenuIndex num)
NULL, 0);
#endif
if (list->w != 0) {
- list->entries = nentries;
-
- for (; nentries > 0; nentries--, entries++) {
- cb[0].callback = (XtCallbackProc) entries->function;
- cb[0].closure = (caddr_t) entries->name;
- entries->widget = XtCreateManagedWidget(entries->name,
- (entries->function
- ? smeBSBObjectClass
- : smeLineObjectClass),
- list->w,
- &arg, (Cardinal) 1);
+ Boolean *unused = unusedEntries(xw, num);
+ Cardinal n;
+
+ list->entries = 0;
+
+ for (n = 0; n < nentries; ++n) {
+ if (!unused[n]) {
+ cb[0].callback = (XtCallbackProc) entries[n].function;
+ cb[0].closure = (caddr_t) entries[n].name;
+ entries[n].widget = XtCreateManagedWidget(entries[n].name,
+ (entries[n].function
+ ? smeBSBObjectClass
+ : smeLineObjectClass),
+ list->w,
+ &arg, (Cardinal) 1);
+ list->entries++;
+ }
}
}
#if !OPT_TOOLBAR
@@ -654,43 +747,11 @@ domenu(Widget w,
update_meta_esc();
update_delete_del();
update_keyboard_type();
-#if OPT_NUM_LOCK
- if (!screen->alt_is_not_meta) {
- SetItemSensitivity(mainMenuEntries[mainMenu_alt_esc].widget,
- False);
- }
+#ifdef PRINT_ON_EXIT
+ screen->write_error = !IsEmpty(resource.printOnXError);
+ SetItemSensitivity(mainMenuEntries[mainMenu_write_now].widget, False);
+ SetItemSensitivity(mainMenuEntries[mainMenu_write_error].widget, screen->write_error);
#endif
- if (!xtermHasPrinter(xw)) {
- SetItemSensitivity(mainMenuEntries[mainMenu_print].widget,
- False);
- SetItemSensitivity(mainMenuEntries[mainMenu_print_redir].widget,
- False);
- }
- if (screen->terminal_id < 200) {
- SetItemSensitivity(
- mainMenuEntries[mainMenu_8bit_ctrl].widget,
- False);
- }
-#if !defined(SIGTSTP)
- SetItemSensitivity(
- mainMenuEntries[mainMenu_suspend].widget, False);
-#endif
-#if !defined(SIGCONT)
- SetItemSensitivity(
- mainMenuEntries[mainMenu_continue].widget, False);
-#endif
-#ifdef ALLOWLOGGING
- if (screen->inhibit & I_LOG) {
- SetItemSensitivity(
- mainMenuEntries[mainMenu_logging].widget, False);
- }
-#endif
- if (screen->inhibit & I_SIGNAL) {
- int n;
- for (n = (int) mainMenu_suspend; n <= (int) mainMenu_quit; ++n) {
- SetItemSensitivity(mainMenuEntries[n].widget, False);
- }
- }
}
break;
@@ -717,21 +778,8 @@ domenu(Widget w,
update_altscreen();
update_titeInhibit();
#ifndef NO_ACTIVE_ICON
- if (!screen->fnt_icon.fs || !screen->iconVwin.window) {
- SetItemSensitivity(
- vtMenuEntries[vtMenu_activeicon].widget,
- False);
- } else
- update_activeicon();
+ update_activeicon();
#endif /* NO_ACTIVE_ICON */
-#if OPT_TEK4014
- if (screen->inhibit & I_TEK) {
- int n;
- for (n = (int) vtMenu_tekshow; n <= (int) vtMenu_vthide; ++n) {
- SetItemSensitivity(vtMenuEntries[n].widget, False);
- }
- }
-#endif
}
break;
@@ -834,10 +882,29 @@ HandlePopupMenu(Widget w,
{
TRACE(("HandlePopupMenu\n"));
if (domenu(w, event, params, param_count)) {
+ XtermWidget xw = term;
+ TScreen *screen = TScreenOf(xw);
+
#if OPT_TOOLBAR
w = select_menu(w, mainMenu)->w;
#endif
- XtCallActionProc(w, "XawPositionSimpleMenu", event, params, 1);
+ /*
+ * The action procedure in SimpleMenu.c, PositionMenu does not expect a
+ * key translation event when we are popping up a menu. In particular,
+ * if the pointer is outside the menu, then the action procedure will
+ * fail in its attempt to determine the location of the pointer within
+ * the menu. Anticipate that by warping the pointer into the menu when
+ * a key event is detected.
+ */
+ switch (event->type) {
+ case KeyPress:
+ case KeyRelease:
+ XWarpPointer(screen->display, None, XtWindow(w), 0, 0, 0, 0, 0, 0);
+ break;
+ default:
+ XtCallActionProc(w, "XawPositionSimpleMenu", event, params, 1);
+ break;
+ }
XtCallActionProc(w, "MenuPopup", event, params, 1);
}
}
@@ -1048,6 +1115,37 @@ do_logging(Widget gw GCC_UNUSED,
}
#endif
+#ifdef OPT_PRINT_ON_EXIT
+static void
+do_write_now(Widget gw GCC_UNUSED,
+ XtPointer closure GCC_UNUSED,
+ XtPointer data GCC_UNUSED)
+{
+ XtermWidget xw = term;
+
+ xtermPrintImmediately(xw,
+ (IsEmpty(resource.printFileNow)
+ ? "XTerm"
+ : resource.printFileNow),
+ resource.printOptsNow,
+ resource.printModeNow);
+}
+
+static void
+do_write_error(Widget gw GCC_UNUSED,
+ XtPointer closure GCC_UNUSED,
+ XtPointer data GCC_UNUSED)
+{
+ XtermWidget xw = term;
+
+ if (IsEmpty(resource.printFileOnXError)) {
+ resource.printFileOnXError = "XTermError";
+ }
+ TScreenOf(xw)->write_error = (Boolean) (!TScreenOf(xw)->write_error);
+ update_write_error();
+}
+#endif
+
static void
do_print(Widget gw GCC_UNUSED,
XtPointer closure GCC_UNUSED,
@@ -1061,7 +1159,10 @@ do_print_redir(Widget gw GCC_UNUSED,
XtPointer closure GCC_UNUSED,
XtPointer data GCC_UNUSED)
{
- setPrinterControlMode(term, TScreenOf(term)->printer_controlmode ? 0 : 2);
+ setPrinterControlMode(term,
+ (PrinterOf(TScreenOf(term)).printer_controlmode
+ ? 0
+ : 2));
}
static void
@@ -1948,6 +2049,26 @@ HandleLogging(Widget w,
}
#endif
+#if OPT_PRINT_ON_EXIT
+void
+HandleWriteNow(Widget w,
+ XEvent * event GCC_UNUSED,
+ String * params GCC_UNUSED,
+ Cardinal *param_count GCC_UNUSED)
+{
+ do_write_now(w, 0, 0);
+}
+
+void
+HandleWriteError(Widget w,
+ XEvent * event GCC_UNUSED,
+ String * params,
+ Cardinal *param_count)
+{
+ HANDLE_VT_TOGGLE(write_error);
+}
+#endif
+
/* ARGSUSED */
void
HandlePrintScreen(Widget w GCC_UNUSED,
@@ -2987,13 +3108,24 @@ update_logging(void)
}
#endif
+#if OPT_PRINT_ON_EXIT
+void
+update_write_error(void)
+{
+ UpdateCheckbox("update_write_error",
+ mainMenuEntries,
+ mainMenu_write_error,
+ TScreenOf(term)->write_error);
+}
+#endif
+
void
update_print_redir(void)
{
UpdateCheckbox("update_print_redir",
mainMenuEntries,
mainMenu_print_redir,
- TScreenOf(term)->printer_controlmode);
+ PrinterOf(TScreenOf(term)).printer_controlmode);
}
void
diff --git a/app/xterm/menu.h b/app/xterm/menu.h
index 3c14d4e4d..622e4b7aa 100644
--- a/app/xterm/menu.h
+++ b/app/xterm/menu.h
@@ -1,4 +1,4 @@
-/* $XTermId: menu.h,v 1.124 2011/04/23 12:14:21 tom Exp $ */
+/* $XTermId: menu.h,v 1.125 2011/07/11 09:41:34 tom Exp $ */
/*
* Copyright 1999-2010,2011 by Thomas E. Dickey
@@ -138,10 +138,12 @@ extern void HandleTekPage PROTO_XT_ACTIONS_ARGS;
extern void HandleTekReset PROTO_XT_ACTIONS_ARGS;
extern void HandleTiteInhibit PROTO_XT_ACTIONS_ARGS;
extern void HandleToolbar PROTO_XT_ACTIONS_ARGS;
-extern void HandleUTF8Mode PROTO_XT_ACTIONS_ARGS;
extern void HandleUTF8Fonts PROTO_XT_ACTIONS_ARGS;
+extern void HandleUTF8Mode PROTO_XT_ACTIONS_ARGS;
extern void HandleUTF8Title PROTO_XT_ACTIONS_ARGS;
extern void HandleVisibility PROTO_XT_ACTIONS_ARGS;
+extern void HandleWriteError PROTO_XT_ACTIONS_ARGS;
+extern void HandleWriteNow PROTO_XT_ACTIONS_ARGS;
extern void SetupMenus (Widget /*shell*/, Widget */*forms*/, Widget */*menus*/, Dimension * /*menu_high*/);
@@ -171,6 +173,10 @@ typedef enum {
#ifdef ALLOWLOGGING
mainMenu_logging,
#endif
+#if OPT_PRINT_ON_EXIT
+ mainMenu_write_now,
+ mainMenu_write_error,
+#endif
mainMenu_print,
mainMenu_print_redir,
mainMenu_line2,
@@ -358,6 +364,12 @@ extern void update_logging(void);
#define update_logging() /*nothing*/
#endif
+#if OPT_PRINT_ON_EXIT
+extern void update_write_error(void);
+#else
+#define update_write_error() /*nothing*/
+#endif
+
extern void update_print_redir(void);
extern void update_8bit_control(void);
extern void update_decbkm(void);
diff --git a/app/xterm/misc.c b/app/xterm/misc.c
index eae1c2e25..a4dfbaf71 100644
--- a/app/xterm/misc.c
+++ b/app/xterm/misc.c
@@ -1,4 +1,4 @@
-/* $XTermId: misc.c,v 1.521 2011/04/17 19:04:06 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 @@ open_userfile(uid_t uid, gid_t gid, char *path, Bool append)
* 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 @@ AllocateAnsiColor(XtermWidget xw,
} 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 @@ ReportColorRequest(XtermWidget xw, int ndx, int final)
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 @@ do_osc(XtermWidget xw, Char * oscbuf, size_t len, int final)
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
@@ -3284,6 +3286,13 @@ do_dcs(XtermWidget xw, Char * dcsbuf, size_t dcslen)
});
#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;
@@ -3521,10 +3530,10 @@ do_decrpm(XtermWidget xw, int nparams, int *params)
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);
@@ -3883,7 +3892,7 @@ ChangeTitle(XtermWidget xw, char *name)
ChangeGroup(xw, XtNtitle, name);
}
-#define Strlen(s) strlen((char *)(s))
+#define Strlen(s) strlen((const char *)(s))
void
ChangeXprop(char *buf)
@@ -3966,18 +3975,31 @@ AllocateTermColor(XtermWidget xw,
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;
@@ -4564,7 +4586,7 @@ sortedOpts(OptionHelp * options, XrmOptionDescRec * descs, Cardinal numDescs)
/* 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) {
@@ -4590,7 +4612,7 @@ sortedOpts(OptionHelp * options, XrmOptionDescRec * descs, Cardinal numDescs)
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
diff --git a/app/xterm/os2main.c b/app/xterm/os2main.c
index b82a0945e..2148c23ff 100644
--- a/app/xterm/os2main.c
+++ b/app/xterm/os2main.c
@@ -1,4 +1,4 @@
-/* $XTermId: os2main.c,v 1.269 2011/04/23 00:02:03 tom Exp $ */
+/* $XTermId: os2main.c,v 1.271 2011/07/10 22:19:51 tom Exp $ */
/* removed all foreign stuff to get the code more clear (hv)
* and did some rewrite for the obscure OS/2 environment
@@ -968,24 +968,21 @@ main(int argc, char **argv ENVP_ARG)
if (argc > 1) {
int n;
size_t unique = 2;
- Bool quit = True;
+ Bool quit = False;
for (n = 1; n < argc; n++) {
TRACE(("parsing %s\n", argv[n]));
if (abbrev(argv[n], "-version", unique)) {
Version();
+ quit = True;
} else if (abbrev(argv[n], "-help", unique)) {
Help();
+ quit = True;
} else if (abbrev(argv[n], "-class", (size_t) 3)) {
if ((my_class = argv[++n]) == 0) {
Help();
- } else {
- quit = False;
+ quit = True;
}
- unique = 3;
- } else {
- quit = False;
- unique = 3;
}
}
if (quit)
@@ -1120,10 +1117,10 @@ main(int argc, char **argv ENVP_ARG)
switch (argv[0][1]) {
case 'h': /* -help */
Help();
- continue;
+ exit(0);
case 'v': /* -version */
Version();
- continue;
+ exit(0);
case 'C':
{
struct stat sbuf;
@@ -1294,11 +1291,11 @@ main(int argc, char **argv ENVP_ARG)
/* Set up stderr properly. Opening this log file cannot be
done securely by a privileged xterm process (although we try),
so the debug feature is disabled by default. */
- char dbglogfile[45];
+ char dbglogfile[TIMESTAMP_LEN + 20];
int i = -1;
if (debug) {
timestamp_filename(dbglogfile, "xterm.debug.log.");
- if (creat_as(save_ruid, save_rgid, False, dbglogfile, 0666) > 0) {
+ if (creat_as(save_ruid, save_rgid, False, dbglogfile, 0600) > 0) {
i = open(dbglogfile, O_WRONLY | O_TRUNC);
}
}
@@ -1358,6 +1355,7 @@ main(int argc, char **argv ENVP_ARG)
}
#endif
+ TRACE(("checking winToEmbedInto %#lx\n", winToEmbedInto));
if (winToEmbedInto != None) {
XtRealizeWidget(toplevel);
/*
@@ -1365,6 +1363,9 @@ main(int argc, char **argv ENVP_ARG)
* 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);
diff --git a/app/xterm/package/debian/changelog b/app/xterm/package/debian/changelog
index 42ec82adb..d47ec3d75 100644
--- a/app/xterm/package/debian/changelog
+++ b/app/xterm/package/debian/changelog
@@ -1,3 +1,9 @@
+xterm-dev (271) unstable; urgency=low
+
+ * Ubuntu #756273 (accommodate function keys as popup-menu triggers)
+
+ -- Thomas E. Dickey <dickey@invisible-island.net> Fri, 29 Apr 2011 20:30:29 -0400
+
xterm-dev (270) unstable; urgency=low
* more fixes for fullscreen toggle.
diff --git a/app/xterm/package/debian/control b/app/xterm/package/debian/control
index f51153399..b970db25b 100644
--- a/app/xterm/package/debian/control
+++ b/app/xterm/package/debian/control
@@ -18,4 +18,6 @@ Description: X terminal emulator (development version)
implements ISO/ANSI colors, Unicode, and most of the control sequences
used by DEC VT220 terminals.
.
- This package contains a development version of xterm.
+ This package contains a development version of xterm. It is
+ configured to use "xterm-dev" and "XTermDev" for the program
+ and its resource class, to avoid conflict with other packages.
diff --git a/app/xterm/package/debian/rules b/app/xterm/package/debian/rules
index 304bf2ae5..b3c358f43 100644
--- a/app/xterm/package/debian/rules
+++ b/app/xterm/package/debian/rules
@@ -14,6 +14,7 @@ DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
DESKTOP_VENDOR = dickey
PKG_SUFFIX = -dev
+PKG_CLASS = XTermDev
PACKAGE := $(shell dpkg-parsechangelog| \
sed -n 's/^Source: \(.*\)$$/\1/p')
@@ -55,6 +56,7 @@ configure-stamp:
--sysconfdir=/etc/$(PACKAGE) \
--localstatedir=/var \
--libdir=/etc/$(PACKAGE) \
+ --with-app-class=$(PKG_CLASS) \
--without-xterm-symlink \
--enable-256-color \
--enable-88-color \
@@ -148,13 +150,6 @@ binary-indep: build install
# The Debian package does not install desktop files.
# http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=486317
- $(SHELL) -c 'for p in *.desktop;do \
- sed -i \
- -e "s/Categories=System;/Categories=Application;Utility;/" \
- -e "s/^\\(Name=.*\\)/\\1$(PKG_SUFFIX)/" \
- -e "s/^\\(Exec=.*\\)/\\1$(PKG_SUFFIX)/" \
- $$p; done'
-
$(MAKE) install-desktop \
DESKTOP_FLAGS="--vendor='$(DESKTOP_VENDOR)' --dir $(MY_DESKTOP)"
diff --git a/app/xterm/package/xterm.spec b/app/xterm/package/xterm.spec
index 360fb6bdf..028f173c7 100644
--- a/app/xterm/package/xterm.spec
+++ b/app/xterm/package/xterm.spec
@@ -1,11 +1,11 @@
-# $XTermId: xterm.spec,v 1.9 2011/03/20 18:53:25 tom Exp $
+# $XTermId: xterm.spec,v 1.13 2011/07/14 22:15:37 tom Exp $
Summary: A text-based Web browser
-Name: xterm
-Version: dev
-Release: 270
+Name: xterm-dev
+Version: 271
+Release: 1
License: X11
Group: Applications/Internet
-Source: xterm-%{release}.tgz
+Source: xterm-%{version}.tgz
# URL: http://invisible-island.net/xterm/
Provides: x-terminal-emulator
@@ -32,9 +32,13 @@ The xterm program uses bitmap images provided by the xbitmaps package.
Those interested in using koi8rxterm will likely want to install the
xfonts-cyrillic package as well.
+This package is configured to use "xterm-dev" and "XTermDev" for the program
+and its resource class, to avoid conflict with other packages.
+
%prep
%define my_suffix -dev
+%define my_class XTermDev
%define desktop_vendor dickey
%define desktop_utils %(if which desktop-file-install 2>&1 >/dev/null ; then echo "yes" ; fi)
@@ -52,7 +56,7 @@ xfonts-cyrillic package as well.
%define _pixmapsdir %{_datadir}/pixmaps
%define my_docdir %{_datadir}/doc/xterm%{my_suffix}
-%setup -q -n xterm-%{release}
+%setup -q -n xterm-%{version}
%build
CPPFLAGS="-DMISC_EXP -DEXP_HTTP_HEADERS" \
@@ -66,6 +70,7 @@ CPPFLAGS="-DMISC_EXP -DEXP_HTTP_HEADERS" \
--program-suffix=%{my_suffix} \
--without-xterm-symlink \
%endif
+ --with-app-class=%{my_class} \
--enable-256-color \
--enable-88-color \
--enable-dabbrev \
@@ -125,15 +130,6 @@ make install-bin install-man install-app install-icon \
chmod 644 $RPM_BUILD_ROOT%{my_docdir}/vttests/*
%if "%{desktop_utils}" == "yes"
-for p in *.desktop
-do
- sed -i \
- -e 's/Categories=System;/Categories=Application;Utility;/' \
- -e 's/^\\(Name=.*\\)/\\1%{my_suffix}/' \
- -e 's/^\\(Exec=.*\\)/\\1%{my_suffix}/' \
- $p
-done
-
make install-desktop \
DESKTOP_FLAGS="--vendor='%{desktop_vendor}' --dir $RPM_BUILD_ROOT%{_datadir}/applications"
diff --git a/app/xterm/print.c b/app/xterm/print.c
index 00023fbb9..a245cc6f5 100644
--- a/app/xterm/print.c
+++ b/app/xterm/print.c
@@ -1,4 +1,4 @@
-/* $XTermId: print.c,v 1.123 2011/04/17 19:45:14 tom Exp $ */
+/* $XTermId: print.c,v 1.138 2011/07/14 23:49:10 tom Exp $ */
/************************************************************
@@ -39,6 +39,7 @@ authorization.
#include <xstrings.h>
#include <stdio.h>
+#include <sys/stat.h>
#undef CTRL
#define CTRL(c) ((c) & 0x1f)
@@ -50,9 +51,11 @@ authorization.
#define CSET_OUT '0'
#define isForm(c) ((c) == '\r' || (c) == '\n' || (c) == '\f')
-#define Strlen(a) strlen((char *)a)
-#define Strcmp(a,b) strcmp((char *)a,(char *)b)
-#define Strncmp(a,b,c) strncmp((char *)a,(char *)b,c)
+#define Strlen(a) strlen((const char *)a)
+#define Strcmp(a,b) strcmp((const char *)a,(const char *)b)
+#define Strncmp(a,b,c) strncmp((const char *)a,(const char *)b,c)
+
+#define SPS PrinterOf(screen)
#ifdef VMS
#define VMS_TEMP_PRINT_FILE "sys$scratch:xterm_print.txt"
@@ -73,25 +76,20 @@ static void send_SGR(XtermWidget /* xw */ ,
static void stringToPrinter(XtermWidget /* xw */ ,
const char * /*str */ );
-static FILE *Printer;
-static pid_t Printer_pid;
-static int initialized;
-
void
closePrinter(XtermWidget xw GCC_UNUSED)
{
if (xtermHasPrinter(xw) != 0) {
-#ifdef VMS
TScreen *screen = TScreenOf(xw);
-
+#ifdef VMS
char pcommand[256];
(void) sprintf(pcommand, "%s %s;",
- screen->printer_command,
+ SPS.printer_command,
VMS_TEMP_PRINT_FILE);
#endif
- if (Printer != 0) {
- fclose(Printer);
+ if (SPS.fp != 0) {
+ fclose(SPS.fp);
TRACE(("closed printer, waiting...\n"));
#ifdef VMS /* This is a quick hack, really should use
spawn and check status or system services
@@ -101,8 +99,8 @@ closePrinter(XtermWidget xw GCC_UNUSED)
while (nonblocking_wait() > 0)
#endif /* VMS */
;
- Printer = 0;
- initialized = 0;
+ SPS.fp = 0;
+ SPS.isOpen = False;
TRACE(("closed printer\n"));
}
}
@@ -252,26 +250,32 @@ printLine(XtermWidget xw, int row, unsigned chr, PrinterFlags * p)
#define PrintNewLine() (unsigned) (((top < bot) || p->printer_newline) ? '\n' : '\0')
+static void
+printLines(XtermWidget xw, int top, int bot, PrinterFlags * p)
+{
+ TRACE(("printLines, rows %d..%d\n", top, bot));
+ while (top <= bot) {
+ printLine(xw, top, PrintNewLine(), p);
+ ++top;
+ }
+}
+
void
xtermPrintScreen(XtermWidget xw, Bool use_DECPEX, PrinterFlags * p)
{
if (XtIsRealized((Widget) xw)) {
TScreen *screen = TScreenOf(xw);
Bool extent = (use_DECPEX && p->printer_extent);
- int top = extent ? 0 : screen->top_marg;
- int bot = extent ? screen->max_row : screen->bot_marg;
- int was_open = initialized;
+ Boolean was_open = SPS.isOpen;
- TRACE(("xtermPrintScreen, rows %d..%d\n", top, bot));
-
- while (top <= bot) {
- printLine(xw, top, PrintNewLine(), p);
- ++top;
- }
+ printLines(xw,
+ extent ? 0 : screen->top_marg,
+ extent ? screen->max_row : screen->bot_marg,
+ p);
if (p->printer_formfeed)
charToPrinter(xw, '\f');
- if (!was_open || screen->printer_autoclose) {
+ if (!was_open || SPS.printer_autoclose) {
closePrinter(xw);
}
} else {
@@ -280,32 +284,59 @@ xtermPrintScreen(XtermWidget xw, Bool use_DECPEX, PrinterFlags * p)
}
/*
+ * If p->print_everything is zero, use this behavior:
* If the alternate screen is active, we'll print only that. Otherwise, print
* the normal screen plus all scrolled-back lines. The distinction is made
* because the normal screen's buffer is part of the overall scrollback buffer.
+ *
+ * Otherwise, decode bits:
+ * 1 = current screen
+ * 2 = normal screen
+ * 4 = alternate screen
+ * 8 = saved lines
*/
void
xtermPrintEverything(XtermWidget xw, PrinterFlags * p)
{
TScreen *screen = TScreenOf(xw);
- int top = 0;
- int bot = screen->max_row;
- int was_open = initialized;
+ Boolean was_open = SPS.isOpen;
+ int save_which = screen->whichBuf;
+ int done_which = 0;
- if (!screen->whichBuf) {
- top = -screen->savedlines - screen->topline;
- bot -= screen->topline;
- }
-
- TRACE(("xtermPrintEverything, rows %d..%d\n", top, bot));
- while (top <= bot) {
- printLine(xw, top, PrintNewLine(), p);
- ++top;
+ if (p->print_everything) {
+ if (p->print_everything & 8) {
+ printLines(xw, -screen->savedlines, -(screen->topline + 1), p);
+ }
+ if (p->print_everything & 4) {
+ screen->whichBuf = 1;
+ done_which |= 2;
+ printLines(xw, 0, screen->max_row, p);
+ screen->whichBuf = save_which;
+ }
+ if (p->print_everything & 2) {
+ screen->whichBuf = 0;
+ done_which |= 1;
+ printLines(xw, 0, screen->max_row, p);
+ screen->whichBuf = save_which;
+ }
+ if (p->print_everything & 1) {
+ if (!(done_which & (1 << screen->whichBuf))) {
+ printLines(xw, 0, screen->max_row, p);
+ }
+ }
+ } else {
+ int top = 0;
+ int bot = screen->max_row;
+ if (!screen->whichBuf) {
+ top = -screen->savedlines - screen->topline;
+ bot -= screen->topline;
+ }
+ printLines(xw, top, bot, p);
}
if (p->printer_formfeed)
charToPrinter(xw, '\f');
- if (!was_open || screen->printer_autoclose) {
+ if (!was_open || SPS.printer_autoclose) {
closePrinter(xw);
}
}
@@ -342,6 +373,7 @@ static void
send_SGR(XtermWidget xw, unsigned attr, unsigned fg, unsigned bg)
{
char msg[80];
+
strcpy(msg, "\033[0");
if (attr & BOLD)
strcat(msg, ";1");
@@ -380,8 +412,8 @@ charToPrinter(XtermWidget xw, unsigned chr)
{
TScreen *screen = TScreenOf(xw);
- if (!initialized && xtermHasPrinter(xw)) {
- switch (screen->printToFile) {
+ if (!SPS.isOpen && xtermHasPrinter(xw)) {
+ switch (SPS.toFile) {
/*
* write to a pipe.
*/
@@ -393,19 +425,20 @@ charToPrinter(XtermWidget xw, unsigned chr)
* be of the form:
* print/que=name/delete [/otherflags].
*/
- Printer = fopen(VMS_TEMP_PRINT_FILE, "w");
+ SPS.fp = fopen(VMS_TEMP_PRINT_FILE, "w");
#else
{
FILE *input;
int my_pipe[2];
int c;
+ pid_t my_pid;
if (pipe(my_pipe))
SysError(ERROR_FORK);
- if ((Printer_pid = fork()) < 0)
+ if ((my_pid = fork()) < 0)
SysError(ERROR_FORK);
- if (Printer_pid == 0) {
+ if (my_pid == 0) {
TRACE_CLOSE();
close(my_pipe[1]); /* printer is silent */
close(screen->respond);
@@ -422,41 +455,42 @@ charToPrinter(XtermWidget xw, unsigned chr)
if (xtermResetIds(screen) < 0)
exit(1);
- Printer = popen(screen->printer_command, "w");
+ SPS.fp = popen(SPS.printer_command, "w");
input = fdopen(my_pipe[0], "r");
while ((c = fgetc(input)) != EOF) {
- fputc(c, Printer);
+ fputc(c, SPS.fp);
if (isForm(c))
- fflush(Printer);
+ fflush(SPS.fp);
}
- pclose(Printer);
+ pclose(SPS.fp);
exit(0);
} else {
close(my_pipe[0]); /* won't read from printer */
- Printer = fdopen(my_pipe[1], "w");
+ SPS.fp = fdopen(my_pipe[1], "w");
TRACE(("opened printer from pid %d/%d\n",
- (int) getpid(), (int) Printer_pid));
+ (int) getpid(), (int) my_pid));
}
}
#endif
break;
case True:
- Printer = fopen(screen->printer_command, "w");
+ TRACE(("opening \"%s\" as printer output\n", SPS.printer_command));
+ SPS.fp = fopen(SPS.printer_command, "w");
break;
}
- initialized++;
+ SPS.isOpen = True;
}
- if (Printer != 0) {
+ if (SPS.fp != 0) {
#if OPT_WIDE_CHARS
if (chr > 127) {
Char temp[10];
*convertToUTF8(temp, chr) = 0;
- fputs((char *) temp, Printer);
+ fputs((char *) temp, SPS.fp);
} else
#endif
- fputc((int) chr, Printer);
+ fputc((int) chr, SPS.fp);
if (isForm(chr))
- fflush(Printer);
+ fflush(SPS.fp);
}
}
@@ -523,11 +557,11 @@ xtermAutoPrint(XtermWidget xw, unsigned chr)
{
TScreen *screen = TScreenOf(xw);
- if (screen->printer_controlmode == 1) {
+ if (SPS.printer_controlmode == 1) {
TRACE(("AutoPrint %d\n", chr));
printLine(xw, screen->cursorp.row, chr, getPrinterFlags(xw, NULL, 0));
- if (Printer != 0)
- fflush(Printer);
+ if (SPS.fp != 0)
+ fflush(SPS.fp);
}
}
@@ -548,8 +582,8 @@ xtermPrinterControl(XtermWidget xw, int chr)
{
TScreen *screen = TScreenOf(xw);
/* *INDENT-OFF* */
- static struct {
- Char seq[5];
+ static const struct {
+ const Char seq[5];
int active;
} tbl[] = {
{ { ANSI_CSI, '5', 'i' }, 2 },
@@ -584,8 +618,8 @@ xtermPrinterControl(XtermWidget xw, int chr)
if (length == len
&& Strcmp(bfr, tbl[n].seq) == 0) {
setPrinterControlMode(xw, tbl[n].active);
- if (screen->printer_autoclose
- && screen->printer_controlmode == 0)
+ if (SPS.printer_autoclose
+ && SPS.printer_controlmode == 0)
closePrinter(xw);
length = 0;
return 0;
@@ -615,7 +649,7 @@ xtermHasPrinter(XtermWidget xw)
{
TScreen *screen = TScreenOf(xw);
- return (strlen(screen->printer_command) != 0);
+ return (strlen(SPS.printer_command) != 0);
}
#define showPrinterControlMode(mode) \
@@ -631,15 +665,15 @@ setPrinterControlMode(XtermWidget xw, int mode)
TScreen *screen = TScreenOf(xw);
if (xtermHasPrinter(xw)
- && screen->printer_controlmode != mode) {
+ && SPS.printer_controlmode != mode) {
TRACE(("%s %s mode\n",
(mode
? "set"
: "reset"),
(mode
? showPrinterControlMode(mode)
- : showPrinterControlMode(screen->printer_controlmode))));
- screen->printer_controlmode = mode;
+ : showPrinterControlMode(SPS.printer_controlmode))));
+ SPS.printer_controlmode = mode;
update_print_redir();
}
}
@@ -668,10 +702,11 @@ getPrinterFlags(XtermWidget xw, String * params, Cardinal *param_count)
TRACE(("getPrinterFlags %d params\n", param_count ? *param_count : 0));
- result->printer_extent = screen->printer_extent;
- result->printer_formfeed = screen->printer_formfeed;
- result->printer_newline = screen->printer_newline;
- result->print_attributes = screen->print_attributes;
+ result->printer_extent = SPS.printer_extent;
+ result->printer_formfeed = SPS.printer_formfeed;
+ result->printer_newline = SPS.printer_newline;
+ result->print_attributes = SPS.print_attributes;
+ result->print_everything = SPS.print_everything;
if (param_count != 0 && *param_count != 0) {
Cardinal j;
@@ -694,3 +729,67 @@ getPrinterFlags(XtermWidget xw, String * params, Cardinal *param_count)
return result;
}
+
+/*
+ * Print a timestamped copy of everything.
+ */
+void
+xtermPrintImmediately(XtermWidget xw, String filename, int opts, int attrs)
+{
+ TScreen *screen = TScreenOf(xw);
+ PrinterState save_state = screen->printer_state;
+ char *my_filename = malloc(TIMESTAMP_LEN + strlen(filename));
+
+ if (my_filename != 0) {
+ unsigned save_umask = umask(0177);
+
+ timestamp_filename(my_filename, filename);
+ SPS.fp = 0;
+ SPS.isOpen = False;
+ SPS.toFile = True;
+ SPS.printer_command = my_filename;
+ SPS.printer_autoclose = True;
+ SPS.printer_formfeed = False;
+ SPS.printer_newline = True;
+ SPS.print_attributes = attrs;
+ SPS.print_everything = opts;
+ xtermPrintEverything(xw, getPrinterFlags(xw, NULL, 0));
+
+ umask(save_umask);
+ screen->printer_state = save_state;
+ }
+}
+
+void
+xtermPrintOnXError(XtermWidget xw, int n)
+{
+#if OPT_PRINT_ON_EXIT
+ /*
+ * The user may have requested that the contents of the screen will be
+ * written to a file if an X error occurs.
+ */
+ if (TScreenOf(xw)->write_error && !IsEmpty(resource.printFileOnXError)) {
+ Boolean printIt = False;
+
+ switch (n) {
+ case ERROR_XERROR:
+ /* FALLTHRU */
+ case ERROR_XIOERROR:
+ /* FALLTHRU */
+ case ERROR_ICEERROR:
+ printIt = True;
+ break;
+ }
+
+ if (printIt) {
+ xtermPrintImmediately(xw,
+ resource.printFileOnXError,
+ resource.printOptsOnXError,
+ resource.printModeOnXError);
+ }
+ }
+#else
+ (void) xw;
+ (void) n;
+#endif
+}
diff --git a/app/xterm/ptyx.h b/app/xterm/ptyx.h
index 569958ac9..6ff967d88 100644
--- a/app/xterm/ptyx.h
+++ b/app/xterm/ptyx.h
@@ -1,4 +1,4 @@
-/* $XTermId: ptyx.h,v 1.692 2011/04/25 08:33:57 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) \
@@ -1450,9 +1452,24 @@ typedef struct {
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];
@@ -1715,16 +1732,11 @@ typedef struct {
String answer_back; /* response to ENQ */
- Boolean printToFile; /* false, except for X-errors */
- 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 */
@@ -2322,6 +2334,8 @@ typedef struct _XtermWidgetRec {
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 */
@@ -2415,9 +2429,9 @@ typedef struct _TekWidgetRec {
#define USE_BOLD(screen) ((screen)->allowBoldFonts)
#if OPT_BLINK_TEXT
-#define BOLDATTR(screen) (USE_BOLD(screen) ? (BOLD | ((screen)->blink_as_bold ? BLINK : 0)) : 0)
+#define BOLDATTR(screen) (unsigned) (USE_BOLD(screen) ? (BOLD | ((screen)->blink_as_bold ? BLINK : 0)) : 0)
#else
-#define BOLDATTR(screen) (USE_BOLD(screen) ? (BOLD | BLINK) : 0)
+#define BOLDATTR(screen) (unsigned) (USE_BOLD(screen) ? (BOLD | BLINK) : 0)
#endif
/*
@@ -2453,6 +2467,8 @@ typedef struct _TekWidgetRec {
#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
diff --git a/app/xterm/terminfo b/app/xterm/terminfo
index 2583be46d..5d1b297cf 100644
--- a/app/xterm/terminfo
+++ b/app/xterm/terminfo
@@ -1,12 +1,12 @@
-# $XTermId: terminfo,v 1.133 2006/08/01 00:55:47 tom Exp $
+# $XTermId: terminfo,v 1.156 2011/07/04 11:11:43 tom Exp $
#
# $XFree86: xc/programs/xterm/terminfo,v 3.59 2006/02/13 01:14:59 dickey Exp $
#
-# XFree86 updates/notes/new entries (including xterm-8bit, xterm-16color)
+# Updates/notes/new entries (e.g., xterm-8bit, xterm-16color, xterm-256color)
# - Thomas E. Dickey
#
#------------------------------------------------------------------------------
-# Copyright 1996-2005,2006 by Thomas E. Dickey
+# Copyright 1996-2007,2011 by Thomas E. Dickey
#
# All Rights Reserved
#
@@ -132,43 +132,47 @@
xterm-new|modern xterm terminal emulator,
npc,
indn=\E[%p1%dS,
- kDC=\E[3;2~,
- kEND=\E[1;2F,
- kHOM=\E[1;2H,
- kIC=\E[2;2~,
- kLFT=\E[1;2D,
- kNXT=\E[6;2~,
- kPRV=\E[5;2~,
- kRIT=\E[1;2C,
kb2=\EOE,
kcbt=\E[Z,
- kcub1=\EOD,
- kcud1=\EOB,
- kcuf1=\EOC,
- kcuu1=\EOA,
- kend=\EOF,
kent=\EOM,
- khome=\EOH,
- kich1=\E[2~,
- kind=\E[1;2B,
- knp=\E[6~,
- kpp=\E[5~,
- kri=\E[1;2A,
rin=\E[%p1%dT,
use=xterm+pcfkeys,
+ use=xterm+tmux,
use=xterm-basic,
#
-# Encode modifiers using parameters (see ctlseqs.msg).
+# Encode modifiers using parameters (see "Xterm Control Sequences" ctlseqs.ms).
# Note that this is unrelated to PCTERM.
#
-# Some names are extensions allowed by ncurses:
+# Some names are extensions allowed by ncurses, e.g.,
# kDN, kDN5, kDN6, kLFT5, kLFT6, kRIT5, kRIT6, kUP, kUP5, kUP6
-# The numbers correspond to the modifier parameters, e.g., 5=control,
-# 6=control/shift.
+#
+# The uppercase names are made up, since there are no standards that apply.
+# If they were limited to two characters, they could in principle be translated
+# to termcap. However, termcap sizes are limited to 1023 bytes, so there is
+# little point in ensuring that extended key names can be translated to
+# termcap. A terminfo file can be up to 4096 bytes; using all extended keys
+# that xterm can generate would in fact exceed that limit.
+#
+# The numbers correspond to the modifier parameters documented in Xterm
+# Control Sequences:
+#
+# 2 Shift
+# 3 Alt
+# 4 Shift + Alt
+# 5 Control
+# 6 Shift + Control
+# 7 Alt + Control
+# 8 Shift + Alt + Control
+#
+# X/Open Curses defines some shift combinations, which are also used here
+# where applicable. Since it does define some shift combinations, no number
+# (2) is used for suffixing the made-up names. Some combinations are not
+# useful, e.g., they may reboot your computer, or they may require too many
+# fingers. I stopped at modifier 7, just to keep things simple -TD
#
# XTerm resources:
# ---------------
-# The xterm-pcfn, xterm-pcf0, xterm-pcf1, xterm-pcf2 and xterm-pcf3 fragments
+# The xterm+pcfn, xterm+pcf0, xterm+pcf1, xterm+pcf2 and xterm+pcf3 fragments
# correspond to default resource settings for xterm on a 104-key PC keyboard
# with 12 function-keys:
#
@@ -191,10 +195,37 @@ xterm-new|modern xterm terminal emulator,
# an application that required it.
#
xterm+pcfkeys|fragment for PC-style keys,
- use=xterm+pcf0,
+ use=xterm+app,
+ use=xterm+pcf2,
+ use=xterm+pce2,
use=xterm+pcc2,
-#
-# The ctrlFKeys resource is only relevant to the xterm-pcfn and xterm-pcfN
+
+# This chunk is based on suggestions by Ailin Nemui and Nicholas Marriott, who
+# asked for some of xterm's advanced features to be added to its terminfo
+# entry. It defines extended capabilities not found in standard terminfo or
+# termcap. These are useful in tmux, for instance, hence the name.
+#
+# One caveat in adding extended capabilities in ncurses is that if the names
+# are longer than two characters, then they will not be visible through the
+# termcap interface.
+#
+# Ms modifies the selection/clipboard. Its parameters are
+# p1 = the storage unit (clipboard, selection or cut buffer)
+# p2 = the base64-encoded clipboard content.
+#
+# Ss is used to set the cursor style as described by the DECSCUSR
+# function to a block or underline.
+# Se resets the cursor style to the terminal power-on default.
+#
+# Cs and Ce set and reset the cursor colour.
+xterm+tmux|advanced xterm features used in tmux,
+ Cr=\E]112\007,
+ Cs=\E]12;%p1%s\007,
+ Ms=\E]52;%p1%s;%p2%s\007,
+ Se=\E[2 q,
+ Ss=\E[%p1%d q,
+#
+# The ctrlFKeys resource is only relevant to the xterm+pcfn and xterm+pcfN
# entries, since the modifyFunctionKeys resource overrides ctrlFKeys when it is
# positive. A different choice of ctrlFKeys would give a different set of
# function-key strings.
@@ -369,12 +400,9 @@ xterm+pcf0|fragment with modifyFunctionKeys:0,
kf8=\E[19~,
kf9=\E[20~,
-# This is the same as xterm+pcf2 because the unmodified keys all happen to
-# have a pattern that forces the modifier to the same position.
+# This is almost the same as xterm+pcf2 because the unmodified keys all happen
+# to have a pattern that forces the modifier to the same position.
xterm+pcf1|fragment with modifyFunctionKeys:1,
- use=xterm+pcf2,
-
-xterm+pcf2|fragment with modifyFunctionKeys:2,
kf1=\EOP,
kf10=\E[21~,
kf11=\E[23~,
@@ -439,15 +467,80 @@ xterm+pcf2|fragment with modifyFunctionKeys:2,
kf8=\E[19~,
kf9=\E[20~,
+xterm+pcf2|fragment with modifyFunctionKeys:2,
+ kf1=\EOP,
+ kf10=\E[21~,
+ kf11=\E[23~,
+ kf12=\E[24~,
+ kf13=\E[1;2P,
+ kf14=\E[1;2Q,
+ kf15=\E[1;2R,
+ kf16=\E[1;2S,
+ kf17=\E[15;2~,
+ kf18=\E[17;2~,
+ kf19=\E[18;2~,
+ kf2=\EOQ,
+ kf20=\E[19;2~,
+ kf21=\E[20;2~,
+ kf22=\E[21;2~,
+ kf23=\E[23;2~,
+ kf24=\E[24;2~,
+ kf25=\E[1;5P,
+ kf26=\E[1;5Q,
+ kf27=\E[1;5R,
+ kf28=\E[1;5S,
+ kf29=\E[15;5~,
+ kf3=\EOR,
+ kf30=\E[17;5~,
+ kf31=\E[18;5~,
+ kf32=\E[19;5~,
+ kf33=\E[20;5~,
+ kf34=\E[21;5~,
+ kf35=\E[23;5~,
+ kf36=\E[24;5~,
+ kf37=\E[1;6P,
+ kf38=\E[1;6Q,
+ kf39=\E[1;6R,
+ kf4=\EOS,
+ kf40=\E[1;6S,
+ kf41=\E[15;6~,
+ kf42=\E[17;6~,
+ kf43=\E[18;6~,
+ kf44=\E[19;6~,
+ kf45=\E[20;6~,
+ kf46=\E[21;6~,
+ kf47=\E[23;6~,
+ kf48=\E[24;6~,
+ kf49=\E[1;3P,
+ kf5=\E[15~,
+ kf50=\E[1;3Q,
+ kf51=\E[1;3R,
+ kf52=\E[1;3S,
+ kf53=\E[15;3~,
+ kf54=\E[17;3~,
+ kf55=\E[18;3~,
+ kf56=\E[19;3~,
+ kf57=\E[20;3~,
+ kf58=\E[21;3~,
+ kf59=\E[23;3~,
+ kf6=\E[17~,
+ kf60=\E[24;3~,
+ kf61=\E[1;4P,
+ kf62=\E[1;4Q,
+ kf63=\E[1;4R,
+ kf7=\E[18~,
+ kf8=\E[19~,
+ kf9=\E[20~,
+
xterm+pcf3|fragment with modifyFunctionKeys:3,
kf1=\EOP,
kf10=\E[21~,
kf11=\E[23~,
kf12=\E[24~,
- kf13=\E[2P,
- kf14=\E[2Q,
- kf15=\E[2R,
- kf16=\E[2S,
+ kf13=\E[>1;2P,
+ kf14=\E[>1;2Q,
+ kf15=\E[>1;2R,
+ kf16=\E[>1;2S,
kf17=\E[>15;2~,
kf18=\E[>17;2~,
kf19=\E[>18;2~,
@@ -457,10 +550,10 @@ xterm+pcf3|fragment with modifyFunctionKeys:3,
kf22=\E[>21;2~,
kf23=\E[>23;2~,
kf24=\E[>24;2~,
- kf25=\E[5P,
- kf26=\E[5Q,
- kf27=\E[5R,
- kf28=\E[5S,
+ kf25=\E[>1;5P,
+ kf26=\E[>1;5Q,
+ kf27=\E[>1;5R,
+ kf28=\E[>1;5S,
kf29=\E[>15;5~,
kf3=\EOR,
kf30=\E[>17;5~,
@@ -470,11 +563,11 @@ xterm+pcf3|fragment with modifyFunctionKeys:3,
kf34=\E[>21;5~,
kf35=\E[>23;5~,
kf36=\E[>24;5~,
- kf37=\E[6P,
- kf38=\E[6Q,
- kf39=\E[6R,
+ kf37=\E[>1;6P,
+ kf38=\E[>1;6Q,
+ kf39=\E[>1;6R,
kf4=\EOS,
- kf40=\E[6S,
+ kf40=\E[>1;6S,
kf41=\E[>15;6~,
kf42=\E[>17;6~,
kf43=\E[>18;6~,
@@ -483,11 +576,11 @@ xterm+pcf3|fragment with modifyFunctionKeys:3,
kf46=\E[>21;6~,
kf47=\E[>23;6~,
kf48=\E[>24;6~,
- kf49=\E[3P,
+ kf49=\E[>1;3P,
kf5=\E[15~,
- kf50=\E[3Q,
- kf51=\E[3R,
- kf52=\E[3S,
+ kf50=\E[>1;3Q,
+ kf51=\E[>1;3R,
+ kf52=\E[>1;3S,
kf53=\E[>15;3~,
kf54=\E[>17;3~,
kf55=\E[>18;3~,
@@ -497,9 +590,9 @@ xterm+pcf3|fragment with modifyFunctionKeys:3,
kf59=\E[>23;3~,
kf6=\E[17~,
kf60=\E[>24;3~,
- kf61=\E[4P,
- kf62=\E[4Q,
- kf63=\E[4R,
+ kf61=\E[>1;4P,
+ kf62=\E[>1;4Q,
+ kf63=\E[>1;4R,
kf7=\E[18~,
kf8=\E[19~,
kf9=\E[20~,
@@ -523,55 +616,277 @@ xterm+pcf3|fragment with modifyFunctionKeys:3,
# modifyCursorKeys resource. These fragments list the modified cursor-keys
# that might apply to xterm+pcfkeys with different values of that resource.
xterm+pcc3|fragment with modifyCursorKeys:3,
+ kLFT=\E[>1;2D,
+ kRIT=\E[>1;2C,
+ kind=\E[>1;2B,
+ kri=\E[>1;2A,
kDN=\E[>1;2B,
+ kDN3=\E[>1;3B,
+ kDN4=\E[>1;4B,
kDN5=\E[>1;5B,
kDN6=\E[>1;6B,
+ kDN7=\E[>1;7B,
+ kLFT3=\E[>1;3D,
+ kLFT4=\E[>1;4D,
kLFT5=\E[>1;5D,
kLFT6=\E[>1;6D,
+ kLFT7=\E[>1;7D,
+ kRIT3=\E[>1;3C,
+ kRIT4=\E[>1;4C,
kRIT5=\E[>1;5C,
kRIT6=\E[>1;6C,
+ kRIT7=\E[>1;7C,
kUP=\E[>1;2A,
+ kUP3=\E[>1;3A,
+ kUP4=\E[>1;4A,
kUP5=\E[>1;5A,
kUP6=\E[>1;6A,
+ kUP7=\E[>1;7A,
xterm+pcc2|fragment with modifyCursorKeys:2,
+ kLFT=\E[1;2D,
+ kRIT=\E[1;2C,
+ kind=\E[1;2B,
+ kri=\E[1;2A,
kDN=\E[1;2B,
+ kDN3=\E[1;3B,
+ kDN4=\E[1;4B,
kDN5=\E[1;5B,
kDN6=\E[1;6B,
+ kDN7=\E[1;7B,
+ kLFT3=\E[1;3D,
+ kLFT4=\E[1;4D,
kLFT5=\E[1;5D,
kLFT6=\E[1;6D,
+ kLFT7=\E[1;7D,
+ kRIT3=\E[1;3C,
+ kRIT4=\E[1;4C,
kRIT5=\E[1;5C,
kRIT6=\E[1;6C,
+ kRIT7=\E[1;7C,
kUP=\E[1;2A,
+ kUP3=\E[1;3A,
+ kUP4=\E[1;4A,
kUP5=\E[1;5A,
kUP6=\E[1;6A,
+ kUP7=\E[1;7A,
xterm+pcc1|fragment with modifyCursorKeys:1,
+ kLFT=\E[2D,
+ kRIT=\E[2C,
+ kind=\E[2B,
+ kri=\E[2A,
kDN=\E[2B,
+ kDN3=\E[3B,
+ kDN4=\E[4B,
kDN5=\E[5B,
kDN6=\E[6B,
+ kDN7=\E[7B,
+ kLFT3=\E[3D,
+ kLFT4=\E[4D,
kLFT5=\E[5D,
kLFT6=\E[6D,
+ kLFT7=\E[7D,
+ kRIT3=\E[3C,
+ kRIT4=\E[4C,
kRIT5=\E[5C,
kRIT6=\E[6C,
+ kRIT7=\E[7C,
kUP=\E[2A,
+ kUP3=\E[3A,
+ kUP4=\E[4A,
kUP5=\E[5A,
kUP6=\E[6A,
+ kUP7=\E[7A,
xterm+pcc0|fragment with modifyCursorKeys:0,
+ kLFT=\EO2D,
+ kRIT=\EO2C,
+ kind=\EO2B,
+ kri=\EO2A,
kDN=\EO2B,
+ kDN3=\EO3B,
+ kDN4=\EO4B,
kDN5=\EO5B,
kDN6=\EO6B,
+ kDN7=\EO7B,
+ kLFT3=\EO3D,
+ kLFT4=\EO4D,
kLFT5=\EO5D,
kLFT6=\EO6D,
+ kLFT7=\EO7D,
+ kRIT3=\EO3C,
+ kRIT4=\EO4C,
kRIT5=\EO5C,
kRIT6=\EO6C,
+ kRIT7=\EO7C,
kUP=\EO2A,
+ kUP3=\EO3A,
+ kUP4=\EO4A,
kUP5=\EO5A,
kUP6=\EO6A,
+ kUP7=\EO7A,
+
+# The home/end keys on the editing keypad are also treated as cursor keys.
+xterm+pce3|fragment with modifyCursorKeys:3,
+ kDC=\E[>3;2~,
+ kEND=\E[>1;2F,
+ kHOM=\E[>1;2H,
+ kIC=\E[>2;2~,
+ kNXT=\E[>6;2~,
+ kPRV=\E[>5;2~,
+ kDC3=\E[>3;3~,
+ kDC4=\E[>3;4~,
+ kDC5=\E[>3;5~,
+ kDC6=\E[>3;6~,
+ kDC7=\E[>3;7~,
+ kEND3=\E[>1;3F,
+ kEND4=\E[>1;4F,
+ kEND5=\E[>1;5F,
+ kEND6=\E[>1;6F,
+ kEND7=\E[>1;7F,
+ kHOM3=\E[>1;3H,
+ kHOM4=\E[>1;4H,
+ kHOM5=\E[>1;5H,
+ kHOM6=\E[>1;6H,
+ kHOM7=\E[>1;7H,
+ kIC3=\E[>2;3~,
+ kIC4=\E[>2;4~,
+ kIC5=\E[>2;5~,
+ kIC6=\E[>2;6~,
+ kIC7=\E[>2;7~,
+ kNXT3=\E[>6;3~,
+ kNXT4=\E[>6;4~,
+ kNXT5=\E[>6;5~,
+ kNXT6=\E[>6;6~,
+ kNXT7=\E[>6;7~,
+ kPRV3=\E[>5;3~,
+ kPRV4=\E[>5;4~,
+ kPRV5=\E[>5;5~,
+ kPRV6=\E[>5;6~,
+ kPRV7=\E[>5;7~,
+ use=xterm+pce0,
+
+xterm+pce2|fragment with modifyCursorKeys:2,
+ kDC=\E[3;2~,
+ kEND=\E[1;2F,
+ kHOM=\E[1;2H,
+ kIC=\E[2;2~,
+ kNXT=\E[6;2~,
+ kPRV=\E[5;2~,
+ kDC3=\E[3;3~,
+ kDC4=\E[3;4~,
+ kDC5=\E[3;5~,
+ kDC6=\E[3;6~,
+ kDC7=\E[3;7~,
+ kEND3=\E[1;3F,
+ kEND4=\E[1;4F,
+ kEND5=\E[1;5F,
+ kEND6=\E[1;6F,
+ kEND7=\E[1;7F,
+ kHOM3=\E[1;3H,
+ kHOM4=\E[1;4H,
+ kHOM5=\E[1;5H,
+ kHOM6=\E[1;6H,
+ kHOM7=\E[1;7H,
+ kIC3=\E[2;3~,
+ kIC4=\E[2;4~,
+ kIC5=\E[2;5~,
+ kIC6=\E[2;6~,
+ kIC7=\E[2;7~,
+ kNXT3=\E[6;3~,
+ kNXT4=\E[6;4~,
+ kNXT5=\E[6;5~,
+ kNXT6=\E[6;6~,
+ kNXT7=\E[6;7~,
+ kPRV3=\E[5;3~,
+ kPRV4=\E[5;4~,
+ kPRV5=\E[5;5~,
+ kPRV6=\E[5;6~,
+ kPRV7=\E[5;7~,
+ use=xterm+pce0,
+
+xterm+pce1|fragment with modifyCursorKeys:1,
+ kDC=\E[3;2~,
+ kEND=\E[2F,
+ kHOM=\E[2H,
+ kIC=\E[2;2~,
+ kNXT=\E[6;2~,
+ kPRV=\E[5;2~,
+ kDC3=\E[3;3~,
+ kDC4=\E[3;4~,
+ kDC5=\E[3;5~,
+ kDC6=\E[3;6~,
+ kDC7=\E[3;7~,
+ kEND3=\E[3F,
+ kEND4=\E[4F,
+ kEND5=\E[5F,
+ kEND6=\E[6F,
+ kEND7=\E[7F,
+ kHOM3=\E[3H,
+ kHOM4=\E[4H,
+ kHOM5=\E[5H,
+ kHOM6=\E[6H,
+ kHOM7=\E[7H,
+ kIC3=\E[2;3~,
+ kIC4=\E[2;4~,
+ kIC5=\E[2;5~,
+ kIC6=\E[2;6~,
+ kIC7=\E[2;7~,
+ kNXT3=\E[6;3~,
+ kNXT4=\E[6;4~,
+ kNXT5=\E[6;5~,
+ kNXT6=\E[6;6~,
+ kNXT7=\E[6;7~,
+ kPRV3=\E[5;3~,
+ kPRV4=\E[5;4~,
+ kPRV5=\E[5;5~,
+ kPRV6=\E[5;6~,
+ kPRV7=\E[5;7~,
+ use=xterm+pce0,
+
+xterm+pce0|fragment with modifyCursorKeys:0,
+ kDC=\E[3;2~,
+ kEND=\EO2F,
+ kHOM=\EO2H,
+ kIC=\E[2;2~,
+ kNXT=\E[6;2~,
+ kPRV=\E[5;2~,
+ kDC3=\E[3;3~,
+ kDC4=\E[3;4~,
+ kDC5=\E[3;5~,
+ kDC6=\E[3;6~,
+ kDC7=\E[3;7~,
+ kEND3=\EO3F,
+ kEND4=\EO4F,
+ kEND5=\EO5F,
+ kEND6=\EO6F,
+ kEND7=\EO7F,
+ kHOM3=\EO3H,
+ kHOM4=\EO4H,
+ kHOM5=\EO5H,
+ kHOM6=\EO6H,
+ kHOM7=\EO7H,
+ kIC3=\E[2;3~,
+ kIC4=\E[2;4~,
+ kIC5=\E[2;5~,
+ kIC6=\E[2;6~,
+ kIC7=\E[2;7~,
+ kNXT3=\E[6;3~,
+ kNXT4=\E[6;4~,
+ kNXT5=\E[6;5~,
+ kNXT6=\E[6;6~,
+ kNXT7=\E[6;7~,
+ kPRV3=\E[5;3~,
+ kPRV4=\E[5;4~,
+ kPRV5=\E[5;5~,
+ kPRV6=\E[5;6~,
+ kPRV7=\E[5;7~,
+ use=xterm+edit,
#
# This chunk is used for building the VT220/Sun/PC keyboard variants.
xterm-basic|modern xterm terminal emulator - common,
+ OTbs,
am,
bce,
km,
@@ -625,7 +940,6 @@ xterm-basic|modern xterm terminal emulator - common,
invis=\E[8m,
is2=\E[!p\E[?3;4l\E[4l\E>,
kbs=^H,
- kdch1=\E[3~,
kmous=\E[M,
mc0=\E[i,
mc4=\E[4i,
@@ -688,10 +1002,6 @@ xterm-vt220|xterm emulating vt220,
kc1=\EOq,
kc3=\EOs,
kcbt=\E[Z,
- kcub1=\EOD,
- kcud1=\EOB,
- kcuf1=\EOC,
- kcuu1=\EOA,
kend=\E[4~,
kent=\EOM,
kf1=\EOP,
@@ -718,6 +1028,12 @@ xterm-vt220|xterm emulating vt220,
kich1=\E[2~,
knp=\E[6~,
kpp=\E[5~,
+ ka2=\EOx,
+ kb1=\EOt,
+ kb3=\EOv,
+ kc2=\EOr,
+ use=xterm+app,
+ use=xterm+edit,
use=xterm-basic,
#
xterm-vt52|xterm emulating dec vt52,
@@ -872,12 +1188,7 @@ xterm-hp|xterm with hpterm function keys,
#
xterm-sco|xterm with SCO function keys,
kbeg=\E[E,
- kcub1=\E[D,
- kcud1=\E[B,
- kcuf1=\E[C,
- kcuu1=\E[A,
kdch1=\177,
- kend=\E[F,
kf1=\E[M,
kf10=\E[V,
kf11=\E[W,
@@ -926,28 +1237,28 @@ xterm-sco|xterm with SCO function keys,
kf7=\E[S,
kf8=\E[T,
kf9=\E[U,
- khome=\E[H,
kich1=\E[L,
kmous=\E[>M,
knp=\E[G,
kpp=\E[I,
+ use=xterm+noapp,
use=xterm-basic,
#
-# Other variants:
+# Other variants (these are all very old entries, from X11R5):
xterm-24|xterms|vs100|xterm terminal emulator (X Window System),
lines#24,
- use=xterm,
+ use=xterm-old,
xterm-65|xterm with tall window 65x80 (X Window System),
lines#65,
- use=xterm,
+ use=xterm-old,
xterm-bold|xterm with bold instead of underline (X Window System),
smso=\E[7m,
smul=\E[1m,
- use=xterm,
+ use=xterm-old,
xterm-boldso|xterm with bold for standout (X Window System),
rmso=\E[m,
smso=\E[1m,
- use=xterm,
+ use=xterm-old,
xterm-mono|monochrome xterm,
bce@,
colors@,
@@ -959,7 +1270,7 @@ xterm-mono|monochrome xterm,
setb@,
setf@,
sgr@,
- use=xterm,
+ use=xterm-old,
#
# VTxxx terminals are usually set up so that full-screen applications will use
# the cursor application mode strings. This is good for full-screen
@@ -992,15 +1303,57 @@ xterm-mono|monochrome xterm,
# programs are "smart" and disable these.
#
xterm-noapp|xterm with cursor keys in normal mode,
- kcub1=\E[D,
- kcud1=\E[B,
- kcuf1=\E[C,
- kcuu1=\E[A,
rmcup@,
rmkx=\E>,
smcup@,
smkx=\E=,
+ use=xterm+noapp,
use=xterm,
+
+xterm+noapp|fragment with cursor keys in normal mode,
+ kcub1=\E[D,
+ kcud1=\E[B,
+ kcuf1=\E[C,
+ kcuu1=\E[A,
+ use=xterm+noapp+pc,
+
+xterm+app|fragment with cursor keys in application mode,
+ kcub1=\EOD,
+ kcud1=\EOB,
+ kcuf1=\EOC,
+ kcuu1=\EOA,
+ use=xterm+app+pc,
+
+xterm+noapp+pc|fragment for noapp pc-style home/end,
+ kend=\E[F,
+ khome=\E[H,
+
+xterm+app+pc|fragment for app pc-style home/end,
+ kend=\EOF,
+ khome=\EOH,
+
+xterm+edit|fragment for 6-key editing-keypad,
+ kdch1=\E[3~,
+ kich1=\E[2~,
+ knp=\E[6~,
+ kpp=\E[5~,
+ use=xterm+pc+edit,
+
+xterm+decedit|fragment for vt220 6-key editing-keypad,
+ kdch1=\E[3~,
+ kich1=\E[2~,
+ knp=\E[6~,
+ kpp=\E[5~,
+ use=xterm+vt+edit,
+
+xterm+pc+edit|fragment for pc-style editing keypad,
+ kend=\E[4~,
+ khome=\E[1~,
+
+xterm+vt+edit|fragment for vt220-style editing keypad,
+ kfnd=\E[1~,
+ kslt=\E[4~,
+
#
# This should work for the commonly used "color xterm" variations (XFree86
# xterm, color_xterm, nxterm, rxvt). Note that it does not set 'bce', so for
@@ -1097,6 +1450,7 @@ xterm-88color|xterm with 88 colors,
# CSI \E [ \233
#
xterm-8bit|xterm terminal emulator with 8-bit controls (X Window System),
+ OTbs,
am,
bce,
km,
@@ -1105,6 +1459,7 @@ xterm-8bit|xterm terminal emulator with 8-bit controls (X Window System),
msgr,
npc,
xenl,
+ AX,
colors#8,
cols#80,
it#8,
@@ -1228,6 +1583,180 @@ xterm-8bit|xterm terminal emulator with 8-bit controls (X Window System),
u9=\E[c,
vpa=\233%i%p1%dd,
#
+xterm-xf86-v44|xterm terminal emulator (XFree86 4.4 Window System),
+ OTbs,
+ am,
+ bce,
+ km,
+ mc5i,
+ mir,
+ msgr,
+ npc,
+ xenl,
+ AX,
+ colors#8,
+ cols#80,
+ it#8,
+ lines#24,
+ pairs#64,
+ acsc=``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
+ bel=^G,
+ blink=\E[5m,
+ bold=\E[1m,
+ cbt=\E[Z,
+ civis=\E[?25l,
+ clear=\E[H\E[2J,
+ cnorm=\E[?12l\E[?25h,
+ cr=^M,
+ csr=\E[%i%p1%d;%p2%dr,
+ cub=\E[%p1%dD,
+ cub1=^H,
+ cud=\E[%p1%dB,
+ cud1=^J,
+ cuf=\E[%p1%dC,
+ cuf1=\E[C,
+ cup=\E[%i%p1%d;%p2%dH,
+ cuu=\E[%p1%dA,
+ cuu1=\E[A,
+ cvvis=\E[?12;25h,
+ dch=\E[%p1%dP,
+ dch1=\E[P,
+ dl=\E[%p1%dM,
+ dl1=\E[M,
+ ech=\E[%p1%dX,
+ ed=\E[J,
+ el=\E[K,
+ el1=\E[1K,
+ enacs=\E(B\E)0,
+ flash=\E[?5h$<100/>\E[?5l,
+ home=\E[H,
+ hpa=\E[%i%p1%dG,
+ ht=^I,
+ hts=\EH,
+ ich=\E[%p1%d@,
+ il=\E[%p1%dL,
+ il1=\E[L,
+ ind=^J,
+ indn=\E[%p1%dS,
+ invis=\E[8m,
+ is2=\E[!p\E[?3;4l\E[4l\E>,
+ kDC=\E[3;2~,
+ kEND=\E[1;2F,
+ kHOM=\E[1;2H,
+ kIC=\E[2;2~,
+ kLFT=\E[1;2D,
+ kNXT=\E[6;2~,
+ kPRV=\E[5;2~,
+ kRIT=\E[1;2C,
+ kb2=\EOE,
+ kbs=^H,
+ kcbt=\E[Z,
+ kcub1=\EOD,
+ kcud1=\EOB,
+ kcuf1=\EOC,
+ kcuu1=\EOA,
+ kdch1=\E[3~,
+ kend=\EOF,
+ kent=\EOM,
+ kf1=\EOP,
+ kf10=\E[21~,
+ kf11=\E[23~,
+ kf12=\E[24~,
+ kf13=\EO2P,
+ kf14=\EO2Q,
+ kf15=\EO2R,
+ kf16=\EO2S,
+ kf17=\E[15;2~,
+ kf18=\E[17;2~,
+ kf19=\E[18;2~,
+ kf2=\EOQ,
+ kf20=\E[19;2~,
+ kf21=\E[20;2~,
+ kf22=\E[21;2~,
+ kf23=\E[23;2~,
+ kf24=\E[24;2~,
+ kf25=\EO5P,
+ kf26=\EO5Q,
+ kf27=\EO5R,
+ kf28=\EO5S,
+ kf29=\E[15;5~,
+ kf3=\EOR,
+ kf30=\E[17;5~,
+ kf31=\E[18;5~,
+ kf32=\E[19;5~,
+ kf33=\E[20;5~,
+ kf34=\E[21;5~,
+ kf35=\E[23;5~,
+ kf36=\E[24;5~,
+ kf37=\EO6P,
+ kf38=\EO6Q,
+ kf39=\EO6R,
+ kf4=\EOS,
+ kf40=\EO6S,
+ kf41=\E[15;6~,
+ kf42=\E[17;6~,
+ kf43=\E[18;6~,
+ kf44=\E[19;6~,
+ kf45=\E[20;6~,
+ kf46=\E[21;6~,
+ kf47=\E[23;6~,
+ kf48=\E[24;6~,
+ kf5=\E[15~,
+ kf6=\E[17~,
+ kf7=\E[18~,
+ kf8=\E[19~,
+ kf9=\E[20~,
+ khome=\EOH,
+ kich1=\E[2~,
+ kmous=\E[M,
+ knp=\E[6~,
+ kpp=\E[5~,
+ mc0=\E[i,
+ mc4=\E[4i,
+ mc5=\E[5i,
+ meml=\El,
+ memu=\Em,
+ op=\E[39;49m,
+ rc=\E8,
+ rev=\E[7m,
+ ri=\EM,
+ rin=\E[%p1%dT,
+ rmacs=^O,
+ rmam=\E[?7l,
+ rmcup=\E[?1049l,
+ rmir=\E[4l,
+ rmkx=\E[?1l\E>,
+ rmso=\E[27m,
+ rmul=\E[24m,
+ rs1=\Ec,
+ rs2=\E[!p\E[?3;4l\E[4l\E>,
+ sc=\E7,
+ setab=\E[4%p1%dm,
+ setaf=\E[3%p1%dm,
+ setb=\E[4%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}%=%t3%e%p1%d%;m,
+ setf=\E[3%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}%=%t3%e%p1%d%;m,
+ sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;%?%p7%t;8%;m%?%p9%t\016%e\017%;,
+ sgr0=\E[m\017,
+ smacs=^N,
+ smam=\E[?7h,
+ smcup=\E[?1049h,
+ smir=\E[4h,
+ smkx=\E[?1h\E=,
+ smso=\E[7m,
+ smul=\E[4m,
+ tbc=\E[3g,
+ u6=\E[%i%d;%dR,
+ u7=\E[6n,
+ u8=\E[?1;2c,
+ u9=\E[c,
+ vpa=\E[%i%p1%dd,
+ ka2=\EOx,
+ kb1=\EOt,
+ kb3=\EOv,
+ kc2=\EOr,
+xterm-xfree86|xterm terminal emulator (XFree86 4.4 Window System),
+ use=xterm-xf86-v44,
+#
# Compatible with the R6 xterm, with the following changes:
# + added acsc (perhaps some versions of tic assume the standard vt100
# alternate character set)
@@ -1235,6 +1764,7 @@ xterm-8bit|xterm terminal emulator with 8-bit controls (X Window System),
# + added kmous string for ncurses.
# + added khome/kend strings (which conflict with kfnd/kslt, see note).
xterm-r6|xterm-old|xterm X11R6 version,
+ OTbs,
am,
km,
mir,
@@ -1245,7 +1775,6 @@ xterm-r6|xterm-old|xterm X11R6 version,
lines#24,
acsc=``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
bel=^G,
- blink@,
bold=\E[1m,
clear=\E[H\E[2J,
cr=^M,
@@ -1278,8 +1807,7 @@ xterm-r6|xterm-old|xterm X11R6 version,
kcud1=\EOB,
kcuf1=\EOC,
kcuu1=\EOA,
- kdch1=\177,
- kend=\E[4~,
+ kdch1=\E[3~,
kf1=\E[11~,
kf10=\E[21~,
kf11=\E[23~,
@@ -1300,11 +1828,7 @@ xterm-r6|xterm-old|xterm X11R6 version,
kf7=\E[18~,
kf8=\E[19~,
kf9=\E[20~,
- khome=\E[1~,
- kich1=\E[2~,
kmous=\E[M,
- knp=\E[6~,
- kpp=\E[5~,
meml=\El,
memu=\Em,
rc=\E8,
@@ -1330,6 +1854,7 @@ xterm-r6|xterm-old|xterm X11R6 version,
u7=\E[6n,
u8=\E[?1;2c,
u9=\E[c,
+ use=xterm+decedit,
#
# Compatible with the R5 xterm, with the following changes:
# + changed 'blink=@', to 'blink@' (the former meant that "@" would start
@@ -1344,6 +1869,7 @@ xterm-r6|xterm-old|xterm X11R6 version,
# + added u6, u7, u8, u9 strings for Daniel Weaver's tack program.
# + added kmous string for ncurses.
xterm-r5|xterm R5 version,
+ OTbs,
am,
km,
msgr,
@@ -1352,7 +1878,6 @@ xterm-r5|xterm R5 version,
it#8,
lines#24,
bel=^G,
- blink@,
bold=\E[1m,
clear=\E[H\E[2J,
cr=^M,
@@ -1385,7 +1910,7 @@ xterm-r5|xterm R5 version,
kcud1=\EOB,
kcuf1=\EOC,
kcuu1=\EOA,
- kdch1=\177,
+ kdch1=\E[3~,
kdl1=\E[31~,
kel=\E[8~,
kend=\E[4~,
@@ -1429,9 +1954,8 @@ xterm-r5|xterm R5 version,
u8=\E[?1;2c,
u9=\E[c,
#
+#
# Customization begins here.
-xterm-xfree86|xterm terminal emulator (XFree86),
- use=xterm-new,
#
# This is the only entry which you should have to customize, since "xterm"
# is widely used for a variety of incompatible terminal emulations including
diff --git a/app/xterm/trace.c b/app/xterm/trace.c
index 3ae407b2c..885578c41 100644
--- a/app/xterm/trace.c
+++ b/app/xterm/trace.c
@@ -1,4 +1,4 @@
-/* $XTermId: trace.c,v 1.122 2011/04/17 19:21:11 tom Exp $ */
+/* $XTermId: trace.c,v 1.125 2011/07/12 09:31:05 tom Exp $ */
/*
* Copyright 1997-2010,2011 by Thomas E. Dickey
@@ -513,6 +513,7 @@ TraceFocus(Widget w, XEvent * ev)
TRACE(("\tdetail: %s\n", visibleNotifyDetail(event->detail)));
TRACE(("\tmode: %d\n", event->mode));
TRACE(("\twindow: %#lx\n", event->window));
+ TRACE(("\tfocus: %d\n", event->focus));
TRACE(("\troot: %#lx\n", event->root));
TRACE(("\tsubwindow: %#lx\n", event->subwindow));
}
@@ -604,14 +605,14 @@ TraceTranslations(const char *name, Widget w)
int
TraceResizeRequest(const char *fn, int ln, Widget w,
- Dimension reqwide,
- Dimension reqhigh,
+ unsigned reqwide,
+ unsigned reqhigh,
Dimension * gotwide,
Dimension * gothigh)
{
int rc;
- TRACE(("%s@%d ResizeRequest %dx%d\n", fn, ln, reqhigh, reqwide));
+ TRACE(("%s@%d ResizeRequest %ux%u\n", fn, ln, reqhigh, reqwide));
rc = XtMakeResizeRequest((Widget) w, reqwide, reqhigh, gotwide, gothigh);
TRACE(("... ResizeRequest -> "));
if (gothigh && gotwide)
@@ -635,12 +636,21 @@ TraceXtermResources(void)
XRES_S(icon_name);
XRES_S(term_name);
XRES_S(tty_modes);
+ XRES_I(minBufSize);
+ XRES_I(maxBufSize);
XRES_B(hold_screen);
XRES_B(utmpInhibit);
XRES_B(utmpDisplayId);
XRES_B(messages);
+ XRES_S(menuLocale);
+ XRES_S(omitTranslation);
+ XRES_S(keyboardType);
#if OPT_PRINT_ON_EXIT
+ XRES_I(printModeNow);
XRES_I(printModeOnXError);
+ XRES_I(printOptsNow);
+ XRES_I(printOptsOnXError);
+ XRES_S(printFileNow);
XRES_S(printFileOnXError);
#endif
#if OPT_SUNPC_KBD
diff --git a/app/xterm/trace.h b/app/xterm/trace.h
index f359ef47f..5b5727511 100644
--- a/app/xterm/trace.h
+++ b/app/xterm/trace.h
@@ -1,4 +1,4 @@
-/* $XTermId: trace.h,v 1.56 2010/11/11 01:10:52 tom Exp $ */
+/* $XTermId: trace.h,v 1.57 2011/07/08 10:51:08 tom Exp $ */
/*
*
@@ -101,11 +101,11 @@ extern void TraceXtermResources(void);
#undef TRACE_XRES
#define TRACE_XRES() TraceXtermResources()
-extern int TraceResizeRequest(const char * /* fn */, int /* ln */, Widget /* w */, Dimension /* reqwide */, Dimension /* reqhigh */, Dimension * /* gotwide */, Dimension * /* gothigh */);
+extern int 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, \
- (Dimension) (reqwide), (Dimension) (reqhigh), \
+ (reqwide), (reqhigh), \
(gotwide), (gothigh))
#else
diff --git a/app/xterm/version.h b/app/xterm/version.h
index 937ace22a..5f12d3de2 100644
--- a/app/xterm/version.h
+++ b/app/xterm/version.h
@@ -1,5 +1,5 @@
/*
- * $XTermId: version.h,v 1.328 2011/03/19 14:31:41 tom Exp $
+ * $XTermId: version.h,v 1.329 2011/04/29 23:01:38 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 270
+#define XTERM_PATCH 271
#ifndef __vendorversion__
#define __vendorversion__ "XTerm/OpenBSD"
diff --git a/app/xterm/vttests/dynamic.pl b/app/xterm/vttests/dynamic.pl
new file mode 100644
index 000000000..a7f4d5733
--- /dev/null
+++ b/app/xterm/vttests/dynamic.pl
@@ -0,0 +1,131 @@
+#!/usr/bin/perl -w
+# $XTermId: dynamic.pl,v 1.2 2011/07/05 09:32:53 tom Exp $
+# -----------------------------------------------------------------------------
+# this file is part of xterm
+#
+# Copyright 2011 by Thomas E. Dickey
+#
+# All Rights Reserved
+#
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, sublicense, and/or sell copies of the Software, and to
+# permit persons to whom the Software is furnished to do so, subject to
+# the following conditions:
+#
+# The above copyright notice and this permission notice shall be included
+# in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+# IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY
+# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+# Except as contained in this notice, the name(s) of the above copyright
+# holders shall not be used in advertising or otherwise to promote the
+# sale, use or other dealings in this Software without prior written
+# authorization.
+# -----------------------------------------------------------------------------
+# Test the dynamic-color query option of xterm.
+# The programs xtermcontrol and xtermset provide more options.
+
+use strict;
+
+use Getopt::Std;
+use IO::Handle;
+
+our @color_names = (
+ "VT100 text foreground",
+ "VT100 text background",
+ "text cursor",
+ "mouse foreground",
+ "mouse background",
+ "Tektronix foreground",
+ "Tektronix background",
+ "highlight background",
+ "Tektronix cursor",
+ "highlight foreground"
+);
+
+our ($opt_c, $opt_r);
+&getopts('c:r') || die("Usage: $0 [options]\n
+Options:\n
+ -c XXX set cursor-color
+ -r reset colors
+");
+
+sub no_reply($) {
+ open TTY, "+</dev/tty" or die("Cannot open /dev/tty\n");
+ autoflush TTY 1;
+ my $old=`stty -g`;
+ system "stty raw -echo min 0 time 5";
+
+ print TTY @_;
+ close TTY;
+ system "stty $old";
+}
+
+sub get_reply($) {
+ open TTY, "+</dev/tty" or die("Cannot open /dev/tty\n");
+ autoflush TTY 1;
+ my $old=`stty -g`;
+ system "stty raw -echo min 0 time 5";
+
+ print TTY @_;
+ my $reply=<TTY>;
+ close TTY;
+ system "stty $old";
+ if ( defined $reply ) {
+ die("^C received\n") if ( "$reply" eq "\003" );
+ }
+ return $reply;
+}
+
+sub query_color($) {
+ my $code = $_[0];
+ my $param1 = $code + 10;
+ my $reply;
+
+ $reply=get_reply("\x1b]$param1;?\007");
+
+ return unless defined $reply;
+ if ( $reply =~ /\x1b]$param1;.*\007/ ) {
+ my $value = $reply;
+
+ $value =~ s/^\x1b]$param1;//;
+ $value =~ s/\007//;
+
+ printf "%24s = %s\n", $color_names[$code], $value;
+ }
+}
+
+sub query_colors() {
+ my $n;
+
+ for ( $n = 0; $n <= 9; ++$n) {
+ &query_color($n);
+ }
+}
+
+sub reset_colors() {
+ my $n;
+
+ for ( $n = 0; $n <= 9; ++$n) {
+ my $code = 110 + $n;
+ &no_reply("\x1b]$code\007");
+ }
+}
+
+if ( defined ($opt_c) ) {
+ &no_reply("\x1b]12;$opt_c\007");
+}
+if ( defined ($opt_r) ) {
+ &reset_colors();
+}
+
+&query_colors();
diff --git a/app/xterm/xterm.h b/app/xterm/xterm.h
index 0e5467d3e..0224de18f 100644
--- a/app/xterm/xterm.h
+++ b/app/xterm/xterm.h
@@ -1,4 +1,4 @@
-/* $XTermId: xterm.h,v 1.647 2011/04/23 12:15:04 tom Exp $ */
+/* $XTermId: xterm.h,v 1.654 2011/07/12 08:39:49 tom Exp $ */
/************************************************************
@@ -825,7 +825,7 @@ extern void ShowCursor (void);
extern void SwitchBufPtrs (TScreen * /* screen */, int /* toBuf */);
extern void ToggleAlternate (XtermWidget /* xw */);
extern void VTInitTranslations (void);
-extern void VTReset (XtermWidget /* xw */, int /* full */, int /* saved */);
+extern void VTReset (XtermWidget /* xw */, int /* full */, int /* saved */) GCC_NORETURN;
extern void VTRun (XtermWidget /* xw */);
extern void dotext (XtermWidget /* xw */, int /* charset */, IChar * /* buf */, Cardinal /* len */);
extern void releaseCursorGCs(XtermWidget /*xw*/);
@@ -949,6 +949,9 @@ extern void repairSizeHints (void);
extern void show_8bit_control (Bool /* value */);
/* misc.c */
+
+#define TIMESTAMP_LEN 20 /* length of TIMESTAMP_FMT */
+
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);
@@ -964,7 +967,7 @@ extern const char *SysErrorMsg (int /* n */);
extern const char *SysReasonMsg (int /* n */);
extern int ResetAnsiColorRequest(XtermWidget, char *, int);
extern int XStrCmp (char * /* s1 */, char * /* s2 */);
-extern int creat_as (uid_t /* uid */, gid_t /* gid */, Bool /* append */, char * /* pathname */, int /* mode */);
+extern int creat_as (uid_t /* uid */, gid_t /* gid */, Bool /* append */, char * /* pathname */, unsigned /* mode */);
extern int open_userfile (uid_t /* uid */, gid_t /* gid */, char * /* path */, Bool /* append */);
extern int xerror (Display * /* d */, XErrorEvent * /* ev */);
extern int xioerror (Display * /* dpy */);
@@ -1061,6 +1064,8 @@ extern void xtermAutoPrint (XtermWidget /* xw */, unsigned /* chr */);
extern void xtermMediaControl (XtermWidget /* xw */, int /* param */, int /* private_seq */);
extern void xtermPrintScreen (XtermWidget /* xw */, Bool /* use_DECPEX */, PrinterFlags * /* p */);
extern void xtermPrintEverything (XtermWidget /* xw */, PrinterFlags * /* p */);
+extern void xtermPrintImmediately (XtermWidget /* xw */, String /* filename */, int /* opts */, int /* attributes */);
+extern void xtermPrintOnXError (XtermWidget /* xw */, int /* n */);
/* ptydata.c */
#ifdef VMS
diff --git a/app/xterm/xterm.log.html b/app/xterm/xterm.log.html
index 5d8787cb9..9c3b29bf3 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.1037 2011/04/26 10:48:22 tom Exp $
+ $XTermId: xterm.log.html,v 1.1063 2011/07/15 00:51:57 tom Exp $
-->
<HTML>
<HEAD>
@@ -56,6 +56,7 @@ Most of these are summarized in the XFree86 CHANGELOG
is the latest version of this file.
<UL>
+<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>
<LI><A HREF="#xterm_268">Patch #268 - 2011/02/10</A>
@@ -329,6 +330,102 @@ is the latest version of this file.
<LI><A HREF="#xterm_01">Patch #1 - 1996/1/6</A>
</UL>
+<H1><A NAME="xterm_271">Patch #271 - 2011/07/14</A></H1>
+<ul>
+ <li>omit permissions adjustments to pty on exit except for
+ pre-Unix98 ptys, since modern implementations handle this
+ (report by Sean C Farley).
+
+ <li>modify logic for switching fonts between UTF-8 and non-UTF-8
+ encoding to not merge the derivable bold-, wide- and widebold
+ values from the VT100 fonts. Also suppress warning when not
+ using UTF-8 fonts if wide- and widebold-fonts cannot be derived
+ or otherwise loaded (report by Werner Scheinast).
+
+ <li>modify menu-creation to suppress entries which will never be used
+ in the current configuration, rather than simply disabling them.
+
+ <li>add resource <code>printModeImmediate</code> and menu item to
+ allow print of screen plus saved lines to a file.
+
+ <li>add menu item to allow runtime enable/disable of the
+ <code>printFileOnXError</code> feature.
+
+ <li>append a timestamp to filename used in
+ <code>printFileOnXError</code> feature,
+ and restrict its permissions
+ (request by Vincent Lefevre).
+
+ <li>add a check when cancelling cursor-blinking, in case the cursor
+ is blinked off. Fix so that the cursor is repainted without
+ waiting for other events, e.g., keypress (report by Ailin Nemui).
+
+ <li>add configure <code>--with-app-class</code> option, to simplify
+ building "xterm-dev" packages with filenames that do not conflict
+ with conventional "xterm" packages.
+
+ <li>corrected logic flow for DECSCL, which prevented the updated
+ operating level from being reported via DECRQSS (report by
+ Ailin Nemui).
+
+ <li>corrected default for <code>brokenStringTerm</code> resource to
+ match manpage.
+
+ <li>add vttests/dynamic.pl
+
+ <li>add runtime check for locale not supported by X libraries, and
+ fallback to XA_STRING in this case (request by Bryan Henderson).
+
+ <li>fix a special case in configure script after no FreeType libraries
+ are found. The script was proceeding to check for a usable
+ configuration.
+
+ <li>add <code>xterm+tmux</code> building block to terminfo (adapted
+ from changes proposed by Ailin Nemui and Nicholas Marriott).
+
+ <li>improve discussion of <code>faceName</code> resource in manpage
+ (adapted from suggestions by Jens Schweikhardt).
+
+ <li>correct mapping of shifted up/down cursor-keys in termcap
+ function-keys mode, i.e., resource <code>tcapFunctionKeys</code>
+ (patch by Gertjan Halkes).
+
+ <li>update AIX case in <code>CF_XOPEN_SOURCE</code> configure macro to
+ add release 7.x.
+
+ <li>modify ifdef's in <code>xterm_io.h</code> for <code>__hpux</code>
+ to force that to use the hacked SYSV support in that file.
+ This fixes a problem with a non-blocking socket call (patch
+ by Paul Lampert).
+
+ <li>improve filtering of desktop category scanning, to exclude XFCE.
+
+ <li>modify configure script to work with systems that have both
+ ncurses (or other terminfo) as well as a real termcap library,
+ e.g., Slackware (report by Alan Watts).
+
+ <li>modify configure script to work around special case where user's
+ environment adds compiler flags to the <code>CC</code> variable
+ (prompted by report by Paul Lampert).
+
+ <li>amend change for Debian #110226 so that "-h" or "-v" options cause
+ an exit, rather than simply printing to stdout while the window is
+ displayed (Debian #629358).
+
+ <li>add response for <code>DECRQSS</code> which gives the setting
+ for <code>DECSCUSR</code>.
+
+ <li>modify AllocateTermColor() to handle
+ <code>XtDefaultForeground</code> and
+ <code>XtDefaultBackground</code>,
+ which are not recognized by <code>XParseColor</code>.
+ For example, this fixes the use of OSC&nbsp;112
+ when no explicit cursor color was set (report by Ailin Nemui).
+
+ <li>handle special-case of <code>KeyPress</code> translated to
+ <code>popup-menu</code> action (Ubuntu #756273).
+</ul>
+
<H1><A NAME="xterm_270">Patch #270 - 2011/04/26</A></H1>
<ul>
<li>build-fix, e.g., for using <code>imake</code> on platforms which
@@ -339,7 +436,8 @@ is the latest version of this file.
<li>mention default for <code>fontWarnings</code> in manpage
(report by Werner Scheinast).
- <li>split "UTF-8" menu entry into "UTF-8 Encoding" and "UTF-8 Fonts".
+ <li>split "UTF-8" menu entry into "UTF-8 Encoding" and "UTF-8 Fonts"
+ (prompted by discussion with Werner Scheinast).
<li>gray-out font-menu entries when a font fails to load, e.g.,
a bitmap font is not installed.
diff --git a/app/xterm/xterm.man b/app/xterm/xterm.man
index 1df64b550..7b1ec9aed 100644
--- a/app/xterm/xterm.man
+++ b/app/xterm/xterm.man
@@ -1,5 +1,5 @@
'\" t
-.\" $XTermId: xterm.man,v 1.489 2011/04/24 21:20:59 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 @@ instead of a
.RB ` \- ',
the option is restored to its default value.
The \fB\-version\fP and \fB\-help\fP options are interpreted even if \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 @@ This option specifies the size of the inner border (the distance between
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 @@ This corresponds to the \fBwideBoldFont\fP resource.
.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 @@ Turn off the \fBhold\fP resource, i.e.,
.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 @@ This sets the \fIpointerColor\fP resource.
.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 @@ should not cause the window to be repositioned.
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 @@ This option, corresponding to the \fBtoolBar\fR resource,
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 @@ Specify the name used by \fIxterm\fP to select the
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 @@ subprocess.
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 @@ 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., \*(``\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 @@ It is not necessarily obeyed by all window managers.
.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 @@ The resource's value should be one of the corresponding strings
\*(``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 @@ the popup menus.
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 @@ set the resource to an empty string.
.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 @@ initialization is complete.
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 @@ See also the \fBkeyboardType\fP resource.
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 @@ an X resource escapes the next character.
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 @@ The default is \*(``false.\*(''
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 @@ 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 \*(``\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
@@ -1597,7 +1608,8 @@ If the current viewport is scrolled past the limit set by the
\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
@@ -1615,7 +1627,7 @@ notion of its function-key strings, as termcap or terminfo capabilities
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
@@ -1813,9 +1825,10 @@ 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.
-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/"
@@ -1828,8 +1841,8 @@ would become
.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.
@@ -2114,16 +2127,16 @@ It will still use reverse-video to disallow some cases, such as a black
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
@@ -2144,8 +2157,9 @@ The default is \*(``true.\*(''
.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
@@ -2173,7 +2187,8 @@ The default value is
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
@@ -2196,7 +2211,8 @@ The default value is
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
@@ -2215,7 +2231,8 @@ The default value is
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
@@ -2235,8 +2252,10 @@ The default value is
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
@@ -2331,10 +2350,11 @@ On startup, \fIxterm\fP tries to put the terminal into 7-bit mode.
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
@@ -2366,19 +2386,36 @@ which means that they are accepted as is.
.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
@@ -2388,14 +2425,14 @@ If the application uses double-wide characters and this resource is not given,
.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.
@@ -2690,18 +2727,18 @@ border visible.
.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.
@@ -2709,7 +2746,7 @@ There is no default method.
.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
@@ -2790,10 +2827,10 @@ At startup, \fIxterm\fP uses a mechanism equivalent to
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
@@ -2922,7 +2959,7 @@ terminals that implement user-defined keys (UDK).
.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.
@@ -2944,7 +2981,7 @@ enables this feature for keys including the exceptions listed.
.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.
@@ -2953,7 +2990,7 @@ The default is \*(``false.\*(''
.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__)).
@@ -3073,32 +3110,100 @@ The default is \*(``OverTheSpot,Root\*(''.
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,
+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 name of the file.
-The default is an empty string,
+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.\*(''
+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
@@ -3110,8 +3215,8 @@ Specifies a shell command to which
.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.
@@ -3122,7 +3227,7 @@ line with a line feed, form feed or vertical tab character, or an
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
@@ -3231,7 +3336,7 @@ some users prefer the X defaults (black text on a white background),
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.
@@ -3255,7 +3360,7 @@ foreground and background colors.
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
@@ -3273,7 +3378,7 @@ The default is \*(``false.\*(''
.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.
@@ -3390,9 +3495,10 @@ Tells \fIxterm\fP whether to accept or return
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
@@ -3447,7 +3553,7 @@ The default is \*(``true.\*(''
.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 can be set via the menu entry "UTF-8 Encoding".
+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)
@@ -3483,9 +3589,9 @@ escape sequences for turning UTF-8 mode on/off are allowed.
.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".
+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)
@@ -3521,7 +3627,8 @@ The default is \*(``false.\*(''
.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.
@@ -3541,7 +3648,8 @@ allowing UTF-8 strings to be displayed as is.
.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.
@@ -3561,7 +3669,7 @@ The resource value is the sum of values for each attribute:
.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
@@ -3602,15 +3710,15 @@ the normal font.
.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.
@@ -3619,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 \*(``\fBXTerm.tek4014.\fP\fINAME\fP\*('':
.TP 8
.B "font2 (\fPclass\fB Font)"
Specifies font number 2 to use in the Tektronix window.
@@ -3656,7 +3764,7 @@ The resources that may be specified for the various menus are described in
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
@@ -3677,6 +3785,12 @@ This entry invokes the \fBredraw()\fP action.
.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
@@ -4044,11 +4158,11 @@ When configured to use the primary selection,
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.
@@ -4105,7 +4219,8 @@ You can alter the types which \fIxterm\fP tries using the
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.,
@@ -4152,7 +4267,7 @@ Commands for managing X events:
.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)
@@ -4179,6 +4294,25 @@ Log to File (logging)
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.
@@ -4623,14 +4757,20 @@ 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 Titles (utf8-mode)
+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.
+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
@@ -5009,11 +5149,12 @@ the \fBmetaSendsEscape\fP and
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
@@ -5027,7 +5168,7 @@ typically named \fICUT_BUFFER0\fP through \fICUT_BUFFER7\fP.
.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
@@ -5036,8 +5177,8 @@ Interpret the given control sequence locally, i.e., without passing it to
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
@@ -5050,7 +5191,8 @@ See also \fBset-vt-font()\fP.
.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,
@@ -5117,6 +5259,23 @@ It allows the same optional parameters as the \fBprint\fP action.
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
@@ -5149,7 +5308,8 @@ The \fIcount\fP argument
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
@@ -5431,12 +5591,12 @@ The effect is identical to a soft reset (DECSTR) control sequence.
.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
@@ -5674,13 +5834,13 @@ Depending on your system configuration, \fIxterm\fP may also set the
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.
diff --git a/app/xterm/xterm_io.h b/app/xterm/xterm_io.h
index 76c71069d..7a6e10be4 100644
--- a/app/xterm/xterm_io.h
+++ b/app/xterm/xterm_io.h
@@ -1,4 +1,4 @@
-/* $XTermId: xterm_io.h,v 1.50 2010/05/23 16:04:32 tom Exp $ */
+/* $XTermId: xterm_io.h,v 1.51 2011/07/03 15:48:35 Paul.Lampert Exp $ */
/*
* Copyright 2000-2006,2010 by Thomas E. Dickey
@@ -56,7 +56,7 @@
#define USE_SYSV_TERMIO
#endif
-#if defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__INTERIX) || defined(__APPLE__) || defined(__UNIXWARE__)
+#if defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__INTERIX) || defined(__APPLE__) || defined(__UNIXWARE__) || defined(__hpux)
#ifndef USE_POSIX_TERMIOS
#define USE_POSIX_TERMIOS
#endif
@@ -133,7 +133,7 @@
/*
* Terminal I/O includes (termio, termios, sgtty headers).
*/
-#if defined(USE_POSIX_TERMIOS)
+#if defined(USE_POSIX_TERMIOS) && !defined(__hpux)
#include <termios.h>
#elif defined(USE_TERMIOS)
#include <termios.h>
diff --git a/app/xterm/xtermcap.c b/app/xterm/xtermcap.c
index a3884db5f..ca537f2f0 100644
--- a/app/xterm/xtermcap.c
+++ b/app/xterm/xtermcap.c
@@ -1,4 +1,4 @@
-/* $XTermId: xtermcap.c,v 1.45 2011/02/19 20:28:13 tom Exp $ */
+/* $XTermId: xtermcap.c,v 1.47 2011/07/11 00:31:26 tom Exp $ */
/*
* Copyright 2007-2010,2011 by Thomas E. Dickey
@@ -68,7 +68,7 @@ typedef struct {
} TCAPINFO;
/* *INDENT-OFF* */
#define DATA(tc,ti,x,y) { tc, ti, x, y }
-static TCAPINFO table[] = {
+static const TCAPINFO table[] = {
/* tcap terminfo code state */
DATA( "%1", "khlp", XK_Help, 0 ),
DATA( "#1", "kHLP", XK_Help, SHIFT ),
@@ -89,8 +89,8 @@ static TCAPINFO table[] = {
DATA( "#4", "kLFT", XK_Left, SHIFT ),
DATA( "%i", "kRIT", XK_Right, SHIFT ),
- DATA( "kF", "kind", XK_Up, SHIFT ),
- DATA( "kR", "kri", XK_Down, SHIFT ),
+ DATA( "kF", "kind", XK_Down, SHIFT ),
+ DATA( "kR", "kri", XK_Up, SHIFT ),
DATA( "k1", "kf1", XK_Fn(1), 0 ),
DATA( "k2", "kf2", XK_Fn(2), 0 ),
@@ -345,7 +345,7 @@ lookupTcapByName(const char *name)
int
xtermcapKeycode(XtermWidget xw, const char **params, unsigned *state, Bool * fkey)
{
- TCAPINFO *data;
+ const TCAPINFO *data;
int which;
int code = -1;
char *name;
diff --git a/app/xterm/xutf8.c b/app/xterm/xutf8.c
index 8dabf1527..499ad8694 100644
--- a/app/xterm/xutf8.c
+++ b/app/xterm/xutf8.c
@@ -1,4 +1,4 @@
-/* $XTermId: xutf8.c,v 1.9 2009/11/05 23:30:05 tom Exp $ */
+/* $XTermId: xutf8.c,v 1.10 2011/07/04 13:51:08 tom Exp $ */
/*
Copyright (c) 2001 by Juliusz Chroboczek
@@ -73,22 +73,22 @@ utf8insert(char *dest, int c, int *len_return)
return;
if (c <= 0x7F) {
- dest[0] = c;
+ dest[0] = (char) c;
*len_return = 1;
} else if (c <= 0x7FF) {
- dest[0] = 0xC0 | ((c >> 6) & 0x1F);
- dest[1] = 0x80 | (c & 0x3F);
+ dest[0] = (char) (0xC0 | ((c >> 6) & 0x1F));
+ dest[1] = (char) (0x80 | (c & 0x3F));
*len_return = 2;
} else if (c <= 0xFFFF) {
- dest[0] = 0xE0 | ((c >> 12) & 0x0F);
- dest[1] = 0x80 | ((c >> 6) & 0x3F);
- dest[2] = 0x80 | (c & 0x3F);
+ dest[0] = (char) (0xE0 | ((c >> 12) & 0x0F));
+ dest[1] = (char) (0x80 | ((c >> 6) & 0x3F));
+ dest[2] = (char) (0x80 | (c & 0x3F));
*len_return = 3;
} else {
- dest[0] = 0xF0 | ((c >> 18) & 0x07);
- dest[1] = 0x80 | ((c >> 12) & 0x3f);
- dest[2] = 0x80 | ((c >> 6) & 0x3f);
- dest[3] = 0x80 | (c & 0x3f);
+ dest[0] = (char) (0xF0 | ((c >> 18) & 0x07));
+ dest[1] = (char) (0x80 | ((c >> 12) & 0x3f));
+ dest[2] = (char) (0x80 | ((c >> 6) & 0x3f));
+ dest[3] = (char) (0x80 | (c & 0x3f));
*len_return = 4;
}
}
@@ -132,7 +132,7 @@ utf8l1strcpy(char *d, char *s)
s++; /* incorrect UTF-8 */
continue;
} else if ((*s & 0x7C) == 0x40) {
- *d++ = ((*s & 0x03) << 6) | (s[1] & 0x3F);
+ *d++ = (char) (((*s & 0x03) << 6) | (s[1] & 0x3F));
s += 2;
} else {
*d++ = '?';