MANIFEST | 2 Makefile.in | 18 Tekproc.c | 33 aclocal.m4 | 116 +- button.c | 219 ++-- charproc.c | 22 charsets.c | 8 config.guess | 32 config.sub | 18 configure | 2524 +++++++++++++++++++++++++++++---------------------------- data.h | 7 fontutils.c | 202 +++- input.c | 32 main.c | 18 menu.c | 60 - misc.c | 99 +- os2main.c | 80 + ptydata.c | 22 ptyx.h | 4 scrollbar.c | 84 - util.c | 52 - version.h | 4 xterm.h | 11 xterm.log.html | 46 - xterm.man | 64 + xtermcap.c | 6 26 files changed, 2116 insertions(+), 1667 deletions(-)
New commits: commit bed99c1828bc5d2a8f8638d88da9c18befba53e4 Author: Julien Cristau <jcris...@debian.org> Date: Tue Jan 27 23:02:55 2009 +0100 Import xterm 241 diff --git a/MANIFEST b/MANIFEST index dcfeb17..1d76918 100644 --- a/MANIFEST +++ b/MANIFEST @@ -1,4 +1,4 @@ -MANIFEST for xterm-240, version xterm-240 +MANIFEST for xterm-241, version xterm-241 -------------------------------------------------------------------------------- MANIFEST this file 256colres.h resource-definitions for 256-color mode diff --git a/charproc.c b/charproc.c index 835a378..8eb9ce8 100644 --- a/charproc.c +++ b/charproc.c @@ -1,4 +1,4 @@ -/* $XTermId: charproc.c,v 1.868 2009/01/24 15:39:08 tom Exp $ */ +/* $XTermId: charproc.c,v 1.869 2009/01/26 20:50:58 Jeff.Chua Exp $ */ /* @@ -4955,9 +4955,8 @@ VTNonMaskableEvent(Widget w GCC_UNUSED, static void VTResize(Widget w) { - XtermWidget xw; - - if ((xw = getXtermWidget(w)) != 0) { + if (XtIsRealized(w)) { + XtermWidget xw = (XtermWidget) w; ScreenResize(xw, xw->core.width, xw->core.height, &xw->flags); } } diff --git a/fontutils.c b/fontutils.c index 881533b..3a30a5a 100644 --- a/fontutils.c +++ b/fontutils.c @@ -1,4 +1,4 @@ -/* $XTermId: fontutils.c,v 1.283 2009/01/26 00:24:23 tom Exp $ */ +/* $XTermId: fontutils.c,v 1.287 2009/01/27 01:57:22 tom Exp $ */ /************************************************************ @@ -687,14 +687,21 @@ xtermOpenFont(XtermWidget xw, char *name, XTermFonts * result) Bool code = False; TScreen *screen = TScreenOf(xw); - if (name != 0 - && (result->fs = XLoadQueryFont(screen->display, name)) != 0) { - code = True; - if (EmptyFont(result->fs)) { - result = xtermCloseFont(xw, result); - code = False; - } else { - result->fn = x_strdup(name); + if (name != 0) { + if ((result->fs = XLoadQueryFont(screen->display, name)) != 0) { + code = True; + if (EmptyFont(result->fs)) { + result = xtermCloseFont(xw, result); + code = False; + } else { + result->fn = x_strdup(name); + } + } else if (strcmp(name, DEFFONT)) { +#if OPT_RENDERFONT + if (!UsingRenderFont(xw)) +#endif + fprintf(stderr, "%s: cannot load font %s\n", ProgramName, name); + code = xtermOpenFont(xw, DEFFONT, result); } } return code; @@ -2352,6 +2359,56 @@ useFaceSizes(XtermWidget xw) break; } } + if (!result) { + Boolean broken_fonts = True; + TScreen *screen = TScreenOf(xw); + int first = screen->menu_font_sizes[0]; + + lookupFontSizes(xw); + for (n = 0; n < NMENUFONTS; n++) { + if (screen->menu_font_sizes[n] > 0 + && screen->menu_font_sizes[n] != first) { + broken_fonts = False; + break; + } + } + + /* + * 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; + } + } + + 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; + } + } } return result; } diff --git a/misc.c b/misc.c index f187bde..980e483 100644 --- a/misc.c +++ b/misc.c @@ -1,4 +1,4 @@ -/* $XTermId: misc.c,v 1.395 2009/01/24 15:34:20 tom Exp $ */ +/* $XTermId: misc.c,v 1.401 2009/01/27 00:49:39 tom Exp $ */ /* * @@ -54,6 +54,7 @@ */ #include <version.h> +#include <main.h> #include <xterm.h> #include <sys/stat.h> @@ -473,12 +474,12 @@ make_hidden_cursor(XtermWidget xw) /* * Prefer nil2 (which is normally available) to "fixed" (which is supposed * to be "always" available), since it's a smaller glyph in case the - * server insists on drawing _somethng_. + * server insists on drawing _something_. */ TRACE(("Ask for nil2 font\n")); if ((fn = XLoadQueryFont(dpy, "nil2")) == 0) { TRACE(("...Ask for fixed font\n")); - fn = XLoadQueryFont(dpy, "fixed"); + fn = XLoadQueryFont(dpy, DEFFONT); } if (fn != 0) { @@ -688,7 +689,7 @@ HandleInterpret(Widget w GCC_UNUSED, { if (*param_count == 1) { char *value = params[0]; - int need = strlen(value); + int need = (int) strlen(value); int used = VTbuffer->next - VTbuffer->buffer; int have = VTbuffer->last - VTbuffer->buffer; @@ -971,7 +972,7 @@ dabbrev_prev_word(int *xp, int *yp, TScreen * screen) while ((c = dabbrev_prev_char(xp, yp, screen)) >= 0 && IS_WORD_CONSTITUENT(c)) if (abword > ab) /* store only |MAXWLEN| last chars */ - *(--abword) = c; + *(--abword) = (char) c; if (c < 0) { if (abword < ab + MAXWLEN - 1) return abword; @@ -1069,7 +1070,7 @@ HandleDabbrevExpand(Widget w, TRACE(("Handle dabbrev-expand for %p\n", w)); if ((xw = getXtermWidget(w)) != 0) { - TScreen *screen = &w->screen; + TScreen *screen = &xw->screen; if (!dabbrev_expand(screen)) Bell(XkbBI_TerminalBell, 0); } @@ -1152,9 +1153,9 @@ QueryMaximize(XtermWidget termw, unsigned *width, unsigned *height) hints.max_height)); if ((unsigned) hints.max_width < *width) - *width = hints.max_width; + *width = (unsigned) hints.max_width; if ((unsigned) hints.max_height < *height) - *height = hints.max_height; + *height = (unsigned) hints.max_height; } return 1; } @@ -1186,8 +1187,8 @@ RequestMaximize(XtermWidget termw, int maximize) screen->restore_data = True; screen->restore_x = wm_attrs.x + wm_attrs.border_width; screen->restore_y = wm_attrs.y + wm_attrs.border_width; - screen->restore_width = vshell_attrs.width; - screen->restore_height = vshell_attrs.height; + screen->restore_width = (unsigned) vshell_attrs.width; + screen->restore_height = (unsigned) vshell_attrs.height; TRACE(("HandleMaximize: save window position %d,%d size %d,%d\n", screen->restore_x, screen->restore_y, @@ -1196,9 +1197,11 @@ RequestMaximize(XtermWidget termw, int maximize) } /* subtract wm decoration dimensions */ - root_width -= ((wm_attrs.width - vshell_attrs.width) - + (wm_attrs.border_width * 2)); - root_height -= ((wm_attrs.height - vshell_attrs.height) + root_width -= + (unsigned) ((wm_attrs.width - vshell_attrs.width) + + (wm_attrs.border_width * 2)); + root_height -= + (unsigned) ((wm_attrs.height - vshell_attrs.height) + (wm_attrs.border_width * 2)); XMoveResizeWindow(screen->display, VShellWindow, @@ -2711,7 +2714,7 @@ static void parse_ansi_params(ANSI * params, char **string) { char *cp = *string; - short nparam = 0; + ParmType nparam = 0; memset(params, 0, sizeof(*params)); while (*cp != '\0') { diff --git a/version.h b/version.h index 4c0720b..0e88098 100644 --- a/version.h +++ b/version.h @@ -1,4 +1,4 @@ -/* $XTermId: version.h,v 1.296 2009/01/23 00:27:12 tom Exp $ */ +/* $XTermId: version.h,v 1.297 2009/01/26 21:22:56 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 240 +#define XTERM_PATCH 241 #ifndef __vendorversion__ #define __vendorversion__ "XTerm" diff --git a/xterm.log.html b/xterm.log.html index 2364f7a..a4f2d78 100644 --- a/xterm.log.html +++ b/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.716 2009/01/26 00:38:35 tom Exp $ + $XTermId: xterm.log.html,v 1.718 2009/01/27 00:59:07 tom Exp $ --> <HTML> <HEAD> @@ -45,6 +45,7 @@ Most of these are summarized in the XFree86 CHANGELOG is the latest version of this file. <UL> +<LI><A HREF="#xterm_241">Patch #241 - 2009/1/26</A> <LI><A HREF="#xterm_240">Patch #240 - 2009/1/25</A> <LI><A HREF="#xterm_239">Patch #239 - 2009/1/8</A> <LI><A HREF="#xterm_238">Patch #238 - 2008/12/30</A> @@ -288,6 +289,16 @@ is the latest version of this file. <LI><A HREF="#xterm_01">Patch #1 - 1996/1/6</A> </UL> +<H1><A NAME="xterm_241">Patch #241 - 2009/1/26</A></H1> +<ul> + <li>improve checks for missing bitmap fonts, fallback to "fixed" as + needed to work around broken font-packages (report by Jacek + Luczak). + + <li>fix breakage from <a href="#xterm_240">patch #240</a> changes for + <code>xtermAddInput()</code> (patches by Jeff Chua, Julien Cristau). +</ul> + <H1><A NAME="xterm_240">Patch #240 - 2009/1/25</A></H1> <ul> <li>use <code>plink.sh</code> for linking xterm (suggested by Larry commit 262fe0f371b614b0a872aedb734fd63edc0dcace Author: Julien Cristau <jcris...@debian.org> Date: Mon Jan 26 02:25:24 2009 +0100 Import xterm 240. diff --git a/MANIFEST b/MANIFEST index 9c9105a..dcfeb17 100644 --- a/MANIFEST +++ b/MANIFEST @@ -1,4 +1,4 @@ -MANIFEST for xterm-239, version xterm-239 +MANIFEST for xterm-240, version xterm-240 -------------------------------------------------------------------------------- MANIFEST this file 256colres.h resource-definitions for 256-color mode diff --git a/Makefile.in b/Makefile.in index f15ad49..62a2882 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,6 +1,6 @@ -## $XTermId: Makefile.in,v 1.155 2008/01/05 14:26:52 tom Exp $ +## $XTermId: Makefile.in,v 1.157 2009/01/25 16:39:24 tom Exp $ ## -## Copyright 2002-2006,2007 by Thomas E. Dickey +## Copyright 2002-2008,2009 by Thomas E. Dickey ## ## All Rights Reserved ## @@ -145,7 +145,7 @@ $(OBJS1) : xterm.h ptyx.h xtermcfg.h main$o resize$o screen$o : xterm_io.h xterm$x : $(OBJS1) - @echo...@$(LINK) $(LDFLAGS) -o $@ $(OBJS1) $(LIBS) $(EXTRA_LOADFLAGS) + @echo...@$(SHELL) $(srcdir)/plink.sh $(LINK) $(LDFLAGS) -o $@ $(OBJS1) $(LIBS) $(EXTRA_LOADFLAGS) resize$x : $(OBJS2) @echo...@$(SHELL) $(srcdir)/plink.sh $(LINK) $(LDFLAGS) -o $@ $(OBJS2) $(LIBS) @@ -176,6 +176,11 @@ install-full :: xterm$x resize$x $(BINDIR) @MAY_SETUID@ $(SHELL) $(srcdir)/sinstall.sh @SINSTALL_OPTS@ "$(INSTALL_PROGRAM)" xterm$x @XTERM_PATH@ $(BINDIR)/$(binary_xterm) @NOT_SETUID@ $(INSTALL_PROGRAM) xterm$x $(BINDIR)/$(binary_xterm) $(INSTALL_PROGRAM) -m 755 resize$x $(BINDIR)/$(binary_resize) + +install \ +install-bin \ +install-scripts \ +install-full :: @$(SHELL) -c 'echo "... installing $(BINDIR)/$(binary_uxterm)"; \ if test "$(binary_xterm)" != "xterm"; then \ name="$(binary_xterm)"; \ @@ -259,9 +264,14 @@ uninstall-bin \ uninstall-full :: -$(RM) $(BINDIR)/$(binary_xterm) -$(RM) $(BINDIR)/$(binary_resize) + @-$(SHELL) -c "if test @XTERM_SYMLINK@ != NONE ; then cd $(BINDIR) && rm -f @XTERM_SYMLINK@; fi" + +uninstall \ +uninstall-bin \ +uninstall-scripts \ +uninstall-full :: -$(RM) $(BINDIR)/$(binary_uxterm) -$(RM) $(BINDIR)/$(binary_k8term) - @-$(SHELL) -c "if test @XTERM_SYMLINK@ != NONE ; then cd $(BINDIR) && rm -f @XTERM_SYMLINK@; fi" uninstall \ uninstall-man \ diff --git a/Tekproc.c b/Tekproc.c index 8c99478..25eca7c 100644 --- a/Tekproc.c +++ b/Tekproc.c @@ -1,4 +1,4 @@ -/* $XTermId: Tekproc.c,v 1.160 2008/06/03 20:55:56 tom Exp $ */ +/* $XTermId: Tekproc.c,v 1.161 2009/01/26 00:19:39 tom Exp $ */ /* * Warning, there be crufty dragons here. @@ -7,7 +7,7 @@ /* -Copyright 2001-2007,2008 by Thomas E. Dickey +Copyright 2001-2008,2009 by Thomas E. Dickey All Rights Reserved @@ -146,7 +146,7 @@ in this Software without prior written authorization from The Open Group. #define TekMove(tw,x,y) tekscr->cur_X = x; tekscr->cur_Y = y #define input() Tinput(tw) -#define unput(c) *Tpushback++ = c +#define unput(c) *Tpushback++ = (Char) c /* *INDENT-OFF* */ static struct Tek_Char { int hsize; /* in Tek units */ @@ -708,7 +708,7 @@ Tekparse(TekWidget tw) case CASE_PRINT: TRACE(("case: printable character\n")); ch = c; - c = tekscr->cur.fontsize; + c = (IChar) tekscr->cur.fontsize; x = (int) (tekscr->cur_X * TekScale(tekscr)) + screen->border; y = (int) ((TEKHEIGHT + TEKTOPPAD - tekscr->cur_Y) * TekScale(tekscr)) @@ -760,7 +760,7 @@ Tekparse(TekWidget tw) if (!isprint(c2 & 0x7f) || len + 2 >= (int) sizeof(buf2)) break; - buf2[len++] = c2; + buf2[len++] = (Char) c2; } buf2[len] = 0; if (!nested++) { @@ -790,13 +790,13 @@ Tinput(TekWidget tw) return (*--Tpushback); if (tekRefreshList) { if (rcnt-- > 0) - return (*rptr++); + return (IChar) (*rptr++); if ((tek = tekRefreshList->next) != 0) { tekRefreshList = tek; rptr = tek->data; rcnt = tek->count - 1; TekSetFontSize(tw, tek->fontsize); - return (*rptr++); + return (IChar) (*rptr++); } tekRefreshList = (TekLink *) 0; longjmp(Tekjump, 1); @@ -881,7 +881,7 @@ Tinput(TekWidget tw) tek->count++; (void) morePtyData(screen, VTbuffer); - return (*tek->ptr++ = nextPtyData(screen, VTbuffer)); + return (IChar) (*tek->ptr++ = (char) nextPtyData(screen, VTbuffer)); } static void @@ -1262,12 +1262,12 @@ TekEnq(TekWidget tw, int adj = (status != 0) ? 0 : 1; TRACE(("TekEnq\n")); - cplot[0] = status; + cplot[0] = (Char) status; /* Translate x and y to Tektronix code */ - cplot[1] = 040 | ((x >> SHIFTHI) & FIVEBITS); - cplot[2] = 040 | ((x >> SHIFTLO) & FIVEBITS); - cplot[3] = 040 | ((y >> SHIFTHI) & FIVEBITS); - cplot[4] = 040 | ((y >> SHIFTLO) & FIVEBITS); + cplot[1] = (Char) (040 | ((x >> SHIFTHI) & FIVEBITS)); + cplot[2] = (Char) (040 | ((x >> SHIFTLO) & FIVEBITS)); + cplot[3] = (Char) (040 | ((y >> SHIFTHI) & FIVEBITS)); + cplot[4] = (Char) (040 | ((y >> SHIFTLO) & FIVEBITS)); if (tekscr->gin_terminator != GIN_TERM_NONE) cplot[len++] = '\r'; @@ -1519,8 +1519,8 @@ TekRealize(Widget gw, ((*valuemaskp) | CWBackPixel | CWWinGravity), values); - TFullWidth(tekscr) = width; - TFullHeight(tekscr) = height; + TFullWidth(tekscr) = (Dimension) width; + TFullHeight(tekscr) = (Dimension) height; TWidth(tekscr) = width - border; THeight(tekscr) = height - border; TekScale(tekscr) = (double) TWidth(tekscr) / TEKWIDTH; @@ -1738,9 +1738,10 @@ TekReverseVideo(TekWidget tw) TScreen *screen = TScreenOf(term); TekScreen *tekscr = TekScreenOf(tw); int i; + Pixel tmp; XGCValues gcv; - EXCHANGE(T_COLOR(screen, TEK_FG), T_COLOR(screen, TEK_BG), i); + EXCHANGE(T_COLOR(screen, TEK_FG), T_COLOR(screen, TEK_BG), tmp); T_COLOR(screen, TEK_CURSOR) = T_COLOR(screen, TEK_FG); diff --git a/aclocal.m4 b/aclocal.m4 index f75e048..2d45368 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1,10 +1,10 @@ -dnl $XTermId: aclocal.m4,v 1.254 2008/12/30 17:01:41 tom Exp $ +dnl $XTermId: aclocal.m4,v 1.257 2009/01/25 23:32:11 tom Exp $ dnl dnl $XFree86: xc/programs/xterm/aclocal.m4,v 3.65 2006/06/19 00:36:50 dickey Exp $ dnl dnl --------------------------------------------------------------------------- dnl -dnl Copyright 1997-2007,2008 by Thomas E. Dickey +dnl Copyright 1997-2008,2009 by Thomas E. Dickey dnl dnl All Rights Reserved dnl @@ -50,7 +50,7 @@ AC_DEFUN([AM_LANGINFO_CODESET], fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_ADD_CFLAGS version: 7 updated: 2004/04/25 17:48:30 +dnl CF_ADD_CFLAGS version: 8 updated: 2009/01/06 19:33:30 dnl ------------- dnl Copy non-preprocessor flags to $CFLAGS, preprocessor flags to $CPPFLAGS dnl The second parameter if given makes this macro verbose. @@ -120,7 +120,7 @@ fi if test -n "$cf_new_cppflags" ; then ifelse($2,,,[CF_VERBOSE(add to \$CPPFLAGS $cf_new_cppflags)]) - CPPFLAGS="$cf_new_cppflags $CPPFLAGS" + CPPFLAGS="$CPPFLAGS $cf_new_cppflags" fi if test -n "$cf_new_extra_cppflags" ; then @@ -1042,7 +1042,20 @@ AC_DEFUN([CF_MSG_LOG],[ echo "${as_me-configure}:__oline__: testing $* ..." 1>&AC_FD_CC ])dnl dnl --------------------------------------------------------------------------- -dnl CF_PATH_PROG version: 6 updated: 2004/01/26 20:58:41 +dnl CF_PATHSEP version: 4 updated: 2009/01/11 20:30:23 +dnl ---------- +dnl Provide a value for the $PATH and similar separator +AC_DEFUN([CF_PATHSEP], +[ + case $cf_cv_system_name in + os2*) PATH_SEPARATOR=';' ;; + *) PATH_SEPARATOR=':' ;; + esac +ifelse($1,,,[$1=$PATH_SEPARATOR]) + AC_SUBST(PATH_SEPARATOR) +])dnl +dnl --------------------------------------------------------------------------- +dnl CF_PATH_PROG version: 7 updated: 2009/01/11 20:34:16 dnl ------------ dnl Check for a given program, defining corresponding symbol. dnl $1 = environment variable, which is suffixed by "_PATH" in the #define. @@ -1055,21 +1068,13 @@ dnl dnl FIXME: we should allow this to be overridden by environment variables dnl AC_DEFUN([CF_PATH_PROG],[ +AC_REQUIRE([CF_PATHSEP]) test -z "[$]$1" && $1=$2 AC_PATH_PROGS($1,[$]$1 $2 $3,[$]$1) cf_path_prog="" cf_path_args="" -IFS="${IFS= }"; cf_save_ifs="$IFS" -case $host_os in #(vi -os2*) #(vi - IFS="${IFS};" - ;; -*) - IFS="${IFS}:" - ;; -esac - +IFS="${IFS= }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR" for cf_temp in $ac_cv_path_$1 do if test -z "$cf_path_prog" ; then @@ -1131,6 +1136,38 @@ case ".[$]$1" in #(vi esac ])dnl dnl --------------------------------------------------------------------------- +dnl CF_PKG_CONFIG version: 3 updated: 2009/01/25 10:55:09 +dnl ------------- +dnl Check for the package-config program, unless disabled by command-line. +AC_DEFUN([CF_PKG_CONFIG], +[ +AC_MSG_CHECKING(if you want to use pkg-config) +AC_ARG_WITH(pkg-config, + [ --with-pkg-config{=path} enable/disable use of pkg-config], + [cf_pkg_config=$withval], + [cf_pkg_config=yes]) +AC_MSG_RESULT($cf_pkg_config) + +case $cf_pkg_config in #(vi +no) #(vi + PKG_CONFIG=none + ;; +yes) #(vi + AC_PATH_PROG(PKG_CONFIG, pkg-config, none) + ;; +*) + PKG_CONFIG=$withval + ;; +esac + +test -z "$PKG_CONFIG" && PKG_CONFIG=none +if test "$PKG_CONFIG" != none ; then + CF_PATH_SYNTAX(PKG_CONFIG) +fi + +AC_SUBST(PKG_CONFIG) +])dnl +dnl --------------------------------------------------------------------------- dnl CF_POSIX_C_SOURCE version: 6 updated: 2005/07/14 20:25:10 dnl ----------------- dnl Define _POSIX_C_SOURCE to the given level, and _POSIX_SOURCE if needed. @@ -2460,7 +2497,7 @@ CF_X_ATHENA_CPPFLAGS($cf_x_athena) CF_X_ATHENA_LIBS($cf_x_athena) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_X_ATHENA_CPPFLAGS version: 2 updated: 2002/10/09 20:00:37 +dnl CF_X_ATHENA_CPPFLAGS version: 3 updated: 2009/01/11 15:33:39 dnl -------------------- dnl Normally invoked by CF_X_ATHENA, with $1 set to the appropriate flavor of dnl the Athena widgets, e.g., Xaw, Xaw3d, neXtaw. @@ -2479,7 +2516,7 @@ do cf_save="$CPPFLAGS" cf_test=X11/$cf_x_athena_root/SimpleMenu.h if test $cf_path != default ; then - CPPFLAGS="-I$cf_path/include $cf_save" + CPPFLAGS="$cf_save -I$cf_path/include" AC_MSG_CHECKING(for $cf_test in $cf_path) else AC_MSG_CHECKING(for $cf_test) @@ -2559,7 +2596,7 @@ CF_UPPER(cf_x_athena_LIBS,HAVE_LIB_$cf_x_athena) AC_DEFINE_UNQUOTED($cf_x_athena_LIBS) ]) dnl --------------------------------------------------------------------------- -dnl CF_X_FREETYPE version: 18 updated: 2007/03/21 18:06:17 +dnl CF_X_FREETYPE version: 21 updated: 2009/01/25 18:17:50 dnl ------------- dnl Check for X FreeType headers and libraries (XFree86 4.x, etc). dnl @@ -2574,28 +2611,29 @@ dnl --with-freetype-cflags dnl --with-freetype-libs AC_DEFUN([CF_X_FREETYPE], [ +AC_REQUIRE([CF_PKG_CONFIG]) + cf_extra_freetype_libs= -FREETYPE_CONFIG= +FREETYPE_CONFIG=none FREETYPE_PARAMS= AC_MSG_CHECKING(if you specified -D/-I options for FreeType) AC_ARG_WITH(freetype-cflags, [ --with-freetype-cflags -D/-I options for compiling with FreeType], -[cf_cv_x_freetype_incs="$with_freetype_cflags"], -[cf_cv_x_freetype_incs=no]) + [cf_cv_x_freetype_incs="$with_freetype_cflags"], + [cf_cv_x_freetype_incs=no]) AC_MSG_RESULT($cf_cv_x_freetype_incs) AC_MSG_CHECKING(if you specified -L/-l options for FreeType) AC_ARG_WITH(freetype-libs, [ --with-freetype-libs -L/-l options to link FreeType], -[cf_cv_x_freetype_libs="$with_freetype_libs"], -[cf_cv_x_freetype_libs=no]) + [cf_cv_x_freetype_libs="$with_freetype_libs"], + [cf_cv_x_freetype_libs=no]) AC_MSG_RESULT($cf_cv_x_freetype_libs) -AC_PATH_PROG(FREETYPE_PKG_CONFIG, pkg-config, none) -if test "$FREETYPE_PKG_CONFIG" != none && "$FREETYPE_PKG_CONFIG" --exists xft; then - FREETYPE_CONFIG=$FREETYPE_PKG_CONFIG +if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xft; then + FREETYPE_CONFIG=$PKG_CONFIG FREETYPE_PARAMS=xft else AC_PATH_PROG(FREETYPE_XFT_CONFIG, xft-config, none) @@ -2609,20 +2647,22 @@ else fi fi fi +AC_MSG_CHECKING(for FreeType config) +AC_MSG_RESULT($FREETYPE_CONFIG $FREETYPE_PARAMS) -if test -n "$FREETYPE_CONFIG" ; then +if test "$FREETYPE_CONFIG" != none ; then -if test "$cf_cv_x_freetype_incs" = no ; then -AC_MSG_CHECKING(for $FREETYPE_CONFIG cflags) -cf_cv_x_freetype_incs="`$FREETYPE_CONFIG $FREETYPE_PARAMS --cflags 2>/dev/null`" -AC_MSG_RESULT($cf_cv_x_freetype_incs) -fi + if test "$cf_cv_x_freetype_incs" = no ; then + AC_MSG_CHECKING(for $FREETYPE_CONFIG cflags) + cf_cv_x_freetype_incs="`$FREETYPE_CONFIG $FREETYPE_PARAMS --cflags 2>/dev/null`" + AC_MSG_RESULT($cf_cv_x_freetype_incs) + fi -if test "$cf_cv_x_freetype_libs" = no ; then -AC_MSG_CHECKING(for $FREETYPE_CONFIG libs) -cf_cv_x_freetype_libs="$cf_extra_freetype_libs `$FREETYPE_CONFIG $FREETYPE_PARAMS --libs 2>/dev/null`" -AC_MSG_RESULT($cf_cv_x_freetype_libs) -fi + if test "$cf_cv_x_freetype_libs" = no ; then + AC_MSG_CHECKING(for $FREETYPE_CONFIG libs) + cf_cv_x_freetype_libs="$cf_extra_freetype_libs `$FREETYPE_CONFIG $FREETYPE_PARAMS --libs 2>/dev/null`" + AC_MSG_RESULT($cf_cv_x_freetype_libs) + fi fi @@ -2640,7 +2680,7 @@ cf_save_LIBS="$LIBS" cf_save_INCS="$CPPFLAGS" LIBS="$cf_cv_x_freetype_libs $LIBS" -CPPFLAGS="$cf_cv_x_freetype_incs $CPPFLAGS" +CPPFLAGS="$CPPFLAGS $cf_cv_x_freetype_incs" AC_TRY_LINK([ #include <X11/Xlib.h> diff --git a/button.c b/button.c index d9e6dfc..93ef2b0 100644 --- a/button.c +++ b/button.c @@ -1,4 +1,4 @@ -/* $XTermId: button.c,v 1.298 2009/01/09 01:29:52 tom Exp $ */ +/* $XTermId: button.c,v 1.300 2009/01/22 23:47:52 tom Exp $ */ /* * Copyright 1999-2008,2009 by Thomas E. Dickey @@ -156,7 +156,7 @@ static void do_select_end(XtermWidget xw, XEvent * event, String * params, Bool SendMousePosition(XtermWidget xw, XEvent * event) { - TScreen *screen = &(xw->screen); + TScreen *screen = TScreenOf(xw); /* If send_mouse_pos mode isn't on, we shouldn't be here */ if (screen->send_mouse_pos == MOUSE_OFF) @@ -249,7 +249,7 @@ static Bool SendLocatorPosition(XtermWidget xw, XEvent * event) { ANSI reply; - TScreen *screen = &(xw->screen); + TScreen *screen = TScreenOf(xw); int row, col; Bool oor; int button; @@ -383,7 +383,7 @@ void GetLocatorPosition(XtermWidget xw) { ANSI reply; - TScreen *screen = &xw->screen; + TScreen *screen = TScreenOf(xw); Window root, child; int rx, ry, x, y; unsigned int mask; @@ -448,7 +448,7 @@ void InitLocatorFilter(XtermWidget xw) { ANSI reply; - TScreen *screen = &xw->screen; + TScreen *screen = TScreenOf(xw); Window root, child; int rx, ry, x, y; unsigned int mask; @@ -569,7 +569,7 @@ static void CheckLocatorPosition(XtermWidget xw, XEvent * event) { ANSI reply; - TScreen *screen = &(xw->screen); + TScreen *screen = TScreenOf(xw); int row, col; Bool oor; int state; @@ -807,9 +807,10 @@ DiredButton(Widget w, String * params GCC_UNUSED, /* selections */ Cardinal *num_params GCC_UNUSED) { - if (IsXtermWidget(w)) { - XtermWidget xw = (XtermWidget) w; - TScreen *screen = &(xw->screen); + XtermWidget xw; + + if ((xw = getXtermWidget(w)) != 0) { + TScreen *screen = TScreenOf(xw); Char Line[6]; unsigned line, col; @@ -837,9 +838,10 @@ ReadLineButton(Widget w, String * params GCC_UNUSED, /* selections */ Cardinal *num_params GCC_UNUSED) { - if (IsXtermWidget(w)) { - XtermWidget xw = (XtermWidget) w; - TScreen *screen = &(xw->screen); + XtermWidget xw; + + if ((xw = getXtermWidget(w)) != 0) { + TScreen *screen = TScreenOf(xw); Char Line[6]; int line, col, ldelta = 0; @@ -905,9 +907,10 @@ ViButton(Widget w, String * params GCC_UNUSED, /* selections */ Cardinal *num_params GCC_UNUSED) { - if (IsXtermWidget(w)) { - XtermWidget xw = (XtermWidget) w; - TScreen *screen = &(xw->screen); + XtermWidget xw; + + if ((xw = getXtermWidget(w)) != 0) { + TScreen *screen = TScreenOf(xw); int pty = screen->respond; Char Line[6]; int line; @@ -943,9 +946,10 @@ HandleSelectExtend(Widget w, String * params GCC_UNUSED, Cardinal *num_params GCC_UNUSED) { - if (IsXtermWidget(w)) { - XtermWidget xw = (XtermWidget) w; - TScreen *screen = &(xw->screen); + XtermWidget xw; + + if ((xw = getXtermWidget(w)) != 0) { + TScreen *screen = TScreenOf(xw); CELL cell; screen->selection_time = event->xmotion.time; @@ -976,9 +980,10 @@ HandleKeyboardSelectExtend(Widget w, String * params GCC_UNUSED, Cardinal *num_params GCC_UNUSED) { - if (IsXtermWidget(w)) { - XtermWidget xw = (XtermWidget) w; - TScreen *screen = &xw->screen; + XtermWidget xw; + + if ((xw = getXtermWidget(w)) != 0) { + TScreen *screen = TScreenOf(xw); ExtendExtend(xw, &screen->cursorp); } } @@ -993,7 +998,7 @@ do_select_end(XtermWidget xw, #if OPT_READLINE int ldelta1, ldelta2; #endif - TScreen *screen = &xw->screen; + TScreen *screen = TScreenOf(xw); screen->selection_time = event->xbutton.time; switch (screen->eventMode) { @@ -1027,8 +1032,11 @@ HandleSelectEnd(Widget w, String * params, /* selections */ Cardinal *num_params) { - if (IsXtermWidget(w)) - do_select_end((XtermWidget) w, event, params, num_params, False); + XtermWidget xw; + + if ((xw = getXtermWidget(w)) != 0) { + do_select_end(xw, event, params, num_params, False); + } } void @@ -1037,8 +1045,11 @@ HandleKeyboardSelectEnd(Widget w, String * params, /* selections */ Cardinal *num_params) { - if (IsXtermWidget(w)) - do_select_end((XtermWidget) w, event, params, num_params, True); + XtermWidget xw; + + if ((xw = getXtermWidget(w)) != 0) { + do_select_end(xw, event, params, num_params, True); + } } struct _SelectionList { @@ -1117,10 +1128,12 @@ _SelectionTargets(Widget w) TScreen *screen; int n; - if (!IsXtermWidget(w)) + XtermWidget xw; + + if ((xw = getXtermWidget(w)) == 0) return NULL; - screen = TScreenOf((XtermWidget) w); + screen = TScreenOf(xw); #if OPT_WIDE_CHARS if (screen->wide_chars) { @@ -1173,7 +1186,7 @@ _SelectionTargets(Widget w) static void UnmapSelections(XtermWidget xw) { - TScreen *screen = &(xw->screen); + TScreen *screen = TScreenOf(xw); Cardinal n; if (screen->mappedSelect) { @@ -1208,7 +1221,8 @@ MapSelections(XtermWidget xw, String * params, Cardinal num_params) } } if (map) { - const char *mapTo = (xw->screen.selectToClipboard + TScreen *screen = TScreenOf(xw); + const char *mapTo = (screen->selectToClipboard ? "CLIPBOARD" : "PRIMARY"); @@ -1225,7 +1239,7 @@ MapSelections(XtermWidget xw, String * params, Cardinal num_params) break; } } - xw->screen.mappedSelect = result; + screen->mappedSelect = result; } } } @@ -1276,10 +1290,12 @@ CutBuffer(unsigned code) static void FinishPaste64(XtermWidget xw) { - TRACE(("FinishPaste64(%d)\n", xw->screen.base64_paste)); - if (xw->screen.base64_paste) { - xw->screen.base64_paste = 0; - unparseputc1(xw, xw->screen.base64_final); + TScreen *screen = TScreenOf(xw); + + TRACE(("FinishPaste64(%d)\n", screen->base64_paste)); + if (screen->base64_paste) { + screen->base64_paste = 0; + unparseputc1(xw, screen->base64_final); unparse_end(xw); } } @@ -1299,11 +1315,13 @@ xtermGetSelection(Widget w, int cutbuffer; Atom target; - if (!IsXtermWidget(w)) + XtermWidget xw; + + if ((xw = getXtermWidget(w)) == 0) return; TRACE(("xtermGetSelection\n")); - params = MapSelections((XtermWidget) w, params, num_params); + params = MapSelections(xw, params, num_params); XmuInternStrings(XtDisplay(w), params, (Cardinal) 1, &selection); cutbuffer = CutBuffer(selection); @@ -1330,7 +1348,7 @@ xtermGetSelection(Widget w, } #if OPT_PASTE64 else { - FinishPaste64((XtermWidget) w); + FinishPaste64(xw); } #endif return; @@ -1581,9 +1599,12 @@ SelectionReceived(Widget w, Char *line = (Char *) value; #endif - if (!IsXtermWidget(w)) + XtermWidget xw; + + if ((xw = getXtermWidget(w)) == 0) return; - screen = TScreenOf((XtermWidget) w); + + screen = TScreenOf(xw); dpy = XtDisplay(w); if (*type == 0 /*XT_CONVERT_FAIL */ @@ -1695,7 +1716,7 @@ SelectionReceived(Widget w, } #if OPT_PASTE64 -- To UNSUBSCRIBE, email to debian-x-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org