MANIFEST | 2 VTPrsTbl.c | 7 cachedGCs.c | 62 ++++---- charsets.c | 63 ++++---- debian/changelog | 5 debian/local/xterm.faq.html | 9 - doublechr.c | 62 ++++---- fontutils.c | 329 +++++++++++++++++++++++++------------------- fontutils.h | 64 ++++---- linedata.c | 62 ++++---- main.c | 233 +++++++++++++------------------ main.h | 8 - menu.c | 20 ++ misc.c | 80 +++++++--- package/debian/changelog | 12 + package/xterm.spec | 4 print.c | 62 ++++---- ptydata.c | 62 ++++---- resize.c | 41 +++-- resize.man | 25 ++- scrollback.c | 62 ++++---- tabs.c | 5 testxmc.c | 62 ++++---- trace.c | 13 - trace.h | 3 util.c | 22 ++ version.h | 19 +- xstrings.c | 175 ++++++++++++++++++----- xstrings.h | 68 ++++----- xterm.h | 65 ++++---- xterm.log.html | 64 ++++++++ xterm.man | 11 - xtermcap.h | 62 ++++---- xtermcfg.hin | 62 ++++---- xutf8.c | 43 ++--- 35 files changed, 1106 insertions(+), 842 deletions(-)
New commits: commit cdee710295c2fe4e440f8c4d8637a177df873bd7 Author: Julien Cristau <jcris...@debian.org> Date: Sat Oct 15 19:38:46 2011 +0200 Upload to unstable diff --git a/debian/changelog b/debian/changelog index d1f55ce..375e257 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -xterm (276-1) UNRELEASED; urgency=low +xterm (276-1) unstable; urgency=low [ Timo Aaltonen ] * Install .desktop files again. (Closes: #486317, LP: #129041) @@ -21,7 +21,7 @@ xterm (276-1) UNRELEASED; urgency=low - Disable rmm and smm features in xterm terminfo entry to match the behavior in ncurses-base (see #574396). - -- Julien Cristau <jcris...@debian.org> Sat, 15 Oct 2011 19:36:10 +0200 + -- Julien Cristau <jcris...@debian.org> Sat, 15 Oct 2011 19:38:42 +0200 xterm (271-1) unstable; urgency=low commit 0f6ec6e99e763055a791c05794f532772f5d52d2 Author: Julien Cristau <jcris...@debian.org> Date: Sat Oct 15 19:38:40 2011 +0200 Update copy of XTerm FAQ to revision 1.168 (dated 2011/09/12). diff --git a/debian/changelog b/debian/changelog index 5b6f8d9..d1f55ce 100644 --- a/debian/changelog +++ b/debian/changelog @@ -13,6 +13,7 @@ xterm (276-1) UNRELEASED; urgency=low * Update 900_debian_xterm.diff to only edit the new xterm+kbs fragment in both terminfo and termcap instead of adding an xterm-debian variant to change the backspace key behaviour. + * Update copy of XTerm FAQ to revision 1.168 (dated 2011/09/12). [ Sven Joachim ] * Update 900_debian_xterm.diff: diff --git a/debian/local/xterm.faq.html b/debian/local/xterm.faq.html index d2fa477..a5593aa 100644 --- a/debian/local/xterm.faq.html +++ b/debian/local/xterm.faq.html @@ -1,7 +1,7 @@ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <!-- ***************************************************************************** - * Copyright 1997-2009,2010 by Thomas E. Dickey * + * Copyright 1997-2010,2011 by Thomas E. Dickey * * All Rights Reserved. * * * * Permission to use, copy, modify, and distribute this software and its * @@ -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.faq.html,v 1.167 2010/11/25 14:10:03 tom Exp $ + $XTermId: xterm.faq.html,v 1.168 2011/09/12 08:37:53 tom Exp $ --> <HTML> <HEAD> @@ -30,7 +30,8 @@ </HEAD> <BODY> <HR> -Copyright 1997-2009,2010 by Thomas E. Dickey +<a href="http://invisible-island.net/">http://invisible-island.net/</a><a href="http://invisible-island.net/xterm/">xterm/</a><br> +Copyright © 1997-2010,2011 by Thomas E. Dickey <HR> <a href="http://invisible-island.net/xterm/xterm.faq.html">Here</a> is the latest version of this file. @@ -1631,7 +1632,7 @@ which would not affect the home/end keys. which I tested with xterm-88c, xterm-149 and xterm-158, using $TERM set to xterm-debian: <!--{{atr2html--><p style="font-family: monospace; font-size: 10pt;"> -<font color="#800000">! $Id: xterm.faq.html,v 1.167 2010/11/25 14:10:03 tom Exp $<br> +<font color="#800000">! $Id: xterm.faq.html,v 1.168 2011/09/12 08:37:53 tom Exp $<br> </font><font color="#800000">! Settings to make xterm-88c work as expected for Debian.<br> </font><font color="#800000">!<br> </font><font color="#800000">! Patch #88 was the basis for XFree86 3.3.1 xterm. There were a few additions<br> commit ec614dfb2e9976aa769162322d366c111b9dcbeb Author: Julien Cristau <jcris...@debian.org> Date: Sat Oct 15 19:36:40 2011 +0200 Bump changelog diff --git a/debian/changelog b/debian/changelog index f3b052b..5b6f8d9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -xterm (274-1) UNRELEASED; urgency=low +xterm (276-1) UNRELEASED; urgency=low [ Timo Aaltonen ] * Install .desktop files again. (Closes: #486317, LP: #129041) @@ -20,7 +20,7 @@ xterm (274-1) UNRELEASED; urgency=low - Disable rmm and smm features in xterm terminfo entry to match the behavior in ncurses-base (see #574396). - -- Julien Cristau <jcris...@debian.org> Wed, 07 Sep 2011 20:52:57 +0200 + -- Julien Cristau <jcris...@debian.org> Sat, 15 Oct 2011 19:36:10 +0200 xterm (271-1) unstable; urgency=low commit ac8d0db086bba2551cd863d5eba1075a9e5a3a8a Author: Julien Cristau <jcris...@debian.org> Date: Sat Oct 15 19:33:22 2011 +0200 Imported Upstream version 276 diff --git a/MANIFEST b/MANIFEST index d941673..b17561b 100644 --- a/MANIFEST +++ b/MANIFEST @@ -1,4 +1,4 @@ -MANIFEST for xterm-275, version xterm-275 +MANIFEST for xterm-276, version xterm-276 -------------------------------------------------------------------------------- MANIFEST this file 256colres.h resource-definitions for 256-color mode diff --git a/fontutils.c b/fontutils.c index b22d634..a689b91 100644 --- a/fontutils.c +++ b/fontutils.c @@ -1,4 +1,4 @@ -/* $XTermId: fontutils.c,v 1.368 2011/09/11 13:22:34 tom Exp $ */ +/* $XTermId: fontutils.c,v 1.378 2011/10/10 23:46:00 tom Exp $ */ /* * Copyright 1998-2010,2011 by Thomas E. Dickey @@ -52,7 +52,7 @@ #include <ctype.h> #define SetFontWidth(screen,dst,src) (dst)->f_width = (src) -#define SetFontHeight(screen,dst,src) (dst)->f_height = (int)((screen)->scale_height * (float) (src)) +#define SetFontHeight(screen,dst,src) (dst)->f_height = dimRound((screen)->scale_height * (float) (src)) /* from X11/Xlibint.h - not all vendors install this file */ #define CI_NONEXISTCHAR(cs) (((cs)->width == 0) && \ @@ -116,8 +116,12 @@ typedef struct { char *end; } FontNameProperties; +#if OPT_RENDERFONT +static void fillInFaceSize(XtermWidget, int); +#endif + #if OPT_SHIFT_FONTS -static void lookupOneFontSize(XtermWidget, int); +static int lookupOneFontSize(XtermWidget, int); #endif #if OPT_WIDE_CHARS @@ -1256,6 +1260,25 @@ xtermLoadFont(XtermWidget xw, bad: if (tmpname) free(tmpname); + +#if OPT_RENDERFONT + if (x_strcasecmp(myfonts.f_n, DEFFONT)) { + int code; + + myfonts.f_n = DEFFONT; + TRACE(("...recovering for TrueType fonts\n")); + code = xtermLoadFont(xw, &myfonts, doresize, fontnum); + if (code) { + SetItemSensitivity(fontMenuEntries[fontnum].widget, + UsingRenderFont(xw)); + TRACE(("...recovered size %dx%d\n", + FontHeight(screen), + FontWidth(screen))); + } + return code; + } +#endif + releaseWindowGCs(xw, win); xtermCloseFonts(xw, fnts); @@ -1744,7 +1767,7 @@ xtermOpenXft(XtermWidget xw, const char *name, XftPattern * pat, const char *tag * (Newton Raphson). */ static double -mySquareRoot(double value) +dimSquareRoot(double value) { double result = 0.0; if (value > 0.0) { @@ -1863,18 +1886,22 @@ setFaceName(XtermWidget xw, const char *value) { TScreen *screen = TScreenOf(xw); int n; + Boolean changed = ((xw->misc.face_name == 0) + || strcmp(xw->misc.face_name, value)); - xw->misc.face_name = x_strdup(value); - for (n = 0; n < NMENUFONTS; ++n) { - xw->misc.face_size[n] = -1.0; - xtermCloseXft(screen, &(screen->renderFontNorm[n])); - xtermCloseXft(screen, &(screen->renderFontBold[n])); - xtermCloseXft(screen, &(screen->renderFontBold[n])); + if (changed) { + xw->misc.face_name = x_strdup(value); + for (n = 0; n < NMENUFONTS; ++n) { + xw->misc.face_size[n] = -1.0; + xtermCloseXft(screen, &(screen->renderFontNorm[n])); + xtermCloseXft(screen, &(screen->renderFontBold[n])); + xtermCloseXft(screen, &(screen->renderFontBold[n])); #if OPT_RENDERWIDE - xtermCloseXft(screen, &(screen->renderWideNorm[n])); - xtermCloseXft(screen, &(screen->renderWideBold[n])); - xtermCloseXft(screen, &(screen->renderWideItal[n])); + xtermCloseXft(screen, &(screen->renderWideNorm[n])); + xtermCloseXft(screen, &(screen->renderWideBold[n])); + xtermCloseXft(screen, &(screen->renderWideItal[n])); #endif + } } } #endif @@ -1916,66 +1943,14 @@ xtermComputeFontInfo(XtermWidget xw, if (norm == 0 && face_name) { XftPattern *pat; - double face_size = xw->misc.face_size[fontnum]; + double face_size; - TRACE(("xtermComputeFontInfo font %d: norm(face %s, size %f)\n", + TRACE(("xtermComputeFontInfo font %d: norm(face %s, size %.1f)\n", fontnum, face_name, xw->misc.face_size[fontnum])); - if (face_size <= 0.0) { -#if OPT_SHIFT_FONTS - /* - * 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(xw, 0); - lookupOneFontSize(xw, fontnum); - if (fontnum == fontMenu_default) { - face_size = 14.0; - } else { - double ratio; - long num = screen->menu_font_sizes[fontnum]; - long den = screen->menu_font_sizes[0]; - - if (den <= 0) - den = 1; - ratio = mySquareRoot((double) num / (double) den); - - face_size = (ratio * xw->misc.face_size[0]); - TRACE(("scaled using %3ld/%ld = %.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] = (float) face_size; - } + fillInFaceSize(xw, fontnum); + face_size = xw->misc.face_size[fontnum]; /* * By observation (there is no documentation), XftPatternBuild is @@ -2742,7 +2717,7 @@ dec2ucs(unsigned ch) #endif /* OPT_WIDE_CHARS */ #if OPT_SHIFT_FONTS -static void +static int lookupOneFontSize(XtermWidget xw, int fontnum) { TScreen *screen = TScreenOf(xw); @@ -2752,13 +2727,23 @@ lookupOneFontSize(XtermWidget xw, int fontnum) memset(&fnt, 0, sizeof(fnt)); screen->menu_font_sizes[fontnum] = -1; - if (xtermOpenFont(xw, screen->MenuFontName(fontnum), &fnt, fwAlways, True)) { + if (xtermOpenFont(xw, + screen->MenuFontName(fontnum), + &fnt, + ((fontnum <= fontMenu_lastBuiltin) + ? fwAlways + : fwResource), + True)) { if (fontnum <= fontMenu_lastBuiltin - || strcmp(fnt.fn, DEFFONT)) + || strcmp(fnt.fn, DEFFONT)) { screen->menu_font_sizes[fontnum] = FontSize(fnt.fs); + if (screen->menu_font_sizes[fontnum] <= 0) + screen->menu_font_sizes[fontnum] = -1; + } xtermCloseFont(xw, &fnt); } } + return (screen->menu_font_sizes[fontnum] > 0); } /* @@ -2770,32 +2755,110 @@ lookupFontSizes(XtermWidget xw) int n; for (n = 0; n < NMENUFONTS; n++) { - lookupOneFontSize(xw, n); + (void) lookupOneFontSize(xw, n); } } #if OPT_RENDERFONT -#define NMENU_RENDERFONTS (NMENUFONTS - 2) /* no selection or escape */ +static void +fillInFaceSize(XtermWidget xw, int fontnum) +{ + TScreen *screen = TScreenOf(xw); + float value; + double 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 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. + */ + (void) lookupOneFontSize(xw, 0); + if (fontnum == fontMenu_default) { + sscanf(DEFFACESIZE, "%f", &value); + face_size = value; + } else if (lookupOneFontSize(xw, fontnum) + && (screen->menu_font_sizes[0] + != screen->menu_font_sizes[fontnum])) { + double ratio; + long num = screen->menu_font_sizes[fontnum]; + long den = screen->menu_font_sizes[0]; + + if (den <= 0) + den = 1; + ratio = dimSquareRoot((double) num / (double) den); + + face_size = (ratio * xw->misc.face_size[0]); + TRACE(("scaled[%d] using %3ld/%ld = %.2f -> %f\n", + fontnum, num, den, ratio, face_size)); + } else +#endif + { +#define LikeBitmap(s) (((s) / 78.0) * xw->misc.face_size[fontMenu_default]) + switch (fontnum) { + case fontMenu_font1: + face_size = LikeBitmap(2.0); + break; + case fontMenu_font2: + face_size = LikeBitmap(35.0); + break; + case fontMenu_font3: + face_size = LikeBitmap(60.0); + break; + default: + sscanf(DEFFACESIZE, "%f", &value); + face_size = value; + break; + case fontMenu_font4: + face_size = LikeBitmap(90.0); + break; + case fontMenu_font5: + face_size = LikeBitmap(135.0); + break; + case fontMenu_font6: + face_size = LikeBitmap(200.0); + break; + } + TRACE(("builtin[%d] -> %f\n", fontnum, face_size)); + } + xw->misc.face_size[fontnum] = (float) face_size; + } +} + +/* no selection or escape */ +#define NMENU_RENDERFONTS (fontMenu_lastBuiltin + 1) + +/* + * Workaround for breakage in font-packages - check if all of the bitmap font + * sizes are the same, and if we're using TrueType fonts. + */ static Boolean useFaceSizes(XtermWidget xw) { Boolean result = False; int n; + TRACE(("useFaceSizes {{\n")); if (UsingRenderFont(xw)) { - result = True; + Boolean nonzero = True; + for (n = 0; n < NMENU_RENDERFONTS; ++n) { if (xw->misc.face_size[n] <= 0.0) { - result = False; + nonzero = False; break; } } - if (!result) { + if (!nonzero) { Boolean broken_fonts = True; TScreen *screen = TScreenOf(xw); - long first = screen->menu_font_sizes[0]; + long first; lookupFontSizes(xw); + first = screen->menu_font_sizes[0]; for (n = 0; n < NMENUFONTS; n++) { if (screen->menu_font_sizes[n] > 0 && screen->menu_font_sizes[n] != first) { @@ -2804,46 +2867,21 @@ useFaceSizes(XtermWidget xw) } } - /* - * Workaround for breakage in font-packages - check if all of the - * bitmap font sizes are the same, and if we're using TrueType - * fonts. - */ if (broken_fonts) { - float lo_value = (float) 9.0e9; - float hi_value = (float) 0.0; - float value; TRACE(("bitmap fonts are broken - set faceSize resources\n")); for (n = 0; n < NMENUFONTS; n++) { - value = xw->misc.face_size[n]; - if (value > 0.0) { - if (lo_value > value) - lo_value = value; - if (hi_value < value) - hi_value = value; - } + fillInFaceSize(xw, n); } - if (hi_value <= 0.0) - sscanf(DEFFACESIZE, "%f", &value); - else - value = (float) ((hi_value + lo_value) / 2.0); - if (value <= 0) - value = (float) 14.0; - - for (n = 0; n < NMENUFONTS; n++) { - TRACE(("setting faceSize%d %.1f\n", n, value)); - xw->misc.face_size[n] = value; - value = (float) (value * 1.1); - } - result = True; } } + result = True; } + TRACE(("...}}useFaceSizes %d\n", result)); return result; } -#endif +#endif /* OPT_RENDERFONT */ /* * Find the index of a larger/smaller font (according to the sign of 'relative' @@ -2862,6 +2900,7 @@ lookupRelativeFontSize(XtermWidget xw, int old, int relative) TRACE(("...using FaceSize\n")); if (relative != 0) { for (n = 0; n < NMENU_RENDERFONTS; ++n) { + fillInFaceSize(xw, n); if (xw->misc.face_size[n] > 0 && xw->misc.face_size[n] != xw->misc.face_size[old]) { int cmp_0 = ((xw->misc.face_size[n] > diff --git a/main.c b/main.c index 3bc3e96..48143b7 100644 --- a/main.c +++ b/main.c @@ -1,4 +1,4 @@ -/* $XTermId: main.c,v 1.667 2011/09/11 21:02:37 tom Exp $ */ +/* $XTermId: main.c,v 1.669 2011/10/09 14:14:51 tom Exp $ */ /* * Copyright 2002-2010,2011 by Thomas E. Dickey @@ -1397,7 +1397,7 @@ countArg(XrmOptionDescRec * item) return result; } -#define isOption(string) ((string)[0] == '-' || (string)[0] == '+') +#define isOption(string) (Boolean)((string)[0] == '-' || (string)[0] == '+') /* * Parse the argument list, more/less as XtInitialize, etc., would do, so we @@ -1454,36 +1454,37 @@ parseArg(int *num, char **argv, char **valuep) Boolean exact = False; int ambiguous1 = -1; int ambiguous2 = -1; + char *option; + char *value; #define ITEM(n) ((Cardinal)(n) < XtNumber(optionDescList) \ ? &optionDescList[n] \ : &opTable[(Cardinal)(n) - XtNumber(optionDescList)]) - if (argv[*num] != 0) { + if ((option = argv[*num]) != 0) { Boolean need_value; Boolean have_value = False; - TRACE(("parseArg %s\n", argv[*num])); - if (argv[(*num) + 1] != 0) { - char *value = argv[(*num) + 1]; + TRACE(("parseArg %s\n", option)); + if ((value = argv[(*num) + 1]) != 0) { have_value = (Boolean) ! isOption(value); } for (inlist = 0; inlist < limit; ++inlist) { XrmOptionDescRec *check = ITEM(inlist); - test = matchArg(check, argv[*num]); + test = matchArg(check, option); if (test < 0) continue; /* check for exact match */ if ((test + 1) == (int) strlen(check->option)) { if (check->argKind == XrmoptionStickyArg) { - if (strlen(argv[*num]) > strlen(check->option)) { + if (strlen(option) > strlen(check->option)) { exact = True; atbest = (int) inlist; break; } - } else if ((test + 1) == (int) strlen(argv[*num])) { + } else if ((test + 1) == (int) strlen(option)) { exact = True; atbest = (int) inlist; break; @@ -1492,7 +1493,9 @@ parseArg(int *num, char **argv, char **valuep) need_value = (Boolean) (test > 0 && countArg(check) > 0); - if (need_value ^ have_value) { + if (need_value && value != 0) { + ; + } else if (need_value ^ have_value) { TRACE(("...skipping, need %d vs have %d\n", need_value, have_value)); continue; } diff --git a/main.h b/main.h index f90d7f4..280c54e 100644 --- a/main.h +++ b/main.h @@ -1,7 +1,7 @@ -/* $XTermId: main.h,v 1.54 2010/06/20 20:22:32 tom Exp $ */ +/* $XTermId: main.h,v 1.56 2011/10/07 01:01:33 tom Exp $ */ /* - * Copyright 2000-2009,2010 by Thomas E. Dickey + * Copyright 2000-2010,2011 by Thomas E. Dickey * * All Rights Reserved * @@ -95,10 +95,6 @@ #define DEFFACESIZE "14.0" #endif -#ifndef DEFFACESIZE -#define DEFFACESIZE_AUTO "8.0" -#endif - #ifndef DEF_ALLOW_COLOR #define DEF_ALLOW_COLOR True #endif diff --git a/menu.c b/menu.c index b064a72..c66b63f 100644 --- a/menu.c +++ b/menu.c @@ -1,4 +1,4 @@ -/* $XTermId: menu.c,v 1.297 2011/09/11 13:15:18 tom Exp $ */ +/* $XTermId: menu.c,v 1.300 2011/10/09 14:14:23 tom Exp $ */ /* * Copyright 1999-2010,2011 by Thomas E. Dickey @@ -2566,6 +2566,19 @@ HandleFontLoading(Widget w, #endif #if OPT_RENDERFONT +static void +update_fontmenu(XtermWidget xw) +{ + TScreen *screen = TScreenOf(xw); + int n; + + for (n = 0; n <= fontMenu_lastBuiltin; ++n) { + Boolean active = (Boolean) (xw->misc.render_font || + (screen->menu_font_sizes[n] >= 0)); + SetItemSensitivity(fontMenuEntries[n].widget, active); + } +} + void HandleRenderFont(Widget w, XEvent * event GCC_UNUSED, @@ -2578,6 +2591,8 @@ HandleRenderFont(Widget w, handle_vt_toggle(do_font_renderfont, xw->misc.render_font, params, *param_count, w); + + update_fontmenu(xw); } #endif @@ -3519,6 +3534,7 @@ update_font_renderfont(void) (term->misc.render_font == True)); SetItemSensitivity(fontMenuEntries[fontMenu_render_font].widget, !IsEmpty(term->misc.face_name)); + update_fontmenu(term); } #endif diff --git a/misc.c b/misc.c index 50dd097..d2c1717 100644 --- a/misc.c +++ b/misc.c @@ -1,4 +1,4 @@ -/* $XTermId: misc.c,v 1.548 2011/09/11 20:18:45 tom Exp $ */ +/* $XTermId: misc.c,v 1.550 2011/10/09 14:13:41 tom Exp $ */ /* * Copyright 1999-2010,2011 by Thomas E. Dickey @@ -4318,6 +4318,9 @@ Cleanup(int code) } #ifndef VMS +#ifndef PATH_MAX +#define PATH_MAX 512 /* ... is not defined consistently in Xos.h */ +#endif char * xtermFindShell(char *leaf, Bool warning) { @@ -4327,7 +4330,21 @@ xtermFindShell(char *leaf, Bool warning) char *result = leaf; TRACE(("xtermFindShell(%s)\n", leaf)); - if (*result != '\0' && strchr("+/-", *result) == 0) { + + if (!strncmp("./", result, (size_t) 2) + || !strncmp("../", result, (size_t) 3)) { + size_t need = PATH_MAX; + size_t used = strlen(result) + 2; + char *buffer = malloc(used + need); + if (buffer != 0) { + if (getcwd(buffer, need) != 0) { + sprintf(buffer + strlen(buffer), "/%s", result); + result = buffer; + } else { + free(buffer); + } + } + } else if (*result != '\0' && strchr("+/-", *result) == 0) { /* find it in $PATH */ if ((s = x_getenv("PATH")) != 0) { if ((tmp = TypeMallocN(char, strlen(leaf) + strlen(s) + 2)) != 0) { diff --git a/package/debian/changelog b/package/debian/changelog index 8cf2248..869a49b 100644 --- a/package/debian/changelog +++ b/package/debian/changelog @@ -1,3 +1,9 @@ +xterm-dev (276) unstable; urgency=low + + * Regressions in #272, #274. + + -- Thomas E. Dickey <dic...@invisible-island.net> Wed, 28 Sep 2011 17:34:20 -0400 + xterm-dev (275) unstable; urgency=low * Regressions in #272, #274. diff --git a/package/xterm.spec b/package/xterm.spec index c710495..c756681 100644 --- a/package/xterm.spec +++ b/package/xterm.spec @@ -1,7 +1,7 @@ -# $XTermId: xterm.spec,v 1.17 2011/09/11 13:46:07 tom Exp $ +# $XTermId: xterm.spec,v 1.18 2011/09/28 21:33:43 tom Exp $ Summary: A text-based Web browser Name: xterm-dev -Version: 275 +Version: 276 Release: 1 License: X11 Group: Applications/Internet diff --git a/trace.c b/trace.c index 6a6fbb7..c43b5f8 100644 --- a/trace.c +++ b/trace.c @@ -1,4 +1,4 @@ -/* $XTermId: trace.c,v 1.131 2011/09/11 14:59:35 tom Exp $ */ +/* $XTermId: trace.c,v 1.132 2011/10/07 09:40:46 tom Exp $ */ /* * Copyright 1997-2010,2011 by Thomas E. Dickey @@ -106,9 +106,11 @@ Trace(const char *fmt,...) fprintf(trace_fp, "%s\n", xtermVersion()); TraceIds(NULL, 0); } + if (!trace_fp) { + fprintf(stderr, "Cannot open \"%s\"\n", name); + exit(EXIT_FAILURE); + } } - if (!trace_fp) - abort(); va_start(ap, fmt); vfprintf(trace_fp, fmt, ap); diff --git a/util.c b/util.c index ca6d480..ec10f0c 100644 --- a/util.c +++ b/util.c @@ -1,4 +1,4 @@ -/* $XTermId: util.c,v 1.546 2011/08/31 00:10:07 tom Exp $ */ +/* $XTermId: util.c,v 1.548 2011/10/09 22:10:45 tom Exp $ */ /* * Copyright 1999-2010,2011 by Thomas E. Dickey @@ -2607,11 +2607,14 @@ xtermSetClipRectangles(Display * dpy, #define beginXftClipping(screen,px,py,plength) \ if (screen->use_clipping && (FontWidth(screen) > 2)) { \ XRectangle clip; \ + double adds = (screen->scale_height - 1.0) * FontHeight(screen); \ + int height = dimRound(adds + FontHeight(screen)); \ + int descnt = dimRound(adds / 2.0) + FontDescent(screen); \ int clip_x = px; \ - int clip_y = py - FontHeight(screen) + FontDescent(screen); \ + int clip_y = py - height + descnt; \ clip.x = 0; \ clip.y = 0; \ - clip.height = (unsigned short) (FontHeight(screen)); \ + clip.height = (unsigned short) height; \ clip.width = (unsigned short) (FontWidth(screen) * plength); \ XftDrawSetClipRectangles (screen->renderDraw, \ clip_x, clip_y, \ @@ -4014,3 +4017,16 @@ extendedBoolean(const char *value, FlagList * table, Cardinal limit) TRACE(("extendedBoolean(%s) = %d\n", value, result)); return result; } + +/* + * Something like round() from math library, but round() is less widely-used + * than xterm. Also, there are no negative numbers to complicate this. + */ +int +dimRound(double value) +{ + int result = (int) value; + if (result < value) + ++result; + return result; +} diff --git a/version.h b/version.h index f74acfe..abc5164 100644 --- a/version.h +++ b/version.h @@ -1,4 +1,4 @@ -/* $XTermId: version.h,v 1.334 2011/09/11 14:59:33 tom Exp $ */ +/* $XTermId: version.h,v 1.335 2011/09/28 20:56:08 tom Exp $ */ /* * Copyright 1998-2010,2011 by Thomas E. Dickey @@ -36,7 +36,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 275 +#define XTERM_PATCH 276 #ifndef __vendorversion__ #define __vendorversion__ "XTerm" diff --git a/xterm.h b/xterm.h index 8e7d763..0613ed2 100644 --- a/xterm.h +++ b/xterm.h @@ -1,4 +1,4 @@ -/* $XTermId: xterm.h,v 1.661 2011/09/11 14:59:22 tom Exp $ */ +/* $XTermId: xterm.h,v 1.662 2011/10/09 21:58:44 tom Exp $ */ /* * Copyright 1999-2010,2011 by Thomas E. Dickey @@ -1225,6 +1225,7 @@ extern GC updatedXtermGC (XtermWidget /* xw */, unsigned /* flags */, unsigned extern int AddToRefresh (XtermWidget /* xw */); extern int ClearInLine (XtermWidget /* xw */, int /* row */, int /* col */, unsigned /* len */); extern int HandleExposure (XtermWidget /* xw */, XEvent * /* event */); +extern int dimRound (double /* value */); extern int drawXtermText (XtermWidget /* xw */, unsigned /* flags */, GC /* gc */, int /* x */, int /* y */, int /* chrset */, IChar * /* text */, Cardinal /* len */, int /* on_wide */); extern int extendedBoolean(const char * /* value */, FlagList * /* table */, Cardinal /* limit */); extern void ChangeColors (XtermWidget /* xw */, ScrnColors * /* pNew */); diff --git a/xterm.log.html b/xterm.log.html index a1b7127..bfd3614 100644 --- a/xterm.log.html +++ b/xterm.log.html @@ -31,7 +31,7 @@ * sale, use or other dealings in this Software without prior written * * authorization. * ***************************************************************************** - $XTermId: xterm.log.html,v 1.1101 2011/09/12 00:50:25 tom Exp $ + $XTermId: xterm.log.html,v 1.1107 2011/10/11 00:55:31 tom Exp $ --> <HTML> <HEAD> @@ -58,6 +58,7 @@ Most of these are summarized in the XFree86 CHANGELOG is the latest version of this file. <UL> +<LI><A HREF="#xterm_276">Patch #276 - 2011/10/10</A> <LI><A HREF="#xterm_275">Patch #275 - 2011/09/11</A> <LI><A HREF="#xterm_274">Patch #274 - 2011/09/05</A> <LI><A HREF="#xterm_273">Patch #273 - 2011/08/25</A> @@ -336,6 +337,27 @@ is the latest version of this file. <LI><A HREF="#xterm_01">Patch #1 - 1996/1/6</A> </UL> +<H1><A NAME="xterm_276">Patch #276 - 2011/10/10</A></H1> +<ul> + <li>modify clipping limits for TrueType fonts to account for the + <code>scaleHeight</code> resource setting, to work around another + problem due to recent FreeType changes. In this case, the + <code>DejaVu Sans Mono</code> set to pixelsize=13.5 + is truncated because the font descent is reduced by FreeType to + match an incorrect height metric (report by Adam Lee). + + <li>improve recovery when bitmap fonts are not installed, e.g., so + that switching font-sizes works for TrueType fonts. + + <li>modify lookup for <code>XTERM_SHELL</code> feature to allow + relative pathnames. + + <li>modify abbreviation disambiguation check + for command-line parameters to account for <code>-geometry</code>, + whose parameter may begin with "+" or "-" + (report by Scott Bertilson). +</ul> + <H1><A NAME="xterm_275">Patch #275 - 2011/09/11</A></H1> <ul> <li>add <code>ash</code>, <code>zsh</code> to known shells for diff --git a/xterm.man b/xterm.man index 2852b59..d144f98 100644 --- a/xterm.man +++ b/xterm.man @@ -1,5 +1,5 @@ '\" t -.\" $XTermId: xterm.man,v 1.510 2011/09/04 23:54:12 tom Exp $ +.\" $XTermId: xterm.man,v 1.511 2011/10/03 22:23:26 tom Exp $ .\" .\" Copyright 1996-2010,2011 by Thomas E. Dickey .\" @@ -267,9 +267,10 @@ Normally \fIxterm\fP checks the SHELL variable. If that is not set, \fIxterm\fP tries to use the shell program specified in the password file. If that is not set, \fIxterm\fP uses \fI/bin/sh\fP. -If the parameter names an executable file, \fIxterm\fP uses that instead. -The parameter must be an absolute path, or name a file found on the user's -PATH (and thereby construct an absolute path). +If the parameter is not a relative path, i.e., +beginning with \*(``./\*('' or \*(``../\*('', +\fIxterm\fP looks for the file in the user's PATH. +In either case, it constructs an absolute path. The \fB\-e\fP option cannot be used with this parameter since it uses all parameters following the option. .PP @@ -1410,7 +1411,7 @@ The default is \*(``true\*(''. .TP 8 .B "scaleHeight (\fPclass\fB ScaleHeight)" Scale line-height values by the resource value, -which is limited to \*(``0.9\*'' to \*(``1.5\*''. +which is limited to \*(``0.9\*('' to \*(``1.5\*(''. The default value is \*(``1.0\*('', .TP 8 .B "scoFunctionKeys (\fPclass\fB ScoFunctionKeys)" commit 3dfaa02be5920cbbf008ca79cb12d5ce52caa058 Author: Julien Cristau <jcris...@debian.org> Date: Sat Oct 15 19:33:14 2011 +0200 Imported Upstream version 275 diff --git a/MANIFEST b/MANIFEST index 470da66..d941673 100644 --- a/MANIFEST +++ b/MANIFEST @@ -1,4 +1,4 @@ -MANIFEST for xterm-274, version xterm-274 +MANIFEST for xterm-275, version xterm-275 -------------------------------------------------------------------------------- MANIFEST this file 256colres.h resource-definitions for 256-color mode diff --git a/VTPrsTbl.c b/VTPrsTbl.c index ea7f812..9c2cfdf 100644 --- a/VTPrsTbl.c +++ b/VTPrsTbl.c @@ -1,8 +1,7 @@ -/* $XTermId: VTPrsTbl.c,v 1.59 2010/08/24 21:26:42 tom Exp $ */ +/* $XTermId: VTPrsTbl.c,v 1.60 2011/09/11 15:00:46 tom Exp $ */ /* - * - * Copyright 1999-2009,2010 by Thomas E. Dickey + * Copyright 1999-2010,2011 by Thomas E. Dickey * * All Rights Reserved * @@ -54,6 +53,7 @@ */ #include <VTparse.h> +/* *INDENT-OFF* */ #if !OPT_BLINK_CURS #undef CASE_CSI_SPACE_STATE @@ -8197,3 +8197,4 @@ CASE_IGNORE, CASE_IGNORE, }; #endif /* OPT_VT52_MODE */ +/* *INDENT-ON* */ diff --git a/cachedGCs.c b/cachedGCs.c -- To UNSUBSCRIBE, email to debian-x-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/e1rf8hs-0000vv...@vasks.debian.org