summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/xterm/MANIFEST3
-rw-r--r--app/xterm/Tekproc.c6
-rw-r--r--app/xterm/XTerm.ad3
-rw-r--r--app/xterm/button.c16
-rw-r--r--app/xterm/charproc.c78
-rw-r--r--app/xterm/data.c6
-rw-r--r--app/xterm/data.h6
-rw-r--r--app/xterm/fontutils.c172
-rw-r--r--app/xterm/input.c26
-rw-r--r--app/xterm/linedata.c3
-rw-r--r--app/xterm/main.c77
-rw-r--r--app/xterm/main.h9
-rw-r--r--app/xterm/menu.c39
-rw-r--r--app/xterm/menu.h8
-rw-r--r--app/xterm/misc.c48
-rw-r--r--app/xterm/print.c8
-rw-r--r--app/xterm/ptyx.h20
-rw-r--r--app/xterm/resize.c40
-rw-r--r--app/xterm/screen.c33
-rw-r--r--app/xterm/scrollback.c10
-rw-r--r--app/xterm/scrollbar.c7
-rw-r--r--app/xterm/trace.c8
-rw-r--r--app/xterm/trace.h4
-rw-r--r--app/xterm/util.c114
-rw-r--r--app/xterm/version.h4
-rw-r--r--app/xterm/vttests/256colors2.pl49
-rw-r--r--app/xterm/vttests/88colors2.pl51
-rw-r--r--app/xterm/xstrings.c10
-rw-r--r--app/xterm/xstrings.h8
-rw-r--r--app/xterm/xterm.h23
-rw-r--r--app/xterm/xterm.log.html357
-rw-r--r--app/xterm/xterm.man45
-rw-r--r--app/xterm/xtermcap.c11
-rw-r--r--app/xterm/xtermcfg.h22
34 files changed, 929 insertions, 395 deletions
diff --git a/app/xterm/MANIFEST b/app/xterm/MANIFEST
index 603e76f97..7db856e46 100644
--- a/app/xterm/MANIFEST
+++ b/app/xterm/MANIFEST
@@ -1,4 +1,4 @@
-MANIFEST for xterm-247, version xterm-247
+MANIFEST for xterm-250, version xterm-250
--------------------------------------------------------------------------------
MANIFEST this file
256colres.h resource-definitions for 256-color mode
@@ -13,6 +13,7 @@ Makefile.in configure script template for Makefile
README overview & caveats for 'xterm'
README.i18n i18n readme:
README.os390 overview for os390 (EBCDIC) port of 'xterm'
+THANKS list of direct contributors
TekPrsTbl.c Tek4014 parser state tables
Tekparse.def template for generating Tekparse.h
Tekparse.h Tek4014 parser-state definitions
diff --git a/app/xterm/Tekproc.c b/app/xterm/Tekproc.c
index 531c31a56..5d4cf323a 100644
--- a/app/xterm/Tekproc.c
+++ b/app/xterm/Tekproc.c
@@ -1,4 +1,4 @@
-/* $XTermId: Tekproc.c,v 1.172 2009/08/09 17:22:34 tom Exp $ */
+/* $XTermId: Tekproc.c,v 1.173 2009/10/12 00:31:59 tom Exp $ */
/*
* Warning, there be crufty dragons here.
@@ -1889,10 +1889,10 @@ TekCopy(TekWidget tw)
sprintf(initbuf, "%c%c%c%c",
ANSI_ESC, (char) (tekscr->page.fontsize + '8'),
ANSI_ESC, (char) (tekscr->page.linetype + '`'));
- write(tekcopyfd, initbuf, (size_t) 4);
+ IGNORE_RC(write(tekcopyfd, initbuf, (size_t) 4));
Tp = &Tek0;
do {
- write(tekcopyfd, Tp->data, (size_t) Tp->count);
+ IGNORE_RC(write(tekcopyfd, Tp->data, (size_t) Tp->count));
Tp = Tp->next;
} while (Tp);
close(tekcopyfd);
diff --git a/app/xterm/XTerm.ad b/app/xterm/XTerm.ad
index 7ec5c6ece..91dee7eb0 100644
--- a/app/xterm/XTerm.ad
+++ b/app/xterm/XTerm.ad
@@ -1,4 +1,4 @@
-! $XTermId: XTerm.ad,v 1.89 2009/08/15 15:58:44 tom Exp $
+! $XTermId: XTerm.ad,v 1.90 2009/09/27 22:02:30 tom Exp $
*scrollBar: true
*saveLines: 1024
@@ -89,6 +89,7 @@
*fontMenu*font-linedrawing*Label: Line-Drawing Characters
*fontMenu*font-doublesize*Label: Doublesized Characters
*fontMenu*font-loadable*Label: VT220 Soft Fonts
+*fontMenu*font-packed*Label: Packed Font
*fontMenu*render-font*Label: TrueType Fonts
*fontMenu*utf8-mode*Label: UTF-8
*fontMenu*utf8-title*Label: UTF-8 Titles
diff --git a/app/xterm/button.c b/app/xterm/button.c
index 41019b063..6ccd5d583 100644
--- a/app/xterm/button.c
+++ b/app/xterm/button.c
@@ -1,4 +1,4 @@
-/* $XTermId: button.c,v 1.352 2009/09/11 09:13:53 tom Exp $ */
+/* $XTermId: button.c,v 1.356 2009/10/10 23:37:27 tom Exp $ */
/*
* Copyright 1999-2008,2009 by Thomas E. Dickey
@@ -2427,7 +2427,7 @@ ResizeSelection(TScreen * screen GCC_UNUSED, int rows, int cols)
Bool
iswide(int i)
{
- return (i == HIDDEN_CHAR) || ((i >= FIRST_WIDECHAR) && my_wcwidth(i) == 2);
+ return (i == HIDDEN_CHAR) || (WideCells(i) == 2);
}
#define isWideCell(row, col) iswide((int)XTERM_CELL(row, col))
@@ -2624,12 +2624,16 @@ okPosition(TScreen * screen,
LineData ** ld,
CELL * cell)
{
- if (cell->col > (LastTextCol(screen, *ld, cell->row) + 1)) {
+ Boolean result = True;
+
+ if (cell->row > screen->max_row) {
+ result = False;
+ } else if (cell->col > (LastTextCol(screen, *ld, cell->row) + 1)) {
cell->col = 0;
*ld = GET_LINEDATA(screen, ++cell->row);
- return False;
+ result = False;
}
- return True;
+ return result;
}
static void
@@ -2637,7 +2641,7 @@ trimLastLine(TScreen * screen,
LineData ** ld,
CELL * last)
{
- if (screen->cutNewline) {
+ if (screen->cutNewline && last->row < screen->max_row) {
last->col = 0;
*ld = GET_LINEDATA(screen, ++last->row);
} else {
diff --git a/app/xterm/charproc.c b/app/xterm/charproc.c
index 79b973f9b..c65f55c51 100644
--- a/app/xterm/charproc.c
+++ b/app/xterm/charproc.c
@@ -1,4 +1,4 @@
-/* $XTermId: charproc.c,v 1.972 2009/09/10 09:03:49 tom Exp $ */
+/* $XTermId: charproc.c,v 1.980 2009/10/11 23:48:30 tom Exp $ */
/*
@@ -116,6 +116,7 @@ in this Software without prior written authorization from The Open Group.
#include <stdio.h>
#include <ctype.h>
+#include <assert.h>
#if defined(HAVE_SCHED_YIELD)
#include <sched.h>
@@ -328,6 +329,7 @@ static XtActionsRec actionsList[] = {
#endif
#if OPT_BOX_CHARS
{ "set-font-linedrawing", HandleFontBoxChars },
+ { "set-font-packed", HandleFontPacked },
#endif
#if OPT_DABBREV
{ "dabbrev-expand", HandleDabbrevExpand },
@@ -392,7 +394,7 @@ static XtActionsRec actionsList[] = {
};
/* *INDENT-ON* */
-static XtResource resources[] =
+static XtResource xterm_resources[] =
{
Bres(XtNallowSendEvents, XtCAllowSendEvents, screen.allowSendEvent0, False),
Bres(XtNallowFontOps, XtCAllowFontOps, screen.allowFontOp0, DEF_ALLOW_FONT),
@@ -532,6 +534,7 @@ static XtResource resources[] =
#if OPT_BOX_CHARS
Bres(XtNforceBoxChars, XtCForceBoxChars, screen.force_box_chars, False),
+ Bres(XtNforcePackedFont, XtCForcePackedFont, screen.force_packed, True),
Bres(XtNshowMissingGlyphs, XtCShowMissingGlyphs, screen.force_all_chars, False),
#endif
@@ -739,8 +742,8 @@ static
WidgetClassRec xtermClassRec =
{
{
-/* core_class fields */
- (WidgetClass) & widgetClassRec, /* superclass */
+ /* core_class fields */
+ (WidgetClass) & widgetClassRec, /* superclass */
"VT100", /* class_name */
sizeof(XtermWidgetRec), /* widget_size */
VTClassInit, /* class_initialize */
@@ -751,8 +754,8 @@ WidgetClassRec xtermClassRec =
VTRealize, /* realize */
actionsList, /* actions */
XtNumber(actionsList), /* num_actions */
- resources, /* resources */
- XtNumber(resources), /* num_resources */
+ xterm_resources, /* resources */
+ XtNumber(xterm_resources), /* num_resources */
NULLQUARK, /* xrm_class */
True, /* compress_motion */
False, /* compress_exposure */
@@ -1149,10 +1152,10 @@ set_mod_fkeys(XtermWidget xw, int which, int what, Bool enabled)
#if OPT_TRACE
#define WHICH_TABLE(name) if (table == name) result = #name
-static char *
+static const char *
which_table(Const PARSE_T * table)
{
- char *result = "?";
+ const char *result = "?";
/* *INDENT-OFF* */
WHICH_TABLE (ansi_table);
else WHICH_TABLE (cigtable);
@@ -4764,7 +4767,7 @@ unparseputn(XtermWidget xw, unsigned int n)
}
void
-unparseputs(XtermWidget xw, char *s)
+unparseputs(XtermWidget xw, const char *s)
{
while (*s)
unparseputc(xw, *s++);
@@ -5373,7 +5376,7 @@ ParseOnClicks(XtermWidget wnew, XtermWidget wreq, Cardinal item)
{
/* *INDENT-OFF* */
static struct {
- const String name;
+ const char * name;
SelectUnit code;
} table[] = {
{ "char", Select_CHAR },
@@ -5430,7 +5433,7 @@ VTInitialize(Widget wrequest,
Bool color_ok;
#endif
-#if OPT_COLOR_RES2 && (MAXCOLORS > MIN_ANSI_COLORS)
+#if OPT_COLOR_RES2
static XtResource fake_resources[] =
{
#if OPT_256_COLORS
@@ -5441,7 +5444,8 @@ VTInitialize(Widget wrequest,
};
#endif /* OPT_COLOR_RES2 */
- TRACE(("VTInitialize\n"));
+ TRACE(("VTInitialize %d / %d\n", XtNumber(xterm_resources), MAXRESOURCES));
+ assert(XtNumber(xterm_resources) < MAXRESOURCES);
/* Zero out the entire "screen" component of "wnew" widget, then do
* field-by-field assignment of "screen" fields that are named in the
@@ -5497,6 +5501,7 @@ VTInitialize(Widget wrequest,
#if OPT_BOX_CHARS
init_Bres(screen.force_box_chars);
+ init_Bres(screen.force_packed);
init_Bres(screen.force_all_chars);
#endif
init_Bres(screen.free_bold_box);
@@ -5714,9 +5719,14 @@ VTInitialize(Widget wrequest,
init_Bres(screen.italicULMode);
init_Bres(screen.colorRVMode);
+#if OPT_COLOR_RES2
+ TRACE(("...will fake resources for color%d to color%d\n",
+ MIN_ANSI_COLORS,
+ NUM_ANSI_COLORS - 1));
+#endif
for (i = 0, color_ok = False; i < MAXCOLORS; i++) {
-#if OPT_COLOR_RES2 && (MAXCOLORS > MIN_ANSI_COLORS)
+#if OPT_COLOR_RES2
/*
* Xt has a hardcoded limit on the maximum number of resources that can
* be used in a widget. If we configure both luit (which implies
@@ -6261,14 +6271,15 @@ VTRealize(Widget w,
False,
screen->menu_font_number)) {
if (XmuCompareISOLatin1(myfont->f_n, DEFFONT) != 0) {
+ char *use_font = x_strdup(DEFFONT);
fprintf(stderr,
"%s: unable to open font \"%s\", trying \"%s\"....\n",
- xterm_name, myfont->f_n, DEFFONT);
+ xterm_name, myfont->f_n, use_font);
(void) xtermLoadFont(xw,
- xtermFontName(DEFFONT),
+ xtermFontName(use_font),
False,
screen->menu_font_number);
- screen->MenuFontName(screen->menu_font_number) = DEFFONT;
+ screen->MenuFontName(screen->menu_font_number) = use_font;
}
}
@@ -6581,7 +6592,7 @@ xim_real_init(XtermWidget xw)
XIMStyle input_style = 0;
Bool found;
static struct {
- char *name;
+ const char *name;
unsigned long code;
} known_style[] = {
{
@@ -7389,6 +7400,39 @@ HandleBlinking(XtPointer closure, XtIntervalId * id GCC_UNUSED)
}
#endif /* OPT_BLINK_CURS || OPT_BLINK_TEXT */
+void
+RestartBlinking(TScreen * screen GCC_UNUSED)
+{
+#if OPT_BLINK_CURS || OPT_BLINK_TEXT
+ if (screen->blink_timer == 0) {
+ Bool resume = False;
+
+#if OPT_BLINK_CURS
+ if (DoStartBlinking(screen)) {
+ resume = True;
+ }
+#endif
+#if OPT_BLINK_TEXT
+ if (!resume) {
+ int row;
+
+ for (row = screen->max_row; row >= 0; row--) {
+ LineData *ld = getLineData(screen, ROW2INX(screen, row));
+ if (LineTstBlinked(ld)) {
+ if (LineHasBlinking(screen, ld)) {
+ resume = True;
+ break;
+ }
+ }
+ }
+ }
+#endif
+ if (resume)
+ StartBlinking(screen);
+ }
+#endif
+}
+
/*
* Implement soft or hard (full) reset of the VTxxx emulation. There are a
* couple of differences from real DEC VTxxx terminals (to avoid breaking
diff --git a/app/xterm/data.c b/app/xterm/data.c
index 795e75374..7840f8baa 100644
--- a/app/xterm/data.c
+++ b/app/xterm/data.c
@@ -1,4 +1,4 @@
-/* $XTermId: data.c,v 1.90 2009/08/09 17:22:56 tom Exp $ */
+/* $XTermId: data.c,v 1.91 2009/10/12 00:33:20 tom Exp $ */
/*
* Copyright 2002-2006,2007 by Thomas E. Dickey
@@ -110,3 +110,7 @@ int mapstate = -1;
#if OPT_SESSION_MGT
int ice_fd = -1;
#endif
+
+#ifdef USE_IGNORE_RC
+int ignore_unused;
+#endif
diff --git a/app/xterm/data.h b/app/xterm/data.h
index 41f152a39..edeefe83d 100644
--- a/app/xterm/data.h
+++ b/app/xterm/data.h
@@ -1,4 +1,4 @@
-/* $XTermId: data.h,v 1.109 2009/08/09 17:23:01 tom Exp $ */
+/* $XTermId: data.h,v 1.110 2009/10/12 00:33:08 tom Exp $ */
/*
* Copyright 2002-2007,2009 by Thomas E. Dickey
@@ -211,4 +211,8 @@ typedef struct XTERM_RESOURCE {
extern XTERM_RESOURCE resource;
+#ifdef USE_IGNORE_RC
+extern int ignore_unused;
+#endif
+
#endif /* included_data_h */
diff --git a/app/xterm/fontutils.c b/app/xterm/fontutils.c
index 9eb94a251..ed1cf71c9 100644
--- a/app/xterm/fontutils.c
+++ b/app/xterm/fontutils.c
@@ -1,4 +1,4 @@
-/* $XTermId: fontutils.c,v 1.307 2009/08/07 23:22:32 tom Exp $ */
+/* $XTermId: fontutils.c,v 1.319 2009/10/12 22:29:42 tom Exp $ */
/************************************************************
@@ -158,6 +158,37 @@ compatibleWideCounts(XFontStruct * wfs, XFontStruct * wbfs)
}
#endif /* OPT_WIDE_CHARS */
+#if OPT_BOX_CHARS
+static void
+setupPackedFonts(XtermWidget xw)
+{
+ TScreen *screen = TScreenOf(xw);
+ Bool value = False;
+
+#if OPT_RENDERFONT
+#define MIXED(name) screen->name[fontnum].map.mixed
+ if (xw->misc.render_font) {
+ int fontnum = screen->menu_font_number;
+
+ screen->allow_packing = (Boolean) (MIXED(renderFontNorm)
+ || MIXED(renderFontBold)
+ || MIXED(renderFontItal)
+#if OPT_RENDERWIDE
+ || MIXED(renderWideNorm)
+ || MIXED(renderWideBold)
+ || MIXED(renderWideItal)
+#endif
+ );
+#undef MIXED
+ }
+#endif /* OPT_RENDERFONT */
+
+ value = screen->allow_packing;
+
+ SetItemSensitivity(fontMenuEntries[fontMenu_font_packedfont].widget, value);
+}
+#endif
+
/*
* Returns the fields from start to stop in a dash- separated string. This
* function will modify the source, putting '\0's in the appropiate place and
@@ -342,7 +373,7 @@ alloca_fontname(char **result, size_t next)
}
static void
-append_fontname_str(char **result, char *value)
+append_fontname_str(char **result, const char *value)
{
if (value == 0)
value = "*";
@@ -374,9 +405,9 @@ append_fontname_num(char **result, int value)
*/
static char *
derive_font_name(FontNameProperties * props,
- char *use_weight,
+ const char *use_weight,
int use_average_width,
- char *use_encoding)
+ const char *use_encoding)
{
char *result = 0;
@@ -436,7 +467,7 @@ xtermSpecialFont(TScreen * screen, unsigned atts, unsigned chrset)
#endif
FontNameProperties *props;
char *result = 0;
- char *weight;
+ const char *weight;
int pixel_size;
int res_x;
int res_y;
@@ -1090,7 +1121,11 @@ xtermLoadFont(XtermWidget xw,
}
});
- screen->fnt_prop = proportional;
+#if OPT_BOX_CHARS
+ screen->allow_packing = proportional;
+ setupPackedFonts(xw);
+#endif
+ screen->fnt_prop = (Boolean) (proportional && !(screen->force_packed));
screen->fnt_boxes = True;
#if OPT_BOX_CHARS
@@ -1206,7 +1241,7 @@ typedef struct {
* correspond to the VT100 resources.
*/
static Bool
-xtermLoadVTFonts(XtermWidget xw, char *myName, char *myClass)
+xtermLoadVTFonts(XtermWidget xw, String myName, String myClass)
{
static Bool initialized = False;
static SubResourceRec original, referenceRec, subresourceRec;
@@ -1293,7 +1328,7 @@ xtermLoadVTFonts(XtermWidget xw, char *myName, char *myClass)
#if OPT_WIDE_CHARS
static Bool
-isWideFont(XFontStruct * fp, char *tag, Bool nullOk)
+isWideFont(XFontStruct * fp, const char *tag, Bool nullOk)
{
Bool result = False;
@@ -1438,6 +1473,87 @@ xtermSetCursorBox(TScreen * screen)
#if OPT_RENDERFONT
+#if OPT_TRACE > 1
+static FcChar32
+xtermXftFirstChar(XftFont * xft)
+{
+ FcChar32 map[FC_CHARSET_MAP_SIZE];
+ FcChar32 next;
+ FcChar32 first;
+ int i;
+
+ first = FcCharSetFirstPage(xft->charset, map, &next);
+ for (i = 0; i < FC_CHARSET_MAP_SIZE; i++)
+ if (map[i]) {
+ FcChar32 bits = map[i];
+ first += i * 32;
+ while (!(bits & 0x1)) {
+ bits >>= 1;
+ first++;
+ }
+ break;
+ }
+ return first;
+}
+
+static FcChar32
+xtermXftLastChar(XftFont * xft)
+{
+ FcChar32 this, last, next;
+ FcChar32 map[FC_CHARSET_MAP_SIZE];
+ int i;
+ last = FcCharSetFirstPage(xft->charset, map, &next);
+ while ((this = FcCharSetNextPage(xft->charset, map, &next)) != FC_CHARSET_DONE)
+ last = this;
+ last &= ~0xff;
+ for (i = FC_CHARSET_MAP_SIZE - 1; i >= 0; i--)
+ if (map[i]) {
+ FcChar32 bits = map[i];
+ last += i * 32 + 31;
+ while (!(bits & 0x80000000)) {
+ last--;
+ bits <<= 1;
+ }
+ break;
+ }
+ return (long) last;
+}
+
+static void
+dumpXft(XtermWidget xw, XTermXftFonts * data)
+{
+ XftFont *xft = data->font;
+ TScreen *screen = TScreenOf(xw);
+ VTwin *win = WhichVWin(screen);
+
+ FcChar32 c;
+ FcChar32 first = xtermXftFirstChar(xft);
+ FcChar32 last = xtermXftLastChar(xft);
+ unsigned count = 0;
+ unsigned outside = 0;
+
+ TRACE(("dumpXft {{\n"));
+ TRACE((" data range %#6x..%#6x\n", first, last));
+ for (c = first; c <= last; ++c) {
+ if (FcCharSetHasChar(xft->charset, c)) {
+ int width = my_wcwidth((int) c);
+ XGlyphInfo extents;
+
+ XftTextExtents32(XtDisplay(xw), xft, &c, 1, &extents);
+ TRACE(("%#6x %2d %.1f\n", c, width,
+ ((double) extents.width) / win->f_width));
+ if (extents.width > win->f_width)
+ ++outside;
+ ++count;
+ }
+ }
+ TRACE(("}} %u total, %u outside\n", count, outside));
+}
+#define DUMP_XFT(xw, data) dumpXft(xw, data)
+#else
+#define DUMP_XFT(xw, data) /* nothing */
+#endif
+
static void
checkXft(XtermWidget xw, XTermXftFonts * data, XftFont * xft)
{
@@ -1448,13 +1564,23 @@ checkXft(XtermWidget xw, XTermXftFonts * data, XftFont * xft)
data->map.min_width = 0;
data->map.max_width = (Dimension) xft->max_advance_width;
+ /*
+ * For each ASCII or ISO-8859-1 printable code, ask what its width is.
+ * Given the maximum width for those, we have a reasonable estimate of
+ * the single-column width.
+ *
+ * Ignore control characters - their extent information is misleading.
+ */
for (c = 32; c < 256; ++c) {
+ if (c >= 127 && c <= 159)
+ continue;
if (FcCharSetHasChar(xft->charset, c)) {
XGlyphInfo extents;
XftTextExtents32(XtDisplay(xw), xft, &c, 1, &extents);
- if (width < extents.width)
+ if (width < extents.width && extents.width <= data->map.max_width) {
width = extents.width;
+ }
}
}
data->map.min_width = width;
@@ -1576,6 +1702,15 @@ setRenderFontsize(TScreen * screen, VTwin * win, XftFont * font, const char *tag
}
#endif
+static void
+checkFontInfo(int value, const char *tag)
+{
+ if (value == 0) {
+ fprintf(stderr, "Selected font has no non-zero %s for ISO-8859-1 encoding\n", tag);
+ exit(1);
+ }
+}
+
/*
* Compute useful values for the font/window sizes
*/
@@ -1805,6 +1940,20 @@ xtermComputeFontInfo(XtermWidget xw,
setRenderFontsize(screen, win, norm, NULL);
setRenderFontsize(screen, win, bold, "bold");
setRenderFontsize(screen, win, ital, "ital");
+#if OPT_BOX_CHARS
+ setupPackedFonts(xw);
+
+ if (screen->force_packed) {
+ XTermXftFonts *use = &(screen->renderFontNorm[fontnum]);
+ win->f_height = use->font->ascent + use->font->descent;
+ win->f_width = use->map.min_width;
+ TRACE(("...packed TrueType font %dx%d vs %d\n",
+ win->f_height,
+ win->f_width,
+ use->map.max_width));
+ }
+#endif
+ DUMP_XFT(xw, &(screen->renderFontNorm[fontnum]));
}
}
/*
@@ -1813,7 +1962,7 @@ xtermComputeFontInfo(XtermWidget xw,
if (!xw->misc.render_font || IsIconWin(screen, win))
#endif /* OPT_RENDERFONT */
{
- if (is_double_width_font(font)) {
+ if (is_double_width_font(font) && !(screen->fnt_prop)) {
win->f_width = (font->min_bounds.width);
} else {
win->f_width = (font->max_bounds.width);
@@ -1840,6 +1989,9 @@ xtermComputeFontInfo(XtermWidget xw,
win->f_width,
win->f_ascent,
win->f_descent));
+
+ checkFontInfo(win->f_height, "height");
+ checkFontInfo(win->f_width, "width");
}
/* save this information as a side-effect for double-sized characters */
diff --git a/app/xterm/input.c b/app/xterm/input.c
index fd6e3e0c5..9ee1fc5ee 100644
--- a/app/xterm/input.c
+++ b/app/xterm/input.c
@@ -1,4 +1,4 @@
-/* $XTermId: input.c,v 1.309 2009/06/18 00:08:40 tom Exp $ */
+/* $XTermId: input.c,v 1.310 2009/10/12 00:12:34 tom Exp $ */
/*
* Copyright 1999-2008,2009 by Thomas E. Dickey
@@ -125,13 +125,14 @@ typedef struct {
char strbuf[STRBUFSIZE];
} KEY_DATA;
-/* 0123456789 abc def0123456789abcdef0123456789abcdef0123456789abcd */
-static char *kypd_num = " XXXXXXXX\tXXX\rXXXxxxxXXXXXXXXXXXXXXXXXXXXX*+,-./0123456789XXX=";
-
-/* 0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcd */
-static char *kypd_apl = " ABCDEFGHIJKLMNOPQRSTUVWXYZ??????abcdefghijklmnopqrstuvwxyzXXX";
-
-static char *curfinal = "HDACB FE";
+static
+const char *kypd_num = " XXXXXXXX\tXXX\rXXXxxxxXXXXXXXXXXXXXXXXXXXXX*+,-./0123456789XXX=";
+/* 0123456789 abc def0123456789abcdef0123456789abcdef0123456789abcd */
+static
+const char *kypd_apl = " ABCDEFGHIJKLMNOPQRSTUVWXYZ??????abcdefghijklmnopqrstuvwxyzXXX";
+/* 0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcd */
+static
+const char *curfinal = "HDACB FE";
static int decfuncvalue(KEY_DATA *);
static void sunfuncvalue(ANSI *, KEY_DATA *);
@@ -139,10 +140,10 @@ static void hpfuncvalue(ANSI *, KEY_DATA *);
static void scofuncvalue(ANSI *, KEY_DATA *);
#if OPT_TRACE
-static char *
+static const char *
ModifierName(unsigned modifier)
{
- char *s = "";
+ const char *s = "";
if (modifier & ShiftMask)
s = " Shift";
else if (modifier & LockMask)
@@ -1786,7 +1787,8 @@ TranslationsUseKeyword(Widget w, char **cache, const char *keyword)
}
free(test);
}
- TRACE(("TranslationsUseKeyword(%p, %s) = %d\n", w, keyword, result));
+ TRACE(("TranslationsUseKeyword(%p, %s) = %d\n",
+ (void *) w, keyword, result));
return result;
}
@@ -1803,7 +1805,7 @@ xtermHasTranslation(XtermWidget xw, const char *keyword)
#if OPT_EXTRA_PASTE
static void
-addTranslation(XtermWidget xw, char *fromString, char *toString)
+addTranslation(XtermWidget xw, const char *fromString, const char *toString)
{
unsigned have = (xw->keyboard.extra_translations
? strlen(xw->keyboard.extra_translations)
diff --git a/app/xterm/linedata.c b/app/xterm/linedata.c
index 9896a44e4..e097b40a8 100644
--- a/app/xterm/linedata.c
+++ b/app/xterm/linedata.c
@@ -1,4 +1,4 @@
-/* $XTermId: linedata.c,v 1.71 2009/08/09 00:34:16 tom Exp $ */
+/* $XTermId: linedata.c,v 1.72 2009/09/28 23:58:59 tom Exp $ */
/************************************************************
@@ -61,6 +61,7 @@ getLineData(TScreen * screen, int row)
#endif
}
if (row >= 0) {
+ assert(row <= screen->max_row);
result = (LineData *) scrnHeadAddr(screen, buffer, (unsigned) row);
if (result != 0) {
#if 1 /* FIXME - these should be done in setupLineData, etc. */
diff --git a/app/xterm/main.c b/app/xterm/main.c
index 2f99d5b70..0e0214df6 100644
--- a/app/xterm/main.c
+++ b/app/xterm/main.c
@@ -1,4 +1,4 @@
-/* $XTermId: main.c,v 1.594 2009/08/30 21:40:45 Alex.Hornung Exp $ */
+/* $XTermId: main.c,v 1.597 2009/10/12 21:58:27 tom Exp $ */
/*
* W A R N I N G
@@ -448,11 +448,11 @@ extern char *ptsname(int);
#endif
#ifndef VMS
-static SIGNAL_T reapchild(int n);
+static SIGNAL_T reapchild(int /* n */ );
static int spawnXTerm(XtermWidget /* xw */ );
-static void remove_termcap_entry(char *buf, char *str);
+static void remove_termcap_entry(char *, const char *);
#ifdef USE_PTY_SEARCH
-static int pty_search(int *pty);
+static int pty_search(int * /* pty */ );
#endif
#endif /* ! VMS */
@@ -640,7 +640,7 @@ static struct jtchars d_jtc =
static Boolean override_tty_modes = False;
/* *INDENT-OFF* */
static struct _xttymodes {
- char *name;
+ const char *name;
size_t len;
int set;
int value;
@@ -1334,7 +1334,7 @@ decode_keyvalue(char **ptr, int termcap)
}
static int
-abbrev(char *tst, char *cmp, size_t need)
+abbrev(const char *tst, const char *cmp, size_t need)
{
size_t len = strlen(tst);
return ((len >= need) && (!strncmp(tst, cmp, len)));
@@ -2306,7 +2306,7 @@ main(int argc, char *argv[]ENVP_ARG)
buf[0] = '\0';
sprintf(buf, "%lx\n", XtWindow(SHELL_OF(CURRENT_EMU())));
- write(screen->respond, buf, strlen(buf));
+ IGNORE_RC(write(screen->respond, buf, strlen(buf)));
}
#ifdef AIXV3
#if (OSMAJORVERSION < 4)
@@ -2716,7 +2716,7 @@ pty_search(int *pty)
*/
#if OPT_TEK4014
-static char *tekterm[] =
+static const char *tekterm[] =
{
"tek4014",
"tek4015", /* 4014 with APL character set support */
@@ -2735,7 +2735,7 @@ static char *tekterm[] =
* The VT420 has up to 48 lines on the screen.
*/
-static char *vtterm[] =
+static const char *vtterm[] =
{
#ifdef USE_X11TERM
"x11term", /* for people who want special term name */
@@ -2852,7 +2852,9 @@ HsSysError(int error)
handshake.fatal_error,
handshake.buffer));
TRACE_HANDSHAKE("writing", &handshake);
- write(cp_pipe[1], (char *) &handshake, sizeof(handshake));
+ IGNORE_RC(write(cp_pipe[1],
+ (const char *) &handshake,
+ sizeof(handshake)));
} else {
fprintf(stderr,
"%s: fatal pty error errno=%d, error=%d device \"%s\"\n",
@@ -2881,7 +2883,9 @@ first_map_occurred(void)
if (pc_pipe[1] >= 0) {
TRACE(("first_map_occurred: %dx%d\n", handshake.rows, handshake.cols));
TRACE_HANDSHAKE("writing", &handshake);
- write(pc_pipe[1], (char *) &handshake, sizeof(handshake));
+ IGNORE_RC(write(pc_pipe[1],
+ (const char *) &handshake,
+ sizeof(handshake)));
close(cp_pipe[0]);
close(pc_pipe[1]);
}
@@ -3040,7 +3044,7 @@ spawnXTerm(XtermWidget xw)
char *ptr, *shname, *shname_minus;
int i, no_dev_tty = False;
- char **envnew; /* new environment */
+ const char **envnew; /* new environment */
char buf[64];
char *TermName = NULL;
#ifdef TTYSIZE_STRUCT
@@ -3280,15 +3284,22 @@ spawnXTerm(XtermWidget xw)
*/
ok_termcap = True;
if (!get_termcap(TermName = resource.term_name, newtc)) {
- char *last = NULL;
- TermName = *envnew;
+ const char *last = NULL;
+ char *next;
+
+ TermName = x_strdup(*envnew);
ok_termcap = False;
while (*envnew != NULL) {
- if ((last == NULL || strcmp(last, *envnew))
- && get_termcap(*envnew, newtc)) {
- TermName = *envnew;
- ok_termcap = True;
- break;
+ if (last == NULL || strcmp(last, *envnew)) {
+ next = x_strdup(*envnew);
+ if (get_termcap(next, newtc)) {
+ free(TermName);
+ TermName = next;
+ ok_termcap = True;
+ break;
+ } else {
+ free(next);
+ }
}
last = *envnew;
envnew++;
@@ -3312,8 +3323,9 @@ spawnXTerm(XtermWidget xw)
} else if (resource.ptyInitialErase) {
;
} else if (ok_termcap) {
+ static char name[] = TERMCAP_ERASE;
char temp[1024], *p = temp;
- char *s = tgetstr(TERMCAP_ERASE, &p);
+ char *s = tgetstr(name, &p);
TRACE(("...extracting initial_erase value from termcap\n"));
if (s != 0) {
initial_erase = decode_keyvalue(&s, True);
@@ -3567,8 +3579,9 @@ spawnXTerm(XtermWidget xw)
handshake.error = errno;
strcpy(handshake.buffer, ttydev);
TRACE_HANDSHAKE("writing", &handshake);
- write(cp_pipe[1], (char *) &handshake,
- sizeof(handshake));
+ IGNORE_RC(write(cp_pipe[1],
+ (const char *) &handshake,
+ sizeof(handshake)));
/* get reply from parent */
i = read(pc_pipe[0], (char *) &handshake,
@@ -3914,7 +3927,7 @@ spawnXTerm(XtermWidget xw)
for (i = 0; i <= 2; i++)
if (i != ttyfd) {
(void) close(i);
- (void) dup(ttyfd);
+ IGNORE_RC(dup(ttyfd));
}
#ifndef ATT
/* and close the tty */
@@ -4223,7 +4236,9 @@ spawnXTerm(XtermWidget xw)
handshake.error = 0;
(void) strcpy(handshake.buffer, ttydev);
TRACE_HANDSHAKE("writing", &handshake);
- (void) write(cp_pipe[1], (char *) &handshake, sizeof(handshake));
+ IGNORE_RC(write(cp_pipe[1],
+ (const char *) &handshake,
+ sizeof(handshake)));
if (resource.wait_for_map) {
i = read(pc_pipe[0], (char *) &handshake,
@@ -4327,7 +4342,7 @@ spawnXTerm(XtermWidget xw)
if (((ptr = x_getenv("SHELL")) == NULL) &&
((pw == NULL && (pw = getpwuid(screen->uid)) == NULL) ||
*(ptr = pw->pw_shell) == 0)) {
- ptr = "/bin/sh";
+ ptr = x_strdup("/bin/sh");
}
} else {
xtermSetenv("SHELL", explicit_shname);
@@ -4390,7 +4405,7 @@ spawnXTerm(XtermWidget xw)
if (xw->misc.login_shell) {
int u;
u = (term->misc.use_encoding ? 2 : 0);
- command_to_exec_with_luit[u + 1] = "-argv0";
+ command_to_exec_with_luit[u + 1] = x_strdup("-argv0");
command_to_exec_with_luit[u + 2] = shname_minus;
command_to_exec_with_luit[u + 3] = NULL;
}
@@ -4453,13 +4468,17 @@ spawnXTerm(XtermWidget xw)
ProgramName, strerror(errno));
handshake.status = PTY_NOMORE;
TRACE_HANDSHAKE("writing", &handshake);
- write(pc_pipe[1], (char *) &handshake, sizeof(handshake));
+ IGNORE_RC(write(pc_pipe[1],
+ (const char *) &handshake,
+ sizeof(handshake)));
exit(ERROR_PTYS);
}
handshake.status = PTY_NEW;
(void) strcpy(handshake.buffer, ttydev);
TRACE_HANDSHAKE("writing", &handshake);
- write(pc_pipe[1], (char *) &handshake, sizeof(handshake));
+ IGNORE_RC(write(pc_pipe[1],
+ (const char *) &handshake,
+ sizeof(handshake)));
break;
case PTY_FATALERROR:
@@ -4841,7 +4860,7 @@ reapchild(int n GCC_UNUSED)
#endif /* !VMS */
static void
-remove_termcap_entry(char *buf, char *str)
+remove_termcap_entry(char *buf, const char *str)
{
char *base = buf;
char *first = base;
diff --git a/app/xterm/main.h b/app/xterm/main.h
index 83fde3df9..3e7920de0 100644
--- a/app/xterm/main.h
+++ b/app/xterm/main.h
@@ -1,4 +1,4 @@
-/* $XTermId: main.h,v 1.42 2009/03/28 17:39:51 tom Exp $ */
+/* $XTermId: main.h,v 1.44 2009/10/10 09:38:25 tom Exp $ */
/*
* Copyright 2000-2008,2009 by Thomas E. Dickey
@@ -104,7 +104,7 @@
#endif
#ifndef DEF_ALLOW_WINDOW
-#define DEF_ALLOW_WINDOW True
+#define DEF_ALLOW_WINDOW False
#endif
#if OPT_BLINK_TEXT
@@ -169,4 +169,9 @@
#define DEFLOCALEFILTER DEFLOCALEFILTER1(PROJECTROOT) "/bin/luit"
#endif
+/*
+ * See lib/Xt/Resources.c
+ */
+#define MAXRESOURCES 400
+
#endif /* included_main_h */
diff --git a/app/xterm/menu.c b/app/xterm/menu.c
index 19a1bb949..a40d2eadf 100644
--- a/app/xterm/menu.c
+++ b/app/xterm/menu.c
@@ -1,4 +1,4 @@
-/* $XTermId: menu.c,v 1.252 2009/07/03 15:01:14 tom Exp $ */
+/* $XTermId: menu.c,v 1.254 2009/10/11 22:46:44 tom Exp $ */
/*
@@ -177,6 +177,7 @@ static void do_cursorblink PROTO_XT_CALLBACK_ARGS;
#if OPT_BOX_CHARS
static void do_font_boxchars PROTO_XT_CALLBACK_ARGS;
+static void do_font_packed PROTO_XT_CALLBACK_ARGS;
#endif
#if OPT_DEC_CHRSET
@@ -351,6 +352,7 @@ MenuEntry fontMenuEntries[] = {
{ "line1", NULL, NULL },
#if OPT_BOX_CHARS
{ "font-linedrawing",do_font_boxchars,NULL },
+ { "font-packed", do_font_packed,NULL },
#endif
#if OPT_DEC_CHRSET
{ "font-doublesize",do_font_doublesize,NULL },
@@ -713,6 +715,10 @@ domenu(Widget w,
SetItemSensitivity(
fontMenuEntries[fontMenu_font_boxchars].widget,
True);
+ update_font_packed();
+ SetItemSensitivity(
+ fontMenuEntries[fontMenu_font_packedfont].widget,
+ True);
#endif
#if OPT_DEC_SOFTFONT /* FIXME: not implemented */
update_font_loadable();
@@ -1496,6 +1502,16 @@ do_font_boxchars(Widget gw GCC_UNUSED,
update_font_boxchars();
Redraw();
}
+
+static void
+do_font_packed(Widget gw GCC_UNUSED,
+ XtPointer closure GCC_UNUSED,
+ XtPointer data GCC_UNUSED)
+{
+ ToggleFlag(term->screen.force_packed);
+ update_font_packed();
+ SetVTFont(term, term->screen.menu_font_number, True, NULL);
+}
#endif
#if OPT_DEC_SOFTFONT
@@ -1833,7 +1849,7 @@ HandleSendSignal(Widget w,
{
/* *INDENT-OFF* */
static struct sigtab {
- char *name;
+ const char *name;
int sig;
} signals[] = {
#ifdef SIGTSTP
@@ -2250,6 +2266,16 @@ HandleFontBoxChars(Widget w,
handle_vt_toggle(do_font_boxchars, term->screen.force_box_chars,
params, *param_count, w);
}
+
+void
+HandleFontPacked(Widget w,
+ XEvent * event GCC_UNUSED,
+ String * params,
+ Cardinal *param_count)
+{
+ handle_vt_toggle(do_font_packed, term->screen.force_packed,
+ params, *param_count, w);
+}
#endif
#if OPT_DEC_SOFTFONT
@@ -3176,6 +3202,15 @@ update_font_boxchars(void)
fontMenu_font_boxchars,
term->screen.force_box_chars);
}
+
+void
+update_font_packed(void)
+{
+ UpdateCheckbox("update_font_packed",
+ fontMenuEntries,
+ fontMenu_font_packedfont,
+ term->screen.force_packed);
+}
#endif
#if OPT_DEC_SOFTFONT
diff --git a/app/xterm/menu.h b/app/xterm/menu.h
index ff056ee2f..4cf4890a2 100644
--- a/app/xterm/menu.h
+++ b/app/xterm/menu.h
@@ -1,4 +1,4 @@
-/* $XTermId: menu.h,v 1.114 2009/05/02 14:35:39 Ovidiu.Gheorghioiu Exp $ */
+/* $XTermId: menu.h,v 1.117 2009/10/11 22:45:22 tom Exp $ */
/*
@@ -56,7 +56,7 @@ from The Open Group.
#include <xterm.h>
typedef struct _MenuEntry {
- char *name;
+ const char *name;
void (*function) PROTO_XT_CALLBACK_ARGS;
Widget widget;
} MenuEntry;
@@ -90,6 +90,7 @@ extern void HandleDeleteIsDEL PROTO_XT_ACTIONS_ARGS;
extern void HandleFontBoxChars PROTO_XT_ACTIONS_ARGS;
extern void HandleFontDoublesize PROTO_XT_ACTIONS_ARGS;
extern void HandleFontLoading PROTO_XT_ACTIONS_ARGS;
+extern void HandleFontPacked PROTO_XT_ACTIONS_ARGS;
extern void HandleHardReset PROTO_XT_ACTIONS_ARGS;
extern void HandleHpFunctionKeys PROTO_XT_ACTIONS_ARGS;
extern void HandleJumpscroll PROTO_XT_ACTIONS_ARGS;
@@ -257,6 +258,7 @@ typedef enum {
fontMenu_line1,
#if OPT_BOX_CHARS
fontMenu_font_boxchars,
+ fontMenu_font_packedfont,
#endif
#if OPT_DEC_CHRSET
fontMenu_font_doublesize,
@@ -427,8 +429,10 @@ extern void update_font_doublesize(void);
#if OPT_BOX_CHARS
extern void update_font_boxchars(void);
+extern void update_font_packed(void);
#else
#define update_font_boxchars() /* nothing */
+#define update_font_packed() /* nothing */
#endif
#if OPT_DEC_SOFTFONT
diff --git a/app/xterm/misc.c b/app/xterm/misc.c
index b84e78e9d..d378f9026 100644
--- a/app/xterm/misc.c
+++ b/app/xterm/misc.c
@@ -1,4 +1,4 @@
-/* $XTermId: misc.c,v 1.425 2009/08/07 23:18:31 tom Exp $ */
+/* $XTermId: misc.c,v 1.428 2009/10/12 00:44:44 tom Exp $ */
/*
*
@@ -516,7 +516,7 @@ HandleKeyPressed(Widget w GCC_UNUSED,
String * params GCC_UNUSED,
Cardinal *nparams GCC_UNUSED)
{
- TRACE(("Handle insert-seven-bit for %p\n", w));
+ TRACE(("Handle insert-seven-bit for %p\n", (void *) w));
#ifdef ACTIVEWINDOWINPUTONLY
if (w == CURRENT_EMU())
#endif
@@ -530,7 +530,7 @@ HandleEightBitKeyPressed(Widget w GCC_UNUSED,
String * params GCC_UNUSED,
Cardinal *nparams GCC_UNUSED)
{
- TRACE(("Handle insert-eight-bit for %p\n", w));
+ TRACE(("Handle insert-eight-bit for %p\n", (void *) w));
#ifdef ACTIVEWINDOWINPUTONLY
if (w == CURRENT_EMU())
#endif
@@ -634,7 +634,7 @@ HandleSpawnTerminal(Widget w GCC_UNUSED,
} else if (!pid) {
/* We are the child */
if (child_cwd) {
- chdir(child_cwd); /* We don't care if this fails */
+ IGNORE_RC(chdir(child_cwd)); /* We don't care if this fails */
}
if (setuid(screen->uid) == -1
@@ -1139,7 +1139,7 @@ HandleDabbrevExpand(Widget w,
{
XtermWidget xw;
- TRACE(("Handle dabbrev-expand for %p\n", w));
+ TRACE(("Handle dabbrev-expand for %p\n", (void *) w));
if ((xw = getXtermWidget(w)) != 0) {
TScreen *screen = &xw->screen;
if (!dabbrev_expand(screen))
@@ -1667,7 +1667,8 @@ StartLog(TScreen * screen)
&& ((pw = getpwuid(screen->uid)) == NULL
|| *(cp = pw->pw_shell) == 0))
|| (shell = CastMallocN(char, strlen(cp))) == 0) {
- shell = "/bin/sh";
+ static char dummy[] = "/bin/sh";
+ shell = dummy;
} else {
strcpy(shell, cp);
}
@@ -1733,7 +1734,7 @@ FlushLog(TScreen * screen)
cp = VTbuffer->next;
if (screen->logstart != 0
&& (i = cp - screen->logstart) > 0) {
- write(screen->logfd, (char *) screen->logstart, (unsigned) i);
+ IGNORE_RC(write(screen->logfd, screen->logstart, (unsigned) i));
}
screen->logstart = VTbuffer->next;
}
@@ -2030,7 +2031,7 @@ ManipulateSelectionData(XtermWidget xw, TScreen * screen, char *buf, int final)
PDATA('7', CUT_BUFFER7),
};
- char *base = buf;
+ const char *base = buf;
char *used = x_strdup(base);
Cardinal j, n = 0;
char **select_args = 0;
@@ -3014,7 +3015,7 @@ udk_lookup(int keycode, int *len)
}
static void
-ChangeGroup(XtermWidget xw, String attribute, char *value)
+ChangeGroup(XtermWidget xw, const char *attribute, char *value)
{
#if OPT_WIDE_CHARS
static Char *converted; /* NO_LEAKS */
@@ -3022,6 +3023,7 @@ ChangeGroup(XtermWidget xw, String attribute, char *value)
static char empty[1];
Arg args[1];
+ char *my_attr = x_strdup(attribute);
char *original = (value != 0) ? value : empty;
char *name = original;
TScreen *screen = TScreenOf(xw);
@@ -3031,7 +3033,7 @@ ChangeGroup(XtermWidget xw, String attribute, char *value)
Char *c1 = (Char *) original;
Char *cp;
- TRACE(("ChangeGroup(attribute=%s, value=%s)\n", attribute, name));
+ TRACE(("ChangeGroup(attribute=%s, value=%s)\n", my_attr, name));
if (!AllowTitleOps(xw))
return;
@@ -3085,7 +3087,7 @@ ChangeGroup(XtermWidget xw, String attribute, char *value)
if (resource.sameName) {
char *buf;
- XtSetArg(args[0], attribute, &buf);
+ XtSetArg(args[0], my_attr, &buf);
XtGetValues(top, args, 1);
TRACE(("...comparing{%s}\n", buf));
if (strcmp(name, buf) == 0)
@@ -3093,9 +3095,9 @@ ChangeGroup(XtermWidget xw, String attribute, char *value)
}
#endif /* OPT_SAME_NAME */
- TRACE(("...updating %s\n", attribute));
+ TRACE(("...updating %s\n", my_attr));
TRACE(("...value is %s\n", name));
- XtSetArg(args[0], attribute, name);
+ XtSetArg(args[0], my_attr, name);
XtSetValues(top, args, 1);
#if OPT_WIDE_CHARS
@@ -3103,7 +3105,7 @@ ChangeGroup(XtermWidget xw, String attribute, char *value)
Display *dpy = XtDisplay(xw);
Atom my_atom;
- const char *propname = (!strcmp(attribute, XtNtitle)
+ const char *propname = (!strcmp(my_attr, XtNtitle)
? "_NET_WM_NAME"
: "_NET_WM_ICON_NAME");
if ((my_atom = XInternAtom(dpy, propname, False)) != None) {
@@ -3121,13 +3123,16 @@ ChangeGroup(XtermWidget xw, String attribute, char *value)
}
}
#endif
+ free(my_attr);
}
void
ChangeIconName(XtermWidget xw, char *name)
{
- if (name == 0)
- name = "";
+ if (name == 0) {
+ static char dummy[] = "";
+ name = dummy;
+ }
#if OPT_ZICONBEEP /* If warning should be given then give it */
if (resource.zIconBeep && xw->screen.zIconBeep_flagged) {
char *newname = CastMallocN(char, strlen(name) + 4);
@@ -3247,7 +3252,7 @@ AllocateTermColor(XtermWidget xw,
/* ARGSUSED */
void
-Panic(char *s GCC_UNUSED, int a GCC_UNUSED)
+Panic(const char *s GCC_UNUSED, int a GCC_UNUSED)
{
#ifdef DEBUG
if (debug) {
@@ -3470,7 +3475,7 @@ xtermCopyEnv(char **oldenv)
* to have to do a realloc().
*/
void
-xtermSetenv(char *var, char *value)
+xtermSetenv(const char *var, const char *value)
{
if (value != 0) {
char *test;
@@ -3782,7 +3787,7 @@ sortedOpts(OptionHelp * options, XrmOptionDescRec * descs, Cardinal numDescs)
Cardinal k;
XrmOptionDescRec *res_array = sortedOptDescs(descs, numDescs);
int code;
- char *mesg;
+ const char *mesg;
#else
(void) descs;
(void) numDescs;
@@ -3863,9 +3868,10 @@ xtermEnvLocale(void)
if (result == 0) {
if ((result = x_nonempty(setlocale(LC_CTYPE, 0))) == 0) {
- result = "C";
+ result = x_strdup("C");
+ } else {
+ result = x_strdup(result);
}
- result = x_strdup(result);
TRACE(("xtermEnvLocale ->%s\n", result));
}
return result;
diff --git a/app/xterm/print.c b/app/xterm/print.c
index 3310ba065..e600e6218 100644
--- a/app/xterm/print.c
+++ b/app/xterm/print.c
@@ -1,4 +1,4 @@
-/* $XTermId: print.c,v 1.109 2009/09/10 09:06:30 tom Exp $ */
+/* $XTermId: print.c,v 1.110 2009/10/12 00:04:19 tom Exp $ */
/************************************************************
@@ -69,7 +69,7 @@ static void send_SGR(XtermWidget /* xw */ ,
unsigned /* fg */ ,
unsigned /* bg */ );
static void stringToPrinter(XtermWidget /* xw */ ,
- char * /*str */ );
+ const char * /*str */ );
static FILE *Printer;
static pid_t Printer_pid;
@@ -296,7 +296,7 @@ static void
send_CharSet(XtermWidget xw, LineData * ld)
{
#if OPT_DEC_CHRSET
- char *msg = 0;
+ const char *msg = 0;
switch (GetLineDblCS(ld)) {
case CSET_SWL:
@@ -434,7 +434,7 @@ charToPrinter(XtermWidget xw, unsigned chr)
}
static void
-stringToPrinter(XtermWidget xw, char *str)
+stringToPrinter(XtermWidget xw, const char *str)
{
while (*str)
charToPrinter(xw, CharOf(*str++));
diff --git a/app/xterm/ptyx.h b/app/xterm/ptyx.h
index 54b000a07..482fe8590 100644
--- a/app/xterm/ptyx.h
+++ b/app/xterm/ptyx.h
@@ -1,4 +1,4 @@
-/* $XTermId: ptyx.h,v 1.627 2009/09/10 08:50:02 tom Exp $ */
+/* $XTermId: ptyx.h,v 1.632 2009/10/10 13:02:16 tom Exp $ */
/*
* Copyright 1999-2008,2009 by Thomas E. Dickey
@@ -461,11 +461,6 @@ typedef struct {
#ifndef OPT_COLOR_RES
#define OPT_COLOR_RES 1 /* true if xterm delays color-resource evaluation */
-#undef OPT_COLOR_RES2
-#endif
-
-#ifndef OPT_COLOR_RES2
-#define OPT_COLOR_RES2 OPT_COLOR_RES /* true to avoid using extra resources */
#endif
#ifndef OPT_DABBREV
@@ -706,9 +701,12 @@ typedef struct {
#define OPT_COLOR_RES 0
#endif
-#if OPT_COLOR_RES2 && !(OPT_256_COLORS || OPT_88_COLORS)
-/* You must have 88/256 colors to need fake-resource logic */
-#undef OPT_COLOR_RES2
+#if OPT_256_COLORS && (OPT_WIDE_CHARS || OPT_RENDERFONT || OPT_XMC_GLITCH)
+/* It's actually more complicated than that - but by trimming options you can
+ * have 256 color resources though.
+ */
+#define OPT_COLOR_RES2 1
+#else
#define OPT_COLOR_RES2 0
#endif
@@ -1543,9 +1541,11 @@ typedef struct {
Boolean fnt_prop; /* true if proportional fonts */
Boolean fnt_boxes; /* true if font has box-chars */
+ Boolean force_packed; /* true to override proportional */
#if OPT_BOX_CHARS
Boolean force_box_chars;/* true if we assume that */
- Boolean force_all_chars;/* true to outline missing chars*/
+ Boolean force_all_chars;/* true to outline missing chars */
+ Boolean allow_packing; /* true to allow packed-fonts */
#endif
Dimension fnt_wide;
Dimension fnt_high;
diff --git a/app/xterm/resize.c b/app/xterm/resize.c
index 393195f71..069c7cbae 100644
--- a/app/xterm/resize.c
+++ b/app/xterm/resize.c
@@ -1,4 +1,4 @@
-/* $XTermId: resize.c,v 1.108 2009/05/31 14:00:16 tom Exp $ */
+/* $XTermId: resize.c,v 1.109 2009/10/12 00:41:33 tom Exp $ */
/*
* Copyright 2003-2008,2009 by Thomas E. Dickey
@@ -86,6 +86,10 @@
#include <signal.h>
#include <pwd.h>
+#ifdef USE_IGNORE_RC
+int ignore_unused;
+#endif
+
#ifdef X_NOT_POSIX
#if !defined(SYSV) && !defined(i386)
extern struct passwd *getpwuid(); /* does ANYBODY need this? */
@@ -109,7 +113,7 @@ extern struct passwd *getpwuid(); /* does ANYBODY need this? */
#define SHELL_BOURNE 2
/* *INDENT-OFF* */
static struct {
- char *name;
+ const char *name;
int type;
} shell_list[] = {
{ "csh", SHELL_C }, /* vanilla cshell */
@@ -124,33 +128,33 @@ static struct {
};
/* *INDENT-ON* */
-static char *emuname[EMULATIONS] =
+static const char *emuname[EMULATIONS] =
{
"VT100",
"Sun",
};
static char *myname;
static int shell_type = SHELL_UNKNOWN;
-static char *getsize[EMULATIONS] =
+static const char *getsize[EMULATIONS] =
{
ESCAPE("7") ESCAPE("[r") ESCAPE("[999;999H") ESCAPE("[6n"),
ESCAPE("[18t"),
};
#if defined(USE_STRUCT_TTYSIZE)
#elif defined(USE_STRUCT_WINSIZE)
-static char *getwsize[EMULATIONS] =
+static const char *getwsize[EMULATIONS] =
{ /* size in pixels */
0,
ESCAPE("[14t"),
};
#endif /* USE_STRUCT_{TTYSIZE|WINSIZE} */
-static char *restore[EMULATIONS] =
+static const char *restore[EMULATIONS] =
{
ESCAPE("8"),
0,
};
-static char *setname = "";
-static char *setsize[EMULATIONS] =
+static const char *setname = "";
+static const char *setsize[EMULATIONS] =
{
0,
ESCAPE("[8;%s;%st"),
@@ -164,7 +168,7 @@ static struct termios tioorig;
static struct sgttyb sgorig;
#endif /* USE_ANY_SYSV_TERMIO/USE_TERMIOS */
-static char *size[EMULATIONS] =
+static const char *size[EMULATIONS] =
{
ESCAPE("[%d;%dR"),
ESCAPE("[8;%d;%dt"),
@@ -175,7 +179,7 @@ static FILE *ttyfp;
#if defined(USE_STRUCT_TTYSIZE)
#elif defined(USE_STRUCT_WINSIZE)
-static char *wsize[EMULATIONS] =
+static const char *wsize[EMULATIONS] =
{
0,
ESCAPE("[4;%hd;%hdt"),
@@ -186,7 +190,7 @@ static SIGNAL_T onintr(int sig);
static SIGNAL_T resize_timeout(int sig);
static int checkdigits(char *str);
static void Usage(void);
-static void readstring(FILE *fp, char *buf, char *str);
+static void readstring(FILE *fp, char *buf, const char *str);
#ifdef USE_TERMCAP
static void
@@ -279,7 +283,7 @@ main(int argc, char **argv ENVP_ARG)
(((pw = getpwuid(getuid())) == NULL) ||
*(ptr = pw->pw_shell) == 0))
/* this is the same default that xterm uses */
- ptr = "/bin/sh";
+ ptr = x_strdup("/bin/sh");
shell = x_basename(ptr);
@@ -305,7 +309,7 @@ main(int argc, char **argv ENVP_ARG)
#ifdef CANT_OPEN_DEV_TTY
if ((name_of_tty = ttyname(fileno(stderr))) == NULL)
#endif
- name_of_tty = "/dev/tty";
+ name_of_tty = x_strdup("/dev/tty");
if ((ttyfp = fopen(name_of_tty, "r+")) == NULL) {
fprintf(stderr, "%s: can't open terminal %s\n",
@@ -378,17 +382,17 @@ main(int argc, char **argv ENVP_ARG)
onintr(0);
}
sprintf(tmpbuf, setsize[emu], argv[0], argv[1]);
- write(tty, tmpbuf, strlen(tmpbuf));
+ IGNORE_RC(write(tty, tmpbuf, strlen(tmpbuf)));
free(tmpbuf);
}
- write(tty, getsize[emu], strlen(getsize[emu]));
+ IGNORE_RC(write(tty, getsize[emu], strlen(getsize[emu])));
readstring(ttyfp, buf, size[emu]);
if (sscanf(buf, size[emu], &rows, &cols) != 2) {
fprintf(stderr, "%s: Can't get rows and columns\r\n", myname);
onintr(0);
}
if (restore[emu])
- write(tty, restore[emu], strlen(restore[emu]));
+ IGNORE_RC(write(tty, restore[emu], strlen(restore[emu])));
#if defined(USE_STRUCT_TTYSIZE)
/* finally, set the tty's window size */
if (ioctl(tty, TIOCGSIZE, &ts) != -1) {
@@ -400,7 +404,7 @@ main(int argc, char **argv ENVP_ARG)
/* finally, set the tty's window size */
if (getwsize[emu]) {
/* get the window size in pixels */
- write(tty, getwsize[emu], strlen(getwsize[emu]));
+ IGNORE_RC(write(tty, getwsize[emu], strlen(getwsize[emu])));
readstring(ttyfp, buf, wsize[emu]);
if (sscanf(buf, wsize[emu], &ts.ws_xpixel, &ts.ws_ypixel) != 2) {
fprintf(stderr, "%s: Can't get window size\r\n", myname);
@@ -507,7 +511,7 @@ checkdigits(char *str)
}
static void
-readstring(FILE *fp, char *buf, char *str)
+readstring(FILE *fp, char *buf, const char *str)
{
int last, c;
#if !defined(USG) && !defined(__UNIXOS2__)
diff --git a/app/xterm/screen.c b/app/xterm/screen.c
index d1d836378..20ef3b03c 100644
--- a/app/xterm/screen.c
+++ b/app/xterm/screen.c
@@ -1,4 +1,4 @@
-/* $XTermId: screen.c,v 1.396 2009/08/30 00:06:07 tom Exp $ */
+/* $XTermId: screen.c,v 1.403 2009/10/01 00:30:19 tom Exp $ */
/*
* Copyright 1999-2008,2009 by Thomas E. Dickey
@@ -704,7 +704,8 @@ ScrnClearCells(XtermWidget xw, int row, int col, unsigned len)
if_OPT_WIDE_CHARS(screen, {
int kl;
int kr;
- if (DamagedCells(screen, len, &kl, &kr, INX2ROW(screen, row), col)
+
+ if (DamagedCells(screen, len, &kl, &kr, row, col)
&& kr >= kl) {
ClearCells(xw, flags, (unsigned) (kr - kl + 1), row, kl);
}
@@ -755,6 +756,10 @@ ScrnWriteText(XtermWidget xw,
(void) cur_fg_bg;
+ if (real_width + (unsigned) screen->cur_col > (unsigned) MaxCols(screen)) {
+ real_width = (unsigned) (MaxCols(screen) - screen->cur_col);
+ }
+
if (avail <= 0)
return;
if (length > (unsigned) avail)
@@ -1156,7 +1161,7 @@ ScrnInsertChar(XtermWidget xw, unsigned n)
assert(last > (int) n);
if_OPT_WIDE_CHARS(screen, {
- int xx = INX2ROW(screen, screen->cur_row);
+ int xx = screen->cur_row;
int kl;
int kr = screen->cur_col;
if (DamagedCells(screen, n, &kl, (int *) 0, xx, kr) && kr > kl) {
@@ -1220,7 +1225,7 @@ ScrnDeleteChar(XtermWidget xw, unsigned n)
int kl;
int kr;
if (DamagedCells(screen, n, &kl, &kr,
- INX2ROW(screen, screen->cur_row),
+ screen->cur_row,
screen->cur_col))
ClearCells(xw, 0, (unsigned) (kr - kl + 1), row, kl);
});
@@ -1647,13 +1652,15 @@ ClearBufRows(XtermWidget xw,
TRACE(("ClearBufRows %d..%d\n", first, last));
for (row = first; row <= last; row++) {
- LineData *ld = getLineData(screen, ROW2INX(screen, row));
- if_OPT_DEC_CHRSET({
- /* clearing the whole row resets the doublesize characters */
- SetLineDblCS(ld, CSET_SWL);
- });
- LineClrWrapped(ld);
- ClearCells(xw, 0, len, row, 0);
+ LineData *ld = getLineData(screen, row);
+ if (ld != 0) {
+ if_OPT_DEC_CHRSET({
+ /* clearing the whole row resets the doublesize characters */
+ SetLineDblCS(ld, CSET_SWL);
+ });
+ LineClrWrapped(ld);
+ ClearCells(xw, 0, len, row, 0);
+ }
}
}
@@ -1777,8 +1784,8 @@ ScreenResize(XtermWidget xw,
if (amount < 0) {
/* move line-data from visible-buffer to save-buffer */
- saveEditBufLines(screen, dst, -amount);
- move_up = -amount;
+ saveEditBufLines(screen, dst, (unsigned) -amount);
+ move_up = (unsigned) -amount;
move_down_by = amount;
} else {
move_down_by = 0;
diff --git a/app/xterm/scrollback.c b/app/xterm/scrollback.c
index a828c8cf4..ff207bb5b 100644
--- a/app/xterm/scrollback.c
+++ b/app/xterm/scrollback.c
@@ -1,4 +1,4 @@
-/* $XTermId: scrollback.c,v 1.11 2009/08/06 08:34:30 tom Exp $ */
+/* $XTermId: scrollback.c,v 1.12 2009/10/12 00:06:18 tom Exp $ */
/************************************************************
@@ -48,7 +48,7 @@ getScrollback(TScreen * screen, int row)
unsigned which = ROW2FIFO(screen, row);
ScrnBuf where = scrnHeadAddr(screen, screen->saveBuf_index, which);
- TRACE(("getScrollback %d -> %d -> %p\n", row, which, where));
+ TRACE(("getScrollback %d -> %d -> %p\n", row, which, (void *) where));
return (LineData *) where;
}
@@ -80,7 +80,7 @@ addScrollback(TScreen * screen)
*/
if (prior->attribs != 0) {
TRACE(("...freeing prior FIFO data in slot %d: %p->%p\n",
- which, prior, prior->attribs));
+ which, (void *) prior, prior->attribs));
free(prior->attribs);
prior->attribs = 0;
}
@@ -93,7 +93,7 @@ addScrollback(TScreen * screen)
setupLineData(screen, where, (Char *) block, 1, ncols);
TRACE(("...storing new FIFO data in slot %d: %p->%p\n",
- which, where, block));
+ which, (void *) where, block));
}
return (LineData *) where;
@@ -111,7 +111,7 @@ deleteScrollback(TScreen * screen, int row)
*/
if (prior->attribs != 0) {
TRACE(("...freeing prior FIFO data in slot %d: %p->%p\n",
- which, prior, prior->attribs));
+ which, (void *) prior, prior->attribs));
free(prior->attribs);
prior->attribs = 0;
}
diff --git a/app/xterm/scrollbar.c b/app/xterm/scrollbar.c
index 85ce15065..fb79bd961 100644
--- a/app/xterm/scrollbar.c
+++ b/app/xterm/scrollbar.c
@@ -1,4 +1,4 @@
-/* $XTermId: scrollbar.c,v 1.143 2009/08/09 17:23:47 tom Exp $ */
+/* $XTermId: scrollbar.c,v 1.145 2009/10/12 21:56:35 tom Exp $ */
/*
* Copyright 2000-2008,2009 by Thomas E. Dickey
@@ -374,6 +374,9 @@ WindowScroll(XtermWidget xw, int top)
ScrnRefresh(xw, refreshtop, 0, lines, MaxCols(screen), False);
ScrollBarDrawThumb(screen->scrollWidget);
+#if OPT_BLINK_CURS || OPT_BLINK_TEXT
+ RestartBlinking(screen);
+#endif
}
#ifdef SCROLLBAR_RIGHT
@@ -553,7 +556,7 @@ ScrollTextUpDownBy(
* assume that b is alphabetic and allow plural
*/
static int
-CompareWidths(char *a, char *b, int *modifier)
+CompareWidths(const char *a, const char *b, int *modifier)
{
int result;
char ca, cb;
diff --git a/app/xterm/trace.c b/app/xterm/trace.c
index dd1694583..fa8602afc 100644
--- a/app/xterm/trace.c
+++ b/app/xterm/trace.c
@@ -1,4 +1,4 @@
-/* $XTermId: trace.c,v 1.102 2009/07/03 13:57:08 tom Exp $ */
+/* $XTermId: trace.c,v 1.104 2009/10/12 00:08:00 tom Exp $ */
/************************************************************
@@ -59,13 +59,13 @@ extern "C" {
}
#endif
#endif
-char *trace_who = "parent";
+const char *trace_who = "parent";
void
Trace(const char *fmt,...)
{
static FILE *fp;
- static char *trace_out;
+ static const char *trace_out;
va_list ap;
if (fp != 0
@@ -255,7 +255,7 @@ visibleIChar(IChar * buf, unsigned len)
static unsigned used;
if (buf != 0) {
- unsigned limit = ((len + 1) * 6) + 1;
+ unsigned limit = ((len + 1) * 8) + 1;
char *dst;
if (limit > used) {
diff --git a/app/xterm/trace.h b/app/xterm/trace.h
index 982ae6de8..9907bd36b 100644
--- a/app/xterm/trace.h
+++ b/app/xterm/trace.h
@@ -1,4 +1,4 @@
-/* $XTermId: trace.h,v 1.47 2009/06/17 09:24:31 tom Exp $ */
+/* $XTermId: trace.h,v 1.48 2009/10/12 00:08:18 tom Exp $ */
/************************************************************
@@ -59,7 +59,7 @@ extern void TraceArgv(const char * /* tag */, char ** /* argv */);
#undef TRACE_ARGV
#define TRACE_ARGV(tag,argv) TraceArgv(tag,argv)
-extern char *trace_who;
+extern const char *trace_who;
#undef TRACE_CHILD
#define TRACE_CHILD int tracing_child = (trace_who = "child") != 0; (void) tracing_child;
diff --git a/app/xterm/util.c b/app/xterm/util.c
index 4a740b6b5..af57be569 100644
--- a/app/xterm/util.c
+++ b/app/xterm/util.c
@@ -1,4 +1,4 @@
-/* $XTermId: util.c,v 1.489 2009/09/10 09:22:43 tom Exp $ */
+/* $XTermId: util.c,v 1.504 2009/10/11 20:23:19 tom Exp $ */
/*
* Copyright 1999-2008,2009 by Thomas E. Dickey
@@ -649,6 +649,10 @@ WriteText(XtermWidget xw, IChar * str, Cardinal len)
screen->cur_col,
len, visibleIChar(str, len)));
+ if (cells + (unsigned) screen->cur_col > (unsigned) MaxCols(screen)) {
+ cells = (unsigned) (MaxCols(screen) - screen->cur_col);
+ }
+
if (ScrnHaveSelection(screen)
&& ScrnIsLineInSelection(screen, INX2ROW(screen, screen->cur_row))) {
ScrnDisownSelection(xw);
@@ -744,7 +748,7 @@ InsertLine(XtermWidget xw, int n)
int scrolltop;
int scrollheight;
- if (!ScrnIsLineInMargins(screen, INX2ROW(screen, screen->cur_row)))
+ if (!ScrnIsLineInMargins(screen, screen->cur_row))
return;
TRACE(("InsertLine count=%d\n", n));
@@ -753,7 +757,12 @@ InsertLine(XtermWidget xw, int n)
HideCursor();
if (ScrnHaveSelection(screen)
- && ScrnAreLinesInSelection(screen, screen->top_marg, screen->bot_marg)) {
+ && ScrnAreLinesInSelection(screen,
+ INX2ROW(screen, screen->top_marg),
+ INX2ROW(screen, screen->cur_row - 1))
+ && ScrnAreLinesInSelection(screen,
+ INX2ROW(screen, screen->cur_row),
+ INX2ROW(screen, screen->bot_marg))) {
ScrnDisownSelection(xw);
}
@@ -820,7 +829,7 @@ DeleteLine(XtermWidget xw, int n)
&& !screen->whichBuf
&& screen->cur_row == 0);
- if (!ScrnIsLineInMargins(screen, INX2ROW(screen, screen->cur_row)))
+ if (!ScrnIsLineInMargins(screen, screen->cur_row))
return;
TRACE(("DeleteLine count=%d\n", n));
@@ -828,14 +837,17 @@ DeleteLine(XtermWidget xw, int n)
if (screen->cursor_state)
HideCursor();
+ if (n > (i = screen->bot_marg - screen->cur_row + 1)) {
+ n = i;
+ }
if (ScrnHaveSelection(screen)
- && ScrnAreLinesInSelection(screen, screen->top_marg, screen->bot_marg)) {
+ && ScrnAreLinesInSelection(screen,
+ INX2ROW(screen, screen->cur_row),
+ INX2ROW(screen, screen->cur_row + n - 1))) {
ScrnDisownSelection(xw);
}
screen->do_wrap = False;
- if (n > (i = screen->bot_marg - screen->cur_row + 1))
- n = i;
if (screen->jumpscroll) {
if (screen->scroll_amt >= 0 && screen->cur_row == screen->top_marg) {
if (screen->refresh_amt + n > MaxRows(screen))
@@ -847,8 +859,25 @@ DeleteLine(XtermWidget xw, int n)
FlushScroll(xw);
}
}
- if (!screen->scroll_amt) {
+ /* adjust screen->buf */
+ if (n > 0) {
+ if (scroll_all_lines)
+ ScrnDeleteLine(xw,
+ screen->saveBuf_index,
+ screen->bot_marg + screen->savelines,
+ 0,
+ (unsigned) n);
+ else
+ ScrnDeleteLine(xw,
+ screen->visbuf,
+ screen->bot_marg,
+ screen->cur_row,
+ (unsigned) n);
+ }
+
+ /* repaint the screen, as needed */
+ if (!screen->scroll_amt) {
shift = INX2ROW(screen, 0);
bot = screen->max_row - shift;
scrollheight = i - n;
@@ -876,6 +905,14 @@ DeleteLine(XtermWidget xw, int n)
}
}
vertical_copy_area(xw, scrolltop + n, scrollheight, n);
+ if (shift > 0 && refreshheight > 0) {
+ int rows = refreshheight;
+ if (rows > shift)
+ rows = shift;
+ ScrnUpdate(xw, refreshtop, 0, rows, MaxCols(screen), True);
+ refreshtop += shift;
+ refreshheight -= shift;
+ }
if (refreshheight > 0) {
ClearCurBackground(xw,
(int) refreshtop * FontHeight(screen) + screen->border,
@@ -884,21 +921,6 @@ DeleteLine(XtermWidget xw, int n)
(unsigned) Width(screen));
}
}
- /* adjust screen->buf */
- if (n > 0) {
- if (scroll_all_lines)
- ScrnDeleteLine(xw,
- screen->saveBuf_index,
- screen->bot_marg + screen->savelines,
- 0,
- (unsigned) n);
- else
- ScrnDeleteLine(xw,
- screen->visbuf,
- screen->bot_marg,
- screen->cur_row,
- (unsigned) n);
- }
}
/*
@@ -1069,7 +1091,7 @@ ClearAbove(XtermWidget xw)
if (screen->scroll_amt)
FlushScroll(xw);
if ((height = screen->cur_row + top) > screen->max_row)
- height = screen->max_row;
+ height = screen->max_row + 1;
if ((height -= top) > 0) {
ClearCurBackground(xw,
top * FontHeight(screen) + screen->border,
@@ -1081,8 +1103,7 @@ ClearAbove(XtermWidget xw)
ClearBufRows(xw, 0, screen->cur_row - 1);
}
- if (INX2ROW(screen, screen->cur_row) <= screen->max_row)
- ClearLeft(xw);
+ ClearLeft(xw);
}
/*
@@ -2771,21 +2792,19 @@ drawXtermText(XtermWidget xw,
if (xtermIsDecGraphic(ch)) {
/*
* Xft generally does not have the line-drawing characters
- * in cells 1-31. Check for this, and attempt to fill in
- * from real line-drawing character in the font at the
- * Unicode position. Failing that, use our own
- * box-characters.
+ * in cells 1-31. Assume this (we cannot inspect the
+ * picture easily...), and attempt to fill in from real
+ * line-drawing character in the font at the Unicode
+ * position. Failing that, use our own box-characters.
*/
- if (xtermXftMissing(xw, font, ch)) {
- if (screen->force_box_chars
- || xtermXftMissing(xw, font, dec2ucs(ch))) {
- missing = 1;
- } else {
- ch = dec2ucs(ch);
- replace = True;
- }
+ if (screen->force_box_chars
+ || xtermXftMissing(xw, font, dec2ucs(ch))) {
+ missing = 1;
+ } else {
+ ch = dec2ucs(ch);
+ replace = True;
}
- } else if (ch > 256) {
+ } else if (ch >= 256) {
/*
* If we're reading UTF-8 from the client, we may have a
* line-drawing character. Translate it back to our
@@ -2909,16 +2928,16 @@ drawXtermText(XtermWidget xw,
? WhichVFontData(screen, fnts[fBold])
: WhichVFontData(screen, fnts[fNorm]));
- xtermFillCells(xw, flags, gc, x, y, len);
-
while (len--) {
+ int cells = WideCells(*text);
#if OPT_BOX_CHARS
+#if OPT_WIDE_CHARS
+ if (*text == HIDDEN_CHAR) {
+ ++text;
+ continue;
+ } else
+#endif
if (IsXtermMissingChar(screen, *text, font)) {
-
- width = 1;
- if_OPT_WIDE_CHARS(screen, {
- width = my_wcwidth((wchar_t) (*text)) * FontWidth(screen);
- });
adj = 0;
} else
#endif
@@ -2935,7 +2954,10 @@ drawXtermText(XtermWidget xw,
width = XTextWidth(font->fs, temp, 1);
});
adj = (FontWidth(screen) - width) / 2;
+ if (adj < 0)
+ adj = 0;
}
+ xtermFillCells(xw, flags, gc, x, y, (Cardinal) cells);
x = drawXtermText(xw,
flags | NOBACKGROUND | CHARBYCHAR,
gc, x + adj, y, chrset,
diff --git a/app/xterm/version.h b/app/xterm/version.h
index 92721d2b4..9f8fd1ec3 100644
--- a/app/xterm/version.h
+++ b/app/xterm/version.h
@@ -1,4 +1,4 @@
-/* $XTermId: version.h,v 1.303 2009/08/28 10:49:30 tom Exp $ */
+/* $XTermId: version.h,v 1.306 2009/10/10 13:03:04 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 248
+#define XTERM_PATCH 250
#ifndef __vendorversion__
#define __vendorversion__ "XTerm/OpenBSD"
diff --git a/app/xterm/vttests/256colors2.pl b/app/xterm/vttests/256colors2.pl
index c97c2be9d..0aecc551d 100644
--- a/app/xterm/vttests/256colors2.pl
+++ b/app/xterm/vttests/256colors2.pl
@@ -1,20 +1,52 @@
#!/usr/bin/perl
-# Author: Todd Larason <jtl@molehill.org>
-# $XFree86: xc/programs/xterm/vttests/256colors2.pl,v 1.2 2002/03/26 01:46:43 dickey Exp $
-
+# $XTermId: 256colors2.pl,v 1.9 2009/10/10 14:45:26 tom Exp $
+# Authors: Todd Larason <jtl@molehill.org>
+# Thomas E Dickey
+#
# use the resources for colors 0-15 - usually more-or-less a
# reproduction of the standard ANSI colors, but possibly more
# pleasing shades
+use strict;
+
+use Getopt::Std;
+
+our ($opt_h, $opt_q, $opt_r);
+&getopts('hqr') || die("Usage: $0 [-q] [-r]");
+die("Usage: $0 [options]\n
+Options:
+ -h display this message
+ -q quieter output by merging all palette initialization
+ -r display the reverse of the usual palette
+") if ( $opt_h);
+
+our ($red, $green, $blue);
+our ($gray, $level, $color);
+
+sub map_cube($) {
+ my $value = $_[0];
+ $value = (5 - $value) if defined($opt_r);
+ return $value;
+}
+
+sub map_gray($) {
+ my $value = $_[0];
+ $value = (23 - $value) if defined($opt_r);
+ return $value;
+}
+
+printf("\x1b]4") if ($opt_q);
# colors 16-231 are a 6x6x6 color cube
for ($red = 0; $red < 6; $red++) {
for ($green = 0; $green < 6; $green++) {
for ($blue = 0; $blue < 6; $blue++) {
- printf("\x1b]4;%d;rgb:%2.2x/%2.2x/%2.2x\x1b\\",
- 16 + ($red * 36) + ($green * 6) + $blue,
+ printf("\x1b]4") unless ($opt_q);
+ printf(";%d;rgb:%2.2x/%2.2x/%2.2x",
+ 16 + (map_cube($red) * 36) + (map_cube($green) * 6) + map_cube($blue),
($red ? ($red * 40 + 55) : 0),
($green ? ($green * 40 + 55) : 0),
($blue ? ($blue * 40 + 55) : 0));
+ printf("\x1b\\") unless ($opt_q);
}
}
}
@@ -22,10 +54,13 @@ for ($red = 0; $red < 6; $red++) {
# colors 232-255 are a grayscale ramp, intentionally leaving out
# black and white
for ($gray = 0; $gray < 24; $gray++) {
- $level = ($gray * 10) + 8;
- printf("\x1b]4;%d;rgb:%2.2x/%2.2x/%2.2x\x1b\\",
+ $level = (map_gray($gray) * 10) + 8;
+ printf("\x1b]4") unless ($opt_q);
+ printf(";%d;rgb:%2.2x/%2.2x/%2.2x",
232 + $gray, $level, $level, $level);
+ printf("\x1b\\") unless ($opt_q);
}
+printf("\x1b\\") if ($opt_q);
# display the colors
diff --git a/app/xterm/vttests/88colors2.pl b/app/xterm/vttests/88colors2.pl
index 0e4c8f529..63d3f3a87 100644
--- a/app/xterm/vttests/88colors2.pl
+++ b/app/xterm/vttests/88colors2.pl
@@ -1,22 +1,56 @@
#!/usr/bin/perl
-# Author: Steve Wall <swall@redcom.com>
-# $XFree86: xc/programs/xterm/vttests/88colors2.pl,v 1.1 1999/09/25 14:38:51 dawes Exp $
-# Made from 256colors2.pl
+# $XTermId: 88colors2.pl,v 1.6 2009/10/10 14:57:12 tom Exp $
+# Authors: Steve Wall <swall@redcom.com>
+# Thomas E Dickey
+#
+# Adapted from 256colors2.pl
# use the resources for colors 0-15 - usually more-or-less a
# reproduction of the standard ANSI colors, but possibly more
# pleasing shades
+use strict;
+
+use Getopt::Std;
+
+our ($opt_h, $opt_q, $opt_r);
+&getopts('hqr') || die("Usage: $0 [-q] [-r]");
+die("Usage: $0 [options]\n
+Options:
+ -h display this message
+ -q quieter output by merging all palette initialization
+ -r display the reverse of the usual palette
+") if ( $opt_h);
+
+our (@steps);
+our ($red, $green, $blue);
+our ($gray, $level, $color);
+
+sub map_cube($) {
+ my $value = $_[0];
+ $value = (3 - $value) if defined($opt_r);
+ return $value;
+}
+
+sub map_gray($) {
+ my $value = $_[0];
+ $value = (7 - $value) if defined($opt_r);
+ return $value;
+}
+
# colors 16-79 are a 4x4x4 color cube
@steps=(0,139,205,255);
+printf("\x1b]4") if ($opt_q);
for ($red = 0; $red < 4; $red++) {
for ($green = 0; $green < 4; $green++) {
for ($blue = 0; $blue < 4; $blue++) {
- printf("\x1b]4;%d;rgb:%2.2x/%2.2x/%2.2x\x1b\\",
- 16 + ($red * 16) + ($green * 4) + $blue,
+ printf("\x1b]4") unless ($opt_q);
+ printf(";%d;rgb:%2.2x/%2.2x/%2.2x",
+ 16 + (map_cube($red) * 16) + (map_cube($green) * 4) + map_cube($blue),
int (@steps[$red]),
int (@steps[$green]),
int (@steps[$blue]));
+ printf("\x1b\\") unless ($opt_q);
}
}
}
@@ -24,11 +58,14 @@ for ($red = 0; $red < 4; $red++) {
# colors 80-87 are a grayscale ramp, intentionally leaving out
# black and white
for ($gray = 0; $gray < 8; $gray++) {
- $level = ($gray * 23.18181818) + 46.36363636;
+ $level = (map_gray($gray) * 23.18181818) + 46.36363636;
if( $gray > 0 ) { $level += 23.18181818; }
- printf("\x1b]4;%d;rgb:%2.2x/%2.2x/%2.2x\x1b\\",
+ printf("\x1b]4") unless ($opt_q);
+ printf(";%d;rgb:%2.2x/%2.2x/%2.2x",
80 + $gray, int($level), int($level), int($level));
+ printf("\x1b\\") unless ($opt_q);
}
+printf("\x1b\\") if ($opt_q);
# display the colors
diff --git a/app/xterm/xstrings.c b/app/xterm/xstrings.c
index 1c141383b..de14ded35 100644
--- a/app/xterm/xstrings.c
+++ b/app/xterm/xstrings.c
@@ -1,10 +1,8 @@
-/* $XTermId: xstrings.c,v 1.28 2008/12/30 17:10:37 tom Exp $ */
-
-/* $XFree86: xc/programs/xterm/xstrings.c,v 1.10 2006/02/13 01:14:59 dickey Exp $ */
+/* $XTermId: xstrings.c,v 1.30 2009/10/12 22:25:54 tom Exp $ */
/************************************************************
-Copyright 2000-2007,2008 by Thomas E. Dickey
+Copyright 2000-2008,2009 by Thomas E. Dickey
All Rights Reserved
@@ -99,7 +97,7 @@ x_skip_nonblanks(char *s)
int
x_strcasecmp(const char *s1, const char *s2)
{
- unsigned len = strlen(s1);
+ size_t len = strlen(s1);
if (len != strlen(s2))
return 1;
@@ -146,7 +144,7 @@ x_strdup(const char *s)
* or NULL if there are none.
*/
char *
-x_strindex(char *s1, char *s2)
+x_strindex(char *s1, const char *s2)
{
char *s3;
size_t s2len = strlen(s2);
diff --git a/app/xterm/xstrings.h b/app/xterm/xstrings.h
index 56cfab3b3..ebb7668ce 100644
--- a/app/xterm/xstrings.h
+++ b/app/xterm/xstrings.h
@@ -1,10 +1,8 @@
-/* $XTermId: xstrings.h,v 1.14 2008/12/30 17:10:43 tom Exp $ */
-
-/* $XFree86: xc/programs/xterm/xstrings.h,v 1.5 2006/02/13 01:14:59 dickey Exp $ */
+/* $XTermId: xstrings.h,v 1.15 2009/10/11 23:00:59 tom Exp $ */
/************************************************************
-Copyright 2000-2007,2008 by Thomas E. Dickey
+Copyright 2000-2008,2009 by Thomas E. Dickey
All Rights Reserved
@@ -43,7 +41,7 @@ extern char *x_nonempty(char * /* s */);
extern char *x_skip_blanks(char * /* s */);
extern char *x_skip_nonblanks(char * /* s */);
extern char *x_strdup(const char * /* s */);
-extern char *x_strindex(char * /* s1 */, char * /* s2 */);
+extern char *x_strindex(char * /* s1 */, const char * /* s2 */);
extern char *x_strtrim(char * /* s */);
extern char x_toupper(int /* ch */);
extern int x_strcasecmp(const char * /* s1 */, const char * /* s2 */);
diff --git a/app/xterm/xterm.h b/app/xterm/xterm.h
index 001c18974..bf66dbb75 100644
--- a/app/xterm/xterm.h
+++ b/app/xterm/xterm.h
@@ -1,4 +1,4 @@
-/* $XTermId: xterm.h,v 1.582 2009/09/10 09:01:22 tom Exp $ */
+/* $XTermId: xterm.h,v 1.589 2009/10/12 00:34:48 tom Exp $ */
/************************************************************
@@ -53,6 +53,13 @@ authorization.
#define GCC_NORETURN /* nothing */
#endif
+#if defined(__GNUC__) && defined(_FORTIFY_SOURCE)
+#define USE_IGNORE_RC
+#define IGNORE_RC(func) ignore_unused = func
+#else
+#define IGNORE_RC(func) (void) func
+#endif /* gcc workarounds */
+
#include <X11/Xos.h>
#ifndef HAVE_CONFIG_H
@@ -402,6 +409,7 @@ extern char **environ;
#define XtNfontStyle "fontStyle"
#define XtNfontWarnings "fontWarnings"
#define XtNforceBoxChars "forceBoxChars"
+#define XtNforcePackedFont "forcePackedFont"
#define XtNformatOtherKeys "formatOtherKeys"
#define XtNfreeBoldBox "freeBoldBox"
#define XtNhighlightColor "highlightColor"
@@ -561,6 +569,7 @@ extern char **environ;
#define XtCFontStyle "FontStyle"
#define XtCFontWarnings "FontWarnings"
#define XtCForceBoxChars "ForceBoxChars"
+#define XtCForcePackedFont "ForcePackedFont"
#define XtCFormatOtherKeys "FormatOtherKeys"
#define XtCFreeBoldBox "FreeBoldBox"
#define XtCHighlightColorMode "HighlightColorMode"
@@ -748,7 +757,10 @@ extern void ReadLineButton PROTO_XT_ACTIONS_ARGS;
#if OPT_WIDE_CHARS
extern Bool iswide(int /* i */);
#define FIRST_WIDECHAR 256
-#define isWide(n) ((int) (n) >= FIRST_WIDECHAR && iswide(n))
+#define WideCells(n) (((IChar)(n) >= FIRST_WIDECHAR) ? my_wcwidth((wchar_t) (n)) : 1)
+#define isWide(n) (((IChar)(n) >= FIRST_WIDECHAR) && iswide(n))
+#else
+#define WideCells(n) 1
#endif
/* cachedCgs.c */
@@ -777,6 +789,7 @@ extern int VTInit (XtermWidget /* xw */);
extern int v_write (int /* f */, Char * /* d */, unsigned /* len */);
extern void FindFontSelection (XtermWidget /* xw */, const char * /* atom_name */, Bool /* justprobe */);
extern void HideCursor (void);
+extern void RestartBlinking(TScreen * /* screen */);
extern void ShowCursor (void);
extern void SwitchBufPtrs (TScreen * /* screen */);
extern void ToggleAlternate (XtermWidget /* xw */);
@@ -794,7 +807,7 @@ extern void unparse_end (XtermWidget /* xw */);
extern void unparseputc (XtermWidget /* xw */, int /* c */);
extern void unparseputc1 (XtermWidget /* xw */, int /* c */);
extern void unparseputn (XtermWidget /* xw */, unsigned /* n */);
-extern void unparseputs (XtermWidget /* xw */, char * /* s */);
+extern void unparseputs (XtermWidget /* xw */, const char * /* s */);
extern void unparseseq (XtermWidget /* xw */, ANSI * /* ap */);
extern void xtermAddInput(Widget /* w */);
@@ -936,7 +949,7 @@ extern void HandleKeyPressed PROTO_XT_ACTIONS_ARGS;
extern void HandleLeaveWindow PROTO_XT_EV_HANDLER_ARGS;
extern void HandleSpawnTerminal PROTO_XT_ACTIONS_ARGS;
extern void HandleStringEvent PROTO_XT_ACTIONS_ARGS;
-extern void Panic (char * /* s */, int /* a */);
+extern void Panic (const char * /* s */, int /* a */);
extern void Redraw (void);
extern void ReverseOldColors (void);
extern void SysError (int /* i */) GCC_NORETURN;
@@ -958,7 +971,7 @@ extern void xt_error (String /* message */);
extern void xtermBell(XtermWidget /* xw */, int /* which */, int /* percent */);
extern void xtermCopyEnv (char ** /* oldenv */);
extern void xtermDisplayCursor (XtermWidget /* xw */);
-extern void xtermSetenv (char * /* var */, char * /* value */);
+extern void xtermSetenv (const char * /* var */, const char * /* value */);
extern void xtermShowPointer (XtermWidget /* xw */, Bool /* enable */);
#if OPT_DABBREV
diff --git a/app/xterm/xterm.log.html b/app/xterm/xterm.log.html
index 1cc906ec3..a0bd29140 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.790 2009/09/11 23:10:00 tom Exp $
+ $XTermId: xterm.log.html,v 1.846 2009/10/13 09:28:07 tom Exp $
-->
<HTML>
<HEAD>
@@ -45,6 +45,8 @@ Most of these are summarized in the XFree86 CHANGELOG
is the latest version of this file.
<UL>
+<LI><A HREF="#xterm_250">Patch #250 - 2009/10/13</A>
+<LI><A HREF="#xterm_249">Patch #249 - 2009/10/1</A>
<LI><A HREF="#xterm_248">Patch #248 - 2009/9/11</A>
<LI><A HREF="#xterm_247">Patch #247 - 2009/8/30</A>
<LI><A HREF="#xterm_246">Patch #246 - 2009/8/16</A>
@@ -296,6 +298,102 @@ is the latest version of this file.
<LI><A HREF="#xterm_01">Patch #1 - 1996/1/6</A>
</UL>
+<H1><A NAME="xterm_250">Patch #250 - 2009/10/13</A></H1>
+<ul>
+ <li>add check and error-message for fonts that have no printable
+ values in the ISO-8859-1 range (Debian #542434).
+
+ <li>some compiler-warning cleanup, in particular workaround for
+ defective implementation of gcc's attribute warn_unused_result
+ (report by Bram Moolenaar).
+
+ <li>improve estimate of single-column width for packed TrueType
+ fonts by ignoring extents for codes 127 and 159.
+
+ <li>improve line-drawing for TrueType fonts which happen to have
+ defined glyphs which are <em>not</em> line-drawing in 0..31
+ by assuming they're not, and just checking the existence of
+ the Unicode codepoints. This makes it more likely that the
+ user can override a misconfigured font using the "Line-Drawing
+ Characters" menu entry.
+
+ <li>limit minimum cell-width for packed font to maximum-advance
+ reported by Xft. Some fonts are wider than that, even in the
+ Latin-1 range (Debian #550497).
+
+ <li>add list of direct-contributors in "THANKS" file.
+
+ <li>stylistic changes to this file to help scripted extraction of
+ list of contributors.
+
+ <li>correct off-by-one in <code>okPosition</code> fix from
+ <a href="#xterm_249">patch #249</a> limit-checks which
+ prevented double-click selection on the bottom line of the
+ screen (reports by Rajeev V. Pillai, Debian #550368).
+
+ <li>add <code>-q</code> option to
+ <code>vttest/256colors2.pl</code> and
+ <code>vttest/88colors2.pl</code>
+ to demonstrate bulk initialization of color palette.
+
+ <li>improve the workaround from patch #188 by enabling resources for
+ the 88-color model.
+
+ <li>document in xterm manpage the limited availability of resources
+ <code>color16</code> to <code>color255</code> as noted in
+ <a href="#xterm_188">patch #188</a> (Ubuntu #438850).
+</ul>
+
+<H1><A NAME="xterm_249">Patch #249 - 2009/10/1</A></H1>
+<ul>
+ <li>change default for <code>allowWindowOps</code> resource to false.
+ <!-- on the other hand, gnome-terminal, pterm and rxvt-unicode
+ leave most of the related functionality enabled ;-) -->
+
+ <li>add limit-checks for result of visual_width() function,
+ needed from <a href="#xterm_242">patch #242</a> and
+ exposed by #244 changes (Debian #548321).
+
+ <li>improve limit-checks in select/paste.
+
+ <li>fix a remaining bug from
+ <a href="#xterm_230">patch #230</a>
+ changes for displaying multi-column
+ characters in a proportional font (report by Chris Jones).
+
+ <li>add new resource forcePackedFont and menu entry "Packed Font" to
+ control whether to use the font's minimum (default) or maximum
+ width when those differ. The workaround which xterm uses to
+ accommodate proportional fonts is not necessary with certain
+ fonts such as unifont which happen to store a mixture of
+ multicolumn glyphs (report by Chris Jones).
+
+ <li>fix an (old) bug which did not restart the timer for blinking text
+ if the only blinking text was temporarily scrolled out of view,
+ e.g., using the scrollbar.
+
+ <li>fix an (old) flaw in the delete-line operation where the text which
+ is scrolled into view while the display is scrolled up was not
+ repainted.
+
+ <li>improve delete-line and insert-line operations, retaining selection
+ when the selection does not intersect the deleted/inserted lines.
+
+ <li>fix an (old) off-by-one error when an application cleared above the
+ cursor position while the display was scrolled up, that would leave
+ an extra line of text uncleared.
+
+ <li>fix a similar problem where the double-size attribute would not be
+ reset when clearing the screen while the display was scrolled up.
+
+ <li>fix an indexing error which would occur if an application cleared
+ a line while the display was scrolled up and was also in UTF-8 mode
+ (Redhat #524503).
+ The error was from <a href="#xterm_228">patch #228</a>
+ but more visible after
+ changes from <a href="#xterm_244">patch #244</a>.
+</ul>
+
<H1><A NAME="xterm_248">Patch #248 - 2009/9/11</A></H1>
<ul>
<li>fix an overlooked adjustment for selecting double-width characters
@@ -771,8 +869,7 @@ is the latest version of this file.
<code>termios.h</code> (prompted by comments by Robert Delius Royar
and Jeremy Huddleston).
- <li>patches from Alan Coopersmith. These correspond
- to bug-ids on bugs.opensolaris.org
+ <li>bug-fixes for bugs.opensolaris.org (patches from Alan Coopersmith)
<dl>
<dt>4029911
<dd>fix a typo in manpage
@@ -922,8 +1019,8 @@ is the latest version of this file.
are available in the font.
<li>modify rectangle-support functions to preserve colors when
- filling/erasing (request by Enzo Toscano, to match WRQ Reflection
- behavior).
+ filling/erasing to match WRQ Reflection behavior
+ (request by Enzo Toscano).
<li>add getopt-parsing to tcapquery.pl, including feature to test the
extended cursor/editing keys.
@@ -971,7 +1068,7 @@ is the latest version of this file.
<li>extend terminfo building blocks for modified editing keys to
include all six keys.
- <li>synchronize terminfo with ncurses (report by Stephane Chazelas):
+ <li>synchronize terminfo with ncurses (report by Stephane Chazelas)
<ul>
<li>equate <code>xterm-xfree86</code>
and <code>xterm-xf86-v44</code>.
@@ -1368,7 +1465,7 @@ is the latest version of this file.
<li>fixes configure script macros that use <code>$X_EXTRA_LIBS</code>.
<li>modify configure script to provide support for pre-package config
- versions of Xft (FreeType).
+ versions of Xft aka "FreeType".
<li>add the Xaw scrollbar translations resource to the xterm manpage,
add an example showing how to change the mouse button assignments
@@ -1720,7 +1817,7 @@ is the latest version of this file.
when headers undefine this as a side-effect of
<code>_POSIX_C_SOURCE</code>, etc.
- <li>resync with XFree86 CVS:
+ <li>resync with XFree86 CVS
<ul>
<li>ifdef-out chmod of terminal device for OS/2 (XFree86 #1663,
Frank Giessler).
@@ -1936,8 +2033,9 @@ is the latest version of this file.
<li>revert part of recent XFree86 Imakefile change, restoring the
<code>-I.</code> needed for <code>xmkmf</code> builds of xterm
- (XFree86 Bugzilla #1633, reports by Alexander Pohoyda and Matthieu
- Herrb).
+ (XFree86 Bugzilla #1633,
+ reports by Alexander Pohoyda,
+ Matthieu Herrb).
<li>change compiled-in default for <code>printerCommand</code>
resource to an empty string. People who want to use the
@@ -2126,7 +2224,7 @@ is the latest version of this file.
<li>improve fix from <a href="#xterm_198">patch #198</a> for
<code>Cleanup()</code> by ensuring it is not called from the
- SIGCHLD handler (patch from OpenBSD by Todd Miller).
+ SIGCHLD handler (patch by Todd Miller (OpenBSD CVS)).
<li>eliminate a retry for a better-matching bold font, to work around
recent font server changes.
@@ -2221,8 +2319,9 @@ is the latest version of this file.
<li>make paste of UTF-8 faster for Western character sets by checking
range of incoming data (patch by Joe Allen).
- <li>adapted patch by Joe Allen to add experimental option to allow
- applications to get or set the selection data as a BASE64 string.
+ <li>add experimental option to allow
+ applications to get or set the selection data as a BASE64 string
+ (adapted from patch by Joe Allen).
<li>fix an off-by-one error parsing <code>-S/nn</code> option
(Debian #311438, report/fix by Peter Chubb).
@@ -2415,7 +2514,7 @@ is the latest version of this file.
Brand and Bernhard R Link).
<li>fix a typo in Imakefile from <a href="#xterm_198">patch #198</a>
- (reports/patches by Stefan Dirsch, and Mike Castle).
+ (reports/patches by Stefan Dirsch, Mike Castle).
</ul>
<H1><A NAME="xterm_198">Patch #198 - 2005/1/13 - XFree86 4.4.99.21</A></H1>
@@ -2925,8 +3024,8 @@ is the latest version of this file.
<li>modify <code>Imakefile</code> to remove dependency of "install"
target on the <code>xterm</code> executable to make installs from
- tree without attempting to rebuild anything (David Dawes, based on
- a patch and report from Lee Olsen).
+ tree without attempting to rebuild anything (commit by David Dawes,
+ report/patch from Lee Olsen).
<li>remove call to <code>ShowCursor</code> from
<code>SetCursorBlink()</code> since that is redundant,
@@ -3040,7 +3139,7 @@ is the latest version of this file.
and libraries.
<li>modify <code>Imakefile</code> to put the current directory at the
- beginning of the include searchpath (David Dawes).
+ beginning of the include searchpath (patch by David Dawes).
</ul>
<H1><A NAME="xterm_182">Patch #182 - 2003/12/2 - XFree86 4.3.99.901</A></H1>
@@ -3063,7 +3162,7 @@ is the latest version of this file.
<li>compiler-warning fixes (patch by Christian Biere).
- <li>add README.i18n (Tomohiro KUBOTA).
+ <li>add README.i18n (Tomohiro Kubota).
<li>correct initialization of G1 character set mapping, which used
line-drawing set as a result of confusion between "DEC Supplemental
@@ -3100,8 +3199,7 @@ is the latest version of this file.
subresources have the same names as the fonts which they replace,
e.g., <code>font</code>, <code>font1</code>, etc., so that the
ISO-10646-1 fonts can be specified in the <code>XTerm</code>
- app-defaults file (this is an adaptation of a patch by Tomohiro
- KUBOTA).
+ app-defaults file (adapted from patch by Tomohiro Kubota).
<li>improve Set Font escape string handling by making the relative
settings apply to the size of the font, as in shift keypad
@@ -3129,15 +3227,15 @@ is the latest version of this file.
<li>add <code>indp</code> and <code>rin</code> to terminfo entry.
<li>fix an out-of-bounds array reference in ScrnRefresh() for wide
- characters (report by Dan Harnett, patch by Todd Miller, bug dates
- from <a href="#xterm_141">patch #141</a>).
+ characters (report by Dan Harnett, patch by Todd Miller).
+ This bug dates from <a href="#xterm_141">patch #141</a>.
</ul>
<H1><A NAME="xterm_180">Patch #180 - 2003/10/12 - XFree86 4.3.99.15</A></H1>
<ul>
- <li>several fixes for rendering using Xft (option <code>-fa</code>):
+ <li>several fixes for rendering using Xft via option <code>-fa</code>:
<ul>
- <li>translate Unicode values (from UTF-8 output to xterm) for
+ <li>translate Unicode values, i.e,. from UTF-8 output to xterm, for
line-drawing to xterm's internal code, etc., since TrueType fonts
generally do not have either set of line-drawing glyphs. xterm
can draw these directly (report by Abigail Brady).
@@ -3222,7 +3320,7 @@ is the latest version of this file.
<a href="#xterm_171">patch #171</a>) to append the process-id rather
than a random value.
- <li>resync with XFree86 CVS:
+ <li>resync with XFree86 CVS
<ul>
<li>Enable SCO function keys in xterm
<li>Make Delete key send DEL by default on SCO in xterm
@@ -3527,7 +3625,7 @@ is the latest version of this file.
<li>update config.guess, config.sub
- <li>resync with XFree86 CVS:
+ <li>resync with XFree86 CVS
<ul>
<li>fix va_args glitches for xterm/libfontconfig: 0 == (void*)0
isn't true for all platforms (Egbert Eich).
@@ -3605,8 +3703,8 @@ is the latest version of this file.
<li>modify logic for <code>metaSendsEscape</code> to allow it to work
in a setup where the Meta-key is not recognized as a modifier by
- the key-translations logic (from a discussion of eightBitInput
- with H.J.Lu, however Vincent Lefevre reported this in January).
+ the key-translations logic (discussion of eightBitInput with H.J.Lu).
+ Note however that Vincent Lefevre reported this in January).
<li>use null pointer values consistently, rather than literal "0", for
ending variable-length argument lists, e.g., for
@@ -3637,8 +3735,9 @@ is the latest version of this file.
<li>fix several places in ctlseqs.ms which had no boxes around the
literal text (report by Ilya Zakharevich).
- <li>integrated patch from Ilya Zakharevich to extend mouse support for
- readline (ifdef'd with OPT_READLINE).
+ <li>extend mouse support for readline,
+ ifdef'd with OPT_READLINE
+ (integrated patch from Ilya Zakharevich).
<li>modify terminfo description to match default for
<code>modifyCursorKeys</code> resource.
@@ -3649,8 +3748,8 @@ is the latest version of this file.
with CSI and puts the modifier as the second parameter, to avoid
confusing applications that would interpret the first parameter as a
repeat count. The original behavior can be obtained by setting the
- resource to 0 (from newsgroup discussion with Stephen J Turnbull
- and Jeffrey Altman).
+ resource to 0 (newsgroup discussion with Stephen J Turnbull,
+ Jeffrey Altman).
<li>correct missing initializations for <code>appdefaultCursor</code>
and <code>appdefaultKeypad</code> resources.
@@ -3658,9 +3757,7 @@ is the latest version of this file.
<li>add configure option <code>--enable-luit</code> and ifdef'd the
luit-related code with OPT_LUIT_PROG.
- <li>integrate patch by Tomohiro KUBOTA from
- http://www.xfree86.org/pipermail/i18n/2002-July/003378.html which
- modifies xterm to invoke luit.
+ <li>modify xterm to invoke luit (integrated patch by Tomohiro Kubota)
<li>update wcwidth.c to match Markus Kuhn's 2002-05-18 version.
@@ -3765,17 +3862,17 @@ is the latest version of this file.
&lt;Stephan.Binner@gmx.de&gt;).
<li>fixes for ctlseqs.ms and xterm.man
- (patch by Werner LEMBERG &lt;wl@gnu.org&gt;).
+ (patch by Werner Lemberg &lt;wl@gnu.org&gt;).
<li>add check for monochrome display, disabling colorMode in that
case (fixes Debian #134130).
- <li>resync with XFree86 CVS:
+ <li>resync with XFree86 CVS
<ul>
- <li>Fix some xterm build warnings on *BSD (David Dawes).
- <li>Only use SA_RESTART in xterm when it's available (Frank Liu).
+ <li>Fix some xterm build warnings on *BSD (patch by David Dawes).
+ <li>Only use SA_RESTART in xterm when it's available (patch by Frank Liu).
<li>Fix incorrect code in signal handlers in most of the clients,
- xterm and xdm not done yet (Matthieu Herrb).
+ xterm and xdm not done yet (patch by Matthieu Herrb).
</ul>
</ul>
@@ -3817,7 +3914,7 @@ is the latest version of this file.
<li>fix a couple of typos in comments in the app-defaults files
(David Krause &lt;xfree86@davidkrause.com&gt;).
- <li>resync with XFree86 CVS:
+ <li>resync with XFree86 CVS
<ul>
<li>update language of copyrights in some files to reflect the fact
that they were reassigned from X Consortium to The Open Group in
@@ -3826,10 +3923,10 @@ is the latest version of this file.
Consortium or The Open Group after that date, hence we do not add
The Open Group's 1998 copyright date to related files.
- <li>save/restore <code>errno</code> in signal catcher (Matthieu Herrb).
+ <li>save/restore <code>errno</code> in signal catcher (patch by Matthieu Herrb).
<li>modify UXTerm.ad's font5 resource so that xterm can display double
- width characters using a font distributed with XFree86 (Tomohiro KUBOTA).
+ width characters using a font distributed with XFree86 (Tomohiro Kubota).
</ul>
</ul>
@@ -3896,7 +3993,7 @@ is the latest version of this file.
<li>correct Imakefile install-rule for <code>uxname</code> script
(reported by Nam SungHyun &lt;namsh@lge.com&gt;).
- <li>resync with XFree86 CVS: correct typo in <code>&lt;ncurses/term.h&gt;</code>
+ <li>resync with XFree86 CVS &ndash; correct typo in <code>&lt;ncurses/term.h&gt;</code>
ifdef.
</ul>
@@ -3929,7 +4026,7 @@ is the latest version of this file.
already addressed by the <a href="#xterm_141">UXTerm</a>
app-defaults file.
- <li>resync with XFree86 CVS:
+ <li>resync with XFree86 CVS
<ul>
<li>Modified xterm app default to use LFD fontnames instead of old type
(Michael Schroeder).
@@ -3972,8 +4069,8 @@ is the latest version of this file.
<li>modify xterm to obtain the closest matching color if an exact color
is not available, e.g., on 8-bit displays (patch by Steve Wall)
- <li>patch by Tomohiro KUBOTA &lt;tkubota@riken.go.jp&gt; to implement
- "OverTheSpot" preedit type of XIM input:
+ <li>implement "OverTheSpot" preedit type of XIM input
+ (patch by Tomohiro Kubota):
<ul>
<li>This preedit type is a reasonable compromise between
simpleness of implementation and usefulness. "Root" preedit
@@ -4014,8 +4111,7 @@ is the latest version of this file.
</ul>
<li>adjust configure script to accommodate repackaging of keysym2ucs.c
- as include-file for xutf8.c (patch by Tomohiro KUBOTA
- &lt;kubota@debian.org&gt;).
+ as include-file for xutf8.c (patch by Tomohiro Kubota).
<li>add the <code>UXTerm</code> app-defaults file to makefile install
rules (request by Juliusz Chroboczek).
@@ -4031,9 +4127,9 @@ is the latest version of this file.
original border color, so it can restore that when an application
flashes the screen (Bugzilla #38872).
- <li>resync with XFree86 CVS:
+ <li>resync with XFree86 CVS
<ul>
- <li>remove ifdef's for X_NOT_STDC_ENV (David Dawes).
+ <li>remove ifdef's for X_NOT_STDC_ENV (patch by David Dawes).
<li>add Cygwin to special errno handling case in ptydata.c (Alan Hourihane)
<li>set screen size earlier in initialization, to address a race
with window manager resizing its clients (Keith Packard).
@@ -4042,7 +4138,7 @@ is the latest version of this file.
<H1><A NAME="xterm_157">Patch #157 - 2001/6/18 - XFree86 4.1.0</A></H1>
<ul>
- <li>patch by Juliusz Chroboczek to clean up button.c and input.c. The
+ <li>clean up button.c and input.c (patch by Juliusz Chroboczek). The
basic idea is to use a single set of APIs in the XTerm core, and put
a set of workarounds in a separate file. As you will notice, this
drastically simplifies parts of the code; in particular, the only
@@ -4261,7 +4357,7 @@ is the latest version of this file.
conditions (report/analysis by Paul Gilmartin).
<li>remove spurious "%|" from terminfo sgr capabilities
- (report/analysis by Adam M Costello, Debian bug #89222).
+ (report/analysis by Adam M Costello, Debian #89222).
<li>add shell script to adjust list of dynamic libraries linked by
<code>resize</code> when building with the standalone configure
@@ -4273,8 +4369,7 @@ is the latest version of this file.
<H1><A NAME="xterm_151">Patch #151 - 2001/3/10 - XFree86 4.0.2</A></H1>
<ul>
- <li>patch from Juliusz Chroboczek &lt;jch@pps.jussieu.fr&gt; which
- alters the behaviour of selections in XTerm.
+ <li>alter the behaviour of selections in XTerm (patch by Juliusz Chroboczek).
It is believed to follow the ICCCM + UTF8_STRING to the letter, both
in UTF-8 and in eight-bit mode. From his description:
<ul>
@@ -4304,15 +4399,15 @@ is the latest version of this file.
<li>remove an incorrect ifdef from patch #141 which suppressed
overstriking to simulate bold font when xterm was compiled to support
wide characters (report/analysis by Adam M Costello
- &lt;amc@cs.berkeley.edu&gt;, fixes Debian bugs #76404, #77575).
+ &lt;amc@cs.berkeley.edu&gt;, Debian #76404, Debian #77575).
<li>modify <code>RequestResize()</code> function to save/restore window
manager hints. Its call to <code>XtMakeResizeRequest()</code> had
the undesirable side-effect of clearing window manager hints, e.g.,
when switching to 132-columns via DECCOLM escape sequence. Window
manager hints make it simple to resize xterm in terms of character
- cells rather than pixels (reported by Christian Weisgerber as well
- as Debian bug #79939).
+ cells rather than pixels (reports by Christian Weisgerber,
+ Debian #79939).
<p>
This applies to the normal configuration. When built with toolbar
support, the hints are applied to a different widget level (more
@@ -4361,7 +4456,7 @@ is the latest version of this file.
<code>--program-transform-name</code> options (request by Alison
Winters &lt;alison@mirrabooka.com&gt;).
- <li>patch from Robert Brady
+ <li>fixes for wide/combining characters (Robert Brady):
<ul>
<li>fix a scrolling / combining characters display anomaly
@@ -4457,9 +4552,9 @@ is the latest version of this file.
<li>add configure script option <code>--enable-tcap-query</code>
(request by Bram Moolenaar).
- <li>patch by Bram Moolenaar to add a
- "Co" or "colors" entry to the OPT_TCAP_QUERY feature.
- <li>patch by Kiyokazu SUTO &lt;suto@ks-and-ks.ne.jp&gt;:
+ <li>add a "Co" or "colors" entry to the OPT_TCAP_QUERY feature
+ (patch by Bram Moolenaar).
+ <li>patch by Kiyokazu Suto &lt;suto@ks-and-ks.ne.jp&gt;:
<ul>
<li>add support for bold font for double width characters.
The font name may be specified with the command line option
@@ -4531,7 +4626,7 @@ is the latest version of this file.
<H1><A NAME="xterm_145">Patch #145 - 2000/9/11 - XFree86 4.0.1c</A></H1>
<ul>
- <li>several changes from Robert Brady for UTF-8 configuration:
+ <li>changes for UTF-8 configuration (Robert Brady):
<ul>
<li>doublewide characters don't lose their accents when the cursor
moves onto or from them (a visual bug)
@@ -4636,9 +4731,10 @@ is the latest version of this file.
<H1><A NAME="xterm_141">Patch #141 - 2000/8/14 - XFree86 4.0.1b</A></H1>
<ul>
- <li>Most of this patch is an integration of Robert Brady's patch #11
- for doublewidth and combining characters, from
- http://www.ecs.soton.ac.uk/~rwb197/xterm/. In this context,
+ <li>changes for doublewidth and combining characters, from
+ http://www.ecs.soton.ac.uk/~rwb197/xterm/
+ (integrated patch by Robert Brady).
+ In this context,
doublewidth refers to 16-bit character sets which may have glyphs
occupying two cells.
@@ -4673,7 +4769,7 @@ is the latest version of this file.
Tektronix emulation, and description of -nul/+nul command-line
options (report by Eric Fischer &lt;enf@pobox.com&gt;).
- <li>update config.guess and config.sub (from tin and lynx)
+ <li>update config.guess and config.sub, from tin and lynx.
</ul>
<H1><A NAME="xterm_139">Patch #139 - 2000/6/17 - XFree86 4.0d</A></H1>
@@ -4736,12 +4832,12 @@ is the latest version of this file.
Kevin Buettner &lt;kev@primenet.com&gt; for elf64_ia64
Bernd Kuemmerlen &lt;bkuemmer@mevis.de&gt; and MacOS X.
- <li>patch from Paul Gilmartin for os390 to check for errno set to
+ <li>for os390, add check for errno set to
ENODEV on failure to open /dev/tty when there is no controlling
- terminal.
+ terminal (patch by Paul Gilmartin).
- <li>patch from H Merijn Brand &lt;h.m.brand@hccnet.nl&gt; for
- building on Digital Unix 4.0 and AIX 4.2.
+ <li>fixes for building on Digital Unix 4.0 and AIX 4.2
+ (patch from H Merijn Brand &lt;h.m.brand@hccnet.nl&gt;).
<li>modify DECRQSS reply for DECSCL to additionally report if the
terminal is set for 8-bit controls.
@@ -4816,7 +4912,7 @@ is the latest version of this file.
values 9-16.
</ul>
- <li>patches from Paul Gilmartin for os390:
+ <li>fixes for os390 (Paul Gilmartin):
<ul>
<li>regularize the definition of CONTROL() and remove an
acknowledged "trial and error" table.
@@ -4846,8 +4942,8 @@ is the latest version of this file.
&lt;neil.bird@rdel.co.uk&gt;).
<li>remove a redundant check for working <code>setuid()</code> function
- introduced in patch #132 (Greg Smith reports that this does not work
- as intended on os390).
+ introduced in patch #132. Greg Smith reports that this does not work
+ as intended on os390.
<li>change line speed from 9600bd to 38400bd, to accommodate people who
mistakenly use $TERM set to <em>vt100</em>, to reduce the effect of
@@ -4895,8 +4991,7 @@ is the latest version of this file.
<H1><A NAME="xterm_131">Patch #131 - 2000/3/3 - XFree86 3.9.18b</A></H1>
<ul>
- <li>integrate patch by Branden Robinson for improving logfile
- security:
+ <li>improve logfile security (integrated patch by Branden Robinson)
<ul>
<li>make the <code>creat_as()</code> function more strict by using
O_EXCL rather than O_APPEND.
@@ -4997,10 +5092,10 @@ is the latest version of this file.
<H1><A NAME="xterm_126">Patch #126 - 2000/2/8 - XFree86 3.9.17c</A></H1>
<ul>
- <li>patch by Markus Kuhn:
- ensure that xterm will automatically activate the UTF-8 mode whenever
+ <li>ensure that xterm will automatically activate the UTF-8 mode whenever
the name of the locale environment variable suggests that a UTF-8
- locale is in use. This will help that by simply setting LC_CTYPE an
+ locale is in use (patch by Markus Kuhn).
+ This will help that by simply setting LC_CTYPE an
entire system can be switched over to UTF-8, without users having to
remember the UTF-8 command line options ("-u8", etc.) of the various
applications. Command line options and X resource entries can still
@@ -5020,8 +5115,8 @@ is the latest version of this file.
<H1><A NAME="xterm_125">Patch #125 - 2000/1/31 - XFree86 3.9.17c</A></H1>
<ul>
- <li>integrate patch by David Mathog
- &lt;mathog@seqaxp.bio.caltech.edu&gt; to make this work on OpenVMS
+ <li>make this work on OpenVMS
+ (integrated patch by David Mathog).
<li>rename some functions, e.g., <code>Index</code> to
<code>xtermIndex</code> so that ports such as VMS which link
@@ -5218,8 +5313,8 @@ is the latest version of this file.
ptyInitialErase logic will work when xterm is linked with a terminfo
library (based on a patch by Dr Werner Fink &lt;werner@suse.de&gt;).
- <li>fix definition of HAVE_UTMP_UT_HOST for ISC configuration (patch by
- &lt;michael.rohleder@stadt-frankfurt.de&gt;)
+ <li>fix definition of HAVE_UTMP_UT_HOST for ISC configuration
+ (patch by Michael Rohleder).
<li>improve configure script's utmp tests (based on reports by Greg
Smith for os390, and David Ellement for HPUX).
@@ -5332,9 +5427,9 @@ is the latest version of this file.
<li>minor cleanup of ifdef's for makeColorPair (patch by Steve Wall).
- <li>patch by Alexander V Lukyanov to work around problem observed
- in XFree86 3.3.5, reported as bug #5419 to Mozilla. From the
- problem report:
+ <li>work around problem observed in XFree86 3.3.5
+ (patch by Alexander V Lukyanov, Mozilla #5419).
+ From the problem report:
<blockquote>
xterm consumes cpu when selecting text with mouse (holding
down left mouse button) and when a program working under the
@@ -5372,31 +5467,30 @@ is the latest version of this file.
&lt;plaettner@aem.umn.edu&gt; in comp.unix.programmer, that the IRIX
winterm provides this option).
- <li>integrated change by Steve Wall to
- add support for DEC Locator control sequences for xterm:
+ <li>add support for DEC Locator control sequences for xterm
+ (integrated patch by Steve Wall):
<pre>
- DECEFR - Enable Filter Rectangle
- DECELR - Enable Locator Reports
- DECSLE - Select Locator Events
- DECRQLP - Request Locator Position
+ DECEFR, "Enable Filter Rectangle"
+ DECELR, "Enable Locator Reports"
+ DECSLE, "Select Locator Events"
+ DECRQLP, "Request Locator Position"
</pre>
This allows the xterm mouse to be used with applications that use the
DEC Locator sequences, such as VAX Tpu, or SMG$ based applications.
- <li>patch from Matthias Baake &lt;Matthias.Baake@gmx.de&gt;, for print
- action. From his notes:
+ <li>improve print action (patch by Matthias Baake). From his notes,
<ul>
- <li>Bug 1:
- Underlined text is preceded by ESC [0;2m . This should be ESC [0;4m , ESC
- [2m doesn't seem to have any effect. (print.c/send_SGR)
+ <li>Bug 1<br>
+ Underlined text is preceded by ESC&nbsp;[0;2m . This should be ESC&nbsp;[0;4m&nbsp;,
+ ESC&nbsp;[2m doesn't seem to have any effect. (print.c/send_SGR)
- <li>Bug 2:
+ <li>Bug 2<br>
The check for the last non-empty column (while (last &gt; 0) ... in
print.c/printLine) omits the rightmost column of the screen, the loop must
start with last = screen-&gt;max_col+1 instead of last = screen-&gt;max_col.
- <li>Bug 3:
+ <li>Bug 3<br>
Any attributes of the first character (and of all immediately following
characters with the same attributes) are ignored. The variable attr
(print.c/printLine) should be initialized with 0, not with *a &amp; SGR_MASK.
@@ -5478,7 +5572,7 @@ longterm plan to allow configuring with Motif libraries.
<li>correct a missing return-value in get_pty(), for SCO
- <li>add E2A fix for backspace (Greg Smith), i.e.,<br>
+ <li>add E2A fix for backspace (patch by Greg Smith), i.e.,<br>
#define VAL_INITIAL_ERASE A2E(127)
<li>correct foreground color within cursor outline when the
@@ -5520,7 +5614,7 @@ longterm plan to allow configuring with Motif libraries.
<li>generate header file to initialize default resources for colors
16-255.
- <li>patches by Greg Smith for os390:
+ <li>fixes for os390 (Greg Smith):
<ul>
<li>add README.os390
@@ -5570,11 +5664,12 @@ longterm plan to allow configuring with Motif libraries.
underlined double size characters.
<li>increased cache size for double size fonts to 8, to allow for both
- normal and bold fonts (from discussion with Aryeh Koenigsberg
+ normal and bold fonts (discussion with Aryeh Koenigsberg
&lt;aryeh.koenigsberg@telrad.co.il&gt;).
- <li>integrated patch from Greg Smith &lt;rys@epaibm.rtpnc.epa.gov&gt;
- for port to OS390 (aka MVS). OS390 uses EBCDIC rather than ASCII.
+ <li>add fixes for port to OS390 aka MVS
+ (integrated patch from Greg Smith &lt;rys@epaibm.rtpnc.epa.gov&gt;).
+ OS390 uses EBCDIC rather than ASCII.
<li>correct an off-by-one in binary search limits in keysym2ucs.c (Markus
Kuhn).
@@ -5681,7 +5776,7 @@ longterm plan to allow configuring with Motif libraries.
a cursorblink item to the vtMenu to enable/disable it.
</blockquote>
- <li>Integrated a patch from Juliusz Chroboczek &lt;jec@dcs.ed.ac.uk&gt;.
+ <li>improve selection (integrated patch by Juliusz Chroboczek).
From his description:
<blockquote>
With this patch, selection conversion works properly:
@@ -5706,8 +5801,9 @@ longterm plan to allow configuring with Motif libraries.
of 16-bit characters when overwriting them with a 8-bit character
string (reported by Thomas Wolff).
- <li>integrate patch by Markus Kuhn to provide limited support for
- input of UTF-8 16-bit data by a lookup table.
+ <li>provide limited support for
+ input of UTF-8 16-bit data by a lookup table
+ (integrated patch by Markus Kuhn).
<li>correct check in non_blank_line to ensure we're in wide-character
mode before looking at the high bytes, for InsertChar.
@@ -5722,7 +5818,7 @@ longterm plan to allow configuring with Motif libraries.
Jeremy &lt;jeremy@exit109.com&gt;
and (Michael Fuller &lt;msf@mds.rmit.edu.au&gt;).
- <li>add patch by Matthieu Herrb to include term.h in resize for OpenBSD.
+ <li>include term.h in resize for OpenBSD (patch by Matthieu Herrb).
<li>correct logic for UTF-8 in functions that hide and show the cursor;
it was displaying a space whenever the low byte of the character at
@@ -5982,7 +6078,7 @@ the Imakefile defines this).
when sunKeyBoard resource is true.
<li>modify ifdef's for Linux-2.2.x with Glibc-2.1 to work with
- Glibc-2.1 and no Unix98 PTY support (patch from From Andreas Jaeger
+ Glibc-2.1 and no Unix98 PTY support (patch from Andreas Jaeger
&lt;aj@arthur.rhein-neckar.de&gt;)
<li>add optional feature (resource and command-line options) to make
@@ -6060,10 +6156,8 @@ the Imakefile defines this).
<li>corrected ifdef's for menus, which did not allow tek4014 to
be suppressed properly (reported by Clint Olsen).
- <li>integrated patch from Pavel Roskin
- &lt;pavel_roskin@geocities.com&gt;
- for Linux-2.2.x with GLibc-2.1 and
- /dev/ptmx support:
+ <li>changes for Linux-2.2.x with GLibc-2.1 and
+ /dev/ptmx support (integrated patch from Pavel Roskin):
<ul>
<li>main.c and resize.c were using different rules to determine
whether ATT should be defined (actually USE_USG_PTYS is more
@@ -6394,9 +6488,10 @@ as well as
<H1><A NAME="sync_83">Resync #83 - 1998/10/7 - XFree86 3.3.2e</A></H1>
-Merge changes through patch #83 with the 3.3.2e version. This follows a
-patch by Matthieu Herrb &lt;matthieu@laas.fr&gt; to add checks for non-null
-return from malloc.
+Merge changes through patch #83 with the 3.3.2e version.
+<p>
+This follows a change from XFree86 CVS which adds checks for non-null
+return from malloc (patch by Matthieu Herrb).
<H1><A NAME="xterm_83">Patch #83 - 1998/8/25 - XFree86 3.9Nb</A></H1>
Several small fixes and enhancements:
@@ -6405,8 +6500,8 @@ Several small fixes and enhancements:
based on previously installed xterm (reported by Stephen Marley
and Stefan Dalibor).
- <li>integrate/extend patch by Jason Bacon to implement quasi-continuous
- mouse reporting.
+ <li>implement quasi-continuous mouse reporting
+ (integrated patch by Jason Bacon).
<li>correct control sequences transmitted by function keys F1 to F4
when sunFunctionKeys resource is true (it was still using the
@@ -6593,12 +6688,11 @@ The rest of the patch fixes several minor bugs, and adds a few features:
<li>correct length of underlining, reducing it by one pixel to avoid
leaving a dot when the application does not clear the whole screen
- (patch by (Sergei Laskavy &lt;Laskavy@cs.msu.su&gt;).
-<p>
I noticed this only recently myself (and other people as well); it
depends on the font chosen. A 6x10 font shows it, but the other
- fonts (from XTerm.ad) do not. I also see a similar problem with the
+ fonts from XTerm.ad do not. I also see a similar problem with the
emulation of bold fonts.
+ (patch by Sergei Laskavy &lt;Laskavy@cs.msu.su&gt;).
<li>add include for Xos.h to xterm.h, to ensure proper definitions
(reported by Holger Veit).
@@ -6909,7 +7003,7 @@ This fixes the following problems with xterm:
<LI>corrects a length in checking command-line options, which caused the
"-help" message to not work when X was not running.
- <LI>adds some detail to the man-page (requested by Jason Bacon
+ <LI>add some detail to the man-page (requested by Jason Bacon
&lt;acadix@execpc.com&gt;)
<LI>modify the standalone configure script to ignore the broken nsl and
@@ -6978,7 +7072,7 @@ This patch modifies the reset behavior of xterm slightly:
<LI>modifies the treatment of hard reset by the xterm program to
reset the saved lines.
- <LI>corrects hard reset by also resetting user-defined keys (DECUDK).
+ <LI>corrects hard reset by also resetting user-defined keys, i.e., DECUDK.
</UL>
<H1><A NAME="xterm_60">Patch #60 - 1998/1/10 - XFree86 3.9Ab</A></H1>
@@ -7156,10 +7250,11 @@ typos):
mode. So the logfile is opened as the real user, without having
to fork.
- <LI>Michael Rohleder &lt;michael.rohleder@stadt-frankfurt.de&gt; sent
- me a patch which implements right-scrollbars for xterm. I used that
- as a starting point, renamed the command-line options and reduced
- the number of ifdef's.
+ <LI>improve Rohleder's changes by
+ renaming the command-line options and reducing the number of ifdef's.
+
+ <LI>implement right-scrollbars for xterm
+ (patch by Michael Rohleder &lt;michael.rohleder@stadt-frankfurt.de&gt;).
</UL>
<H1><A NAME="xterm_52">Patch #52 - 1997/9/29 - XFree86 3.9q</A></H1>
@@ -7190,7 +7285,7 @@ Some of the changes are interrelated (it was an unusually busy week).
<LI>add resource colorAttrMode to specify whether colorULMode and
colorBDMode can override the ANSI colors
- (from a problem report by Clint Olsen).
+ (report by Clint Olsen).
<LI>correct a conflict between colorULMode/colorBDMode versus ANSI
colors, where exposure events would occasionally pick up the
@@ -7703,8 +7798,8 @@ This patch does the following:
dtterm, that seems to be what it does).
<LI>change some memmove calls to memcpy for slightly better performance.
- (also, a couple of memset calls to bzero - Quantify says bzero runs
- 20% faster, I assume because there's one less argument).
+ also, a couple of memset calls to bzero, since Quantify says bzero runs
+ 20% faster, I assume because there's one less argument.
<LI>interpret character sets 1 and 2 (so that vttest gives a reasonable
result) Both rxvt and dtterm do something equivalent.
@@ -7729,7 +7824,7 @@ This implements the following:
the hpa code and added some other stuff by comparing to ncurses'
description and rxvt's).
- <LI>a tweak to the patch by Michael Rohleder for the color translation
+ <LI>a tweak to the changes by Michael Rohleder for the color translation
<LI>re-order attribute codes to allow later implementation of protected
fields (dtterm supposedly does this; it's probably more useful than
diff --git a/app/xterm/xterm.man b/app/xterm/xterm.man
index 9055fd5ca..e5d6cbe6e 100644
--- a/app/xterm/xterm.man
+++ b/app/xterm/xterm.man
@@ -1,5 +1,5 @@
'\" t
-.\" $XTermId: xterm.man,v 1.433 2009/08/13 01:18:00 tom Exp $
+.\" $XTermId: xterm.man,v 1.437 2009/10/10 12:15:41 tom Exp $
.\"
.\" Copyright 1996-2008,2009 by Thomas E. Dickey
.\"
@@ -1534,9 +1534,15 @@ should be allowed.
The default is \*(``true.\*(''
.TP
.B "allowWindowOps (\fPclass\fB AllowWindowOps)"
-Specifies whether extended window control sequences (as used in dtterm)
+Specifies whether extended window control sequences
+(as used in \fIdtterm\fP)
should be allowed.
-The default is \*(``true.\*(''
+These include several control sequences which manipulate the window size or
+position, as well as reporting these values and the title or icon name.
+Each of these can be abused in a script;
+curiously enough most terminal emulators that implement these
+restrict only a small part of the repertoire.
+The default is \*(``false.\*(''
.TP 8
.B "altIsNotMeta (\fPclass\fB AltIsNotMeta\fP)"
If \*(``true\*('', treat the Alt-key as if it were the Meta-key.
@@ -1830,6 +1836,19 @@ These specify the colors for the 256-color extension.
The default resource values
are for colors 16 through 231 to make a 6x6x6 color cube, and colors
232 through 255 to make a grayscale ramp.
+.IP
+Resources past \fBcolor15\fP are available as a compile-time option.
+Due to a hardcoded limit in the X libraries on the total number of
+resources (to 400), the resources for 256-colors
+are omitted when wide-character support and \fIluit\fP are enabled.
+Besides inconsistent behavior if only part of the resources were allowed,
+determining the exact cutoff is difficult, and the X libraries tend
+to crash if the number of resources exceeds the limit.
+The color palette is still initialized to the same default values,
+and can be modified via control sequences.
+.IP
+On the other hand, the resource limit does permit including the entire
+range for 88-colors.
.TP 8
.B "colorAttrMode (\fPclass\fB ColorAttrMode)"
Specifies whether \fBcolorBD\fP, \fBcolorBL\fP, \fBcolorRV\fP, and
@@ -2184,6 +2203,12 @@ If \*(``true\*('', \fIxterm\fP assumes the font does not contain the
line-drawing characters, and draws them directly.
The default is \*(``false.\*(''
.TP 8
+.B "forcePackedFont (\fPclass\fB ForcePackedFont)"
+Specifies whether \fIxterm\fP should use the maximum or minimum glyph
+width when displaying using a bitmap font.
+Use the maximum width to help with proportional fonts.
+The default is \*(``true,\*('' denoting the minimum width.
+.TP 8
.B "foreground (\fPclass\fB Foreground)"
Specifies the color to use for displaying text in the window.
Setting the
@@ -3322,6 +3347,9 @@ This entry invokes the \fBset-vt-font(s)\fP action.
.B "font-linedrawing (\fPclass\fB SmeBSB)"
This entry invokes the \fBset-font-linedrawing(s)\fP action.
.TP 8
+.B "font-packed (\fPclass\fB SmeBSB)"
+This entry invokes the \fBset-font-packed(s)\fP action.
+.TP 8
.B "font-doublesize (\fPclass\fB SmeBSB)"
This entry invokes the \fBset-font-doublesize(s)\fP action.
.TP 8
@@ -4054,6 +4082,12 @@ When set, tells \fIxterm\fP to draw its own line-drawing characters.
Otherwise it relies on the font containing these.
Compare to the \fBforceBoxChars\fP resource.
.TP
+Packed Font (font-packed)
+When set, tells \fIxterm\fP to use the minimum glyph-width from a font
+when displaying characters.
+Use the maximum width (unchecked) to help display proportional fonts.
+Compare to the \fBforcePackedFont\fP resource.
+.TP
Doublesized Characters (font-doublesize)
When set, \fIxterm\fP may ask the font server to produce scaled versions
of the normal font, for VT102 double-size characters.
@@ -4641,6 +4675,11 @@ This action toggles the \fIxterm\fR's state regarding whether the current font
has line-drawing characters and whether it should draw them directly.
It is also invoked by the \fBfont-linedrawing\fP entry in \fIfontMenu\fP.
.TP 8
+.B "set-font-packed(\fIon/off/toggle\fP)"
+This action toggles the \fIforcePackedFont\fR's resource
+which controls to use the font's minimum or maximum glyph width.
+It is also invoked by the \fBfont-packed\fP entry in \fIfontMenu\fP.
+.TP 8
.B "set-keep-selection(\fIon/off/toggle\fP)"
This action toggles the \fBkeepSelection\fP resource and is also invoked by
the \fBkeepSelection\fP entry in \fIvtMenu\fP.
diff --git a/app/xterm/xtermcap.c b/app/xterm/xtermcap.c
index 1fc3d1585..95dbc0450 100644
--- a/app/xterm/xtermcap.c
+++ b/app/xterm/xtermcap.c
@@ -1,4 +1,4 @@
-/* $XTermId: xtermcap.c,v 1.21 2009/03/16 00:31:06 tom Exp $ */
+/* $XTermId: xtermcap.c,v 1.23 2009/10/12 21:17:24 tom Exp $ */
/*
* Copyright 2007-2008,2009 by Thomas E. Dickey
@@ -61,8 +61,8 @@
#define NO_STRING (char *)(-1)
typedef struct {
- char *tc;
- char *ti;
+ const char *tc;
+ const char *ti;
int code;
unsigned param; /* see xtermStateToParam() */
} TCAPINFO;
@@ -211,6 +211,7 @@ static void
loadTermcapStrings(TScreen * screen)
{
if (screen->tcap_fkeys == 0) {
+ char name[80];
Cardinal want = XtNumber(table);
Cardinal have;
char *fkey;
@@ -222,9 +223,9 @@ loadTermcapStrings(TScreen * screen)
if ((screen->tcap_fkeys = TypeCallocN(char *, want)) != 0) {
for (have = 0; have < want; ++have) {
#if USE_TERMINFO && defined(HAVE_TIGETSTR)
- fkey = tigetstr(table[have].ti);
+ fkey = tigetstr(strcpy(name, table[have].ti));
#else
- fkey = tgetstr(table[have].tc, &area);
+ fkey = tgetstr(strcpy(name, table[have].tc), &area);
#endif
if (fkey != 0 && fkey != NO_STRING) {
screen->tcap_fkeys[have] = x_strdup(fkey);
diff --git a/app/xterm/xtermcfg.h b/app/xterm/xtermcfg.h
index a09edbb38..5da021ef1 100644
--- a/app/xterm/xtermcfg.h
+++ b/app/xterm/xtermcfg.h
@@ -1,13 +1,9 @@
/* xtermcfg.h. Generated automatically by configure. */
-/* $XTermId: xtermcfg.hin,v 1.163 2007/03/21 22:05:18 tom Exp $ */
-
-/*
- * $XFree86: xc/programs/xterm/xtermcfg.hin,v 3.61 2006/06/19 00:36:52 dickey Exp $
- */
+/* $XTermId: xtermcfg.hin,v 1.178 2009/08/09 17:23:19 tom Exp $ */
/************************************************************
-Copyright 1997-2006,2007 by Thomas E. Dickey
+Copyright 1997-2008,2009 by Thomas E. Dickey
All Rights Reserved
@@ -38,6 +34,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
/* #undef ALLOWLOGFILEEXEC */ /* CF_ARG_ENABLE(enable-logfile-exec) */
/* #undef ALLOWLOGGING */ /* CF_ARG_ENABLE(enable-logging) */
#define CC_HAS_PROTOS 1 /* CF_ANSI_CC */
+/* #undef CSRG_BASED */ /* CF_TYPE_FD_MASK */
/* #undef DECL_ERRNO */ /* CF_ERRNO */
/* #undef DFT_COLORMODE */ /* AC_ARG_WITH(default-color-mode) */
#define DFT_DECID "100" /* AC_ARG_WITH(default-terminal-id) */
@@ -63,7 +60,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#define HAVE_STRERROR 1 /* AC_CHECK_FUNCS(strerror) */
#define HAVE_STRFTIME 1 /* AC_CHECK_FUNCS(strftime) */
/* #undef HAVE_SYS_TIME_H */ /* AC_HEADER_TIME */
-#define HAVE_SYS_TTYDEFAULTS_H /* AC_CHECK_HEADERS(sys/ttydefaults.h) */
+#define HAVE_SYS_TTYDEFAULTS_H 1 /* AC_CHECK_HEADERS(sys/ttydefaults.h) */
#define HAVE_SYS_WAIT_H 1 /* AC_HEADER_SYS_WAIT */
#define HAVE_TCGETATTR 1 /* AC_CHECK_FUNCS(tcgetattr) */
#define HAVE_TERMCAP_H 1 /* AC_CHECK_HEADERS(termcap.h) */
@@ -72,6 +69,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#define HAVE_TERM_H 1 /* AC_CHECK_HEADERS(term.h) */
#define HAVE_TIGETSTR 1 /* AC_CHECK_FUNCS(tigetstr) */
#define HAVE_UNISTD_H 1 /* AC_CHECK_HEADERS(unistd.h) */
+#define HAVE_USE_EXTENDED_NAMES 1 /* AC_CHECK_FUNCS(use_extended_names) */
#define HAVE_UTMP 1 /* CF_UTMP */
#define HAVE_UTMP_UT_HOST 1 /* CF_UTMP_UT_HOST */
/* #undef HAVE_UTMP_UT_SESSION */ /* CF_UTMP_UT_SESSION */
@@ -84,7 +82,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#define HAVE_WCWIDTH 1 /* AC_CHECK_FUNCS(wcwidth) */
#define HAVE_X11_DECKEYSYM_H 1 /* AC_CHECK_HEADERS(X11/DECkeysym.h) */
#define HAVE_X11_SUNKEYSYM_H 1 /* AC_CHECK_HEADERS(X11/Sunkeysym.h) */
-#define HAVE_X11_XF86KEYSYM_H 1 /* AC_CHECK_HEADERS(X11/XF86keysym.h) */
+#define HAVE_X11_XF86KEYSYM_H 1 /* AC_CHECK_HEADERS(X11/XF86keysym.h) */
#define HAVE_X11_XPOLL_H 1 /* AC_CHECK_HEADERS(X11/Xpoll.h) */
#define HAVE_XFTDRAWSETCLIP 1 /* CF_X_FREETYPE */
#define HAVE_XFTDRAWSETCLIPRECTANGLES 1 /* CF_X_FREETYPE */
@@ -105,8 +103,9 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
/* #undef OPT_DABBREV */ /* CF_ARG_ENABLE(dabbrev) */
/* #undef OPT_DEC_CHRSET */ /* CF_ARG_DISABLE(doublechars) */
/* #undef OPT_DEC_LOCATOR */ /* CF_ARG_ENABLE(dec-locator) */
-/* #undef OPT_DEC_RECTOPS */ /* CF_ARG_ENABLE(rectangles) */
+#define OPT_DEC_RECTOPS 1 /* CF_ARG_ENABLE(rectangles) */
/* #undef OPT_EXEC_XTERM */ /* CF_ARG_ENABLE(exec-xterm) */
+/* #undef OPT_FIFO_LINES */ /* CF_ARG_ENABLE(fifo-lines) */
/* #undef OPT_HIGHLIGHT_COLOR */ /* CF_ARG_DISABLE(highlighting) */
/* #undef OPT_HP_FUNC_KEYS */ /* CF_ARG_ENABLE(hp-fkeys) */
/* #undef OPT_I18N_SUPPORT */ /* CF_ARG_DISABLE(i18n) */
@@ -118,7 +117,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
/* #undef OPT_MAXIMIZE */ /* CF_ARG_DISABLE(maximize) */
/* #undef OPT_MINI_LUIT */ /* CF_ARG_ENABLE(mini-luit) */
/* #undef OPT_NUM_LOCK */ /* CF_ARG_DISABLE(num-lock) */
-#define OPT_PASTE64 0 /* CF_ARG_ENABLE(past64) */
+#define OPT_PASTE64 1 /* CF_ARG_ENABLE(past64) */
/* #undef OPT_PC_COLORS */ /* CF_ARG_DISABLE(pc-color) */
#define OPT_PTY_HANDSHAKE 1 /* CF_ARG_ENABLE(pty-handshake) */
/* #undef OPT_READLINE */ /* CF_ARG_ENABLE(readline-mouse) */
@@ -132,6 +131,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
/* #undef OPT_TEK4014 */ /* CF_ARG_DISABLE(tek4014) */
/* #undef OPT_TOOLBAR */ /* CF_ARG_ENABLE(toolbar) */
/* #undef OPT_VT52_MODE */ /* CF_ARG_DISABLE(vt52) */
+/* #undef OPT_WIDER_ICHAR */ /* CF_ARG_ENABLE(16bit-chars) */
#define OPT_WIDE_CHARS 1 /* CF_ARG_OPTION(wide-chars) */
/* #undef OPT_XMC_GLITCH */ /* CF_ARG_ENABLE(xmc-glitch) */
/* #undef OPT_ZICONBEEP */ /* CF_ARG_DISABLE(ziconbeep) */
@@ -191,7 +191,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#ifdef USE_MY_MEMMOVE
#define memmove(d,s,n) my_memmove(d,s,n)
-extern char * my_memmove(char * s1, char * s2, size_t n);
+extern void * my_memmove(void * s1, void * s2, size_t n);
#endif
#ifndef HAVE_STRERROR