xterm: Changes to 'debian-unstable'
Tekproc.c | 9
VTPrsTbl.c | 7
VTparse.def | 5
VTparse.h | 6
button.c | 10
cachedGCs.c | 143 +++++++---
charclass.c | 7
charproc.c | 45 ++-
ctlseqs.ms | 19 +
ctlseqs.txt | 13
debian/changelog | 21 +
debian/control | 4
debian/patches/900_debian_xterm.diff | 32 --
debian/patches/901_xterm_manpage.diff | 6
debian/patches/902_pointermode_never.diff | 21 +
debian/patches/series | 1
debian/rules | 5
doublechr.c | 21 -
fontutils.c | 276 +++++++++++----------
fontutils.h | 16 -
main.c | 391 +++++++++++-------------------
main.h | 8
menu.c | 6
minstall.sh | 7
misc.c | 83 +++++-
ptyx.h | 35 +-
screen.c | 60 +++-
tabs.c | 18 -
util.c | 14 -
version.h | 4
xterm.h | 13
xterm.log.html | 75 +++++
xterm.man | 23 +
33 files changed, 832 insertions(+), 572 deletions(-)
New commits:
commit 04b9f7f1fa5fc4c83ccefacb9d3b9596576449e2
Author: Julien Cristau <jcristau@debian.org>
Date: Sat Feb 9 02:41:30 2008 +0100
debian/control: luit is in x11-utils now, update Recommends and Description
diff --git a/debian/changelog b/debian/changelog
index 0ea000c..aeeaafa 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -14,6 +14,8 @@ xterm (232-1) UNRELEASED; urgency=low
Document that change in xterm.man (new patch 902_pointermode_never.diff).
* Look for luit in /usr/bin, not /usr/X11R6/bin.
* Refresh patches.
+ * debian/control: luit is in x11-utils now, update Recommends and
+ Description.
-- Julien Cristau <jcristau@debian.org> Sat, 09 Feb 2008 02:11:30 +0100
diff --git a/debian/control b/debian/control
index 64c5ec9..9778330 100644
--- a/debian/control
+++ b/debian/control
@@ -89,7 +89,7 @@ Build-Depends: libncurses5-dev | libncurses-dev, libxft-dev (>> 2.1.2), libxrend
Package: xterm
Architecture: any
Depends: xbitmaps, ${shlibs:Depends}
-Recommends: xutils
+Recommends: x11-utils | xutils
Suggests: xfonts-cyrillic
Provides: x-terminal-emulator
Description: X terminal emulator
@@ -101,7 +101,7 @@ Description: X terminal emulator
This package provides four commands: xterm, which is the traditional
terminal emulator; uxterm, which is a wrapper around xterm that is
intelligent about locale settings (especially those which use the UTF-8
- character encoding), but which requires the luit program from the xutils
+ character encoding), but which requires the luit program from the x11-utils
package; koi8rxterm, a wrapper similar to uxterm for locales that use the
KOI8-R character set; and lxterm, a simple wrapper that chooses which of the
previous commands to execute based on the user's locale settings.
commit c433b050de1616ca4c25d6d9c2b0ddc261c136ad
Author: Julien Cristau <jcristau@debian.org>
Date: Sat Feb 9 02:37:37 2008 +0100
New upstream release.
* Bugs fixed upstream:
+ corrected logic in a font-cache used for reverse-video
(closes: #404079)
+ allow building with configure options --disable-ansi-color and
--disable-leaks (closes: #459817)
+ allow building with configure options --enable-wide-chars and
--disable-c1-print (closes: #459816)
+ add pointerMode resource to control whether and when the pointer cursor
is hidden as the user types; also fix it so it's really hidden instead
of showing a black dot (closes: #460545)
* Set pointerMode to "never" by default, to restore pre-230 behaviour.
Document that change in xterm.man (new patch 902_pointermode_never.diff).
* Look for luit in /usr/bin, not /usr/X11R6/bin.
* Refresh patches.
diff --git a/debian/changelog b/debian/changelog
index 4935c26..0ea000c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,22 @@
+xterm (232-1) UNRELEASED; urgency=low
+
+ * New upstream release.
+ + corrected logic in a font-cache used for reverse-video
+ (closes: #404079)
+ + allow building with configure options --disable-ansi-color and
+ --disable-leaks (closes: #459817)
+ + allow building with configure options --enable-wide-chars and
+ --disable-c1-print (closes: #459816)
+ + add pointerMode resource to control whether and when the pointer cursor
+ is hidden as the user types; also fix it so it's really hidden instead
+ of showing a black dot (closes: #460545)
+ * Set pointerMode to "never" by default, to restore pre-230 behaviour.
+ Document that change in xterm.man (new patch 902_pointermode_never.diff).
+ * Look for luit in /usr/bin, not /usr/X11R6/bin.
+ * Refresh patches.
+
+ -- Julien Cristau <jcristau@debian.org> Sat, 09 Feb 2008 02:11:30 +0100
+
xterm (231-1) unstable; urgency=low
* New upstream release
diff --git a/debian/patches/900_debian_xterm.diff b/debian/patches/900_debian_xterm.diff
index 66fc2ea..d65c3c4 100644
--- a/debian/patches/900_debian_xterm.diff
+++ b/debian/patches/900_debian_xterm.diff
@@ -23,11 +23,9 @@ Make Debian-specific tweaks to xterm:
This patch by Branden Robinson.
-Index: termcap
-===================================================================
---- termcap.orig 2007-06-17 22:24:53.000000000 +0100
-+++ termcap 2007-06-17 22:24:57.000000000 +0100
-@@ -73,6 +73,14 @@
+--- termcap.orig
++++ termcap
+@@ -71,6 +71,14 @@
:so=\E[7m:sr=\EM:st=\EH:te=\E[?1049l:ti=\E[?1049h:\
:ue=\E[24m:up=\E[A:us=\E[4m:ve=\E[?25h:vi=\E[?25l:
@@ -42,7 +40,7 @@ Index: termcap
# The xterm-new description has all of the features, but is not completely
# compatible with vt220. If you are using a Sun or PC keyboard, set the
# sunKeyboard resource to true:
-@@ -234,5 +242,6 @@
+@@ -232,5 +240,6 @@
# is widely used for a variety of incompatible terminal emulations including
# color_xterm and rxvt.
v0|xterm|X11 terminal emulator:\
@@ -50,11 +48,9 @@ Index: termcap
+ :tc=xterm-debian:
+# :tc=xterm-new:
# :tc=xterm-r6:
-Index: terminfo
-===================================================================
---- terminfo.orig 2007-06-17 22:24:53.000000000 +0100
-+++ terminfo 2007-06-17 22:24:57.000000000 +0100
-@@ -885,6 +885,13 @@
+--- terminfo.orig
++++ terminfo
+@@ -955,6 +955,13 @@
u8=\E[?1;2c,
u9=\E[c,
vpa=\E[%i%p1%dd,
@@ -68,7 +64,7 @@ Index: terminfo
#
# The xterm-new description has all of the features, but is not completely
# compatible with vt220. If you are using a Sun or PC keyboard, set the
-@@ -1664,5 +1671,6 @@
+@@ -1935,5 +1942,6 @@
# is widely used for a variety of incompatible terminal emulations including
# color_xterm and rxvt.
xterm|X11 terminal emulator,
@@ -76,10 +72,8 @@ Index: terminfo
+ use=xterm-debian,
+# use=xterm-new,
# use=xterm-r6,
-Index: XTerm.ad
-===================================================================
---- XTerm.ad.orig 2007-06-17 22:24:53.000000000 +0100
-+++ XTerm.ad 2007-06-17 22:24:57.000000000 +0100
+--- XTerm.ad.orig
++++ XTerm.ad
@@ -116,6 +116,10 @@
*tek4014*font3: 6x13
*tek4014*fontSmall: 6x10
@@ -91,10 +85,8 @@ Index: XTerm.ad
! If xterm is built with a toolbar, the widget hierarchy looks like this,
! showing widget name / class names. The complete menu hierarchy is built
! at startup because it is needed to make the layout work for the menubar:
-Index: XTerm-col.ad
-===================================================================
---- XTerm-col.ad.orig 2007-06-17 22:24:53.000000000 +0100
-+++ XTerm-col.ad 2007-06-17 22:24:57.000000000 +0100
+--- XTerm-col.ad.orig
++++ XTerm-col.ad
@@ -7,9 +7,9 @@
*VT100*boldColors: on
*VT100*dynamicColors: on
diff --git a/debian/patches/901_xterm_manpage.diff b/debian/patches/901_xterm_manpage.diff
index d0bcf76..2ca8df3 100644
--- a/debian/patches/901_xterm_manpage.diff
+++ b/debian/patches/901_xterm_manpage.diff
@@ -7,9 +7,9 @@ This patch by Branden Robinson and David Martínez.
Index: xterm.man
===================================================================
---- xterm.man.orig 2007-07-23 03:03:23.000000000 +0200
-+++ xterm.man 2007-07-23 03:03:58.000000000 +0200
-@@ -4620,10 +4620,10 @@
+--- xterm.man.orig 2008-02-09 02:23:20.000000000 +0100
++++ xterm.man 2008-02-09 02:24:58.000000000 +0100
+@@ -4739,10 +4739,10 @@
.SH FILES
The actual pathnames given may differ on your system.
.TP 5
diff --git a/debian/patches/902_pointermode_never.diff b/debian/patches/902_pointermode_never.diff
new file mode 100644
index 0000000..02f2d8f
--- /dev/null
+++ b/debian/patches/902_pointermode_never.diff
@@ -0,0 +1,21 @@
+Debian-specific tweak: the pointerMode resource is set to 0 (never)
+by default.
+
+Index: xterm.man
+===================================================================
+--- xterm.man.orig 2008-02-09 02:23:20.000000000 +0100
++++ xterm.man 2008-02-09 02:24:58.000000000 +0100
+@@ -2525,11 +2525,11 @@
+ .RS
+ .TP 3
+ 0
+-never
++never.
++This is the default.
+ .TP 3
+ 1
+ the application running in \fIxterm\fP has not activated mouse mode.
+-This is the default.
+ .TP 3
+ 2
+ always.
diff --git a/debian/patches/series b/debian/patches/series
index 1a73663..d8267b7 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
900_debian_xterm.diff -p0
901_xterm_manpage.diff -p0
+902_pointermode_never.diff -p0
diff --git a/debian/rules b/debian/rules
index 238d2d3..436021c 100755
--- a/debian/rules
+++ b/debian/rules
@@ -25,7 +25,7 @@ else
confflags += --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
endif
-CFLAGS = -g -Wall
+CFLAGS = -g -Wall -DDEF_POINTER_MODE=pNever
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O0
else
@@ -106,7 +106,8 @@ $(STAMP_DIR)/configure: $(STAMP_DIR)/patch
--prefix=/usr --exec-prefix=/usr --mandir=/usr/share/man \
--with-app-defaults=/etc/X11/app-defaults \
--disable-imake --enable-narrowproto --enable-exec-xterm \
- $(confflags) DESKTOP_FLAGS="$(DESKTOP_FLAGS)" CFLAGS="$(CFLAGS)"
+ $(confflags) DESKTOP_FLAGS="$(DESKTOP_FLAGS)" \
+ CFLAGS="$(CFLAGS)" LUIT=/usr/bin/luit
touch $@
commit a18a5b3f13d9355f885b7e67b37e355d57028f03
Author: Julien Cristau <jcristau@debian.org>
Date: Sat Feb 9 02:04:30 2008 +0100
Import xterm 232.
diff --git a/Tekproc.c b/Tekproc.c
index d7dd80e..8b1b89a 100644
--- a/Tekproc.c
+++ b/Tekproc.c
@@ -1,4 +1,4 @@
-/* $XTermId: Tekproc.c,v 1.157 2007/07/10 19:53:11 tom Exp $ */
+/* $XTermId: Tekproc.c,v 1.158 2008/01/26 01:21:10 tom Exp $ */
/*
* Warning, there be crufty dragons here.
@@ -7,7 +7,7 @@
/*
-Copyright 2001-2006,2007 by Thomas E. Dickey
+Copyright 2001-2007,2008 by Thomas E. Dickey
All Rights Reserved
@@ -729,13 +729,16 @@ Tekparse(TekWidget tw)
1);
} else
#endif
+ {
+ char ch2 = (char) ch;
XDrawString(XtDisplay(tw),
TWindow(tekscr),
tekscr->TnormalGC,
x,
y,
- (char *) &ch,
+ &ch2,
1);
+ }
TCursorForward(tw);
break;
case CASE_OSC:
diff --git a/VTPrsTbl.c b/VTPrsTbl.c
index 38b04fa..47a2441 100644
--- a/VTPrsTbl.c
+++ b/VTPrsTbl.c
@@ -1,9 +1,8 @@
-/* $XTermId: VTPrsTbl.c,v 1.48 2006/07/31 22:14:03 tom Exp $ */
+/* $XTermId: VTPrsTbl.c,v 1.49 2008/01/27 17:41:05 tom Exp $ */
-/* $XFree86: xc/programs/xterm/VTPrsTbl.c,v 3.31 2006/02/13 01:14:58 dickey Exp $ */
/*
*
- * Copyright 1999-2005,2006 by Thomas E. Dickey
+ * Copyright 1999-2006,2008 by Thomas E. Dickey
*
* All Rights Reserved
*
@@ -3141,7 +3140,7 @@ CASE_SET_MOD_FKEYS,
CASE_SET_MOD_FKEYS0,
CASE_GROUND_STATE,
/* p q r s */
-CASE_GROUND_STATE,
+CASE_HIDE_POINTER,
CASE_GROUND_STATE,
CASE_GROUND_STATE,
CASE_GROUND_STATE,
diff --git a/VTparse.def b/VTparse.def
index be2c1cd..6c8751d 100644
--- a/VTparse.def
+++ b/VTparse.def
@@ -1,6 +1,6 @@
-# $XTermId: VTparse.def,v 1.30 2007/12/04 21:14:30 tom Exp $
+# $XTermId: VTparse.def,v 1.31 2008/01/27 17:08:54 tom Exp $
#
-# vile:txtmode rs=lf
+# vile:confmode rs=lf
#
# List of symbols that need to be defined for VTparse.h. If you need to
# change any of the CASE_ macros, make the change here and rerun the command
@@ -140,3 +140,4 @@ CASE_DECRARA
CASE_CSI_STAR_STATE
CASE_SET_MOD_FKEYS
CASE_SET_MOD_FKEYS0
+CASE_HIDE_POINTER
diff --git a/VTparse.h b/VTparse.h
index 0bbb399..db2fd07 100644
--- a/VTparse.h
+++ b/VTparse.h
@@ -1,8 +1,7 @@
-/* $XTermId: VTparse.h,v 1.42 2006/07/31 22:17:40 tom Exp $ */
+/* $XTermId: VTparse.h,v 1.43 2008/01/27 17:11:37 tom Exp $ */
-/* $XFree86: xc/programs/xterm/VTparse.h,v 3.24 2006/02/13 01:14:58 dickey Exp $ */
/*
- * Copyright 2002-2005,2006 by Thomas E. Dickey
+ * Copyright 2002-2006,2008 by Thomas E. Dickey
*
* All Rights Reserved
*
@@ -242,5 +241,6 @@ extern Const PARSE_T esc_pct_table[];
#define CASE_CSI_STAR_STATE 130
#define CASE_SET_MOD_FKEYS 131
#define CASE_SET_MOD_FKEYS0 132
+#define CASE_HIDE_POINTER 133
#endif /* included_VTparse_h */
diff --git a/button.c b/button.c
index 63a0e33..3e63306 100644
--- a/button.c
+++ b/button.c
@@ -1,4 +1,4 @@
-/* $XTermId: button.c,v 1.281 2007/12/31 21:11:05 tom Exp $ */
+/* $XTermId: button.c,v 1.283 2008/01/07 22:56:37 tom Exp $ */
/*
* Copyright 1999-2006,2007 by Thomas E. Dickey
@@ -3154,6 +3154,7 @@ ConvertSelection(Widget w,
return False; /* can this happen? */
if (*target == XA_TARGETS(dpy)) {
+ Atom *allocP;
Atom *targetP;
Atom *std_targets;
XPointer std_return = 0;
@@ -3165,8 +3166,12 @@ ConvertSelection(Widget w,
&std_length, format)) {
std_targets = (Atom *) (std_return);
*length = std_length + 6;
+
targetP = (Atom *) XtMalloc(sizeof(Atom) * (*length));
+ allocP = targetP;
+
*value = (XtPointer) targetP;
+
*targetP++ = XA_STRING;
*targetP++ = XA_TEXT(dpy);
#ifdef X_HAVE_UTF8_STRING
@@ -3181,6 +3186,9 @@ ConvertSelection(Widget w,
#endif
*targetP++ = XA_LENGTH(dpy);
*targetP++ = XA_LIST_LENGTH(dpy);
+
+ *length = std_length + (targetP - allocP);
+
memcpy(targetP, std_targets, sizeof(Atom) * std_length);
XtFree((char *) std_targets);
*type = XA_ATOM;
diff --git a/cachedGCs.c b/cachedGCs.c
index 720b884..93913a3 100644
--- a/cachedGCs.c
+++ b/cachedGCs.c
@@ -1,8 +1,8 @@
-/* $XTermId: cachedGCs.c,v 1.38 2007/06/09 00:08:39 tom Exp $ */
+/* $XTermId: cachedGCs.c,v 1.47 2008/01/30 00:56:13 tom Exp $ */
/************************************************************
-Copyright 2007 by Thomas E. Dickey
+Copyright 2007,2008 by Thomas E. Dickey
All Rights Reserved
@@ -58,7 +58,7 @@ typedef struct {
GC gc;
unsigned used;
unsigned cset;
- XFontStruct *font;
+ XTermFonts *font;
Pixel tile;
Pixel fg;
Pixel bg;
@@ -160,16 +160,18 @@ traceCSet(unsigned cset)
}
static String
-traceFont(XFontStruct * font)
+traceFont(XTermFonts * font)
{
static char result[80];
- if (font != 0) {
+ XFontStruct *fs;
+
+ if (font != 0 && (fs = font->fs) != 0) {
sprintf(result, "%p(%dx%d %d %#lx)",
- font,
- font->max_bounds.width,
- font->max_bounds.ascent + font->max_bounds.descent,
- font->max_bounds.descent,
- (unsigned long) (font->fid));
+ fs,
+ fs->max_bounds.width,
+ fs->max_bounds.ascent + fs->max_bounds.descent,
+ fs->max_bounds.descent,
+ (unsigned long) (fs->fid));
} else {
strcpy(result, "null");
}
@@ -255,6 +257,18 @@ allocCache(void **cache_pointer)
return *((CgsCache **) cache_pointer);
}
+static int
+dataIndex(CgsCache * me)
+{
+ return ITEM();
+}
+
+static void
+relinkData(CgsCache * me, int item)
+{
+ LINK(item);
+}
+
/*
* Returns the appropriate cache pointer.
*/
@@ -313,7 +327,7 @@ newCache(XtermWidget xw, VTwin * cgsWin, CgsEnum cgsId, CgsCache * me)
THIS(bg) = NEXT(bg);
memset(&xgcv, 0, sizeof(xgcv));
- xgcv.font = NEXT(font)->fid;
+ xgcv.font = NEXT(font)->fs->fid;
mask = (GCForeground | GCBackground | GCFont);
switch (cgsId) {
@@ -379,6 +393,24 @@ newCache(XtermWidget xw, VTwin * cgsWin, CgsEnum cgsId, CgsCache * me)
return THIS(gc);
}
+static Boolean
+HaveFont(XTermFonts * a)
+{
+ return (a != 0 && a->fs != 0);
+}
+
+static Boolean
+SameFont(XTermFonts * a, XTermFonts * b)
+{
+ return (HaveFont(a)
+ && HaveFont(b)
+ && (a->fs == b->fs)
+ && !memcmp(a->fs, b->fs, sizeof(*(a->fs))));
+}
+
+#define SameColor(a,b) ((a) == (b))
+#define SameCSet(a,b) ((a) == (b))
+
static GC
chgCache(XtermWidget xw, CgsEnum cgsId GCC_UNUSED, CgsCache * me)
{
@@ -387,38 +419,39 @@ chgCache(XtermWidget xw, CgsEnum cgsId GCC_UNUSED, CgsCache * me)
memset(&xgcv, 0, sizeof(xgcv));
- TRACE2(("...Cgs old data fg=%s, bg=%s, font=%s cset %s\n",
+ TRACE2(("chgCache(%s) old data fg=%s, bg=%s, font=%s cset %s\n",
+ traceCgsEnum(cgsId),
tracePixel(xw, THIS(fg)),
tracePixel(xw, THIS(bg)),
traceFont(THIS(font)),
traceCSet(THIS(cset))));
+#if OPT_TRACE > 1
+ if (!SameFont(THIS(font), NEXT(font)))
+ TRACE2(("...chgCache new font=%s\n", traceFont(NEXT(font))));
+ if (!SameCSet(THIS(cset), NEXT(cset)))
+ TRACE2(("...chgCache new cset=%s\n", traceCSet(NEXT(cset))));
+ if (!SameColor(THIS(fg), NEXT(fg)))
+ TRACE2(("...chgCache new fg=%s\n", tracePixel(xw, NEXT(fg))));
+ if (!SameColor(THIS(bg), NEXT(bg)))
+ TRACE2(("...chgCache new bg=%s\n", tracePixel(xw, NEXT(bg))));
+#endif
THIS(font) = NEXT(font);
THIS(cset) = NEXT(cset);
THIS(fg) = NEXT(fg);
THIS(bg) = NEXT(bg);
- xgcv.font = THIS(font)->fid;
+ xgcv.font = THIS(font)->fs->fid;
xgcv.foreground = THIS(fg);
xgcv.background = THIS(bg);
XChangeGC(myDisplay(xw), THIS(gc), mask, &xgcv);
- TRACE(("getCgsGC(%s) updated gc %p(%d)\n",
- traceCgsEnum(cgsId), THIS(gc), ITEM()));
+ TRACE2(("...chgCache(%s) updated gc %p(%d)\n",
+ traceCgsEnum(cgsId), THIS(gc), ITEM()));
THIS(used) = 0;
return THIS(gc);
}
-
-static Boolean
-SameFont(XFontStruct * a, XFontStruct * b)
-{
- return ((a != 0) && (b != 0) && (a == b) && !memcmp(a, b, sizeof(*a)));
-}
-
-#define SameColor(a,b) ((a) == (b))
-#define SameCSet(a,b) ((a) == (b))
-
/*
* Use the "setCgsXXXX()" calls to initialize parameters for a new GC.
*/
@@ -466,22 +499,22 @@ setCgsCSet(XtermWidget xw, VTwin * cgsWin, CgsEnum cgsId, unsigned cset)
#endif
void
-setCgsFont(XtermWidget xw, VTwin * cgsWin, CgsEnum cgsId, XFontStruct * font)
+setCgsFont(XtermWidget xw, VTwin * cgsWin, CgsEnum cgsId, XTermFonts * font)
{
CgsCache *me;
if ((me = myCache(xw, cgsWin, cgsId)) != 0) {
- if (font == 0) {
+ if (!HaveFont(font)) {
if (cgsId != gcNorm)
(void) getCgsGC(xw, cgsWin, gcNorm);
#ifndef NO_ACTIVE_ICON
if (cgsWin == &(xw->screen.iconVwin))
- font = xw->screen.fnt_icon;
+ font = &(xw->screen.fnt_icon);
else
#endif
- font = xw->screen.fnts[fNorm];
+ font = &(xw->screen.fnts[fNorm]);
}
- if (okFont(font) && !SameFont(NEXT(font), font)) {
+ if (okFont(font->fs) && !SameFont(NEXT(font), font)) {
TRACE2(("...updated next font for %s to %s\n",
traceCgsEnum(cgsId), traceFont(font)));
TRACE2(("...next font was %s\n", traceFont(NEXT(font))));
@@ -499,32 +532,34 @@ setCgsFont(XtermWidget xw, VTwin * cgsWin, CgsEnum cgsId, XFontStruct * font)
* Keep the GC's so we can simply change them rather than creating new ones.
*/
void
-clrCgsFonts(XtermWidget xw, VTwin * cgsWin, XFontStruct * font)
+clrCgsFonts(XtermWidget xw, VTwin * cgsWin, XTermFonts * font)
{
CgsCache *me;
int j, k;
- for_each_gc(j) {
- if ((me = myCache(xw, cgsWin, (CgsEnum) j)) != 0) {
- for (k = 0; k < DEPTH; ++k) {
- if (SameFont(LIST(k).font, font)) {
- TRACE2(("clrCgsFonts %s gc %p(%d) %s\n",
+ if (HaveFont(font)) {
+ for_each_gc(j) {
+ if ((me = myCache(xw, cgsWin, (CgsEnum) j)) != 0) {
+ for (k = 0; k < DEPTH; ++k) {
+ if (SameFont(LIST(k).font, font)) {
+ TRACE2(("clrCgsFonts %s gc %p(%d) %s\n",
+ traceCgsEnum((CgsEnum) j),
+ LIST(k).gc,
+ k,
+ traceFont(font)));
+ LIST(k).font = 0;
+ LIST(k).cset = 0;
+ }
+ }
+ if (SameFont(NEXT(font), font)) {
+ TRACE2(("clrCgsFonts %s next %s\n",
traceCgsEnum((CgsEnum) j),
- LIST(k).gc,
- k,
traceFont(font)));
- LIST(k).font = 0;
- LIST(k).cset = 0;
+ NEXT(font) = 0;
+ NEXT(cset) = 0;
+ me->mask &= ~(GCFont | GC_CSet);
}
}
- if (SameFont(NEXT(font), font)) {
- TRACE2(("clrCgsFonts %s next %s\n",
- traceCgsEnum((CgsEnum) j),
- traceFont(font)));
- NEXT(font) = 0;
- NEXT(cset) = 0;
- me->mask &= ~(GCFont | GC_CSet);
- }
}
}
}
@@ -643,11 +678,11 @@ getCgsId(XtermWidget xw, VTwin * cgsWin, GC gc)
/*
* Return the font for the given GC.
*/
-XFontStruct *
+XTermFonts *
getCgsFont(XtermWidget xw, VTwin * cgsWin, GC gc)
{
int n;
- XFontStruct *result = 0;
+ XTermFonts *result = 0;
for_each_gc(n) {
CgsCache *me;
@@ -772,13 +807,19 @@ swapCgs(XtermWidget xw, VTwin * cgsWin, CgsEnum dstCgsId, CgsEnum srcCgsId)
if (dstCgsId != srcCgsId) {
CgsCache *dst;
CgsCache *src;
+ CgsCache tmp;
if ((src = myCache(xw, cgsWin, srcCgsId)) != 0) {
if ((dst = myCache(xw, cgsWin, dstCgsId)) != 0) {
- CgsCache tmp;
+ int srcIndex = dataIndex(src);
+ int dstIndex = dataIndex(dst);
+
tmp = *dst;
*dst = *src;
*src = tmp;
+
+ relinkData(src, dstIndex);
+ relinkData(dst, srcIndex);
}
}
}
diff --git a/charclass.c b/charclass.c
index b8fd759..ea2d2ed 100644
--- a/charclass.c
+++ b/charclass.c
@@ -1,4 +1,4 @@
-/* $XTermId: charclass.c,v 1.18 2007/07/15 16:18:41 tom Exp $ */
+/* $XTermId: charclass.c,v 1.20 2008/01/31 01:07:23 tom Exp $ */
/*
* Compact and efficient reimplementation of the
@@ -23,7 +23,6 @@
* can be accessed via binary search, but merging in new intervals is
* significantly more hassle and not worth the effort here.
*/
-/* $XFree86: xc/programs/xterm/charclass.c,v 1.7 2006/02/13 01:14:58 dickey Exp $ */
#include <xterm.h>
#include <charclass.h>
@@ -66,11 +65,11 @@ SetCharacterClassRange(int low, int high, int value)
return 0;
}
-enum {
+typedef enum {
IDENT = -1,
ALNUM = 48,
CNTRL = 1,
- BLANK = 32,
+ BLANK = 32
} Classes;
void
diff --git a/charproc.c b/charproc.c
index b101404..1b47ae6 100644
--- a/charproc.c
+++ b/charproc.c
@@ -1,8 +1,8 @@
-/* $XTermId: charproc.c,v 1.824 2007/12/31 21:03:26 tom Exp $ */
+/* $XTermId: charproc.c,v 1.834 2008/01/27 17:39:53 tom Exp $ */
/*
-Copyright 1999-2006,2007 by Thomas E. Dickey
+Copyright 1999-2007,2008 by Thomas E. Dickey
All Rights Reserved
@@ -450,6 +450,7 @@ static XtResource resources[] =
Ires(XtNlimitResize, XtCLimitResize, misc.limit_resize, 1),
Ires(XtNmultiClickTime, XtCMultiClickTime, screen.multiClickTime, MULTICLICKTIME),
Ires(XtNnMarginBell, XtCColumn, screen.nmarginbell, N_MARGINBELL),
+ Ires(XtNpointerMode, XtCPointerMode, screen.pointer_mode, DEF_POINTER_MODE),
Ires(XtNprinterControlMode, XtCPrinterControlMode,
screen.printer_controlmode, 0),
Ires(XtNvisualBellDelay, XtCVisualBellDelay, screen.visualBellDelay, 100),
@@ -497,7 +498,7 @@ static XtResource resources[] =
#ifndef NO_ACTIVE_ICON
Bres("activeIcon", "ActiveIcon", misc.active_icon, False),
Ires("iconBorderWidth", XtCBorderWidth, misc.icon_border_width, 2),
- Fres("iconFont", "IconFont", screen.fnt_icon, XtDefaultFont),
+ Fres("iconFont", "IconFont", screen.fnt_icon.fs, XtDefaultFont),
Cres("iconBorderColor", XtCBorderColor, misc.icon_border_pixel, XtDefaultBackground),
#endif /* NO_ACTIVE_ICON */
@@ -2562,6 +2563,7 @@ doparsing(XtermWidget xw, unsigned c, struct ParseState *sp)
} else {
TRACE(("DECELR - Enable Locator Reports\n"));
screen->send_mouse_pos = DEC_LOCATOR;
+ xtermShowPointer(xw, True);
if (param[0] == 2) {
screen->locator_reset = True;
} else {
@@ -2839,6 +2841,14 @@ doparsing(XtermWidget xw, unsigned c, struct ParseState *sp)
}
break;
#endif
+ case CASE_HIDE_POINTER:
+ TRACE(("CASE_HIDE_POINTER\n"));
+ if (nparam >= 1 && param[0] != DEFAULT) {
+ screen->pointer_mode = param[0];
+ } else {
+ screen->pointer_mode = DEF_POINTER_MODE;
+ }
+ break;
case CASE_CSI_IGNORE:
sp->parsestate = cigtable;
@@ -3718,7 +3728,8 @@ really_set_mousemode(XtermWidget xw,
unsigned mode)
{
xw->screen.send_mouse_pos = enabled ? mode : MOUSE_OFF;
- xtermShowPointer(xw, enabled);
+ if (xw->screen.send_mouse_pos != MOUSE_OFF)
+ xtermShowPointer(xw, True);
}
#define set_mousemode(mode) really_set_mousemode(xw, IsSM(), mode)
@@ -5457,6 +5468,7 @@ VTInitialize(Widget wrequest,
init_Bres(screen.trim_selection);
wnew->screen.pointer_cursor = request->screen.pointer_cursor;
+ init_Ires(screen.pointer_mode);
init_Sres(screen.answer_back);
@@ -5491,7 +5503,7 @@ VTInitialize(Widget wrequest,
init_Bres(screen.quiet_grab);
#ifndef NO_ACTIVE_ICON
- wnew->screen.fnt_icon = request->screen.fnt_icon;
+ wnew->screen.fnt_icon.fs = request->screen.fnt_icon.fs;
init_Bres(misc.active_icon);
init_Ires(misc.icon_border_width);
wnew->misc.icon_border_pixel = request->misc.icon_border_pixel;
@@ -5947,8 +5959,14 @@ VTDestroy(Widget w GCC_UNUSED)
TRACE_FREE_LEAK(screen->allbuf);
TRACE_FREE_LEAK(screen->abuf_address);
TRACE_FREE_LEAK(screen->altbuf);
+ TRACE_FREE_LEAK(screen->keyboard_dialect);
+ TRACE_FREE_LEAK(screen->term_id);
#if OPT_WIDE_CHARS
TRACE_FREE_LEAK(screen->draw_buf);
+#if OPT_LUIT_PROG
+ TRACE_FREE_LEAK(xw->misc.locale_str);
+ TRACE_FREE_LEAK(xw->misc.localefilter);
+#endif
#endif
#if OPT_INPUT_METHOD
if (screen->xim) {
@@ -5962,6 +5980,9 @@ VTDestroy(Widget w GCC_UNUSED)
releaseWindowGCs(xw, &(screen->iconVwin));
#endif
+ if (screen->hidden_cursor)
+ XFreeCursor(screen->display, screen->hidden_cursor);
+
xtermCloseFonts(xw, screen->fnts);
noleaks_cachedCgs(xw);
@@ -5976,10 +5997,12 @@ VTDestroy(Widget w GCC_UNUSED)
}
#endif
+#if OPT_COLOR_RES
/* free local copies of resource strings */
for (n = 0; n < NCOLORS; ++n) {
FREE_LEAK(screen->Tcolors[n].resource);
}
+#endif
#if OPT_SELECT_REGEX
for (n = 0; n < NSELECTUNITS; ++n) {
FREE_LEAK(screen->selectExpr[n]);
@@ -6040,7 +6063,7 @@ VTRealize(Widget w,
}
/* really screwed if we couldn't open default font */
- if (!screen->fnts[fNorm]) {
+ if (!screen->fnts[fNorm].fs) {
fprintf(stderr, "%s: unable to locate a suitable font\n",
xterm_name);
Exit(1);
@@ -6188,14 +6211,14 @@ VTRealize(Widget w,
screen->event_mask = values->event_mask;
#ifndef NO_ACTIVE_ICON
- if (xw->misc.active_icon && screen->fnt_icon) {
+ if (xw->misc.active_icon && screen->fnt_icon.fs) {
int iconX = 0, iconY = 0;
Widget shell = SHELL_OF(xw);
VTwin *win = &(screen->iconVwin);
TRACE(("Initializing active-icon\n"));
XtVaGetValues(shell, XtNiconX, &iconX, XtNiconY, &iconY, (XtPointer) 0);
- xtermComputeFontInfo(xw, &(screen->iconVwin), screen->fnt_icon, 0);
+ xtermComputeFontInfo(xw, &(screen->iconVwin), screen->fnt_icon.fs, 0);
/* since only one client is permitted to select for Button
* events, we have to let the window manager get 'em...
@@ -6219,13 +6242,13 @@ VTRealize(Widget w,
(XtPointer) 0);
XtRegisterDrawable(XtDisplay(xw), screen->iconVwin.window, w);
- setCgsFont(xw, win, gcNorm, screen->fnt_icon);
+ setCgsFont(xw, win, gcNorm, &(screen->fnt_icon));
setCgsFore(xw, win, gcNorm, T_COLOR(screen, TEXT_FG));
setCgsBack(xw, win, gcNorm, T_COLOR(screen, TEXT_BG));
copyCgs(xw, win, gcBold, gcNorm);
- setCgsFont(xw, win, gcNormReverse, screen->fnt_icon);
+ setCgsFont(xw, win, gcNormReverse, &(screen->fnt_icon));
setCgsFore(xw, win, gcNormReverse, T_COLOR(screen, TEXT_BG));
setCgsBack(xw, win, gcNormReverse, T_COLOR(screen, TEXT_FG));
@@ -7182,6 +7205,8 @@ VTReset(XtermWidget xw, Bool full, Bool saved)
screen->waitingForTrackInfo = False;
screen->eventMode = NORMAL;
+ xtermShowPointer(xw, True);
+
TabReset(xw->tabs);
xw->keyboard.flags = MODE_SRM;
#if OPT_INITIAL_ERASE
diff --git a/ctlseqs.ms b/ctlseqs.ms
index 2f08c7c..903e251 100644
--- a/ctlseqs.ms
+++ b/ctlseqs.ms
@@ -1,9 +1,9 @@
.\"#! troff -ms $1 -*- Nroff -*-
.\" "Xterm Control Sequences" document
-.\" $XTermId: ctlseqs.ms,v 1.184 2007/12/12 23:39:18 tom Exp $
+.\" $XTermId: ctlseqs.ms,v 1.186 2008/01/27 17:39:00 tom Exp $
.\"
.\"
-.\" Copyright 1996-2006,2007 by Thomas E. Dickey
+.\" Copyright 1996-2007,2008 by Thomas E. Dickey
.\"
.\" All Rights Reserved
.\"
@@ -288,7 +288,7 @@ X Consortium (1994)
Thomas Dickey
.AI
XFree86 Project (1996-2006)
-invisible-island.net (2006-2007)
+invisible-island.net (2006-2008)
.AU
.
.am BT \" add page numbers after first page
@@ -957,7 +957,7 @@ Device Status Report (DSR)
.br
\*(Cs\*(Ir\*s\*;\*(Ic\*s\*R
.
-.IP \\*(Cs\\*(Ps\\*>\\*n
+.IP \\*(Cs\\*>\\*(Ps\\*s\\*n
Disable modifiers which may be enabled via the
\*(Cs\*>\*(Ps\*;\*(Ps\*s\*m
sequence.
@@ -996,6 +996,17 @@ The last two parameters apply to VT400 & up, and denote keyboard ready and LK01
.br
\*(Cs\*?\*5\*0\*s\*n No Locator, if not.
.
+.IP \\*(Cs\\*>\\*(Ps\\*s\\*p
+Set resource value \fIpointerMode\fP,
+used by \fIxterm\fP to decide whether to
+hide the pointer cursor as the user types.
+Valid values for the parameter:
+ \*(Ps = \*0 \(-> never hide the pointer
+ \*(Ps = \*1 \(-> hide if the mouse tracking mode is not enabled
+ \*(Ps = \*2 \(-> always hide the pointer
+If no parameter is given, \fIxterm\fP uses the default,
+which is \*1.
+.
.IP \\*(Cs\\*!\\*p
Soft terminal reset (DECSTR)
.
diff --git a/ctlseqs.txt b/ctlseqs.txt
index 242c63b..624e19b 100644
--- a/ctlseqs.txt
+++ b/ctlseqs.txt
@@ -19,7 +19,7 @@
Thomas Dickey
XFree86 Project (1996-2006)
- invisible-island.net (2006-2007)
+ invisible-island.net (2006-2008)
@@ -507,7 +507,8 @@ CSI Ps n Device Status Report (DSR)
Ps = 5 -> Status Report CSI 0 n (``OK'')
Ps = 6 -> Report Cursor Position (CPR) [row;column] as
CSI r ; c R
-CSI Ps> n Disable modifiers which may be enabled via the CSI > Ps; Ps m
+CSI > Ps n
+ Disable modifiers which may be enabled via the CSI > Ps; Ps m
sequence. This corresponds to a resource value of "-1", which
cannot be set with the other sequence. The parameter identi-
fies the resource to be disabled:
@@ -533,6 +534,14 @@ CSI ? Ps n
Ps = 5 3 -> Report Locator status as
CSI ? 5 3 n Locator available, if compiled-in, or
CSI ? 5 0 n No Locator, if not.
+CSI > Ps p
+ Set resource value pointerMode, used by xterm to decide
+ whether to hide the pointer cursor as the user types. Valid
+ values for the parameter:
+ Ps = 0 -> never hide the pointer
+ Ps = 1 -> hide if the mouse tracking mode is not enabled
+ Ps = 2 -> always hide the pointer If no parameter is given,
+ xterm uses the default, which is 1 .
CSI ! p Soft terminal reset (DECSTR)
CSI Ps ; Ps " p
Set conformance level (DECSCL) Valid values for the first
diff --git a/doublechr.c b/doublechr.c
index a61a564..91685c3 100644
--- a/doublechr.c
+++ b/doublechr.c
@@ -1,8 +1,8 @@
Reply to: