summaryrefslogtreecommitdiff
path: root/app/xterm
diff options
context:
space:
mode:
Diffstat (limited to 'app/xterm')
-rw-r--r--app/xterm/MANIFEST2
-rw-r--r--app/xterm/charproc.c63
-rw-r--r--app/xterm/fontutils.c111
-rw-r--r--app/xterm/input.c3
-rw-r--r--app/xterm/main.c5
-rw-r--r--app/xterm/os2main.c344
-rw-r--r--app/xterm/ptyx.h3
-rw-r--r--app/xterm/version.h4
-rw-r--r--app/xterm/xterm.h4
-rw-r--r--app/xterm/xterm.log.html28
-rw-r--r--app/xterm/xterm.man83
11 files changed, 370 insertions, 280 deletions
diff --git a/app/xterm/MANIFEST b/app/xterm/MANIFEST
index a51ffbf28..255c8b02d 100644
--- a/app/xterm/MANIFEST
+++ b/app/xterm/MANIFEST
@@ -1,4 +1,4 @@
-MANIFEST for xterm-236, version xterm-236
+MANIFEST for xterm-237, version xterm-237
--------------------------------------------------------------------------------
MANIFEST this file
256colres.h resource-definitions for 256-color mode
diff --git a/app/xterm/charproc.c b/app/xterm/charproc.c
index 1426b14c6..be9408a1f 100644
--- a/app/xterm/charproc.c
+++ b/app/xterm/charproc.c
@@ -1,4 +1,4 @@
-/* $XTermId: charproc.c,v 1.848 2008/07/27 19:00:21 tom Exp $ */
+/* $XTermId: charproc.c,v 1.852 2008/09/14 21:27:54 tom Exp $ */
/*
@@ -505,6 +505,7 @@ static XtResource resources[] =
#if OPT_BLINK_CURS
Bres(XtNcursorBlink, XtCCursorBlink, screen.cursor_blink, False),
#endif
+ Bres(XtNcursorUnderline, XtCCursorUnderline, screen.cursor_underline, False),
#if OPT_BLINK_TEXT
Bres(XtNshowBlinkAsBold, XtCCursorBlink, screen.blink_as_bold, DEFBLINKASBOLD),
@@ -3635,21 +3636,12 @@ HandleStructNotify(Widget w GCC_UNUSED,
if (event->xconfigure.window == XtWindow(toplevel)) {
int height, width;
- /*
- * Some window managers modify the configuration during
- * initialization. Skip notification events that we know are
- * obsolete because there is already another in the queue.
- */
- do {
- height = event->xconfigure.height;
- width = event->xconfigure.width;
- TRACE(("HandleStructNotify(ConfigureNotify) %d,%d %dx%d\n",
- event->xconfigure.y, event->xconfigure.x,
- event->xconfigure.height, event->xconfigure.width));
-
- } while (XCheckTypedWindowEvent(XtDisplay(xw),
- event->xconfigure.window,
- ConfigureNotify, event));
+ height = event->xconfigure.height;
+ width = event->xconfigure.width;
+ TRACE(("HandleStructNotify(ConfigureNotify) %d,%d %dx%d\n",
+ event->xconfigure.y, event->xconfigure.x,
+ event->xconfigure.height, event->xconfigure.width));
+
#if OPT_TOOLBAR
/*
* The notification is for the top-level widget, but we care about
@@ -5119,9 +5111,9 @@ VTClassInit(void)
#define init_Bres(name) \
TRACE(("init " #name " = %s\n", \
BtoS(wnew->name = request->name)))
-#define init_Dres(name) \
- TRACE(("init " #name " = %f\n", \
- wnew->name = request->name))
+#define init_Dres2(name,i) \
+ TRACE(("init " #name "[%d] = %f\n", i, \
+ wnew->name[i] = request->name[i]))
#define init_Ires(name) \
TRACE(("init " #name " = %d\n", \
wnew->name = request->name))
@@ -5129,15 +5121,20 @@ VTClassInit(void)
TRACE(("init " #name " = \"%s\"\n", \
(wnew->name = x_strtrim(request->name)) != NULL \
? wnew->name : "<null>"))
+#define init_Sres2(name,i) \
+ TRACE(("init " #name "[%d] = \"%s\"\n", i, \
+ (wnew->name(i) = x_strtrim(request->name(i))) != NULL \
+ ? wnew->name(i) : "<null>"))
#define init_Tres(offset) \
TRACE(("init screen.Tcolors[" #offset "] = %#lx\n", \
fill_Tres(wnew, request, offset)))
#else
-#define init_Bres(name) wnew->name = request->name
-#define init_Dres(name) wnew->name = request->name
-#define init_Ires(name) wnew->name = request->name
-#define init_Sres(name) wnew->name = x_strtrim(request->name)
-#define init_Tres(offset) fill_Tres(wnew, request, offset)
+#define init_Bres(name) wnew->name = request->name
+#define init_Dres2(name,i) wnew->name[i] = request->name[i]
+#define init_Ires(name) wnew->name = request->name
+#define init_Sres(name) wnew->name = x_strtrim(request->name)
+#define init_Sres2(name,i) wnew->name(i) = x_strtrim(request->name(i))
+#define init_Tres(offset) fill_Tres(wnew, request, offset)
#endif
#if OPT_COLOR_RES
@@ -5456,6 +5453,7 @@ VTInitialize(Widget wrequest,
init_Ires(screen.blink_off);
wnew->screen.cursor_blink_res = wnew->screen.cursor_blink;
#endif
+ init_Bres(screen.cursor_underline);
#if OPT_BLINK_TEXT
init_Ires(screen.blink_as_bold);
#endif
@@ -5583,7 +5581,7 @@ VTInitialize(Widget wrequest,
init_Bres(misc.tiXtraScroll);
init_Bres(misc.dynamicColors);
for (i = fontMenu_font1; i <= fontMenu_lastBuiltin; i++) {
- init_Sres(screen.MenuFontName(i));
+ init_Sres2(screen.MenuFontName, i);
}
wnew->screen.MenuFontName(fontMenu_default) = wnew->misc.default_font.f_n;
wnew->screen.MenuFontName(fontMenu_fontescape) = NULL;
@@ -5799,7 +5797,7 @@ VTInitialize(Widget wrequest,
#if OPT_RENDERFONT
for (i = 0; i <= fontMenu_lastBuiltin; ++i) {
- init_Dres(misc.face_size[i]);
+ init_Dres2(misc.face_size, i);
}
init_Sres(misc.face_name);
init_Sres(misc.face_wide_name);
@@ -6064,12 +6062,12 @@ VTDestroy(Widget w GCC_UNUSED)
#ifndef NO_ACTIVE_ICON
releaseWindowGCs(xw, &(screen->iconVwin));
#endif
- XtUninstallTranslations((Widget)xw);
+ XtUninstallTranslations((Widget) xw);
XtUninstallTranslations(screen->scrollWidget);
#if OPT_TOOLBAR
- XtUninstallTranslations((Widget)XtParent(xw));
+ XtUninstallTranslations((Widget) XtParent(xw));
#endif
- XtUninstallTranslations((Widget)SHELL_OF(xw));
+ XtUninstallTranslations((Widget) SHELL_OF(xw));
if (screen->hidden_cursor)
XFreeCursor(screen->display, screen->hidden_cursor);
@@ -6893,7 +6891,7 @@ ShowCursor(void)
* whether the window has focus, since in that case we want just an
* outline for the cursor.
*/
- filled = (screen->select || screen->always_highlight);
+ filled = (screen->select || screen->always_highlight) && !screen->cursor_underline;
#if OPT_HIGHLIGHT_COLOR
use_selbg = isNotForeground(xw, fg_pix, bg_pix, selbg_pix);
use_selfg = isNotBackground(xw, fg_pix, bg_pix, selfg_pix);
@@ -7014,7 +7012,10 @@ ShowCursor(void)
outlineGC = currentGC;
screen->box->x = x;
- screen->box->y = y;
+ if (!screen->cursor_underline)
+ screen->box->y = y;
+ else
+ screen->box->y = y + FontHeight(screen) - 2;
XDrawLines(screen->display, VWindow(screen), outlineGC,
screen->box, NBOX, CoordModePrevious);
}
diff --git a/app/xterm/fontutils.c b/app/xterm/fontutils.c
index d7dec3a47..1c2e11917 100644
--- a/app/xterm/fontutils.c
+++ b/app/xterm/fontutils.c
@@ -1,4 +1,4 @@
-/* $XTermId: fontutils.c,v 1.272 2008/04/17 23:23:37 tom Exp $ */
+/* $XTermId: fontutils.c,v 1.275 2008/09/14 22:21:14 tom Exp $ */
/************************************************************
@@ -1335,12 +1335,16 @@ xtermSetCursorBox(TScreen * screen)
{
static XPoint VTbox[NBOX];
XPoint *vp;
+ int fw = FontWidth(screen) - 1;
+ int fh = FontHeight(screen) - 1;
+ int hh = screen->cursor_underline ? 1 : fh;
vp = &VTbox[1];
- (vp++)->x = FontWidth(screen) - 1;
- (vp++)->y = FontHeight(screen) - 1;
- (vp++)->x = -(FontWidth(screen) - 1);
- vp->y = -(FontHeight(screen) - 1);
+ (vp++)->x = fw;
+ (vp++)->y = hh;
+ (vp++)->x = -fw;
+ vp->y = -hh;
+
screen->box = VTbox;
}
@@ -1668,6 +1672,7 @@ xtermComputeFontInfo(XtermWidget xw,
#endif /* OPT_RENDERWIDE */
}
if (norm == 0) {
+ TRACE(("...no TrueType font found for number %d, disable menu entry\n", fontnum));
xw->misc.render_font = False;
update_font_renderfont();
/* now we will fall through into the bitmap fonts */
@@ -2325,6 +2330,27 @@ lookupFontSizes(XtermWidget xw)
}
}
+#if OPT_RENDERFONT
+#define NMENU_RENDERFONTS (NMENUFONTS - 2) /* no selection or escape */
+static Boolean
+useFaceSizes(XtermWidget xw)
+{
+ Boolean result = False;
+ int n;
+
+ if (UsingRenderFont(xw)) {
+ result = True;
+ for (n = 0; n < NMENU_RENDERFONTS; ++n) {
+ if (xw->misc.face_size[n] <= 0.0) {
+ result = False;
+ break;
+ }
+ }
+ }
+ return result;
+}
+#endif
+
/*
* Find the index of a larger/smaller font (according to the sign of 'relative'
* and its magnitude), starting from the 'old' index.
@@ -2335,34 +2361,65 @@ lookupRelativeFontSize(XtermWidget xw, int old, int relative)
TScreen *screen = TScreenOf(xw);
int n, m = -1;
+ TRACE(("lookupRelativeFontSize(old=%d, relative=%d)\n", old, relative));
if (!IsIcon(screen)) {
- lookupFontSizes(xw);
- if (relative != 0) {
- for (n = 0; n < NMENUFONTS; ++n) {
- if (screen->menu_font_sizes[n] > 0 &&
- screen->menu_font_sizes[n] != screen->menu_font_sizes[old]) {
- int cmp_0 = ((screen->menu_font_sizes[n] >
- screen->menu_font_sizes[old])
- ? relative
- : -relative);
- int cmp_m = ((m < 0)
- ? 1
- : ((screen->menu_font_sizes[n] <
- screen->menu_font_sizes[m])
- ? relative
- : -relative));
- if (cmp_0 > 0 && cmp_m > 0) {
- m = n;
+#if OPT_RENDERFONT
+ if (useFaceSizes(xw)) {
+ TRACE(("...using FaceSize\n"));
+ if (relative != 0) {
+ for (n = 0; n < NMENU_RENDERFONTS; ++n) {
+ if (xw->misc.face_size[n] > 0 &&
+ xw->misc.face_size[n] != xw->misc.face_size[old]) {
+ int cmp_0 = ((xw->misc.face_size[n] >
+ xw->misc.face_size[old])
+ ? relative
+ : -relative);
+ int cmp_m = ((m < 0)
+ ? 1
+ : ((xw->misc.face_size[n] <
+ xw->misc.face_size[m])
+ ? relative
+ : -relative));
+ if (cmp_0 > 0 && cmp_m > 0) {
+ m = n;
+ }
}
}
}
- if (m >= 0) {
- if (relative > 1)
- m = lookupRelativeFontSize(xw, m, relative - 1);
- else if (relative < -1)
- m = lookupRelativeFontSize(xw, m, relative + 1);
+ } else
+#endif
+ {
+ TRACE(("...using bitmap areas\n"));
+ lookupFontSizes(xw);
+ if (relative != 0) {
+ for (n = 0; n < NMENUFONTS; ++n) {
+ if (screen->menu_font_sizes[n] > 0 &&
+ screen->menu_font_sizes[n] !=
+ screen->menu_font_sizes[old]) {
+ int cmp_0 = ((screen->menu_font_sizes[n] >
+ screen->menu_font_sizes[old])
+ ? relative
+ : -relative);
+ int cmp_m = ((m < 0)
+ ? 1
+ : ((screen->menu_font_sizes[n] <
+ screen->menu_font_sizes[m])
+ ? relative
+ : -relative));
+ if (cmp_0 > 0 && cmp_m > 0) {
+ m = n;
+ }
+ }
+ }
}
}
+ TRACE(("...new index %d\n", m));
+ if (m >= 0) {
+ if (relative > 1)
+ m = lookupRelativeFontSize(xw, m, relative - 1);
+ else if (relative < -1)
+ m = lookupRelativeFontSize(xw, m, relative + 1);
+ }
}
return m;
}
diff --git a/app/xterm/input.c b/app/xterm/input.c
index c039ec378..3883a227c 100644
--- a/app/xterm/input.c
+++ b/app/xterm/input.c
@@ -1,4 +1,4 @@
-/* $XTermId: input.c,v 1.299 2008/04/20 20:27:18 tom Exp $ */
+/* $XTermId: input.c,v 1.300 2008/09/14 16:37:25 Ted.Phelps Exp $ */
/*
* Copyright 1999-2007,2008 by Thomas E. Dickey
@@ -1262,6 +1262,7 @@ Input(XtermWidget xw,
evt_state &= ~xw->misc.alt_mods;
if (screen->alt_sends_esc) {
TRACE(("...input-char is modified by ALT\n"));
+ eightbit = False;
prefix = ANSI_ESC;
} else if (!eightbit) {
TRACE(("...input-char is shifted by ALT\n"));
diff --git a/app/xterm/main.c b/app/xterm/main.c
index 4f801b4d9..43af0f2af 100644
--- a/app/xterm/main.c
+++ b/app/xterm/main.c
@@ -1,4 +1,4 @@
-/* $XTermId: main.c,v 1.587 2008/05/26 18:25:54 Marius.Tolzmann Exp $ */
+/* $XTermId: main.c,v 1.588 2008/09/14 15:20:31 Paul.Lampert Exp $ */
/*
* W A R N I N G
@@ -1041,6 +1041,8 @@ static XrmOptionDescRec optionDescList[] = {
{"-lcc", "*localeFilter",XrmoptionSepArg, (caddr_t) NULL},
{"-en", "*locale", XrmoptionSepArg, (caddr_t) NULL},
#endif
+{"-uc", "*cursorUnderLine", XrmoptionNoArg, (caddr_t) "on"},
+{"+uc", "*cursorUnderLine", XrmoptionNoArg, (caddr_t) "off"},
{"-ulc", "*colorULMode", XrmoptionNoArg, (caddr_t) "off"},
{"+ulc", "*colorULMode", XrmoptionNoArg, (caddr_t) "on"},
{"-ulit", "*italicULMode", XrmoptionNoArg, (caddr_t) "off"},
@@ -1211,6 +1213,7 @@ static OptionHelp xtermOptions[] = {
{ "-/+lc", "turn on/off locale mode using luit" },
{ "-lcc path", "filename of locale converter (" DEFLOCALEFILTER ")" },
#endif
+{ "-/+uc", "turn on/off underline cursor" },
{ "-/+ulc", "turn off/on display of underline as color" },
{ "-/+ulit", "turn off/on display of underline as italics" },
#ifdef HAVE_UTMP
diff --git a/app/xterm/os2main.c b/app/xterm/os2main.c
index 92cf7de66..e3b09a247 100644
--- a/app/xterm/os2main.c
+++ b/app/xterm/os2main.c
@@ -1,11 +1,9 @@
-/* $XTermId: os2main.c,v 1.227 2006/07/23 20:12:59 tom Exp $ */
+/* $XTermId: os2main.c,v 1.256 2008/09/14 19:37:07 tom Exp $ */
/* removed all foreign stuff to get the code more clear (hv)
* and did some rewrite for the obscure OS/2 environment
*/
-/* $XFree86: xc/programs/xterm/os2main.c,v 3.87 2006/06/19 00:36:51 dickey Exp $ */
-
/***********************************************************
Copyright (c) 1987, 1988 X Consortium
@@ -95,6 +93,7 @@ SOFTWARE.
#include <menu.h>
#include <main.h>
#include <xstrings.h>
+#include <xtermcap.h>
#include <xterm_io.h>
#if OPT_WIDE_CHARS
@@ -125,18 +124,20 @@ ttyname(int fd)
#include <signal.h>
static SIGNAL_T reapchild(int n);
-static int spawn(void);
-static void get_terminal(void);
-static void resize(TScreen * s, char *oldtc, char *newtc);
+static int spawnXTerm(XtermWidget /* xw */ );
+static void resize_termcap(XtermWidget xw, char *newtc);
static void set_owner(char *device, uid_t uid, gid_t gid, mode_t mode);
static Bool added_utmp_entry = False;
+static uid_t save_ruid;
+static gid_t save_rgid;
+
/*
** Ordinarily it should be okay to omit the assignment in the following
** statement. Apparently the c89 compiler on AIX 4.1.3 has a bug, or does
** it? Without the assignment though the compiler will init command_to_exec
-** to 0xffffffff instead of NULL; and subsequent usage, e.g. in spawn() to
+** to 0xffffffff instead of NULL; and subsequent usage, e.g. in spawnXTerm() to
** SEGV.
*/
static char **command_to_exec = NULL;
@@ -189,19 +190,21 @@ static struct termio d_tio;
#define CWERASE CONTROL('W')
#endif
+#define TERMIO_STRUCT struct termio
+
/*
* SYSV has the termio.c_cc[V] and ltchars; BSD has tchars and ltchars;
* SVR4 has only termio.c_cc, but it includes everything from ltchars.
* POSIX termios has termios.c_cc, which is similar to SVR4.
*/
#define TTYMODE(name) { name, sizeof(name)-1, 0, 0 }
-static int override_tty_modes = 0;
+static Boolean override_tty_modes = False;
/* *INDENT-OFF* */
static struct _xttymodes {
char *name;
size_t len;
int set;
- Char value;
+ int value;
} ttymodelist[] = {
TTYMODE("intr"), /* tchars.t_intrc ; VINTR */
#define XTTYMODE_intr 0
@@ -271,6 +274,7 @@ static XtResource application_resources[] =
Bres("messages", "Messages", messages, True),
Ires("minBufSize", "MinBufSize", minBufSize, 4096),
Ires("maxBufSize", "MaxBufSize", maxBufSize, 32768),
+ Sres("menuLocale", "MenuLocale", menuLocale, ""),
Sres("keyboardType", "KeyboardType", keyboardType, "unknown"),
#if OPT_SUNPC_KBD
Bres("sunKeyboard", "SunKeyboard", sunKeyboard, False),
@@ -284,17 +288,21 @@ static XtResource application_resources[] =
#if OPT_SUN_FUNC_KEYS
Bres("sunFunctionKeys", "SunFunctionKeys", sunFunctionKeys, False),
#endif
+#if OPT_TCAP_FKEYS
+ Bres("tcapFunctionKeys", "TcapFunctionKeys", termcapKeys, False),
+#endif
#if OPT_INITIAL_ERASE
Bres("ptyInitialErase", "PtyInitialErase", ptyInitialErase, DEF_INITIAL_ERASE),
Bres("backarrowKeyIsErase", "BackarrowKeyIsErase", backarrow_is_erase, DEF_BACKARO_ERASE),
#endif
- Bres("waitForMap", "WaitForMap", wait_for_map, False),
Bres("useInsertMode", "UseInsertMode", useInsertMode, False),
#if OPT_ZICONBEEP
Ires("zIconBeep", "ZIconBeep", zIconBeep, 0),
#endif
#if OPT_PTY_HANDSHAKE
+ Bres("waitForMap", "WaitForMap", wait_for_map, False),
Bres("ptyHandshake", "PtyHandshake", ptyHandshake, True),
+ Bres("ptySttySize", "PtySttySize", ptySttySize, DEF_PTY_STTY_SIZE),
#endif
#if OPT_SAME_NAME
Bres("sameName", "SameName", sameName, True),
@@ -378,6 +386,10 @@ static XrmOptionDescRec optionDescList[] = {
#endif
#if OPT_HIGHLIGHT_COLOR
{"-hc", "*highlightColor", XrmoptionSepArg, (caddr_t) NULL},
+{"-hm", "*highlightColorMode", XrmoptionNoArg, (caddr_t) "on"},
+{"+hm", "*highlightColorMode", XrmoptionNoArg, (caddr_t) "off"},
+{"-selfg", "*highlightTextColor", XrmoptionSepArg, (caddr_t) NULL},
+{"-selbg", "*highlightColor", XrmoptionSepArg, (caddr_t) NULL},
#endif
#if OPT_HP_FUNC_KEYS
{"-hf", "*hpFunctionKeys",XrmoptionNoArg, (caddr_t) "on"},
@@ -454,6 +466,8 @@ static XrmOptionDescRec optionDescList[] = {
{"-lcc", "*localeFilter",XrmoptionSepArg, (caddr_t) NULL},
{"-en", "*locale", XrmoptionSepArg, (caddr_t) NULL},
#endif
+{"-uc", "*cursorUnderLine", XrmoptionNoArg, (caddr_t) "on"},
+{"+uc", "*cursorUnderLine", XrmoptionNoArg, (caddr_t) "off"},
{"-ulc", "*colorULMode", XrmoptionNoArg, (caddr_t) "off"},
{"+ulc", "*colorULMode", XrmoptionNoArg, (caddr_t) "on"},
{"-ulit", "*italicULMode", XrmoptionNoArg, (caddr_t) "off"},
@@ -560,7 +574,9 @@ static OptionHelp xtermOptions[] = {
{ "-/+cu", "turn on/off curses emulation" },
{ "-/+dc", "turn off/on dynamic color selection" },
#if OPT_HIGHLIGHT_COLOR
-{ "-hc color", "selection background color" },
+{ "-/+hm", "turn on/off selection-color override" },
+{ "-selbg color", "selection background color" },
+{ "-selfg color", "selection foreground color" },
#endif
#if OPT_HP_FUNC_KEYS
{ "-/+hf", "turn on/off HP Function Key escape codes" },
@@ -622,6 +638,7 @@ static OptionHelp xtermOptions[] = {
{ "-/+lc", "turn on/off locale mode using luit" },
{ "-lcc path", "filename of locale converter (" DEFLOCALEFILTER ")" },
#endif
+{ "-/+uc", "turn on/off underline cursor" },
{ "-/+ulc", "turn off/on display of underline as color" },
{ "-/+ut", "turn on/off utmp inhibit (not supported)" },
{ "-/+ulit", "turn off/on display of underline as italics" },
@@ -655,21 +672,32 @@ static OptionHelp xtermOptions[] = {
{ NULL, NULL }};
/* *INDENT-ON* */
-/*debug FILE *confd;*/
-/*static void opencons()
-{
- if ((confd=fopen("/dev/console$","w")) < 0) {
- fputs("!!! Cannot open console device.\n",
- stderr);
- exit(1);
- }
-}
+#ifdef DBG_CONSOLE
+FILE *confd;
-static void closecons(void)
+static void
+closecons(void)
{
+ if (confs != 0) {
fclose(confd);
+ confd = 0;
+ }
}
-*/
+static void
+opencons(void)
+{
+ closecons();
+ if ((confd = fopen("/dev/console$", "w")) < 0) {
+ fputs("!!! Cannot open console device.\n",
+ stderr);
+ exit(1);
+ }
+}
+#else
+#define opencons() /* nothing */
+#define closecons() /* nothing */
+#endif
+
static char *message[] =
{
"Fonts should be fixed width and, if both normal and bold are specified, should",
@@ -694,7 +722,7 @@ decode_keyvalue(char **ptr, int termcap)
if (*string == '^') {
switch (*++string) {
case '?':
- value = A2E(DEL);
+ value = A2E(ANSI_DEL);
break;
case '-':
if (!termcap) {
@@ -738,36 +766,6 @@ decode_keyvalue(char **ptr, int termcap)
return value;
}
-/*
- * If we're linked to terminfo, tgetent() will return an empty buffer. We
- * cannot use that to adjust the $TERMCAP variable.
- */
-static Bool
-get_termcap(char *name, char *buffer, char *resized)
-{
- TScreen *screen = &term->screen;
-
- *buffer = 0; /* initialize, in case we're using terminfo's tgetent */
-
- if (name != 0) {
- if (tgetent(buffer, name) == 1) {
- TRACE(("get_termcap(%s) succeeded (%s)\n", name,
- (*buffer
- ? "ok:termcap, we can update $TERMCAP"
- : "assuming this is terminfo")));
- if (*buffer) {
- if (!TEK4014_ACTIVE(screen)) {
- resize(screen, buffer, resized);
- }
- }
- return True;
- } else {
- *buffer = 0; /* just in case */
- }
- }
- return False;
-}
-
static int
abbrev(char *tst, char *cmp, size_t need)
{
@@ -876,7 +874,7 @@ DeleteWindow(Widget w,
{
#if OPT_TEK4014
if (w == toplevel) {
- if (term->screen.Tshow)
+ if (TEK4014_SHOWN(term))
hide_vt_window();
else
do_hangup(w, (XtPointer) 0, (XtPointer) 0);
@@ -918,9 +916,16 @@ main(int argc, char **argv ENVP_ARG)
int mode;
char *my_class = DEFCLASS;
Window winToEmbedInto = None;
+#if OPT_COLOR_RES
+ Bool reversed = False;
+#endif
- /* Do these first, since we may not be able to open the display */
ProgramName = argv[0];
+
+ save_ruid = getuid();
+ save_rgid = getgid();
+
+ /* Do these first, since we may not be able to open the display */
TRACE_OPTS(xtermOptions, optionDescList, XtNumber(optionDescList));
TRACE_ARGV("Before XtOpenApplication", argv);
if (argc > 1) {
@@ -942,6 +947,14 @@ main(int argc, char **argv ENVP_ARG)
}
unique = 3;
} else {
+#if OPT_COLOR_RES
+ if (abbrev(argv[n], "-reverse", 2)
+ || !strcmp("-rv", argv[n])) {
+ reversed = True;
+ } else if (!strcmp("+rv", argv[n])) {
+ reversed = False;
+ }
+#endif
quit = False;
unique = 3;
}
@@ -959,7 +972,7 @@ main(int argc, char **argv ENVP_ARG)
setlocale(LC_ALL, NULL);
#endif
-/*debug opencons();*/
+ opencons();
ttydev = TypeMallocN(char, PTMS_BUFSZ);
ptydev = TypeMallocN(char, PTMS_BUFSZ);
@@ -983,7 +996,7 @@ main(int argc, char **argv ENVP_ARG)
d_tio.c_lflag = ISIG | ICANON | ECHO | ECHOE | ECHOK;
d_tio.c_line = 0;
d_tio.c_cc[VINTR] = CONTROL('C'); /* '^C' */
- d_tio.c_cc[VERASE] = DEL; /* DEL */
+ d_tio.c_cc[VERASE] = ANSI_DEL; /* DEL */
d_tio.c_cc[VKILL] = CONTROL('U'); /* '^U' */
d_tio.c_cc[VQUIT] = CQUIT; /* '^\' */
d_tio.c_cc[VEOF] = CEOF; /* '^D' */
@@ -1011,8 +1024,6 @@ main(int argc, char **argv ENVP_ARG)
XtNumber(application_resources), NULL, 0);
TRACE_XRES();
- waiting_for_initial_map = resource.wait_for_map;
-
/*
* ICCCM delete_window.
*/
@@ -1027,21 +1038,16 @@ main(int argc, char **argv ENVP_ARG)
fprintf(stderr, "%s: bad tty modes \"%s\"\n",
ProgramName, resource.tty_modes);
} else if (n > 0) {
- override_tty_modes = 1;
+ override_tty_modes = True;
}
}
#if OPT_ZICONBEEP
- zIconBeep = resource.zIconBeep;
- zIconBeep_flagged = False;
- if (zIconBeep > 100 || zIconBeep < -100) {
- zIconBeep = 0; /* was 100, but I prefer to defaulting off. */
+ if (resource.zIconBeep > 100 || resource.zIconBeep < -100) {
+ resource.zIconBeep = 0; /* was 100, but I prefer to defaulting off. */
fprintf(stderr,
"a number between -100 and 100 is required for zIconBeep. 0 used by default\n");
}
#endif /* OPT_ZICONBEEP */
-#if OPT_SAME_NAME
- sameName = resource.sameName;
-#endif
hold_screen = resource.hold_screen ? 1 : 0;
xterm_name = resource.xterm_name;
if (strcmp(xterm_name, "-") == 0)
@@ -1093,7 +1099,7 @@ main(int argc, char **argv ENVP_ARG)
/* Must be owner and have read/write permission.
xdm cooperates to give the console the right user. */
if (!stat("/dev/console", &sbuf) &&
- (sbuf.st_uid == getuid()) &&
+ (sbuf.st_uid == save_ruid) &&
!access("/dev/console", R_OK | W_OK)) {
Console = True;
} else
@@ -1153,11 +1159,9 @@ main(int argc, char **argv ENVP_ARG)
XtNmenuHeight, menu_high,
#endif
(XtPointer) 0);
-
decode_keyboard_type(term, &resource);
- screen = &term->screen;
-
+ screen = TScreenOf(term);
screen->inhibit = 0;
#ifdef ALLOWLOGGING
if (term->misc.logInhibit)
@@ -1175,9 +1179,9 @@ main(int argc, char **argv ENVP_ARG)
*/
#if OPT_TEK4014
if (screen->inhibit & I_TEK)
- screen->TekEmu = False;
+ TEK4014_ACTIVE(term) = False;
- if (screen->TekEmu && !TekInit())
+ if (TEK4014_ACTIVE(term) && !TekInit())
exit(ERROR_INIT);
#endif
@@ -1257,10 +1261,13 @@ 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];
int i = -1;
if (debug) {
- creat_as(getuid(), getgid(), True, "xterm.debug.log", 0666);
- i = open("xterm.debug.log", O_WRONLY | O_TRUNC);
+ timestamp_filename(dbglogfile, "xterm.debug.log.");
+ if (creat_as(save_ruid, save_rgid, False, dbglogfile, 0666) > 0) {
+ i = open(dbglogfile, O_WRONLY | O_TRUNC);
+ }
}
if (i >= 0) {
dup2(i, 2);
@@ -1271,10 +1278,7 @@ main(int argc, char **argv ENVP_ARG)
}
#endif /* DEBUG */
- /* open a terminal for client */
- get_terminal();
-
- spawn();
+ spawnXTerm(term);
/* Child process is out there, let's catch its termination */
(void) signal(SIGCHLD, reapchild);
@@ -1285,7 +1289,7 @@ main(int argc, char **argv ENVP_ARG)
char buf[80];
buf[0] = '\0';
- sprintf(buf, "%lx\n", XtWindow(SHELL_OF(CURRENT_EMU(screen))));
+ sprintf(buf, "%lx\n", XtWindow(SHELL_OF(CURRENT_EMU())));
write(screen->respond, buf, strlen(buf));
}
@@ -1338,22 +1342,18 @@ main(int argc, char **argv ENVP_ARG)
NonNull(term->screen.Tcolors[TEXT_FG].resource),
NonNull(term->screen.Tcolors[TEXT_BG].resource)));
- if ((term->misc.re_verse)
+ if ((reversed && term->misc.re_verse0)
&& ((term->screen.Tcolors[TEXT_FG].resource
- && (x_strcasecmp(term->screen.Tcolors[TEXT_FG].resource,
- XtDefaultForeground) != 0)
- )
+ && !isDefaultForeground(term->screen.Tcolors[TEXT_FG].resource))
|| (term->screen.Tcolors[TEXT_BG].resource
- && (x_strcasecmp(term->screen.Tcolors[TEXT_BG].resource,
- XtDefaultBackground) != 0)
- )
+ && !isDefaultBackground(term->screen.Tcolors[TEXT_BG].resource))
))
ReverseVideo(term);
#endif /* OPT_COLOR_RES */
for (;;) {
#if OPT_TEK4014
- if (screen->TekEmu)
+ if (TEK4014_ACTIVE(term))
TekRun();
else
#endif
@@ -1407,19 +1407,6 @@ get_pty(int *pty)
}
/*
- * sets up X and initializes the terminal structure except for term.buf.fildes.
- */
-static void
-get_terminal(void)
-{
- TScreen *screen = &term->screen;
-
- screen->arrow = make_colored_cursor(XC_left_ptr,
- T_COLOR(screen, MOUSE_FG),
- T_COLOR(screen, MOUSE_BG));
-}
-
-/*
* The only difference in /etc/termcap between 4014 and 4015 is that
* the latter has support for switching character sets. We support the
* 4015 protocol, but ignore the character switches. Therefore, we
@@ -1474,6 +1461,7 @@ hungtty(int i GCC_UNUSED)
SIGNAL_RETURN;
}
+#if OPT_PTY_HANDSHAKE
struct {
int rows;
int cols;
@@ -1485,11 +1473,14 @@ struct {
void
first_map_occurred(void)
{
- TScreen *screen = &term->screen;
- handshake.rows = screen->max_row;
- handshake.cols = screen->max_col;
- waiting_for_initial_map = False;
+ if (resource.wait_for_map) {
+ TScreen *screen = TScreenOf(term);
+ handshake.rows = screen->max_row;
+ handshake.cols = screen->max_col;
+ resource.wait_for_map = False;
+ }
}
+#endif /* OPT_PTY_HANDSHAKE else !OPT_PTY_HANDSHAKE */
static void
set_owner(char *device, uid_t uid, gid_t gid, mode_t mode)
@@ -1499,28 +1490,12 @@ set_owner(char *device, uid_t uid, gid_t gid, mode_t mode)
if (chown(device, uid, gid) < 0) {
why = errno;
if (why != ENOENT
- && getuid() == 0) {
+ && save_ruid == 0) {
fprintf(stderr, "Cannot chown %s to %ld,%ld: %s\n",
- device, (long) uid, (long) gid, strerror(why));
- }
- }
-#ifndef __EMX__
-/* EMX can chmod files only, not devices */
- if (chmod(device, mode) < 0) {
- why = errno;
- if (why != ENOENT) {
- struct stat sb;
- if (stat(device, &sb) < 0) {
- fprintf(stderr, "Cannot chmod %s to %03o: %s\n",
- device, mode, strerror(why));
- } else {
- fprintf(stderr,
- "Cannot chmod %s to %03o currently %03o: %s\n",
- device, mode, (sb.st_mode & S_IFMT), strerror(why));
- }
+ device, (long) uid, (long) gid,
+ strerror(why));
}
}
-#endif
}
#define THE_PARENT 1
@@ -1554,31 +1529,32 @@ killit(int sig)
#define close_fd(fd) close(fd), fd = -1
static int
-spawn(void)
+spawnXTerm(XtermWidget xw)
/*
* Inits pty and tty and forks a login process.
* Does not close fd Xsocket.
* If slave, the pty named in passedPty is already open for use
*/
{
- TScreen *screen = &term->screen;
+ TScreen *screen = TScreenOf(xw);
int Xsocket = ConnectionNumber(screen->display);
int ttyfd = -1;
- struct termio tio;
+ TERMIO_STRUCT tio;
int status;
+ Bool ok_termcap;
+ char *newtc;
- char termcap[TERMCAP_SIZE], newtc[TERMCAP_SIZE];
char *TermName = NULL;
char *ptr, *shname, buf[64];
- int i, no_dev_tty = False, envsize;
+ int i, no_dev_tty = False;
char *dev_tty_name = (char *) 0;
TTYSIZE_STRUCT ts;
int pgrp = getpid();
char numbuf[12], **envnew;
- screen->uid = getuid();
- screen->gid = getgid();
+ screen->uid = save_ruid;
+ screen->gid = save_rgid;
if (am_slave >= 0) {
screen->respond = am_slave;
@@ -1645,12 +1621,12 @@ spawn(void)
}
/* avoid double MapWindow requests */
- XtSetMappedWhenManaged(SHELL_OF(CURRENT_EMU(screen)), False);
+ XtSetMappedWhenManaged(SHELL_OF(CURRENT_EMU()), False);
wm_delete_window = XInternAtom(XtDisplay(toplevel), "WM_DELETE_WINDOW",
False);
- if (!TEK4014_ACTIVE(screen))
+ if (!TEK4014_ACTIVE(xw))
VTInit(); /* realize now so know window size for tty driver */
if (Console) {
@@ -1661,19 +1637,19 @@ spawn(void)
XmuGetHostname(mit_console_name + MIT_CONSOLE_LEN, 255);
mit_console = XInternAtom(screen->display, mit_console_name, False);
/* the user told us to be the console, so we can use CurrentTime */
- XtOwnSelection(SHELL_OF(CURRENT_EMU(screen)),
+ XtOwnSelection(SHELL_OF(CURRENT_EMU()),
mit_console, CurrentTime,
ConvertConsoleSelection, NULL, NULL);
}
#if OPT_TEK4014
- if (screen->TekEmu) {
+ if (TEK4014_ACTIVE(xw)) {
envnew = tekterm;
- ptr = newtc;
+ newtc = TekScreenOf(tekWidget)->tcapbuf;
} else
#endif
{
envnew = vtterm;
- ptr = termcap;
+ newtc = screen->tcapbuf;
}
/*
@@ -1682,27 +1658,33 @@ spawn(void)
* the program to proceed (but not to set $TERMCAP) if the termcap
* entry is not found.
*/
- if (!get_termcap(TermName = resource.term_name, ptr, newtc)) {
+ ok_termcap = True;
+ if (!get_termcap(TermName = resource.term_name, newtc)) {
char *last = NULL;
TermName = *envnew;
+ ok_termcap = False;
while (*envnew != NULL) {
if ((last == NULL || strcmp(last, *envnew))
- && get_termcap(*envnew, ptr, newtc)) {
+ && get_termcap(*envnew, newtc)) {
TermName = *envnew;
+ ok_termcap = True;
break;
}
last = *envnew;
envnew++;
}
}
+ if (ok_termcap) {
+ resize_termcap(xw, newtc);
+ }
/* tell tty how big window is */
#if OPT_TEK4014
- if (TEK4014_ACTIVE(screen)) {
+ if (TEK4014_ACTIVE(xw)) {
TTYSIZE_ROWS(ts) = 38;
TTYSIZE_COLS(ts) = 81;
- ts.ws_xpixel = TFullWidth(screen);
- ts.ws_ypixel = TFullHeight(screen);
+ ts.ws_xpixel = TFullWidth(&(tekWidget->screen));
+ ts.ws_ypixel = TFullHeight(&(tekWidget->screen));
} else
#endif
{
@@ -1734,8 +1716,7 @@ spawn(void)
case 0: /* child */
whoami = THE_CHILD;
-/*debug fclose(confd);
-opencons();*/
+ opencons();
/* we don't need the socket, or the pty master anymore */
close(ConnectionNumber(screen->display));
close(screen->respond);
@@ -1775,7 +1756,7 @@ opencons();*/
* not have a line discipline structure
*/
{
- struct termio t, t1;
+ TERMIO_STRUCT t, t1;
if (ptioctl(ttyfd, TCGETA, (char *) &t) < 0)
t = d_tio;
@@ -1790,7 +1771,8 @@ opencons();*/
if (Console) {
int on = 1;
if (ioctl(ttyfd, TIOCCONS, (char *) &on) == -1)
- fprintf(stderr, "%s: cannot open console\n", xterm_name);
+ fprintf(stderr, "%s: cannot open console: %s\n",
+ ProgramName, strerror(errno));
}
}
@@ -1802,29 +1784,20 @@ opencons();*/
signal(SIGQUIT, SIG_DFL);
signal(SIGTERM, SIG_DFL);
- /* copy the environment before Setenv'ing */
- for (i = 0; gblenvp[i] != NULL; i++) ;
+ xtermCopyEnv(gblenvp);
- /* compute number of xtermSetenv() calls below */
- envsize = 1; /* (NULL terminating entry) */
- envsize += 5; /* TERM, WINDOWID, DISPLAY, _SHELL, _VERSION */
- envsize += 2; /* COLUMNS, LINES */
-
- envnew = TypeCallocN(char *, (unsigned) i + envsize);
- memmove((char *) envnew, (char *) gblenvp, i * sizeof(char *));
- gblenvp = envnew;
- xtermSetenv("TERM=", TermName);
+ xtermSetenv("TERM", TermName);
if (!TermName)
*newtc = 0;
sprintf(buf, "%lu",
- ((unsigned long) XtWindow(SHELL_OF(CURRENT_EMU(screen)))));
- xtermSetenv("WINDOWID=", buf);
+ ((unsigned long) XtWindow(SHELL_OF(CURRENT_EMU()))));
+ xtermSetenv("WINDOWID", buf);
/* put the display into the environment of the shell */
- xtermSetenv("DISPLAY=", XDisplayString(screen->display));
+ xtermSetenv("DISPLAY", XDisplayString(screen->display));
- xtermSetenv("XTERM_VERSION=", xtermVersion());
+ xtermSetenv("XTERM_VERSION", xtermVersion());
signal(SIGTERM, SIG_DFL);
@@ -1854,12 +1827,11 @@ opencons();*/
}
sprintf(numbuf, "%d", MaxCols(screen));
- xtermSetenv("COLUMNS=", numbuf);
+ xtermSetenv("COLUMNS", numbuf);
sprintf(numbuf, "%d", MaxRows(screen));
- xtermSetenv("LINES=", numbuf);
+ xtermSetenv("LINES", numbuf);
- /* reconstruct dead environ variable */
- environ = gblenvp;
+ gblenvp = environ;
/* need to reset after all the ioctl bashing we did above */
ptioctl(0, TIOCSWINSZ, (char *) &ts);
@@ -1883,37 +1855,37 @@ opencons();*/
* to command that the user gave anyway.
*/
if (command_to_exec_with_luit) {
- xtermSetenv("XTERM_SHELL=",
+ xtermSetenv("XTERM_SHELL",
xtermFindShell(*command_to_exec_with_luit, False));
TRACE(("spawning command \"%s\"\n", *command_to_exec_with_luit));
execvp(*command_to_exec_with_luit, command_to_exec_with_luit);
/* print error message on screen */
fprintf(stderr, "%s: Can't execvp %s: %s\n",
- xterm_name, *command_to_exec_with_luit, strerror(errno));
+ ProgramName, *command_to_exec_with_luit, strerror(errno));
fprintf(stderr, "%s: cannot support your locale.\n",
- xterm_name);
+ ProgramName);
}
#endif
if (command_to_exec) {
- xtermSetenv("XTERM_SHELL=",
+ xtermSetenv("XTERM_SHELL",
xtermFindShell(*command_to_exec, False));
TRACE(("spawning command \"%s\"\n", *command_to_exec));
execvpe(*command_to_exec, command_to_exec, gblenvp);
/* print error message on screen */
fprintf(stderr, "%s: Can't execvp %s\n",
- xterm_name, *command_to_exec);
+ ProgramName, *command_to_exec);
}
/* use a layered mechanism to find a shell */
- ptr = getenv("X11SHELL");
+ ptr = x_getenv("X11SHELL");
if (!ptr)
- ptr = getenv("SHELL");
+ ptr = x_getenv("SHELL");
if (!ptr)
- ptr = getenv("OS2_SHELL");
+ ptr = x_getenv("OS2_SHELL");
if (!ptr)
ptr = "SORRY_NO_SHELL_FOUND";
- xtermSetenv("XTERM_SHELL=", ptr);
+ xtermSetenv("XTERM_SHELL", ptr);
shname = x_basename(ptr);
if (command_to_exec) {
@@ -1933,13 +1905,13 @@ opencons();*/
/* print error message on screen */
fprintf(stderr, "%s: Can't execvp %s\n",
- xterm_name, *command_to_exec);
+ ProgramName, *command_to_exec);
} else {
execlpe(ptr, shname, 0, gblenvp);
/* Exec failed. */
fprintf(stderr, "%s: Could not exec %s!\n",
- xterm_name, ptr);
+ ProgramName, ptr);
}
sleep(5);
@@ -1966,12 +1938,12 @@ opencons();*/
signal(SIGQUIT, SIG_IGN);
/* signal (SIGTERM, SIG_IGN);*/
return 0;
-} /* end spawn */
+} /* end spawnXTerm */
SIGNAL_T
Exit(int n)
{
- TScreen *screen = &term->screen;
+ TScreen *screen = TScreenOf(term);
int pty = term->screen.respond; /* file descriptor of pty */
close(pty); /* close explicitly to avoid race with slave side */
#ifdef ALLOWLOGGING
@@ -1989,7 +1961,7 @@ Exit(int n)
/* ARGSUSED */
static void
-resize(TScreen * screen, char *oldtc, char *newtc)
+resize_termcap(XtermWidget xw, char *newtc)
{
}
@@ -2028,7 +2000,7 @@ reapchild(int n GCC_UNUSED)
fputs("Exiting\n", stderr);
#endif
if (!hold_screen)
- need_cleanup = TRUE;
+ need_cleanup = True;
}
} while ((pid = nonblocking_wait()) > 0);
@@ -2053,13 +2025,17 @@ parse_tty_modes(char *s, struct _xttymodes *modelist)
TRACE(("parse_tty_modes\n"));
while (1) {
+ size_t len;
+
while (*s && isascii(CharOf(*s)) && isspace(CharOf(*s)))
s++;
if (!*s)
return count;
+ for (len = 0; isalnum(CharOf(s[len])); ++len) ;
for (mp = modelist; mp->name; mp++) {
- if (strncmp(s, mp->name, mp->len) == 0)
+ if (len == mp->len
+ && strncmp(s, mp->name, mp->len) == 0)
break;
}
if (!mp->name)
@@ -2103,7 +2079,7 @@ ptioctl(int fd, int func, void *data)
APIRET rc;
ULONG len;
struct pt_termios pt;
- struct termio *t;
+ TERMIO_STRUCT *t;
int i;
switch (func) {
@@ -2113,7 +2089,7 @@ ptioctl(int fd, int func, void *data)
(ULONG *) & pt, sizeof(struct pt_termios), &len);
if (rc)
return -1;
- t = (struct termio *) data;
+ t = (TERMIO_STRUCT *) data;
t->c_iflag = pt.c_iflag;
t->c_oflag = pt.c_oflag;
t->c_cflag = pt.c_cflag;
@@ -2124,7 +2100,7 @@ ptioctl(int fd, int func, void *data)
case TCSETA:
case TCSETAW:
case TCSETAF:
- t = (struct termio *) data;
+ t = (TERMIO_STRUCT *) data;
pt.c_iflag = t->c_iflag;
pt.c_oflag = t->c_oflag;
pt.c_cflag = t->c_cflag;
diff --git a/app/xterm/ptyx.h b/app/xterm/ptyx.h
index 717584d54..cf9276092 100644
--- a/app/xterm/ptyx.h
+++ b/app/xterm/ptyx.h
@@ -1,4 +1,4 @@
-/* $XTermId: ptyx.h,v 1.517 2008/07/27 19:38:00 tom Exp $ */
+/* $XTermId: ptyx.h,v 1.518 2008/09/14 15:16:20 Paul.Lampert Exp $ */
/*
* Copyright 1999-2007,2008 by Thomas E. Dickey
@@ -1463,6 +1463,7 @@ typedef struct {
int cursor_state; /* ON, OFF, or BLINKED_OFF */
int cursor_busy; /* do not redraw... */
+ Boolean cursor_underline; /* true if cursor is in underline mode */
#if OPT_BLINK_CURS
Boolean cursor_blink; /* cursor blink enable */
Boolean cursor_blink_res; /* initial cursor blink value */
diff --git a/app/xterm/version.h b/app/xterm/version.h
index 3056d53a9..66f3268a8 100644
--- a/app/xterm/version.h
+++ b/app/xterm/version.h
@@ -1,4 +1,4 @@
-/* $XTermId: version.h,v 1.292 2008/05/26 19:18:04 tom Exp $ */
+/* $XTermId: version.h,v 1.293 2008/09/14 13:45:26 tom Exp $ */
/*
* These definitions are used to build the string that's printed in response to
@@ -6,7 +6,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 236
+#define XTERM_PATCH 237
#ifndef __vendorversion__
#define __vendorversion__ "XTerm/OpenBSD"
diff --git a/app/xterm/xterm.h b/app/xterm/xterm.h
index 478cec666..d5e81b9ad 100644
--- a/app/xterm/xterm.h
+++ b/app/xterm/xterm.h
@@ -1,4 +1,4 @@
-/* $XTermId: xterm.h,v 1.502 2008/05/26 19:23:05 tom Exp $ */
+/* $XTermId: xterm.h,v 1.503 2008/09/14 15:18:39 Paul.Lampert Exp $ */
/************************************************************
@@ -377,6 +377,7 @@ extern char **environ;
#define XtNcursorColor "cursorColor"
#define XtNcursorOffTime "cursorOffTime"
#define XtNcursorOnTime "cursorOnTime"
+#define XtNcursorUnderline "cursorUnderLine"
#define XtNcutNewline "cutNewline"
#define XtNcutToBeginningOfLine "cutToBeginningOfLine"
#define XtNdecTerminalID "decTerminalID"
@@ -526,6 +527,7 @@ extern char **environ;
#define XtCCursorBlink "CursorBlink"
#define XtCCursorOffTime "CursorOffTime"
#define XtCCursorOnTime "CursorOnTime"
+#define XtCCursorUnderline "CursorUnderLine"
#define XtCCutNewline "CutNewline"
#define XtCCutToBeginningOfLine "CutToBeginningOfLine"
#define XtCDecTerminalID "DecTerminalID"
diff --git a/app/xterm/xterm.log.html b/app/xterm/xterm.log.html
index 9cb1fc03d..7502e8691 100644
--- a/app/xterm/xterm.log.html
+++ b/app/xterm/xterm.log.html
@@ -20,7 +20,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF *
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. *
*****************************************************************************
- $XTermId: xterm.log.html,v 1.685 2008/07/27 23:10:10 tom Exp $
+ $XTermId: xterm.log.html,v 1.690 2008/09/14 23:43:15 tom Exp $
-->
<HTML>
<HEAD>
@@ -45,6 +45,7 @@ Most of these are summarized in the XFree86 CHANGELOG
is the latest version of this file.
<UL>
+<LI><A HREF="#xterm_237">Patch #237 - 2008/09/14</A>
<LI><A HREF="#xterm_236">Patch #236 - 2008/07/27</A>
<LI><A HREF="#xterm_235">Patch #235 - 2008/04/20</A>
<LI><A HREF="#xterm_234">Patch #234 - 2008/03/02</A>
@@ -284,6 +285,31 @@ is the latest version of this file.
<LI><A HREF="#xterm_01">Patch #1 - 1996/1/6</A>
</UL>
+<H1><A NAME="xterm_237">Patch #237 - 2008/09/14</A></H1>
+<ul>
+ <li>improve usability of TrueType fonts by making the font-size
+ switching for shifted keypad plus/minus use the
+ <code>faceSize</code> resources to determine the order of fonts
+ (when TrueType fonts are used) rather than the bitmap fonts, since
+ their sizes may not be in the same order (report by H Merijn
+ Brand)
+
+ <li>remove an optimization of <code>ConfigureNotify</code> events
+ from <a href="#xterm_236">patch #236</a>
+ which seems to interfere with passing <code>SIGWINCH</code> to
+ applications (GenToo #233836).
+
+ <li>modify handling of <code>altSendsEscape</code> to reset the
+ <code>eightBitInput</code> mode, like <code>metaSendsEscape</code>
+ (patch by Ted Phelps).
+
+ <li>add feature to show the text-cursor as an underline rather than a
+ box, plus command-line options <code>-uc</code> and
+ <code>+uc</code> and resource <code>cursorUnderLine</code> to
+ control the feature (patch by Paul Lampert).
+
+ <li>update config.guess, config.sub
+</ul>
<H1><A NAME="xterm_236">Patch #236 - 2008/07/27</A></H1>
<ul>
<li>correct memory reallocation when handling a paste of UTF-8 text
diff --git a/app/xterm/xterm.man b/app/xterm/xterm.man
index c2e540caa..5e8974f26 100644
--- a/app/xterm/xterm.man
+++ b/app/xterm/xterm.man
@@ -1,5 +1,5 @@
'\" t
-.\" $XTermId: xterm.man,v 1.408 2008/04/20 21:16:40 tom Exp $
+.\" $XTermId: xterm.man,v 1.411 2008/09/14 23:06:19 tom Exp $
.\"
.\" Copyright 1996-2007,2008 by Thomas E. Dickey
.\"
@@ -527,13 +527,13 @@ It sets the \fBhpFunctionKeys\fP resource to ``false''.
.TP 8
.BI -hm
Tells \fIxterm\fP to use
-\fBhighlightTextColor\fP and \fBhighlightColor\fP
+\fBhighlightTextColor\fP and \fBhighlightColor\fP
to override the reversed foreground/background colors in a selection.
It sets the \fBhighlightColorMode\fP resource to ``true''.
.TP 8
.BI +hm
Tells \fIxterm\fP not to use
-\fBhighlightTextColor\fP and \fBhighlightColor\fP
+\fBhighlightTextColor\fP and \fBhighlightColor\fP
to override the reversed foreground/background colors in a selection.
It sets the \fBhighlightColorMode\fP resource to ``false''.
.TP 8
@@ -949,6 +949,12 @@ when your operating system does not support locale.
.B +u8
This option resets the \fButf8\fP resource.
.TP 8
+.B "-uc"
+This option makes the cursor underlined instead of a box.
+.TP 8
+.B "+uc"
+This option makes the cursor a box instead of underlined.
+.TP 8
.B "-ulc"
This option disables the display of characters with underline attribute as
color rather than with underlining.
@@ -1861,6 +1867,10 @@ at the end of the line.
If ``true'', the Newline is selected.
The default is ``true.''
.TP 8
+.B "cursorUnderLine (\fPclass\fB CursorUnderLine)"
+Specifies whether to make the cursor underlined or a box.
+The default is ``false.''
+.TP 8
.B "cutToBeginningOfLine (\fPclass\fB CutToBeginningOfLine)"
If ``false'', triple clicking to select a line selects only from the
current word forward.
@@ -1951,13 +1961,22 @@ Specify the pointsize for fonts selected from the FreeType
library if support for that library was compiled into \fIxterm\fR.
The default is ``14.''
On the \fBVT\ Fonts\fP menu, this corresponds to the \fIDefault\fP entry.
+.IP
You can specify the pointsize for TrueType fonts selected with the other
size-related menu entries such as Medium, Huge, etc., by using one of
the following resource values.
If you do not specify a value,
they default to ``0.0'',
-which causes \fIxterm\fP to use the ratio of font sizes from the bitmap
+which causes \fIxterm\fP to use the ratio of font sizes
+from the corresponding bitmap
font resources to obtain a TrueType pointsize.
+.IP
+If all of the \fBfaceSize\fP resources are set, then \fIxterm\fP
+will use this information to determine the next smaller/larger
+TrueType font for the
+\fIlarger-vt-font()\fP and
+\fIsmaller-vt-font()\fP actions.
+If any are not set, \fIxterm\fP will use only the areas of the bitmap fonts.
.TP 8
.B "faceSize1 (\fPclass\fB FaceSize1)"
Specifies the pointsize of the first alternative font.
@@ -2087,7 +2106,7 @@ The default is ``XtDefaultForeground.''
.TP 8
.B "highlightColorMode (\fPclass\fB HighlightColorMode)"
Specifies whether \fIxterm\fP should use
-\fBhighlightTextColor\fP and \fBhighlightColor\fP
+\fBhighlightTextColor\fP and \fBhighlightColor\fP
to override the reversed foreground/background colors in a selection.
The default is unspecified:
at startup, \fIxterm\fP checks if those resources are set to something
@@ -2116,35 +2135,35 @@ l l l l l
_ _ _ _ _
l l l l l.
\fIHCM\fR \fIHR\fR \fIHBG\fR \fIHFG\fR \fIHighlight\fP
-false false default default bg/fg\"0
-false false default set bg/fg\"1
-false false set default fg/HBG\"2
-false false set set fg/HBG\"3
+false false default default bg/fg
+false false default set bg/fg
+false false set default fg/HBG
+false false set set fg/HBG
=
-false true default default bg/fg\"4
-false true default set bg/fg\"5
-false true set default fg/HBG\"6
-false true set set fg/HBG\"7
+false true default default bg/fg
+false true default set bg/fg
+false true set default fg/HBG
+false true set set fg/HBG
=
-true false default default bg/fg\"8
-true false default set HFG/fg\"9
-true false set default bg/HBG\"10
-true false set set HFG/HBG\"11
+true false default default bg/fg
+true false default set HFG/fg
+true false set default bg/HBG
+true false set set HFG/HBG
=
-true true default default fg/fg (useless)\"12
-true true default set HFG/fg\"13
-true true set default fg/HBG\"14
-true true set set HFG/HBG\"15
+true true default default fg/fg (useless)
+true true default set HFG/fg
+true true set default fg/HBG
+true true set set HFG/HBG
=
-default false default default bg/fg\"16
-default false default set bg/fg\"17
-default false set default fg/HBG\"18
-default false set set HFG/HBG\"19
+default false default default bg/fg
+default false default set bg/fg
+default false set default fg/HBG
+default false set set HFG/HBG
=
-default true default default bg/fg\"20
-default true default set bg/fg\"21
-default true set default fg/HBG\"22
-default true set set HFG/HBG\"23
+default true default default bg/fg
+default true default set bg/fg
+default true set default fg/HBG
+default true set set HFG/HBG
=
.TE
.TP 8
@@ -2311,6 +2330,10 @@ Specifies the file name for the encoding converter from/to locale
encodings and UTF-8 which is used with the \fB-lc\fR option or \fBlocale\fR resource.
The help message shown by ``xterm -help'' lists the default value,
which depends on your system configuration.
+.IP
+If the encoding converter requires command-line parameters,
+you should put those within a shell script to execute the converter,
+and set this resource to point to the shell script.
.TP 8
.B "loginShell (\fPclass\fB LoginShell)"
Specifies whether or not the shell to be run in the window should be started
@@ -2606,7 +2629,7 @@ page function.
The default is ``false.''
.TP 8
.B "quietGrab (\fPclass\fB QuietGrab)"
-Controls whether the cursor is repainted
+Controls whether the cursor is repainted
when \fINotifyGrab\fP and \fINotifyUngrab\fP
event types are received during change of focus.
The default is ``false.''