Hello community,
here is the log from the commit of package xterm
checked in at Tue Aug 22 14:24:39 CEST 2006.
--------
--- xterm/xterm.changes 2006-08-16 18:02:56.000000000 +0200
+++ xterm/xterm.changes 2006-08-22 05:48:02.000000000 +0200
@@ -1,0 +2,22 @@
+Tue Aug 22 05:43:29 CEST 2006 - sndirsch@suse.de
+
+- updated to xterm-217
+ * minor improvements to FreeType font layout and drawing.
+ * add a check in the ptyInitialErase logic to ensure that
+ the termcap was read (Redhat Bugzilla #201246).
+ * limit changes for reverse-video from patch #216 to cases
+ where the reverse-video command-line option is used (report
+ by Zdenek Sekera).
+ * correct bitmap-derived pointsizes for TrueType fonts; they
+ should be proportional to the square root of the area of
+ the bitmap fonts.
+ * add resources to specify pointsize of TrueType fonts (request
+ by Reuben Thomas).
+ * improve install of terminfo by filtering out harmless
+ messages related to extended capabilities. At the same time,
+ use ncurses tic to compile the extended capabilities if
+ possible (report by Zdenek Sekera).
+ * update "xterm+pcfkeys" terminfo entry to correspond to patch
+ #216.
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ xterm.spec ++++++
--- /var/tmp/diff_new_pack.w4snfl/_old 2006-08-22 14:24:22.000000000 +0200
+++ /var/tmp/diff_new_pack.w4snfl/_new 2006-08-22 14:24:22.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package xterm (Version 216)
+# spec file for package xterm (Version 217)
#
# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -17,8 +17,8 @@
Group: System/X11/Utilities
Provides: xorg-x11:/usr/X11R6/bin/xterm XFree86:/usr/X11R6/bin/xterm
Autoreqprov: on
-Version: 216
-Release: 3
+Version: 217
+Release: 1
Summary: The basic X terminal program
Source: %name.tar.gz
Source1: luitx
@@ -183,6 +183,25 @@
/usr/share/pixmaps/terminal.png
%changelog -n xterm
+* Tue Aug 22 2006 - sndirsch@suse.de
+- updated to xterm-217
+ * minor improvements to FreeType font layout and drawing.
+ * add a check in the ptyInitialErase logic to ensure that
+ the termcap was read (Redhat Bugzilla #201246).
+ * limit changes for reverse-video from patch #216 to cases
+ where the reverse-video command-line option is used (report
+ by Zdenek Sekera).
+ * correct bitmap-derived pointsizes for TrueType fonts; they
+ should be proportional to the square root of the area of
+ the bitmap fonts.
+ * add resources to specify pointsize of TrueType fonts (request
+ by Reuben Thomas).
+ * improve install of terminfo by filtering out harmless
+ messages related to extended capabilities. At the same time,
+ use ncurses tic to compile the extended capabilities if
+ possible (report by Zdenek Sekera).
+ * update "xterm+pcfkeys" terminfo entry to correspond to patch
+ [#216].
* Wed Aug 16 2006 - aj@suse.de
- Remove unneeded BuildRequire on xorg-x11.
* Wed Aug 09 2006 - sndirsch@suse.de
++++++ xterm.tar.gz ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/xterm-216/MANIFEST new/xterm-217/MANIFEST
--- old/xterm-216/MANIFEST 2006-07-04 22:20:45.000000000 +0200
+++ new/xterm-217/MANIFEST 2006-08-11 22:46:43.000000000 +0200
@@ -1,4 +1,4 @@
-MANIFEST for xterm, version xterm-216
+MANIFEST for xterm, version xterm-217
--------------------------------------------------------------------------------
MANIFEST this file
256colres.h resource-definitions for 256-color mode
@@ -67,6 +67,7 @@
ptyx.h structure-definitions for 'xterm'
resize.c program to compute/modify xterm's window size
resize.man manual page for 'resize'
+run-tic.sh run tic, filtering out harmless messages
screen.c VT100 screen update functions
scrollbar.c VT100 scrollbar support functions
sinstall.sh install setuid if existing program was
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/xterm-216/Makefile.in new/xterm-217/Makefile.in
--- old/xterm-216/Makefile.in 2006-08-03 23:15:53.000000000 +0200
+++ new/xterm-217/Makefile.in 2006-08-10 23:43:51.000000000 +0200
@@ -1,4 +1,4 @@
-## $XTermId: Makefile.in,v 1.135 2006/08/03 21:15:53 tom Exp $
+## $XTermId: Makefile.in,v 1.136 2006/08/10 21:43:51 tom Exp $
##
## $XFree86: xc/programs/xterm/Makefile.in,v 3.56 2006/06/19 00:36:50 dickey Exp $ ##
##
@@ -198,7 +198,7 @@
install-full \
install-ti :: $(TERMINFO_DIR)
- $(SET_TERMINFO) tic $(srcdir)/terminfo
+ $(SET_TERMINFO) $(SHELL) $(srcdir)/run-tic.sh $(srcdir)/terminfo
@echo 'Completed installation of terminfo description.'
install-full \
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/xterm-216/charproc.c new/xterm-217/charproc.c
--- old/xterm-216/charproc.c 2006-08-04 01:52:22.000000000 +0200
+++ new/xterm-217/charproc.c 2006-08-15 01:36:08.000000000 +0200
@@ -1,4 +1,4 @@
-/* $XTermId: charproc.c,v 1.727 2006/08/03 23:52:22 tom Exp $ */
+/* $XTermId: charproc.c,v 1.730 2006/08/14 23:36:08 tom Exp $ */
/* $XFree86: xc/programs/xterm/charproc.c,v 3.185 2006/06/20 00:42:38 dickey Exp $ */
@@ -668,7 +668,14 @@
#endif
#if OPT_RENDERFONT
- Dres(XtNfaceSize, XtCFaceSize, misc.face_size, DEFFACESIZE),
+#define RES_FACESIZE(n) Dres(XtNfaceSize #n, XtCFaceSize #n, misc.face_size[n], "0.0")
+ RES_FACESIZE(1),
+ RES_FACESIZE(2),
+ RES_FACESIZE(3),
+ RES_FACESIZE(4),
+ RES_FACESIZE(5),
+ RES_FACESIZE(6),
+ Dres(XtNfaceSize, XtCFaceSize, misc.face_size[0], DEFFACESIZE),
Sres(XtNfaceName, XtCFaceName, misc.face_name, DEFFACENAME),
Sres(XtNfaceNameDoublesize, XtCFaceNameDoublesize, misc.face_wide_name, DEFFACENAME),
Bres(XtNrenderFont, XtCRenderFont, misc.render_font, True),
@@ -3736,7 +3743,8 @@
TRACE(("HandleStructNotify(ReparentNotify)\n"));
break;
default:
- TRACE(("HandleStructNotify(event %d)\n", event->type));
+ TRACE(("HandleStructNotify(event %s)\n",
+ visibleEventType(event->type)));
break;
}
}
@@ -5715,7 +5723,9 @@
#endif
#if OPT_RENDERFONT
- init_Dres(misc.face_size);
+ for (i = 0; i <= fontMenu_lastBuiltin; ++i) {
+ init_Dres(misc.face_size[i]);
+ }
init_Sres(misc.face_name);
init_Sres(misc.face_wide_name);
init_Bres(misc.render_font);
@@ -6686,6 +6696,7 @@
int set_at;
Bool in_selection;
Bool reversed;
+ Bool filled;
Pixel fg_pix;
Pixel bg_pix;
Pixel tmp;
@@ -6791,7 +6802,8 @@
* whether the window has focus, since in that case we want just an
* outline for the cursor.
*/
- if (screen->select || screen->always_highlight) {
+ filled = (screen->select || screen->always_highlight);
+ if (filled) {
if (reversed) { /* text is reverse video */
if (screen->cursorGC) {
setGC(screen->cursorGC);
@@ -6852,8 +6864,9 @@
&& (screen->cursor_state != ON || screen->cursor_GC != set_at)) {
screen->cursor_GC = set_at;
- TRACE(("ShowCursor calling drawXtermText cur(%d,%d)\n",
- screen->cur_row, screen->cur_col));
+ TRACE(("ShowCursor calling drawXtermText cur(%d,%d) %s\n",
+ screen->cur_row, screen->cur_col,
+ (filled ? "filled" : "outline")));
drawXtermText(xw, flags & DRAWX_MASK, currentGC,
x = CurCursorX(screen, screen->cur_row, cursor_col),
@@ -6875,7 +6888,7 @@
});
#endif
- if (!screen->select && !screen->always_highlight) {
+ if (!filled) {
screen->box->x = x;
screen->box->y = y;
XDrawLines(screen->display, VWindow(screen),
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/xterm-216/fontutils.c new/xterm-217/fontutils.c
--- old/xterm-216/fontutils.c 2006-07-23 22:31:30.000000000 +0200
+++ new/xterm-217/fontutils.c 2006-08-21 00:40:34.000000000 +0200
@@ -1,4 +1,4 @@
-/* $XTermId: fontutils.c,v 1.208 2006/07/23 20:31:30 tom Exp $ */
+/* $XTermId: fontutils.c,v 1.213 2006/08/20 22:40:34 tom Exp $ */
/*
* $XFree86: xc/programs/xterm/fontutils.c,v 1.60 2006/04/30 21:55:39 dickey Exp $
@@ -1356,6 +1356,82 @@
}
#endif
+#if OPT_SHIFT_FONTS
+/*
+ * Don't make a dependency on the math library for a single function.
+ * (Newton Raphson).
+ */
+static float
+mySquareRoot(float value)
+{
+ float result = 0.0;
+ if (value > 0.0) {
+ int n;
+ float older = value;
+ for (n = 0; n < 10; ++n) {
+ float delta = (older * older - value) / (2.0 * older);
+ float newer = older - delta;
+ older = newer;
+ result = newer;
+ if (delta > -0.001 && delta < 0.001)
+ break;
+ }
+ }
+ return result;
+}
+#endif
+
+#if OPT_RENDERFONT
+/*
+ * Given the Xft font metrics, determine the actual font size. This is used
+ * for each font to ensure that normal, bold and italic fonts follow the same
+ * rule.
+ */
+static void
+setRenderFontsize(TScreen * screen, struct _vtwin *win, XftFont * font, const char *tag)
+{
+ if (font != 0) {
+ int width, height, ascent, descent;
+
+ width = font->max_advance_width;
+ height = font->height;
+ ascent = font->ascent;
+ descent = font->descent;
+ if (height < ascent + descent) {
+ TRACE(("...increase height from %d\n", height));
+ height = ascent + descent;
+ }
+ if (is_double_width_font_xft(screen->display, font)) {
+ TRACE(("...reduced width from %d\n", width));
+ width >>= 1;
+ }
+ if (tag == 0) {
+ win->f_width = width;
+ win->f_height = height;
+ win->f_ascent = ascent;
+ win->f_descent = descent;
+ TRACE(("setRenderFontsize result %dx%d (%d+%d)\n",
+ width, height, ascent, descent));
+ } else if (win->f_width < width ||
+ win->f_height < height ||
+ win->f_ascent < ascent ||
+ win->f_descent < descent) {
+ TRACE(("setRenderFontsize %s changed %dx%d (%d+%d) to %dx%d (%d+%d)\n",
+ tag,
+ win->f_width, win->f_height, win->f_ascent, win->f_descent,
+ width, height, ascent, descent));
+
+ win->f_width = width;
+ win->f_height = height;
+ win->f_ascent = ascent;
+ win->f_descent = descent;
+ } else {
+ TRACE(("setRenderFontsize %s unchanged\n", tag));
+ }
+ }
+}
+#endif
+
/*
* Compute useful values for the font/window sizes
*/
@@ -1391,29 +1467,65 @@
if (norm == 0 && xw->misc.face_name) {
XftPattern *pat;
- double face_size = xw->misc.face_size;
+ double face_size = xw->misc.face_size[fontnum];
TRACE(("xtermComputeFontInfo norm(face %s, size %f)\n",
xw->misc.face_name,
- xw->misc.face_size));
+ xw->misc.face_size[fontnum]));
+ if (face_size <= 0.0) {
#if OPT_SHIFT_FONTS
- /*
- * If the user is switching font-sizes, make it follow the same
- * ratios to the default as the fixed fonts would, for easy
- * comparison. There will be some differences since the fixed
- * fonts have a variety of height/width ratios, but this is simpler
- * than adding another resource value - and as noted above, the
- * data for the fixed fonts are available.
- */
- lookupOneFontSize(screen, fontnum);
- if (fontnum != fontMenu_fontdefault) {
- int num = screen->menu_font_sizes[fontnum];
- int den = screen->menu_font_sizes[0];
- face_size = (1.0 * face_size * num) / den;
- TRACE(("scaled using %d/%d -> %f\n", num, den, face_size));
- }
+ /*
+ * If the user is switching font-sizes, make it follow by
+ * default the same ratios to the default as the fixed fonts
+ * would, for easy comparison. There will be some differences
+ * since the fixed fonts have a variety of height/width ratios,
+ * but this is simpler than adding another resource value - and
+ * as noted above, the data for the fixed fonts are available.
+ */
+ lookupOneFontSize(screen, fontnum);
+ if (fontnum == fontMenu_fontdefault) {
+ face_size = 14.0;
+ } else {
+ float ratio;
+ int num = screen->menu_font_sizes[fontnum];
+ int den = screen->menu_font_sizes[0];
+
+ if (den <= 0)
+ den = 1;
+ ratio = mySquareRoot((1.0 * num) / den);
+
+ face_size = (ratio * xw->misc.face_size[0]);
+ TRACE(("scaled using %3d/%d = %.2f -> %f\n",
+ num, den, ratio, face_size));
+ }
+#else
+ switch (fontnum) {
+ case fontMenu_font1:
+ face_size = 8.0;
+ break;
+ case fontMenu_font2:
+ face_size = 10.0;
+ break;
+ case fontMenu_font3:
+ face_size = 12.0;
+ break;
+ default:
+ face_size = 14.0;
+ break;
+ case fontMenu_font4:
+ face_size = 16.0;
+ break;
+ case fontMenu_font5:
+ face_size = 18.0;
+ break;
+ case fontMenu_font6:
+ face_size = 20.0;
+ break;
+ }
#endif
+ xw->misc.face_size[fontnum] = face_size;
+ }
if ((pat = XftNameParse(xw->misc.face_name)) != 0) {
XftPatternBuild(pat,
@@ -1509,24 +1621,23 @@
CACHE_XFT(screen->renderWideBold, wbold);
CACHE_XFT(screen->renderWideItal, wital);
}
-#endif
+#endif /* OPT_RENDERWIDE */
}
if (norm == 0) {
xw->misc.render_font = False;
update_font_renderfont();
+ /* now we will fall through into the bitmap fonts */
} else {
- win->f_width = norm->max_advance_width;
- win->f_height = norm->height;
- win->f_ascent = norm->ascent;
- win->f_descent = norm->descent;
- if (win->f_height < win->f_ascent + win->f_descent)
- win->f_height = win->f_ascent + win->f_descent;
- if (is_double_width_font_xft(screen->display, norm))
- win->f_width >>= 1;
+ setRenderFontsize(screen, win, norm, NULL);
+ setRenderFontsize(screen, win, bold, "bold");
+ setRenderFontsize(screen, win, ital, "ital");
}
}
+ /*
+ * Are we handling a bitmap font?
+ */
if (!xw->misc.render_font || IsIconWin(screen, win))
-#endif
+#endif /* OPT_RENDERFONT */
{
if (is_double_width_font(font)) {
win->f_width = (font->min_bounds.width);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/xterm-216/main.c new/xterm-217/main.c
--- old/xterm-216/main.c 2006-08-04 00:20:15.000000000 +0200
+++ new/xterm-217/main.c 2006-08-21 01:36:36.000000000 +0200
@@ -1,4 +1,4 @@
-/* $XTermId: main.c,v 1.522 2006/08/03 22:20:15 tom Exp $ */
+/* $XTermId: main.c,v 1.526 2006/08/20 23:36:36 tom Exp $ */
/*
* W A R N I N G
@@ -1648,6 +1648,9 @@
int mode;
char *my_class = DEFCLASS;
Window winToEmbedInto = None;
+#if OPT_COLOR_RES
+ Bool reversed = False;
+#endif
ProgramName = argv[0];
@@ -1713,6 +1716,14 @@
}
unique = 3;
} else {
+#if OPT_COLOR_RES
+ if (abbrev(argv[n], "-reverse", 2)
+ || !strcmp("-rv", argv[n])) {
+ reversed = True;
+ } else if (!strcmp("+rv", argv[n])) {
+ reversed = False;
+ }
+#endif
quit = False;
unique = 3;
}
@@ -2382,7 +2393,7 @@
NonNull(term->screen.Tcolors[TEXT_FG].resource),
NonNull(term->screen.Tcolors[TEXT_BG].resource)));
- if ((term->misc.re_verse)
+ if ((reversed && term->misc.re_verse0)
&& ((term->screen.Tcolors[TEXT_FG].resource
&& (x_strcasecmp(term->screen.Tcolors[TEXT_FG].resource,
XtDefaultForeground) != 0)
@@ -2942,6 +2953,7 @@
#endif
int rc = 0;
int ttyfd = -1;
+ Bool ok_termcap;
#ifdef TERMIO_STRUCT
TERMIO_STRUCT tio;
@@ -3205,13 +3217,16 @@
* the program to proceed (but not to set $TERMCAP) if the termcap
* entry is not found.
*/
+ ok_termcap = True;
if (!get_termcap(TermName = resource.term_name, ptr, newtc)) {
char *last = NULL;
TermName = *envnew;
+ ok_termcap = False;
while (*envnew != NULL) {
if ((last == NULL || strcmp(last, *envnew))
&& get_termcap(*envnew, ptr, newtc)) {
TermName = *envnew;
+ ok_termcap = True;
break;
}
last = *envnew;
@@ -3226,7 +3241,7 @@
#if OPT_INITIAL_ERASE
TRACE(("resource ptyInitialErase is %sset\n",
resource.ptyInitialErase ? "" : "not "));
- if (!resource.ptyInitialErase) {
+ if (!resource.ptyInitialErase && ok_termcap) {
char temp[1024], *p = temp;
char *s = tgetstr(TERMCAP_ERASE, &p);
TRACE(("...extracting initial_erase value from termcap\n"));
@@ -3309,7 +3324,7 @@
#else
int pgrp = getpid();
#endif
- TRACE_CHILD
+ TRACE_CHILD;
#ifdef USE_USG_PTYS
#ifdef USE_ISPTS_FLAG
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/xterm-216/misc.c new/xterm-217/misc.c
--- old/xterm-216/misc.c 2006-08-04 01:54:32.000000000 +0200
+++ new/xterm-217/misc.c 2006-08-15 01:32:46.000000000 +0200
@@ -1,4 +1,4 @@
-/* $XTermId: misc.c,v 1.314 2006/08/03 23:54:32 tom Exp $ */
+/* $XTermId: misc.c,v 1.317 2006/08/14 23:32:46 tom Exp $ */
/* $XFree86: xc/programs/xterm/misc.c,v 3.107 2006/06/19 00:36:51 dickey Exp $ */
@@ -396,8 +396,8 @@
XFocusChangeEvent *event = (XFocusChangeEvent *) ev;
TScreen *screen = &term->screen;
- TRACE(("HandleFocusChange type=%d, mode=%d, detail=%d\n",
- event->type,
+ TRACE(("HandleFocusChange type=%s, mode=%d, detail=%d\n",
+ visibleEventType(event->type),
event->mode,
event->detail));
@@ -450,7 +450,6 @@
screen->select |= flag;
if (!Ttoggled)
TCursorToggle(TOGGLE);
- return;
} else
#endif
{
@@ -462,7 +461,6 @@
screen->select |= flag;
if (screen->cursor_state)
ShowCursor();
- return;
}
}
@@ -471,26 +469,26 @@
{
TRACE(("unselectwindow(%d) flag=%d\n", screen->select, flag));
- if (screen->always_highlight)
- return;
-
+ if (!screen->always_highlight) {
#if OPT_TEK4014
- if (screen->TekEmu) {
- if (!Ttoggled)
- TCursorToggle(TOGGLE);
- screen->select &= ~flag;
- if (!Ttoggled)
- TCursorToggle(TOGGLE);
- } else
+ if (screen->TekEmu) {
+ if (!Ttoggled)
+ TCursorToggle(TOGGLE);
+ screen->select &= ~flag;
+ if (!Ttoggled)
+ TCursorToggle(TOGGLE);
+ } else
#endif
- {
- if (screen->xic)
- XUnsetICFocus(screen->xic);
- screen->select &= ~flag;
- if (screen->cursor_state && CursorMoved(screen))
- HideCursor();
- if (screen->cursor_state)
- ShowCursor();
+ {
+ if (screen->xic)
+ XUnsetICFocus(screen->xic);
+
+ screen->select &= ~flag;
+ if (screen->cursor_state && CursorMoved(screen))
+ HideCursor();
+ if (screen->cursor_state)
+ ShowCursor();
+ }
}
}
@@ -1777,6 +1775,7 @@
#endif /* ALLOWLOGGING */
case 50:
+#if OPT_SHIFT_FONTS
if (buf != 0 && !strcmp(buf, "?")) {
int num = screen->menu_font_number;
@@ -1837,6 +1836,7 @@
fonts.f_n = buf;
SetVTFont(xw, fontMenu_fontescape, True, &fonts);
}
+#endif /* OPT_SHIFT_FONTS */
break;
case 51:
/* reserved for Emacs shell (Rob Mayoff