diff options
-rw-r--r-- | 3RDPARTY | 6 | ||||
-rw-r--r-- | app/xterm/MANIFEST | 22 | ||||
-rw-r--r-- | app/xterm/Tekproc.c | 6 | ||||
-rw-r--r-- | app/xterm/aclocal.m4 | 240 | ||||
-rw-r--r-- | app/xterm/button.c | 436 | ||||
-rw-r--r-- | app/xterm/cachedGCs.c | 186 | ||||
-rw-r--r-- | app/xterm/charproc.c | 1280 | ||||
-rw-r--r-- | app/xterm/configure | 2851 | ||||
-rw-r--r-- | app/xterm/configure.in | 107 | ||||
-rw-r--r-- | app/xterm/fontutils.c | 1036 | ||||
-rw-r--r-- | app/xterm/main.c | 24 | ||||
-rw-r--r-- | app/xterm/ptydata.c | 63 | ||||
-rw-r--r-- | app/xterm/ptyx.h | 6 | ||||
-rw-r--r-- | app/xterm/scrollbar.c | 232 | ||||
-rw-r--r-- | app/xterm/sinstall.sh | 15 | ||||
-rw-r--r-- | app/xterm/tabs.c | 26 | ||||
-rw-r--r-- | app/xterm/util.c | 1951 | ||||
-rw-r--r-- | app/xterm/version.h | 4 | ||||
-rw-r--r-- | app/xterm/xterm.log.html | 805 | ||||
-rw-r--r-- | app/xterm/xterm.man | 4 | ||||
-rw-r--r-- | app/xterm/xtermcfg.h | 2 | ||||
-rw-r--r-- | app/xterm/xtermcfg.hin | 28 |
22 files changed, 6048 insertions, 3282 deletions
@@ -1,4 +1,4 @@ -# $OpenBSD: 3RDPARTY,v 1.25 2008/02/16 09:57:37 matthieu Exp $ +# $OpenBSD: 3RDPARTY,v 1.26 2008/03/19 21:15:46 matthieu Exp $ # Package: Freetype @@ -8,8 +8,8 @@ Maintainer: Freetype.org Archive Site: http://download.savannah.gnu.org/releases/freetype/ Package: xterm -Version: 232 -Current Vers: 232 +Version: 234 +Current Vers: 234 Maintainer: Thomas E. Dickey Archive Site: http://invisible-island.net/xterm/xterm.html diff --git a/app/xterm/MANIFEST b/app/xterm/MANIFEST index f7ffaa336..1351cab2d 100644 --- a/app/xterm/MANIFEST +++ b/app/xterm/MANIFEST @@ -1,4 +1,4 @@ -MANIFEST for xterm, version xterm-216 +MANIFEST for xterm-233, version xterm-233 -------------------------------------------------------------------------------- MANIFEST this file 256colres.h resource-definitions for 256-color mode @@ -8,6 +8,7 @@ MANIFEST this file AAA_README_VMS.txt note for VMS port of 'xterm' INSTALL configure script: options and related install instructions Imakefile imake template for Makefile +KOI8RXTerm.ad resources for koi8rxterm Makefile.in configure script template for Makefile README overview & caveats for 'xterm' README.i18n i18n readme: @@ -25,6 +26,7 @@ XTerm-col.ad color resource definitions for XTerm class XTerm.ad resource definitions for XTerm class aclocal.m4 configure script: custom macros button.c mouse button and selection processing +cachedGCs.c maintain cache of GC's charclass.c compact character-class module charclass.h interface of charclass.c charproc.c VT100 parser functions @@ -48,6 +50,8 @@ input.c VT100 key-symbol and function-key translation install.sh configure script: fallback install script keysym2ucs.c lookup-table for UTF-8 to keysyms keysym2ucs.h interface of keysym2ucs.c +koi8rxterm KOI-8 wrapper from Debian (originally me) +koi8rxterm.man manpage for koi8rxterm link_axp.com build-script for VMS port of xterm main.c main program of 'xterm' main.h default definitions for 'xterm' @@ -67,6 +71,7 @@ ptydata.c functions to manipulate data read from pty 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 @@ -78,6 +83,8 @@ trace.c debugging trace functions for 'xterm' trace.h interface of trace.c util.c miscellaneous utility functions for 'xterm' uxterm wrapper script to make unicode-xterm +uxterm.desktop sample desktop file for uxterm +uxterm.man manpage for uxterm, from Debian version.h version of xterm vms.c VMS version of xterm's spawn(), etc. vms.h system headers and definitions for vms.c @@ -87,14 +94,26 @@ xcharmouse.h Jason Bacon's mouse-defs, cleaned up a little xstrings.c a few common string functions xstrings.h interface of xstrings.c xterm.dat application defaults for VMS port of 'xterm' +xterm.desktop sample desktop file for xterm. xterm.h common includes, definitions and prototypes for 'xterm' xterm.log.html changelog for xterm xterm.man manual page for 'xterm' xterm_axp.opt linker options file for VMS port of 'xterm' xterm_io.h split-out definitions of termio/termios/sgtty and winsize from main.c, os2main.c, screen.c and resize.c +xtermcap.c termcap-related functions. +xtermcap.h interface of xtermcap.c xtermcfg.hin configure script: template for xtermcfg.h xutf8.c JC's cleanup of UTF8 xutf8.h JC's cleanup of UTF8 +icons subdirectory +icons/xterm-color_32x32.xcf gimp file for editing 32x32 icon +icons/xterm-color_32x32.xpm 32x32 color icon +icons/xterm-color_48x48.xcf gimp file for editing 48x48 icon +icons/xterm-color_48x48.xpm 48x48 color icon +icons/xterm_32x32.xcf gimp file, for editing 32x32 icon +icons/xterm_32x32.xpm 32x32 monochrome icon +icons/xterm_48x48.xcf gimp file, for editing 48x48 icon +icons/xterm_48x48.xpm 48x48 monochrome icon tektests subdirectory tektests/aitest.tek tek4014 demo: draw a globe tektests/dmerc.tek tek4014 demo: draws a Mercator projection with orbit @@ -120,6 +139,7 @@ vttests/8colors.sh test-script to illustrate 8-colors vttests/acolors.sh demonstrate changing the ANSI colors vttests/doublechars.sh test script to demonstrate doublesize chars vttests/dynamic.sh script to illustrate the dynamic colors control sequence +vttests/dynamic2.sh complete example of dynamic colors vttests/fonts.sh script to demonstrate font-switching sequences vttests/paste64.pl script to test base64-selection option vttests/resize.pl translated resize.sh to perl since it is easy to test, and I needed diff --git a/app/xterm/Tekproc.c b/app/xterm/Tekproc.c index 1f97d740d..0666f0819 100644 --- a/app/xterm/Tekproc.c +++ b/app/xterm/Tekproc.c @@ -1,4 +1,4 @@ -/* $XTermId: Tekproc.c,v 1.158 2008/01/26 01:21:10 tom Exp $ */ +/* $XTermId: Tekproc.c,v 1.159 2008/02/21 20:21:51 tom Exp $ */ /* * Warning, there be crufty dragons here. @@ -718,8 +718,8 @@ Tekparse(TekWidget tw) if (screen->wide_chars && (ch > 255)) { XChar2b sbuf; - sbuf.byte2 = CharOf(ch); - sbuf.byte1 = CharOf(ch >> 8); + sbuf.byte2 = LO_BYTE(ch); + sbuf.byte1 = HI_BYTE(ch); XDrawImageString16(XtDisplay(tw), TWindow(tekscr), tekscr->TnormalGC, diff --git a/app/xterm/aclocal.m4 b/app/xterm/aclocal.m4 index f8e30d827..7bee0f2e0 100644 --- a/app/xterm/aclocal.m4 +++ b/app/xterm/aclocal.m4 @@ -1,10 +1,10 @@ -dnl $XTermId: aclocal.m4,v 1.232 2006/08/03 19:24:02 tom Exp $ +dnl $XTermId: aclocal.m4,v 1.247 2008/02/24 19:30:23 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-2005,2006 by Thomas E. Dickey +dnl Copyright 1997-2007,2008 by Thomas E. Dickey dnl dnl All Rights Reserved dnl @@ -404,7 +404,7 @@ AC_DEFUN([CF_ERRNO], CF_CHECK_ERRNO(errno) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_FUNC_MEMMOVE version: 5 updated: 2000/08/12 23:18:52 +dnl CF_FUNC_MEMMOVE version: 7 updated: 2006/12/16 12:33:30 dnl --------------- dnl Check for memmove, or a bcopy that can handle overlapping copy. If neither dnl is found, add our own version of memmove to the list of objects. @@ -420,7 +420,7 @@ int main() { bcopy(data, temp, sizeof(data)); bcopy(temp+10, temp, 15); bcopy(temp+5, temp+15, 10); - exit (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz")); + ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz")); } ], [cf_cv_good_bcopy=yes], @@ -435,7 +435,7 @@ int main() { fi ])])dnl dnl --------------------------------------------------------------------------- -dnl CF_FUNC_TGETENT version: 10 updated: 2005/09/18 15:26:47 +dnl CF_FUNC_TGETENT version: 11 updated: 2007/03/14 16:43:48 dnl --------------- dnl Check for tgetent function in termcap library. If we cannot find this, dnl we'll use the $LINES and $COLUMNS environment variables to pass screen @@ -491,7 +491,7 @@ int main() char buffer[1024]; buffer[0] = 0; tgetent(buffer, "$cf_TERMVAR"); - exit($cf_TERMTST); }], + ${cf_cv_main_return:-return} ($cf_TERMTST); }], [echo "yes, there is a termcap/tgetent in $cf_termlib" 1>&AC_FD_CC if test -n "$cf_termlib" ; then cf_cv_lib_tgetent="-l$cf_termlib" @@ -546,7 +546,7 @@ else fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_GCC_ATTRIBUTES version: 10 updated: 2005/05/28 13:16:28 +dnl CF_GCC_ATTRIBUTES version: 11 updated: 2007/07/29 09:55:12 dnl ----------------- dnl Test for availability of useful gcc __attribute__ directives to quiet dnl compiler warnings. Though useful, not all are supported -- and contrary @@ -573,7 +573,7 @@ if test "$GCC" = yes then AC_CHECKING([for $CC __attribute__ directives]) cat > conftest.$ac_ext <<EOF -#line __oline__ "configure" +#line __oline__ "${as_me-configure}" #include "confdefs.h" #include "conftest.h" #include "conftest.i" @@ -635,7 +635,7 @@ if test "$GCC" = yes ; then fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_GCC_WARNINGS version: 20 updated: 2005/08/06 18:37:29 +dnl CF_GCC_WARNINGS version: 22 updated: 2007/07/29 09:55:12 dnl --------------- dnl Check if the compiler supports useful warning options. There's a few that dnl we don't use, simply because they're too noisy: @@ -660,7 +660,7 @@ AC_REQUIRE([CF_GCC_VERSION]) CF_INTEL_COMPILER(GCC,INTEL_COMPILER,CFLAGS) cat > conftest.$ac_ext <<EOF -#line __oline__ "configure" +#line __oline__ "${as_me-configure}" int main(int argc, char *argv[[]]) { return (argv[[argc-1]] == 0) ; } EOF @@ -681,7 +681,7 @@ then AC_CHECKING([for $CC warning options]) cf_save_CFLAGS="$CFLAGS" EXTRA_CFLAGS="-Wall" - for cf_opt in $1 \ + for cf_opt in \ wd1419 \ wd1682 \ wd1683 \ @@ -783,7 +783,7 @@ AC_DEFUN([CF_HELP_MESSAGE], [AC_DIVERT_HELP([$1])dnl ])dnl dnl --------------------------------------------------------------------------- -dnl CF_IMAKE_CFLAGS version: 27 updated: 2005/04/05 18:26:15 +dnl CF_IMAKE_CFLAGS version: 29 updated: 2007/05/24 20:53:19 dnl --------------- dnl Use imake to obtain compiler flags. We could, in principle, write tests to dnl get these, but if imake is properly configured there is no point in doing @@ -820,11 +820,14 @@ if mkdir conftestdir; then cat >fix_cflags.sed <<'CF_EOF' s/\\//g +s/[[ ]][[ ]]*/ /g s/"//g -s/\(-D[[a-zA-Z0-9_]][[a-zA-Z0-9_]]*\)=\([[^\\'"0-9 ]][[^ ]]*\([[ ]][[ ]]*[[^- ]][[^ ]]*\)*\)/\1='\\"\2\\"'/g -s/\(-D[[a-zA-Z0-9_]][[a-zA-Z0-9_]]*\)=\([[^\\'"0-9 ]][[^ ]]*\)[[ ]]/\1='\\"\2\\"' /g -s/\(-D[[a-zA-Z0-9_]][[a-zA-Z0-9_]]*\)=\([[^\\'"0-9 ]][[^ ]]*\)$/\1='\\"\2\\"'/g -s/^IMAKE[[ ]]*/IMAKE_CFLAGS="/ +:pack +s/\(=[[^ ]][[^ ]]*\) \([[^-]]\)/\1 \2/g +t pack +s/\(-D[[a-zA-Z0-9_]][[a-zA-Z0-9_]]*\)=\([[^\'0-9 ]][[^ ]]*\)/\1='\\"\2\\"'/g +s/^IMAKE[[ ]]/IMAKE_CFLAGS="/ +s/ / /g s/$/"/ CF_EOF @@ -838,8 +841,8 @@ CF_EOF cat >> ./Imakefile <<'CF_EOF' findstddefs: - @echo IMAKE $(ALLDEFINES)ifelse($1,,,[ $1]) | sed -f fix_cflags.sed - @echo IMAKE $(EXTRA_LOAD_FLAGS)ifelse($2,,,[ $2]) | sed -f fix_lflags.sed + @echo IMAKE ${ALLDEFINES}ifelse($1,,,[ $1]) | sed -f fix_cflags.sed + @echo IMAKE ${EXTRA_LOAD_FLAGS}ifelse($2,,,[ $2]) | sed -f fix_lflags.sed CF_EOF if ( $IMAKE $cf_imake_opts 1>/dev/null 2>&AC_FD_CC && test -f Makefile) @@ -880,7 +883,7 @@ CF_EOF cd .. rm -rf conftestdir - # We use $(ALLDEFINES) rather than $(STD_DEFINES) because the former + # We use ${ALLDEFINES} rather than ${STD_DEFINES} because the former # declares XTFUNCPROTO there. However, some vendors (e.g., SGI) have # modified it to support site.cf, adding a kludge for the /usr/include # directory. Try to filter that out, otherwise gcc won't find its @@ -1030,12 +1033,12 @@ AC_TRY_COMPILE([ test $cf_cv_path_lastlog != no && AC_DEFINE(USE_LASTLOG) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_MSG_LOG version: 3 updated: 1997/09/07 14:05:52 +dnl CF_MSG_LOG version: 4 updated: 2007/07/29 09:55:12 dnl ---------- dnl Write a debug message to config.log, along with the line number in the dnl configure script. AC_DEFUN([CF_MSG_LOG],[ -echo "(line __oline__) testing $* ..." 1>&AC_FD_CC +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 @@ -1090,13 +1093,19 @@ if test -n "$cf_path_prog" ; then fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_PATH_SYNTAX version: 10 updated: 2006/01/02 19:36:00 +dnl CF_PATH_SYNTAX version: 11 updated: 2006/09/02 08:55:46 dnl -------------- dnl Check the argument to see that it looks like a pathname. Rewrite it if it dnl begins with one of the prefix/exec_prefix variables, and then again if the dnl result begins with 'NONE'. This is necessary to work around autoconf's dnl delayed evaluation of those symbols. AC_DEFUN([CF_PATH_SYNTAX],[ +if test "x$prefix" != xNONE; then + cf_path_syntax="$prefix" +else + cf_path_syntax="$ac_default_prefix" +fi + case ".[$]$1" in #(vi .\[$]\(*\)*|.\'*\'*) #(vi ;; @@ -1108,12 +1117,12 @@ case ".[$]$1" in #(vi eval $1="[$]$1" case ".[$]$1" in #(vi .NONE/*) - $1=`echo [$]$1 | sed -e s%NONE%$ac_default_prefix%` + $1=`echo [$]$1 | sed -e s%NONE%$cf_path_syntax%` ;; esac ;; #(vi .no|.NONE/*) - $1=`echo [$]$1 | sed -e s%NONE%$ac_default_prefix%` + $1=`echo [$]$1 | sed -e s%NONE%$cf_path_syntax%` ;; *) ifelse($2,,[AC_ERROR([expected a pathname, not \"[$]$1\"])],$2) @@ -1199,7 +1208,7 @@ fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_POSIX_SAVED_IDS version: 6 updated: 2006/08/02 20:37:21 +dnl CF_POSIX_SAVED_IDS version: 7 updated: 2007/03/14 16:43:53 dnl ------------------ dnl dnl Check first if saved-ids are always supported. Some systems @@ -1239,7 +1248,7 @@ int main() { void *p = (void *) seteuid; long code = sysconf(_SC_SAVED_IDS); - exit ((code > 0) ? 0 : 1); + ${cf_cv_main_return:-return} ((code > 0) ? 0 : 1); }], cf_cv_posix_saved_ids=yes, cf_cv_posix_saved_ids=no, @@ -1275,6 +1284,26 @@ AC_TRY_LINK([ test "$cf_cv_posix_wait" = yes && AC_DEFINE(USE_POSIX_WAIT) ])dnl dnl --------------------------------------------------------------------------- +dnl CF_PROCFS_CWD version: 2 updated: 2007/03/12 20:39:04 +dnl ------------- +dnl Find /proc tree (may be in a different place) which implements the "cwd" +dnl link. +AC_DEFUN([CF_PROCFS_CWD],[ +AC_CACHE_CHECK(for proc tree with cwd-support,cf_cv_procfs_cwd,[ +cf_cv_procfs_cwd=no +for cf_path in /proc /compat/linux/proc /usr/compat/linux/proc +do + if test -d $cf_path && \ + test -d $cf_path/$$ && \ + ( test -d $cf_path/$$/cwd || \ + test -L $cf_path/$$/cwd ); then + cf_cv_procfs_cwd=$cf_path + break + fi +done +]) +])dnl +dnl --------------------------------------------------------------------------- dnl CF_PROG_CC_U_D version: 1 updated: 2005/07/14 16:59:30 dnl -------------- dnl Check if C (preprocessor) -U and -D options are processed in the order @@ -1547,12 +1576,12 @@ static struct termio d_tio; test "$cf_cv_svr4" = yes && AC_DEFINE(SVR4) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_SYSV version: 12 updated: 2006/06/21 16:52:31 +dnl CF_SYSV version: 13 updated: 2006/08/20 14:55:37 dnl ------- dnl Check if this is a SYSV platform, e.g., as used in <X11/Xos.h>, and whether dnl defining it will be helpful. The following features are used to check: dnl -dnl a) bona-fide SVSY doesn't use const for sys_errlist[]. Since this is a +dnl a) bona-fide SVSV doesn't use const for sys_errlist[]. Since this is a dnl legacy (pre-ANSI) feature, const should not apply. Modern systems only dnl declare strerror(). Xos.h declares the legacy form of str_errlist[], and dnl a compile-time error will result from trying to assign to a const array. @@ -1661,7 +1690,7 @@ foo.c_ospeed = B9600; test "$cf_cv_termio_c_ispeed" = yes && AC_DEFINE(HAVE_TERMIO_C_ISPEED) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_TTY_GROUP version: 6 updated: 2006/01/23 19:42:39 +dnl CF_TTY_GROUP version: 7 updated: 2007/03/14 16:43:59 dnl ------------ dnl Check if the system has a tty-group defined. This is used in xterm when dnl setting pty ownership. @@ -1758,9 +1787,9 @@ int main() && stat(name, &sb) == 0 && sb.st_gid != getgid() && sb.st_gid == ttygrp->gr_gid) { - exit(0); + ${cf_cv_main_return:-return} (0); } - exit(1); + ${cf_cv_main_return:-return} (1); } ], [cf_cv_tty_group=yes], @@ -1846,7 +1875,7 @@ if test "$cf_cv_have_utempter" = yes ; then fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_UTMP version: 8 updated: 2002/10/27 23:21:42 +dnl CF_UTMP version: 9 updated: 2008/01/25 17:18:00 dnl ------- dnl Check for UTMP/UTMPX headers AC_DEFUN([CF_UTMP], @@ -1885,6 +1914,7 @@ if test $cf_cv_have_utmp != no ; then AC_DEFINE(HAVE_UTMP) test $cf_cv_have_utmp = utmpx && AC_DEFINE(UTMPX_FOR_UTMP) CF_UTMP_UT_HOST + CF_UTMP_UT_SYSLEN CF_UTMP_UT_NAME CF_UTMP_UT_XSTATUS CF_UTMP_UT_XTIME @@ -1941,13 +1971,13 @@ else fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_UTMP_UT_HOST version: 6 updated: 2002/10/27 23:21:42 +dnl CF_UTMP_UT_HOST version: 7 updated: 2007/03/13 19:17:11 dnl --------------- dnl Check if UTMP/UTMPX struct defines ut_host member AC_DEFUN([CF_UTMP_UT_HOST], [ if test $cf_cv_have_utmp != no ; then -AC_MSG_CHECKING(if utmp.ut_host is declared) +AC_MSG_CHECKING(if ${cf_cv_have_utmp}.ut_host is declared) AC_CACHE_VAL(cf_cv_have_utmp_ut_host,[ AC_TRY_COMPILE([ #include <sys/types.h> @@ -1961,13 +1991,13 @@ test $cf_cv_have_utmp_ut_host != no && AC_DEFINE(HAVE_UTMP_UT_HOST) fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_UTMP_UT_NAME version: 3 updated: 2002/10/27 23:21:42 +dnl CF_UTMP_UT_NAME version: 4 updated: 2007/03/13 19:17:11 dnl --------------- dnl Check if UTMP/UTMPX struct defines ut_name member AC_DEFUN([CF_UTMP_UT_NAME], [ if test $cf_cv_have_utmp != no ; then -AC_CACHE_CHECK(if utmp.ut_name is declared,cf_cv_have_utmp_ut_name,[ +AC_CACHE_CHECK(if ${cf_cv_have_utmp}.ut_name is declared,cf_cv_have_utmp_ut_name,[ cf_cv_have_utmp_ut_name=no cf_utmp_includes=" #include <sys/types.h> @@ -1998,13 +2028,13 @@ esac fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_UTMP_UT_SESSION version: 4 updated: 2002/10/27 23:21:42 +dnl CF_UTMP_UT_SESSION version: 5 updated: 2007/03/13 19:17:11 dnl ------------------ dnl Check if UTMP/UTMPX struct defines ut_session member AC_DEFUN([CF_UTMP_UT_SESSION], [ if test $cf_cv_have_utmp != no ; then -AC_CACHE_CHECK(if utmp.ut_session is declared, cf_cv_have_utmp_ut_session,[ +AC_CACHE_CHECK(if ${cf_cv_have_utmp}.ut_session is declared, cf_cv_have_utmp_ut_session,[ AC_TRY_COMPILE([ #include <sys/types.h> #include <${cf_cv_have_utmp}.h>], @@ -2018,6 +2048,26 @@ fi fi ])dnl dnl --------------------------------------------------------------------------- +dnl CF_UTMP_UT_SYSLEN version: 1 updated: 2008/01/25 17:18:00 +dnl ----------------- +dnl Check if UTMP/UTMPX struct defines ut_syslen member +AC_DEFUN([CF_UTMP_UT_SYSLEN], +[ +if test $cf_cv_have_utmp != no ; then +AC_MSG_CHECKING(if ${cf_cv_have_utmp}.ut_syslen is declared) +AC_CACHE_VAL(cf_cv_have_utmp_ut_syslen,[ + AC_TRY_COMPILE([ +#include <sys/types.h> +#include <${cf_cv_have_utmp}.h>], + [struct $cf_cv_have_utmp x; int y = x.ut_syslen], + [cf_cv_have_utmp_ut_syslen=yes], + [cf_cv_have_utmp_ut_syslen=no]) + ]) +AC_MSG_RESULT($cf_cv_have_utmp_ut_syslen) +test $cf_cv_have_utmp_ut_syslen != no && AC_DEFINE(HAVE_UTMP_UT_SYSLEN) +fi +])dnl +dnl --------------------------------------------------------------------------- dnl CF_UTMP_UT_XSTATUS version: 3 updated: 2001/12/27 12:55:07 dnl ------------------ dnl Check for known variants on the UTMP/UTMPX struct's exit-status as reported @@ -2056,13 +2106,13 @@ fi fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_UTMP_UT_XTIME version: 6 updated: 2002/10/27 23:21:42 +dnl CF_UTMP_UT_XTIME version: 7 updated: 2007/03/13 19:17:11 dnl ---------------- dnl Check if UTMP/UTMPX struct defines ut_xtime member AC_DEFUN([CF_UTMP_UT_XTIME], [ if test $cf_cv_have_utmp != no ; then -AC_CACHE_CHECK(if utmp.ut_xtime is declared, cf_cv_have_utmp_ut_xtime,[ +AC_CACHE_CHECK(if ${cf_cv_have_utmp}.ut_xtime is declared, cf_cv_have_utmp_ut_xtime,[ AC_TRY_COMPILE([ #include <sys/types.h> #include <${cf_cv_have_utmp}.h>], @@ -2085,11 +2135,12 @@ fi fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_VERBOSE version: 2 updated: 1997/09/05 10:45:14 +dnl CF_VERBOSE version: 3 updated: 2007/07/29 09:55:12 dnl ---------- dnl Use AC_VERBOSE w/o the warnings AC_DEFUN([CF_VERBOSE], [test -n "$verbose" && echo " $1" 1>&AC_FD_MSG +CF_MSG_LOG([$1]) ])dnl dnl --------------------------------------------------------------------------- dnl CF_WITH_IMAKE_CFLAGS version: 8 updated: 2005/11/02 15:04:41 @@ -2168,7 +2219,7 @@ else fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_WITH_PATH version: 7 updated: 2006/08/03 15:20:08 +dnl CF_WITH_PATH version: 8 updated: 2007/05/13 13:16:35 dnl ------------ dnl Wrapper for AC_ARG_WITH to ensure that user supplies a pathname, not just dnl defaulting to yes/no. @@ -2182,7 +2233,9 @@ dnl AC_DEFUN([CF_WITH_PATH], [AC_ARG_WITH($1,[$2 ](default: ifelse($4,,empty,$4)),, ifelse($4,,[withval="${$3}"],[withval="${$3-ifelse($5,,$4,$5)}"]))dnl +if ifelse($5,,true,[test -n "$5"]) ; then CF_PATH_SYNTAX(withval) +fi $3="$withval" AC_SUBST($3)dnl ])dnl @@ -2236,7 +2289,7 @@ int x = XkbBI_Info test "$cf_cv_xkb_bell_ext" = yes && AC_DEFINE(HAVE_XKB_BELL_EXT) ]) dnl --------------------------------------------------------------------------- -dnl CF_XOPEN_SOURCE version: 24 updated: 2006/04/02 16:41:09 +dnl CF_XOPEN_SOURCE version: 25 updated: 2007/01/29 18:36:38 dnl --------------- dnl Try to get _XOPEN_SOURCE defined properly that we can use POSIX functions, dnl or adapt to the vendor's definitions to get equivalent functionality, @@ -2270,7 +2323,7 @@ hpux*) #(vi irix[[56]].*) #(vi CPPFLAGS="$CPPFLAGS -D_SGI_SOURCE" ;; -linux*|gnu*) #(vi +linux*|gnu*|k*bsd*-gnu) #(vi CF_GNU_SOURCE ;; mirbsd*) #(vi @@ -2422,7 +2475,7 @@ elif test "$cf_x_athena_include" != default ; then fi ]) dnl --------------------------------------------------------------------------- -dnl CF_X_ATHENA_LIBS version: 3 updated: 2003/02/16 15:24:54 +dnl CF_X_ATHENA_LIBS version: 6 updated: 2006/11/30 17:57:11 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. @@ -2452,19 +2505,15 @@ do LIBS="$cf_lib $LIBS" AC_MSG_CHECKING(for $cf_test in $cf_lib) fi - cf_SAVE="$LIBS" - LIBS="$X_PRE_LIBS $LIBS $X_EXTRA_LIBS" AC_TRY_LINK([],[$cf_test()], [cf_result=yes], [cf_result=no]) AC_MSG_RESULT($cf_result) if test "$cf_result" = yes ; then cf_x_athena_lib="$cf_lib" - LIBS="$cf_SAVE" break - else - LIBS="$cf_save" fi + LIBS="$cf_save" fi done done @@ -2478,7 +2527,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: 15 updated: 2006/02/12 17:30:04 +dnl CF_X_FREETYPE version: 18 updated: 2007/03/21 18:06:17 dnl ------------- dnl Check for X FreeType headers and libraries (XFree86 4.x, etc). dnl @@ -2488,7 +2537,7 @@ dnl less randomly. If we cannot find the config program, do not bother trying dnl to guess the latest variation of include/lib directories. dnl dnl If either or both of these configure-script options are not given, rely on -dnl the output of the config program to provide the dnl cflags/libs options: +dnl the output of the config program to provide the cflags/libs options: dnl --with-freetype-cflags dnl --with-freetype-libs AC_DEFUN([CF_X_FREETYPE], @@ -2497,6 +2546,21 @@ cf_extra_freetype_libs= FREETYPE_CONFIG= 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]) +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]) +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 @@ -2515,27 +2579,33 @@ else fi if test -n "$FREETYPE_CONFIG" ; then -withval= -AC_ARG_WITH(freetype-cflags, - [ --with-freetype-cflags -D/-I options for compiling with FreeType], -[cf_cv_x_freetype_incs="$withval" - CF_VERBOSE(freetype-cflags $cf_cv_x_freetype_incs) -],[ -AC_CACHE_CHECK(for X FreeType headers,cf_cv_x_freetype_incs,[ - cf_cv_x_freetype_incs="`$FREETYPE_CONFIG $FREETYPE_PARAMS --cflags 2>/dev/null`" -])]) -withval= -AC_ARG_WITH(freetype-libs, - [ --with-freetype-libs -L/-l options to link FreeType], -[cf_cv_x_freetype_libs="$withval" - CF_VERBOSE(freetype-libs $cf_cv_x_freetype_libs) -],[ -AC_CACHE_CHECK(for X FreeType libraries,cf_cv_x_freetype_libs,[ -cf_save_LIBS="$LIBS" -cf_save_INCS="$CPPFLAGS" +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 + +fi + +if test "$cf_cv_x_freetype_incs" = no ; then + cf_cv_x_freetype_incs= +fi + +if test "$cf_cv_x_freetype_libs" = no ; then + cf_cv_x_freetype_libs=-lXft +fi + +AC_MSG_CHECKING(if we can link with FreeType libraries) + +cf_save_LIBS="$LIBS" +cf_save_INCS="$CPPFLAGS" LIBS="$cf_cv_x_freetype_libs $LIBS" CPPFLAGS="$cf_cv_x_freetype_incs $CPPFLAGS" @@ -2544,23 +2614,27 @@ AC_TRY_LINK([ #include <X11/Xlib.h> #include <X11/extensions/Xrender.h> #include <X11/Xft/Xft.h>],[ - XftPattern *pat = XftNameParse ("name"); - ],[],[cf_cv_x_freetype_libs=]) - LIBS="$cf_save_LIBS" - CPPFLAGS="$cf_save_INCS" -])]) + XftPattern *pat = XftNameParse ("name");], + [cf_cv_found_freetype=yes], + [cf_cv_found_freetype=no]) +AC_MSG_RESULT($cf_cv_found_freetype) + +LIBS="$cf_save_LIBS" +CPPFLAGS="$cf_save_INCS" -if test -n "$cf_cv_x_freetype_libs" ; then +if test "$cf_cv_found_freetype" = yes ; then LIBS="$cf_cv_x_freetype_libs $LIBS" CF_ADD_CFLAGS($cf_cv_x_freetype_incs) AC_DEFINE(XRENDERFONT) -else - AC_MSG_WARN(No libraries found for FreeType) - CPPFLAGS=`echo "$CPPFLAGS" | sed -e s/-DXRENDERFONT//` -fi + +AC_CHECK_FUNCS( \ + XftDrawCharSpec \ + XftDrawSetClip \ + XftDrawSetClipRectangles \ +) else - AC_MSG_WARN(Cannot find FreeType configuration program) + AC_MSG_WARN(No libraries found for FreeType) CPPFLAGS=`echo "$CPPFLAGS" | sed -e s/-DXRENDERFONT//` fi @@ -2570,7 +2644,7 @@ AC_SUBST(HAVE_TYPE_FCCHAR32) AC_SUBST(HAVE_TYPE_XFTCHARSPEC) ]) dnl --------------------------------------------------------------------------- -dnl CF_X_TOOLKIT version: 10 updated: 2004/04/25 15:37:17 +dnl CF_X_TOOLKIT version: 11 updated: 2006/11/29 19:05:14 dnl ------------ dnl Check for X Toolkit libraries dnl @@ -2595,7 +2669,7 @@ AC_CHECK_FUNC(XtAppInitialize,,[ AC_CHECK_LIB(Xt, XtAppInitialize, [AC_DEFINE(HAVE_LIBXT) cf_have_X_LIBS=Xt - LIBS="-lXt $X_PRE_LIBS $LIBS"],, + LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS"],, [$X_PRE_LIBS $LIBS $X_EXTRA_LIBS])]) if test $cf_have_X_LIBS = no ; then diff --git a/app/xterm/button.c b/app/xterm/button.c index 619d86b88..66ea199e2 100644 --- a/app/xterm/button.c +++ b/app/xterm/button.c @@ -1,7 +1,7 @@ -/* $XTermId: button.c,v 1.252 2006/07/23 18:37:20 tom Exp $ */ +/* $XTermId: button.c,v 1.285 2008/02/24 19:42:02 tom Exp $ */ /* - * Copyright 1999-2005,2006 by Thomas E. Dickey + * Copyright 1999-2007,2008 by Thomas E. Dickey * * All Rights Reserved * @@ -51,7 +51,6 @@ * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS * SOFTWARE. */ -/* $XFree86: xc/programs/xterm/button.c,v 3.88 2006/06/19 00:36:50 dickey Exp $ */ /* button.c Handles button events in the terminal emulator. @@ -69,6 +68,7 @@ button.c Handles button events in the terminal emulator. #include <X11/Xmu/StdSel.h> #include <xutf8.h> +#include <fontutils.h> #include <data.h> #include <error.h> @@ -280,7 +280,7 @@ SendLocatorPosition(XtermWidget xw, XEvent * event) * ESCAPE '[' event ; mask ; row ; column '&' 'w' */ memset(&reply, 0, sizeof(reply)); - reply.a_type = CSI; + reply.a_type = ANSI_CSI; if (oor) { reply.a_nparam = 1; @@ -398,7 +398,7 @@ GetLocatorPosition(XtermWidget xw) } memset(&reply, 0, sizeof(reply)); - reply.a_type = CSI; + reply.a_type = ANSI_CSI; if (screen->send_mouse_pos == DEC_LOCATOR) { ret = XQueryPointer(screen->display, VWindow(screen), &root, @@ -468,7 +468,7 @@ InitLocatorFilter(XtermWidget xw) * report immediately with no coordinates. */ memset(&reply, 0, sizeof(reply)); - reply.a_type = CSI; + reply.a_type = ANSI_CSI; reply.a_nparam = 1; reply.a_param[0] = 0; /* Event - 0 = locator unavailable */ reply.a_inters = '&'; @@ -534,7 +534,7 @@ InitLocatorFilter(XtermWidget xw) ButtonState(state, mask); memset(&reply, 0, sizeof(reply)); - reply.a_type = CSI; + reply.a_type = ANSI_CSI; reply.a_nparam = 4; reply.a_param[0] = 10; /* Event - 10 = locator outside filter */ reply.a_param[1] = state; @@ -585,7 +585,7 @@ CheckLocatorPosition(XtermWidget xw, XEvent * event) MotionOff(screen, xw); memset(&reply, 0, sizeof(reply)); - reply.a_type = CSI; + reply.a_type = ANSI_CSI; if (oor) { reply.a_nparam = 1; reply.a_param[0] = 0; /* Event - 0 = locator unavailable */ @@ -767,9 +767,9 @@ ReadLineMovePoint(TScreen * screen, int col, int ldelta) if (col == 0) return 0; if (screen->control_eight_bits) { - line[count++] = CSI; + line[count++] = ANSI_CSI; } else { - line[count++] = ESC; + line[count++] = ANSI_ESC; line[count++] = '['; /* XXX maybe sometimes O is better? */ } line[count++] = (col > 0 ? 'C' : 'D'); @@ -811,7 +811,7 @@ DiredButton(Widget w, line = (event->xbutton.y - screen->border) / FontHeight(screen); col = (event->xbutton.x - OriginX(screen)) / FontWidth(screen); Line[0] = CONTROL('X'); - Line[1] = ESC; + Line[1] = ANSI_ESC; Line[2] = 'G'; Line[3] = ' ' + col; Line[4] = ' ' + line; @@ -873,7 +873,7 @@ ReadLineButton(Widget w, / FontWidth(screen) - screen->cur_col + ldelta * MaxCols(screen); if (col == 0) goto finish; - Line[0] = ESC; + Line[0] = ANSI_ESC; /* XXX: sometimes it is better to send '['? */ Line[1] = 'O'; Line[2] = (col > 0 ? 'C' : 'D'); @@ -907,7 +907,7 @@ ViButton(Widget w, line = screen->cur_row - ((event->xbutton.y - screen->border) / FontHeight(screen)); if (line != 0) { - Line[0] = ESC; /* force an exit from insert-mode */ + Line[0] = ANSI_ESC; /* force an exit from insert-mode */ v_write(pty, Line, 1); if (line < 0) { @@ -939,7 +939,7 @@ HandleSelectExtend(Widget w, CELL cell; screen->selection_time = event->xmotion.time; - switch (eventMode) { + switch (screen->eventMode) { /* If not in one of the DEC mouse-reporting modes */ case LEFTEXTENSION: case RIGHTEXTENSION: @@ -982,11 +982,11 @@ do_select_end(XtermWidget xw, { #if OPT_READLINE int ldelta1, ldelta2; - TScreen *screen = &xw->screen; #endif + TScreen *screen = &xw->screen; - xw->screen.selection_time = event->xbutton.time; - switch (eventMode) { + screen->selection_time = event->xbutton.time; + switch (screen->eventMode) { case NORMAL: (void) SendMousePosition(xw, event); break; @@ -1038,8 +1038,18 @@ struct _SelectionList { Time time; }; +static unsigned +DECtoASCII(unsigned ch) +{ + if (xtermIsDecGraphic(ch)) { + ch = "###########+++++##-##++++|######"[ch]; + /* 01234567890123456789012345678901 */ + } + return ch; +} /* - * Convert a UTF-8 string to Latin-1, replacing non Latin-1 characters by `#'. + * Convert a UTF-8 string to Latin-1, replacing non Latin-1 characters by `#', + * or ASCII/Latin-1 equivalents for special cases. */ #if OPT_WIDE_CHARS static Char * @@ -1048,37 +1058,44 @@ UTF8toLatin1(Char * s, unsigned len, unsigned long *result) static Char *buffer; static size_t used; - Char *p = s; Char *q; if (used == 0) { - buffer = (Char *) XtMalloc(used = len); + buffer = (Char *) XtMalloc(1 + (used = len)); } else if (len > used) { - buffer = (Char *) XtRealloc((char *) buffer, used = len); - } - q = buffer; - - /* We're assuming that the xterm widget never contains Unicode - control characters. */ - - while (p < s + len) { - if ((*p & 0x80) == 0) { - *q++ = *p++; - } else if ((*p & 0x7C) == 0x40 && p < s + len - 1) { - *q++ = ((*p & 0x03) << 6) | (p[1] & 0x3F); - p += 2; - } else if ((*p & 0x60) == 0x40) { - *q++ = '#'; - p += 2; - } else if ((*p & 0x50) == 0x40) { - *q++ = '#'; - p += 3; - } else { /* this cannot happen */ - *q++ = '#'; - p++; - } - } - *result = q - buffer; + buffer = (Char *) XtRealloc((char *) buffer, 1 + (used = len)); + } + + if (buffer != 0) { + PtyData data; + + q = buffer; + fakePtyData(&data, s, s + len); + while (decodeUtf8(&data)) { + IChar value = skipPtyData(&data); + if (value == UCS_REPL) { + *q++ = '#'; + } else if (value < 256) { + *q++ = value; + } else { + unsigned eqv = ucs2dec(value); + if (xtermIsDecGraphic(eqv)) { + *q++ = DECtoASCII(eqv); + } else { + eqv = AsciiEquivs(value); + if (eqv == value) + eqv = '#'; + *q++ = eqv; + if (iswide((wchar_t) value)) + *q++ = ' '; + } + } + } + *q = 0; + *result = q - buffer; + } else { + *result = 0; + } return buffer; } #endif /* OPT_WIDE_CHARS */ @@ -1093,7 +1110,7 @@ _SelectionTargets(Widget w) if (!IsXtermWidget(w)) return NULL; - screen = &((XtermWidget) w)->screen; + screen = TScreenOf((XtermWidget) w); #if OPT_WIDE_CHARS if (screen->wide_chars) { @@ -1181,9 +1198,9 @@ MapSelections(XtermWidget xw, String * params, Cardinal num_params) } } if (map) { - String mapTo = (xw->screen.selectToClipboard - ? "CLIPBOARD" - : "PRIMARY"); + const char *mapTo = (xw->screen.selectToClipboard + ? "CLIPBOARD" + : "PRIMARY"); UnmapSelections(xw); if ((result = TypeMallocN(String, num_params + 1)) != 0) { @@ -1519,9 +1536,9 @@ _WriteKey(TScreen * screen, Char * in) unsigned length = strlen((char *) in); if (screen->control_eight_bits) { - line[count++] = CSI; + line[count++] = ANSI_CSI; } else { - line[count++] = ESC; + line[count++] = ANSI_ESC; line[count++] = '['; } while (length--) @@ -1554,7 +1571,7 @@ SelectionReceived(Widget w, if (!IsXtermWidget(w)) return; - screen = &((XtermWidget) w)->screen; + screen = TScreenOf((XtermWidget) w); dpy = XtDisplay(w); if (*type == 0 /*XT_CONVERT_FAIL */ @@ -1569,9 +1586,9 @@ SelectionReceived(Widget w, #if OPT_WIDE_CHARS if (screen->wide_chars) { - if (*type == XA_UTF8_STRING(XtDisplay(w)) || + if (*type == XA_UTF8_STRING(dpy) || *type == XA_STRING || - *type == XA_COMPOUND_TEXT(XtDisplay(w))) { + *type == XA_COMPOUND_TEXT(dpy)) { GettingSelection(dpy, *type, line, *length); if (Xutf8TextPropertyToTextList(dpy, &text_prop, &text_list, @@ -1585,16 +1602,33 @@ SelectionReceived(Widget w, { /* Convert the selection to locale's multibyte encoding. */ - /* There's no need to special-case UTF8_STRING. If Xlib - doesn't know about it, we didn't request it. If a broken - selection holder sends it anyhow, the conversion function - will fail. */ - - if (*type == XA_UTF8_STRING(XtDisplay(w)) || + if (*type == XA_UTF8_STRING(dpy) || *type == XA_STRING || - *type == XA_COMPOUND_TEXT(XtDisplay(w))) { + *type == XA_COMPOUND_TEXT(dpy)) { Status rc; + GettingSelection(dpy, *type, line, *length); + +#if OPT_WIDE_CHARS + if (*type == XA_UTF8_STRING(dpy) && + !(screen->wide_chars || screen->c1_printable)) { + rc = Xutf8TextPropertyToTextList(dpy, &text_prop, + &text_list, &text_list_count); + if (text_list != NULL && text_list_count != 0) { + int i; + Char *data; + unsigned long size; + for (i = 0; i < text_list_count; ++i) { + data = (Char *) text_list[i]; + size = strlen(text_list[i]); + data = UTF8toLatin1(data, size, &size); + XFree(text_list[i]); + text_list[i] = XtMalloc(size + 1); + memcpy(text_list[i], data, size + 1); + } + } + } else +#endif if (*type == XA_STRING && screen->brokenSelections) { rc = XTextPropertyToStringList(&text_prop, &text_list, &text_list_count); @@ -1688,12 +1722,17 @@ HandleInsertSelection(Widget w, } static SelectUnit -EvalSelectUnit(TScreen * screen, Time buttonDownTime, SelectUnit defaultUnit) +EvalSelectUnit(TScreen * screen, + Time buttonDownTime, + SelectUnit defaultUnit, + unsigned int button) { SelectUnit result; int delta; - if (screen->lastButtonUpTime == (Time) 0) { + if (button != screen->lastButton) { + delta = term->screen.multiClickTime + 1; + } else if (screen->lastButtonUpTime == (Time) 0) { /* first time and once in a blue moon */ delta = screen->multiClickTime + 1; } else if (buttonDownTime > screen->lastButtonUpTime) { @@ -1724,7 +1763,10 @@ do_select_start(XtermWidget xw, if (SendMousePosition(xw, event)) return; - screen->selectUnit = EvalSelectUnit(screen, event->xbutton.time, Select_CHAR); + screen->selectUnit = EvalSelectUnit(screen, + event->xbutton.time, + Select_CHAR, + event->xbutton.button); screen->replyToEmacs = False; #if OPT_READLINE @@ -1778,13 +1820,16 @@ TrackDown(XtermWidget xw, XButtonEvent * event) TScreen *screen = &(xw->screen); CELL cell; - screen->selectUnit = EvalSelectUnit(screen, event->time, Select_CHAR); + screen->selectUnit = EvalSelectUnit(screen, + event->time, + Select_CHAR, + event->button); if (screen->numberOfClicks > 1) { PointToCELL(screen, event->y, event->x, &cell); screen->replyToEmacs = True; StartSelect(xw, &cell); } else { - waitingForTrackInfo = True; + screen->waitingForTrackInfo = True; EditorButton(xw, (XButtonEvent *) event); } } @@ -1801,10 +1846,12 @@ TrackMouse(XtermWidget xw, int firstrow, int lastrow) { - if (waitingForTrackInfo) { /* if Timed, ignore */ - waitingForTrackInfo = False; + TScreen *screen = &(xw->screen); + + if (screen->waitingForTrackInfo) { /* if Timed, ignore */ + screen->waitingForTrackInfo = False; + if (func != 0) { - TScreen *screen = &(xw->screen); CELL first = *start; boundsCheck(first.row); @@ -1834,10 +1881,10 @@ StartSelect(XtermWidget xw, const CELL * cell) screen->saveStartR = screen->startExt = screen->rawPos; screen->saveEndR = screen->endExt = screen->rawPos; if (Coordinate(screen, cell) < Coordinate(screen, &(screen->rawPos))) { - eventMode = LEFTEXTENSION; + screen->eventMode = LEFTEXTENSION; screen->startExt = *cell; } else { - eventMode = RIGHTEXTENSION; + screen->eventMode = RIGHTEXTENSION; screen->endExt = *cell; } ComputeSelect(xw, &(screen->startExt), &(screen->endExt), False); @@ -1862,13 +1909,14 @@ EndExtend(XtermWidget xw, } ExtendExtend(xw, &cell); screen->lastButtonUpTime = event->xbutton.time; + screen->lastButton = event->xbutton.button; if (!isSameCELL(&(screen->startSel), &(screen->endSel))) { if (screen->replyToEmacs) { count = 0; if (screen->control_eight_bits) { - line[count++] = CSI; + line[count++] = ANSI_CSI; } else { - line[count++] = ESC; + line[count++] = ANSI_ESC; line[count++] = '['; } if (isSameCELL(&(screen->rawPos), &(screen->startSel)) @@ -1892,7 +1940,7 @@ EndExtend(XtermWidget xw, } } SelectSet(xw, event, params, num_params); - eventMode = NORMAL; + screen->eventMode = NORMAL; } void @@ -1951,7 +1999,10 @@ do_start_extend(XtermWidget xw, || event->xbutton.button != Button3 || !(SCREEN_FLAG(screen, dclick3_deletes))) #endif - screen->selectUnit = EvalSelectUnit(screen, event->xbutton.time, screen->selectUnit); + screen->selectUnit = EvalSelectUnit(screen, + event->xbutton.time, + screen->selectUnit, + event->xbutton.button); screen->replyToEmacs = False; #if OPT_READLINE @@ -1981,11 +2032,11 @@ do_start_extend(XtermWidget xw, < Abs(coord - Coordinate(screen, &(screen->endSel))) || coord < Coordinate(screen, &(screen->startSel))) { /* point is close to left side of selection */ - eventMode = LEFTEXTENSION; + screen->eventMode = LEFTEXTENSION; screen->startExt = cell; } else { /* point is close to left side of selection */ - eventMode = RIGHTEXTENSION; + screen->eventMode = RIGHTEXTENSION; screen->endExt = cell; } ComputeSelect(xw, &(screen->startExt), &(screen->endExt), True); @@ -2003,19 +2054,19 @@ ExtendExtend(XtermWidget xw, const CELL * cell) int coord = Coordinate(screen, cell); TRACE(("ExtendExtend row=%d, col=%d\n", cell->row, cell->col)); - if (eventMode == LEFTEXTENSION + if (screen->eventMode == LEFTEXTENSION && ((coord + (screen->selectUnit != Select_CHAR)) > Coordinate(screen, &(screen->endSel)))) { /* Whoops, he's changed his mind. Do RIGHTEXTENSION */ - eventMode = RIGHTEXTENSION; + screen->eventMode = RIGHTEXTENSION; screen->startExt = screen->saveStartR; - } else if (eventMode == RIGHTEXTENSION + } else if (screen->eventMode == RIGHTEXTENSION && coord < Coordinate(screen, &(screen->startSel))) { /* Whoops, he's changed his mind. Do LEFTEXTENSION */ - eventMode = LEFTEXTENSION; + screen->eventMode = LEFTEXTENSION; screen->endExt = screen->saveEndR; } - if (eventMode == LEFTEXTENSION) { + if (screen->eventMode == LEFTEXTENSION) { screen->startExt = *cell; } else { screen->endExt = *cell; @@ -2430,11 +2481,13 @@ make_indexed_text(TScreen * screen, int row, unsigned length, int *indexed) /* some internal points may not be drawn */ if (data == 0) data = ' '; -#if OPT_WIDE_CHARS - next = convertToUTF8(last, data); -#else - *next++ = CharOf(data); -#endif + + if_WIDE_OR_NARROW(screen, { + next = convertToUTF8(last, data); + } + , { + *next++ = CharOf(data); + }); if_OPT_WIDE_CHARS(screen, { int off; @@ -2491,6 +2544,14 @@ columnToCell(TScreen * screen, int row, int col, CELL * cell) if (col <= last) { break; } + /* + * Stop if the current row does not wrap (does not continue the current + * line). + */ + if (!ScrnTstWrapped(screen, row)) { + col = last + 1; + break; + } col -= (last + 1); ++row; } @@ -2517,7 +2578,8 @@ cellToColumn(TScreen * screen, CELL * cell) static void do_select_regex(TScreen * screen, CELL * startc, CELL * endc) { - char *expr = screen->selectExpr[screen->numberOfClicks - 1]; + int inx = ((screen->numberOfClicks - 1) % screen->maxClicks); + char *expr = screen->selectExpr[inx]; regex_t preg; regmatch_t match; char *search; @@ -2567,17 +2629,23 @@ do_select_regex(TScreen * screen, CELL * startc, CELL * endc) } } if (best_col >= 0) { + int best_nxt = best_col + best_len; columnToCell(screen, firstRow, best_col, startc); - columnToCell(screen, firstRow, best_col + best_len, endc); + columnToCell(screen, firstRow, best_nxt, endc); TRACE(("search::%s\n", search)); TRACE(("indexed:%d..%d -> %d..%d\n", - best_col, best_col + best_len, + best_col, best_nxt, indexed[best_col], - indexed[best_col + best_len])); - TRACE(("matched:%.*s\n", - indexed[best_col + best_len] + 1 - + indexed[best_nxt])); + TRACE(("matched:%d:%s\n", + indexed[best_nxt] + 1 - indexed[best_col], - search + indexed[best_col])); + visibleChars(PAIRED_CHARS((Char *) (search + + indexed[best_col]), + 0), + (unsigned) (indexed[best_nxt] + + 1 - + indexed[best_col])))); } free(search); } @@ -2945,7 +3013,9 @@ SaltTextAway(XtermWidget xw, } *lp = '\0'; /* make sure we have end marked */ - TRACE(("Salted TEXT:%d:%.*s\n", lp - line, lp - line, line)); + TRACE(("Salted TEXT:%d:%s\n", lp - line, + visibleChars(PAIRED_CHARS(line, 0), (unsigned) (lp - line)))); + screen->selection_length = (lp - line); _OwnSelection(xw, params, num_params); } @@ -3059,11 +3129,12 @@ _ConvertSelectionHelper(Widget w, XICCEncodingStyle conversion_style) { if (IsXtermWidget(w)) { - Display *d = XtDisplay(w); - TScreen *screen = &((XtermWidget) w)->screen; + Display *dpy = XtDisplay(w); + TScreen *screen = TScreenOf((XtermWidget) w); XTextProperty textprop; + char *the_data = (char *) screen->selection_data; - if (conversion_function(d, (char **) &screen->selection_data, 1, + if (conversion_function(dpy, &the_data, 1, conversion_style, &textprop) >= Success) { *value = (XtPointer) textprop.value; @@ -3085,46 +3156,54 @@ ConvertSelection(Widget w, unsigned long *length, int *format) { - Display *d = XtDisplay(w); + Display *dpy = XtDisplay(w); TScreen *screen; Bool result = False; if (!IsXtermWidget(w)) return False; - screen = &((XtermWidget) w)->screen; + screen = TScreenOf((XtermWidget) w); if (screen->selection_data == NULL) return False; /* can this happen? */ - if (*target == XA_TARGETS(d)) { + if (*target == XA_TARGETS(dpy)) { + Atom *allocP; Atom *targetP; Atom *std_targets; XPointer std_return = 0; unsigned long std_length; - TRACE(("ConvertSelection XA_TARGETS(d)\n")); + TRACE(("ConvertSelection XA_TARGETS(dpy)\n")); if (XmuConvertStandardSelection(w, screen->selection_time, selection, target, type, &std_return, &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(d); + *targetP++ = XA_TEXT(dpy); #ifdef X_HAVE_UTF8_STRING - *targetP++ = XA_COMPOUND_TEXT(d); - *targetP++ = XA_UTF8_STRING(d); + *targetP++ = XA_COMPOUND_TEXT(dpy); + *targetP++ = XA_UTF8_STRING(dpy); #else - *targetP = XA_COMPOUND_TEXT(d); + *targetP = XA_COMPOUND_TEXT(dpy); if_OPT_WIDE_CHARS(screen, { - *targetP = XA_UTF8_STRING(d); + *targetP = XA_UTF8_STRING(dpy); }); targetP++; #endif - *targetP++ = XA_LENGTH(d); - *targetP++ = XA_LIST_LENGTH(d); + *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; @@ -3140,22 +3219,22 @@ ConvertSelection(Widget w, type, value, length, format, Xutf8TextListToTextProperty, XStringStyle); - } else if (screen->wide_chars && *target == XA_UTF8_STRING(d)) { - TRACE(("ConvertSelection XA_UTF8_STRING(d) - wide\n")); + } else if (screen->wide_chars && *target == XA_UTF8_STRING(dpy)) { + TRACE(("ConvertSelection XA_UTF8_STRING(dpy) - wide\n")); result = _ConvertSelectionHelper(w, type, value, length, format, Xutf8TextListToTextProperty, XUTF8StringStyle); - } else if (screen->wide_chars && *target == XA_TEXT(d)) { - TRACE(("ConvertSelection XA_TEXT(d) - wide\n")); + } else if (screen->wide_chars && *target == XA_TEXT(dpy)) { + TRACE(("ConvertSelection XA_TEXT(dpy) - wide\n")); result = _ConvertSelectionHelper(w, type, value, length, format, Xutf8TextListToTextProperty, XStdICCTextStyle); - } else if (screen->wide_chars && *target == XA_COMPOUND_TEXT(d)) { - TRACE(("ConvertSelection XA_COMPOUND_TEXT(d) - wide\n")); + } else if (screen->wide_chars && *target == XA_COMPOUND_TEXT(dpy)) { + TRACE(("ConvertSelection XA_COMPOUND_TEXT(dpy) - wide\n")); result = _ConvertSelectionHelper(w, type, value, length, format, @@ -3177,15 +3256,15 @@ ConvertSelection(Widget w, *length = screen->selection_length; *format = 8; result = True; - } else if (*target == XA_TEXT(d)) { /* not wide_chars */ - TRACE(("ConvertSelection XA_TEXT(d)\n")); + } else if (*target == XA_TEXT(dpy)) { /* not wide_chars */ + TRACE(("ConvertSelection XA_TEXT(dpy)\n")); result = _ConvertSelectionHelper(w, type, value, length, format, XmbTextListToTextProperty, XStdICCTextStyle); - } else if (*target == XA_COMPOUND_TEXT(d)) { /* not wide_chars */ - TRACE(("ConvertSelection XA_COMPOUND_TEXT(d)\n")); + } else if (*target == XA_COMPOUND_TEXT(dpy)) { /* not wide_chars */ + TRACE(("ConvertSelection XA_COMPOUND_TEXT(dpy)\n")); result = _ConvertSelectionHelper(w, type, value, length, format, @@ -3193,8 +3272,8 @@ ConvertSelection(Widget w, XCompoundTextStyle); } #ifdef X_HAVE_UTF8_STRING - else if (*target == XA_UTF8_STRING(d)) { /* not wide_chars */ - TRACE(("ConvertSelection XA_UTF8_STRING(d)\n")); + else if (*target == XA_UTF8_STRING(dpy)) { /* not wide_chars */ + TRACE(("ConvertSelection XA_UTF8_STRING(dpy)\n")); result = _ConvertSelectionHelper(w, type, value, length, format, @@ -3202,8 +3281,8 @@ ConvertSelection(Widget w, XUTF8StringStyle); } #endif - else if (*target == XA_LIST_LENGTH(d)) { - TRACE(("ConvertSelection XA_LIST_LENGTH(d)\n")); + else if (*target == XA_LIST_LENGTH(dpy)) { + TRACE(("ConvertSelection XA_LIST_LENGTH(dpy)\n")); *value = XtMalloc(4); if (sizeof(long) == 4) *(long *) *value = 1; @@ -3215,8 +3294,8 @@ ConvertSelection(Widget w, *length = 1; *format = 32; result = True; - } else if (*target == XA_LENGTH(d)) { - TRACE(("ConvertSelection XA_LENGTH(d)\n")); + } else if (*target == XA_LENGTH(dpy)) { + TRACE(("ConvertSelection XA_LENGTH(dpy)\n")); /* This value is wrong if we have UTF-8 text */ *value = XtMalloc(4); if (sizeof(long) == 4) { @@ -3251,7 +3330,7 @@ LoseSelection(Widget w, Atom * selection) if (!IsXtermWidget(w)) return; - screen = &((XtermWidget) w)->screen; + screen = TScreenOf((XtermWidget) w); for (i = 0, atomP = screen->selection_atoms; i < screen->selection_count; i++, atomP++) { if (*selection == *atomP) @@ -3394,6 +3473,21 @@ DisownSelection(XtermWidget xw) } } +void +UnhiliteSelection(XtermWidget xw) +{ + TScreen *screen = &(xw->screen); + + if (ScrnHaveSelection(screen)) { + CELL first = screen->startH; + CELL last = screen->endH; + + screen->startH = zeroCELL; + screen->endH = zeroCELL; + ReHiliteText(xw, &first, &last); + } +} + /* returns number of chars in line from scol to ecol out */ /* ARGSUSED */ static int @@ -3446,7 +3540,7 @@ SaveText(TScreen * screen, are in memory attached to the HIDDEN_CHAR */ if_OPT_WIDE_CHARS(screen, { if (screen->utf8_mode != uFalse) { - int ch; + unsigned ch; int off; for (off = OFF_FINAL; off < MAX_PTRS; off += 2) { if ((ch = XTERM_CELLC(row, i, off)) == 0) @@ -3461,7 +3555,7 @@ SaveText(TScreen * screen, if (screen->utf8_mode != uFalse) { lp = convertToUTF8(lp, (c != 0) ? c : ' '); if_OPT_WIDE_CHARS(screen, { - int ch; + unsigned ch; int off; for (off = OFF_FINAL; off < MAX_PTRS; off += 2) { if ((ch = XTERM_CELLC(row, i, off)) == 0) @@ -3475,10 +3569,7 @@ SaveText(TScreen * screen, if (c == 0) { c = E2A(' '); } else if (c < E2A(' ')) { - if (c == XPOUND) - c = 0x23; /* char on screen is pound sterling */ - else - c += 0x5f; /* char is from DEC drawing set */ + c = DECtoASCII(c); } else if (c == 0x7f) { c = 0x5f; } @@ -3538,6 +3629,7 @@ EditorButton(XtermWidget xw, XButtonEvent * event) int row, col; int button; unsigned count = 0; + Boolean changed = True; /* If button event, get button # adjusted for DEC compatibility */ button = event->button - 1; @@ -3565,9 +3657,9 @@ EditorButton(XtermWidget xw, XButtonEvent * event) /* Build key sequence starting with \E[M */ if (screen->control_eight_bits) { - line[count++] = CSI; + line[count++] = ANSI_CSI; } else { - line[count++] = ESC; + line[count++] = ANSI_ESC; line[count++] = '['; } #if OPT_SCO_FUNC_KEYS @@ -3605,55 +3697,55 @@ EditorButton(XtermWidget xw, XButtonEvent * event) * events only if character cell has changed. */ if ((row == screen->mouse_row) - && (col == screen->mouse_col)) - return; - line[count++] = BtnCode(event, screen->mouse_button); + && (col == screen->mouse_col)) { + changed = False; + } else { + line[count++] = BtnCode(event, screen->mouse_button); + } break; default: - return; + changed = False; + break; } } - screen->mouse_row = row; - screen->mouse_col = col; + if (changed) { + screen->mouse_row = row; + screen->mouse_col = col; - /* Add pointer position to key sequence */ - line[count++] = ' ' + col + 1; - line[count++] = ' ' + row + 1; + /* Add pointer position to key sequence */ + line[count++] = ' ' + col + 1; + line[count++] = ' ' + row + 1; - TRACE(("mouse at %d,%d button+mask = %#x\n", row, col, - (screen->control_eight_bits) ? line[2] : line[3])); + TRACE(("mouse at %d,%d button+mask = %#x\n", row, col, + (screen->control_eight_bits) ? line[2] : line[3])); - /* Transmit key sequence to process running under xterm */ - v_write(pty, line, count); + /* Transmit key sequence to process running under xterm */ + v_write(pty, line, count); + } + return; } -/*ARGSUSED*/ -#if OPT_TEK4014 +#if OPT_FOCUS_EVENT void -HandleGINInput(Widget w GCC_UNUSED, - XEvent * event GCC_UNUSED, - String * param_list, - Cardinal *nparamsp) -{ - if (term->screen.TekGIN && *nparamsp == 1) { - int c = param_list[0][0]; - switch (c) { - case 'l': - case 'm': - case 'r': - case 'L': - case 'M': - case 'R': - break; - default: - Bell(XkbBI_MinorError, 0); /* let them know they goofed */ - c = 'l'; /* provide a default */ +SendFocusButton(XtermWidget xw, XFocusChangeEvent * event) +{ + TScreen *screen = &(xw->screen); + + if (screen->send_focus_pos) { + ANSI reply; + + memset(&reply, 0, sizeof(reply)); + reply.a_type = ANSI_CSI; + +#if OPT_SCO_FUNC_KEYS + if (xw->keyboard.type == keyboardIsSCO) { + reply.a_pintro = '>'; } - TekEnqMouse(c | 0x80); - TekGINoff(); - } else { - Bell(XkbBI_MinorError, 0); +#endif + reply.a_final = (event->type == FocusIn) ? 'I' : 'O'; + unparseseq(xw, &reply); } + return; } -#endif /* OPT_TEK4014 */ +#endif /* OPT_FOCUS_EVENT */ diff --git a/app/xterm/cachedGCs.c b/app/xterm/cachedGCs.c index ca699fb83..a72ef3f46 100644 --- a/app/xterm/cachedGCs.c +++ b/app/xterm/cachedGCs.c @@ -1,8 +1,8 @@ -/* $XTermId: cachedGCs.c,v 1.35 2007/03/21 23:21:50 tom Exp $ */ +/* $XTermId: cachedGCs.c,v 1.48 2008/02/20 20:54:54 Julien.Cristau 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"); } @@ -245,26 +247,48 @@ tracePixel(XtermWidget xw, Pixel value) #endif /* OPT_TRACE > 1 */ #endif /* OPT_TRACE */ +static CgsCache * +allocCache(void **cache_pointer) +{ + if (*cache_pointer == 0) { + *cache_pointer = TypeCallocN(CgsCache, gcMAX); + TRACE(("allocCache %p\n", cache_pointer)); + } + return *((CgsCache **) cache_pointer); +} + +static int +dataIndex(CgsCache * me) +{ + return ITEM(); +} + +static void +relinkData(CgsCache * me, int item) +{ + LINK(item); +} + /* - * FIXME: move the cache into XtermWidget + * Returns the appropriate cache pointer. */ static CgsCache * -myCache(XtermWidget xw GCC_UNUSED, VTwin * cgsWin GCC_UNUSED, CgsEnum cgsId) +myCache(XtermWidget xw, VTwin * cgsWin, CgsEnum cgsId) { - static CgsCache *main_cache; - CgsCache *my_cache; CgsCache *result = 0; - if (main_cache == 0) - main_cache = (CgsCache *) calloc(gcMAX, sizeof(CgsCache)); - my_cache = main_cache; if ((int) cgsId >= 0 && cgsId < gcMAX) { -#ifndef NO_ACTIVE_ICON - static CgsCache icon_cache[gcMAX]; +#ifdef NO_ACTIVE_ICON + (void) xw; + (void) cgsWin; +#else if (cgsWin == &(xw->screen.iconVwin)) - my_cache = icon_cache; + result = allocCache(&(xw->screen.icon_cgs_cache)); + else #endif - result = my_cache + cgsId; + result = allocCache(&(xw->screen.main_cgs_cache)); + + result += cgsId; if (result->data == 0) { result->data = result->list; } @@ -303,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) { @@ -369,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) { @@ -377,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. */ @@ -456,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)))); @@ -489,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); - } } } } @@ -633,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; @@ -762,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); } } } @@ -803,3 +854,14 @@ freeCgs(XtermWidget xw, VTwin * cgsWin, CgsEnum cgsId) } return 0; } + +#ifdef NO_LEAKS +void +noleaks_cachedCgs(XtermWidget xw) +{ +#ifndef NO_ACTIVE_ICON + free(xw->screen.icon_cgs_cache); +#endif + free(xw->screen.main_cgs_cache); +} +#endif diff --git a/app/xterm/charproc.c b/app/xterm/charproc.c index 745f7b0b1..54d6dca7e 100644 --- a/app/xterm/charproc.c +++ b/app/xterm/charproc.c @@ -1,10 +1,8 @@ -/* $XTermId: charproc.c,v 1.727 2006/08/03 23:52:22 tom Exp $ */ - -/* $XFree86: xc/programs/xterm/charproc.c,v 3.185 2006/06/20 00:42:38 dickey Exp $ */ +/* $XTermId: charproc.c,v 1.836 2008/02/29 01:55:13 tom Exp $ */ /* -Copyright 1999-2005,2006 by Thomas E. Dickey +Copyright 1999-2007,2008 by Thomas E. Dickey All Rights Reserved @@ -133,12 +131,6 @@ in this Software without prior written authorization from The Open Group. #include <charclass.h> #include <xstrings.h> -#if OPT_ZICONBEEP || OPT_TOOLBAR -#define HANDLE_STRUCT_NOTIFY 1 -#else -#define HANDLE_STRUCT_NOTIFY 0 -#endif - static IChar doinput(void); static int set_character_class(char *s); static void FromAlternate(XtermWidget /* xw */ ); @@ -146,9 +138,6 @@ static void RequestResize(XtermWidget termw, int rows, int cols, Bool text); static void SwitchBufs(XtermWidget xw); static void ToAlternate(XtermWidget /* xw */ ); static void VTallocbuf(void); -static void WriteText(XtermWidget xw, - PAIRED_CHARS(Char * str, Char * str2), - Cardinal len); static void ansi_modes(XtermWidget termw, void (*func) (unsigned *p, unsigned mask)); static void bitclr(unsigned *p, unsigned mask); @@ -268,6 +257,7 @@ static XtActionsRec actionsList[] = { { "bell", HandleBell }, { "clear-saved-lines", HandleClearSavedLines }, { "create-menu", HandleCreateMenu }, + { "delete-is-del", HandleDeleteIsDEL }, { "dired-button", DiredButton }, { "hard-reset", HandleHardReset }, { "ignore", HandleIgnore }, @@ -282,7 +272,6 @@ static XtActionsRec actionsList[] = { { "print-redir", HandlePrintControlMode }, { "quit", HandleQuit }, { "redraw", HandleRedraw }, - { "delete-is-del", HandleDeleteIsDEL }, { "scroll-back", HandleScrollBack }, { "scroll-forw", HandleScrollForward }, { "secure", HandleSecure }, @@ -302,10 +291,13 @@ static XtActionsRec actionsList[] = { { "set-autolinefeed", HandleAutoLineFeed }, { "set-autowrap", HandleAutoWrap }, { "set-backarrow", HandleBackarrow }, + { "set-bellIsUrgent", HandleBellIsUrgent }, { "set-cursesemul", HandleCursesEmul }, { "set-jumpscroll", HandleJumpscroll }, - { "set-old-function-keys", HandleOldFunctionKeys }, + { "set-keep-selection", HandleKeepSelection }, { "set-marginbell", HandleMarginBell }, + { "set-old-function-keys", HandleOldFunctionKeys }, + { "set-pop-on-bell", HandleSetPopOnBell }, { "set-reverse-video", HandleReverseVideo }, { "set-reversewrap", HandleReverseWrap }, { "set-scroll-on-key", HandleScrollKey }, @@ -315,7 +307,6 @@ static XtActionsRec actionsList[] = { { "set-sun-keyboard", HandleSunKeyboard }, { "set-titeInhibit", HandleTiteInhibit }, { "set-visual-bell", HandleSetVisualBell }, - { "set-pop-on-bell", HandleSetPopOnBell }, { "set-vt-font", HandleSetFont }, { "soft-reset", HandleSoftReset }, { "start-cursor-extend", HandleKeyboardStartExtend }, @@ -341,6 +332,9 @@ static XtActionsRec actionsList[] = { #if OPT_DEC_SOFTFONT { "set-font-loading", HandleFontLoading }, #endif +#if OPT_EXEC_XTERM + { "spawn-new-terminal", HandleSpawnTerminal }, +#endif #if OPT_HP_FUNC_KEYS { "set-hp-function-keys", HandleHpFunctionKeys }, #endif @@ -395,7 +389,11 @@ static XtActionsRec actionsList[] = { static XtResource resources[] = { Bres(XtNallowSendEvents, XtCAllowSendEvents, screen.allowSendEvent0, False), + Bres(XtNallowTitleOps, XtCAllowTitleOps, screen.allowTitleOp0, True), Bres(XtNallowWindowOps, XtCAllowWindowOps, screen.allowWindowOp0, True), + Bres(XtNaltIsNotMeta, XtCAltIsNotMeta, screen.alt_is_not_meta, False), + Bres(XtNaltSendsEscape, XtCAltSendsEscape, screen.alt_sends_esc, False), + Bres(XtNalwaysBoldMode, XtCAlwaysBoldMode, screen.always_bold_mode, False), Bres(XtNalwaysHighlight, XtCAlwaysHighlight, screen.always_highlight, False), Bres(XtNappcursorDefault, XtCAppcursorDefault, misc.appcursorDefault, False), Bres(XtNappkeypadDefault, XtCAppkeypadDefault, misc.appkeypadDefault, False), @@ -403,6 +401,7 @@ static XtResource resources[] = Bres(XtNawaitInput, XtCAwaitInput, screen.awaitInput, False), Bres(XtNfreeBoldBox, XtCFreeBoldBox, screen.free_bold_box, False), Bres(XtNbackarrowKey, XtCBackarrowKey, screen.backarrow_key, True), + Bres(XtNbellIsUrgent, XtCBellIsUrgent, screen.bellIsUrgent, False), Bres(XtNbellOnReset, XtCBellOnReset, screen.bellOnReset, True), Bres(XtNboldMode, XtCBoldMode, screen.bold_mode, True), Bres(XtNbrokenSelections, XtCBrokenSelections, screen.brokenSelections, False), @@ -421,6 +420,7 @@ static XtResource resources[] = Bres(XtNhpLowerleftBugCompat, XtCHpLowerleftBugCompat, screen.hp_ll_bc, False), Bres(XtNi18nSelections, XtCI18nSelections, screen.i18nSelections, True), Bres(XtNjumpScroll, XtCJumpScroll, screen.jumpscroll, True), + Bres(XtNkeepSelection, XtCKeepSelection, screen.keepSelection, False), Bres(XtNloginShell, XtCLoginShell, misc.login_shell, False), Bres(XtNmarginBell, XtCMarginBell, screen.marginbell, False), Bres(XtNmetaSendsEscape, XtCMetaSendsEscape, screen.meta_sends_esc, False), @@ -430,6 +430,7 @@ static XtResource resources[] = Bres(XtNprinterAutoClose, XtCPrinterAutoClose, screen.printer_autoclose, False), Bres(XtNprinterExtent, XtCPrinterExtent, screen.printer_extent, False), Bres(XtNprinterFormFeed, XtCPrinterFormFeed, screen.printer_formfeed, False), + Bres(XtNquietGrab, XtCQuietGrab, screen.quiet_grab, False), Bres(XtNreverseVideo, XtCReverseVideo, misc.re_verse, False), Bres(XtNreverseWrap, XtCReverseWrap, misc.reverseWrap, False), Bres(XtNscrollBar, XtCScrollBar, misc.scrollbar, False), @@ -449,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), @@ -456,6 +458,7 @@ static XtResource resources[] = Ires(XtNscrollBarBorder, XtCScrollBarBorder, screen.scrollBarBorder, 1), Ires(XtNscrollLines, XtCScrollLines, screen.scrolllines, SCROLLLINES), + Sres(XtNinitialFont, XtCInitialFont, screen.initial_font, NULL), Sres(XtNfont1, XtCFont1, screen.MenuFontName(fontMenu_font1), NULL), Sres(XtNfont2, XtCFont2, screen.MenuFontName(fontMenu_font2), NULL), Sres(XtNfont3, XtCFont3, screen.MenuFontName(fontMenu_font3), NULL), @@ -495,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 */ @@ -529,6 +532,10 @@ static XtResource resources[] = Bres(XtNallowC1Printable, XtCAllowC1Printable, screen.c1_printable, False), #endif +#if OPT_CLIP_BOLD + Bres(XtNuseClipping, XtCUseClipping, screen.use_clipping, True), +#endif + #if OPT_DEC_CHRSET Bres(XtNfontDoublesize, XtCFontDoublesize, screen.font_doublesize, True), Ires(XtNcacheDoublesize, XtCCacheDoublesize, screen.cache_doublesize, NUM_CHRSET), @@ -536,6 +543,9 @@ static XtResource resources[] = #if OPT_HIGHLIGHT_COLOR Tres(XtNhighlightColor, XtCHighlightColor, HIGHLIGHT_BG, XtDefaultForeground), + Tres(XtNhighlightTextColor, XtCHighlightTextColor, HIGHLIGHT_FG, XtDefaultBackground), + Bres(XtNhighlightReverse, XtCHighlightReverse, screen.hilite_reverse, True), + Bres(XtNhighlightColorMode, XtCHighlightColorMode, screen.hilite_color, Maybe), #endif /* OPT_HIGHLIGHT_COLOR */ #if OPT_INPUT_METHOD @@ -626,7 +636,7 @@ static XtResource resources[] = #if OPT_TEK4014 Bres(XtNtekInhibit, XtCTekInhibit, misc.tekInhibit, False), Bres(XtNtekSmall, XtCTekSmall, misc.tekSmall, False), - Bres(XtNtekStartup, XtCTekStartup, screen.TekEmu, False), + Bres(XtNtekStartup, XtCTekStartup, misc.TekEmu, False), #endif #if OPT_TOOLBAR @@ -642,6 +652,8 @@ static XtResource resources[] = Bres(XtNvt100Graphics, XtCVT100Graphics, screen.vt100_graphics, True), Bres(XtNwideChars, XtCWideChars, screen.wide_chars, False), Ires(XtNcombiningChars, XtCCombiningChars, screen.max_combining, 2), + Ires(XtNmkSamplePass, XtCMkSamplePass, misc.mk_samplepass, 256), + Ires(XtNmkSampleSize, XtCMkSampleSize, misc.mk_samplesize, 1024), Ires(XtNutf8, XtCUtf8, screen.utf8_mode, uDefault), Sres(XtNwideBoldFont, XtCWideBoldFont, misc.default_font.f_wb, DEFWIDEBOLDFONT), Sres(XtNwideFont, XtCWideFont, misc.default_font.f_w, DEFWIDEFONT), @@ -668,7 +680,14 @@ static XtResource resources[] = #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), @@ -793,6 +812,11 @@ xtermAddInput(Widget w) XtAppAddActions(app_con, input_actions, XtNumber(input_actions)); #endif XtAugmentTranslations(w, XtParseTranslationTable(defaultTranslations)); + +#if OPT_EXTRA_PASTE + if (term && term->keyboard.extra_translations) + XtOverrideTranslations((Widget) term, XtParseTranslationTable(term->keyboard.extra_translations)); +#endif } #if OPT_ISO_COLORS @@ -816,13 +840,11 @@ SGR_Foreground(XtermWidget xw, int color) fg = getXtermForeground(xw, xw->flags, color); xw->cur_foreground = color; - if (NormalGC(screen) != NormalBoldGC(screen)) { - XSetForeground(screen->display, NormalBoldGC(screen), fg); - XSetBackground(screen->display, ReverseBoldGC(screen), fg); - } else { - XSetForeground(screen->display, NormalGC(screen), fg); - XSetBackground(screen->display, ReverseGC(screen), fg); - } + setCgsFore(xw, WhichVWin(screen), gcNorm, fg); + setCgsBack(xw, WhichVWin(screen), gcNormReverse, fg); + + setCgsFore(xw, WhichVWin(screen), gcBold, fg); + setCgsBack(xw, WhichVWin(screen), gcBoldReverse, fg); } void @@ -848,13 +870,11 @@ SGR_Background(XtermWidget xw, int color) bg = getXtermBackground(xw, xw->flags, color); xw->cur_background = color; - if (NormalGC(screen) != NormalBoldGC(screen)) { - XSetBackground(screen->display, NormalBoldGC(screen), bg); - XSetForeground(screen->display, ReverseBoldGC(screen), bg); - } else { - XSetBackground(screen->display, NormalGC(screen), bg); - XSetForeground(screen->display, ReverseGC(screen), bg); - } + setCgsBack(xw, WhichVWin(screen), gcNorm, bg); + setCgsFore(xw, WhichVWin(screen), gcNormReverse, bg); + + setCgsBack(xw, WhichVWin(screen), gcBold, bg); + setCgsFore(xw, WhichVWin(screen), gcBoldReverse, bg); } /* Invoked after updating bold/underline flags, computes the extended color @@ -1023,12 +1043,12 @@ set_max_row(TScreen * screen, int rows) #if OPT_MOD_FKEYS static void -set_mod_fkeys(XtermWidget xw, int which, int what) +set_mod_fkeys(XtermWidget xw, int which, int what, Bool enabled) { #define SET_MOD_FKEYS(field) \ - xw->keyboard.modify_now.field = (what == DEFAULT) \ + xw->keyboard.modify_now.field = ((what == DEFAULT) && enabled) \ ? xw->keyboard.modify_1st.field \ - : param[1]; \ + : what; \ TRACE(("set modify_now.%s to %d\n", #field, \ xw->keyboard.modify_now.field)); @@ -1179,7 +1199,8 @@ doparsing(XtermWidget xw, unsigned c, struct ParseState *sp) * codes at 0x242, but no zero-width characters until past 0x300. */ if (c >= 0x300 && screen->wide_chars - && my_wcwidth((int) c) == 0) { + && my_wcwidth((int) c) == 0 + && !isWideControl(c)) { int prev, precomposed; WriteNow(); @@ -1187,8 +1208,15 @@ doparsing(XtermWidget xw, unsigned c, struct ParseState *sp) prev = XTERM_CELL(screen->last_written_row, screen->last_written_col); precomposed = do_precomposition(prev, (int) c); + TRACE(("do_precomposition (U+%04X [%d], U+%04X [%d]) -> U+%04X [%d]\n", + prev, my_wcwidth(prev), + (int) c, my_wcwidth((int) c), + precomposed, my_wcwidth(precomposed))); - if (precomposed != -1) { + /* substitute combined character with precomposed character + * only if it does not change the width of the base character + */ + if (precomposed != -1 && my_wcwidth(precomposed) == my_wcwidth(prev)) { putXtermCell(screen, screen->last_written_row, screen->last_written_col, precomposed); @@ -1197,6 +1225,7 @@ doparsing(XtermWidget xw, unsigned c, struct ParseState *sp) screen->last_written_row, screen->last_written_col, c); } + if (!screen->scroll_amt) ScrnUpdate(xw, screen->last_written_row, @@ -1447,7 +1476,7 @@ doparsing(XtermWidget xw, unsigned c, struct ParseState *sp) case CASE_BELL: TRACE(("CASE_BELL - bell\n")); - if (sp->string_mode == OSC) { + if (sp->string_mode == ANSI_OSC) { if (string_used) string_area[--string_used] = '\0'; do_osc(xw, string_area, string_used, (int) c); @@ -1497,7 +1526,8 @@ doparsing(XtermWidget xw, unsigned c, struct ParseState *sp) xtermIndex(xw, 1); if (xw->flags & LINEFEED) CarriageReturn(screen); - do_xevents(); + else + do_xevents(); break; case CASE_CBT: @@ -1538,17 +1568,17 @@ doparsing(XtermWidget xw, unsigned c, struct ParseState *sp) break; case CASE_DECDHL: - xterm_DECDHL(c == '3'); + xterm_DECDHL(xw, c == '3'); sp->parsestate = sp->groundtable; break; case CASE_DECSWL: - xterm_DECSWL(); + xterm_DECSWL(xw); sp->parsestate = sp->groundtable; break; case CASE_DECDWL: - xterm_DECDWL(); + xterm_DECDWL(xw); sp->parsestate = sp->groundtable; break; @@ -1775,7 +1805,7 @@ doparsing(XtermWidget xw, unsigned c, struct ParseState *sp) case CASE_DECID: TRACE(("CASE_DECID\n")); if_OPT_VT52_MODE(screen, { - unparseputc(xw, ESC); + unparseputc(xw, ANSI_ESC); unparseputc(xw, '/'); unparseputc(xw, 'Z'); unparse_end(xw); @@ -1788,7 +1818,7 @@ doparsing(XtermWidget xw, unsigned c, struct ParseState *sp) TRACE(("CASE_DA1\n")); if (param[0] <= 0) { /* less than means DEFAULT */ count = 0; - reply.a_type = CSI; + reply.a_type = ANSI_CSI; reply.a_pintro = '?'; /* The first param corresponds to the highest @@ -1842,7 +1872,7 @@ doparsing(XtermWidget xw, unsigned c, struct ParseState *sp) TRACE(("CASE_DA2\n")); if (param[0] <= 0) { /* less than means DEFAULT */ count = 0; - reply.a_type = CSI; + reply.a_type = ANSI_CSI; reply.a_pintro = '>'; if (screen->terminal_id >= 200) @@ -1863,11 +1893,11 @@ doparsing(XtermWidget xw, unsigned c, struct ParseState *sp) TRACE(("CASE_DECRPTUI\n")); if ((screen->terminal_id >= 400) && (param[0] <= 0)) { /* less than means DEFAULT */ - unparseputc1(xw, DCS); + unparseputc1(xw, ANSI_DCS); unparseputc(xw, '!'); unparseputc(xw, '|'); unparseputc(xw, '0'); - unparseputc1(xw, ST); + unparseputc1(xw, ANSI_ST); unparse_end(xw); } sp->parsestate = sp->groundtable; @@ -2093,7 +2123,7 @@ doparsing(XtermWidget xw, unsigned c, struct ParseState *sp) case CASE_CPR: TRACE(("CASE_CPR - cursor position\n")); count = 0; - reply.a_type = CSI; + reply.a_type = ANSI_CSI; reply.a_pintro = sp->private_function ? '?' : 0; reply.a_inters = 0; reply.a_final = 'n'; @@ -2193,7 +2223,7 @@ doparsing(XtermWidget xw, unsigned c, struct ParseState *sp) if ((row = param[0]) == DEFAULT) row = 0; if (row == 0 || row == 1) { - reply.a_type = CSI; + reply.a_type = ANSI_CSI; reply.a_pintro = 0; reply.a_nparam = 7; reply.a_param[0] = row + 2; @@ -2219,7 +2249,7 @@ doparsing(XtermWidget xw, unsigned c, struct ParseState *sp) dpmodes(xw, bitset); sp->parsestate = sp->groundtable; #if OPT_TEK4014 - if (screen->TekEmu) + if (TEK4014_ACTIVE(xw)) return False; #endif break; @@ -2243,7 +2273,7 @@ doparsing(XtermWidget xw, unsigned c, struct ParseState *sp) set_tb_margins(screen, 0, screen->max_row); CursorSet(screen, 0, 0, xw->flags); xtermParseRect(xw, 0, 0, &myRect); - ScrnFillRectangle(xw, &myRect, 'E', 0); + ScrnFillRectangle(xw, &myRect, 'E', 0, False); sp->parsestate = sp->groundtable; break; @@ -2372,19 +2402,19 @@ doparsing(XtermWidget xw, unsigned c, struct ParseState *sp) break; string_area[--string_used] = '\0'; switch (sp->string_mode) { - case APC: + case ANSI_APC: /* ignored */ break; - case DCS: + case ANSI_DCS: do_dcs(xw, string_area, string_used); break; - case OSC: - do_osc(xw, string_area, string_used, ST); + case ANSI_OSC: + do_osc(xw, string_area, string_used, ANSI_ST); break; - case PM: + case ANSI_PM: /* ignored */ break; - case SOS: + case ANSI_SOS: /* ignored */ break; } @@ -2392,25 +2422,25 @@ doparsing(XtermWidget xw, unsigned c, struct ParseState *sp) case CASE_SOS: TRACE(("CASE_SOS: Start of String\n")); - sp->string_mode = SOS; + sp->string_mode = ANSI_SOS; sp->parsestate = sos_table; break; case CASE_PM: TRACE(("CASE_PM: Privacy Message\n")); - sp->string_mode = PM; + sp->string_mode = ANSI_PM; sp->parsestate = sos_table; break; case CASE_DCS: TRACE(("CASE_DCS: Device Control String\n")); - sp->string_mode = DCS; + sp->string_mode = ANSI_DCS; sp->parsestate = sos_table; break; case CASE_APC: TRACE(("CASE_APC: Application Program Command\n")); - sp->string_mode = APC; + sp->string_mode = ANSI_APC; sp->parsestate = sos_table; break; @@ -2449,7 +2479,7 @@ doparsing(XtermWidget xw, unsigned c, struct ParseState *sp) break; case CASE_CNL: - TRACE(("CASE_NPL - cursor next line\n")); + TRACE(("CASE_CNL - cursor next line\n")); CursorNextLine(screen, param[0]); sp->parsestate = sp->groundtable; break; @@ -2458,7 +2488,6 @@ doparsing(XtermWidget xw, unsigned c, struct ParseState *sp) TRACE(("CASE_NEL\n")); xtermIndex(xw, 1); CarriageReturn(screen); - do_xevents(); sp->parsestate = sp->groundtable; break; @@ -2534,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 { @@ -2613,7 +2643,7 @@ doparsing(XtermWidget xw, unsigned c, struct ParseState *sp) case CASE_DECERA: TRACE(("CASE_DECERA - Erase rectangular area\n")); xtermParseRect(xw, nparam, param, &myRect); - ScrnFillRectangle(xw, &myRect, ' ', 0); + ScrnFillRectangle(xw, &myRect, ' ', 0, True); sp->parsestate = sp->groundtable; break; @@ -2623,7 +2653,7 @@ doparsing(XtermWidget xw, unsigned c, struct ParseState *sp) && ((param[0] >= 32 && param[0] <= 126) || (param[0] >= 160 && param[0] <= 255))) { xtermParseRect(xw, nparam - 1, param + 1, &myRect); - ScrnFillRectangle(xw, &myRect, param[0], xw->flags); + ScrnFillRectangle(xw, &myRect, param[0], xw->flags, True); } sp->parsestate = sp->groundtable; break; @@ -2685,7 +2715,7 @@ doparsing(XtermWidget xw, unsigned c, struct ParseState *sp) case CASE_OSC: TRACE(("CASE_OSC: Operating System Command\n")); sp->parsestate = sos_table; - sp->string_mode = OSC; + sp->string_mode = ANSI_OSC; break; case CASE_RIS: @@ -2703,6 +2733,7 @@ doparsing(XtermWidget xw, unsigned c, struct ParseState *sp) case CASE_REP: TRACE(("CASE_REP\n")); if (sp->lastchar >= 0 && + sp->lastchar < 256 && sp->groundtable[E2A(sp->lastchar)] == CASE_PRINT) { IChar repeated[2]; count = (param[0] < 1) ? 1 : param[0]; @@ -2795,17 +2826,29 @@ doparsing(XtermWidget xw, unsigned c, struct ParseState *sp) case CASE_SET_MOD_FKEYS: TRACE(("CASE_SET_MOD_FKEYS\n")); if (nparam >= 1) { - set_mod_fkeys(xw, param[0], nparam > 1 ? param[1] : DEFAULT); + set_mod_fkeys(xw, param[0], nparam > 1 ? param[1] : DEFAULT, True); } else { for (row = 1; row <= 5; ++row) - set_mod_fkeys(xw, row, DEFAULT); + set_mod_fkeys(xw, row, DEFAULT, True); } break; case CASE_SET_MOD_FKEYS0: TRACE(("CASE_SET_MOD_FKEYS0\n")); - xw->keyboard.modify_now.function_keys = -1; + if (nparam >= 1 && param[0] != DEFAULT) { + set_mod_fkeys(xw, param[0], -1, False); + } else { + xw->keyboard.modify_now.function_keys = -1; + } 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; @@ -3063,13 +3106,13 @@ in_put(XtermWidget xw) repairSizeHints(); } - if (eventMode == NORMAL + if (screen->eventMode == NORMAL && readPtyData(screen, &select_mask, VTbuffer)) { if (screen->scrollWidget && screen->scrollttyoutput && screen->topline < 0) /* Scroll to bottom */ - WindowScroll(screen, 0); + WindowScroll(xw, 0); break; } if (screen->scroll_amt) @@ -3094,7 +3137,7 @@ in_put(XtermWidget xw) write_mask = ptymask(); XFlush(screen->display); select_mask = Select_mask; - if (eventMode != NORMAL) + if (screen->eventMode != NORMAL) select_mask = X_mask; } if (write_mask & ptymask()) { @@ -3137,12 +3180,12 @@ in_put(XtermWidget xw) #endif for (;;) { - if (eventMode == NORMAL + if (screen->eventMode == NORMAL && (size = readPtyData(screen, &select_mask, VTbuffer)) != 0) { if (screen->scrollWidget && screen->scrollttyoutput && screen->topline < 0) - WindowScroll(screen, 0); /* Scroll to bottom */ + WindowScroll(xw, 0); /* Scroll to bottom */ /* stop speed reading at some point to look for X stuff */ TRACE(("VTbuffer uses %d/%d\n", VTbuffer->last - VTbuffer->buffer, @@ -3198,7 +3241,7 @@ in_put(XtermWidget xw) wait for I/O to be possible. */ XFD_COPYSET(&Select_mask, &select_mask); /* in selection mode xterm does not read pty */ - if (eventMode != NORMAL) + if (screen->eventMode != NORMAL) FD_CLR(screen->respond, &select_mask); if (v_bufptr > v_bufstr) { @@ -3235,13 +3278,8 @@ in_put(XtermWidget xw) #endif #if OPT_SESSION_MGT } else if (resource.sessionMgt) { - /* - * When session management is enabled, we should not block since - * session related events can arrive any time. - */ - select_timeout.tv_sec = 1; - select_timeout.tv_usec = 0; - time_select = 1; + if (ice_fd >= 0) + FD_SET(ice_fd, &select_mask); #endif } if (need_cleanup) @@ -3275,7 +3313,7 @@ in_put(XtermWidget xw) static IChar doinput(void) { - TScreen *screen = &term->screen; + TScreen *screen = TScreenOf(term); while (!morePtyData(screen, VTbuffer)) in_put(term); @@ -3306,6 +3344,18 @@ PreeditPosition(TScreen * screen) } #endif +static void +WrapLine(XtermWidget xw) +{ + TScreen *screen = &(xw->screen); + + /* mark that we had to wrap this line */ + ScrnSetFlag(screen, screen->cur_row, LINEWRAPPED); + xtermAutoPrint('\n'); + xtermIndex(xw, 1); + set_cur_col(screen, 0); +} + /* * process a string of characters according to the character set indicated * by charset. worry about end of line conditions (wraparound if selected). @@ -3356,15 +3406,13 @@ dotext(XtermWidget xw, int last_chomp = 0; chars_chomped = 0; - if (screen->do_wrap && (xw->flags & WRAPAROUND)) { - /* mark that we had to wrap this line */ - ScrnSetWrapped(screen, screen->cur_row); - xtermAutoPrint('\n'); - xtermIndex(xw, 1); - set_cur_col(screen, 0); + if (screen->do_wrap) { screen->do_wrap = 0; - width_available = MaxCols(screen) - screen->cur_col; - next_col = screen->cur_col; + if ((xw->flags & WRAPAROUND)) { + WrapLine(xw); + width_available = MaxCols(screen) - screen->cur_col; + next_col = screen->cur_col; + } } while (width_here <= width_available && chars_chomped < (len - offset)) { @@ -3378,10 +3426,13 @@ dotext(XtermWidget xw, } if (width_here > width_available) { + if (last_chomp > MaxCols(screen)) + break; /* give up - it is too big */ chars_chomped--; width_here -= last_chomp; - if (chars_chomped > 0 || (xw->flags & WRAPAROUND)) + if (chars_chomped > 0) { need_wrap = 1; + } } else if (width_here == width_available) { need_wrap = 1; } else if (chars_chomped != (len - offset)) { @@ -3407,20 +3458,22 @@ dotext(XtermWidget xw, lobyte = (Char *) XtRealloc((char *) lobyte, limit); hibyte = (Char *) XtRealloc((char *) hibyte, limit); } - for (j = offset; j < offset + chars_chomped; j++) { - k = j - offset; - lobyte[k] = buf[j]; + for (j = offset, k = 0; j < offset + chars_chomped; j++) { + if (buf[j] == HIDDEN_CHAR) + continue; + lobyte[k] = LO_BYTE(buf[j]); if (buf[j] > 255) { - hibyte[k] = (buf[j] >> 8); + hibyte[k] = HI_BYTE(buf[j]); both = True; } else { hibyte[k] = 0; } + ++k; } WriteText(xw, PAIRED_CHARS(lobyte, (both ? hibyte : 0)), - chars_chomped); + k); #ifdef NO_LEAKS if (limit != 0) { limit = 0; @@ -3440,16 +3493,13 @@ dotext(XtermWidget xw, last_col = CurMaxCol(screen, screen->cur_row); this_col = last_col - screen->cur_col + 1; if (this_col <= 1) { - if (screen->do_wrap && (xw->flags & WRAPAROUND)) { - /* mark that we had to wrap this line */ - ScrnSetWrapped(screen, screen->cur_row); - xtermAutoPrint('\n'); - xtermIndex(xw, 1); - set_cur_col(screen, 0); + if (screen->do_wrap) { screen->do_wrap = 0; - this_col = last_col + 1; - } else - this_col = 1; + if ((xw->flags & WRAPAROUND)) { + WrapLine(xw); + } + } + this_col = 1; } if (offset + this_col > len) { this_col = len - offset; @@ -3461,9 +3511,9 @@ dotext(XtermWidget xw, (unsigned) this_col); /* - * the call to WriteText updates screen->cur_col. - * If screen->cur_col != next_col, we must have - * hit the right margin, so set the do_wrap flag. + * The call to WriteText updates screen->cur_col. + * If screen->cur_col is less than next_col, we must have + * hit the right margin - so set the do_wrap flag. */ screen->do_wrap = (screen->cur_col < next_col); } @@ -3471,19 +3521,6 @@ dotext(XtermWidget xw, #endif /* OPT_WIDE_CHARS */ } -#if HANDLE_STRUCT_NOTIFY -/* Flag icon name with "*** " on window output when iconified. - * I'd like to do something like reverse video, but I don't - * know how to tell this to window managers in general. - * - * mapstate can be IsUnmapped, !IsUnmapped, or -1; - * -1 means no change; the other two are set by event handlers - * and indicate a new mapstate. !IsMapped is done in the handler. - * we worry about IsUnmapped when output occurs. -IAN! - */ -static int mapstate = -1; -#endif /* HANDLE_STRUCT_NOTIFY */ - #if OPT_WIDE_CHARS unsigned visual_width(PAIRED_CHARS(Char * str, Char * str2), Cardinal len) @@ -3509,122 +3546,6 @@ visual_width(PAIRED_CHARS(Char * str, Char * str2), Cardinal len) } #endif -/* - * write a string str of length len onto the screen at - * the current cursor position. update cursor position. - */ -static void -WriteText(XtermWidget xw, PAIRED_CHARS(Char * str, Char * str2), Cardinal len) -{ - TScreen *screen = &(xw->screen); - ScrnPtr PAIRED_CHARS(temp_str = 0, temp_str2 = 0); - unsigned test; - unsigned flags = xw->flags; - unsigned fg_bg = makeColorPair(xw->cur_foreground, xw->cur_background); - unsigned cells = visual_width(PAIRED_CHARS(str, str2), len); - GC currentGC; - - TRACE(("WriteText (%2d,%2d) (%d) %3d:%s\n", - screen->cur_row, - screen->cur_col, - curXtermChrSet(xw, screen->cur_row), - len, visibleChars(PAIRED_CHARS(str, str2), len))); - - if (ScrnHaveSelection(screen) - && ScrnIsLineInSelection(screen, INX2ROW(screen, screen->cur_row))) { - ScrnDisownSelection(xw); - } - - if (INX2ROW(screen, screen->cur_row) <= screen->max_row) { - if (screen->cursor_state) - HideCursor(); - - if (flags & INSERT) { - InsertChar(xw, cells); - } - if (!AddToRefresh(screen)) { - - if (screen->scroll_amt) - FlushScroll(xw); - - if (flags & INVISIBLE) { - if (cells > len) { - str = temp_str = TypeMallocN(Char, cells); - if (str == 0) - return; - } - if_OPT_WIDE_CHARS(screen, { - if (cells > len) { - str2 = temp_str2 = TypeMallocN(Char, cells); - } - }); - len = cells; - - memset(str, ' ', len); - if_OPT_WIDE_CHARS(screen, { - if (str2 != 0) - memset(str2, 0, len); - }); - } - - TRACE(("WriteText calling drawXtermText (%d,%d)\n", - screen->cur_col, - screen->cur_row)); - - test = flags; - checkVeryBoldColors(test, xw->cur_foreground); - - /* make sure that the correct GC is current */ - currentGC = updatedXtermGC(xw, flags, fg_bg, False); - - drawXtermText(xw, test & DRAWX_MASK, currentGC, - CurCursorX(screen, screen->cur_row, screen->cur_col), - CursorY(screen, screen->cur_row), - curXtermChrSet(xw, screen->cur_row), - PAIRED_CHARS(str, str2), len, 0); - - resetXtermGC(xw, flags, False); - } - } - - ScreenWrite(xw, PAIRED_CHARS(str, str2), flags, fg_bg, len); - CursorForward(screen, (int) cells); -#if OPT_ZICONBEEP - /* Flag icon name with "***" on window output when iconified. - */ - if (zIconBeep && mapstate == IsUnmapped && !zIconBeep_flagged) { - static char *icon_name; - static Arg args[] = - { - {XtNiconName, (XtArgVal) & icon_name} - }; - - icon_name = NULL; - XtGetValues(toplevel, args, XtNumber(args)); - - if (icon_name != NULL) { - zIconBeep_flagged = True; - Changename(icon_name); - } - if (zIconBeep > 0) { -#if defined(HAVE_XKB_BELL_EXT) - XkbBell(XtDisplay(toplevel), VShellWindow, zIconBeep, XkbBI_Info); -#else - XBell(XtDisplay(toplevel), zIconBeep); -#endif - } - } - mapstate = -1; -#endif /* OPT_ZICONBEEP */ - if (temp_str != 0) - free(temp_str); - if_OPT_WIDE_CHARS(screen, { - if (temp_str2 != 0) - free(temp_str2); - }); - return; -} - #if HANDLE_STRUCT_NOTIFY /* Flag icon name with "***" on window output when iconified. */ @@ -3639,23 +3560,24 @@ HandleStructNotify(Widget w GCC_UNUSED, { {XtNiconName, (XtArgVal) & icon_name} }; + TScreen *screen = TScreenOf(term); switch (event->type) { case MapNotify: TRACE(("HandleStructNotify(MapNotify)\n")); #if OPT_ZICONBEEP - if (zIconBeep_flagged) { - zIconBeep_flagged = False; + if (screen->zIconBeep_flagged) { + screen->zIconBeep_flagged = False; icon_name = NULL; XtGetValues(toplevel, args, XtNumber(args)); if (icon_name != NULL) { char *buf = CastMallocN(char, strlen(icon_name)); if (buf == NULL) { - zIconBeep_flagged = True; + screen->zIconBeep_flagged = True; return; } strcpy(buf, icon_name + 4); - Changename(buf); + ChangeIconName(buf); free(buf); } } @@ -3675,8 +3597,7 @@ HandleStructNotify(Widget w GCC_UNUSED, * vt100 (ignore the tek4014 window). */ if (term->screen.Vshow) { - TScreen *screen = &term->screen; - struct _vtwin *Vwin = WhichVWin(&(term->screen)); + VTwin *Vwin = WhichVWin(&(term->screen)); TbInfo *info = &(Vwin->tb_info); TbInfo save = *info; @@ -3736,7 +3657,8 @@ HandleStructNotify(Widget w GCC_UNUSED, TRACE(("HandleStructNotify(ReparentNotify)\n")); break; default: - TRACE(("HandleStructNotify(event %d)\n", event->type)); + TRACE(("HandleStructNotify(event %s)\n", + visibleEventType(event->type))); break; } } @@ -3795,12 +3717,29 @@ ansi_modes(XtermWidget xw, } } -#define set_mousemode(mode) \ - screen->send_mouse_pos = (func == bitset) ? mode : MOUSE_OFF +#define IsSM() (func == bitset) + +#define set_bool_mode(flag) \ + flag = (IsSM()) ? ON : OFF + +static void +really_set_mousemode(XtermWidget xw, + Bool enabled, + unsigned mode) +{ + xw->screen.send_mouse_pos = enabled ? mode : MOUSE_OFF; + if (xw->screen.send_mouse_pos != MOUSE_OFF) + xtermShowPointer(xw, True); +} + +#define set_mousemode(mode) really_set_mousemode(xw, IsSM(), mode) + +#if OPT_READLINE #define set_mouseflag(f) \ - ((func == bitset) \ + (IsSM() \ ? SCREEN_FLAG_set(screen, f) \ : SCREEN_FLAG_unset(screen, f)) +#endif /* * process DEC private modes set, reset @@ -3813,14 +3752,14 @@ dpmodes(XtermWidget xw, int i, j; for (i = 0; i < nparam; ++i) { - TRACE(("%s %d\n", (func == bitset) ? "DECSET" : "DECRST", param[i])); + TRACE(("%s %d\n", IsSM()? "DECSET" : "DECRST", param[i])); switch (param[i]) { case 1: /* DECCKM */ (*func) (&xw->keyboard.flags, MODE_DECCKM); update_appcursor(); break; case 2: /* DECANM - ANSI/VT52 mode */ - if (func == bitset) { /* ANSI (VT100) */ + if (IsSM()) { /* ANSI (VT100) */ /* * Setting DECANM should have no effect, since this function * cannot be reached from vt52 mode. @@ -3847,7 +3786,7 @@ dpmodes(XtermWidget xw, if (screen->c132) { ClearScreen(xw); CursorSet(screen, 0, 0, xw->flags); - if ((j = func == bitset ? 132 : 80) != + if ((j = IsSM()? 132 : 80) != ((xw->flags & IN132COLUMNS) ? 132 : 80) || j != MaxCols(screen)) RequestResize(xw, -1, j, True); @@ -3855,7 +3794,7 @@ dpmodes(XtermWidget xw, } break; case 4: /* DECSCLM (slow scroll) */ - if (func == bitset) { + if (IsSM()) { screen->jumpscroll = 0; if (screen->scroll_amt) FlushScroll(xw); @@ -3893,56 +3832,56 @@ dpmodes(XtermWidget xw, break; #if OPT_TOOLBAR case 10: /* rxvt */ - ShowToolbar(func == bitset); + ShowToolbar(IsSM()); break; #endif #if OPT_BLINK_CURS case 12: /* att610: Start/stop blinking cursor */ if (screen->cursor_blink_res) { - screen->cursor_blink_esc = (func == bitset) ? ON : OFF; + set_bool_mode(screen->cursor_blink_esc); SetCursorBlink(screen, screen->cursor_blink); } break; #endif case 18: /* DECPFF: print form feed */ - screen->printer_formfeed = (func == bitset) ? ON : OFF; + set_bool_mode(screen->printer_formfeed); break; case 19: /* DECPEX: print extent */ - screen->printer_extent = (func == bitset) ? ON : OFF; + set_bool_mode(screen->printer_extent); break; case 25: /* DECTCEM: Show/hide cursor (VT200) */ - screen->cursor_set = (func == bitset) ? ON : OFF; + set_bool_mode(screen->cursor_set); break; case 30: /* rxvt */ - if (screen->fullVwin.sb_info.width != ((func == bitset) ? ON : OFF)) + if (screen->fullVwin.sb_info.width != (IsSM()? ON : OFF)) ToggleScrollBar(xw); break; #if OPT_SHIFT_FONTS case 35: /* rxvt */ - xw->misc.shift_fonts = (func == bitset) ? ON : OFF; + set_bool_mode(xw->misc.shift_fonts); break; #endif case 38: /* DECTEK */ #if OPT_TEK4014 - if (func == bitset && !(screen->inhibit & I_TEK)) { + if (IsSM() && !(screen->inhibit & I_TEK)) { FlushLog(screen); - screen->TekEmu = True; + TEK4014_ACTIVE(xw) = True; } #endif break; case 40: /* 132 column mode */ - screen->c132 = (func == bitset); + set_bool_mode(screen->c132); update_allow132(); break; case 41: /* curses hack */ - screen->curses = (func == bitset); + set_bool_mode(screen->curses); update_cursesemul(); break; case 42: /* DECNRCM national charset (VT220) */ (*func) (&xw->flags, NATIONAL); break; case 44: /* margin bell */ - screen->marginbell = (func == bitset); + set_bool_mode(screen->marginbell); if (!screen->marginbell) screen->bellarmed = -1; update_marginbell(); @@ -3958,7 +3897,7 @@ dpmodes(XtermWidget xw, * if this feature is enabled, logging may be * enabled and disabled via escape sequences. */ - if (func == bitset) + if (IsSM()) StartLog(screen); else CloseLog(screen); @@ -3970,7 +3909,7 @@ dpmodes(XtermWidget xw, #endif case 1049: /* alternate buffer & cursor */ if (!xw->misc.titeInhibit) { - if (func == bitset) { + if (IsSM()) { CursorSave(xw); ToAlternate(xw); ClearScreen(xw); @@ -3979,15 +3918,16 @@ dpmodes(XtermWidget xw, CursorRestore(xw); } } else if (xw->misc.tiXtraScroll) { - if (func == bitset) { + if (IsSM()) { xtermScroll(xw, screen->max_row); } } break; case 1047: + /* FALLTHRU */ case 47: /* alternate buffer */ if (!xw->misc.titeInhibit) { - if (func == bitset) { + if (IsSM()) { ToAlternate(xw); } else { if (screen->alternate @@ -3996,7 +3936,7 @@ dpmodes(XtermWidget xw, FromAlternate(xw); } } else if (xw->misc.tiXtraScroll) { - if (func == bitset) { + if (IsSM()) { xtermScroll(xw, screen->max_row); } } @@ -4032,61 +3972,71 @@ dpmodes(XtermWidget xw, MotionOn(screen, xw); } break; +#if OPT_FOCUS_EVENT + case SET_FOCUS_EVENT_MOUSE: + set_bool_mode(screen->send_focus_pos); + break; +#endif case 1010: /* rxvt */ - screen->scrollttyoutput = (func == bitset) ? ON : OFF; + set_bool_mode(screen->scrollttyoutput); update_scrollttyoutput(); break; case 1011: /* rxvt */ - screen->scrollkey = (func == bitset) ? ON : OFF; + set_bool_mode(screen->scrollkey); update_scrollkey(); break; case 1034: - xw->screen.input_eight_bits = (func == bitset) ? ON : OFF; + set_bool_mode(xw->screen.input_eight_bits); update_alt_esc(); break; #if OPT_NUM_LOCK case 1035: - xw->misc.real_NumLock = (func == bitset) ? ON : OFF; + set_bool_mode(xw->misc.real_NumLock); update_num_lock(); break; case 1036: - screen->meta_sends_esc = (func == bitset) ? ON : OFF; + set_bool_mode(screen->meta_sends_esc); update_meta_esc(); break; #endif case 1037: - screen->delete_is_del = (func == bitset) ? ON : OFF; + set_bool_mode(screen->delete_is_del); update_delete_del(); break; case 1048: if (!xw->misc.titeInhibit) { - if (func == bitset) + if (IsSM()) CursorSave(xw); else CursorRestore(xw); } break; -#ifdef OPT_SUN_FUNC_KEYS +#if OPT_TCAP_FKEYS + case 1050: + set_keyboard_type(xw, keyboardIsTermcap, IsSM()); + break; +#endif +#if OPT_SUN_FUNC_KEYS case 1051: - set_keyboard_type(xw, keyboardIsSun, func == bitset); + set_keyboard_type(xw, keyboardIsSun, IsSM()); break; #endif #if OPT_HP_FUNC_KEYS case 1052: - set_keyboard_type(xw, keyboardIsHP, func == bitset); + set_keyboard_type(xw, keyboardIsHP, IsSM()); break; #endif #if OPT_SCO_FUNC_KEYS case 1053: - set_keyboard_type(xw, keyboardIsSCO, func == bitset); + set_keyboard_type(xw, keyboardIsSCO, IsSM()); break; #endif case 1060: - set_keyboard_type(xw, keyboardIsLegacy, func == bitset); + set_keyboard_type(xw, keyboardIsLegacy, IsSM()); break; #if OPT_SUNPC_KBD case 1061: - set_keyboard_type(xw, keyboardIsVT220, func == bitset); + set_keyboard_type(xw, keyboardIsVT220, IsSM()); break; #endif #if OPT_READLINE @@ -4141,7 +4091,6 @@ savemodes(XtermWidget xw) case 6: /* DECOM */ DoSM(DP_DECOM, xw->flags & ORIGIN); break; - case 7: /* DECAWM */ DoSM(DP_DECAWM, xw->flags & WRAPAROUND); break; @@ -4178,6 +4127,9 @@ savemodes(XtermWidget xw) case 41: /* curses hack */ DoSM(DP_X_MORE, screen->curses); break; + case 42: /* DECNRCM national charset (VT220) */ + /* do nothing */ + break; case 44: /* margin bell */ DoSM(DP_X_MARGIN, screen->marginbell); break; @@ -4200,6 +4152,11 @@ savemodes(XtermWidget xw) case SET_ANY_EVENT_MOUSE: DoSM(DP_X_MOUSE, screen->send_mouse_pos); break; +#if OPT_FOCUS_EVENT + case SET_FOCUS_EVENT_MOUSE: + DoSM(DP_X_FOCUS, screen->send_focus_pos); + break; +#endif case 1048: if (!xw->misc.titeInhibit) { CursorSave(xw); @@ -4363,6 +4320,11 @@ restoremodes(XtermWidget xw) case SET_ANY_EVENT_MOUSE: DoRM(DP_X_MOUSE, screen->send_mouse_pos); break; +#if OPT_FOCUS_EVENT + case SET_FOCUS_EVENT_MOUSE: + DoRM(DP_X_FOCUS, screen->send_focus_pos); + break; +#endif case 1048: if (!xw->misc.titeInhibit) { CursorRestore(xw); @@ -4405,8 +4367,8 @@ report_win_label(XtermWidget xw, char **list; int length = 0; - reply.a_type = ESC; - unparseputc(xw, ESC); + reply.a_type = ANSI_ESC; + unparseputc(xw, ANSI_ESC); unparseputc(xw, ']'); unparseputc(xw, code); @@ -4424,7 +4386,7 @@ report_win_label(XtermWidget xw, XFree(text->value); } - unparseputc(xw, ESC); + unparseputc(xw, ANSI_ESC); unparseputc(xw, '\\'); /* should be ST */ unparse_end(xw); } @@ -4500,7 +4462,7 @@ window_ops(XtermWidget xw) XGetWindowAttributes(screen->display, VWindow(screen), &win_attrs); - reply.a_type = CSI; + reply.a_type = ANSI_CSI; reply.a_pintro = 0; reply.a_nparam = 1; reply.a_param[0] = (win_attrs.map_state == IsViewable) ? 1 : 2; @@ -4513,7 +4475,7 @@ window_ops(XtermWidget xw) XGetWindowAttributes(screen->display, WMFrameWindow(xw), &win_attrs); - reply.a_type = CSI; + reply.a_type = ANSI_CSI; reply.a_pintro = 0; reply.a_nparam = 3; reply.a_param[0] = 3; @@ -4528,7 +4490,7 @@ window_ops(XtermWidget xw) XGetWindowAttributes(screen->display, VWindow(screen), &win_attrs); - reply.a_type = CSI; + reply.a_type = ANSI_CSI; reply.a_pintro = 0; reply.a_nparam = 3; reply.a_param[0] = 4; @@ -4544,7 +4506,7 @@ window_ops(XtermWidget xw) break; case 18: /* Report the text's size in characters */ - reply.a_type = CSI; + reply.a_type = ANSI_CSI; reply.a_pintro = 0; reply.a_nparam = 3; reply.a_param[0] = 8; @@ -4561,7 +4523,7 @@ window_ops(XtermWidget xw) root_height = 0; root_width = 0; } - reply.a_type = CSI; + reply.a_type = ANSI_CSI; reply.a_pintro = 0; reply.a_nparam = 3; reply.a_param[0] = 9; @@ -4623,7 +4585,7 @@ unparseputc1(XtermWidget xw, int c) { if (c >= 0x80 && c <= 0x9F) { if (!xw->screen.control_eight_bits) { - unparseputc(xw, A2E(ESC)); + unparseputc(xw, A2E(ANSI_ESC)); c = A2E(c - 0x40); } } @@ -4638,13 +4600,13 @@ unparseseq(XtermWidget xw, ANSI * ap) int inters; unparseputc1(xw, c = ap->a_type); - if (c == ESC - || c == DCS - || c == CSI - || c == OSC - || c == PM - || c == APC - || c == SS3) { + if (c == ANSI_ESC + || c == ANSI_DCS + || c == ANSI_CSI + || c == ANSI_OSC + || c == ANSI_PM + || c == ANSI_APC + || c == ANSI_SS3) { if (ap->a_pintro != 0) unparseputc(xw, ap->a_pintro); for (i = 0; i < ap->a_nparam; ++i) { @@ -4787,16 +4749,13 @@ SwitchBufs(XtermWidget xw) if ((top = INX2ROW(screen, 0)) < rows) { if (screen->scroll_amt) FlushScroll(xw); - if (top == 0) - XClearWindow(screen->display, VWindow(screen)); - else - XClearArea(screen->display, - VWindow(screen), - (int) OriginX(screen), - (int) top * FontHeight(screen) + screen->border, - (unsigned) Width(screen), - (unsigned) (rows - top) * FontHeight(screen), - False); + XClearArea(screen->display, + VWindow(screen), + (int) OriginX(screen), + (int) top * FontHeight(screen) + screen->border, + (unsigned) Width(screen), + (unsigned) (rows - top) * FontHeight(screen), + False); } ScrnUpdate(xw, 0, 0, rows, MaxCols(screen), False); } @@ -4821,7 +4780,7 @@ SwitchBufPtrs(TScreen * screen) void VTRun(void) { - TScreen *screen = &term->screen; + TScreen *screen = TScreenOf(term); TRACE(("VTRun ...\n")); @@ -4873,7 +4832,7 @@ VTExpose(Widget w GCC_UNUSED, static void VTGraphicsOrNoExpose(XEvent * event) { - TScreen *screen = &term->screen; + TScreen *screen = TScreenOf(term); if (screen->incopy <= 0) { screen->incopy = 1; if (screen->scrolls > 0) @@ -4922,9 +4881,6 @@ VTResize(Widget w) static void RequestResize(XtermWidget xw, int rows, int cols, Bool text) { -#ifndef nothack - long supp; -#endif TScreen *screen = &xw->screen; unsigned long value; Dimension replyWidth, replyHeight; @@ -4989,9 +4945,7 @@ RequestResize(XtermWidget xw, int rows, int cols, Bool text) askedWidth = wide; } #ifndef nothack - if (!XGetWMNormalHints(screen->display, VShellWindow, - &xw->hints, &supp)) - bzero(&xw->hints, sizeof(xw->hints)); + getXtermSizeHints(xw); #endif status = XtMakeResizeRequest((Widget) xw, @@ -5040,9 +4994,11 @@ static String xterm_trans = int VTInit(void) { - TScreen *screen = &term->screen; + TScreen *screen = TScreenOf(term); Widget vtparent = SHELL_OF(term); + TRACE(("VTInit {{\n")); + XtRealizeWidget(vtparent); XtOverrideTranslations(vtparent, XtParseTranslationTable(xterm_trans)); (void) XSetWMProtocols(XtDisplay(vtparent), XtWindow(vtparent), @@ -5052,13 +5008,15 @@ VTInit(void) if (screen->allbuf == NULL) VTallocbuf(); + + TRACE(("...}} VTInit\n")); return (1); } static void VTallocbuf(void) { - TScreen *screen = &term->screen; + TScreen *screen = TScreenOf(term); int nrows = MaxRows(screen); /* allocate screen buffer now, if necessary. */ @@ -5131,12 +5089,12 @@ fill_Tres(XtermWidget target, XtermWidget source, int offset) if (name == 0) { target->screen.Tcolors[offset].value = target->dft_foreground; - } else if (!x_strcasecmp(name, XtDefaultForeground)) { + } else if (isDefaultForeground(name)) { target->screen.Tcolors[offset].value = ((offset == TEXT_FG || offset == TEXT_BG) ? target->dft_foreground : target->screen.Tcolors[TEXT_FG].value); - } else if (!x_strcasecmp(name, XtDefaultBackground)) { + } else if (isDefaultBackground(name)) { target->screen.Tcolors[offset].value = ((offset == TEXT_FG || offset == TEXT_BG) ? target->dft_background @@ -5325,6 +5283,12 @@ VTInitialize(Widget wrequest, ArgList args GCC_UNUSED, Cardinal *num_args GCC_UNUSED) { +#define Kolor(name) wnew->screen.name.resource +#define TxtFg(name) !x_strcasecmp(Kolor(Tcolors[TEXT_FG]), Kolor(name)) +#define TxtBg(name) !x_strcasecmp(Kolor(Tcolors[TEXT_BG]), Kolor(name)) +#define DftFg(name) isDefaultForeground(Kolor(name)) +#define DftBg(name) isDefaultBackground(Kolor(name)) + XtermWidget request = (XtermWidget) wrequest; XtermWidget wnew = (XtermWidget) new_arg; Widget my_parent = SHELL_OF(wnew); @@ -5354,6 +5318,11 @@ VTInitialize(Widget wrequest, */ bzero((char *) &wnew->screen, sizeof(wnew->screen)); + /* DESCO Sys#67660 + * Zero out the entire "keyboard" component of "wnew" widget. + */ + bzero((char *) &wnew->keyboard, sizeof(wnew->keyboard)); + /* dummy values so that we don't try to Realize the parent shell with height * or width of 0, which is illegal in X. The real size is computed in the * xtermWidget's Realize proc, but the shell's Realize proc is called first, @@ -5429,6 +5398,7 @@ VTInitialize(Widget wrequest, #ifdef ALLOWLOGGING init_Sres(screen.logfile); #endif + init_Bres(screen.bellIsUrgent); init_Bres(screen.bellOnReset); init_Bres(screen.marginbell); init_Bres(screen.multiscroll); @@ -5438,7 +5408,6 @@ VTInitialize(Widget wrequest, init_Ires(screen.scrolllines); init_Bres(screen.scrollttyoutput); init_Bres(screen.scrollkey); - init_Bres(screen.selectToClipboard); init_Sres(screen.term_id); for (s = request->screen.term_id; *s; s++) { @@ -5474,9 +5443,10 @@ VTInitialize(Widget wrequest, init_Ires(misc.ctrl_fkeys); #endif #if OPT_TEK4014 + TEK4014_SHOWN(wnew) = False; /* not a resource... */ init_Bres(misc.tekInhibit); init_Bres(misc.tekSmall); - init_Bres(screen.TekEmu); + init_Bres(misc.TekEmu); #endif #if OPT_TCAP_QUERY wnew->screen.tc_query_code = -1; @@ -5486,14 +5456,19 @@ VTInitialize(Widget wrequest, init_Ires(screen.multiClickTime); init_Ires(screen.bellSuppressTime); init_Sres(screen.charClass); + + init_Bres(screen.always_highlight); + init_Bres(screen.brokenSelections); init_Bres(screen.cutNewline); init_Bres(screen.cutToBeginningOfLine); init_Bres(screen.highlight_selection); - init_Bres(screen.trim_selection); init_Bres(screen.i18nSelections); - init_Bres(screen.brokenSelections); - init_Bres(screen.always_highlight); + init_Bres(screen.keepSelection); + init_Bres(screen.selectToClipboard); + init_Bres(screen.trim_selection); + wnew->screen.pointer_cursor = request->screen.pointer_cursor; + init_Ires(screen.pointer_mode); init_Sres(screen.answer_back); @@ -5512,17 +5487,23 @@ VTInitialize(Widget wrequest, init_Bres(screen.output_eight_bits); init_Bres(screen.control_eight_bits); init_Bres(screen.backarrow_key); + init_Bres(screen.alt_is_not_meta); + init_Bres(screen.alt_sends_esc); init_Bres(screen.meta_sends_esc); init_Bres(screen.allowSendEvent0); + init_Bres(screen.allowTitleOp0); init_Bres(screen.allowWindowOp0); /* make a copy so that editres cannot change the resource after startup */ wnew->screen.allowSendEvents = wnew->screen.allowSendEvent0; + wnew->screen.allowTitleOps = wnew->screen.allowTitleOp0; wnew->screen.allowWindowOps = wnew->screen.allowWindowOp0; + 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; @@ -5533,12 +5514,17 @@ VTInitialize(Widget wrequest, for (i = fontMenu_font1; i <= fontMenu_lastBuiltin; i++) { init_Sres(screen.MenuFontName(i)); } - /* set default in realize proc */ - wnew->screen.MenuFontName(fontMenu_fontdefault) = NULL; + wnew->screen.MenuFontName(fontMenu_default) = wnew->misc.default_font.f_n; wnew->screen.MenuFontName(fontMenu_fontescape) = NULL; wnew->screen.MenuFontName(fontMenu_fontsel) = NULL; - wnew->screen.menu_font_number = fontMenu_fontdefault; + wnew->screen.menu_font_number = fontMenu_default; + init_Sres(screen.initial_font); + if (wnew->screen.initial_font != 0) { + int result = xtermGetFont(wnew->screen.initial_font); + if (result >= 0) + wnew->screen.menu_font_number = result; + } #if OPT_BROKEN_OSC init_Bres(screen.brokenLinuxOSC); #endif @@ -5551,6 +5537,10 @@ VTInitialize(Widget wrequest, init_Bres(screen.c1_printable); #endif +#if OPT_CLIP_BOLD + init_Bres(screen.use_clipping); +#endif + #if OPT_DEC_CHRSET init_Bres(screen.font_doublesize); init_Ires(screen.cache_doublesize); @@ -5601,10 +5591,10 @@ VTInitialize(Widget wrequest, #if OPT_COLOR_RES TRACE(("Acolors[%d] = %s\n", i, wnew->screen.Acolors[i].resource)); wnew->screen.Acolors[i].mode = False; - if (!x_strcasecmp(wnew->screen.Acolors[i].resource, XtDefaultForeground)) { + if (DftFg(Acolors[i])) { wnew->screen.Acolors[i].value = T_COLOR(&(wnew->screen), TEXT_FG); wnew->screen.Acolors[i].mode = True; - } else if (!x_strcasecmp(wnew->screen.Acolors[i].resource, XtDefaultBackground)) { + } else if (DftBg(Acolors[i])) { wnew->screen.Acolors[i].value = T_COLOR(&(wnew->screen), TEXT_BG); wnew->screen.Acolors[i].mode = True; } else { @@ -5687,6 +5677,28 @@ VTInitialize(Widget wrequest, init_Tres(TEXT_CURSOR); #if OPT_HIGHLIGHT_COLOR init_Tres(HIGHLIGHT_BG); + init_Tres(HIGHLIGHT_FG); + init_Bres(screen.hilite_reverse); + init_Bres(screen.hilite_color); + if (wnew->screen.hilite_color == Maybe) { + wnew->screen.hilite_color = False; +#if OPT_COLOR_RES + /* + * If the highlight text/background are both set, and if they are + * not equal to either the text/background or background/text, then + * set the highlightColorMode automatically. + */ + if (!DftFg(Tcolors[HIGHLIGHT_BG]) + && !DftBg(Tcolors[HIGHLIGHT_FG]) + && !TxtFg(Tcolors[HIGHLIGHT_BG]) + && !TxtBg(Tcolors[HIGHLIGHT_FG]) + && !TxtBg(Tcolors[HIGHLIGHT_BG]) + && !TxtFg(Tcolors[HIGHLIGHT_FG])) { + TRACE(("...setting hilite_color automatically\n")); + wnew->screen.hilite_color = True; + } +#endif + } #endif #if OPT_TEK4014 @@ -5715,7 +5727,9 @@ VTInitialize(Widget wrequest, #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); @@ -5728,6 +5742,7 @@ VTInitialize(Widget wrequest, } #endif + init_Ires(screen.utf8_inparse); init_Ires(screen.utf8_mode); init_Ires(screen.max_combining); @@ -5743,6 +5758,19 @@ VTInitialize(Widget wrequest, init_Bres(misc.mk_width); init_Bres(misc.cjk_width); + init_Ires(misc.mk_samplesize); + init_Ires(misc.mk_samplepass); + + if (wnew->misc.mk_samplesize > 0xffff) + wnew->misc.mk_samplesize = 0xffff; + if (wnew->misc.mk_samplesize < 0) + wnew->misc.mk_samplesize = 0; + + if (wnew->misc.mk_samplepass > wnew->misc.mk_samplesize) + wnew->misc.mk_samplepass = wnew->misc.mk_samplesize; + if (wnew->misc.mk_samplepass < 0) + wnew->misc.mk_samplepass = 0; + if (request->screen.utf8_mode) { TRACE(("setting wide_chars on\n")); wnew->screen.wide_chars = True; @@ -5768,9 +5796,12 @@ VTInitialize(Widget wrequest, decode_wcwidth((wnew->misc.cjk_width ? 2 : 0) + (wnew->misc.mk_width ? 1 : 0) - + 1); + + 1, + wnew->misc.mk_samplesize, + wnew->misc.mk_samplepass); #endif /* OPT_WIDE_CHARS */ + init_Bres(screen.always_bold_mode); init_Bres(screen.bold_mode); init_Bres(screen.underline); @@ -5805,7 +5836,7 @@ VTInitialize(Widget wrequest, /* Flag icon name with "***" on window output when iconified. * Put in a handler that will tell us when we get Map/Unmap events. */ - if (zIconBeep) + if (resource.zIconBeep) #endif XtAddEventHandler(my_parent, StructureNotifyMask, False, HandleStructNotify, (Opaque) 0); @@ -5834,9 +5865,6 @@ VTInitialize(Widget wrequest, } #ifndef NO_ACTIVE_ICON wnew->screen.whichVwin = &wnew->screen.fullVwin; -#if OPT_TEK4014 - wnew->screen.whichTwin = &wnew->screen.fullTwin; -#endif #endif /* NO_ACTIVE_ICON */ if (wnew->screen.savelines < 0) @@ -5878,75 +5906,53 @@ VTInitialize(Widget wrequest, return; } -static void +void releaseCursorGCs(XtermWidget xw) { TScreen *screen = &xw->screen; - GC cursorGC = screen->cursorGC; - GC fillCursorGC = screen->fillCursorGC; - GC reverseCursorGC = screen->reversecursorGC; - GC cursorOutlineGC = screen->cursoroutlineGC; + VTwin *win = WhichVWin(screen); + int n; -#if OPT_ISO_COLORS - if (screen->colorMode) { - if (cursorGC) - XFreeGC(screen->display, cursorGC); - screen->cursorGC = 0; - - if (fillCursorGC - && (fillCursorGC != cursorGC)) - XFreeGC(screen->display, fillCursorGC); - screen->fillCursorGC = 0; - - if (reverseCursorGC - && (reverseCursorGC != cursorGC) - && (reverseCursorGC != fillCursorGC)) - XFreeGC(screen->display, screen->reversecursorGC); - screen->reversecursorGC = 0; - - if (cursorOutlineGC - && (cursorOutlineGC != cursorGC) - && (cursorOutlineGC != fillCursorGC) - && (cursorOutlineGC != reverseCursorGC)) - XFreeGC(screen->display, screen->cursoroutlineGC); - screen->cursoroutlineGC = 0; - } else -#endif - { - if (cursorGC) - XtReleaseGC((Widget) xw, cursorGC); - screen->cursorGC = 0; - - if ((fillCursorGC) - && (fillCursorGC != cursorGC)) - XtReleaseGC((Widget) xw, fillCursorGC); - screen->fillCursorGC = 0; - - if ((reverseCursorGC) - && (reverseCursorGC != cursorGC) - && (reverseCursorGC != fillCursorGC)) - XtReleaseGC((Widget) xw, reverseCursorGC); - screen->reversecursorGC = 0; - - if ((cursorOutlineGC) - && (cursorOutlineGC != cursorGC) - && (cursorOutlineGC != fillCursorGC) - && (cursorOutlineGC != reverseCursorGC)) - XtReleaseGC((Widget) xw, cursorOutlineGC); - screen->cursoroutlineGC = 0; + for_each_curs_gc(n) { + freeCgs(xw, win, (CgsEnum) n); } } +void +releaseWindowGCs(XtermWidget xw, VTwin * win) +{ + int n; + + for_each_text_gc(n) { + freeCgs(xw, win, (CgsEnum) n); + } +} + +#define TRACE_FREE_LEAK(name) \ + if (name) { \ + free(name); \ + name = 0; \ + TRACE(("freed " #name "\n")); \ + } + +#define FREE_LEAK(name) \ + if (name) { \ + free(name); \ + name = 0; \ + } + #ifdef NO_LEAKS +#if OPT_RENDERFONT static void -releaseWindowGCs(Widget w, struct _vtwin *win) +xtermCloseXft(TScreen * screen, XftFont ** pub) { - XtReleaseGC(w, win->normalGC); - XtReleaseGC(w, win->reverseGC); - XtReleaseGC(w, win->normalboldGC); - XtReleaseGC(w, win->reverseboldGC); + if (*pub != 0) { + XftFontClose(screen->display, *pub); + *pub = 0; + } } #endif +#endif static void VTDestroy(Widget w GCC_UNUSED) @@ -5961,33 +5967,19 @@ VTDestroy(Widget w GCC_UNUSED) if (screen->scrollWidget) XtDestroyWidget(screen->scrollWidget); - if (screen->save_ptr) { - free(screen->save_ptr); - TRACE(("freed screen->save_ptr\n")); - } - - if (screen->sbuf_address) { - free(screen->sbuf_address); - TRACE(("freed screen->sbuf_address\n")); - } - if (screen->allbuf) { - free(screen->allbuf); - TRACE(("freed screen->allbuf\n")); - } - - if (screen->abuf_address) { - free(screen->abuf_address); - TRACE(("freed screen->abuf_address\n")); - } - if (screen->altbuf) { - free(screen->altbuf); - TRACE(("freed screen->altbuf\n")); - } + TRACE_FREE_LEAK(screen->save_ptr); + TRACE_FREE_LEAK(screen->sbuf_address); + 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 - if (screen->draw_buf) { - free(screen->draw_buf); - TRACE(("freed screen->draw_buf\n")); - } + 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) { @@ -5996,12 +5988,27 @@ VTDestroy(Widget w GCC_UNUSED) } #endif releaseCursorGCs(xw); - releaseWindowGCs(w, &(screen->fullVwin)); + releaseWindowGCs(xw, &(screen->fullVwin)); #ifndef NO_ACTIVE_ICON - releaseWindowGCs(w, &(screen->iconVwin)); + releaseWindowGCs(xw, &(screen->iconVwin)); #endif - xtermCloseFonts(screen, screen->fnts); + if (screen->hidden_cursor) + XFreeCursor(screen->display, screen->hidden_cursor); + + xtermCloseFonts(xw, screen->fnts); + noleaks_cachedCgs(xw); + +#if OPT_RENDERFONT + for (n = 0; n < NMENUFONTS; ++n) { + xtermCloseXft(screen, &(screen->renderFontNorm[n])); + xtermCloseXft(screen, &(screen->renderFontBold[n])); + xtermCloseXft(screen, &(screen->renderFontItal[n])); + xtermCloseXft(screen, &(screen->renderWideNorm[n])); + xtermCloseXft(screen, &(screen->renderWideBold[n])); + xtermCloseXft(screen, &(screen->renderWideItal[n])); + } +#endif #if 0 /* some strings may be owned by X libraries */ for (n = 0; n <= fontMenu_lastBuiltin; ++n) { @@ -6014,15 +6021,15 @@ VTDestroy(Widget w GCC_UNUSED) } #endif +#if OPT_COLOR_RES /* free local copies of resource strings */ for (n = 0; n < NCOLORS; ++n) { - if (screen->Tcolors[n].resource) - free(screen->Tcolors[n].resource); + FREE_LEAK(screen->Tcolors[n].resource); } +#endif #if OPT_SELECT_REGEX for (n = 0; n < NSELECTUNITS; ++n) { - if (screen->selectExpr[n]) - free(screen->selectExpr[n]); + FREE_LEAK(screen->selectExpr[n]); } #endif @@ -6030,6 +6037,10 @@ VTDestroy(Widget w GCC_UNUSED) XtFree((char *) (screen->selection_atoms)); XtFree((char *) (screen->selection_data)); + + TRACE_FREE_LEAK(xw->keyboard.extra_translations); + TRACE_FREE_LEAK(xw->keyboard.shell_translations); + TRACE_FREE_LEAK(xw->keyboard.xterm_translations); #endif /* defined(NO_LEAKS) */ } @@ -6042,6 +6053,7 @@ VTRealize(Widget w, XtermWidget xw = (XtermWidget) w; TScreen *screen = &xw->screen; + const VTFontNames *myfont; unsigned width, height; int xpos, ypos, pr; Atom pid_atom; @@ -6051,25 +6063,31 @@ VTRealize(Widget w, TabReset(xw->tabs); - screen->MenuFontName(fontMenu_fontdefault) = xw->misc.default_font.f_n; + if (screen->menu_font_number == fontMenu_default) { + myfont = &(xw->misc.default_font); + } else { + myfont = xtermFontName(screen->MenuFontName(screen->menu_font_number)); + } memset(screen->fnts, 0, sizeof(screen->fnts)); if (!xtermLoadFont(xw, - &(xw->misc.default_font), - False, 0)) { - if (XmuCompareISOLatin1(xw->misc.default_font.f_n, "fixed") != 0) { + myfont, + False, + screen->menu_font_number)) { + if (XmuCompareISOLatin1(myfont->f_n, DEFFONT) != 0) { fprintf(stderr, - "%s: unable to open font \"%s\", trying \"fixed\"....\n", - xterm_name, xw->misc.default_font.f_n); + "%s: unable to open font \"%s\", trying \"%s\"....\n", + xterm_name, myfont->f_n, DEFFONT); (void) xtermLoadFont(xw, - xtermFontName("fixed"), - False, 0); - screen->MenuFontName(fontMenu_fontdefault) = "fixed"; + xtermFontName(DEFFONT), + False, + screen->menu_font_number); + screen->MenuFontName(screen->menu_font_number) = DEFFONT; } } /* 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); @@ -6078,7 +6096,7 @@ VTRealize(Widget w, if (xw->screen.utf8_mode) { TRACE(("check if this is a wide font, if not try again\n")); if (xtermLoadWideFonts(xw, False)) - SetVTFont(xw, screen->menu_font_number, TRUE, NULL); + SetVTFont(xw, screen->menu_font_number, True, NULL); } #endif @@ -6128,7 +6146,7 @@ VTRealize(Widget w, } /* set up size hints for window manager; min 1 char by 1 char */ - bzero(&xw->hints, sizeof(xw->hints)); + getXtermSizeHints(xw); xtermSizeHints(xw, (xw->misc.scrollbar ? (screen->scrollWidget->core.width + BorderWidth(screen->scrollWidget)) @@ -6217,15 +6235,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); - unsigned long mask; - XGCValues xgcv; + 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... @@ -6249,25 +6266,18 @@ VTRealize(Widget w, (XtPointer) 0); XtRegisterDrawable(XtDisplay(xw), screen->iconVwin.window, w); - mask = (GCFont | GCForeground | GCBackground | - GCGraphicsExposures | GCFunction); + 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)); - xgcv.font = screen->fnt_icon->fid; - xgcv.foreground = T_COLOR(screen, TEXT_FG); - xgcv.background = T_COLOR(screen, TEXT_BG); - xgcv.graphics_exposures = True; /* default */ - xgcv.function = GXcopy; + copyCgs(xw, win, gcBold, gcNorm); - screen->iconVwin.normalGC = - screen->iconVwin.normalboldGC = - XtGetGC(shell, mask, &xgcv); + 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)); - xgcv.foreground = T_COLOR(screen, TEXT_BG); - xgcv.background = T_COLOR(screen, TEXT_FG); + copyCgs(xw, win, gcBoldReverse, gcNormReverse); - screen->iconVwin.reverseGC = - screen->iconVwin.reverseboldGC = - XtGetGC(shell, mask, &xgcv); #if OPT_TOOLBAR /* * Toolbar is initialized before we get here. Enable the menu item @@ -6289,6 +6299,12 @@ VTRealize(Widget w, #endif #if OPT_NUM_LOCK VTInitModifiers(xw); +#if OPT_EXTRA_PASTE + if (xw->keyboard.extra_translations) { + XtOverrideTranslations((Widget) xw, + XtParseTranslationTable(xw->keyboard.extra_translations)); + } +#endif #endif set_cursor_gcs(xw); @@ -6621,7 +6637,7 @@ VTSetValues(Widget cur, newvt->screen.MenuFontName(newvt->screen.menu_font_number)) || (curvt->misc.default_font.f_n != newvt->misc.default_font.f_n)) { if (curvt->misc.default_font.f_n != newvt->misc.default_font.f_n) - newvt->screen.MenuFontName(fontMenu_fontdefault) = newvt->misc.default_font.f_n; + newvt->screen.MenuFontName(fontMenu_default) = newvt->misc.default_font.f_n; if (xtermLoadFont(newvt, xtermFontName(newvt->screen.MenuFontName(curvt->screen.menu_font_number)), True, newvt->screen.menu_font_number)) { @@ -6629,7 +6645,7 @@ VTSetValues(Widget cur, refresh_needed = True; fonts_redone = True; } else if (curvt->misc.default_font.f_n != newvt->misc.default_font.f_n) - newvt->screen.MenuFontName(fontMenu_fontdefault) = curvt->misc.default_font.f_n; + newvt->screen.MenuFontName(fontMenu_default) = curvt->misc.default_font.f_n; } if (!fonts_redone && (T_COLOR(&(curvt->screen), TEXT_CURSOR) != @@ -6660,7 +6676,7 @@ VTSetValues(Widget cur, return refresh_needed; } -#define setGC(value) set_at = __LINE__, currentGC = value +#define setGC(code) set_at = __LINE__, currentCgs = code #define OutsideSelection(screen,srow,scol) \ ((srow) > (screen)->endH.row || \ @@ -6683,14 +6699,20 @@ ShowCursor(void) unsigned flags; unsigned fg_bg = 0; GC currentGC; + CgsEnum currentCgs = gcMAX; + VTwin *currentWin = WhichVWin(screen); int set_at; Bool in_selection; Bool reversed; + Bool filled; Pixel fg_pix; Pixel bg_pix; Pixel tmp; #if OPT_HIGHLIGHT_COLOR - Pixel hi_pix = T_COLOR(screen, HIGHLIGHT_BG); + Pixel selbg_pix = T_COLOR(screen, HIGHLIGHT_BG); + Pixel selfg_pix = T_COLOR(screen, HIGHLIGHT_FG); + Boolean use_selbg; + Boolean use_selfg; #endif #if OPT_WIDE_CHARS Char chi = 0; @@ -6703,7 +6725,7 @@ ShowCursor(void) if (screen->cursor_state == BLINKED_OFF) return; - if (eventMode != NORMAL) + if (screen->eventMode != NORMAL) return; if (INX2ROW(screen, screen->cur_row) > screen->max_row) @@ -6791,70 +6813,100 @@ ShowCursor(void) * 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 OPT_HIGHLIGHT_COLOR + use_selbg = isNotForeground(xw, fg_pix, bg_pix, selbg_pix); + use_selfg = isNotBackground(xw, fg_pix, bg_pix, selfg_pix); +#endif + if (filled) { if (reversed) { /* text is reverse video */ - if (screen->cursorGC) { - setGC(screen->cursorGC); + if (getCgsGC(xw, currentWin, gcVTcursNormal)) { + setGC(gcVTcursNormal); } else { if (flags & BOLDATTR(screen)) { - setGC(NormalBoldGC(screen)); + setGC(gcBold); } else { - setGC(NormalGC(screen)); + setGC(gcNorm); } } + EXCHANGE(fg_pix, bg_pix, tmp); #if OPT_HIGHLIGHT_COLOR - if (hi_pix != T_COLOR(screen, TEXT_FG) - && hi_pix != fg_pix - && hi_pix != bg_pix - && hi_pix != xw->dft_foreground) { - bg_pix = fg_pix; - fg_pix = hi_pix; + if (screen->hilite_reverse) { + if (use_selbg && !use_selfg) + fg_pix = bg_pix; + if (use_selfg && !use_selbg) + bg_pix = fg_pix; + if (use_selbg) + bg_pix = selbg_pix; + if (use_selfg) + fg_pix = selfg_pix; } #endif - EXCHANGE(fg_pix, bg_pix, tmp); } else { /* normal video */ - if (screen->reversecursorGC) { - setGC(screen->reversecursorGC); + if (getCgsGC(xw, currentWin, gcVTcursReverse)) { + setGC(gcVTcursReverse); } else { if (flags & BOLDATTR(screen)) { - setGC(ReverseBoldGC(screen)); + setGC(gcBoldReverse); } else { - setGC(ReverseGC(screen)); + setGC(gcNormReverse); } } } if (T_COLOR(screen, TEXT_CURSOR) == xw->dft_foreground) { - XSetBackground(screen->display, currentGC, fg_pix); + setCgsBack(xw, currentWin, currentCgs, fg_pix); } - XSetForeground(screen->display, currentGC, bg_pix); + setCgsFore(xw, currentWin, currentCgs, bg_pix); } else { /* not selected */ if (reversed) { /* text is reverse video */ + EXCHANGE(fg_pix, bg_pix, tmp); + setGC(gcNormReverse); + } else { /* normal video */ + setGC(gcNorm); + } #if OPT_HIGHLIGHT_COLOR - if (hi_pix != T_COLOR(screen, TEXT_FG) - && hi_pix != fg_pix - && hi_pix != bg_pix - && hi_pix != xw->dft_foreground) { - bg_pix = fg_pix; - fg_pix = hi_pix; + if (screen->hilite_reverse) { + if (in_selection && !reversed) { + ; /* really INVERSE ... */ + } else if (in_selection || reversed) { + if (use_selbg) { + if (use_selfg) { + bg_pix = fg_pix; + } else { + fg_pix = bg_pix; + } + } + if (use_selbg) { + bg_pix = selbg_pix; + } + if (use_selfg) { + fg_pix = selfg_pix; + } + } + } else { + if (in_selection) { + if (use_selbg) { + bg_pix = selbg_pix; + } + if (use_selfg) { + fg_pix = selfg_pix; + } } -#endif - setGC(ReverseGC(screen)); - XSetForeground(screen->display, currentGC, bg_pix); - XSetBackground(screen->display, currentGC, fg_pix); - } else { /* normal video */ - setGC(NormalGC(screen)); - XSetForeground(screen->display, currentGC, fg_pix); - XSetBackground(screen->display, currentGC, bg_pix); } +#endif + setCgsFore(xw, currentWin, currentCgs, fg_pix); + setCgsBack(xw, currentWin, currentCgs, bg_pix); } if (screen->cursor_busy == 0 && (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"))); + currentGC = getCgsGC(xw, currentWin, currentCgs); drawXtermText(xw, flags & DRAWX_MASK, currentGC, x = CurCursorX(screen, screen->cur_row, cursor_col), y = CursorY(screen, screen->cur_row), @@ -6866,21 +6918,24 @@ ShowCursor(void) for (off = OFF_FINAL; off < MAX_PTRS; off += 2) { clo = SCREEN_PTR(screen, screen->cursorp.row, off + 0)[my_col]; chi = SCREEN_PTR(screen, screen->cursorp.row, off + 1)[my_col]; - if (clo || chi) - drawXtermText(xw, (flags & DRAWX_MASK) | NOBACKGROUND, - currentGC, x, y, - curXtermChrSet(xw, screen->cur_row), - PAIRED_CHARS(&clo, &chi), 1, iswide(base)); + if (!(clo || chi)) + break; + drawXtermText(xw, (flags & DRAWX_MASK) | NOBACKGROUND, + currentGC, x, y, + curXtermChrSet(xw, screen->cur_row), + PAIRED_CHARS(&clo, &chi), 1, iswide(base)); } }); #endif - if (!screen->select && !screen->always_highlight) { + if (!filled) { + GC outlineGC = getCgsGC(xw, currentWin, gcVTcursOutline); + if (outlineGC == 0) + outlineGC = currentGC; + screen->box->x = x; screen->box->y = y; - XDrawLines(screen->display, VWindow(screen), - screen->cursoroutlineGC ? screen->cursoroutlineGC - : currentGC, + XDrawLines(screen->display, VWindow(screen), outlineGC, screen->box, NBOX, CoordModePrevious); } } @@ -6981,11 +7036,12 @@ HideCursor(void) for (off = OFF_FINAL; off < MAX_PTRS; off += 2) { clo = SCREEN_PTR(screen, screen->cursorp.row, off + 0)[my_col]; chi = SCREEN_PTR(screen, screen->cursorp.row, off + 1)[my_col]; - if (clo || chi) - drawXtermText(xw, (flags & DRAWX_MASK) | NOBACKGROUND, - currentGC, x, y, - curXtermChrSet(xw, screen->cur_row), - PAIRED_CHARS(&clo, &chi), 1, iswide(base)); + if (!(clo || chi)) + break; + drawXtermText(xw, (flags & DRAWX_MASK) | NOBACKGROUND, + currentGC, x, y, + curXtermChrSet(xw, screen->cur_row), + PAIRED_CHARS(&clo, &chi), 1, iswide(base)); } }); #endif @@ -7129,7 +7185,7 @@ VTReset(XtermWidget xw, Bool full, Bool saved) { TScreen *screen = &xw->screen; - if (!XtIsRealized((Widget) xw)) { + if (!XtIsRealized((Widget) xw) || (CURRENT_EMU() != (Widget) xw)) { Bell(XkbBI_MinorError, 0); return; } @@ -7169,8 +7225,11 @@ VTReset(XtermWidget xw, Bool full, Bool saved) /* reset the mouse mode */ screen->send_mouse_pos = MOUSE_OFF; - waitingForTrackInfo = False; - eventMode = NORMAL; + screen->send_focus_pos = OFF; + screen->waitingForTrackInfo = False; + screen->eventMode = NORMAL; + + xtermShowPointer(xw, True); TabReset(xw->tabs); xw->keyboard.flags = MODE_SRM; @@ -7435,46 +7494,85 @@ HandleIgnore(Widget w, String * params GCC_UNUSED, Cardinal *param_count GCC_UNUSED) { - /* do nothing, but check for funny escape sequences */ - (void) SendMousePosition((XtermWidget) w, event); + if (IsXtermWidget(w)) { + /* do nothing, but check for funny escape sequences */ + (void) SendMousePosition((XtermWidget) w, event); + } } /* ARGSUSED */ static void -DoSetSelectedFont(Widget w GCC_UNUSED, +DoSetSelectedFont(Widget w, XtPointer client_data GCC_UNUSED, Atom * selection GCC_UNUSED, Atom * type, XtPointer value, - unsigned long *length GCC_UNUSED, + unsigned long *length, int *format) { - char *val = (char *) value; - int len; - if (*type != XA_STRING || *format != 8) { + if (!IsXtermWidget(w) || *type != XA_STRING || *format != 8) { Bell(XkbBI_MinorError, 0); - return; - } - len = strlen(val); - if (len > 0) { - if (val[len - 1] == '\n') - val[len - 1] = '\0'; - /* Do some sanity checking to avoid sending a long selection - back to the server in an OpenFont that is unlikely to succeed. - XLFD allows up to 255 characters and no control characters; - we are a little more liberal here. */ - if (len > 1000 || strchr(val, '\n')) - return; - if (!xtermLoadFont(term, - xtermFontName(val), - True, - fontMenu_fontsel)) - Bell(XkbBI_MinorError, 0); + } else { + Boolean failed = False; + XtermWidget xw = (XtermWidget) w; + int oldFont = xw->screen.menu_font_number; + char *save = xw->screen.MenuFontName(fontMenu_fontsel); + char *val; + char *test = 0; + char *used = 0; + unsigned len = *length; + unsigned tst; + + /* + * Some versions of X deliver null-terminated selections, some do not. + */ + for (tst = 0; tst < len; ++tst) { + if (((char *) value)[tst] == '\0') { + len = tst; + break; + } + } + + if (len > 0 && (val = TypeMallocN(char, len + 1)) != 0) { + memcpy(val, value, len); + val[len] = '\0'; + used = x_strtrim(val); + TRACE(("DoSetSelectedFont(%s)\n", val)); + /* Do some sanity checking to avoid sending a long selection + back to the server in an OpenFont that is unlikely to succeed. + XLFD allows up to 255 characters and no control characters; + we are a little more liberal here. */ + if (len < 1000 + && !strchr(val, '\n') + && (test = x_strdup(val)) != 0) { + xw->screen.MenuFontName(fontMenu_fontsel) = test; + if (!xtermLoadFont(term, + xtermFontName(val), + True, + fontMenu_fontsel)) { + failed = True; + free(test); + xw->screen.MenuFontName(fontMenu_fontsel) = save; + } + } else { + failed = True; + } + if (failed) { + (void) xtermLoadFont(term, + xtermFontName(xw->screen.MenuFontName(oldFont)), + True, + oldFont); + Bell(XkbBI_MinorError, 0); + } + if (used != val) + free(used); + free(val); + } } } void -FindFontSelection(XtermWidget xw, char *atom_name, Bool justprobe) +FindFontSelection(XtermWidget xw, const char *atom_name, Bool justprobe) { static AtomPtr *atoms; static int atomCount = 0; @@ -7483,7 +7581,10 @@ FindFontSelection(XtermWidget xw, char *atom_name, Bool justprobe) Atom target; if (!atom_name) - atom_name = "PRIMARY"; + atom_name = (xw->screen.mappedSelect + ? xw->screen.mappedSelect[0] + : "PRIMARY"); + TRACE(("FindFontSelection(%s)\n", atom_name)); for (pAtom = atoms, a = atomCount; a; a--, pAtom++) { if (strcmp(atom_name, XmuNameOfAtom(*pAtom)) == 0) @@ -7511,16 +7612,11 @@ void set_cursor_gcs(XtermWidget xw) { TScreen *screen = &(xw->screen); + VTwin *win = WhichVWin(screen); - XGCValues xgcv; - XtGCMask mask; Pixel cc = T_COLOR(screen, TEXT_CURSOR); Pixel fg = T_COLOR(screen, TEXT_FG); Pixel bg = T_COLOR(screen, TEXT_BG); - GC new_cursorGC = NULL; - GC new_cursorFillGC = NULL; - GC new_reversecursorGC = NULL; - GC new_cursoroutlineGC = NULL; Boolean changed = False; /* @@ -7530,7 +7626,7 @@ set_cursor_gcs(XtermWidget xw) * text * cursorblock * - * And, there are four situation when drawing a cursor, if we decide + * And, there are four situations when drawing a cursor, if we decide * that we like have a solid block of cursor color with the letter * that it is highlighting shown in the background color to make it * stand out: @@ -7546,81 +7642,39 @@ set_cursor_gcs(XtermWidget xw) */ TRACE(("set_cursor_gcs cc=%#lx, fg=%#lx, bg=%#lx\n", cc, fg, bg)); -#if OPT_ISO_COLORS - /* - * If we're using ANSI colors, the functions manipulating the SGR code will - * use the same GC's. To avoid having the cursor change color, we use the - * Xlib calls rather than the Xt calls. - * - * Use the colorMode value to determine which we'll do (the VWindow may - * not be set before the widget's realized, so it's tested separately). - */ - if (screen->colorMode) { - if (VWindow(screen) != 0 && (cc != bg)) { - /* we might have a colored foreground/background later */ - xgcv.font = screen->fnts[fNorm]->fid; - mask = (GCForeground | GCBackground | GCFont); - xgcv.foreground = fg; - xgcv.background = cc; - new_cursorGC = XCreateGC(screen->display, VWindow(screen), mask, &xgcv); - - xgcv.foreground = cc; - xgcv.background = fg; - new_cursorFillGC = - XCreateGC(screen->display, VWindow(screen), mask, &xgcv); - - if (screen->always_highlight) { - new_reversecursorGC = (GC) 0; - new_cursoroutlineGC = (GC) 0; - } else { - xgcv.foreground = bg; - xgcv.background = cc; - new_reversecursorGC = - XCreateGC(screen->display, VWindow(screen), mask, &xgcv); - xgcv.foreground = cc; - xgcv.background = bg; - new_cursoroutlineGC = - XCreateGC(screen->display, VWindow(screen), mask, &xgcv); - } - releaseCursorGCs(xw); - changed = True; - } - } else -#endif - if (VWindow(screen) != 0 && (cc != bg)) { - /* we have a colored cursor */ - xgcv.font = screen->fnts[fNorm]->fid; - mask = (GCForeground | GCBackground | GCFont); + if (win != 0 && (cc != bg)) { + /* set the fonts to the current one */ + setCgsFont(xw, win, gcVTcursNormal, 0); + setCgsFont(xw, win, gcVTcursFilled, 0); + setCgsFont(xw, win, gcVTcursReverse, 0); + setCgsFont(xw, win, gcVTcursOutline, 0); - xgcv.foreground = fg; - xgcv.background = cc; - new_cursorGC = XtGetGC((Widget) xw, mask, &xgcv); + /* we have a colored cursor */ + setCgsFore(xw, win, gcVTcursNormal, fg); + setCgsBack(xw, win, gcVTcursNormal, cc); - xgcv.foreground = cc; - xgcv.background = fg; - new_cursorFillGC = XtGetGC((Widget) xw, mask, &xgcv); + setCgsFore(xw, win, gcVTcursFilled, cc); + setCgsBack(xw, win, gcVTcursFilled, fg); if (screen->always_highlight) { - new_reversecursorGC = (GC) 0; - new_cursoroutlineGC = (GC) 0; + /* both GC's use the same color */ + setCgsFore(xw, win, gcVTcursReverse, bg); + setCgsBack(xw, win, gcVTcursReverse, cc); + + setCgsFore(xw, win, gcVTcursOutline, bg); + setCgsBack(xw, win, gcVTcursOutline, cc); } else { - xgcv.foreground = bg; - xgcv.background = cc; - new_reversecursorGC = XtGetGC((Widget) xw, mask, &xgcv); - xgcv.foreground = cc; - xgcv.background = bg; - new_cursoroutlineGC = XtGetGC((Widget) xw, mask, &xgcv); + setCgsFore(xw, win, gcVTcursReverse, bg); + setCgsBack(xw, win, gcVTcursReverse, cc); + + setCgsFore(xw, win, gcVTcursOutline, cc); + setCgsBack(xw, win, gcVTcursOutline, bg); } - releaseCursorGCs(xw); changed = True; } if (changed) { TRACE(("...set_cursor_gcs - done\n")); - screen->cursorGC = new_cursorGC; - screen->fillCursorGC = new_cursorFillGC; - screen->reversecursorGC = new_reversecursorGC; - screen->cursoroutlineGC = new_cursoroutlineGC; } } diff --git a/app/xterm/configure b/app/xterm/configure index 1ae93ebd7..e7f6cc513 100644 --- a/app/xterm/configure +++ b/app/xterm/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by Autoconf 2.52.20030208. +# Generated by Autoconf 2.52.20061216. # # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 # Free Software Foundation, Inc. @@ -684,9 +684,12 @@ Optional Packages: Compile/Install Options: --disable-full-tgetent disable check for full tgetent function --with-app-defaults=DIR directory in which to install resource files (default: EPREFIX/lib/X11/app-defaults) + --with-icondir=DIR directory in which to install icons (default: EPREFIX/share/pixmaps) + --disable-desktop disable install of xterm desktop files --with-reference=XXX program to use as permissions-reference --with-xterm-symlink=XXX make symbolic link to installed xterm - --disable-setuid disable setuid in xterm, do not install setuid + --disable-setuid disable setuid in xterm, do not install setuid/setgid + --disable-setgid disable setgid in xterm, do not install setuid/setgid --with-setuid=XXX use the given setuid user --with-utmp-setgid=XXX use setgid to match utmp/utmpx file --with-utempter use utempter library for access to utmp @@ -717,6 +720,7 @@ Optional Features: --disable-highlighting disable support for color highlighting --disable-doublechars disable support for double-size chars --disable-boxchars disable fallback-support for box chars + --enable-exec-xterm enable "spawn-new-terminal" action --disable-freetype disable freetype library-support --with-freetype-cflags -D/-I options for compiling with FreeType --with-freetype-libs -L/-l options to link FreeType @@ -739,6 +743,7 @@ Optional Features: --disable-rightbar disable right-scrollbar support --disable-samename disable check for redundant name-change --disable-session-mgt disable support for session management + --disable-tcap-fkeys disable termcap function-keys support --enable-tcap-query compile-in termcap-query support --disable-tek4014 disable tek4014 emulation --enable-toolbar compile-in toolbar for pulldown menus @@ -748,6 +753,7 @@ Optional Features: --enable-wide-chars enable wide-character support --enable-dabbrev enable dynamic-abbreviation support --enable-dec-locator enable DECterm Locator support + --disable-rectangles disable VT420 rectangle support --disable-ziconbeep disable -ziconbeep option Testing/development Options: --enable-trace test: set to enable debugging traces @@ -824,7 +830,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by $as_me, which was -generated by GNU Autoconf 2.52.20030208. Invocation command line was +generated by GNU Autoconf 2.52.20061216. Invocation command line was $ $0 $@ @@ -948,7 +954,7 @@ if test -z "$CONFIG_SITE"; then fi for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then - { echo "$as_me:951: loading site script $ac_site_file" >&5 + { echo "$as_me:957: loading site script $ac_site_file" >&5 echo "$as_me: loading site script $ac_site_file" >&6;} cat "$ac_site_file" >&5 . "$ac_site_file" @@ -959,7 +965,7 @@ if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special # files actually), so we avoid doing that. if test -f "$cache_file"; then - { echo "$as_me:962: loading cache $cache_file" >&5 + { echo "$as_me:968: loading cache $cache_file" >&5 echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . $cache_file;; @@ -967,7 +973,7 @@ echo "$as_me: loading cache $cache_file" >&6;} esac fi else - { echo "$as_me:970: creating cache $cache_file" >&5 + { echo "$as_me:976: creating cache $cache_file" >&5 echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi @@ -983,21 +989,21 @@ for ac_var in `(set) 2>&1 | eval ac_new_val="\$ac_env_${ac_var}_value" case $ac_old_set,$ac_new_set in set,) - { echo "$as_me:986: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 + { echo "$as_me:992: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) - { echo "$as_me:990: error: \`$ac_var' was not set in the previous run" >&5 + { echo "$as_me:996: error: \`$ac_var' was not set in the previous run" >&5 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then - { echo "$as_me:996: error: \`$ac_var' has changed since the previous run:" >&5 + { echo "$as_me:1002: error: \`$ac_var' has changed since the previous run:" >&5 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - { echo "$as_me:998: former value: $ac_old_val" >&5 + { echo "$as_me:1004: former value: $ac_old_val" >&5 echo "$as_me: former value: $ac_old_val" >&2;} - { echo "$as_me:1000: current value: $ac_new_val" >&5 + { echo "$as_me:1006: current value: $ac_new_val" >&5 echo "$as_me: current value: $ac_new_val" >&2;} ac_cache_corrupted=: fi;; @@ -1016,9 +1022,9 @@ echo "$as_me: current value: $ac_new_val" >&2;} fi done if $ac_cache_corrupted; then - { echo "$as_me:1019: error: changes in the environment can compromise the build" >&5 + { echo "$as_me:1025: error: changes in the environment can compromise the build" >&5 echo "$as_me: error: changes in the environment can compromise the build" >&2;} - { { echo "$as_me:1021: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 + { { echo "$as_me:1027: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} { (exit 1); exit 1; }; } fi @@ -1028,6 +1034,7 @@ ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu +ac_main_return=return case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in *c*,-n*) ECHO_N= ECHO_C=' @@ -1038,10 +1045,10 @@ esac echo "#! $SHELL" >conftest.sh echo "exit 0" >>conftest.sh chmod +x conftest.sh -if { (echo "$as_me:1041: PATH=\".;.\"; conftest.sh") >&5 +if { (echo "$as_me:1048: PATH=\".;.\"; conftest.sh") >&5 (PATH=".;."; conftest.sh) 2>&5 ac_status=$? - echo "$as_me:1044: \$? = $ac_status" >&5 + echo "$as_me:1051: \$? = $ac_status" >&5 (exit $ac_status); }; then ac_path_separator=';' else @@ -1069,7 +1076,7 @@ for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do fi done if test -z "$ac_aux_dir"; then - { { echo "$as_me:1072: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5 + { { echo "$as_me:1079: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;} { (exit 1); exit 1; }; } fi @@ -1079,11 +1086,11 @@ ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. # Make sure we can run config.sub. $ac_config_sub sun4 >/dev/null 2>&1 || - { { echo "$as_me:1082: error: cannot run $ac_config_sub" >&5 + { { echo "$as_me:1089: error: cannot run $ac_config_sub" >&5 echo "$as_me: error: cannot run $ac_config_sub" >&2;} { (exit 1); exit 1; }; } -echo "$as_me:1086: checking build system type" >&5 +echo "$as_me:1093: checking build system type" >&5 echo $ECHO_N "checking build system type... $ECHO_C" >&6 if test "${ac_cv_build+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1092,16 +1099,16 @@ else test -z "$ac_cv_build_alias" && ac_cv_build_alias=`$ac_config_guess` test -z "$ac_cv_build_alias" && - { { echo "$as_me:1095: error: cannot guess build type; you must specify one" >&5 + { { echo "$as_me:1102: error: cannot guess build type; you must specify one" >&5 echo "$as_me: error: cannot guess build type; you must specify one" >&2;} { (exit 1); exit 1; }; } ac_cv_build=`$ac_config_sub $ac_cv_build_alias` || - { { echo "$as_me:1099: error: $ac_config_sub $ac_cv_build_alias failed." >&5 + { { echo "$as_me:1106: error: $ac_config_sub $ac_cv_build_alias failed." >&5 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;} { (exit 1); exit 1; }; } fi -echo "$as_me:1104: result: $ac_cv_build" >&5 +echo "$as_me:1111: result: $ac_cv_build" >&5 echo "${ECHO_T}$ac_cv_build" >&6 build=$ac_cv_build build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` @@ -1109,7 +1116,7 @@ build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then - echo "$as_me:1112: checking host system type" >&5 + echo "$as_me:1119: checking host system type" >&5 echo $ECHO_N "checking host system type... $ECHO_C" >&6 if test "${ac_cv_host+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1118,12 +1125,12 @@ else test -z "$ac_cv_host_alias" && ac_cv_host_alias=$ac_cv_build_alias ac_cv_host=`$ac_config_sub $ac_cv_host_alias` || - { { echo "$as_me:1121: error: $ac_config_sub $ac_cv_host_alias failed" >&5 + { { echo "$as_me:1128: error: $ac_config_sub $ac_cv_host_alias failed" >&5 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;} { (exit 1); exit 1; }; } fi -echo "$as_me:1126: result: $ac_cv_host" >&5 +echo "$as_me:1133: result: $ac_cv_host" >&5 echo "${ECHO_T}$ac_cv_host" >&6 host=$ac_cv_host host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` @@ -1148,13 +1155,13 @@ else fi test -z "$system_name" && system_name="$cf_cv_system_name" -test -n "$cf_cv_system_name" && echo "$as_me:1151: result: Configuring for $cf_cv_system_name" >&5 +test -n "$cf_cv_system_name" && echo "$as_me:1158: result: Configuring for $cf_cv_system_name" >&5 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6 if test ".$system_name" != ".$cf_cv_system_name" ; then - echo "$as_me:1155: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5 + echo "$as_me:1162: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6 - { { echo "$as_me:1157: error: \"Please remove config.cache and try again.\"" >&5 + { { echo "$as_me:1164: error: \"Please remove config.cache and try again.\"" >&5 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;} { (exit 1); exit 1; }; } fi @@ -1175,10 +1182,11 @@ ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu +ac_main_return=return if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 -echo "$as_me:1181: checking for $ac_word" >&5 +echo "$as_me:1189: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1193,7 +1201,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_CC="${ac_tool_prefix}gcc" -echo "$as_me:1196: found $ac_dir/$ac_word" >&5 +echo "$as_me:1204: found $ac_dir/$ac_word" >&5 break done @@ -1201,10 +1209,10 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:1204: result: $CC" >&5 + echo "$as_me:1212: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else - echo "$as_me:1207: result: no" >&5 + echo "$as_me:1215: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -1213,7 +1221,7 @@ if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -echo "$as_me:1216: checking for $ac_word" >&5 +echo "$as_me:1224: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1228,7 +1236,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_ac_ct_CC="gcc" -echo "$as_me:1231: found $ac_dir/$ac_word" >&5 +echo "$as_me:1239: found $ac_dir/$ac_word" >&5 break done @@ -1236,10 +1244,10 @@ fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - echo "$as_me:1239: result: $ac_ct_CC" >&5 + echo "$as_me:1247: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else - echo "$as_me:1242: result: no" >&5 + echo "$as_me:1250: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -1252,7 +1260,7 @@ if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 -echo "$as_me:1255: checking for $ac_word" >&5 +echo "$as_me:1263: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1267,7 +1275,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_CC="${ac_tool_prefix}cc" -echo "$as_me:1270: found $ac_dir/$ac_word" >&5 +echo "$as_me:1278: found $ac_dir/$ac_word" >&5 break done @@ -1275,10 +1283,10 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:1278: result: $CC" >&5 + echo "$as_me:1286: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else - echo "$as_me:1281: result: no" >&5 + echo "$as_me:1289: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -1287,7 +1295,7 @@ if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -echo "$as_me:1290: checking for $ac_word" >&5 +echo "$as_me:1298: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1302,7 +1310,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_ac_ct_CC="cc" -echo "$as_me:1305: found $ac_dir/$ac_word" >&5 +echo "$as_me:1313: found $ac_dir/$ac_word" >&5 break done @@ -1310,10 +1318,10 @@ fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - echo "$as_me:1313: result: $ac_ct_CC" >&5 + echo "$as_me:1321: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else - echo "$as_me:1316: result: no" >&5 + echo "$as_me:1324: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -1326,7 +1334,7 @@ fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -echo "$as_me:1329: checking for $ac_word" >&5 +echo "$as_me:1337: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1346,7 +1354,7 @@ if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then continue fi ac_cv_prog_CC="cc" -echo "$as_me:1349: found $ac_dir/$ac_word" >&5 +echo "$as_me:1357: found $ac_dir/$ac_word" >&5 break done @@ -1368,10 +1376,10 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:1371: result: $CC" >&5 + echo "$as_me:1379: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else - echo "$as_me:1374: result: no" >&5 + echo "$as_me:1382: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -1382,7 +1390,7 @@ if test -z "$CC"; then do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -echo "$as_me:1385: checking for $ac_word" >&5 +echo "$as_me:1393: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1397,7 +1405,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_CC="$ac_tool_prefix$ac_prog" -echo "$as_me:1400: found $ac_dir/$ac_word" >&5 +echo "$as_me:1408: found $ac_dir/$ac_word" >&5 break done @@ -1405,10 +1413,10 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:1408: result: $CC" >&5 + echo "$as_me:1416: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else - echo "$as_me:1411: result: no" >&5 + echo "$as_me:1419: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -1421,7 +1429,7 @@ if test -z "$CC"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:1424: checking for $ac_word" >&5 +echo "$as_me:1432: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1436,7 +1444,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_ac_ct_CC="$ac_prog" -echo "$as_me:1439: found $ac_dir/$ac_word" >&5 +echo "$as_me:1447: found $ac_dir/$ac_word" >&5 break done @@ -1444,10 +1452,10 @@ fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - echo "$as_me:1447: result: $ac_ct_CC" >&5 + echo "$as_me:1455: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else - echo "$as_me:1450: result: no" >&5 + echo "$as_me:1458: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -1459,32 +1467,32 @@ fi fi -test -z "$CC" && { { echo "$as_me:1462: error: no acceptable cc found in \$PATH" >&5 +test -z "$CC" && { { echo "$as_me:1470: error: no acceptable cc found in \$PATH" >&5 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;} { (exit 1); exit 1; }; } # Provide some information about the compiler. -echo "$as_me:1467:" \ +echo "$as_me:1475:" \ "checking for C compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` -{ (eval echo "$as_me:1470: \"$ac_compiler --version </dev/null >&5\"") >&5 +{ (eval echo "$as_me:1478: \"$ac_compiler --version </dev/null >&5\"") >&5 (eval $ac_compiler --version </dev/null >&5) 2>&5 ac_status=$? - echo "$as_me:1473: \$? = $ac_status" >&5 + echo "$as_me:1481: \$? = $ac_status" >&5 (exit $ac_status); } -{ (eval echo "$as_me:1475: \"$ac_compiler -v </dev/null >&5\"") >&5 +{ (eval echo "$as_me:1483: \"$ac_compiler -v </dev/null >&5\"") >&5 (eval $ac_compiler -v </dev/null >&5) 2>&5 ac_status=$? - echo "$as_me:1478: \$? = $ac_status" >&5 + echo "$as_me:1486: \$? = $ac_status" >&5 (exit $ac_status); } -{ (eval echo "$as_me:1480: \"$ac_compiler -V </dev/null >&5\"") >&5 +{ (eval echo "$as_me:1488: \"$ac_compiler -V </dev/null >&5\"") >&5 (eval $ac_compiler -V </dev/null >&5) 2>&5 ac_status=$? - echo "$as_me:1483: \$? = $ac_status" >&5 + echo "$as_me:1491: \$? = $ac_status" >&5 (exit $ac_status); } cat >conftest.$ac_ext <<_ACEOF -#line 1487 "configure" +#line 1495 "configure" #include "confdefs.h" int @@ -1500,13 +1508,13 @@ ac_clean_files="$ac_clean_files a.out a.exe" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. -echo "$as_me:1503: checking for C compiler default output" >&5 +echo "$as_me:1511: checking for C compiler default output" >&5 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` -if { (eval echo "$as_me:1506: \"$ac_link_default\"") >&5 +if { (eval echo "$as_me:1514: \"$ac_link_default\"") >&5 (eval $ac_link_default) 2>&5 ac_status=$? - echo "$as_me:1509: \$? = $ac_status" >&5 + echo "$as_me:1517: \$? = $ac_status" >&5 (exit $ac_status); }; then # Find the output, starting from the most likely. This scheme is # not robust to junk in `.', hence go to wildcards (a.*) only as a last @@ -1529,34 +1537,34 @@ done else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 -{ { echo "$as_me:1532: error: C compiler cannot create executables" >&5 +{ { echo "$as_me:1540: error: C compiler cannot create executables" >&5 echo "$as_me: error: C compiler cannot create executables" >&2;} { (exit 77); exit 77; }; } fi ac_exeext=$ac_cv_exeext -echo "$as_me:1538: result: $ac_file" >&5 +echo "$as_me:1546: result: $ac_file" >&5 echo "${ECHO_T}$ac_file" >&6 # Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -echo "$as_me:1543: checking whether the C compiler works" >&5 +echo "$as_me:1551: checking whether the C compiler works" >&5 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' - { (eval echo "$as_me:1549: \"$ac_try\"") >&5 + { (eval echo "$as_me:1557: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:1552: \$? = $ac_status" >&5 + echo "$as_me:1560: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else - { { echo "$as_me:1559: error: cannot run C compiled programs. + { { echo "$as_me:1567: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'." >&5 echo "$as_me: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'." >&2;} @@ -1564,24 +1572,24 @@ If you meant to cross compile, use \`--host'." >&2;} fi fi fi -echo "$as_me:1567: result: yes" >&5 +echo "$as_me:1575: result: yes" >&5 echo "${ECHO_T}yes" >&6 rm -f a.out a.exe conftest$ac_cv_exeext ac_clean_files=$ac_clean_files_save # Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -echo "$as_me:1574: checking whether we are cross compiling" >&5 +echo "$as_me:1582: checking whether we are cross compiling" >&5 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 -echo "$as_me:1576: result: $cross_compiling" >&5 +echo "$as_me:1584: result: $cross_compiling" >&5 echo "${ECHO_T}$cross_compiling" >&6 -echo "$as_me:1579: checking for executable suffix" >&5 +echo "$as_me:1587: checking for executable suffix" >&5 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6 -if { (eval echo "$as_me:1581: \"$ac_link\"") >&5 +if { (eval echo "$as_me:1589: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:1584: \$? = $ac_status" >&5 + echo "$as_me:1592: \$? = $ac_status" >&5 (exit $ac_status); }; then # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will @@ -1597,25 +1605,25 @@ for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do esac done else - { { echo "$as_me:1600: error: cannot compute EXEEXT: cannot compile and link" >&5 + { { echo "$as_me:1608: error: cannot compute EXEEXT: cannot compile and link" >&5 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;} { (exit 1); exit 1; }; } fi rm -f conftest$ac_cv_exeext -echo "$as_me:1606: result: $ac_cv_exeext" >&5 +echo "$as_me:1614: result: $ac_cv_exeext" >&5 echo "${ECHO_T}$ac_cv_exeext" >&6 rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT -echo "$as_me:1612: checking for object suffix" >&5 +echo "$as_me:1620: checking for object suffix" >&5 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6 if test "${ac_cv_objext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 1618 "configure" +#line 1626 "configure" #include "confdefs.h" int @@ -1627,10 +1635,10 @@ main () } _ACEOF rm -f conftest.o conftest.obj -if { (eval echo "$as_me:1630: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:1638: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:1633: \$? = $ac_status" >&5 + echo "$as_me:1641: \$? = $ac_status" >&5 (exit $ac_status); }; then for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do case $ac_file in @@ -1642,24 +1650,24 @@ done else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 -{ { echo "$as_me:1645: error: cannot compute OBJEXT: cannot compile" >&5 +{ { echo "$as_me:1653: error: cannot compute OBJEXT: cannot compile" >&5 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;} { (exit 1); exit 1; }; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi -echo "$as_me:1652: result: $ac_cv_objext" >&5 +echo "$as_me:1660: result: $ac_cv_objext" >&5 echo "${ECHO_T}$ac_cv_objext" >&6 OBJEXT=$ac_cv_objext ac_objext=$OBJEXT -echo "$as_me:1656: checking whether we are using the GNU C compiler" >&5 +echo "$as_me:1664: checking whether we are using the GNU C compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 if test "${ac_cv_c_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 1662 "configure" +#line 1670 "configure" #include "confdefs.h" int @@ -1674,16 +1682,16 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:1677: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:1685: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:1680: \$? = $ac_status" >&5 + echo "$as_me:1688: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:1683: \"$ac_try\"") >&5 + { (eval echo "$as_me:1691: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:1686: \$? = $ac_status" >&5 + echo "$as_me:1694: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_compiler_gnu=yes else @@ -1695,19 +1703,19 @@ rm -f conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi -echo "$as_me:1698: result: $ac_cv_c_compiler_gnu" >&5 +echo "$as_me:1706: result: $ac_cv_c_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS CFLAGS="-g" -echo "$as_me:1704: checking whether $CC accepts -g" >&5 +echo "$as_me:1712: checking whether $CC accepts -g" >&5 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 if test "${ac_cv_prog_cc_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 1710 "configure" +#line 1718 "configure" #include "confdefs.h" int @@ -1719,16 +1727,16 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:1722: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:1730: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:1725: \$? = $ac_status" >&5 + echo "$as_me:1733: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:1728: \"$ac_try\"") >&5 + { (eval echo "$as_me:1736: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:1731: \$? = $ac_status" >&5 + echo "$as_me:1739: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cc_g=yes else @@ -1738,7 +1746,7 @@ ac_cv_prog_cc_g=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:1741: result: $ac_cv_prog_cc_g" >&5 +echo "$as_me:1749: result: $ac_cv_prog_cc_g" >&5 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS @@ -1765,16 +1773,16 @@ cat >conftest.$ac_ext <<_ACEOF #endif _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:1768: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:1776: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:1771: \$? = $ac_status" >&5 + echo "$as_me:1779: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:1774: \"$ac_try\"") >&5 + { (eval echo "$as_me:1782: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:1777: \$? = $ac_status" >&5 + echo "$as_me:1785: \$? = $ac_status" >&5 (exit $ac_status); }; }; then for ac_declaration in \ ''\ @@ -1786,7 +1794,7 @@ if { (eval echo "$as_me:1768: \"$ac_compile\"") >&5 'void exit (int);' do cat >conftest.$ac_ext <<_ACEOF -#line 1789 "configure" +#line 1797 "configure" #include "confdefs.h" #include <stdlib.h> $ac_declaration @@ -1799,16 +1807,16 @@ exit (42); } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:1802: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:1810: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:1805: \$? = $ac_status" >&5 + echo "$as_me:1813: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:1808: \"$ac_try\"") >&5 + { (eval echo "$as_me:1816: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:1811: \$? = $ac_status" >&5 + echo "$as_me:1819: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else @@ -1818,7 +1826,7 @@ continue fi rm -f conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF -#line 1821 "configure" +#line 1829 "configure" #include "confdefs.h" $ac_declaration int @@ -1830,16 +1838,16 @@ exit (42); } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:1833: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:1841: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:1836: \$? = $ac_status" >&5 + echo "$as_me:1844: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:1839: \"$ac_try\"") >&5 + { (eval echo "$as_me:1847: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:1842: \$? = $ac_status" >&5 + echo "$as_me:1850: \$? = $ac_status" >&5 (exit $ac_status); }; }; then break else @@ -1865,13 +1873,15 @@ ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu +ac_main_return=return ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -echo "$as_me:1874: checking how to run the C preprocessor" >&5 +ac_main_return=return +echo "$as_me:1884: checking how to run the C preprocessor" >&5 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then @@ -1892,18 +1902,18 @@ do # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF -#line 1895 "configure" +#line 1905 "configure" #include "confdefs.h" #include <assert.h> Syntax error _ACEOF -if { (eval echo "$as_me:1900: \"$ac_cpp conftest.$ac_ext\"") >&5 +if { (eval echo "$as_me:1910: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? egrep -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:1906: \$? = $ac_status" >&5 + echo "$as_me:1916: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag @@ -1926,17 +1936,17 @@ rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF -#line 1929 "configure" +#line 1939 "configure" #include "confdefs.h" #include <ac_nonexistent.h> _ACEOF -if { (eval echo "$as_me:1933: \"$ac_cpp conftest.$ac_ext\"") >&5 +if { (eval echo "$as_me:1943: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? egrep -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:1939: \$? = $ac_status" >&5 + echo "$as_me:1949: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag @@ -1973,7 +1983,7 @@ fi else ac_cv_prog_CPP=$CPP fi -echo "$as_me:1976: result: $CPP" >&5 +echo "$as_me:1986: result: $CPP" >&5 echo "${ECHO_T}$CPP" >&6 ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes @@ -1983,18 +1993,18 @@ do # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF -#line 1986 "configure" +#line 1996 "configure" #include "confdefs.h" #include <assert.h> Syntax error _ACEOF -if { (eval echo "$as_me:1991: \"$ac_cpp conftest.$ac_ext\"") >&5 +if { (eval echo "$as_me:2001: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? egrep -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:1997: \$? = $ac_status" >&5 + echo "$as_me:2007: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag @@ -2017,17 +2027,17 @@ rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF -#line 2020 "configure" +#line 2030 "configure" #include "confdefs.h" #include <ac_nonexistent.h> _ACEOF -if { (eval echo "$as_me:2024: \"$ac_cpp conftest.$ac_ext\"") >&5 +if { (eval echo "$as_me:2034: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? egrep -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:2030: \$? = $ac_status" >&5 + echo "$as_me:2040: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag @@ -2055,7 +2065,7 @@ rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else - { { echo "$as_me:2058: error: C preprocessor \"$CPP\" fails sanity check" >&5 + { { echo "$as_me:2068: error: C preprocessor \"$CPP\" fails sanity check" >&5 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;} { (exit 1); exit 1; }; } fi @@ -2065,16 +2075,17 @@ ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu +ac_main_return=return if test $ac_cv_c_compiler_gnu = yes; then - echo "$as_me:2070: checking whether $CC needs -traditional" >&5 + echo "$as_me:2081: checking whether $CC needs -traditional" >&5 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6 if test "${ac_cv_prog_gcc_traditional+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_pattern="Autoconf.*'x'" cat >conftest.$ac_ext <<_ACEOF -#line 2077 "configure" +#line 2088 "configure" #include "confdefs.h" #include <sgtty.h> int Autoconf = TIOCGETP; @@ -2089,7 +2100,7 @@ rm -f conftest* if test $ac_cv_prog_gcc_traditional = no; then cat >conftest.$ac_ext <<_ACEOF -#line 2092 "configure" +#line 2103 "configure" #include "confdefs.h" #include <termio.h> int Autoconf = TCGETA; @@ -2102,7 +2113,7 @@ rm -f conftest* fi fi -echo "$as_me:2105: result: $ac_cv_prog_gcc_traditional" >&5 +echo "$as_me:2116: result: $ac_cv_prog_gcc_traditional" >&5 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6 if test $ac_cv_prog_gcc_traditional = yes; then CC="$CC -traditional" @@ -2113,7 +2124,7 @@ for ac_prog in mawk gawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:2116: checking for $ac_word" >&5 +echo "$as_me:2127: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_AWK+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -2128,7 +2139,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_AWK="$ac_prog" -echo "$as_me:2131: found $ac_dir/$ac_word" >&5 +echo "$as_me:2142: found $ac_dir/$ac_word" >&5 break done @@ -2136,10 +2147,10 @@ fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then - echo "$as_me:2139: result: $AWK" >&5 + echo "$as_me:2150: result: $AWK" >&5 echo "${ECHO_T}$AWK" >&6 else - echo "$as_me:2142: result: no" >&5 + echo "$as_me:2153: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -2158,7 +2169,7 @@ done # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. -echo "$as_me:2161: checking for a BSD compatible install" >&5 +echo "$as_me:2172: checking for a BSD compatible install" >&5 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6 if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then @@ -2207,7 +2218,7 @@ fi INSTALL=$ac_install_sh fi fi -echo "$as_me:2210: result: $INSTALL" >&5 +echo "$as_me:2221: result: $INSTALL" >&5 echo "${ECHO_T}$INSTALL" >&6 # Use test -z because SunOS4 sh mishandles braces in ${var-val}. @@ -2218,14 +2229,14 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' -echo "$as_me:2221: checking whether ln -s works" >&5 +echo "$as_me:2232: checking whether ln -s works" >&5 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6 LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then - echo "$as_me:2225: result: yes" >&5 + echo "$as_me:2236: result: yes" >&5 echo "${ECHO_T}yes" >&6 else - echo "$as_me:2228: result: no, using $LN_S" >&5 + echo "$as_me:2239: result: no, using $LN_S" >&5 echo "${ECHO_T}no, using $LN_S" >&6 fi @@ -2246,7 +2257,7 @@ for ac_prog in tdlint lint alint do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:2249: checking for $ac_word" >&5 +echo "$as_me:2260: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_LINT+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -2261,7 +2272,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_LINT="$ac_prog" -echo "$as_me:2264: found $ac_dir/$ac_word" >&5 +echo "$as_me:2275: found $ac_dir/$ac_word" >&5 break done @@ -2269,10 +2280,10 @@ fi fi LINT=$ac_cv_prog_LINT if test -n "$LINT"; then - echo "$as_me:2272: result: $LINT" >&5 + echo "$as_me:2283: result: $LINT" >&5 echo "${ECHO_T}$LINT" >&6 else - echo "$as_me:2275: result: no" >&5 + echo "$as_me:2286: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -2281,10 +2292,10 @@ done ### checks for UNIX variants that set C preprocessor variables -echo "$as_me:2284: checking for AIX" >&5 +echo "$as_me:2295: checking for AIX" >&5 echo $ECHO_N "checking for AIX... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF -#line 2287 "configure" +#line 2298 "configure" #include "confdefs.h" #ifdef _AIX yes @@ -2293,24 +2304,24 @@ cat >conftest.$ac_ext <<_ACEOF _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "yes" >/dev/null 2>&1; then - echo "$as_me:2296: result: yes" >&5 + echo "$as_me:2307: result: yes" >&5 echo "${ECHO_T}yes" >&6 cat >>confdefs.h <<\EOF #define _ALL_SOURCE 1 EOF else - echo "$as_me:2303: result: no" >&5 + echo "$as_me:2314: result: no" >&5 echo "${ECHO_T}no" >&6 fi rm -f conftest* -echo "$as_me:2308: checking for POSIXized ISC" >&5 +echo "$as_me:2319: checking for POSIXized ISC" >&5 echo $ECHO_N "checking for POSIXized ISC... $ECHO_C" >&6 if test -d /etc/conf/kconfig.d && grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1 then - echo "$as_me:2313: result: yes" >&5 + echo "$as_me:2324: result: yes" >&5 echo "${ECHO_T}yes" >&6 ISC=yes # If later tests want to check for ISC. @@ -2324,14 +2335,14 @@ EOF CC="$CC -Xp" fi else - echo "$as_me:2327: result: no" >&5 + echo "$as_me:2338: result: no" >&5 echo "${ECHO_T}no" >&6 ISC= fi ### checks for compiler characteristics -echo "$as_me:2334: checking for ${CC-cc} option to accept ANSI C" >&5 +echo "$as_me:2345: checking for ${CC-cc} option to accept ANSI C" >&5 echo $ECHO_N "checking for ${CC-cc} option to accept ANSI C... $ECHO_C" >&6 if test "${cf_cv_ansi_cc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -2425,7 +2436,7 @@ if test -n "$cf_new_extra_cppflags" ; then fi cat >conftest.$ac_ext <<_ACEOF -#line 2428 "configure" +#line 2439 "configure" #include "confdefs.h" #ifndef CC_HAS_PROTOS @@ -2446,16 +2457,16 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:2449: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:2460: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:2452: \$? = $ac_status" >&5 + echo "$as_me:2463: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:2455: \"$ac_try\"") >&5 + { (eval echo "$as_me:2466: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:2458: \$? = $ac_status" >&5 + echo "$as_me:2469: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_ansi_cc="$cf_arg"; break else @@ -2468,7 +2479,7 @@ CFLAGS="$cf_save_CFLAGS" CPPFLAGS="$cf_save_CPPFLAGS" fi -echo "$as_me:2471: result: $cf_cv_ansi_cc" >&5 +echo "$as_me:2482: result: $cf_cv_ansi_cc" >&5 echo "${ECHO_T}$cf_cv_ansi_cc" >&6 if test "$cf_cv_ansi_cc" != "no"; then @@ -2550,7 +2561,7 @@ EOF fi fi -echo "$as_me:2553: checking for $CC option to accept ANSI C" >&5 +echo "$as_me:2564: checking for $CC option to accept ANSI C" >&5 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 if test "${ac_cv_prog_cc_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -2558,7 +2569,7 @@ else ac_cv_prog_cc_stdc=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF -#line 2561 "configure" +#line 2572 "configure" #include "confdefs.h" #include <stdarg.h> #include <stdio.h> @@ -2607,16 +2618,16 @@ for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIO do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext -if { (eval echo "$as_me:2610: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:2621: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:2613: \$? = $ac_status" >&5 + echo "$as_me:2624: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:2616: \"$ac_try\"") >&5 + { (eval echo "$as_me:2627: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:2619: \$? = $ac_status" >&5 + echo "$as_me:2630: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cc_stdc=$ac_arg break @@ -2633,21 +2644,21 @@ fi case "x$ac_cv_prog_cc_stdc" in x|xno) - echo "$as_me:2636: result: none needed" >&5 + echo "$as_me:2647: result: none needed" >&5 echo "${ECHO_T}none needed" >&6 ;; *) - echo "$as_me:2639: result: $ac_cv_prog_cc_stdc" >&5 + echo "$as_me:2650: result: $ac_cv_prog_cc_stdc" >&5 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 CC="$CC $ac_cv_prog_cc_stdc" ;; esac -echo "$as_me:2644: checking for an ANSI C-conforming const" >&5 +echo "$as_me:2655: checking for an ANSI C-conforming const" >&5 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6 if test "${ac_cv_c_const+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 2650 "configure" +#line 2661 "configure" #include "confdefs.h" int @@ -2705,16 +2716,16 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:2708: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:2719: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:2711: \$? = $ac_status" >&5 + echo "$as_me:2722: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:2714: \"$ac_try\"") >&5 + { (eval echo "$as_me:2725: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:2717: \$? = $ac_status" >&5 + echo "$as_me:2728: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_c_const=yes else @@ -2724,7 +2735,7 @@ ac_cv_c_const=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:2727: result: $ac_cv_c_const" >&5 +echo "$as_me:2738: result: $ac_cv_c_const" >&5 echo "${ECHO_T}$ac_cv_c_const" >&6 if test $ac_cv_c_const = no; then @@ -2751,7 +2762,7 @@ test -n "$PROG_EXT" && cat >>confdefs.h <<EOF #define PROG_EXT "$PROG_EXT" EOF -echo "$as_me:2754: checking if $CC -U and -D options work together" >&5 +echo "$as_me:2765: checking if $CC -U and -D options work together" >&5 echo $ECHO_N "checking if $CC -U and -D options work together... $ECHO_C" >&6 if test "${cf_cv_cc_u_d_options+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -2760,7 +2771,7 @@ else cf_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-UU_D_OPTIONS -DU_D_OPTIONS -DD_U_OPTIONS -UD_U_OPTIONS" cat >conftest.$ac_ext <<_ACEOF -#line 2763 "configure" +#line 2774 "configure" #include "confdefs.h" int @@ -2779,16 +2790,16 @@ make a defined-error } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:2782: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:2793: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:2785: \$? = $ac_status" >&5 + echo "$as_me:2796: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:2788: \"$ac_try\"") >&5 + { (eval echo "$as_me:2799: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:2791: \$? = $ac_status" >&5 + echo "$as_me:2802: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_cc_u_d_options=yes @@ -2802,7 +2813,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext CPPFLAGS="$cf_save_CPPFLAGS" fi -echo "$as_me:2805: result: $cf_cv_cc_u_d_options" >&5 +echo "$as_me:2816: result: $cf_cv_cc_u_d_options" >&5 echo "${ECHO_T}$cf_cv_cc_u_d_options" >&6 cf_XOPEN_SOURCE=500 @@ -2826,16 +2837,16 @@ hpux*) #(vi irix[56].*) #(vi CPPFLAGS="$CPPFLAGS -D_SGI_SOURCE" ;; -linux*|gnu*) #(vi +linux*|gnu*|k*bsd*-gnu) #(vi -echo "$as_me:2831: checking if we must define _GNU_SOURCE" >&5 +echo "$as_me:2842: checking if we must define _GNU_SOURCE" >&5 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6 if test "${cf_cv_gnu_source+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 2838 "configure" +#line 2849 "configure" #include "confdefs.h" #include <sys/types.h> int @@ -2850,16 +2861,16 @@ make an error } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:2853: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:2864: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:2856: \$? = $ac_status" >&5 + echo "$as_me:2867: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:2859: \"$ac_try\"") >&5 + { (eval echo "$as_me:2870: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:2862: \$? = $ac_status" >&5 + echo "$as_me:2873: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_gnu_source=no else @@ -2868,7 +2879,7 @@ cat conftest.$ac_ext >&5 cf_save="$CPPFLAGS" CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE" cat >conftest.$ac_ext <<_ACEOF -#line 2871 "configure" +#line 2882 "configure" #include "confdefs.h" #include <sys/types.h> int @@ -2883,16 +2894,16 @@ make an error } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:2886: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:2897: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:2889: \$? = $ac_status" >&5 + echo "$as_me:2900: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:2892: \"$ac_try\"") >&5 + { (eval echo "$as_me:2903: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:2895: \$? = $ac_status" >&5 + echo "$as_me:2906: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_gnu_source=no else @@ -2907,7 +2918,7 @@ fi rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:2910: result: $cf_cv_gnu_source" >&5 +echo "$as_me:2921: result: $cf_cv_gnu_source" >&5 echo "${ECHO_T}$cf_cv_gnu_source" >&6 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE" @@ -2934,14 +2945,14 @@ solaris*) #(vi CPPFLAGS="$CPPFLAGS -D__EXTENSIONS__" ;; *) - echo "$as_me:2937: checking if we should define _XOPEN_SOURCE" >&5 + echo "$as_me:2948: checking if we should define _XOPEN_SOURCE" >&5 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6 if test "${cf_cv_xopen_source+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 2944 "configure" +#line 2955 "configure" #include "confdefs.h" #include <sys/types.h> int @@ -2956,16 +2967,16 @@ make an error } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:2959: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:2970: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:2962: \$? = $ac_status" >&5 + echo "$as_me:2973: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:2965: \"$ac_try\"") >&5 + { (eval echo "$as_me:2976: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:2968: \$? = $ac_status" >&5 + echo "$as_me:2979: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_xopen_source=no else @@ -2974,7 +2985,7 @@ cat conftest.$ac_ext >&5 cf_save="$CPPFLAGS" CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE" cat >conftest.$ac_ext <<_ACEOF -#line 2977 "configure" +#line 2988 "configure" #include "confdefs.h" #include <sys/types.h> int @@ -2989,16 +3000,16 @@ make an error } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:2992: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:3003: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:2995: \$? = $ac_status" >&5 + echo "$as_me:3006: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:2998: \"$ac_try\"") >&5 + { (eval echo "$as_me:3009: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:3001: \$? = $ac_status" >&5 + echo "$as_me:3012: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_xopen_source=no else @@ -3013,7 +3024,7 @@ fi rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:3016: result: $cf_cv_xopen_source" >&5 +echo "$as_me:3027: result: $cf_cv_xopen_source" >&5 echo "${ECHO_T}$cf_cv_xopen_source" >&6 if test "$cf_cv_xopen_source" != no ; then @@ -3047,16 +3058,16 @@ cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \ sed -e 's/-[UD]_POSIX_C_SOURCE\(=[^ ]*\)\?[ ]/ /g' \ -e 's/-[UD]_POSIX_C_SOURCE\(=[^ ]*\)\?$//g'` -echo "$as_me:3050: checking if we should define _POSIX_C_SOURCE" >&5 +echo "$as_me:3061: checking if we should define _POSIX_C_SOURCE" >&5 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6 if test "${cf_cv_posix_c_source+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else -echo "(line 3056) testing if the symbol is already defined go no further ..." 1>&5 +echo "${as_me-configure}:3067: testing if the symbol is already defined go no further ..." 1>&5 cat >conftest.$ac_ext <<_ACEOF -#line 3059 "configure" +#line 3070 "configure" #include "confdefs.h" #include <sys/types.h> int @@ -3071,16 +3082,16 @@ make an error } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:3074: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:3085: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:3077: \$? = $ac_status" >&5 + echo "$as_me:3088: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:3080: \"$ac_try\"") >&5 + { (eval echo "$as_me:3091: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:3083: \$? = $ac_status" >&5 + echo "$as_me:3094: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_posix_c_source=no else @@ -3101,7 +3112,7 @@ cf_want_posix_source=no esac if test "$cf_want_posix_source" = yes ; then cat >conftest.$ac_ext <<_ACEOF -#line 3104 "configure" +#line 3115 "configure" #include "confdefs.h" #include <sys/types.h> int @@ -3116,16 +3127,16 @@ make an error } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:3119: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:3130: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:3122: \$? = $ac_status" >&5 + echo "$as_me:3133: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:3125: \"$ac_try\"") >&5 + { (eval echo "$as_me:3136: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:3128: \$? = $ac_status" >&5 + echo "$as_me:3139: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else @@ -3136,15 +3147,15 @@ fi rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "(line 3139) testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5 +echo "${as_me-configure}:3150: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5 CFLAGS="$cf_trim_CFLAGS" CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source" -echo "(line 3144) testing if the second compile does not leave our definition intact error ..." 1>&5 +echo "${as_me-configure}:3155: testing if the second compile does not leave our definition intact error ..." 1>&5 cat >conftest.$ac_ext <<_ACEOF -#line 3147 "configure" +#line 3158 "configure" #include "confdefs.h" #include <sys/types.h> int @@ -3159,16 +3170,16 @@ make an error } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:3162: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:3173: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:3165: \$? = $ac_status" >&5 + echo "$as_me:3176: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:3168: \"$ac_try\"") >&5 + { (eval echo "$as_me:3179: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:3171: \$? = $ac_status" >&5 + echo "$as_me:3182: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else @@ -3184,7 +3195,7 @@ fi rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:3187: result: $cf_cv_posix_c_source" >&5 +echo "$as_me:3198: result: $cf_cv_posix_c_source" >&5 echo "${ECHO_T}$cf_cv_posix_c_source" >&6 if test "$cf_cv_posix_c_source" != no ; then @@ -3201,14 +3212,14 @@ fi ;; esac -echo "$as_me:3204: checking if SIGWINCH is defined" >&5 +echo "$as_me:3215: checking if SIGWINCH is defined" >&5 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6 if test "${cf_cv_define_sigwinch+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 3211 "configure" +#line 3222 "configure" #include "confdefs.h" #include <sys/types.h> @@ -3223,23 +3234,23 @@ int x = SIGWINCH } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:3226: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:3237: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:3229: \$? = $ac_status" >&5 + echo "$as_me:3240: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:3232: \"$ac_try\"") >&5 + { (eval echo "$as_me:3243: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:3235: \$? = $ac_status" >&5 + echo "$as_me:3246: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_define_sigwinch=yes else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF -#line 3242 "configure" +#line 3253 "configure" #include "confdefs.h" #undef _XOPEN_SOURCE @@ -3257,16 +3268,16 @@ int x = SIGWINCH } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:3260: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:3271: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:3263: \$? = $ac_status" >&5 + echo "$as_me:3274: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:3266: \"$ac_try\"") >&5 + { (eval echo "$as_me:3277: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:3269: \$? = $ac_status" >&5 + echo "$as_me:3280: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_define_sigwinch=maybe else @@ -3280,11 +3291,11 @@ fi rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:3283: result: $cf_cv_define_sigwinch" >&5 +echo "$as_me:3294: result: $cf_cv_define_sigwinch" >&5 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6 if test "$cf_cv_define_sigwinch" = maybe ; then -echo "$as_me:3287: checking for actual SIGWINCH definition" >&5 +echo "$as_me:3298: checking for actual SIGWINCH definition" >&5 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6 if test "${cf_cv_fixup_sigwinch+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -3295,7 +3306,7 @@ cf_sigwinch=32 while test $cf_sigwinch != 1 do cat >conftest.$ac_ext <<_ACEOF -#line 3298 "configure" +#line 3309 "configure" #include "confdefs.h" #undef _XOPEN_SOURCE @@ -3317,16 +3328,16 @@ int x = SIGWINCH } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:3320: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:3331: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:3323: \$? = $ac_status" >&5 + echo "$as_me:3334: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:3326: \"$ac_try\"") >&5 + { (eval echo "$as_me:3337: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:3329: \$? = $ac_status" >&5 + echo "$as_me:3340: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_fixup_sigwinch=$cf_sigwinch break @@ -3340,7 +3351,7 @@ cf_sigwinch=`expr $cf_sigwinch - 1` done fi -echo "$as_me:3343: result: $cf_cv_fixup_sigwinch" >&5 +echo "$as_me:3354: result: $cf_cv_fixup_sigwinch" >&5 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6 if test "$cf_cv_fixup_sigwinch" != unknown ; then @@ -3353,29 +3364,31 @@ fi for ac_header in \ ncurses/term.h \ stdlib.h \ +sys/ttydefaults.h \ +term.h \ termios.h \ unistd.h \ wchar.h \ do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -echo "$as_me:3362: checking for $ac_header" >&5 +echo "$as_me:3375: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 3368 "configure" +#line 3381 "configure" #include "confdefs.h" #include <$ac_header> _ACEOF -if { (eval echo "$as_me:3372: \"$ac_cpp conftest.$ac_ext\"") >&5 +if { (eval echo "$as_me:3385: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? egrep -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:3378: \$? = $ac_status" >&5 + echo "$as_me:3391: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag @@ -3394,7 +3407,7 @@ else fi rm -f conftest.err conftest.$ac_ext fi -echo "$as_me:3397: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "$as_me:3410: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<EOF @@ -3404,13 +3417,13 @@ EOF fi done -echo "$as_me:3407: checking whether time.h and sys/time.h may both be included" >&5 +echo "$as_me:3420: checking whether time.h and sys/time.h may both be included" >&5 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6 if test "${ac_cv_header_time+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 3413 "configure" +#line 3426 "configure" #include "confdefs.h" #include <sys/types.h> #include <sys/time.h> @@ -3426,16 +3439,16 @@ return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:3429: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:3442: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:3432: \$? = $ac_status" >&5 + echo "$as_me:3445: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:3435: \"$ac_try\"") >&5 + { (eval echo "$as_me:3448: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:3438: \$? = $ac_status" >&5 + echo "$as_me:3451: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_header_time=yes else @@ -3445,7 +3458,7 @@ ac_cv_header_time=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:3448: result: $ac_cv_header_time" >&5 +echo "$as_me:3461: result: $ac_cv_header_time" >&5 echo "${ECHO_T}$ac_cv_header_time" >&6 if test $ac_cv_header_time = yes; then @@ -3455,13 +3468,13 @@ EOF fi - echo "$as_me:3458: checking for nl_langinfo and CODESET" >&5 + echo "$as_me:3471: checking for nl_langinfo and CODESET" >&5 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6 if test "${am_cv_langinfo_codeset+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 3464 "configure" +#line 3477 "configure" #include "confdefs.h" #include <langinfo.h> int @@ -3473,16 +3486,16 @@ char* cs = nl_langinfo(CODESET); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:3476: \"$ac_link\"") >&5 +if { (eval echo "$as_me:3489: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:3479: \$? = $ac_status" >&5 + echo "$as_me:3492: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:3482: \"$ac_try\"") >&5 + { (eval echo "$as_me:3495: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:3485: \$? = $ac_status" >&5 + echo "$as_me:3498: \$? = $ac_status" >&5 (exit $ac_status); }; }; then am_cv_langinfo_codeset=yes else @@ -3493,7 +3506,7 @@ fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:3496: result: $am_cv_langinfo_codeset" >&5 +echo "$as_me:3509: result: $am_cv_langinfo_codeset" >&5 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6 if test $am_cv_langinfo_codeset = yes; then @@ -3505,7 +3518,7 @@ EOF ### checks for typedefs -echo "$as_me:3508: checking for signal global datatype" >&5 +echo "$as_me:3521: checking for signal global datatype" >&5 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6 if test "${cf_cv_sig_atomic_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -3517,7 +3530,7 @@ else "int" do cat >conftest.$ac_ext <<_ACEOF -#line 3520 "configure" +#line 3533 "configure" #include "confdefs.h" #include <sys/types.h> @@ -3540,16 +3553,16 @@ signal(SIGINT, handler); } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:3543: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:3556: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:3546: \$? = $ac_status" >&5 + echo "$as_me:3559: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:3549: \"$ac_try\"") >&5 + { (eval echo "$as_me:3562: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:3552: \$? = $ac_status" >&5 + echo "$as_me:3565: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_sig_atomic_t=$cf_type else @@ -3563,20 +3576,20 @@ rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:3566: result: $cf_cv_sig_atomic_t" >&5 +echo "$as_me:3579: result: $cf_cv_sig_atomic_t" >&5 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6 test "$cf_cv_sig_atomic_t" != no && cat >>confdefs.h <<EOF #define SIG_ATOMIC_T $cf_cv_sig_atomic_t EOF -echo "$as_me:3572: checking for size_t in <sys/types.h> or <stdio.h>" >&5 +echo "$as_me:3585: checking for size_t in <sys/types.h> or <stdio.h>" >&5 echo $ECHO_N "checking for size_t in <sys/types.h> or <stdio.h>... $ECHO_C" >&6 if test "${cf_cv_type_size_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 3579 "configure" +#line 3592 "configure" #include "confdefs.h" #include <sys/types.h> @@ -3594,16 +3607,16 @@ size_t x } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:3597: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:3610: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:3600: \$? = $ac_status" >&5 + echo "$as_me:3613: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:3603: \"$ac_try\"") >&5 + { (eval echo "$as_me:3616: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:3606: \$? = $ac_status" >&5 + echo "$as_me:3619: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_type_size_t=yes else @@ -3615,19 +3628,19 @@ rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:3618: result: $cf_cv_type_size_t" >&5 +echo "$as_me:3631: result: $cf_cv_type_size_t" >&5 echo "${ECHO_T}$cf_cv_type_size_t" >&6 test $cf_cv_type_size_t = no && cat >>confdefs.h <<\EOF #define size_t unsigned EOF -echo "$as_me:3624: checking for ANSI C header files" >&5 +echo "$as_me:3637: checking for ANSI C header files" >&5 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 3630 "configure" +#line 3643 "configure" #include "confdefs.h" #include <stdlib.h> #include <stdarg.h> @@ -3635,13 +3648,13 @@ else #include <float.h> _ACEOF -if { (eval echo "$as_me:3638: \"$ac_cpp conftest.$ac_ext\"") >&5 +if { (eval echo "$as_me:3651: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? egrep -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:3644: \$? = $ac_status" >&5 + echo "$as_me:3657: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag @@ -3663,7 +3676,7 @@ rm -f conftest.err conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF -#line 3666 "configure" +#line 3679 "configure" #include "confdefs.h" #include <string.h> @@ -3681,7 +3694,7 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF -#line 3684 "configure" +#line 3697 "configure" #include "confdefs.h" #include <stdlib.h> @@ -3702,7 +3715,7 @@ if test $ac_cv_header_stdc = yes; then : else cat >conftest.$ac_ext <<_ACEOF -#line 3705 "configure" +#line 3718 "configure" #include "confdefs.h" #include <ctype.h> #if ((' ' & 0x0FF) == 0x020) @@ -3723,20 +3736,20 @@ main () for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) - exit(2); - exit (0); + $ac_main_return(2); + $ac_main_return (0); } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:3731: \"$ac_link\"") >&5 +if { (eval echo "$as_me:3744: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:3734: \$? = $ac_status" >&5 + echo "$as_me:3747: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:3736: \"$ac_try\"") >&5 + { (eval echo "$as_me:3749: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:3739: \$? = $ac_status" >&5 + echo "$as_me:3752: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else @@ -3749,7 +3762,7 @@ rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi -echo "$as_me:3752: result: $ac_cv_header_stdc" >&5 +echo "$as_me:3765: result: $ac_cv_header_stdc" >&5 echo "${ECHO_T}$ac_cv_header_stdc" >&6 if test $ac_cv_header_stdc = yes; then @@ -3765,28 +3778,28 @@ for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -echo "$as_me:3768: checking for $ac_header" >&5 +echo "$as_me:3781: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 3774 "configure" +#line 3787 "configure" #include "confdefs.h" $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:3780: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:3793: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:3783: \$? = $ac_status" >&5 + echo "$as_me:3796: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:3786: \"$ac_try\"") >&5 + { (eval echo "$as_me:3799: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:3789: \$? = $ac_status" >&5 + echo "$as_me:3802: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_Header=yes" else @@ -3796,7 +3809,7 @@ eval "$as_ac_Header=no" fi rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:3799: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "$as_me:3812: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<EOF @@ -3806,13 +3819,13 @@ EOF fi done -echo "$as_me:3809: checking for time_t" >&5 +echo "$as_me:3822: checking for time_t" >&5 echo $ECHO_N "checking for time_t... $ECHO_C" >&6 if test "${ac_cv_type_time_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 3815 "configure" +#line 3828 "configure" #include "confdefs.h" $ac_includes_default int @@ -3827,16 +3840,16 @@ if (sizeof (time_t)) } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:3830: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:3843: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:3833: \$? = $ac_status" >&5 + echo "$as_me:3846: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:3836: \"$ac_try\"") >&5 + { (eval echo "$as_me:3849: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:3839: \$? = $ac_status" >&5 + echo "$as_me:3852: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_time_t=yes else @@ -3846,7 +3859,7 @@ ac_cv_type_time_t=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:3849: result: $ac_cv_type_time_t" >&5 +echo "$as_me:3862: result: $ac_cv_type_time_t" >&5 echo "${ECHO_T}$ac_cv_type_time_t" >&6 if test $ac_cv_type_time_t = yes; then : @@ -3858,13 +3871,13 @@ EOF fi -echo "$as_me:3861: checking for mode_t" >&5 +echo "$as_me:3874: checking for mode_t" >&5 echo $ECHO_N "checking for mode_t... $ECHO_C" >&6 if test "${ac_cv_type_mode_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 3867 "configure" +#line 3880 "configure" #include "confdefs.h" $ac_includes_default int @@ -3879,16 +3892,16 @@ if (sizeof (mode_t)) } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:3882: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:3895: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:3885: \$? = $ac_status" >&5 + echo "$as_me:3898: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:3888: \"$ac_try\"") >&5 + { (eval echo "$as_me:3901: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:3891: \$? = $ac_status" >&5 + echo "$as_me:3904: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_mode_t=yes else @@ -3898,7 +3911,7 @@ ac_cv_type_mode_t=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:3901: result: $ac_cv_type_mode_t" >&5 +echo "$as_me:3914: result: $ac_cv_type_mode_t" >&5 echo "${ECHO_T}$ac_cv_type_mode_t" >&6 if test $ac_cv_type_mode_t = yes; then : @@ -3910,13 +3923,13 @@ EOF fi -echo "$as_me:3913: checking for pid_t" >&5 +echo "$as_me:3926: checking for pid_t" >&5 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6 if test "${ac_cv_type_pid_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 3919 "configure" +#line 3932 "configure" #include "confdefs.h" $ac_includes_default int @@ -3931,16 +3944,16 @@ if (sizeof (pid_t)) } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:3934: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:3947: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:3937: \$? = $ac_status" >&5 + echo "$as_me:3950: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:3940: \"$ac_try\"") >&5 + { (eval echo "$as_me:3953: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:3943: \$? = $ac_status" >&5 + echo "$as_me:3956: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_pid_t=yes else @@ -3950,7 +3963,7 @@ ac_cv_type_pid_t=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:3953: result: $ac_cv_type_pid_t" >&5 +echo "$as_me:3966: result: $ac_cv_type_pid_t" >&5 echo "${ECHO_T}$ac_cv_type_pid_t" >&6 if test $ac_cv_type_pid_t = yes; then : @@ -3962,13 +3975,13 @@ EOF fi -echo "$as_me:3965: checking for uid_t in sys/types.h" >&5 +echo "$as_me:3978: checking for uid_t in sys/types.h" >&5 echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6 if test "${ac_cv_type_uid_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 3971 "configure" +#line 3984 "configure" #include "confdefs.h" #include <sys/types.h> @@ -3982,7 +3995,7 @@ fi rm -f conftest* fi -echo "$as_me:3985: result: $ac_cv_type_uid_t" >&5 +echo "$as_me:3998: result: $ac_cv_type_uid_t" >&5 echo "${ECHO_T}$ac_cv_type_uid_t" >&6 if test $ac_cv_type_uid_t = no; then @@ -3996,13 +4009,13 @@ EOF fi -echo "$as_me:3999: checking for off_t" >&5 +echo "$as_me:4012: checking for off_t" >&5 echo $ECHO_N "checking for off_t... $ECHO_C" >&6 if test "${ac_cv_type_off_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 4005 "configure" +#line 4018 "configure" #include "confdefs.h" $ac_includes_default int @@ -4017,16 +4030,16 @@ if (sizeof (off_t)) } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:4020: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:4033: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:4023: \$? = $ac_status" >&5 + echo "$as_me:4036: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:4026: \"$ac_try\"") >&5 + { (eval echo "$as_me:4039: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4029: \$? = $ac_status" >&5 + echo "$as_me:4042: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_off_t=yes else @@ -4036,7 +4049,7 @@ ac_cv_type_off_t=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:4039: result: $ac_cv_type_off_t" >&5 +echo "$as_me:4052: result: $ac_cv_type_off_t" >&5 echo "${ECHO_T}$ac_cv_type_off_t" >&6 if test $ac_cv_type_off_t = yes; then : @@ -4065,13 +4078,13 @@ for ac_func in \ wcwidth do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:4068: checking for $ac_func" >&5 +echo "$as_me:4081: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 4074 "configure" +#line 4087 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. */ @@ -4102,16 +4115,16 @@ f = $ac_func; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:4105: \"$ac_link\"") >&5 +if { (eval echo "$as_me:4118: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:4108: \$? = $ac_status" >&5 + echo "$as_me:4121: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:4111: \"$ac_try\"") >&5 + { (eval echo "$as_me:4124: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4114: \$? = $ac_status" >&5 + echo "$as_me:4127: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else @@ -4121,7 +4134,7 @@ eval "$as_ac_var=no" fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:4124: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "$as_me:4137: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<EOF @@ -4131,13 +4144,13 @@ EOF fi done -echo "$as_me:4134: checking for memmove" >&5 +echo "$as_me:4147: checking for memmove" >&5 echo $ECHO_N "checking for memmove... $ECHO_C" >&6 if test "${ac_cv_func_memmove+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 4140 "configure" +#line 4153 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char memmove (); below. */ @@ -4168,16 +4181,16 @@ f = memmove; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:4171: \"$ac_link\"") >&5 +if { (eval echo "$as_me:4184: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:4174: \$? = $ac_status" >&5 + echo "$as_me:4187: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:4177: \"$ac_try\"") >&5 + { (eval echo "$as_me:4190: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4180: \$? = $ac_status" >&5 + echo "$as_me:4193: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_memmove=yes else @@ -4187,19 +4200,19 @@ ac_cv_func_memmove=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:4190: result: $ac_cv_func_memmove" >&5 +echo "$as_me:4203: result: $ac_cv_func_memmove" >&5 echo "${ECHO_T}$ac_cv_func_memmove" >&6 if test $ac_cv_func_memmove = yes; then : else -echo "$as_me:4196: checking for bcopy" >&5 +echo "$as_me:4209: checking for bcopy" >&5 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6 if test "${ac_cv_func_bcopy+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 4202 "configure" +#line 4215 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char bcopy (); below. */ @@ -4230,16 +4243,16 @@ f = bcopy; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:4233: \"$ac_link\"") >&5 +if { (eval echo "$as_me:4246: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:4236: \$? = $ac_status" >&5 + echo "$as_me:4249: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:4239: \"$ac_try\"") >&5 + { (eval echo "$as_me:4252: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4242: \$? = $ac_status" >&5 + echo "$as_me:4255: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_bcopy=yes else @@ -4249,11 +4262,11 @@ ac_cv_func_bcopy=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:4252: result: $ac_cv_func_bcopy" >&5 +echo "$as_me:4265: result: $ac_cv_func_bcopy" >&5 echo "${ECHO_T}$ac_cv_func_bcopy" >&6 if test $ac_cv_func_bcopy = yes; then - echo "$as_me:4256: checking if bcopy does overlapping moves" >&5 + echo "$as_me:4269: checking if bcopy does overlapping moves" >&5 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6 if test "${cf_cv_good_bcopy+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -4263,7 +4276,7 @@ else cf_cv_good_bcopy=unknown else cat >conftest.$ac_ext <<_ACEOF -#line 4266 "configure" +#line 4279 "configure" #include "confdefs.h" int main() { @@ -4272,20 +4285,20 @@ int main() { bcopy(data, temp, sizeof(data)); bcopy(temp+10, temp, 15); bcopy(temp+5, temp+15, 10); - exit (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz")); + ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz")); } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:4280: \"$ac_link\"") >&5 +if { (eval echo "$as_me:4293: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:4283: \$? = $ac_status" >&5 + echo "$as_me:4296: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:4285: \"$ac_try\"") >&5 + { (eval echo "$as_me:4298: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4288: \$? = $ac_status" >&5 + echo "$as_me:4301: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_good_bcopy=yes else @@ -4298,7 +4311,7 @@ rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi -echo "$as_me:4301: result: $cf_cv_good_bcopy" >&5 +echo "$as_me:4314: result: $cf_cv_good_bcopy" >&5 echo "${ECHO_T}$cf_cv_good_bcopy" >&6 else @@ -4322,23 +4335,23 @@ fi for ac_header in lastlog.h paths.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -echo "$as_me:4325: checking for $ac_header" >&5 +echo "$as_me:4338: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 4331 "configure" +#line 4344 "configure" #include "confdefs.h" #include <$ac_header> _ACEOF -if { (eval echo "$as_me:4335: \"$ac_cpp conftest.$ac_ext\"") >&5 +if { (eval echo "$as_me:4348: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? egrep -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:4341: \$? = $ac_status" >&5 + echo "$as_me:4354: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag @@ -4357,7 +4370,7 @@ else fi rm -f conftest.err conftest.$ac_ext fi -echo "$as_me:4360: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "$as_me:4373: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<EOF @@ -4367,14 +4380,14 @@ EOF fi done -echo "$as_me:4370: checking for lastlog path" >&5 +echo "$as_me:4383: checking for lastlog path" >&5 echo $ECHO_N "checking for lastlog path... $ECHO_C" >&6 if test "${cf_cv_path_lastlog+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 4377 "configure" +#line 4390 "configure" #include "confdefs.h" #include <sys/types.h> @@ -4394,16 +4407,16 @@ char *path = _PATH_LASTLOG } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:4397: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:4410: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:4400: \$? = $ac_status" >&5 + echo "$as_me:4413: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:4403: \"$ac_try\"") >&5 + { (eval echo "$as_me:4416: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4406: \$? = $ac_status" >&5 + echo "$as_me:4419: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_path_lastlog="_PATH_LASTLOG" else @@ -4418,13 +4431,13 @@ fi rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:4421: result: $cf_cv_path_lastlog" >&5 +echo "$as_me:4434: result: $cf_cv_path_lastlog" >&5 echo "${ECHO_T}$cf_cv_path_lastlog" >&6 test $cf_cv_path_lastlog != no && cat >>confdefs.h <<\EOF #define USE_LASTLOG 1 EOF -echo "$as_me:4427: checking for utmp implementation" >&5 +echo "$as_me:4440: checking for utmp implementation" >&5 echo $ECHO_N "checking for utmp implementation... $ECHO_C" >&6 if test "${cf_cv_have_utmp+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -4441,7 +4454,7 @@ cf_utmp_includes=" #endif " cat >conftest.$ac_ext <<_ACEOF -#line 4444 "configure" +#line 4457 "configure" #include "confdefs.h" $cf_utmp_includes int @@ -4455,16 +4468,16 @@ struct $cf_header x; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:4458: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:4471: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:4461: \$? = $ac_status" >&5 + echo "$as_me:4474: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:4464: \"$ac_try\"") >&5 + { (eval echo "$as_me:4477: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4467: \$? = $ac_status" >&5 + echo "$as_me:4480: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_have_utmp=$cf_header break @@ -4473,7 +4486,7 @@ else cat conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF -#line 4476 "configure" +#line 4489 "configure" #include "confdefs.h" $cf_utmp_includes int @@ -4487,16 +4500,16 @@ struct $cf_header x; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:4490: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:4503: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:4493: \$? = $ac_status" >&5 + echo "$as_me:4506: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:4496: \"$ac_try\"") >&5 + { (eval echo "$as_me:4509: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4499: \$? = $ac_status" >&5 + echo "$as_me:4512: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_have_utmp=$cf_header break @@ -4511,7 +4524,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext done fi -echo "$as_me:4514: result: $cf_cv_have_utmp" >&5 +echo "$as_me:4527: result: $cf_cv_have_utmp" >&5 echo "${ECHO_T}$cf_cv_have_utmp" >&6 if test $cf_cv_have_utmp != no ; then @@ -4524,14 +4537,14 @@ EOF EOF if test $cf_cv_have_utmp != no ; then -echo "$as_me:4527: checking if utmp.ut_host is declared" >&5 -echo $ECHO_N "checking if utmp.ut_host is declared... $ECHO_C" >&6 +echo "$as_me:4540: checking if ${cf_cv_have_utmp}.ut_host is declared" >&5 +echo $ECHO_N "checking if ${cf_cv_have_utmp}.ut_host is declared... $ECHO_C" >&6 if test "${cf_cv_have_utmp_ut_host+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 4534 "configure" +#line 4547 "configure" #include "confdefs.h" #include <sys/types.h> @@ -4545,16 +4558,16 @@ struct $cf_cv_have_utmp x; char *y = &x.ut_host[0] } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:4548: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:4561: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:4551: \$? = $ac_status" >&5 + echo "$as_me:4564: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:4554: \"$ac_try\"") >&5 + { (eval echo "$as_me:4567: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4557: \$? = $ac_status" >&5 + echo "$as_me:4570: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_have_utmp_ut_host=yes else @@ -4566,7 +4579,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:4569: result: $cf_cv_have_utmp_ut_host" >&5 +echo "$as_me:4582: result: $cf_cv_have_utmp_ut_host" >&5 echo "${ECHO_T}$cf_cv_have_utmp_ut_host" >&6 test $cf_cv_have_utmp_ut_host != no && cat >>confdefs.h <<\EOF #define HAVE_UTMP_UT_HOST 1 @@ -4575,8 +4588,59 @@ EOF fi if test $cf_cv_have_utmp != no ; then -echo "$as_me:4578: checking if utmp.ut_name is declared" >&5 -echo $ECHO_N "checking if utmp.ut_name is declared... $ECHO_C" >&6 +echo "$as_me:4591: checking if ${cf_cv_have_utmp}.ut_syslen is declared" >&5 +echo $ECHO_N "checking if ${cf_cv_have_utmp}.ut_syslen is declared... $ECHO_C" >&6 +if test "${cf_cv_have_utmp_ut_syslen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + cat >conftest.$ac_ext <<_ACEOF +#line 4598 "configure" +#include "confdefs.h" + +#include <sys/types.h> +#include <${cf_cv_have_utmp}.h> +int +main () +{ +struct $cf_cv_have_utmp x; int y = x.ut_syslen + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:4612: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:4615: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:4618: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:4621: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + cf_cv_have_utmp_ut_syslen=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +cf_cv_have_utmp_ut_syslen=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext + +fi + +echo "$as_me:4633: result: $cf_cv_have_utmp_ut_syslen" >&5 +echo "${ECHO_T}$cf_cv_have_utmp_ut_syslen" >&6 +test $cf_cv_have_utmp_ut_syslen != no && cat >>confdefs.h <<\EOF +#define HAVE_UTMP_UT_SYSLEN 1 +EOF + +fi + +if test $cf_cv_have_utmp != no ; then +echo "$as_me:4642: checking if ${cf_cv_have_utmp}.ut_name is declared" >&5 +echo $ECHO_N "checking if ${cf_cv_have_utmp}.ut_name is declared... $ECHO_C" >&6 if test "${cf_cv_have_utmp_ut_name+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4592,7 +4656,7 @@ cf_utmp_includes=" " for cf_header in ut_name ut_user ; do cat >conftest.$ac_ext <<_ACEOF -#line 4595 "configure" +#line 4659 "configure" #include "confdefs.h" $cf_utmp_includes int @@ -4606,16 +4670,16 @@ struct $cf_cv_have_utmp x; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:4609: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:4673: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:4612: \$? = $ac_status" >&5 + echo "$as_me:4676: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:4615: \"$ac_try\"") >&5 + { (eval echo "$as_me:4679: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4618: \$? = $ac_status" >&5 + echo "$as_me:4682: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_have_utmp_ut_name=$cf_header break @@ -4627,12 +4691,12 @@ rm -f conftest.$ac_objext conftest.$ac_ext done fi -echo "$as_me:4630: result: $cf_cv_have_utmp_ut_name" >&5 +echo "$as_me:4694: result: $cf_cv_have_utmp_ut_name" >&5 echo "${ECHO_T}$cf_cv_have_utmp_ut_name" >&6 case $cf_cv_have_utmp_ut_name in #(vi no) #(vi - { { echo "$as_me:4635: error: Cannot find declaration for ut.ut_name" >&5 + { { echo "$as_me:4699: error: Cannot find declaration for ut.ut_name" >&5 echo "$as_me: error: Cannot find declaration for ut.ut_name" >&2;} { (exit 1); exit 1; }; } ;; @@ -4646,7 +4710,7 @@ esac fi if test $cf_cv_have_utmp != no ; then -echo "$as_me:4649: checking for exit-status in $cf_cv_have_utmp" >&5 +echo "$as_me:4713: checking for exit-status in $cf_cv_have_utmp" >&5 echo $ECHO_N "checking for exit-status in $cf_cv_have_utmp... $ECHO_C" >&6 if test "${cf_cv_have_utmp_ut_xstatus+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -4659,7 +4723,7 @@ for cf_result in \ ut_exit.ut_exit do cat >conftest.$ac_ext <<_ACEOF -#line 4662 "configure" +#line 4726 "configure" #include "confdefs.h" #include <sys/types.h> @@ -4673,16 +4737,16 @@ struct $cf_cv_have_utmp x; long y = x.$cf_result = 0 } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:4676: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:4740: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:4679: \$? = $ac_status" >&5 + echo "$as_me:4743: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:4682: \"$ac_try\"") >&5 + { (eval echo "$as_me:4746: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4685: \$? = $ac_status" >&5 + echo "$as_me:4749: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_have_utmp_ut_xstatus=$cf_result break @@ -4695,7 +4759,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext done fi -echo "$as_me:4698: result: $cf_cv_have_utmp_ut_xstatus" >&5 +echo "$as_me:4762: result: $cf_cv_have_utmp_ut_xstatus" >&5 echo "${ECHO_T}$cf_cv_have_utmp_ut_xstatus" >&6 if test $cf_cv_have_utmp_ut_xstatus != no ; then cat >>confdefs.h <<\EOF @@ -4710,14 +4774,14 @@ fi fi if test $cf_cv_have_utmp != no ; then -echo "$as_me:4713: checking if utmp.ut_xtime is declared" >&5 -echo $ECHO_N "checking if utmp.ut_xtime is declared... $ECHO_C" >&6 +echo "$as_me:4777: checking if ${cf_cv_have_utmp}.ut_xtime is declared" >&5 +echo $ECHO_N "checking if ${cf_cv_have_utmp}.ut_xtime is declared... $ECHO_C" >&6 if test "${cf_cv_have_utmp_ut_xtime+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 4720 "configure" +#line 4784 "configure" #include "confdefs.h" #include <sys/types.h> @@ -4731,23 +4795,23 @@ struct $cf_cv_have_utmp x; long y = x.ut_xtime = 0 } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:4734: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:4798: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:4737: \$? = $ac_status" >&5 + echo "$as_me:4801: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:4740: \"$ac_try\"") >&5 + { (eval echo "$as_me:4804: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4743: \$? = $ac_status" >&5 + echo "$as_me:4807: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_have_utmp_ut_xtime=yes else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF -#line 4750 "configure" +#line 4814 "configure" #include "confdefs.h" #include <sys/types.h> @@ -4761,16 +4825,16 @@ struct $cf_cv_have_utmp x; long y = x.ut_tv.tv_sec } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:4764: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:4828: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:4767: \$? = $ac_status" >&5 + echo "$as_me:4831: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:4770: \"$ac_try\"") >&5 + { (eval echo "$as_me:4834: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4773: \$? = $ac_status" >&5 + echo "$as_me:4837: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_have_utmp_ut_xtime=define else @@ -4784,7 +4848,7 @@ fi rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:4787: result: $cf_cv_have_utmp_ut_xtime" >&5 +echo "$as_me:4851: result: $cf_cv_have_utmp_ut_xtime" >&5 echo "${ECHO_T}$cf_cv_have_utmp_ut_xtime" >&6 if test $cf_cv_have_utmp_ut_xtime != no ; then cat >>confdefs.h <<\EOF @@ -4801,14 +4865,14 @@ fi fi if test $cf_cv_have_utmp != no ; then -echo "$as_me:4804: checking if utmp.ut_session is declared" >&5 -echo $ECHO_N "checking if utmp.ut_session is declared... $ECHO_C" >&6 +echo "$as_me:4868: checking if ${cf_cv_have_utmp}.ut_session is declared" >&5 +echo $ECHO_N "checking if ${cf_cv_have_utmp}.ut_session is declared... $ECHO_C" >&6 if test "${cf_cv_have_utmp_ut_session+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 4811 "configure" +#line 4875 "configure" #include "confdefs.h" #include <sys/types.h> @@ -4822,16 +4886,16 @@ struct $cf_cv_have_utmp x; long y = x.ut_session } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:4825: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:4889: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:4828: \$? = $ac_status" >&5 + echo "$as_me:4892: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:4831: \"$ac_try\"") >&5 + { (eval echo "$as_me:4895: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4834: \$? = $ac_status" >&5 + echo "$as_me:4898: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_have_utmp_ut_session=yes else @@ -4842,7 +4906,7 @@ fi rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:4845: result: $cf_cv_have_utmp_ut_session" >&5 +echo "$as_me:4909: result: $cf_cv_have_utmp_ut_session" >&5 echo "${ECHO_T}$cf_cv_have_utmp_ut_session" >&6 if test $cf_cv_have_utmp_ut_session != no ; then cat >>confdefs.h <<\EOF @@ -4852,7 +4916,7 @@ EOF fi fi -echo "$as_me:4855: checking if $cf_cv_have_utmp is SYSV flavor" >&5 +echo "$as_me:4919: checking if $cf_cv_have_utmp is SYSV flavor" >&5 echo $ECHO_N "checking if $cf_cv_have_utmp is SYSV flavor... $ECHO_C" >&6 if test "${cf_cv_sysv_utmp+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -4860,7 +4924,7 @@ else test "$cf_cv_have_utmp" = "utmp" && cf_prefix="ut" || cf_prefix="utx" cat >conftest.$ac_ext <<_ACEOF -#line 4863 "configure" +#line 4927 "configure" #include "confdefs.h" #include <sys/types.h> @@ -4879,16 +4943,16 @@ struct $cf_cv_have_utmp x; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:4882: \"$ac_link\"") >&5 +if { (eval echo "$as_me:4946: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:4885: \$? = $ac_status" >&5 + echo "$as_me:4949: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:4888: \"$ac_try\"") >&5 + { (eval echo "$as_me:4952: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4891: \$? = $ac_status" >&5 + echo "$as_me:4955: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_sysv_utmp=yes else @@ -4899,7 +4963,7 @@ fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:4902: result: $cf_cv_sysv_utmp" >&5 +echo "$as_me:4966: result: $cf_cv_sysv_utmp" >&5 echo "${ECHO_T}$cf_cv_sysv_utmp" >&6 test $cf_cv_sysv_utmp = yes && cat >>confdefs.h <<\EOF #define USE_SYSV_UTMP 1 @@ -4910,23 +4974,23 @@ fi for ac_header in lastlog.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -echo "$as_me:4913: checking for $ac_header" >&5 +echo "$as_me:4977: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 4919 "configure" +#line 4983 "configure" #include "confdefs.h" #include <$ac_header> _ACEOF -if { (eval echo "$as_me:4923: \"$ac_cpp conftest.$ac_ext\"") >&5 +if { (eval echo "$as_me:4987: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? egrep -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:4929: \$? = $ac_status" >&5 + echo "$as_me:4993: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag @@ -4945,7 +5009,7 @@ else fi rm -f conftest.err conftest.$ac_ext fi -echo "$as_me:4948: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "$as_me:5012: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<EOF @@ -4955,7 +5019,7 @@ EOF fi done -echo "$as_me:4958: checking for struct lastlog" >&5 +echo "$as_me:5022: checking for struct lastlog" >&5 echo $ECHO_N "checking for struct lastlog... $ECHO_C" >&6 if test "${cf_cv_struct_lastlog+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -4966,7 +5030,7 @@ if test "$cross_compiling" = yes; then cf_cv_struct_lastlog=unknown else cat >conftest.$ac_ext <<_ACEOF -#line 4969 "configure" +#line 5033 "configure" #include "confdefs.h" #include <sys/types.h> @@ -4980,15 +5044,15 @@ int main() } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:4983: \"$ac_link\"") >&5 +if { (eval echo "$as_me:5047: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:4986: \$? = $ac_status" >&5 + echo "$as_me:5050: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:4988: \"$ac_try\"") >&5 + { (eval echo "$as_me:5052: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4991: \$? = $ac_status" >&5 + echo "$as_me:5055: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_struct_lastlog=yes @@ -5002,7 +5066,7 @@ fi rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi -echo "$as_me:5005: result: $cf_cv_struct_lastlog" >&5 +echo "$as_me:5069: result: $cf_cv_struct_lastlog" >&5 echo "${ECHO_T}$cf_cv_struct_lastlog" >&6 test $cf_cv_struct_lastlog != no && cat >>confdefs.h <<\EOF @@ -5014,23 +5078,23 @@ sys/param.h \ do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -echo "$as_me:5017: checking for $ac_header" >&5 +echo "$as_me:5081: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 5023 "configure" +#line 5087 "configure" #include "confdefs.h" #include <$ac_header> _ACEOF -if { (eval echo "$as_me:5027: \"$ac_cpp conftest.$ac_ext\"") >&5 +if { (eval echo "$as_me:5091: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? egrep -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:5033: \$? = $ac_status" >&5 + echo "$as_me:5097: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag @@ -5049,7 +5113,7 @@ else fi rm -f conftest.err conftest.$ac_ext fi -echo "$as_me:5052: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "$as_me:5116: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<EOF @@ -5059,14 +5123,14 @@ EOF fi done -echo "$as_me:5062: checking if POSIX saved-ids are supported" >&5 +echo "$as_me:5126: checking if POSIX saved-ids are supported" >&5 echo $ECHO_N "checking if POSIX saved-ids are supported... $ECHO_C" >&6 if test "${cf_cv_posix_saved_ids+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 5069 "configure" +#line 5133 "configure" #include "confdefs.h" #include <unistd.h> @@ -5094,16 +5158,16 @@ make an error } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:5097: \"$ac_link\"") >&5 +if { (eval echo "$as_me:5161: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:5100: \$? = $ac_status" >&5 + echo "$as_me:5164: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:5103: \"$ac_try\"") >&5 + { (eval echo "$as_me:5167: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:5106: \$? = $ac_status" >&5 + echo "$as_me:5170: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_posix_saved_ids=yes @@ -5115,7 +5179,7 @@ if test "$cross_compiling" = yes; then cf_cv_posix_saved_ids=unknown else cat >conftest.$ac_ext <<_ACEOF -#line 5118 "configure" +#line 5182 "configure" #include "confdefs.h" #ifdef HAVE_STDLIB_H @@ -5126,19 +5190,19 @@ int main() { void *p = (void *) seteuid; long code = sysconf(_SC_SAVED_IDS); - exit ((code > 0) ? 0 : 1); + ${cf_cv_main_return:-return} ((code > 0) ? 0 : 1); } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:5133: \"$ac_link\"") >&5 +if { (eval echo "$as_me:5197: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:5136: \$? = $ac_status" >&5 + echo "$as_me:5200: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:5138: \"$ac_try\"") >&5 + { (eval echo "$as_me:5202: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:5141: \$? = $ac_status" >&5 + echo "$as_me:5205: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_posix_saved_ids=yes else @@ -5154,7 +5218,7 @@ fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:5157: result: $cf_cv_posix_saved_ids" >&5 +echo "$as_me:5221: result: $cf_cv_posix_saved_ids" >&5 echo "${ECHO_T}$cf_cv_posix_saved_ids" >&6 test "$cf_cv_posix_saved_ids" = yes && cat >>confdefs.h <<\EOF @@ -5169,7 +5233,7 @@ cf_TERMVAR=vt100 test -n "$TERMCAP" && cf_TERMVAR="$TERM" test -z "$cf_TERMVAR" && cf_TERMVAR=vt100 -echo "$as_me:5172: checking if we want full tgetent function" >&5 +echo "$as_me:5236: checking if we want full tgetent function" >&5 echo $ECHO_N "checking if we want full tgetent function... $ECHO_C" >&6 # Check whether --enable-full-tgetent or --disable-full-tgetent was given. @@ -5186,7 +5250,7 @@ else cf_full_tgetent=yes fi; -echo "$as_me:5189: result: $cf_full_tgetent" >&5 +echo "$as_me:5253: result: $cf_full_tgetent" >&5 echo "${ECHO_T}$cf_full_tgetent" >&6 if test "$cf_full_tgetent" = yes ; then @@ -5195,7 +5259,7 @@ else cf_test_message="tgetent" fi -echo "$as_me:5198: checking for $cf_test_message function" >&5 +echo "$as_me:5262: checking for $cf_test_message function" >&5 echo $ECHO_N "checking for $cf_test_message function... $ECHO_C" >&6 if test "${cf_cv_lib_tgetent+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -5217,7 +5281,7 @@ for cf_termlib in '' $cf_TERMLIB ; do echo "cross-compiling, cannot verify if a termcap/tgetent is present in $cf_termlib" 1>&5 else cat >conftest.$ac_ext <<_ACEOF -#line 5220 "configure" +#line 5284 "configure" #include "confdefs.h" /* terminfo implementations ignore the buffer argument, making it useless for @@ -5229,18 +5293,18 @@ int main() char buffer[1024]; buffer[0] = 0; tgetent(buffer, "$cf_TERMVAR"); - exit($cf_TERMTST); } + ${cf_cv_main_return:-return} ($cf_TERMTST); } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:5235: \"$ac_link\"") >&5 +if { (eval echo "$as_me:5299: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:5238: \$? = $ac_status" >&5 + echo "$as_me:5302: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:5240: \"$ac_try\"") >&5 + { (eval echo "$as_me:5304: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:5243: \$? = $ac_status" >&5 + echo "$as_me:5307: \$? = $ac_status" >&5 (exit $ac_status); }; }; then echo "yes, there is a termcap/tgetent in $cf_termlib" 1>&5 if test -n "$cf_termlib" ; then @@ -5261,7 +5325,7 @@ done LIBS="$cf_save_LIBS" fi -echo "$as_me:5264: result: $cf_cv_lib_tgetent" >&5 +echo "$as_me:5328: result: $cf_cv_lib_tgetent" >&5 echo "${ECHO_T}$cf_cv_lib_tgetent" >&6 # If we found a working tgetent(), set LIBS and check for termcap.h. @@ -5275,7 +5339,7 @@ if test "$cf_cv_lib_tgetent" != no ; then EOF cat >conftest.$ac_ext <<_ACEOF -#line 5278 "configure" +#line 5342 "configure" #include "confdefs.h" #include <termcap.h> @@ -5291,16 +5355,16 @@ make an error } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:5294: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:5358: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:5297: \$? = $ac_status" >&5 + echo "$as_me:5361: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:5300: \"$ac_try\"") >&5 + { (eval echo "$as_me:5364: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:5303: \$? = $ac_status" >&5 + echo "$as_me:5367: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cat >>confdefs.h <<\EOF #define HAVE_TERMCAP_H 1 @@ -5317,7 +5381,7 @@ else # a crippled one. A crippled tgetent() is still useful to # validate values for the TERM environment variable given to # child processes. - echo "$as_me:5320: checking for partial tgetent function" >&5 + echo "$as_me:5384: checking for partial tgetent function" >&5 echo $ECHO_N "checking for partial tgetent function... $ECHO_C" >&6 if test "${cf_cv_lib_part_tgetent+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -5327,7 +5391,7 @@ else for cf_termlib in $cf_TERMLIB ; do LIBS="$cf_save_LIBS -l$cf_termlib" cat >conftest.$ac_ext <<_ACEOF -#line 5330 "configure" +#line 5394 "configure" #include "confdefs.h" int @@ -5339,16 +5403,16 @@ tgetent(0, "$cf_TERMVAR") } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:5342: \"$ac_link\"") >&5 +if { (eval echo "$as_me:5406: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:5345: \$? = $ac_status" >&5 + echo "$as_me:5409: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:5348: \"$ac_try\"") >&5 + { (eval echo "$as_me:5412: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:5351: \$? = $ac_status" >&5 + echo "$as_me:5415: \$? = $ac_status" >&5 (exit $ac_status); }; }; then echo "there is a terminfo/tgetent in $cf_termlib" 1>&5 cf_cv_lib_part_tgetent="-l$cf_termlib" @@ -5362,7 +5426,7 @@ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS="$cf_save_LIBS" fi -echo "$as_me:5365: result: $cf_cv_lib_part_tgetent" >&5 +echo "$as_me:5429: result: $cf_cv_lib_part_tgetent" >&5 echo "${ECHO_T}$cf_cv_lib_part_tgetent" >&6 if test "$cf_cv_lib_part_tgetent" != no ; then @@ -5371,23 +5435,23 @@ echo "${ECHO_T}$cf_cv_lib_part_tgetent" >&6 for ac_header in termcap.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -echo "$as_me:5374: checking for $ac_header" >&5 +echo "$as_me:5438: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 5380 "configure" +#line 5444 "configure" #include "confdefs.h" #include <$ac_header> _ACEOF -if { (eval echo "$as_me:5384: \"$ac_cpp conftest.$ac_ext\"") >&5 +if { (eval echo "$as_me:5448: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? egrep -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:5390: \$? = $ac_status" >&5 + echo "$as_me:5454: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag @@ -5406,7 +5470,7 @@ else fi rm -f conftest.err conftest.$ac_ext fi -echo "$as_me:5409: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "$as_me:5473: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<EOF @@ -5425,7 +5489,7 @@ EOF fi fi -echo "$as_me:5428: checking for directory to install resource files" >&5 +echo "$as_me:5492: checking for directory to install resource files" >&5 echo $ECHO_N "checking for directory to install resource files... $ECHO_C" >&6 # Check whether --with-app-defaults or --without-app-defaults was given. @@ -5434,7 +5498,14 @@ if test "${with_app_defaults+set}" = set; then else withval="${appsdir-'\$(exec_prefix)/lib/X11/app-defaults'}" -fi; +fi; if test -n "'\$(exec_prefix)/lib/X11/app-defaults'" ; then + +if test "x$prefix" != xNONE; then + cf_path_syntax="$prefix" +else + cf_path_syntax="$ac_default_prefix" +fi + case ".$withval" in #(vi .\$\(*\)*|.\'*\'*) #(vi ;; @@ -5446,31 +5517,143 @@ case ".$withval" in #(vi eval withval="$withval" case ".$withval" in #(vi .NONE/*) - withval=`echo $withval | sed -e s%NONE%$ac_default_prefix%` + withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%` ;; esac ;; #(vi .no|.NONE/*) - withval=`echo $withval | sed -e s%NONE%$ac_default_prefix%` + withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%` ;; *) - { { echo "$as_me:5457: error: expected a pathname, not \"$withval\"" >&5 + { { echo "$as_me:5528: error: expected a pathname, not \"$withval\"" >&5 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;} { (exit 1); exit 1; }; } ;; esac +fi appsdir="$withval" -echo "$as_me:5465: result: $appsdir" >&5 +echo "$as_me:5537: result: $appsdir" >&5 echo "${ECHO_T}$appsdir" >&6 no_appsdir= test "$appsdir" = no && no_appsdir="#" +echo "$as_me:5543: checking for directory to install icons" >&5 +echo $ECHO_N "checking for directory to install icons... $ECHO_C" >&6 + +# Check whether --with-icondir or --without-icondir was given. +if test "${with_icondir+set}" = set; then + withval="$with_icondir" + +else + withval="${icondir-'\$(exec_prefix)/share/pixmaps'}" +fi; if test -n "'\$(exec_prefix)/share/pixmaps'" ; then + +if test "x$prefix" != xNONE; then + cf_path_syntax="$prefix" +else + cf_path_syntax="$ac_default_prefix" +fi + +case ".$withval" in #(vi +.\$\(*\)*|.\'*\'*) #(vi + ;; +..|./*|.\\*) #(vi + ;; +.[a-zA-Z]:[\\/]*) #(vi OS/2 EMX + ;; +.\${*prefix}*) #(vi + eval withval="$withval" + case ".$withval" in #(vi + .NONE/*) + withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%` + ;; + esac + ;; #(vi +.no|.NONE/*) + withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%` + ;; +*) + { { echo "$as_me:5579: error: expected a pathname, not \"$withval\"" >&5 +echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;} + { (exit 1); exit 1; }; } + ;; +esac + +fi +icondir="$withval" + +echo "$as_me:5588: result: $icondir" >&5 +echo "${ECHO_T}$icondir" >&6 + +no_icondir= +test "$icondir" = no && no_icondir="#" + +# Comment-out the install-desktop rule if the desktop-utils are not found. +echo "$as_me:5595: checking if you want to install desktop files" >&5 +echo $ECHO_N "checking if you want to install desktop files... $ECHO_C" >&6 + +# Check whether --enable-desktop or --disable-desktop was given. +if test "${enable_desktop+set}" = set; then + enableval="$enable_desktop" + test "$enableval" != no && enableval=yes + if test "$enableval" != "yes" ; then + enable_desktop=$enableval + else + enable_desktop=$enableval + fi +else + enableval=yes + enable_desktop=$enableval + +fi; +echo "$as_me:5612: result: $enable_desktop" >&5 +echo "${ECHO_T}$enable_desktop" >&6 + +desktop_utils= +if test "$enable_desktop" = yes ; then +# Extract the first word of "desktop-file-install", so it can be a program name with args. +set dummy desktop-file-install; ac_word=$2 +echo "$as_me:5619: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_desktop_utils+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$desktop_utils"; then + ac_cv_prog_desktop_utils="$desktop_utils" # Let the user override the test. +else + ac_save_IFS=$IFS; IFS=$ac_path_separator +ac_dummy="$PATH" +for ac_dir in $ac_dummy; do + IFS=$ac_save_IFS + test -z "$ac_dir" && ac_dir=. + $as_executable_p "$ac_dir/$ac_word" || continue +ac_cv_prog_desktop_utils="yes" +echo "$as_me:5634: found $ac_dir/$ac_word" >&5 +break +done + + test -z "$ac_cv_prog_desktop_utils" && ac_cv_prog_desktop_utils="no" +fi +fi +desktop_utils=$ac_cv_prog_desktop_utils +if test -n "$desktop_utils"; then + echo "$as_me:5643: result: $desktop_utils" >&5 +echo "${ECHO_T}$desktop_utils" >&6 +else + echo "$as_me:5646: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +fi + +test "$desktop_utils" = yes && desktop_utils= || desktop_utils="#" + # inherit SINSTALL_OPTS from environment to allow packager to customize it. -echo "$as_me:5473: checking for install-permissions reference" >&5 +echo "$as_me:5656: checking for install-permissions reference" >&5 echo $ECHO_N "checking for install-permissions reference... $ECHO_C" >&6 # Check whether --with-reference or --without-reference was given. @@ -5480,7 +5663,7 @@ if test "${with_reference+set}" = set; then else with_reference=xterm fi; -echo "$as_me:5483: result: $with_reference" >&5 +echo "$as_me:5666: result: $with_reference" >&5 echo "${ECHO_T}$with_reference" >&6 with_full_paths=yes @@ -5490,7 +5673,7 @@ for ac_prog in $XTERM_PATH $with_reference do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:5493: checking for $ac_word" >&5 +echo "$as_me:5676: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_XTERM_PATH+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -5507,7 +5690,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if $as_executable_p "$ac_dir/$ac_word"; then ac_cv_path_XTERM_PATH="$ac_dir/$ac_word" - echo "$as_me:5510: found $ac_dir/$ac_word" >&5 + echo "$as_me:5693: found $ac_dir/$ac_word" >&5 break fi done @@ -5518,10 +5701,10 @@ fi XTERM_PATH=$ac_cv_path_XTERM_PATH if test -n "$XTERM_PATH"; then - echo "$as_me:5521: result: $XTERM_PATH" >&5 + echo "$as_me:5704: result: $XTERM_PATH" >&5 echo "${ECHO_T}$XTERM_PATH" >&6 else - echo "$as_me:5524: result: no" >&5 + echo "$as_me:5707: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -5546,6 +5729,12 @@ do if test -z "$cf_path_prog" ; then if test "$with_full_paths" = yes ; then +if test "x$prefix" != xNONE; then + cf_path_syntax="$prefix" +else + cf_path_syntax="$ac_default_prefix" +fi + case ".$cf_temp" in #(vi .\$\(*\)*|.\'*\'*) #(vi ;; @@ -5557,12 +5746,12 @@ case ".$cf_temp" in #(vi eval cf_temp="$cf_temp" case ".$cf_temp" in #(vi .NONE/*) - cf_temp=`echo $cf_temp | sed -e s%NONE%$ac_default_prefix%` + cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%` ;; esac ;; #(vi .no|.NONE/*) - cf_temp=`echo $cf_temp | sed -e s%NONE%$ac_default_prefix%` + cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%` ;; *) break @@ -5583,7 +5772,7 @@ IFS="$cf_save_ifs" if test -n "$cf_path_prog" ; then -echo "(line 5586) testing defining path for ${cf_path_prog} ..." 1>&5 +echo "${as_me-configure}:5775: testing defining path for ${cf_path_prog} ..." 1>&5 cat >>confdefs.h <<EOF #define XTERM_PATH_PATH "$cf_path_prog" @@ -5603,7 +5792,7 @@ XTERM_SYMLINK=NONE if test "$program_transform_name" != "'s,,,'" ; then cf_name=`echo "$program_transform_name" | sed -e 's,\\$\\$,$,g'` cf_name=`echo xterm |sed -e "$cf_name"` -echo "$as_me:5606: checking for symbolic link to create to $cf_name" >&5 +echo "$as_me:5795: checking for symbolic link to create to $cf_name" >&5 echo $ECHO_N "checking for symbolic link to create to $cf_name... $ECHO_C" >&6 # Check whether --with-xterm-symlink or --without-xterm-symlink was given. @@ -5613,15 +5802,16 @@ if test "${with_xterm_symlink+set}" = set; then else with_symlink=xterm fi; -echo "$as_me:5616: result: $with_symlink" >&5 +echo "$as_me:5805: result: $with_symlink" >&5 echo "${ECHO_T}$with_symlink" >&6 +test "$with_symlink" = yes && with_symlink=xterm test -n "$with_symlink" && \ test "$with_symlink" != no && \ test "$with_symlink" != $cf_name && \ XTERM_SYMLINK="$with_symlink" fi -echo "$as_me:5624: checking if you want to disable setuid" >&5 +echo "$as_me:5814: checking if you want to disable setuid" >&5 echo $ECHO_N "checking if you want to disable setuid... $ECHO_C" >&6 # Check whether --enable-setuid or --disable-setuid was given. @@ -5638,10 +5828,30 @@ else disable_setuid=no fi; -echo "$as_me:5641: result: $disable_setuid" >&5 +echo "$as_me:5831: result: $disable_setuid" >&5 echo "${ECHO_T}$disable_setuid" >&6 -echo "$as_me:5644: checking if you want to run xterm setuid to a given user" >&5 +echo "$as_me:5834: checking if you want to disable setgid" >&5 +echo $ECHO_N "checking if you want to disable setgid... $ECHO_C" >&6 + +# Check whether --enable-setgid or --disable-setgid was given. +if test "${enable_setgid+set}" = set; then + enableval="$enable_setgid" + test "$enableval" != no && enableval=yes + if test "$enableval" != "yes" ; then + disable_setgid=yes + else + disable_setgid=no + fi +else + enableval=yes + disable_setgid=no + +fi; +echo "$as_me:5851: result: $disable_setgid" >&5 +echo "${ECHO_T}$disable_setgid" >&6 + +echo "$as_me:5854: checking if you want to run xterm setuid to a given user" >&5 echo $ECHO_N "checking if you want to run xterm setuid to a given user... $ECHO_C" >&6 # Check whether --with-setuid or --without-setuid was given. @@ -5651,7 +5861,7 @@ if test "${with_setuid+set}" = set; then else use_given_setuid=no fi; -echo "$as_me:5654: result: $use_given_setuid" >&5 +echo "$as_me:5864: result: $use_given_setuid" >&5 echo "${ECHO_T}$use_given_setuid" >&6 if test "$use_given_setuid" != no ; then @@ -5663,7 +5873,7 @@ if test "$use_given_setuid" != no ; then SINSTALL_OPTS="$SINSTALL_OPTS u+s -u $cf_cv_given_setuid" fi -echo "$as_me:5666: checking if you want to run xterm setgid to match utmp/utmpx file" >&5 +echo "$as_me:5876: checking if you want to run xterm setgid to match utmp/utmpx file" >&5 echo $ECHO_N "checking if you want to run xterm setgid to match utmp/utmpx file... $ECHO_C" >&6 # Check whether --with-utmp-setgid or --without-utmp-setgid was given. @@ -5673,14 +5883,14 @@ if test "${with_utmp_setgid+set}" = set; then else use_utmp_setgid=no fi; -echo "$as_me:5676: result: $use_utmp_setgid" >&5 +echo "$as_me:5886: result: $use_utmp_setgid" >&5 echo "${ECHO_T}$use_utmp_setgid" >&6 if test "$use_utmp_setgid" != no ; then if test "$use_utmp_setgid" = yes ; then if test $cf_cv_have_utmp != no ; then -echo "$as_me:5683: checking for utmp/utmpx group" >&5 +echo "$as_me:5893: checking for utmp/utmpx group" >&5 echo $ECHO_N "checking for utmp/utmpx group... $ECHO_C" >&6 if test "${cf_cv_utmp_group+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -5722,10 +5932,10 @@ do done fi -echo "$as_me:5725: result: $cf_cv_utmp_group" >&5 +echo "$as_me:5935: result: $cf_cv_utmp_group" >&5 echo "${ECHO_T}$cf_cv_utmp_group" >&6 else - { { echo "$as_me:5728: error: cannot find utmp group" >&5 + { { echo "$as_me:5938: error: cannot find utmp group" >&5 echo "$as_me: error: cannot find utmp group" >&2;} { (exit 1); exit 1; }; } fi @@ -5734,7 +5944,7 @@ fi cf_cv_utmp_group=$use_utmp_setgid fi if test "$cf_cv_posix_saved_ids" != yes ; then - { { echo "$as_me:5737: error: Your system does not support POSIX saved-ids" >&5 + { { echo "$as_me:5947: error: Your system does not support POSIX saved-ids" >&5 echo "$as_me: error: Your system does not support POSIX saved-ids" >&2;} { (exit 1); exit 1; }; } fi @@ -5745,7 +5955,7 @@ EOF SINSTALL_OPTS="$SINSTALL_OPTS g+s -g $cf_cv_utmp_group" fi -echo "$as_me:5748: checking if you want to link with utempter" >&5 +echo "$as_me:5958: checking if you want to link with utempter" >&5 echo $ECHO_N "checking if you want to link with utempter... $ECHO_C" >&6 # Check whether --with-utempter or --without-utempter was given. @@ -5755,12 +5965,12 @@ if test "${with_utempter+set}" = set; then else use_utempter=no fi; -echo "$as_me:5758: result: $use_utempter" >&5 +echo "$as_me:5968: result: $use_utempter" >&5 echo "${ECHO_T}$use_utempter" >&6 if test "$use_utempter" = yes ; then -echo "$as_me:5763: checking if we can link with utempter library" >&5 +echo "$as_me:5973: checking if we can link with utempter library" >&5 echo $ECHO_N "checking if we can link with utempter library... $ECHO_C" >&6 if test "${cf_cv_have_utempter+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -5769,7 +5979,7 @@ else cf_save_LIBS="$LIBS" LIBS="-lutempter $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line 5772 "configure" +#line 5982 "configure" #include "confdefs.h" #include <utempter.h> @@ -5786,16 +5996,16 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:5789: \"$ac_link\"") >&5 +if { (eval echo "$as_me:5999: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:5792: \$? = $ac_status" >&5 + echo "$as_me:6002: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:5795: \"$ac_try\"") >&5 + { (eval echo "$as_me:6005: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:5798: \$? = $ac_status" >&5 + echo "$as_me:6008: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_have_utempter=yes @@ -5809,7 +6019,7 @@ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS="$cf_save_LIBS" fi -echo "$as_me:5812: result: $cf_cv_have_utempter" >&5 +echo "$as_me:6022: result: $cf_cv_have_utempter" >&5 echo "${ECHO_T}$cf_cv_have_utempter" >&6 if test "$cf_cv_have_utempter" = yes ; then cat >>confdefs.h <<\EOF @@ -5819,19 +6029,33 @@ EOF LIBS="-lutempter $LIBS" fi - test "$cf_cv_have_utempter" = yes && disable_setuid=yes + test "$cf_cv_have_utempter" != yes && use_utempter=no +else + use_utempter=no +fi + +# Some configurations permit (or require) either setuid or setgid mode. +# Let the user decide. +if test "$use_utempter" = yes ; then + if test "${enable_setuid+set}" != set ; then + disable_setuid=yes + test -n "$verbose" && echo " No --disable-setuid option given, force to yes" 1>&6 + +echo "${as_me-configure}:6044: testing No --disable-setuid option given, force to yes ..." 1>&5 + + fi fi ### checks for external data -echo "$as_me:5827: checking if external errno is declared" >&5 +echo "$as_me:6051: checking if external errno is declared" >&5 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6 if test "${cf_cv_dcl_errno+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 5834 "configure" +#line 6058 "configure" #include "confdefs.h" #ifdef HAVE_STDLIB_H @@ -5849,16 +6073,16 @@ long x = (long) errno } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:5852: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:6076: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:5855: \$? = $ac_status" >&5 + echo "$as_me:6079: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:5858: \"$ac_try\"") >&5 + { (eval echo "$as_me:6082: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:5861: \$? = $ac_status" >&5 + echo "$as_me:6085: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_dcl_errno=yes else @@ -5869,7 +6093,7 @@ fi rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:5872: result: $cf_cv_dcl_errno" >&5 +echo "$as_me:6096: result: $cf_cv_dcl_errno" >&5 echo "${ECHO_T}$cf_cv_dcl_errno" >&6 if test "$cf_cv_dcl_errno" = no ; then @@ -5884,14 +6108,14 @@ fi # It's possible (for near-UNIX clones) that the data doesn't exist -echo "$as_me:5887: checking if external errno exists" >&5 +echo "$as_me:6111: checking if external errno exists" >&5 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6 if test "${cf_cv_have_errno+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 5894 "configure" +#line 6118 "configure" #include "confdefs.h" #undef errno @@ -5906,16 +6130,16 @@ errno = 2 } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:5909: \"$ac_link\"") >&5 +if { (eval echo "$as_me:6133: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:5912: \$? = $ac_status" >&5 + echo "$as_me:6136: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:5915: \"$ac_try\"") >&5 + { (eval echo "$as_me:6139: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:5918: \$? = $ac_status" >&5 + echo "$as_me:6142: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_have_errno=yes else @@ -5926,7 +6150,7 @@ fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:5929: result: $cf_cv_have_errno" >&5 +echo "$as_me:6153: result: $cf_cv_have_errno" >&5 echo "${ECHO_T}$cf_cv_have_errno" >&6 if test "$cf_cv_have_errno" = yes ; then @@ -5939,7 +6163,7 @@ EOF fi -echo "$as_me:5942: checking for explicit tty group name" >&5 +echo "$as_me:6166: checking for explicit tty group name" >&5 echo $ECHO_N "checking for explicit tty group name... $ECHO_C" >&6 # Check whether --with-tty-group or --without-tty-group was given. @@ -5951,11 +6175,11 @@ else fi; test -z "$cf_tty_group" && cf_tty_group=auto... test "$cf_tty_group" = yes && cf_tty_group=auto... -echo "$as_me:5954: result: $cf_tty_group" >&5 +echo "$as_me:6178: result: $cf_tty_group" >&5 echo "${ECHO_T}$cf_tty_group" >&6 if test "$cf_tty_group" = "auto..." ; then -echo "$as_me:5958: checking for tty group name" >&5 +echo "$as_me:6182: checking for tty group name" >&5 echo $ECHO_N "checking for tty group name... $ECHO_C" >&6 if test "${cf_cv_tty_group_name+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -6008,7 +6232,7 @@ esac fi fi -echo "$as_me:6011: result: $cf_cv_tty_group_name" >&5 +echo "$as_me:6235: result: $cf_cv_tty_group_name" >&5 echo "${ECHO_T}$cf_cv_tty_group_name" >&6 cf_tty_group="$cf_cv_tty_group_name" else @@ -6027,7 +6251,7 @@ EOF # does apply to the device. We cannot perform this test if we are in batch # mode, or if we are cross-compiling. -echo "$as_me:6030: checking if we may use the $cf_tty_group group" >&5 +echo "$as_me:6254: checking if we may use the $cf_tty_group group" >&5 echo $ECHO_N "checking if we may use the $cf_tty_group group... $ECHO_C" >&6 if test "${cf_cv_tty_group+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -6040,7 +6264,7 @@ if test "$cross_compiling" = yes; then cf_cv_tty_group=unknown else cat >conftest.$ac_ext <<_ACEOF -#line 6043 "configure" +#line 6267 "configure" #include "confdefs.h" #include <unistd.h> @@ -6059,22 +6283,22 @@ int main() && stat(name, &sb) == 0 && sb.st_gid != getgid() && sb.st_gid == ttygrp->gr_gid) { - exit(0); + ${cf_cv_main_return:-return} (0); } - exit(1); + ${cf_cv_main_return:-return} (1); } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:6069: \"$ac_link\"") >&5 +if { (eval echo "$as_me:6293: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:6072: \$? = $ac_status" >&5 + echo "$as_me:6296: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:6074: \"$ac_try\"") >&5 + { (eval echo "$as_me:6298: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:6077: \$? = $ac_status" >&5 + echo "$as_me:6301: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_tty_group=yes else @@ -6092,11 +6316,11 @@ else fi fi -echo "$as_me:6095: result: $cf_cv_tty_group" >&5 +echo "$as_me:6319: result: $cf_cv_tty_group" >&5 echo "${ECHO_T}$cf_cv_tty_group" >&6 if test $cf_cv_tty_group = no ; then - { echo "$as_me:6099: WARNING: Cannot use $cf_tty_group group" >&5 + { echo "$as_me:6323: WARNING: Cannot use $cf_tty_group group" >&5 echo "$as_me: WARNING: Cannot use $cf_tty_group group" >&2;} else cat >>confdefs.h <<\EOF @@ -6107,13 +6331,13 @@ fi ### checks for system services and user specified options -echo "$as_me:6110: checking for sys/wait.h that is POSIX.1 compatible" >&5 +echo "$as_me:6334: checking for sys/wait.h that is POSIX.1 compatible" >&5 echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6 if test "${ac_cv_header_sys_wait_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 6116 "configure" +#line 6340 "configure" #include "confdefs.h" #include <sys/types.h> #include <sys/wait.h> @@ -6135,16 +6359,16 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:6138: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:6362: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:6141: \$? = $ac_status" >&5 + echo "$as_me:6365: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:6144: \"$ac_try\"") >&5 + { (eval echo "$as_me:6368: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:6147: \$? = $ac_status" >&5 + echo "$as_me:6371: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_header_sys_wait_h=yes else @@ -6154,7 +6378,7 @@ ac_cv_header_sys_wait_h=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:6157: result: $ac_cv_header_sys_wait_h" >&5 +echo "$as_me:6381: result: $ac_cv_header_sys_wait_h" >&5 echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6 if test $ac_cv_header_sys_wait_h = yes; then @@ -6164,14 +6388,14 @@ EOF fi -echo "$as_me:6167: checking for POSIX wait functions" >&5 +echo "$as_me:6391: checking for POSIX wait functions" >&5 echo $ECHO_N "checking for POSIX wait functions... $ECHO_C" >&6 if test "${cf_cv_posix_wait+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 6174 "configure" +#line 6398 "configure" #include "confdefs.h" #include <stdlib.h> @@ -6194,16 +6418,16 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:6197: \"$ac_link\"") >&5 +if { (eval echo "$as_me:6421: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:6200: \$? = $ac_status" >&5 + echo "$as_me:6424: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:6203: \"$ac_try\"") >&5 + { (eval echo "$as_me:6427: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:6206: \$? = $ac_status" >&5 + echo "$as_me:6430: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_posix_wait=yes else @@ -6214,20 +6438,20 @@ fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:6217: result: $cf_cv_posix_wait" >&5 +echo "$as_me:6441: result: $cf_cv_posix_wait" >&5 echo "${ECHO_T}$cf_cv_posix_wait" >&6 test "$cf_cv_posix_wait" = yes && cat >>confdefs.h <<\EOF #define USE_POSIX_WAIT 1 EOF -echo "$as_me:6223: checking if external sys_nerr is declared" >&5 +echo "$as_me:6447: checking if external sys_nerr is declared" >&5 echo $ECHO_N "checking if external sys_nerr is declared... $ECHO_C" >&6 if test "${cf_cv_dcl_sys_nerr+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 6230 "configure" +#line 6454 "configure" #include "confdefs.h" #ifdef HAVE_STDLIB_H @@ -6245,16 +6469,16 @@ long x = (long) sys_nerr } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:6248: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:6472: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:6251: \$? = $ac_status" >&5 + echo "$as_me:6475: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:6254: \"$ac_try\"") >&5 + { (eval echo "$as_me:6478: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:6257: \$? = $ac_status" >&5 + echo "$as_me:6481: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_dcl_sys_nerr=yes else @@ -6265,7 +6489,7 @@ fi rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:6268: result: $cf_cv_dcl_sys_nerr" >&5 +echo "$as_me:6492: result: $cf_cv_dcl_sys_nerr" >&5 echo "${ECHO_T}$cf_cv_dcl_sys_nerr" >&6 if test "$cf_cv_dcl_sys_nerr" = no ; then @@ -6280,14 +6504,14 @@ fi # It's possible (for near-UNIX clones) that the data doesn't exist -echo "$as_me:6283: checking if external sys_nerr exists" >&5 +echo "$as_me:6507: checking if external sys_nerr exists" >&5 echo $ECHO_N "checking if external sys_nerr exists... $ECHO_C" >&6 if test "${cf_cv_have_sys_nerr+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 6290 "configure" +#line 6514 "configure" #include "confdefs.h" #undef sys_nerr @@ -6302,16 +6526,16 @@ sys_nerr = 2 } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:6305: \"$ac_link\"") >&5 +if { (eval echo "$as_me:6529: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:6308: \$? = $ac_status" >&5 + echo "$as_me:6532: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:6311: \"$ac_try\"") >&5 + { (eval echo "$as_me:6535: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:6314: \$? = $ac_status" >&5 + echo "$as_me:6538: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_have_sys_nerr=yes else @@ -6322,7 +6546,7 @@ fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:6325: result: $cf_cv_have_sys_nerr" >&5 +echo "$as_me:6549: result: $cf_cv_have_sys_nerr" >&5 echo "${ECHO_T}$cf_cv_have_sys_nerr" >&6 if test "$cf_cv_have_sys_nerr" = yes ; then @@ -6335,14 +6559,14 @@ EOF fi -echo "$as_me:6338: checking if external sys_errlist is declared" >&5 +echo "$as_me:6562: checking if external sys_errlist is declared" >&5 echo $ECHO_N "checking if external sys_errlist is declared... $ECHO_C" >&6 if test "${cf_cv_dcl_sys_errlist+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 6345 "configure" +#line 6569 "configure" #include "confdefs.h" #ifdef HAVE_STDLIB_H @@ -6360,16 +6584,16 @@ long x = (long) sys_errlist } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:6363: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:6587: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:6366: \$? = $ac_status" >&5 + echo "$as_me:6590: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:6369: \"$ac_try\"") >&5 + { (eval echo "$as_me:6593: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:6372: \$? = $ac_status" >&5 + echo "$as_me:6596: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_dcl_sys_errlist=yes else @@ -6380,7 +6604,7 @@ fi rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:6383: result: $cf_cv_dcl_sys_errlist" >&5 +echo "$as_me:6607: result: $cf_cv_dcl_sys_errlist" >&5 echo "${ECHO_T}$cf_cv_dcl_sys_errlist" >&6 if test "$cf_cv_dcl_sys_errlist" = no ; then @@ -6395,14 +6619,14 @@ fi # It's possible (for near-UNIX clones) that the data doesn't exist -echo "$as_me:6398: checking if external sys_errlist exists" >&5 +echo "$as_me:6622: checking if external sys_errlist exists" >&5 echo $ECHO_N "checking if external sys_errlist exists... $ECHO_C" >&6 if test "${cf_cv_have_sys_errlist+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 6405 "configure" +#line 6629 "configure" #include "confdefs.h" #undef sys_errlist @@ -6417,16 +6641,16 @@ sys_errlist = 2 } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:6420: \"$ac_link\"") >&5 +if { (eval echo "$as_me:6644: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:6423: \$? = $ac_status" >&5 + echo "$as_me:6647: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:6426: \"$ac_try\"") >&5 + { (eval echo "$as_me:6650: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:6429: \$? = $ac_status" >&5 + echo "$as_me:6653: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_have_sys_errlist=yes else @@ -6437,7 +6661,7 @@ fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:6440: result: $cf_cv_have_sys_errlist" >&5 +echo "$as_me:6664: result: $cf_cv_have_sys_errlist" >&5 echo "${ECHO_T}$cf_cv_have_sys_errlist" >&6 if test "$cf_cv_have_sys_errlist" = yes ; then @@ -6457,23 +6681,23 @@ X11/Intrinsic.h \ do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -echo "$as_me:6460: checking for $ac_header" >&5 +echo "$as_me:6684: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 6466 "configure" +#line 6690 "configure" #include "confdefs.h" #include <$ac_header> _ACEOF -if { (eval echo "$as_me:6470: \"$ac_cpp conftest.$ac_ext\"") >&5 +if { (eval echo "$as_me:6694: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? egrep -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:6476: \$? = $ac_status" >&5 + echo "$as_me:6700: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag @@ -6492,7 +6716,7 @@ else fi rm -f conftest.err conftest.$ac_ext fi -echo "$as_me:6495: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "$as_me:6719: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<EOF @@ -6502,14 +6726,14 @@ EOF fi done -echo "$as_me:6505: checking if we should define SYSV" >&5 +echo "$as_me:6729: checking if we should define SYSV" >&5 echo $ECHO_N "checking if we should define SYSV... $ECHO_C" >&6 if test "${cf_cv_sysv+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 6512 "configure" +#line 6736 "configure" #include "confdefs.h" #undef SYSV @@ -6553,16 +6777,16 @@ sys_errlist[0] = ""; /* Cygwin mis-declares this */ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:6556: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:6780: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:6559: \$? = $ac_status" >&5 + echo "$as_me:6783: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:6562: \"$ac_try\"") >&5 + { (eval echo "$as_me:6786: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:6565: \$? = $ac_status" >&5 + echo "$as_me:6789: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_sysv=yes else @@ -6573,13 +6797,13 @@ fi rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:6576: result: $cf_cv_sysv" >&5 +echo "$as_me:6800: result: $cf_cv_sysv" >&5 echo "${ECHO_T}$cf_cv_sysv" >&6 test "$cf_cv_sysv" = yes && cat >>confdefs.h <<\EOF #define SYSV 1 EOF -echo "$as_me:6582: checking for elf_begin in -lelf" >&5 +echo "$as_me:6806: checking for elf_begin in -lelf" >&5 echo $ECHO_N "checking for elf_begin in -lelf... $ECHO_C" >&6 if test "${ac_cv_lib_elf_elf_begin+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -6587,7 +6811,7 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-lelf $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line 6590 "configure" +#line 6814 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -6606,16 +6830,16 @@ elf_begin (); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:6609: \"$ac_link\"") >&5 +if { (eval echo "$as_me:6833: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:6612: \$? = $ac_status" >&5 + echo "$as_me:6836: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:6615: \"$ac_try\"") >&5 + { (eval echo "$as_me:6839: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:6618: \$? = $ac_status" >&5 + echo "$as_me:6842: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_elf_elf_begin=yes else @@ -6626,18 +6850,18 @@ fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:6629: result: $ac_cv_lib_elf_elf_begin" >&5 +echo "$as_me:6853: result: $ac_cv_lib_elf_elf_begin" >&5 echo "${ECHO_T}$ac_cv_lib_elf_elf_begin" >&6 if test $ac_cv_lib_elf_elf_begin = yes; then -echo "$as_me:6633: checking if this is an SVR4 system" >&5 +echo "$as_me:6857: checking if this is an SVR4 system" >&5 echo $ECHO_N "checking if this is an SVR4 system... $ECHO_C" >&6 if test "${cf_cv_svr4+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 6640 "configure" +#line 6864 "configure" #include "confdefs.h" #include <elf.h> @@ -6663,16 +6887,16 @@ static struct termio d_tio; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:6666: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:6890: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:6669: \$? = $ac_status" >&5 + echo "$as_me:6893: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:6672: \"$ac_try\"") >&5 + { (eval echo "$as_me:6896: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:6675: \$? = $ac_status" >&5 + echo "$as_me:6899: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_svr4=yes else @@ -6683,7 +6907,7 @@ fi rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:6686: result: $cf_cv_svr4" >&5 +echo "$as_me:6910: result: $cf_cv_svr4" >&5 echo "${ECHO_T}$cf_cv_svr4" >&6 fi @@ -6692,7 +6916,7 @@ test "$cf_cv_svr4" = yes && cat >>confdefs.h <<\EOF #define SVR4 1 EOF -echo "$as_me:6695: checking for X" >&5 +echo "$as_me:6919: checking for X" >&5 echo $ECHO_N "checking for X... $ECHO_C" >&6 # Check whether --with-x or --without-x was given. @@ -6789,17 +7013,17 @@ if test "$ac_x_includes" = no; then # Guess where to find include files, by looking for Intrinsic.h. # First, try using that file with no special directory specified. cat >conftest.$ac_ext <<_ACEOF -#line 6792 "configure" +#line 7016 "configure" #include "confdefs.h" #include <X11/Intrinsic.h> _ACEOF -if { (eval echo "$as_me:6796: \"$ac_cpp conftest.$ac_ext\"") >&5 +if { (eval echo "$as_me:7020: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? egrep -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:6802: \$? = $ac_status" >&5 + echo "$as_me:7026: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag @@ -6832,7 +7056,7 @@ if test "$ac_x_libraries" = no; then ac_save_LIBS=$LIBS LIBS="-lXt $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line 6835 "configure" +#line 7059 "configure" #include "confdefs.h" #include <X11/Intrinsic.h> int @@ -6844,16 +7068,16 @@ XtMalloc (0) } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:6847: \"$ac_link\"") >&5 +if { (eval echo "$as_me:7071: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:6850: \$? = $ac_status" >&5 + echo "$as_me:7074: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:6853: \"$ac_try\"") >&5 + { (eval echo "$as_me:7077: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:6856: \$? = $ac_status" >&5 + echo "$as_me:7080: \$? = $ac_status" >&5 (exit $ac_status); }; }; then LIBS=$ac_save_LIBS # We can link X programs with no special library path. @@ -6891,7 +7115,7 @@ fi fi # $with_x != no if test "$have_x" != yes; then - echo "$as_me:6894: result: $have_x" >&5 + echo "$as_me:7118: result: $have_x" >&5 echo "${ECHO_T}$have_x" >&6 no_x=yes else @@ -6901,7 +7125,7 @@ else # Update the cache value to reflect the command line values. ac_cv_have_x="have_x=yes \ ac_x_includes=$x_includes ac_x_libraries=$x_libraries" - echo "$as_me:6904: result: libraries $x_libraries, headers $x_includes" >&5 + echo "$as_me:7128: result: libraries $x_libraries, headers $x_includes" >&5 echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6 fi @@ -6925,11 +7149,11 @@ else # others require no space. Words are not sufficient . . . . case `(uname -sr) 2>/dev/null` in "SunOS 5"*) - echo "$as_me:6928: checking whether -R must be followed by a space" >&5 + echo "$as_me:7152: checking whether -R must be followed by a space" >&5 echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6 ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries" cat >conftest.$ac_ext <<_ACEOF -#line 6932 "configure" +#line 7156 "configure" #include "confdefs.h" int @@ -6941,16 +7165,16 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:6944: \"$ac_link\"") >&5 +if { (eval echo "$as_me:7168: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:6947: \$? = $ac_status" >&5 + echo "$as_me:7171: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:6950: \"$ac_try\"") >&5 + { (eval echo "$as_me:7174: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:6953: \$? = $ac_status" >&5 + echo "$as_me:7177: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_R_nospace=yes else @@ -6960,13 +7184,13 @@ ac_R_nospace=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext if test $ac_R_nospace = yes; then - echo "$as_me:6963: result: no" >&5 + echo "$as_me:7187: result: no" >&5 echo "${ECHO_T}no" >&6 X_LIBS="$X_LIBS -R$x_libraries" else LIBS="$ac_xsave_LIBS -R $x_libraries" cat >conftest.$ac_ext <<_ACEOF -#line 6969 "configure" +#line 7193 "configure" #include "confdefs.h" int @@ -6978,16 +7202,16 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:6981: \"$ac_link\"") >&5 +if { (eval echo "$as_me:7205: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:6984: \$? = $ac_status" >&5 + echo "$as_me:7208: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:6987: \"$ac_try\"") >&5 + { (eval echo "$as_me:7211: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:6990: \$? = $ac_status" >&5 + echo "$as_me:7214: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_R_space=yes else @@ -6997,11 +7221,11 @@ ac_R_space=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext if test $ac_R_space = yes; then - echo "$as_me:7000: result: yes" >&5 + echo "$as_me:7224: result: yes" >&5 echo "${ECHO_T}yes" >&6 X_LIBS="$X_LIBS -R $x_libraries" else - echo "$as_me:7004: result: neither works" >&5 + echo "$as_me:7228: result: neither works" >&5 echo "${ECHO_T}neither works" >&6 fi fi @@ -7021,7 +7245,7 @@ echo "${ECHO_T}neither works" >&6 # the Alpha needs dnet_stub (dnet does not exist). ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11" cat >conftest.$ac_ext <<_ACEOF -#line 7024 "configure" +#line 7248 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -7040,22 +7264,22 @@ XOpenDisplay (); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:7043: \"$ac_link\"") >&5 +if { (eval echo "$as_me:7267: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:7046: \$? = $ac_status" >&5 + echo "$as_me:7270: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:7049: \"$ac_try\"") >&5 + { (eval echo "$as_me:7273: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:7052: \$? = $ac_status" >&5 + echo "$as_me:7276: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 -echo "$as_me:7058: checking for dnet_ntoa in -ldnet" >&5 +echo "$as_me:7282: checking for dnet_ntoa in -ldnet" >&5 echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -7063,7 +7287,7 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-ldnet $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line 7066 "configure" +#line 7290 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -7082,16 +7306,16 @@ dnet_ntoa (); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:7085: \"$ac_link\"") >&5 +if { (eval echo "$as_me:7309: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:7088: \$? = $ac_status" >&5 + echo "$as_me:7312: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:7091: \"$ac_try\"") >&5 + { (eval echo "$as_me:7315: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:7094: \$? = $ac_status" >&5 + echo "$as_me:7318: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dnet_dnet_ntoa=yes else @@ -7102,14 +7326,14 @@ fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:7105: result: $ac_cv_lib_dnet_dnet_ntoa" >&5 +echo "$as_me:7329: result: $ac_cv_lib_dnet_dnet_ntoa" >&5 echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6 if test $ac_cv_lib_dnet_dnet_ntoa = yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet" fi if test $ac_cv_lib_dnet_dnet_ntoa = no; then - echo "$as_me:7112: checking for dnet_ntoa in -ldnet_stub" >&5 + echo "$as_me:7336: checking for dnet_ntoa in -ldnet_stub" >&5 echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6 if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -7117,7 +7341,7 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-ldnet_stub $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line 7120 "configure" +#line 7344 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -7136,16 +7360,16 @@ dnet_ntoa (); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:7139: \"$ac_link\"") >&5 +if { (eval echo "$as_me:7363: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:7142: \$? = $ac_status" >&5 + echo "$as_me:7366: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:7145: \"$ac_try\"") >&5 + { (eval echo "$as_me:7369: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:7148: \$? = $ac_status" >&5 + echo "$as_me:7372: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dnet_stub_dnet_ntoa=yes else @@ -7156,7 +7380,7 @@ fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:7159: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5 +echo "$as_me:7383: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5 echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6 if test $ac_cv_lib_dnet_stub_dnet_ntoa = yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub" @@ -7175,13 +7399,13 @@ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext # on Irix 5.2, according to T.E. Dickey. # The functions gethostbyname, getservbyname, and inet_addr are # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking. - echo "$as_me:7178: checking for gethostbyname" >&5 + echo "$as_me:7402: checking for gethostbyname" >&5 echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6 if test "${ac_cv_func_gethostbyname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 7184 "configure" +#line 7408 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char gethostbyname (); below. */ @@ -7212,16 +7436,16 @@ f = gethostbyname; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:7215: \"$ac_link\"") >&5 +if { (eval echo "$as_me:7439: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:7218: \$? = $ac_status" >&5 + echo "$as_me:7442: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:7221: \"$ac_try\"") >&5 + { (eval echo "$as_me:7445: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:7224: \$? = $ac_status" >&5 + echo "$as_me:7448: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_gethostbyname=yes else @@ -7231,11 +7455,11 @@ ac_cv_func_gethostbyname=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:7234: result: $ac_cv_func_gethostbyname" >&5 +echo "$as_me:7458: result: $ac_cv_func_gethostbyname" >&5 echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6 if test $ac_cv_func_gethostbyname = no; then - echo "$as_me:7238: checking for gethostbyname in -lnsl" >&5 + echo "$as_me:7462: checking for gethostbyname in -lnsl" >&5 echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -7243,7 +7467,7 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-lnsl $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line 7246 "configure" +#line 7470 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -7262,16 +7486,16 @@ gethostbyname (); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:7265: \"$ac_link\"") >&5 +if { (eval echo "$as_me:7489: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:7268: \$? = $ac_status" >&5 + echo "$as_me:7492: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:7271: \"$ac_try\"") >&5 + { (eval echo "$as_me:7495: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:7274: \$? = $ac_status" >&5 + echo "$as_me:7498: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_nsl_gethostbyname=yes else @@ -7282,14 +7506,14 @@ fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:7285: result: $ac_cv_lib_nsl_gethostbyname" >&5 +echo "$as_me:7509: result: $ac_cv_lib_nsl_gethostbyname" >&5 echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6 if test $ac_cv_lib_nsl_gethostbyname = yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl" fi if test $ac_cv_lib_nsl_gethostbyname = no; then - echo "$as_me:7292: checking for gethostbyname in -lbsd" >&5 + echo "$as_me:7516: checking for gethostbyname in -lbsd" >&5 echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6 if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -7297,7 +7521,7 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-lbsd $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line 7300 "configure" +#line 7524 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -7316,16 +7540,16 @@ gethostbyname (); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:7319: \"$ac_link\"") >&5 +if { (eval echo "$as_me:7543: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:7322: \$? = $ac_status" >&5 + echo "$as_me:7546: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:7325: \"$ac_try\"") >&5 + { (eval echo "$as_me:7549: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:7328: \$? = $ac_status" >&5 + echo "$as_me:7552: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_bsd_gethostbyname=yes else @@ -7336,7 +7560,7 @@ fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:7339: result: $ac_cv_lib_bsd_gethostbyname" >&5 +echo "$as_me:7563: result: $ac_cv_lib_bsd_gethostbyname" >&5 echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6 if test $ac_cv_lib_bsd_gethostbyname = yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd" @@ -7352,13 +7576,13 @@ fi # variants that don't use the nameserver (or something). -lsocket # must be given before -lnsl if both are needed. We assume that # if connect needs -lnsl, so does gethostbyname. - echo "$as_me:7355: checking for connect" >&5 + echo "$as_me:7579: checking for connect" >&5 echo $ECHO_N "checking for connect... $ECHO_C" >&6 if test "${ac_cv_func_connect+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 7361 "configure" +#line 7585 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char connect (); below. */ @@ -7389,16 +7613,16 @@ f = connect; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:7392: \"$ac_link\"") >&5 +if { (eval echo "$as_me:7616: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:7395: \$? = $ac_status" >&5 + echo "$as_me:7619: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:7398: \"$ac_try\"") >&5 + { (eval echo "$as_me:7622: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:7401: \$? = $ac_status" >&5 + echo "$as_me:7625: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_connect=yes else @@ -7408,11 +7632,11 @@ ac_cv_func_connect=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:7411: result: $ac_cv_func_connect" >&5 +echo "$as_me:7635: result: $ac_cv_func_connect" >&5 echo "${ECHO_T}$ac_cv_func_connect" >&6 if test $ac_cv_func_connect = no; then - echo "$as_me:7415: checking for connect in -lsocket" >&5 + echo "$as_me:7639: checking for connect in -lsocket" >&5 echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6 if test "${ac_cv_lib_socket_connect+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -7420,7 +7644,7 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $X_EXTRA_LIBS $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line 7423 "configure" +#line 7647 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -7439,16 +7663,16 @@ connect (); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:7442: \"$ac_link\"") >&5 +if { (eval echo "$as_me:7666: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:7445: \$? = $ac_status" >&5 + echo "$as_me:7669: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:7448: \"$ac_try\"") >&5 + { (eval echo "$as_me:7672: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:7451: \$? = $ac_status" >&5 + echo "$as_me:7675: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_socket_connect=yes else @@ -7459,7 +7683,7 @@ fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:7462: result: $ac_cv_lib_socket_connect" >&5 +echo "$as_me:7686: result: $ac_cv_lib_socket_connect" >&5 echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6 if test $ac_cv_lib_socket_connect = yes; then X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS" @@ -7468,13 +7692,13 @@ fi fi # Guillermo Gomez says -lposix is necessary on A/UX. - echo "$as_me:7471: checking for remove" >&5 + echo "$as_me:7695: checking for remove" >&5 echo $ECHO_N "checking for remove... $ECHO_C" >&6 if test "${ac_cv_func_remove+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 7477 "configure" +#line 7701 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char remove (); below. */ @@ -7505,16 +7729,16 @@ f = remove; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:7508: \"$ac_link\"") >&5 +if { (eval echo "$as_me:7732: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:7511: \$? = $ac_status" >&5 + echo "$as_me:7735: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:7514: \"$ac_try\"") >&5 + { (eval echo "$as_me:7738: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:7517: \$? = $ac_status" >&5 + echo "$as_me:7741: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_remove=yes else @@ -7524,11 +7748,11 @@ ac_cv_func_remove=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:7527: result: $ac_cv_func_remove" >&5 +echo "$as_me:7751: result: $ac_cv_func_remove" >&5 echo "${ECHO_T}$ac_cv_func_remove" >&6 if test $ac_cv_func_remove = no; then - echo "$as_me:7531: checking for remove in -lposix" >&5 + echo "$as_me:7755: checking for remove in -lposix" >&5 echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6 if test "${ac_cv_lib_posix_remove+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -7536,7 +7760,7 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-lposix $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line 7539 "configure" +#line 7763 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -7555,16 +7779,16 @@ remove (); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:7558: \"$ac_link\"") >&5 +if { (eval echo "$as_me:7782: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:7561: \$? = $ac_status" >&5 + echo "$as_me:7785: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:7564: \"$ac_try\"") >&5 + { (eval echo "$as_me:7788: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:7567: \$? = $ac_status" >&5 + echo "$as_me:7791: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_posix_remove=yes else @@ -7575,7 +7799,7 @@ fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:7578: result: $ac_cv_lib_posix_remove" >&5 +echo "$as_me:7802: result: $ac_cv_lib_posix_remove" >&5 echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6 if test $ac_cv_lib_posix_remove = yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix" @@ -7584,13 +7808,13 @@ fi fi # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. - echo "$as_me:7587: checking for shmat" >&5 + echo "$as_me:7811: checking for shmat" >&5 echo $ECHO_N "checking for shmat... $ECHO_C" >&6 if test "${ac_cv_func_shmat+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 7593 "configure" +#line 7817 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char shmat (); below. */ @@ -7621,16 +7845,16 @@ f = shmat; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:7624: \"$ac_link\"") >&5 +if { (eval echo "$as_me:7848: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:7627: \$? = $ac_status" >&5 + echo "$as_me:7851: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:7630: \"$ac_try\"") >&5 + { (eval echo "$as_me:7854: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:7633: \$? = $ac_status" >&5 + echo "$as_me:7857: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_shmat=yes else @@ -7640,11 +7864,11 @@ ac_cv_func_shmat=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:7643: result: $ac_cv_func_shmat" >&5 +echo "$as_me:7867: result: $ac_cv_func_shmat" >&5 echo "${ECHO_T}$ac_cv_func_shmat" >&6 if test $ac_cv_func_shmat = no; then - echo "$as_me:7647: checking for shmat in -lipc" >&5 + echo "$as_me:7871: checking for shmat in -lipc" >&5 echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6 if test "${ac_cv_lib_ipc_shmat+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -7652,7 +7876,7 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-lipc $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line 7655 "configure" +#line 7879 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -7671,16 +7895,16 @@ shmat (); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:7674: \"$ac_link\"") >&5 +if { (eval echo "$as_me:7898: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:7677: \$? = $ac_status" >&5 + echo "$as_me:7901: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:7680: \"$ac_try\"") >&5 + { (eval echo "$as_me:7904: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:7683: \$? = $ac_status" >&5 + echo "$as_me:7907: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_ipc_shmat=yes else @@ -7691,7 +7915,7 @@ fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:7694: result: $ac_cv_lib_ipc_shmat" >&5 +echo "$as_me:7918: result: $ac_cv_lib_ipc_shmat" >&5 echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6 if test $ac_cv_lib_ipc_shmat = yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc" @@ -7709,7 +7933,7 @@ fi # These have to be linked with before -lX11, unlike the other # libraries we check for below, so use a different variable. # John Interrante, Karl Berry - echo "$as_me:7712: checking for IceConnectionNumber in -lICE" >&5 + echo "$as_me:7936: checking for IceConnectionNumber in -lICE" >&5 echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6 if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -7717,7 +7941,7 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-lICE $X_EXTRA_LIBS $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line 7720 "configure" +#line 7944 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -7736,16 +7960,16 @@ IceConnectionNumber (); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:7739: \"$ac_link\"") >&5 +if { (eval echo "$as_me:7963: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:7742: \$? = $ac_status" >&5 + echo "$as_me:7966: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:7745: \"$ac_try\"") >&5 + { (eval echo "$as_me:7969: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:7748: \$? = $ac_status" >&5 + echo "$as_me:7972: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_ICE_IceConnectionNumber=yes else @@ -7756,7 +7980,7 @@ fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:7759: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5 +echo "$as_me:7983: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5 echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6 if test $ac_cv_lib_ICE_IceConnectionNumber = yes; then X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE" @@ -7774,6 +7998,8 @@ LDFLAGS="$X_LIBS $LDFLAGS" test -n "$verbose" && echo " checking additions to CFLAGS" 1>&6 +echo "${as_me-configure}:8001: testing checking additions to CFLAGS ..." 1>&5 + cf_check_cflags="$CFLAGS" cf_check_cppflags="$CPPFLAGS" @@ -7833,24 +8059,30 @@ done if test -n "$cf_new_cflags" ; then test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6 +echo "${as_me-configure}:8062: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5 + CFLAGS="$CFLAGS $cf_new_cflags" fi if test -n "$cf_new_cppflags" ; then test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6 +echo "${as_me-configure}:8070: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5 + CPPFLAGS="$cf_new_cppflags $CPPFLAGS" fi if test -n "$cf_new_extra_cppflags" ; then test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6 +echo "${as_me-configure}:8078: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5 + EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS" fi if test "$cf_check_cflags" != "$CFLAGS" ; then cat >conftest.$ac_ext <<_ACEOF -#line 7853 "configure" +#line 8085 "configure" #include "confdefs.h" #include <stdio.h> int @@ -7862,16 +8094,16 @@ printf("Hello world"); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:7865: \"$ac_link\"") >&5 +if { (eval echo "$as_me:8097: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:7868: \$? = $ac_status" >&5 + echo "$as_me:8100: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:7871: \"$ac_try\"") >&5 + { (eval echo "$as_me:8103: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:7874: \$? = $ac_status" >&5 + echo "$as_me:8106: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else @@ -7879,22 +8111,26 @@ else cat conftest.$ac_ext >&5 test -n "$verbose" && echo " test-compile failed. Undoing change to \$CFLAGS" 1>&6 +echo "${as_me-configure}:8114: testing test-compile failed. Undoing change to \$CFLAGS ..." 1>&5 + if test "$cf_check_cppflags" != "$CPPFLAGS" ; then test -n "$verbose" && echo " but keeping change to \$CPPFLAGS" 1>&6 +echo "${as_me-configure}:8119: testing but keeping change to \$CPPFLAGS ..." 1>&5 + fi CFLAGS="$cf_check_flags" fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:7891: checking for XOpenDisplay" >&5 +echo "$as_me:8127: checking for XOpenDisplay" >&5 echo $ECHO_N "checking for XOpenDisplay... $ECHO_C" >&6 if test "${ac_cv_func_XOpenDisplay+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 7897 "configure" +#line 8133 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char XOpenDisplay (); below. */ @@ -7925,16 +8161,16 @@ f = XOpenDisplay; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:7928: \"$ac_link\"") >&5 +if { (eval echo "$as_me:8164: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:7931: \$? = $ac_status" >&5 + echo "$as_me:8167: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:7934: \"$ac_try\"") >&5 + { (eval echo "$as_me:8170: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:7937: \$? = $ac_status" >&5 + echo "$as_me:8173: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_XOpenDisplay=yes else @@ -7944,13 +8180,13 @@ ac_cv_func_XOpenDisplay=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:7947: result: $ac_cv_func_XOpenDisplay" >&5 +echo "$as_me:8183: result: $ac_cv_func_XOpenDisplay" >&5 echo "${ECHO_T}$ac_cv_func_XOpenDisplay" >&6 if test $ac_cv_func_XOpenDisplay = yes; then : else -echo "$as_me:7953: checking for XOpenDisplay in -lX11" >&5 +echo "$as_me:8189: checking for XOpenDisplay in -lX11" >&5 echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6 if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -7958,7 +8194,7 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line 7961 "configure" +#line 8197 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -7977,16 +8213,16 @@ XOpenDisplay (); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:7980: \"$ac_link\"") >&5 +if { (eval echo "$as_me:8216: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:7983: \$? = $ac_status" >&5 + echo "$as_me:8219: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:7986: \"$ac_try\"") >&5 + { (eval echo "$as_me:8222: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:7989: \$? = $ac_status" >&5 + echo "$as_me:8225: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_X11_XOpenDisplay=yes else @@ -7997,7 +8233,7 @@ fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:8000: result: $ac_cv_lib_X11_XOpenDisplay" >&5 +echo "$as_me:8236: result: $ac_cv_lib_X11_XOpenDisplay" >&5 echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6 if test $ac_cv_lib_X11_XOpenDisplay = yes; then LIBS="-lX11 $LIBS" @@ -8005,13 +8241,13 @@ fi fi -echo "$as_me:8008: checking for XtAppInitialize" >&5 +echo "$as_me:8244: checking for XtAppInitialize" >&5 echo $ECHO_N "checking for XtAppInitialize... $ECHO_C" >&6 if test "${ac_cv_func_XtAppInitialize+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 8014 "configure" +#line 8250 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char XtAppInitialize (); below. */ @@ -8042,16 +8278,16 @@ f = XtAppInitialize; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:8045: \"$ac_link\"") >&5 +if { (eval echo "$as_me:8281: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:8048: \$? = $ac_status" >&5 + echo "$as_me:8284: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:8051: \"$ac_try\"") >&5 + { (eval echo "$as_me:8287: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:8054: \$? = $ac_status" >&5 + echo "$as_me:8290: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_XtAppInitialize=yes else @@ -8061,13 +8297,13 @@ ac_cv_func_XtAppInitialize=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:8064: result: $ac_cv_func_XtAppInitialize" >&5 +echo "$as_me:8300: result: $ac_cv_func_XtAppInitialize" >&5 echo "${ECHO_T}$ac_cv_func_XtAppInitialize" >&6 if test $ac_cv_func_XtAppInitialize = yes; then : else -echo "$as_me:8070: checking for XtAppInitialize in -lXt" >&5 +echo "$as_me:8306: checking for XtAppInitialize in -lXt" >&5 echo $ECHO_N "checking for XtAppInitialize in -lXt... $ECHO_C" >&6 if test "${ac_cv_lib_Xt_XtAppInitialize+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -8075,7 +8311,7 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line 8078 "configure" +#line 8314 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -8094,16 +8330,16 @@ XtAppInitialize (); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:8097: \"$ac_link\"") >&5 +if { (eval echo "$as_me:8333: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:8100: \$? = $ac_status" >&5 + echo "$as_me:8336: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:8103: \"$ac_try\"") >&5 + { (eval echo "$as_me:8339: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:8106: \$? = $ac_status" >&5 + echo "$as_me:8342: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_Xt_XtAppInitialize=yes else @@ -8114,7 +8350,7 @@ fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:8117: result: $ac_cv_lib_Xt_XtAppInitialize" >&5 +echo "$as_me:8353: result: $ac_cv_lib_Xt_XtAppInitialize" >&5 echo "${ECHO_T}$ac_cv_lib_Xt_XtAppInitialize" >&6 if test $ac_cv_lib_Xt_XtAppInitialize = yes; then cat >>confdefs.h <<\EOF @@ -8122,13 +8358,13 @@ if test $ac_cv_lib_Xt_XtAppInitialize = yes; then EOF cf_have_X_LIBS=Xt - LIBS="-lXt $X_PRE_LIBS $LIBS" + LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS" fi fi if test $cf_have_X_LIBS = no ; then - { echo "$as_me:8131: WARNING: Unable to successfully link X Toolkit library (-lXt) with + { echo "$as_me:8367: WARNING: Unable to successfully link X Toolkit library (-lXt) with test program. You will have to check and add the proper libraries by hand to makefile." >&5 echo "$as_me: WARNING: Unable to successfully link X Toolkit library (-lXt) with @@ -8139,27 +8375,28 @@ fi for ac_header in \ X11/DECkeysym.h \ X11/Sunkeysym.h \ + X11/XF86keysym.h \ X11/Xpoll.h \ do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -echo "$as_me:8146: checking for $ac_header" >&5 +echo "$as_me:8383: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 8152 "configure" +#line 8389 "configure" #include "confdefs.h" #include <$ac_header> _ACEOF -if { (eval echo "$as_me:8156: \"$ac_cpp conftest.$ac_ext\"") >&5 +if { (eval echo "$as_me:8393: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? egrep -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:8162: \$? = $ac_status" >&5 + echo "$as_me:8399: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag @@ -8178,7 +8415,7 @@ else fi rm -f conftest.err conftest.$ac_ext fi -echo "$as_me:8181: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "$as_me:8418: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<EOF @@ -8190,7 +8427,7 @@ done cf_x_athena=${cf_x_athena-Xaw} -echo "$as_me:8193: checking if you want to link with Xaw 3d library" >&5 +echo "$as_me:8430: checking if you want to link with Xaw 3d library" >&5 echo $ECHO_N "checking if you want to link with Xaw 3d library... $ECHO_C" >&6 withval= @@ -8201,14 +8438,14 @@ if test "${with_Xaw3d+set}" = set; then fi; if test "$withval" = yes ; then cf_x_athena=Xaw3d - echo "$as_me:8204: result: yes" >&5 + echo "$as_me:8441: result: yes" >&5 echo "${ECHO_T}yes" >&6 else - echo "$as_me:8207: result: no" >&5 + echo "$as_me:8444: result: no" >&5 echo "${ECHO_T}no" >&6 fi -echo "$as_me:8211: checking if you want to link with neXT Athena library" >&5 +echo "$as_me:8448: checking if you want to link with neXT Athena library" >&5 echo $ECHO_N "checking if you want to link with neXT Athena library... $ECHO_C" >&6 withval= @@ -8219,14 +8456,14 @@ if test "${with_neXtaw+set}" = set; then fi; if test "$withval" = yes ; then cf_x_athena=neXtaw - echo "$as_me:8222: result: yes" >&5 + echo "$as_me:8459: result: yes" >&5 echo "${ECHO_T}yes" >&6 else - echo "$as_me:8225: result: no" >&5 + echo "$as_me:8462: result: no" >&5 echo "${ECHO_T}no" >&6 fi -echo "$as_me:8229: checking if you want to link with Athena-Plus library" >&5 +echo "$as_me:8466: checking if you want to link with Athena-Plus library" >&5 echo $ECHO_N "checking if you want to link with Athena-Plus library... $ECHO_C" >&6 withval= @@ -8237,14 +8474,14 @@ if test "${with_XawPlus+set}" = set; then fi; if test "$withval" = yes ; then cf_x_athena=XawPlus - echo "$as_me:8240: result: yes" >&5 + echo "$as_me:8477: result: yes" >&5 echo "${ECHO_T}yes" >&6 else - echo "$as_me:8243: result: no" >&5 + echo "$as_me:8480: result: no" >&5 echo "${ECHO_T}no" >&6 fi -echo "$as_me:8247: checking for XextCreateExtension in -lXext" >&5 +echo "$as_me:8484: checking for XextCreateExtension in -lXext" >&5 echo $ECHO_N "checking for XextCreateExtension in -lXext... $ECHO_C" >&6 if test "${ac_cv_lib_Xext_XextCreateExtension+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -8252,7 +8489,7 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-lXext $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line 8255 "configure" +#line 8492 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -8271,16 +8508,16 @@ XextCreateExtension (); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:8274: \"$ac_link\"") >&5 +if { (eval echo "$as_me:8511: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:8277: \$? = $ac_status" >&5 + echo "$as_me:8514: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:8280: \"$ac_try\"") >&5 + { (eval echo "$as_me:8517: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:8283: \$? = $ac_status" >&5 + echo "$as_me:8520: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_Xext_XextCreateExtension=yes else @@ -8291,7 +8528,7 @@ fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:8294: result: $ac_cv_lib_Xext_XextCreateExtension" >&5 +echo "$as_me:8531: result: $ac_cv_lib_Xext_XextCreateExtension" >&5 echo "${ECHO_T}$ac_cv_lib_Xext_XextCreateExtension" >&6 if test $ac_cv_lib_Xext_XextCreateExtension = yes; then LIBS="-lXext $LIBS" @@ -8313,14 +8550,14 @@ do cf_test=X11/$cf_x_athena_root/SimpleMenu.h if test $cf_path != default ; then CPPFLAGS="-I$cf_path/include $cf_save" - echo "$as_me:8316: checking for $cf_test in $cf_path" >&5 + echo "$as_me:8553: checking for $cf_test in $cf_path" >&5 echo $ECHO_N "checking for $cf_test in $cf_path... $ECHO_C" >&6 else - echo "$as_me:8319: checking for $cf_test" >&5 + echo "$as_me:8556: checking for $cf_test" >&5 echo $ECHO_N "checking for $cf_test... $ECHO_C" >&6 fi cat >conftest.$ac_ext <<_ACEOF -#line 8323 "configure" +#line 8560 "configure" #include "confdefs.h" #include <X11/Intrinsic.h> @@ -8334,16 +8571,16 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:8337: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:8574: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:8340: \$? = $ac_status" >&5 + echo "$as_me:8577: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:8343: \"$ac_try\"") >&5 + { (eval echo "$as_me:8580: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:8346: \$? = $ac_status" >&5 + echo "$as_me:8583: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_result=yes else @@ -8352,7 +8589,7 @@ cat conftest.$ac_ext >&5 cf_result=no fi rm -f conftest.$ac_objext conftest.$ac_ext - echo "$as_me:8355: result: $cf_result" >&5 + echo "$as_me:8592: result: $cf_result" >&5 echo "${ECHO_T}$cf_result" >&6 if test "$cf_result" = yes ; then cf_x_athena_include=$cf_path @@ -8364,7 +8601,7 @@ echo "${ECHO_T}$cf_result" >&6 done if test -z "$cf_x_athena_include" ; then - { echo "$as_me:8367: WARNING: Unable to successfully find Athena header files with test program" >&5 + { echo "$as_me:8604: WARNING: Unable to successfully find Athena header files with test program" >&5 echo "$as_me: WARNING: Unable to successfully find Athena header files with test program" >&2;} elif test "$cf_x_athena_include" != default ; then CPPFLAGS="$CPPFLAGS -I$cf_x_athena_include" @@ -8389,17 +8626,15 @@ do cf_test=XawSimpleMenuAddGlobalActions if test $cf_path != default ; then LIBS="-L$cf_path/lib $cf_lib $LIBS" - echo "$as_me:8392: checking for $cf_lib in $cf_path" >&5 + echo "$as_me:8629: checking for $cf_lib in $cf_path" >&5 echo $ECHO_N "checking for $cf_lib in $cf_path... $ECHO_C" >&6 else LIBS="$cf_lib $LIBS" - echo "$as_me:8396: checking for $cf_test in $cf_lib" >&5 + echo "$as_me:8633: checking for $cf_test in $cf_lib" >&5 echo $ECHO_N "checking for $cf_test in $cf_lib... $ECHO_C" >&6 fi - cf_SAVE="$LIBS" - LIBS="$X_PRE_LIBS $LIBS $X_EXTRA_LIBS" cat >conftest.$ac_ext <<_ACEOF -#line 8402 "configure" +#line 8637 "configure" #include "confdefs.h" int @@ -8411,16 +8646,16 @@ $cf_test() } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:8414: \"$ac_link\"") >&5 +if { (eval echo "$as_me:8649: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:8417: \$? = $ac_status" >&5 + echo "$as_me:8652: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:8420: \"$ac_try\"") >&5 + { (eval echo "$as_me:8655: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:8423: \$? = $ac_status" >&5 + echo "$as_me:8658: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_result=yes else @@ -8429,21 +8664,19 @@ cat conftest.$ac_ext >&5 cf_result=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - echo "$as_me:8432: result: $cf_result" >&5 + echo "$as_me:8667: result: $cf_result" >&5 echo "${ECHO_T}$cf_result" >&6 if test "$cf_result" = yes ; then cf_x_athena_lib="$cf_lib" - LIBS="$cf_SAVE" break - else - LIBS="$cf_save" fi + LIBS="$cf_save" fi done done if test -z "$cf_x_athena_lib" ; then - { { echo "$as_me:8446: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&5 + { { echo "$as_me:8679: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&5 echo "$as_me: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&2;} { (exit 1); exit 1; }; } fi @@ -8454,14 +8687,14 @@ cat >>confdefs.h <<EOF #define $cf_x_athena_LIBS 1 EOF -echo "$as_me:8457: checking for declaration of fd_set" >&5 +echo "$as_me:8690: checking for declaration of fd_set" >&5 echo $ECHO_N "checking for declaration of fd_set... $ECHO_C" >&6 if test "${cf_cv_type_fd_set+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else echo "trying sys/types alone" 1>&5 cat >conftest.$ac_ext <<_ACEOF -#line 8464 "configure" +#line 8697 "configure" #include "confdefs.h" #include <sys/types.h> @@ -8474,16 +8707,16 @@ fd_set x } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:8477: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:8710: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:8480: \$? = $ac_status" >&5 + echo "$as_me:8713: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:8483: \"$ac_try\"") >&5 + { (eval echo "$as_me:8716: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:8486: \$? = $ac_status" >&5 + echo "$as_me:8719: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_type_fd_set=sys/types.h else @@ -8491,7 +8724,7 @@ else cat conftest.$ac_ext >&5 echo "trying X11/Xpoll.h" 1>&5 cat >conftest.$ac_ext <<_ACEOF -#line 8494 "configure" +#line 8727 "configure" #include "confdefs.h" #ifdef HAVE_X11_XPOLL_H @@ -8506,16 +8739,16 @@ fd_set x } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:8509: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:8742: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:8512: \$? = $ac_status" >&5 + echo "$as_me:8745: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:8515: \"$ac_try\"") >&5 + { (eval echo "$as_me:8748: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:8518: \$? = $ac_status" >&5 + echo "$as_me:8751: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_type_fd_set=X11/Xpoll.h else @@ -8523,7 +8756,7 @@ else cat conftest.$ac_ext >&5 echo "trying sys/select.h" 1>&5 cat >conftest.$ac_ext <<_ACEOF -#line 8526 "configure" +#line 8759 "configure" #include "confdefs.h" #include <sys/types.h> @@ -8537,16 +8770,16 @@ fd_set x } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:8540: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:8773: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:8543: \$? = $ac_status" >&5 + echo "$as_me:8776: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:8546: \"$ac_try\"") >&5 + { (eval echo "$as_me:8779: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:8549: \$? = $ac_status" >&5 + echo "$as_me:8782: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_type_fd_set=sys/select.h else @@ -8560,7 +8793,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:8563: result: $cf_cv_type_fd_set" >&5 +echo "$as_me:8796: result: $cf_cv_type_fd_set" >&5 echo "${ECHO_T}$cf_cv_type_fd_set" >&6 if test $cf_cv_type_fd_set = sys/select.h ; then cat >>confdefs.h <<\EOF @@ -8569,14 +8802,14 @@ EOF fi -echo "$as_me:8572: checking for IRIX 6.5 baud-rate redefinitions" >&5 +echo "$as_me:8805: checking for IRIX 6.5 baud-rate redefinitions" >&5 echo $ECHO_N "checking for IRIX 6.5 baud-rate redefinitions... $ECHO_C" >&6 if test "${cf_cv_termio_c_ispeed+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 8579 "configure" +#line 8812 "configure" #include "confdefs.h" #include <sys/types.h> @@ -8594,16 +8827,16 @@ foo.c_ospeed = B9600; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:8597: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:8830: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:8600: \$? = $ac_status" >&5 + echo "$as_me:8833: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:8603: \"$ac_try\"") >&5 + { (eval echo "$as_me:8836: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:8606: \$? = $ac_status" >&5 + echo "$as_me:8839: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_termio_c_ispeed=yes @@ -8615,7 +8848,7 @@ fi rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:8618: result: $cf_cv_termio_c_ispeed" >&5 +echo "$as_me:8851: result: $cf_cv_termio_c_ispeed" >&5 echo "${ECHO_T}$cf_cv_termio_c_ispeed" >&6 test "$cf_cv_termio_c_ispeed" = yes && cat >>confdefs.h <<\EOF #define HAVE_TERMIO_C_ISPEED 1 @@ -8628,7 +8861,7 @@ LIBS="$LIBS $X_EXTRA_LIBS" case $host_os in #(vi freebsd*|netbsd*) # 2004/8/15 - revisit this if/when grantpt is known to work. -echo "$as_me:8631: checking for openpty in -lutil" >&5 +echo "$as_me:8864: checking for openpty in -lutil" >&5 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6 if test "${ac_cv_lib_util_openpty+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -8636,7 +8869,7 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-lutil $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line 8639 "configure" +#line 8872 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -8655,16 +8888,16 @@ openpty (); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:8658: \"$ac_link\"") >&5 +if { (eval echo "$as_me:8891: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:8661: \$? = $ac_status" >&5 + echo "$as_me:8894: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:8664: \"$ac_try\"") >&5 + { (eval echo "$as_me:8897: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:8667: \$? = $ac_status" >&5 + echo "$as_me:8900: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_util_openpty=yes else @@ -8675,7 +8908,7 @@ fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:8678: result: $ac_cv_lib_util_openpty" >&5 +echo "$as_me:8911: result: $ac_cv_lib_util_openpty" >&5 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6 if test $ac_cv_lib_util_openpty = yes; then cat >>confdefs.h <<EOF @@ -8692,13 +8925,13 @@ fi for ac_func in grantpt do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:8695: checking for $ac_func" >&5 +echo "$as_me:8928: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 8701 "configure" +#line 8934 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. */ @@ -8729,16 +8962,16 @@ f = $ac_func; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:8732: \"$ac_link\"") >&5 +if { (eval echo "$as_me:8965: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:8735: \$? = $ac_status" >&5 + echo "$as_me:8968: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:8738: \"$ac_try\"") >&5 + { (eval echo "$as_me:8971: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:8741: \$? = $ac_status" >&5 + echo "$as_me:8974: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else @@ -8748,7 +8981,7 @@ eval "$as_ac_var=no" fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:8751: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "$as_me:8984: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<EOF @@ -8757,7 +8990,7 @@ EOF else -echo "$as_me:8760: checking for openpty in -lutil" >&5 +echo "$as_me:8993: checking for openpty in -lutil" >&5 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6 if test "${ac_cv_lib_util_openpty+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -8765,7 +8998,7 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-lutil $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line 8768 "configure" +#line 9001 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -8784,16 +9017,16 @@ openpty (); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:8787: \"$ac_link\"") >&5 +if { (eval echo "$as_me:9020: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:8790: \$? = $ac_status" >&5 + echo "$as_me:9023: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:8793: \"$ac_try\"") >&5 + { (eval echo "$as_me:9026: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:8796: \$? = $ac_status" >&5 + echo "$as_me:9029: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_util_openpty=yes else @@ -8804,7 +9037,7 @@ fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:8807: result: $ac_cv_lib_util_openpty" >&5 +echo "$as_me:9040: result: $ac_cv_lib_util_openpty" >&5 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6 if test $ac_cv_lib_util_openpty = yes; then cat >>confdefs.h <<EOF @@ -8821,14 +9054,14 @@ done ;; esac -echo "$as_me:8824: checking for XKB Bell extension" >&5 +echo "$as_me:9057: checking for XKB Bell extension" >&5 echo $ECHO_N "checking for XKB Bell extension... $ECHO_C" >&6 if test "${cf_cv_xkb_bell_ext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 8831 "configure" +#line 9064 "configure" #include "confdefs.h" #include <X11/XKBlib.h> /* has the prototype */ @@ -8849,16 +9082,16 @@ int x = XkbBI_Info } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:8852: \"$ac_link\"") >&5 +if { (eval echo "$as_me:9085: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:8855: \$? = $ac_status" >&5 + echo "$as_me:9088: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:8858: \"$ac_try\"") >&5 + { (eval echo "$as_me:9091: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:8861: \$? = $ac_status" >&5 + echo "$as_me:9094: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_xkb_bell_ext=yes else @@ -8869,7 +9102,7 @@ fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:8872: result: $cf_cv_xkb_bell_ext" >&5 +echo "$as_me:9105: result: $cf_cv_xkb_bell_ext" >&5 echo "${ECHO_T}$cf_cv_xkb_bell_ext" >&6 test "$cf_cv_xkb_bell_ext" = yes && cat >>confdefs.h <<\EOF @@ -8879,13 +9112,13 @@ EOF for ac_func in Xutf8LookupString do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:8882: checking for $ac_func" >&5 +echo "$as_me:9115: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 8888 "configure" +#line 9121 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. */ @@ -8916,16 +9149,16 @@ f = $ac_func; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:8919: \"$ac_link\"") >&5 +if { (eval echo "$as_me:9152: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:8922: \$? = $ac_status" >&5 + echo "$as_me:9155: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:8925: \"$ac_try\"") >&5 + { (eval echo "$as_me:9158: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:8928: \$? = $ac_status" >&5 + echo "$as_me:9161: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else @@ -8935,7 +9168,7 @@ eval "$as_ac_var=no" fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:8938: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "$as_me:9171: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<EOF @@ -8951,7 +9184,7 @@ else fi done -echo "$as_me:8954: checking if you want narrow prototypes for X libraries" >&5 +echo "$as_me:9187: checking if you want narrow prototypes for X libraries" >&5 echo $ECHO_N "checking if you want narrow prototypes for X libraries... $ECHO_C" >&6 case `$ac_config_guess` in #(vi @@ -8977,10 +9210,10 @@ else enable_narrowproto=$cf_default_narrowproto fi; -echo "$as_me:8980: result: $enable_narrowproto" >&5 +echo "$as_me:9213: result: $enable_narrowproto" >&5 echo "${ECHO_T}$enable_narrowproto" >&6 -echo "$as_me:8983: checking if we should use imake to help" >&5 +echo "$as_me:9216: checking if we should use imake to help" >&5 echo $ECHO_N "checking if we should use imake to help... $ECHO_C" >&6 # Check whether --enable-imake or --disable-imake was given. @@ -8997,7 +9230,7 @@ else enable_imake=yes fi; -echo "$as_me:9000: result: $enable_imake" >&5 +echo "$as_me:9233: result: $enable_imake" >&5 echo "${ECHO_T}$enable_imake" >&6 if test "$enable_imake" = yes ; then @@ -9006,7 +9239,7 @@ for ac_prog in xmkmf imake do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:9009: checking for $ac_word" >&5 +echo "$as_me:9242: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_IMAKE+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -9023,7 +9256,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if $as_executable_p "$ac_dir/$ac_word"; then ac_cv_path_IMAKE="$ac_dir/$ac_word" - echo "$as_me:9026: found $ac_dir/$ac_word" >&5 + echo "$as_me:9259: found $ac_dir/$ac_word" >&5 break fi done @@ -9034,10 +9267,10 @@ fi IMAKE=$ac_cv_path_IMAKE if test -n "$IMAKE"; then - echo "$as_me:9037: result: $IMAKE" >&5 + echo "$as_me:9270: result: $IMAKE" >&5 echo "${ECHO_T}$IMAKE" >&6 else - echo "$as_me:9040: result: no" >&5 + echo "$as_me:9273: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -9068,11 +9301,14 @@ if mkdir conftestdir; then cat >fix_cflags.sed <<'CF_EOF' s/\\//g +s/[ ][ ]*/ /g s/"//g -s/\(-D[a-zA-Z0-9_][a-zA-Z0-9_]*\)=\([^\\'"0-9 ][^ ]*\([ ][ ]*[^- ][^ ]*\)*\)/\1='\\"\2\\"'/g -s/\(-D[a-zA-Z0-9_][a-zA-Z0-9_]*\)=\([^\\'"0-9 ][^ ]*\)[ ]/\1='\\"\2\\"' /g -s/\(-D[a-zA-Z0-9_][a-zA-Z0-9_]*\)=\([^\\'"0-9 ][^ ]*\)$/\1='\\"\2\\"'/g -s/^IMAKE[ ]*/IMAKE_CFLAGS="/ +:pack +s/\(=[^ ][^ ]*\) \([^-]\)/\1 \2/g +t pack +s/\(-D[a-zA-Z0-9_][a-zA-Z0-9_]*\)=\([^\'0-9 ][^ ]*\)/\1='\\"\2\\"'/g +s/^IMAKE[ ]/IMAKE_CFLAGS="/ +s/ / /g s/$/"/ CF_EOF @@ -9086,14 +9322,16 @@ CF_EOF cat >> ./Imakefile <<'CF_EOF' findstddefs: - @echo IMAKE $(ALLDEFINES) $(MAIN_DEFINES) $(VENDORMANDEFS) | sed -f fix_cflags.sed - @echo IMAKE $(EXTRA_LOAD_FLAGS) | sed -f fix_lflags.sed + @echo IMAKE ${ALLDEFINES} $(MAIN_DEFINES) $(VENDORMANDEFS) | sed -f fix_cflags.sed + @echo IMAKE ${EXTRA_LOAD_FLAGS} | sed -f fix_lflags.sed CF_EOF if ( $IMAKE $cf_imake_opts 1>/dev/null 2>&5 && test -f Makefile) then test -n "$verbose" && echo " Using $IMAKE $cf_imake_opts" 1>&6 +echo "${as_me-configure}:9333: testing Using $IMAKE $cf_imake_opts ..." 1>&5 + else # sometimes imake doesn't have the config path compiled in. Find it. cf_config= @@ -9110,7 +9348,7 @@ CF_EOF esac done if test -z "$cf_config" ; then - { echo "$as_me:9113: WARNING: Could not find imake config-directory" >&5 + { echo "$as_me:9351: WARNING: Could not find imake config-directory" >&5 echo "$as_me: WARNING: Could not find imake config-directory" >&2;} else cf_imake_opts="$cf_imake_opts -I$cf_config" @@ -9118,8 +9356,10 @@ echo "$as_me: WARNING: Could not find imake config-directory" >&2;} then test -n "$verbose" && echo " Using $IMAKE $cf_config" 1>&6 +echo "${as_me-configure}:9359: testing Using $IMAKE $cf_config ..." 1>&5 + else - { echo "$as_me:9122: WARNING: Cannot run $IMAKE" >&5 + { echo "$as_me:9362: WARNING: Cannot run $IMAKE" >&5 echo "$as_me: WARNING: Cannot run $IMAKE" >&2;} fi fi @@ -9132,7 +9372,7 @@ echo "$as_me: WARNING: Cannot run $IMAKE" >&2;} cd .. rm -rf conftestdir - # We use $(ALLDEFINES) rather than $(STD_DEFINES) because the former + # We use ${ALLDEFINES} rather than ${STD_DEFINES} because the former # declares XTFUNCPROTO there. However, some vendors (e.g., SGI) have # modified it to support site.cf, adding a kludge for the /usr/include # directory. Try to filter that out, otherwise gcc won't find its @@ -9163,6 +9403,8 @@ echo "$as_me: WARNING: Cannot run $IMAKE" >&2;} else test -n "$verbose" && echo " suppressed \"$cf_nostdinc\" and \"$cf_std_incl\"" 1>&6 +echo "${as_me-configure}:9406: testing suppressed \"$cf_nostdinc\" and \"$cf_std_incl\" ..." 1>&5 + IMAKE_CFLAGS="$cf_cpp_opts" fi fi @@ -9183,8 +9425,12 @@ fi test -n "$verbose" && echo " IMAKE_CFLAGS $IMAKE_CFLAGS" 1>&6 +echo "${as_me-configure}:9428: testing IMAKE_CFLAGS $IMAKE_CFLAGS ..." 1>&5 + test -n "$verbose" && echo " IMAKE_LOADFLAGS $IMAKE_LOADFLAGS" 1>&6 +echo "${as_me-configure}:9432: testing IMAKE_LOADFLAGS $IMAKE_LOADFLAGS ..." 1>&5 + fi if test -n "$IMAKE" && test -n "$IMAKE_CFLAGS" ; then @@ -9262,6 +9508,8 @@ else IMAKE_LOADFLAGS= test -n "$verbose" && echo " make fallback definitions" 1>&6 +echo "${as_me-configure}:9511: testing make fallback definitions ..." 1>&5 + # We prefer config.guess' values when we can get them, to avoid # inconsistent results with uname (AIX for instance). However, # config.guess is not always consistent either. @@ -9375,7 +9623,7 @@ fi fi -echo "$as_me:9378: checking for default terminal-id" >&5 +echo "$as_me:9626: checking for default terminal-id" >&5 echo $ECHO_N "checking for default terminal-id... $ECHO_C" >&6 # Check whether --with-terminal-id or --without-terminal-id was given. @@ -9385,7 +9633,7 @@ if test "${with_terminal_id+set}" = set; then else default_termid=vt100 fi; -echo "$as_me:9388: result: $default_termid" >&5 +echo "$as_me:9636: result: $default_termid" >&5 echo "${ECHO_T}$default_termid" >&6 case $default_termid in vt*) default_termid=`echo $default_termid | sed -e 's/^..//'` @@ -9395,7 +9643,7 @@ cat >>confdefs.h <<EOF #define DFT_DECID "$default_termid" EOF -echo "$as_me:9398: checking for default terminal-type" >&5 +echo "$as_me:9646: checking for default terminal-type" >&5 echo $ECHO_N "checking for default terminal-type... $ECHO_C" >&6 # Check whether --with-terminal-type or --without-terminal-type was given. @@ -9405,13 +9653,13 @@ if test "${with_terminal_type+set}" = set; then else default_TERM=xterm fi; -echo "$as_me:9408: result: $default_TERM" >&5 +echo "$as_me:9656: result: $default_TERM" >&5 echo "${ECHO_T}$default_TERM" >&6 cat >>confdefs.h <<EOF #define DFT_TERMTYPE "$default_TERM" EOF -echo "$as_me:9414: checking for private terminfo-directory" >&5 +echo "$as_me:9662: checking for private terminfo-directory" >&5 echo $ECHO_N "checking for private terminfo-directory... $ECHO_C" >&6 # Check whether --with-own-terminfo or --without-own-terminfo was given. @@ -9421,10 +9669,10 @@ if test "${with_own_terminfo+set}" = set; then else TERMINFO_DIR=${TERMINFO-none} fi; -echo "$as_me:9424: result: $TERMINFO_DIR" >&5 +echo "$as_me:9672: result: $TERMINFO_DIR" >&5 echo "${ECHO_T}$TERMINFO_DIR" >&6 if test "$TERMINFO_DIR" = yes ; then - { echo "$as_me:9427: WARNING: no value given" >&5 + { echo "$as_me:9675: WARNING: no value given" >&5 echo "$as_me: WARNING: no value given" >&2;} elif test "$TERMINFO_DIR" != none ; then if test -d $TERMINFO_DIR ; then @@ -9433,7 +9681,7 @@ elif test "$TERMINFO_DIR" != none ; then EOF else - { echo "$as_me:9436: WARNING: not a directory" >&5 + { echo "$as_me:9684: WARNING: not a directory" >&5 echo "$as_me: WARNING: not a directory" >&2;} fi elif test "$prefix" != NONE ; then @@ -9451,7 +9699,7 @@ fi ############################################################################### -echo "$as_me:9454: checking if you want active-icons" >&5 +echo "$as_me:9702: checking if you want active-icons" >&5 echo $ECHO_N "checking if you want active-icons... $ECHO_C" >&6 # Check whether --enable-active-icon or --disable-active-icon was given. @@ -9468,7 +9716,7 @@ else enable_active_icon=yes fi; -echo "$as_me:9471: result: $enable_active_icon" >&5 +echo "$as_me:9719: result: $enable_active_icon" >&5 echo "${ECHO_T}$enable_active_icon" >&6 if test "$enable_active_icon" = no ; then cat >>confdefs.h <<\EOF @@ -9477,7 +9725,7 @@ EOF fi -echo "$as_me:9480: checking if you want ANSI color" >&5 +echo "$as_me:9728: checking if you want ANSI color" >&5 echo $ECHO_N "checking if you want ANSI color... $ECHO_C" >&6 # Check whether --enable-ansi-color or --disable-ansi-color was given. @@ -9494,7 +9742,7 @@ else enable_ansi_color=yes fi; -echo "$as_me:9497: result: $enable_ansi_color" >&5 +echo "$as_me:9745: result: $enable_ansi_color" >&5 echo "${ECHO_T}$enable_ansi_color" >&6 test "$enable_ansi_color" = no && cat >>confdefs.h <<\EOF #define OPT_ISO_COLORS 0 @@ -9502,7 +9750,7 @@ EOF if test "$enable_ansi_color" = yes ; then - echo "$as_me:9505: checking if you want 16 colors like aixterm" >&5 + echo "$as_me:9753: checking if you want 16 colors like aixterm" >&5 echo $ECHO_N "checking if you want 16 colors like aixterm... $ECHO_C" >&6 # Check whether --enable-16-color or --disable-16-color was given. @@ -9519,13 +9767,13 @@ else enable_16_color=yes fi; - echo "$as_me:9522: result: $enable_16_color" >&5 + echo "$as_me:9770: result: $enable_16_color" >&5 echo "${ECHO_T}$enable_16_color" >&6 test "$enable_16_color" = no && cat >>confdefs.h <<\EOF #define OPT_AIX_COLORS 0 EOF - echo "$as_me:9528: checking if you want 256 colors" >&5 + echo "$as_me:9776: checking if you want 256 colors" >&5 echo $ECHO_N "checking if you want 256 colors... $ECHO_C" >&6 # Check whether --enable-256-color or --disable-256-color was given. @@ -9542,7 +9790,7 @@ else enable_256_color=no fi; - echo "$as_me:9545: result: $enable_256_color" >&5 + echo "$as_me:9793: result: $enable_256_color" >&5 echo "${ECHO_T}$enable_256_color" >&6 if test "$enable_256_color" = yes ; then CHARPROC_DEPS="$CHARPROC_DEPS 256colres.h" @@ -9552,7 +9800,7 @@ echo "${ECHO_T}$enable_256_color" >&6 EOF else - echo "$as_me:9555: checking if you want 88 colors" >&5 + echo "$as_me:9803: checking if you want 88 colors" >&5 echo $ECHO_N "checking if you want 88 colors... $ECHO_C" >&6 # Check whether --enable-88-color or --disable-88-color was given. @@ -9569,7 +9817,7 @@ else enable_88_color=no fi; - echo "$as_me:9572: result: $enable_88_color" >&5 + echo "$as_me:9820: result: $enable_88_color" >&5 echo "${ECHO_T}$enable_88_color" >&6 if test "$enable_88_color" = yes ; then CHARPROC_DEPS="$CHARPROC_DEPS 88colres.h" @@ -9583,7 +9831,7 @@ EOF fi -echo "$as_me:9586: checking if you want blinking cursor" >&5 +echo "$as_me:9834: checking if you want blinking cursor" >&5 echo $ECHO_N "checking if you want blinking cursor... $ECHO_C" >&6 # Check whether --enable-blink-cursor or --disable-blink-cursor was given. @@ -9600,13 +9848,13 @@ else enable_blink_curs=yes fi; -echo "$as_me:9603: result: $enable_blink_curs" >&5 +echo "$as_me:9851: result: $enable_blink_curs" >&5 echo "${ECHO_T}$enable_blink_curs" >&6 test "$enable_blink_curs" = no && cat >>confdefs.h <<\EOF #define OPT_BLINK_CURS 0 EOF -echo "$as_me:9609: checking if you want to ignore Linux's broken palette-strings" >&5 +echo "$as_me:9857: checking if you want to ignore Linux's broken palette-strings" >&5 echo $ECHO_N "checking if you want to ignore Linux's broken palette-strings... $ECHO_C" >&6 case $host_os in #(vi @@ -9630,7 +9878,7 @@ else enable_broken_osc=$enableval fi; -echo "$as_me:9633: result: $enable_broken_osc" >&5 +echo "$as_me:9881: result: $enable_broken_osc" >&5 echo "${ECHO_T}$enable_broken_osc" >&6 if test "$enable_broken_osc" = yes ; then cat >>confdefs.h <<\EOF @@ -9644,7 +9892,7 @@ EOF fi -echo "$as_me:9647: checking if you want to allow broken string-terminators" >&5 +echo "$as_me:9895: checking if you want to allow broken string-terminators" >&5 echo $ECHO_N "checking if you want to allow broken string-terminators... $ECHO_C" >&6 # Check whether --enable-broken-st or --disable-broken-st was given. @@ -9661,13 +9909,13 @@ else enable_broken_st=no fi; -echo "$as_me:9664: result: $enable_broken_st" >&5 +echo "$as_me:9912: result: $enable_broken_st" >&5 echo "${ECHO_T}$enable_broken_st" >&6 test "$enable_broken_st" = no && cat >>confdefs.h <<\EOF #define OPT_BROKEN_ST 0 EOF -echo "$as_me:9670: checking if you want printable 128-159" >&5 +echo "$as_me:9918: checking if you want printable 128-159" >&5 echo $ECHO_N "checking if you want printable 128-159... $ECHO_C" >&6 # Check whether --enable-c1-print or --disable-c1-print was given. @@ -9684,7 +9932,7 @@ else enable_c1_print=yes fi; -echo "$as_me:9687: result: $enable_c1_print" >&5 +echo "$as_me:9935: result: $enable_c1_print" >&5 echo "${ECHO_T}$enable_c1_print" >&6 test "$enable_c1_print" = no && cat >>confdefs.h <<\EOF #define OPT_C1_PRINT 0 @@ -9692,7 +9940,7 @@ EOF if test "$enable_ansi_color" = yes ; then - echo "$as_me:9695: checking if you want bold colors mapped like IBM PC" >&5 + echo "$as_me:9943: checking if you want bold colors mapped like IBM PC" >&5 echo $ECHO_N "checking if you want bold colors mapped like IBM PC... $ECHO_C" >&6 # Check whether --enable-bold-color or --disable-bold-color was given. @@ -9709,13 +9957,13 @@ else enable_pc_color=yes fi; - echo "$as_me:9712: result: $enable_pc_color" >&5 + echo "$as_me:9960: result: $enable_pc_color" >&5 echo "${ECHO_T}$enable_pc_color" >&6 test "$enable_pc_color" = no && cat >>confdefs.h <<\EOF #define OPT_PC_COLORS 0 EOF - echo "$as_me:9718: checking if you want separate color-classes" >&5 + echo "$as_me:9966: checking if you want separate color-classes" >&5 echo $ECHO_N "checking if you want separate color-classes... $ECHO_C" >&6 # Check whether --enable-color-class or --disable-color-class was given. @@ -9732,13 +9980,13 @@ else enable_color_class=yes fi; - echo "$as_me:9735: result: $enable_color_class" >&5 + echo "$as_me:9983: result: $enable_color_class" >&5 echo "${ECHO_T}$enable_color_class" >&6 test "$enable_color_class" = no && cat >>confdefs.h <<\EOF #define OPT_COLOR_CLASS FALSE EOF - echo "$as_me:9741: checking if you want color-mode enabled by default" >&5 + echo "$as_me:9989: checking if you want color-mode enabled by default" >&5 echo $ECHO_N "checking if you want color-mode enabled by default... $ECHO_C" >&6 # Check whether --enable-color-mode or --disable-color-mode was given. @@ -9755,7 +10003,7 @@ else default_colormode=yes fi; - echo "$as_me:9758: result: $default_colormode" >&5 + echo "$as_me:10006: result: $default_colormode" >&5 echo "${ECHO_T}$default_colormode" >&6 test "$default_colormode" = no && cat >>confdefs.h <<\EOF #define DFT_COLORMODE FALSE @@ -9763,7 +10011,7 @@ EOF fi -echo "$as_me:9766: checking if you want support for color highlighting" >&5 +echo "$as_me:10014: checking if you want support for color highlighting" >&5 echo $ECHO_N "checking if you want support for color highlighting... $ECHO_C" >&6 # Check whether --enable-highlighting or --disable-highlighting was given. @@ -9780,13 +10028,13 @@ else default_highlight=yes fi; -echo "$as_me:9783: result: $default_highlight" >&5 +echo "$as_me:10031: result: $default_highlight" >&5 echo "${ECHO_T}$default_highlight" >&6 test "$default_highlight" = no && cat >>confdefs.h <<\EOF #define OPT_HIGHLIGHT_COLOR 0 EOF -echo "$as_me:9789: checking if you want support for doublesize characters" >&5 +echo "$as_me:10037: checking if you want support for doublesize characters" >&5 echo $ECHO_N "checking if you want support for doublesize characters... $ECHO_C" >&6 # Check whether --enable-doublechars or --disable-doublechars was given. @@ -9803,13 +10051,13 @@ else enable_doublechars=yes fi; -echo "$as_me:9806: result: $enable_doublechars" >&5 +echo "$as_me:10054: result: $enable_doublechars" >&5 echo "${ECHO_T}$enable_doublechars" >&6 test "$enable_doublechars" = no && cat >>confdefs.h <<\EOF #define OPT_DEC_CHRSET 0 EOF -echo "$as_me:9812: checking if you want fallback-support for box characters" >&5 +echo "$as_me:10060: checking if you want fallback-support for box characters" >&5 echo $ECHO_N "checking if you want fallback-support for box characters... $ECHO_C" >&6 # Check whether --enable-boxchars or --disable-boxchars was given. @@ -9826,13 +10074,71 @@ else enable_boxchars=yes fi; -echo "$as_me:9829: result: $enable_boxchars" >&5 +echo "$as_me:10077: result: $enable_boxchars" >&5 echo "${ECHO_T}$enable_boxchars" >&6 test "$enable_boxchars" = no && cat >>confdefs.h <<\EOF #define OPT_BOX_CHARS 0 EOF -echo "$as_me:9835: checking if you want to use FreeType library" >&5 +echo "$as_me:10083: checking if you want to allow spawning new xterms" >&5 +echo $ECHO_N "checking if you want to allow spawning new xterms... $ECHO_C" >&6 + +# Check whether --enable-exec-xterm or --disable-exec-xterm was given. +if test "${enable_exec_xterm+set}" = set; then + enableval="$enable_exec_xterm" + test "$enableval" != yes && enableval=no + if test "$enableval" != "no" ; then + enable_exec_xterm=yes + else + enable_exec_xterm=no + fi +else + enableval=no + enable_exec_xterm=no + +fi; +echo "$as_me:10100: result: $enable_exec_xterm" >&5 +echo "${ECHO_T}$enable_exec_xterm" >&6 +if test "$enable_exec_xterm" = yes ; then + +echo "$as_me:10104: checking for proc tree with cwd-support" >&5 +echo $ECHO_N "checking for proc tree with cwd-support... $ECHO_C" >&6 +if test "${cf_cv_procfs_cwd+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + +cf_cv_procfs_cwd=no +for cf_path in /proc /compat/linux/proc /usr/compat/linux/proc +do + if test -d $cf_path && \ + test -d $cf_path/$$ && \ + ( test -d $cf_path/$$/cwd || \ + test -L $cf_path/$$/cwd ); then + cf_cv_procfs_cwd=$cf_path + break + fi +done + +fi +echo "$as_me:10123: result: $cf_cv_procfs_cwd" >&5 +echo "${ECHO_T}$cf_cv_procfs_cwd" >&6 + + if test "$cf_cv_procfs_cwd" = no ; then + { echo "$as_me:10127: WARNING: no suitable proc filesystem found" >&5 +echo "$as_me: WARNING: no suitable proc filesystem found" >&2;} + else + cat >>confdefs.h <<EOF +#define PROCFS_ROOT "$cf_cv_procfs_cwd" +EOF + + cat >>confdefs.h <<\EOF +#define OPT_EXEC_XTERM 1 +EOF + + fi +fi + +echo "$as_me:10141: checking if you want to use FreeType library" >&5 echo $ECHO_N "checking if you want to use FreeType library... $ECHO_C" >&6 # Check whether --enable-freetype or --disable-freetype was given. @@ -9849,7 +10155,7 @@ else enable_freetype=yes fi; -echo "$as_me:9852: result: $enable_freetype" >&5 +echo "$as_me:10158: result: $enable_freetype" >&5 echo "${ECHO_T}$enable_freetype" >&6 if test "$enable_freetype" = yes ; then @@ -9857,9 +10163,35 @@ cf_extra_freetype_libs= FREETYPE_CONFIG= FREETYPE_PARAMS= +echo "$as_me:10166: checking if you specified -D/-I options for FreeType" >&5 +echo $ECHO_N "checking if you specified -D/-I options for FreeType... $ECHO_C" >&6 + +# Check whether --with-freetype-cflags or --without-freetype-cflags was given. +if test "${with_freetype_cflags+set}" = set; then + withval="$with_freetype_cflags" + cf_cv_x_freetype_incs="$with_freetype_cflags" +else + cf_cv_x_freetype_incs=no +fi; +echo "$as_me:10176: result: $cf_cv_x_freetype_incs" >&5 +echo "${ECHO_T}$cf_cv_x_freetype_incs" >&6 + +echo "$as_me:10179: checking if you specified -L/-l options for FreeType" >&5 +echo $ECHO_N "checking if you specified -L/-l options for FreeType... $ECHO_C" >&6 + +# Check whether --with-freetype-libs or --without-freetype-libs was given. +if test "${with_freetype_libs+set}" = set; then + withval="$with_freetype_libs" + cf_cv_x_freetype_libs="$with_freetype_libs" +else + cf_cv_x_freetype_libs=no +fi; +echo "$as_me:10189: result: $cf_cv_x_freetype_libs" >&5 +echo "${ECHO_T}$cf_cv_x_freetype_libs" >&6 + # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 -echo "$as_me:9862: checking for $ac_word" >&5 +echo "$as_me:10194: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_FREETYPE_PKG_CONFIG+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -9876,7 +10208,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if $as_executable_p "$ac_dir/$ac_word"; then ac_cv_path_FREETYPE_PKG_CONFIG="$ac_dir/$ac_word" - echo "$as_me:9879: found $ac_dir/$ac_word" >&5 + echo "$as_me:10211: found $ac_dir/$ac_word" >&5 break fi done @@ -9888,10 +10220,10 @@ fi FREETYPE_PKG_CONFIG=$ac_cv_path_FREETYPE_PKG_CONFIG if test -n "$FREETYPE_PKG_CONFIG"; then - echo "$as_me:9891: result: $FREETYPE_PKG_CONFIG" >&5 + echo "$as_me:10223: result: $FREETYPE_PKG_CONFIG" >&5 echo "${ECHO_T}$FREETYPE_PKG_CONFIG" >&6 else - echo "$as_me:9894: result: no" >&5 + echo "$as_me:10226: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -9901,7 +10233,7 @@ if test "$FREETYPE_PKG_CONFIG" != none && "$FREETYPE_PKG_CONFIG" --exists xft; t else # Extract the first word of "xft-config", so it can be a program name with args. set dummy xft-config; ac_word=$2 -echo "$as_me:9904: checking for $ac_word" >&5 +echo "$as_me:10236: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_FREETYPE_XFT_CONFIG+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -9918,7 +10250,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if $as_executable_p "$ac_dir/$ac_word"; then ac_cv_path_FREETYPE_XFT_CONFIG="$ac_dir/$ac_word" - echo "$as_me:9921: found $ac_dir/$ac_word" >&5 + echo "$as_me:10253: found $ac_dir/$ac_word" >&5 break fi done @@ -9930,10 +10262,10 @@ fi FREETYPE_XFT_CONFIG=$ac_cv_path_FREETYPE_XFT_CONFIG if test -n "$FREETYPE_XFT_CONFIG"; then - echo "$as_me:9933: result: $FREETYPE_XFT_CONFIG" >&5 + echo "$as_me:10265: result: $FREETYPE_XFT_CONFIG" >&5 echo "${ECHO_T}$FREETYPE_XFT_CONFIG" >&6 else - echo "$as_me:9936: result: no" >&5 + echo "$as_me:10268: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -9943,7 +10275,7 @@ fi cf_extra_freetype_libs="-lXft" # Extract the first word of "freetype-config", so it can be a program name with args. set dummy freetype-config; ac_word=$2 -echo "$as_me:9946: checking for $ac_word" >&5 +echo "$as_me:10278: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_FREETYPE_OLD_CONFIG+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -9960,7 +10292,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if $as_executable_p "$ac_dir/$ac_word"; then ac_cv_path_FREETYPE_OLD_CONFIG="$ac_dir/$ac_word" - echo "$as_me:9963: found $ac_dir/$ac_word" >&5 + echo "$as_me:10295: found $ac_dir/$ac_word" >&5 break fi done @@ -9972,10 +10304,10 @@ fi FREETYPE_OLD_CONFIG=$ac_cv_path_FREETYPE_OLD_CONFIG if test -n "$FREETYPE_OLD_CONFIG"; then - echo "$as_me:9975: result: $FREETYPE_OLD_CONFIG" >&5 + echo "$as_me:10307: result: $FREETYPE_OLD_CONFIG" >&5 echo "${ECHO_T}$FREETYPE_OLD_CONFIG" >&6 else - echo "$as_me:9978: result: no" >&5 + echo "$as_me:10310: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -9986,54 +10318,44 @@ fi fi if test -n "$FREETYPE_CONFIG" ; then -withval= -# Check whether --with-freetype-cflags or --without-freetype-cflags was given. -if test "${with_freetype_cflags+set}" = set; then - withval="$with_freetype_cflags" - cf_cv_x_freetype_incs="$withval" - test -n "$verbose" && echo " freetype-cflags $cf_cv_x_freetype_incs" 1>&6 - -else - -echo "$as_me:9999: checking for X FreeType headers" >&5 -echo $ECHO_N "checking for X FreeType headers... $ECHO_C" >&6 -if test "${cf_cv_x_freetype_incs+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else +if test "$cf_cv_x_freetype_incs" = no ; then +echo "$as_me:10323: checking for $FREETYPE_CONFIG cflags" >&5 +echo $ECHO_N "checking for $FREETYPE_CONFIG cflags... $ECHO_C" >&6 +cf_cv_x_freetype_incs="`$FREETYPE_CONFIG $FREETYPE_PARAMS --cflags 2>/dev/null`" +echo "$as_me:10326: result: $cf_cv_x_freetype_incs" >&5 +echo "${ECHO_T}$cf_cv_x_freetype_incs" >&6 +fi - cf_cv_x_freetype_incs="`$FREETYPE_CONFIG $FREETYPE_PARAMS --cflags 2>/dev/null`" +if test "$cf_cv_x_freetype_libs" = no ; then +echo "$as_me:10331: checking for $FREETYPE_CONFIG libs" >&5 +echo $ECHO_N "checking for $FREETYPE_CONFIG libs... $ECHO_C" >&6 +cf_cv_x_freetype_libs="$cf_extra_freetype_libs `$FREETYPE_CONFIG $FREETYPE_PARAMS --libs 2>/dev/null`" +echo "$as_me:10334: result: $cf_cv_x_freetype_libs" >&5 +echo "${ECHO_T}$cf_cv_x_freetype_libs" >&6 +fi fi -echo "$as_me:10008: result: $cf_cv_x_freetype_incs" >&5 -echo "${ECHO_T}$cf_cv_x_freetype_incs" >&6 -fi; -withval= -# Check whether --with-freetype-libs or --without-freetype-libs was given. -if test "${with_freetype_libs+set}" = set; then - withval="$with_freetype_libs" - cf_cv_x_freetype_libs="$withval" - test -n "$verbose" && echo " freetype-libs $cf_cv_x_freetype_libs" 1>&6 +if test "$cf_cv_x_freetype_incs" = no ; then + cf_cv_x_freetype_incs= +fi -else +if test "$cf_cv_x_freetype_libs" = no ; then + cf_cv_x_freetype_libs=-lXft +fi -echo "$as_me:10021: checking for X FreeType libraries" >&5 -echo $ECHO_N "checking for X FreeType libraries... $ECHO_C" >&6 -if test "${cf_cv_x_freetype_libs+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else +echo "$as_me:10348: checking if we can link with FreeType libraries" >&5 +echo $ECHO_N "checking if we can link with FreeType libraries... $ECHO_C" >&6 cf_save_LIBS="$LIBS" cf_save_INCS="$CPPFLAGS" -cf_cv_x_freetype_libs="$cf_extra_freetype_libs `$FREETYPE_CONFIG $FREETYPE_PARAMS --libs 2>/dev/null`" - LIBS="$cf_cv_x_freetype_libs $LIBS" CPPFLAGS="$cf_cv_x_freetype_incs $CPPFLAGS" cat >conftest.$ac_ext <<_ACEOF -#line 10036 "configure" +#line 10358 "configure" #include "confdefs.h" #include <X11/Xlib.h> @@ -10044,39 +10366,36 @@ main () { XftPattern *pat = XftNameParse ("name"); - ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:10053: \"$ac_link\"") >&5 +if { (eval echo "$as_me:10374: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:10056: \$? = $ac_status" >&5 + echo "$as_me:10377: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:10059: \"$ac_try\"") >&5 + { (eval echo "$as_me:10380: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:10062: \$? = $ac_status" >&5 + echo "$as_me:10383: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - : + cf_cv_found_freetype=yes else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 -cf_cv_x_freetype_libs= +cf_cv_found_freetype=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - LIBS="$cf_save_LIBS" - CPPFLAGS="$cf_save_INCS" +echo "$as_me:10392: result: $cf_cv_found_freetype" >&5 +echo "${ECHO_T}$cf_cv_found_freetype" >&6 -fi -echo "$as_me:10075: result: $cf_cv_x_freetype_libs" >&5 -echo "${ECHO_T}$cf_cv_x_freetype_libs" >&6 -fi; +LIBS="$cf_save_LIBS" +CPPFLAGS="$cf_save_INCS" -if test -n "$cf_cv_x_freetype_libs" ; then +if test "$cf_cv_found_freetype" = yes ; then LIBS="$cf_cv_x_freetype_libs $LIBS" cf_fix_cppflags=no @@ -10151,15 +10470,82 @@ fi #define XRENDERFONT 1 EOF +for ac_func in \ + XftDrawCharSpec \ + XftDrawSetClip \ + XftDrawSetClipRectangles \ + +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:10480: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - { echo "$as_me:10155: WARNING: No libraries found for FreeType" >&5 -echo "$as_me: WARNING: No libraries found for FreeType" >&2;} - CPPFLAGS=`echo "$CPPFLAGS" | sed -e s/-DXRENDERFONT//` + cat >conftest.$ac_ext <<_ACEOF +#line 10486 "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. */ +#include <assert.h> +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); +char (*f) (); + +int +main () +{ +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +f = $ac_func; +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:10517: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:10520: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:10523: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:10526: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +eval "$as_ac_var=no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:10536: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<EOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +EOF + fi +done else - { echo "$as_me:10161: WARNING: Cannot find FreeType configuration program" >&5 -echo "$as_me: WARNING: Cannot find FreeType configuration program" >&2;} + { echo "$as_me:10547: WARNING: No libraries found for FreeType" >&5 +echo "$as_me: WARNING: No libraries found for FreeType" >&2;} CPPFLAGS=`echo "$CPPFLAGS" | sed -e s/-DXRENDERFONT//` fi @@ -10169,7 +10555,7 @@ else CPPFLAGS=`echo "$CPPFLAGS" | sed -e s/-DXRENDERFONT//` fi -echo "$as_me:10172: checking if you want support for HP-style function keys" >&5 +echo "$as_me:10558: checking if you want support for HP-style function keys" >&5 echo $ECHO_N "checking if you want support for HP-style function keys... $ECHO_C" >&6 # Check whether --enable-hp-fkeys or --disable-hp-fkeys was given. @@ -10186,7 +10572,7 @@ else enable_hp_fkeys=no fi; -echo "$as_me:10189: result: $enable_hp_fkeys" >&5 +echo "$as_me:10575: result: $enable_hp_fkeys" >&5 echo "${ECHO_T}$enable_hp_fkeys" >&6 if test "$enable_hp_fkeys" = yes ; then cat >>confdefs.h <<\EOF @@ -10195,7 +10581,7 @@ EOF fi -echo "$as_me:10198: checking if you want support for SCO-style function keys" >&5 +echo "$as_me:10584: checking if you want support for SCO-style function keys" >&5 echo $ECHO_N "checking if you want support for SCO-style function keys... $ECHO_C" >&6 # Check whether --enable-sco-fkeys or --disable-sco-fkeys was given. @@ -10212,7 +10598,7 @@ else enable_sco_fkeys=no fi; -echo "$as_me:10215: result: $enable_sco_fkeys" >&5 +echo "$as_me:10601: result: $enable_sco_fkeys" >&5 echo "${ECHO_T}$enable_sco_fkeys" >&6 if test "$enable_sco_fkeys" = yes ; then cat >>confdefs.h <<\EOF @@ -10221,7 +10607,7 @@ EOF fi -echo "$as_me:10224: checking if you want support for Sun-style function keys" >&5 +echo "$as_me:10610: checking if you want support for Sun-style function keys" >&5 echo $ECHO_N "checking if you want support for Sun-style function keys... $ECHO_C" >&6 # Check whether --enable-sun-fkeys or --disable-sun-fkeys was given. @@ -10238,7 +10624,7 @@ else enable_sun_fkeys=yes fi; -echo "$as_me:10241: result: $enable_sun_fkeys" >&5 +echo "$as_me:10627: result: $enable_sun_fkeys" >&5 echo "${ECHO_T}$enable_sun_fkeys" >&6 if test "$enable_sun_fkeys" = no ; then cat >>confdefs.h <<\EOF @@ -10247,7 +10633,7 @@ EOF fi -echo "$as_me:10250: checking if you want support for internationalization" >&5 +echo "$as_me:10636: checking if you want support for internationalization" >&5 echo $ECHO_N "checking if you want support for internationalization... $ECHO_C" >&6 # Check whether --enable-i18n or --disable-i18n was given. @@ -10264,7 +10650,7 @@ else enable_i18n=yes fi; -echo "$as_me:10267: result: $enable_i18n" >&5 +echo "$as_me:10653: result: $enable_i18n" >&5 echo "${ECHO_T}$enable_i18n" >&6 if test "$enable_i18n" = no ; then cat >>confdefs.h <<\EOF @@ -10273,7 +10659,7 @@ EOF fi -echo "$as_me:10276: checking if you want support for initial-erase setup" >&5 +echo "$as_me:10662: checking if you want support for initial-erase setup" >&5 echo $ECHO_N "checking if you want support for initial-erase setup... $ECHO_C" >&6 # Check whether --enable-initial-erase or --disable-initial-erase was given. @@ -10290,7 +10676,7 @@ else enable_ie=yes fi; -echo "$as_me:10293: result: $enable_ie" >&5 +echo "$as_me:10679: result: $enable_ie" >&5 echo "${ECHO_T}$enable_ie" >&6 if test "$enable_ie" = no ; then cat >>confdefs.h <<\EOF @@ -10299,7 +10685,7 @@ EOF fi -echo "$as_me:10302: checking if you want support for input-method" >&5 +echo "$as_me:10688: checking if you want support for input-method" >&5 echo $ECHO_N "checking if you want support for input-method... $ECHO_C" >&6 # Check whether --enable-input-method or --disable-input-method was given. @@ -10316,17 +10702,17 @@ else enable_ximp=yes fi; -echo "$as_me:10319: result: $enable_ximp" >&5 +echo "$as_me:10705: result: $enable_ximp" >&5 echo "${ECHO_T}$enable_ximp" >&6 -echo "$as_me:10322: checking if X libraries support input-method" >&5 +echo "$as_me:10708: checking if X libraries support input-method" >&5 echo $ECHO_N "checking if X libraries support input-method... $ECHO_C" >&6 if test "${cf_cv_input_method+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 10329 "configure" +#line 10715 "configure" #include "confdefs.h" #include <X11/IntrinsicP.h> @@ -10358,16 +10744,16 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:10361: \"$ac_link\"") >&5 +if { (eval echo "$as_me:10747: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:10364: \$? = $ac_status" >&5 + echo "$as_me:10750: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:10367: \"$ac_try\"") >&5 + { (eval echo "$as_me:10753: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:10370: \$? = $ac_status" >&5 + echo "$as_me:10756: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_input_method=yes else @@ -10377,7 +10763,7 @@ cf_cv_input_method=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:10380: result: $cf_cv_input_method" >&5 +echo "$as_me:10766: result: $cf_cv_input_method" >&5 echo "${ECHO_T}$cf_cv_input_method" >&6 test "$cf_cv_input_method" = no && enable_ximp=no @@ -10388,7 +10774,7 @@ EOF fi -echo "$as_me:10391: checking if you want support for load-vt-fonts" >&5 +echo "$as_me:10777: checking if you want support for load-vt-fonts" >&5 echo $ECHO_N "checking if you want support for load-vt-fonts... $ECHO_C" >&6 # Check whether --enable-load-vt-fonts or --disable-load-vt-fonts was given. @@ -10405,7 +10791,7 @@ else enable_load_vt_fonts=no fi; -echo "$as_me:10408: result: $enable_load_vt_fonts" >&5 +echo "$as_me:10794: result: $enable_load_vt_fonts" >&5 echo "${ECHO_T}$enable_load_vt_fonts" >&6 if test "$enable_load_vt_fonts" = yes ; then cat >>confdefs.h <<\EOF @@ -10414,7 +10800,7 @@ EOF fi -echo "$as_me:10417: checking if you want support for logging" >&5 +echo "$as_me:10803: checking if you want support for logging" >&5 echo $ECHO_N "checking if you want support for logging... $ECHO_C" >&6 # Check whether --enable-logging or --disable-logging was given. @@ -10431,14 +10817,14 @@ else enable_logging=no fi; -echo "$as_me:10434: result: $enable_logging" >&5 +echo "$as_me:10820: result: $enable_logging" >&5 echo "${ECHO_T}$enable_logging" >&6 if test "$enable_logging" = yes ; then cat >>confdefs.h <<\EOF #define ALLOWLOGGING 1 EOF - echo "$as_me:10441: checking if you want to allow logging via a pipe" >&5 + echo "$as_me:10827: checking if you want to allow logging via a pipe" >&5 echo $ECHO_N "checking if you want to allow logging via a pipe... $ECHO_C" >&6 # Check whether --enable-logfile-exec or --disable-logfile-exec was given. @@ -10455,7 +10841,7 @@ else enable_log_exec=no fi; - echo "$as_me:10458: result: $enable_log_exec" >&5 + echo "$as_me:10844: result: $enable_log_exec" >&5 echo "${ECHO_T}$enable_log_exec" >&6 if test "$enable_log_exec" = yes ; then cat >>confdefs.h <<\EOF @@ -10465,7 +10851,7 @@ EOF fi fi -echo "$as_me:10468: checking if you want support for iconify/maximize translations" >&5 +echo "$as_me:10854: checking if you want support for iconify/maximize translations" >&5 echo $ECHO_N "checking if you want support for iconify/maximize translations... $ECHO_C" >&6 # Check whether --enable-maximize or --disable-maximize was given. @@ -10482,13 +10868,13 @@ else enable_maximize=yes fi; -echo "$as_me:10485: result: $enable_maximize" >&5 +echo "$as_me:10871: result: $enable_maximize" >&5 echo "${ECHO_T}$enable_maximize" >&6 test "$enable_maximize" = no && cat >>confdefs.h <<\EOF #define OPT_MAXIMIZE 0 EOF -echo "$as_me:10491: checking if you want NumLock to override keyboard tables" >&5 +echo "$as_me:10877: checking if you want NumLock to override keyboard tables" >&5 echo $ECHO_N "checking if you want NumLock to override keyboard tables... $ECHO_C" >&6 # Check whether --enable-num-lock or --disable-num-lock was given. @@ -10505,13 +10891,13 @@ else enable_numlock=yes fi; -echo "$as_me:10508: result: $enable_numlock" >&5 +echo "$as_me:10894: result: $enable_numlock" >&5 echo "${ECHO_T}$enable_numlock" >&6 test "$enable_numlock" = no && cat >>confdefs.h <<\EOF #define OPT_NUM_LOCK 0 EOF -echo "$as_me:10514: checking if you want support for get/set of base64 selection data" >&5 +echo "$as_me:10900: checking if you want support for get/set of base64 selection data" >&5 echo $ECHO_N "checking if you want support for get/set of base64 selection data... $ECHO_C" >&6 # Check whether --enable-paste64 or --disable-paste64 was given. @@ -10528,7 +10914,7 @@ else enable_paste64=no fi; -echo "$as_me:10531: result: $enable_paste64" >&5 +echo "$as_me:10917: result: $enable_paste64" >&5 echo "${ECHO_T}$enable_paste64" >&6 if test "$enable_paste64" = yes ; then cat >>confdefs.h <<\EOF @@ -10542,7 +10928,7 @@ EOF fi -echo "$as_me:10545: checking if you want support for pty-handshaking" >&5 +echo "$as_me:10931: checking if you want support for pty-handshaking" >&5 echo $ECHO_N "checking if you want support for pty-handshaking... $ECHO_C" >&6 # Check whether --enable-pty-handshake or --disable-pty-handshake was given. @@ -10559,7 +10945,7 @@ else enable_pty_handshake=yes fi; -echo "$as_me:10562: result: $enable_pty_handshake" >&5 +echo "$as_me:10948: result: $enable_pty_handshake" >&5 echo "${ECHO_T}$enable_pty_handshake" >&6 if test "$enable_pty_handshake" = yes ; then cat >>confdefs.h <<\EOF @@ -10573,7 +10959,7 @@ EOF fi -echo "$as_me:10576: checking if you want support for mouse in readline applications" >&5 +echo "$as_me:10962: checking if you want support for mouse in readline applications" >&5 echo $ECHO_N "checking if you want support for mouse in readline applications... $ECHO_C" >&6 # Check whether --enable-readline-mouse or --disable-readline-mouse was given. @@ -10590,7 +10976,7 @@ else enable_readline_mouse=no fi; -echo "$as_me:10593: result: $enable_readline_mouse" >&5 +echo "$as_me:10979: result: $enable_readline_mouse" >&5 echo "${ECHO_T}$enable_readline_mouse" >&6 if test "$enable_readline_mouse" = yes ; then cat >>confdefs.h <<\EOF @@ -10599,7 +10985,7 @@ EOF fi -echo "$as_me:10602: checking if you want support for regular-expression selections" >&5 +echo "$as_me:10988: checking if you want support for regular-expression selections" >&5 echo $ECHO_N "checking if you want support for regular-expression selections... $ECHO_C" >&6 # Check whether --enable-regex or --disable-regex was given. @@ -10616,11 +11002,11 @@ else enable_regex=yes fi; -echo "$as_me:10619: result: $enable_regex" >&5 +echo "$as_me:11005: result: $enable_regex" >&5 echo "${ECHO_T}$enable_regex" >&6 if test "$enable_regex" = yes ; then -echo "$as_me:10623: checking if you want to use PCRE for regular-expressions" >&5 +echo "$as_me:11009: checking if you want to use PCRE for regular-expressions" >&5 echo $ECHO_N "checking if you want to use PCRE for regular-expressions... $ECHO_C" >&6 # Check whether --with-pcre or --without-pcre was given. @@ -10629,11 +11015,11 @@ if test "${with_pcre+set}" = set; then fi; test -z "$with_pcre" && with_pcre=no -echo "$as_me:10632: result: $with_pcre" >&5 +echo "$as_me:11018: result: $with_pcre" >&5 echo "${ECHO_T}$with_pcre" >&6 if test "$with_pcre" != no ; then - echo "$as_me:10636: checking for pcre_compile in -lpcre" >&5 + echo "$as_me:11022: checking for pcre_compile in -lpcre" >&5 echo $ECHO_N "checking for pcre_compile in -lpcre... $ECHO_C" >&6 if test "${ac_cv_lib_pcre_pcre_compile+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -10641,7 +11027,7 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-lpcre $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line 10644 "configure" +#line 11030 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -10660,16 +11046,16 @@ pcre_compile (); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:10663: \"$ac_link\"") >&5 +if { (eval echo "$as_me:11049: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:10666: \$? = $ac_status" >&5 + echo "$as_me:11052: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:10669: \"$ac_try\"") >&5 + { (eval echo "$as_me:11055: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:10672: \$? = $ac_status" >&5 + echo "$as_me:11058: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_pcre_pcre_compile=yes else @@ -10680,26 +11066,26 @@ fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:10683: result: $ac_cv_lib_pcre_pcre_compile" >&5 +echo "$as_me:11069: result: $ac_cv_lib_pcre_pcre_compile" >&5 echo "${ECHO_T}$ac_cv_lib_pcre_pcre_compile" >&6 if test $ac_cv_lib_pcre_pcre_compile = yes; then - echo "$as_me:10686: checking for pcreposix.h" >&5 + echo "$as_me:11072: checking for pcreposix.h" >&5 echo $ECHO_N "checking for pcreposix.h... $ECHO_C" >&6 if test "${ac_cv_header_pcreposix_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 10692 "configure" +#line 11078 "configure" #include "confdefs.h" #include <pcreposix.h> _ACEOF -if { (eval echo "$as_me:10696: \"$ac_cpp conftest.$ac_ext\"") >&5 +if { (eval echo "$as_me:11082: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? egrep -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:10702: \$? = $ac_status" >&5 + echo "$as_me:11088: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag @@ -10718,10 +11104,10 @@ else fi rm -f conftest.err conftest.$ac_ext fi -echo "$as_me:10721: result: $ac_cv_header_pcreposix_h" >&5 +echo "$as_me:11107: result: $ac_cv_header_pcreposix_h" >&5 echo "${ECHO_T}$ac_cv_header_pcreposix_h" >&6 if test $ac_cv_header_pcreposix_h = yes; then - echo "$as_me:10724: checking for pcreposix_regcomp in -lpcreposix" >&5 + echo "$as_me:11110: checking for pcreposix_regcomp in -lpcreposix" >&5 echo $ECHO_N "checking for pcreposix_regcomp in -lpcreposix... $ECHO_C" >&6 if test "${ac_cv_lib_pcreposix_pcreposix_regcomp+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -10729,7 +11115,7 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-lpcreposix "-lpcre" $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line 10732 "configure" +#line 11118 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -10748,16 +11134,16 @@ pcreposix_regcomp (); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:10751: \"$ac_link\"") >&5 +if { (eval echo "$as_me:11137: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:10754: \$? = $ac_status" >&5 + echo "$as_me:11140: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:10757: \"$ac_try\"") >&5 + { (eval echo "$as_me:11143: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:10760: \$? = $ac_status" >&5 + echo "$as_me:11146: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_pcreposix_pcreposix_regcomp=yes else @@ -10768,7 +11154,7 @@ fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:10771: result: $ac_cv_lib_pcreposix_pcreposix_regcomp" >&5 +echo "$as_me:11157: result: $ac_cv_lib_pcreposix_pcreposix_regcomp" >&5 echo "${ECHO_T}$ac_cv_lib_pcreposix_pcreposix_regcomp" >&6 if test $ac_cv_lib_pcreposix_pcreposix_regcomp = yes; then cat >>confdefs.h <<\EOF @@ -10781,19 +11167,19 @@ EOF LIBS="-lpcreposix -lpcre $LIBS" else - { { echo "$as_me:10784: error: Cannot find PCRE POSIX library" >&5 + { { echo "$as_me:11170: error: Cannot find PCRE POSIX library" >&5 echo "$as_me: error: Cannot find PCRE POSIX library" >&2;} { (exit 1); exit 1; }; } fi else - { { echo "$as_me:10790: error: Cannot find PCRE POSIX header" >&5 + { { echo "$as_me:11176: error: Cannot find PCRE POSIX header" >&5 echo "$as_me: error: Cannot find PCRE POSIX header" >&2;} { (exit 1); exit 1; }; } fi else - { { echo "$as_me:10796: error: Cannot find PCRE library" >&5 + { { echo "$as_me:11182: error: Cannot find PCRE library" >&5 echo "$as_me: error: Cannot find PCRE library" >&2;} { (exit 1); exit 1; }; } fi @@ -10802,14 +11188,14 @@ fi if test "$with_pcre" = no ; then -echo "$as_me:10805: checking for regular-expression headers" >&5 +echo "$as_me:11191: checking for regular-expression headers" >&5 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6 if test "${cf_cv_regex+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 10812 "configure" +#line 11198 "configure" #include "confdefs.h" #include <sys/types.h> #include <regex.h> @@ -10827,16 +11213,16 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:10830: \"$ac_link\"") >&5 +if { (eval echo "$as_me:11216: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:10833: \$? = $ac_status" >&5 + echo "$as_me:11219: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:10836: \"$ac_try\"") >&5 + { (eval echo "$as_me:11222: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:10839: \$? = $ac_status" >&5 + echo "$as_me:11225: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_regex="regex.h" else @@ -10844,7 +11230,7 @@ else cat conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF -#line 10847 "configure" +#line 11233 "configure" #include "confdefs.h" #include <regexp.h> int @@ -10859,16 +11245,16 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:10862: \"$ac_link\"") >&5 +if { (eval echo "$as_me:11248: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:10865: \$? = $ac_status" >&5 + echo "$as_me:11251: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:10868: \"$ac_try\"") >&5 + { (eval echo "$as_me:11254: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:10871: \$? = $ac_status" >&5 + echo "$as_me:11257: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_regex="regexp.h" else @@ -10878,7 +11264,7 @@ cat conftest.$ac_ext >&5 cf_save_LIBS="$LIBS" LIBS="-lgen $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line 10881 "configure" +#line 11267 "configure" #include "confdefs.h" #include <regexpr.h> int @@ -10893,16 +11279,16 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:10896: \"$ac_link\"") >&5 +if { (eval echo "$as_me:11282: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:10899: \$? = $ac_status" >&5 + echo "$as_me:11285: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:10902: \"$ac_try\"") >&5 + { (eval echo "$as_me:11288: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:10905: \$? = $ac_status" >&5 + echo "$as_me:11291: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_regex="regexpr.h" else @@ -10918,7 +11304,7 @@ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:10921: result: $cf_cv_regex" >&5 +echo "$as_me:11307: result: $cf_cv_regex" >&5 echo "${ECHO_T}$cf_cv_regex" >&6 case $cf_cv_regex in regex.h) cat >>confdefs.h <<\EOF @@ -10936,7 +11322,7 @@ EOF esac if test "X$cf_cv_regex" != "Xregex.h" ; then - { { echo "$as_me:10939: error: Only POSIX or PCRE regular expressions are supported" >&5 + { { echo "$as_me:11325: error: Only POSIX or PCRE regular expressions are supported" >&5 echo "$as_me: error: Only POSIX or PCRE regular expressions are supported" >&2;} { (exit 1); exit 1; }; } fi @@ -10947,7 +11333,7 @@ EOF fi -echo "$as_me:10950: checking if you want support for right-scrollbar" >&5 +echo "$as_me:11336: checking if you want support for right-scrollbar" >&5 echo $ECHO_N "checking if you want support for right-scrollbar... $ECHO_C" >&6 # Check whether --enable-rightbar or --disable-rightbar was given. @@ -10964,7 +11350,7 @@ else enable_rightbar=yes fi; -echo "$as_me:10967: result: $enable_rightbar" >&5 +echo "$as_me:11353: result: $enable_rightbar" >&5 echo "${ECHO_T}$enable_rightbar" >&6 if test "$enable_rightbar" = yes ; then cat >>confdefs.h <<\EOF @@ -10973,7 +11359,7 @@ EOF fi -echo "$as_me:10976: checking if you want check for redundant name-change" >&5 +echo "$as_me:11362: checking if you want check for redundant name-change" >&5 echo $ECHO_N "checking if you want check for redundant name-change... $ECHO_C" >&6 # Check whether --enable-samename or --disable-samename was given. @@ -10990,13 +11376,13 @@ else enable_samename=yes fi; -echo "$as_me:10993: result: $enable_samename" >&5 +echo "$as_me:11379: result: $enable_samename" >&5 echo "${ECHO_T}$enable_samename" >&6 test "$enable_samename" = no && cat >>confdefs.h <<\EOF #define OPT_SAME_NAME 0 EOF -echo "$as_me:10999: checking if you want support for session management" >&5 +echo "$as_me:11385: checking if you want support for session management" >&5 echo $ECHO_N "checking if you want support for session management... $ECHO_C" >&6 # Check whether --enable-session-mgt or --disable-session-mgt was given. @@ -11013,13 +11399,36 @@ else enable_session_mgt=yes fi; -echo "$as_me:11016: result: $enable_session_mgt" >&5 +echo "$as_me:11402: result: $enable_session_mgt" >&5 echo "${ECHO_T}$enable_session_mgt" >&6 test "$enable_session_mgt" = no && cat >>confdefs.h <<\EOF #define OPT_SESSION_MGT 0 EOF -echo "$as_me:11022: checking if you want to use termcap-query/report" >&5 +echo "$as_me:11408: checking if you want to use termcap function-keys" >&5 +echo $ECHO_N "checking if you want to use termcap function-keys... $ECHO_C" >&6 + +# Check whether --enable-tcap-fkeys or --disable-tcap-fkeys was given. +if test "${enable_tcap_fkeys+set}" = set; then + enableval="$enable_tcap_fkeys" + test "$enableval" != no && enableval=yes + if test "$enableval" != "yes" ; then + enable_tcap_fkeys=no + else + enable_tcap_fkeys=yes + fi +else + enableval=yes + enable_tcap_fkeys=yes + +fi; +echo "$as_me:11425: result: $enable_tcap_fkeys" >&5 +echo "${ECHO_T}$enable_tcap_fkeys" >&6 +test "$enable_tcap_fkeys" = yes && cat >>confdefs.h <<\EOF +#define OPT_TCAP_FKEYS 1 +EOF + +echo "$as_me:11431: checking if you want to use termcap-query/report" >&5 echo $ECHO_N "checking if you want to use termcap-query/report... $ECHO_C" >&6 # Check whether --enable-tcap-query or --disable-tcap-query was given. @@ -11036,13 +11445,13 @@ else enable_tcap_query=no fi; -echo "$as_me:11039: result: $enable_tcap_query" >&5 +echo "$as_me:11448: result: $enable_tcap_query" >&5 echo "${ECHO_T}$enable_tcap_query" >&6 test "$enable_tcap_query" = yes && cat >>confdefs.h <<\EOF #define OPT_TCAP_QUERY 1 EOF -echo "$as_me:11045: checking if you want support for tek4014" >&5 +echo "$as_me:11454: checking if you want support for tek4014" >&5 echo $ECHO_N "checking if you want support for tek4014... $ECHO_C" >&6 # Check whether --enable-tek4014 or --disable-tek4014 was given. @@ -11059,7 +11468,7 @@ else enable_tek4014=yes fi; -echo "$as_me:11062: result: $enable_tek4014" >&5 +echo "$as_me:11471: result: $enable_tek4014" >&5 echo "${ECHO_T}$enable_tek4014" >&6 if test "$enable_tek4014" = no ; then cat >>confdefs.h <<\EOF @@ -11072,7 +11481,7 @@ else EXTRAOBJS="$EXTRAOBJS TekPrsTbl.o Tekproc.o" fi -echo "$as_me:11075: checking if you want pulldown menus with a toolbar" >&5 +echo "$as_me:11484: checking if you want pulldown menus with a toolbar" >&5 echo $ECHO_N "checking if you want pulldown menus with a toolbar... $ECHO_C" >&6 # Check whether --enable-toolbar or --disable-toolbar was given. @@ -11089,7 +11498,7 @@ else enable_toolbar=no fi; -echo "$as_me:11092: result: $enable_toolbar" >&5 +echo "$as_me:11501: result: $enable_toolbar" >&5 echo "${ECHO_T}$enable_toolbar" >&6 if test "$enable_toolbar" = yes ; then cat >>confdefs.h <<\EOF @@ -11098,7 +11507,7 @@ EOF fi -echo "$as_me:11101: checking if you want VT52 emulation" >&5 +echo "$as_me:11510: checking if you want VT52 emulation" >&5 echo $ECHO_N "checking if you want VT52 emulation... $ECHO_C" >&6 # Check whether --enable-vt52 or --disable-vt52 was given. @@ -11115,13 +11524,13 @@ else enable_vt52=yes fi; -echo "$as_me:11118: result: $enable_vt52" >&5 +echo "$as_me:11527: result: $enable_vt52" >&5 echo "${ECHO_T}$enable_vt52" >&6 test "$enable_vt52" = no && cat >>confdefs.h <<\EOF #define OPT_VT52_MODE 0 EOF -echo "$as_me:11124: checking if you want to use mini-luit/Latin9 built-in support" >&5 +echo "$as_me:11533: checking if you want to use mini-luit/Latin9 built-in support" >&5 echo $ECHO_N "checking if you want to use mini-luit/Latin9 built-in support... $ECHO_C" >&6 # Check whether --enable-mini-luit or --disable-mini-luit was given. @@ -11138,7 +11547,7 @@ else enable_mini_luit=no fi; -echo "$as_me:11141: result: $enable_mini_luit" >&5 +echo "$as_me:11550: result: $enable_mini_luit" >&5 echo "${ECHO_T}$enable_mini_luit" >&6 if test "$enable_mini_luit" = yes ; then cat >>confdefs.h <<\EOF @@ -11147,7 +11556,7 @@ EOF fi -echo "$as_me:11150: checking if you want to use luit" >&5 +echo "$as_me:11559: checking if you want to use luit" >&5 echo $ECHO_N "checking if you want to use luit... $ECHO_C" >&6 # Check whether --enable-luit or --disable-luit was given. @@ -11164,7 +11573,7 @@ else enable_luit=$enable_mini_luit fi; -echo "$as_me:11167: result: $enable_luit" >&5 +echo "$as_me:11576: result: $enable_luit" >&5 echo "${ECHO_T}$enable_luit" >&6 if test "$enable_luit" = yes ; then cat >>confdefs.h <<\EOF @@ -11176,7 +11585,7 @@ for ac_prog in $LUIT luit do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:11179: checking for $ac_word" >&5 +echo "$as_me:11588: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_LUIT+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -11193,7 +11602,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if $as_executable_p "$ac_dir/$ac_word"; then ac_cv_path_LUIT="$ac_dir/$ac_word" - echo "$as_me:11196: found $ac_dir/$ac_word" >&5 + echo "$as_me:11605: found $ac_dir/$ac_word" >&5 break fi done @@ -11204,10 +11613,10 @@ fi LUIT=$ac_cv_path_LUIT if test -n "$LUIT"; then - echo "$as_me:11207: result: $LUIT" >&5 + echo "$as_me:11616: result: $LUIT" >&5 echo "${ECHO_T}$LUIT" >&6 else - echo "$as_me:11210: result: no" >&5 + echo "$as_me:11619: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -11232,6 +11641,12 @@ do if test -z "$cf_path_prog" ; then if test "$with_full_paths" = yes ; then +if test "x$prefix" != xNONE; then + cf_path_syntax="$prefix" +else + cf_path_syntax="$ac_default_prefix" +fi + case ".$cf_temp" in #(vi .\$\(*\)*|.\'*\'*) #(vi ;; @@ -11243,12 +11658,12 @@ case ".$cf_temp" in #(vi eval cf_temp="$cf_temp" case ".$cf_temp" in #(vi .NONE/*) - cf_temp=`echo $cf_temp | sed -e s%NONE%$ac_default_prefix%` + cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%` ;; esac ;; #(vi .no|.NONE/*) - cf_temp=`echo $cf_temp | sed -e s%NONE%$ac_default_prefix%` + cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%` ;; *) break @@ -11269,7 +11684,7 @@ IFS="$cf_save_ifs" if test -n "$cf_path_prog" ; then -echo "(line 11272) testing defining path for ${cf_path_prog} ..." 1>&5 +echo "${as_me-configure}:11687: testing defining path for ${cf_path_prog} ..." 1>&5 cat >>confdefs.h <<EOF #define LUIT_PATH "$cf_path_prog" @@ -11283,7 +11698,7 @@ fi fi -echo "$as_me:11286: checking if you want wide-character support" >&5 +echo "$as_me:11701: checking if you want wide-character support" >&5 echo $ECHO_N "checking if you want wide-character support... $ECHO_C" >&6 # Check whether --enable-wide-chars or --disable-wide-chars was given. @@ -11300,7 +11715,7 @@ else enable_wchar=$enable_luit fi; -echo "$as_me:11303: result: $enable_wchar" >&5 +echo "$as_me:11718: result: $enable_wchar" >&5 echo "${ECHO_T}$enable_wchar" >&6 if test "$enable_wchar" = yes ; then cat >>confdefs.h <<\EOF @@ -11312,7 +11727,7 @@ EOF EXTRAOBJS="$EXTRAOBJS charclass.o precompose.o wcwidth.o" fi -echo "$as_me:11315: checking if you want dynamic-abbreviation support" >&5 +echo "$as_me:11730: checking if you want dynamic-abbreviation support" >&5 echo $ECHO_N "checking if you want dynamic-abbreviation support... $ECHO_C" >&6 # Check whether --enable-dabbrev or --disable-dabbrev was given. @@ -11329,7 +11744,7 @@ else enable_dabbrev=no fi; -echo "$as_me:11332: result: $enable_dabbrev" >&5 +echo "$as_me:11747: result: $enable_dabbrev" >&5 echo "${ECHO_T}$enable_dabbrev" >&6 if test "$enable_dabbrev" = yes ; then cat >>confdefs.h <<\EOF @@ -11338,7 +11753,7 @@ EOF fi -echo "$as_me:11341: checking if you want DECterm Locator support" >&5 +echo "$as_me:11756: checking if you want DECterm Locator support" >&5 echo $ECHO_N "checking if you want DECterm Locator support... $ECHO_C" >&6 # Check whether --enable-dec-locator or --disable-dec-locator was given. @@ -11355,7 +11770,7 @@ else enable_dec_locator=no fi; -echo "$as_me:11358: result: $enable_dec_locator" >&5 +echo "$as_me:11773: result: $enable_dec_locator" >&5 echo "${ECHO_T}$enable_dec_locator" >&6 if test "$enable_dec_locator" = yes ; then cat >>confdefs.h <<\EOF @@ -11364,7 +11779,33 @@ EOF fi -echo "$as_me:11367: checking if you want -ziconbeep option" >&5 +echo "$as_me:11782: checking if you want VT420 rectangle support" >&5 +echo $ECHO_N "checking if you want VT420 rectangle support... $ECHO_C" >&6 + +# Check whether --enable-rectangles or --disable-rectangles was given. +if test "${enable_rectangles+set}" = set; then + enableval="$enable_rectangles" + test "$enableval" != no && enableval=yes + if test "$enableval" != "yes" ; then + enable_rectangles=no + else + enable_rectangles=yes + fi +else + enableval=yes + enable_rectangles=yes + +fi; +echo "$as_me:11799: result: $enable_rectangles" >&5 +echo "${ECHO_T}$enable_rectangles" >&6 +if test "$enable_rectangles" = yes ; then + cat >>confdefs.h <<\EOF +#define OPT_DEC_RECTOPS 1 +EOF + +fi + +echo "$as_me:11808: checking if you want -ziconbeep option" >&5 echo $ECHO_N "checking if you want -ziconbeep option... $ECHO_C" >&6 # Check whether --enable-ziconbeep or --disable-ziconbeep was given. @@ -11381,7 +11822,7 @@ else enable_ziconbeep=yes fi; -echo "$as_me:11384: result: $enable_ziconbeep" >&5 +echo "$as_me:11825: result: $enable_ziconbeep" >&5 echo "${ECHO_T}$enable_ziconbeep" >&6 test "$enable_ziconbeep" = no && cat >>confdefs.h <<\EOF #define OPT_ZICONBEEP 0 @@ -11389,7 +11830,7 @@ EOF ############################################################################### -echo "$as_me:11392: checking if you want debugging traces" >&5 +echo "$as_me:11833: checking if you want debugging traces" >&5 echo $ECHO_N "checking if you want debugging traces... $ECHO_C" >&6 # Check whether --enable-trace or --disable-trace was given. @@ -11406,7 +11847,7 @@ else enable_trace=no fi; -echo "$as_me:11409: result: $enable_trace" >&5 +echo "$as_me:11850: result: $enable_trace" >&5 echo "${ECHO_T}$enable_trace" >&6 if test "$enable_trace" = yes ; then cat >>confdefs.h <<\EOF @@ -11417,7 +11858,7 @@ EOF EXTRAOBJS="$EXTRAOBJS trace.o" fi -echo "$as_me:11420: checking if you want to test memory leaks" >&5 +echo "$as_me:11861: checking if you want to test memory leaks" >&5 echo $ECHO_N "checking if you want to test memory leaks... $ECHO_C" >&6 # Check whether --enable-leaks or --disable-leaks was given. @@ -11434,7 +11875,7 @@ else disable_leaks=no fi; -echo "$as_me:11437: result: $disable_leaks" >&5 +echo "$as_me:11878: result: $disable_leaks" >&5 echo "${ECHO_T}$disable_leaks" >&6 if test "$disable_leaks" = yes ; then cat >>confdefs.h <<\EOF @@ -11443,7 +11884,7 @@ EOF fi -echo "$as_me:11446: checking if you want to see long compiling messages" >&5 +echo "$as_me:11887: checking if you want to see long compiling messages" >&5 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6 # Check whether --enable-echo or --disable-echo was given. @@ -11477,10 +11918,10 @@ else ECHO_CC='' fi; -echo "$as_me:11480: result: $enableval" >&5 +echo "$as_me:11921: result: $enableval" >&5 echo "${ECHO_T}$enableval" >&6 -echo "$as_me:11483: checking if you want magic cookie emulation" >&5 +echo "$as_me:11924: checking if you want magic cookie emulation" >&5 echo $ECHO_N "checking if you want magic cookie emulation... $ECHO_C" >&6 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given. @@ -11497,7 +11938,7 @@ else enable_xmc=no fi; -echo "$as_me:11500: result: $enable_xmc" >&5 +echo "$as_me:11941: result: $enable_xmc" >&5 echo "${ECHO_T}$enable_xmc" >&6 if test "$enable_xmc" = yes ; then cat >>confdefs.h <<\EOF @@ -11508,8 +11949,77 @@ EOF EXTRAOBJS="$EXTRAOBJS testxmc.o" fi +for ac_func in tigetstr +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:11955: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line 11961 "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. */ +#include <assert.h> +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); +char (*f) (); + +int +main () +{ +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +f = $ac_func; +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:11992: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:11995: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:11998: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:12001: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +eval "$as_ac_var=no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:12011: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<EOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +EOF + +fi +done + if test -n "$GCC" ; then -echo "$as_me:11512: checking if you want to turn on gcc warnings" >&5 +echo "$as_me:12022: checking if you want to turn on gcc warnings" >&5 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6 # Check whether --enable-warnings or --disable-warnings was given. @@ -11526,7 +12036,7 @@ else with_warnings=no fi; -echo "$as_me:11529: result: $with_warnings" >&5 +echo "$as_me:12039: result: $with_warnings" >&5 echo "${ECHO_T}$with_warnings" >&6 if test "$with_warnings" = yes then @@ -11549,10 +12059,10 @@ cat > conftest.i <<EOF EOF if test "$GCC" = yes then - { echo "$as_me:11552: checking for $CC __attribute__ directives..." >&5 + { echo "$as_me:12062: checking for $CC __attribute__ directives..." >&5 echo "$as_me: checking for $CC __attribute__ directives..." >&6;} cat > conftest.$ac_ext <<EOF -#line 11555 "configure" +#line 12065 "${as_me-configure}" #include "confdefs.h" #include "conftest.h" #include "conftest.i" @@ -11590,12 +12100,12 @@ EOF EOF ;; esac - if { (eval echo "$as_me:11593: \"$ac_compile\"") >&5 + if { (eval echo "$as_me:12103: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:11596: \$? = $ac_status" >&5 + echo "$as_me:12106: \$? = $ac_status" >&5 (exit $ac_status); }; then - test -n "$verbose" && echo "$as_me:11598: result: ... $cf_attribute" >&5 + test -n "$verbose" && echo "$as_me:12108: result: ... $cf_attribute" >&5 echo "${ECHO_T}... $cf_attribute" >&6 cat conftest.h >>confdefs.h fi @@ -11608,11 +12118,11 @@ fi GCC_VERSION=none if test "$GCC" = yes ; then - echo "$as_me:11611: checking version of $CC" >&5 + echo "$as_me:12121: checking version of $CC" >&5 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6 GCC_VERSION="`${CC} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`" test -z "$GCC_VERSION" && GCC_VERSION=unknown - echo "$as_me:11615: result: $GCC_VERSION" >&5 + echo "$as_me:12125: result: $GCC_VERSION" >&5 echo "${ECHO_T}$GCC_VERSION" >&6 fi @@ -11621,12 +12131,12 @@ INTEL_COMPILER=no if test "$GCC" = yes ; then case $host_os in linux*|gnu*) - echo "$as_me:11624: checking if this is really Intel C compiler" >&5 + echo "$as_me:12134: checking if this is really Intel C compiler" >&5 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6 cf_save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -no-gcc" cat >conftest.$ac_ext <<_ACEOF -#line 11629 "configure" +#line 12139 "configure" #include "confdefs.h" int @@ -11643,16 +12153,16 @@ make an error } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:11646: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:12156: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:11649: \$? = $ac_status" >&5 + echo "$as_me:12159: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:11652: \"$ac_try\"") >&5 + { (eval echo "$as_me:12162: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:11655: \$? = $ac_status" >&5 + echo "$as_me:12165: \$? = $ac_status" >&5 (exit $ac_status); }; }; then INTEL_COMPILER=yes cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc" @@ -11663,14 +12173,14 @@ cat conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext conftest.$ac_ext CFLAGS="$cf_save_CFLAGS" - echo "$as_me:11666: result: $INTEL_COMPILER" >&5 + echo "$as_me:12176: result: $INTEL_COMPILER" >&5 echo "${ECHO_T}$INTEL_COMPILER" >&6 ;; esac fi cat > conftest.$ac_ext <<EOF -#line 11673 "configure" +#line 12183 "${as_me-configure}" int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; } EOF @@ -11688,11 +12198,11 @@ then # remark #981: operands are evaluated in unspecified order # warning #269: invalid format string conversion - { echo "$as_me:11691: checking for $CC warning options..." >&5 + { echo "$as_me:12201: checking for $CC warning options..." >&5 echo "$as_me: checking for $CC warning options..." >&6;} cf_save_CFLAGS="$CFLAGS" EXTRA_CFLAGS="-Wall" - for cf_opt in \ + for cf_opt in \ wd1419 \ wd1682 \ wd1683 \ @@ -11705,12 +12215,12 @@ echo "$as_me: checking for $CC warning options..." >&6;} wd981 do CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt" - if { (eval echo "$as_me:11708: \"$ac_compile\"") >&5 + if { (eval echo "$as_me:12218: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:11711: \$? = $ac_status" >&5 + echo "$as_me:12221: \$? = $ac_status" >&5 (exit $ac_status); }; then - test -n "$verbose" && echo "$as_me:11713: result: ... -$cf_opt" >&5 + test -n "$verbose" && echo "$as_me:12223: result: ... -$cf_opt" >&5 echo "${ECHO_T}... -$cf_opt" >&6 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt" fi @@ -11719,7 +12229,7 @@ echo "${ECHO_T}... -$cf_opt" >&6 elif test "$GCC" = yes then - { echo "$as_me:11722: checking for $CC warning options..." >&5 + { echo "$as_me:12232: checking for $CC warning options..." >&5 echo "$as_me: checking for $CC warning options..." >&6;} cf_save_CFLAGS="$CFLAGS" EXTRA_CFLAGS="-W -Wall" @@ -11736,15 +12246,15 @@ echo "$as_me: checking for $CC warning options..." >&6;} Wpointer-arith \ Wshadow \ Wstrict-prototypes \ - Wundef $cf_warn_CONST + Wundef $cf_warn_CONST Wdeclaration-after-statement Wextra Wno-unknown-pragmas Wswitch-enum do CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt" - if { (eval echo "$as_me:11742: \"$ac_compile\"") >&5 + if { (eval echo "$as_me:12252: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:11745: \$? = $ac_status" >&5 + echo "$as_me:12255: \$? = $ac_status" >&5 (exit $ac_status); }; then - test -n "$verbose" && echo "$as_me:11747: result: ... -$cf_opt" >&5 + test -n "$verbose" && echo "$as_me:12257: result: ... -$cf_opt" >&5 echo "${ECHO_T}... -$cf_opt" >&6 case $cf_opt in #(vi Wcast-qual) #(vi @@ -11755,6 +12265,8 @@ echo "${ECHO_T}... -$cf_opt" >&6 3.3*) test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6 +echo "${as_me-configure}:12268: testing feature is broken in gcc $GCC_VERSION ..." 1>&5 + continue;; esac ;; @@ -11769,13 +12281,20 @@ rm -f conftest* fi fi -if test $disable_setuid = yes ; then - MAY_SETUID="#" - NOT_SETUID= - cat >>confdefs.h <<\EOF +test "$disable_setuid" = yes && cat >>confdefs.h <<\EOF #define DISABLE_SETUID 1 EOF +test "$disable_setgid" = yes && cat >>confdefs.h <<\EOF +#define DISABLE_SETGID 1 +EOF + +if test $disable_setuid = yes ; then + MAY_SETUID="#" + NOT_SETUID= +elif test $disable_setgid = yes ; then + MAY_SETUID="#" + NOT_SETUID= else MAY_SETUID= NOT_SETUID="#" @@ -11878,7 +12397,7 @@ DEFS=-DHAVE_CONFIG_H : ${CONFIG_STATUS=./config.status} ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ echo "$as_me:11881: creating $CONFIG_STATUS" >&5 +{ echo "$as_me:12400: creating $CONFIG_STATUS" >&5 echo "$as_me: creating $CONFIG_STATUS" >&6;} cat >$CONFIG_STATUS <<_ACEOF #! $SHELL @@ -12007,7 +12526,7 @@ EOF cat >>$CONFIG_STATUS <<EOF ac_cs_version="\\ config.status -configured by $0, generated by GNU Autoconf 2.52.20030208, +configured by $0, generated by GNU Autoconf 2.52.20061216, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 @@ -12051,7 +12570,7 @@ cat >>$CONFIG_STATUS <<\EOF echo "$ac_cs_version"; exit 0 ;; --he | --h) # Conflict between --help and --header - { { echo "$as_me:12054: error: ambiguous option: $1 + { { echo "$as_me:12573: error: ambiguous option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: ambiguous option: $1 Try \`$0 --help' for more information." >&2;} @@ -12070,7 +12589,7 @@ Try \`$0 --help' for more information." >&2;} ac_need_defaults=false;; # This is an error. - -*) { { echo "$as_me:12073: error: unrecognized option: $1 + -*) { { echo "$as_me:12592: error: unrecognized option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: unrecognized option: $1 Try \`$0 --help' for more information." >&2;} @@ -12089,7 +12608,7 @@ cat >&5 << _ACEOF ## Running config.status. ## ## ----------------------- ## -This file was extended by $as_me 2.52.20030208, executed with +This file was extended by $as_me 2.52.20061216, executed with CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS @@ -12107,7 +12626,7 @@ do # Handling of arguments. "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; "xtermcfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS xtermcfg.h:xtermcfg.hin" ;; - *) { { echo "$as_me:12110: error: invalid argument: $ac_config_target" >&5 + *) { { echo "$as_me:12629: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac @@ -12214,6 +12733,10 @@ s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t s,@PROG_EXT@,$PROG_EXT,;t t s,@appsdir@,$appsdir,;t t s,@no_appsdir@,$no_appsdir,;t t +s,@icondir@,$icondir,;t t +s,@no_icondir@,$no_icondir,;t t +s,@desktop_utils@,$desktop_utils,;t t +s,@DESKTOP_FLAGS@,$DESKTOP_FLAGS,;t t s,@XTERM_PATH@,$XTERM_PATH,;t t s,@XTERM_SYMLINK@,$XTERM_SYMLINK,;t t s,@SINSTALL_OPTS@,$SINSTALL_OPTS,;t t @@ -12359,7 +12882,7 @@ done; } esac if test x"$ac_file" != x-; then - { echo "$as_me:12362: creating $ac_file" >&5 + { echo "$as_me:12885: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} rm -f "$ac_file" fi @@ -12377,7 +12900,7 @@ echo "$as_me: creating $ac_file" >&6;} -) echo $tmp/stdin ;; [\\/$]*) # Absolute (can't be DOS-style, as IFS=:) - test -f "$f" || { { echo "$as_me:12380: error: cannot find input file: $f" >&5 + test -f "$f" || { { echo "$as_me:12903: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } echo $f;; @@ -12390,7 +12913,7 @@ echo "$as_me: error: cannot find input file: $f" >&2;} echo $srcdir/$f else # /dev/null tree - { { echo "$as_me:12393: error: cannot find input file: $f" >&5 + { { echo "$as_me:12916: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } fi;; @@ -12456,7 +12979,7 @@ for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue * ) ac_file_in=$ac_file.in ;; esac - test x"$ac_file" != x- && { echo "$as_me:12459: creating $ac_file" >&5 + test x"$ac_file" != x- && { echo "$as_me:12982: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} # First look for the input files in the build tree, otherwise in the @@ -12467,7 +12990,7 @@ echo "$as_me: creating $ac_file" >&6;} -) echo $tmp/stdin ;; [\\/$]*) # Absolute (can't be DOS-style, as IFS=:) - test -f "$f" || { { echo "$as_me:12470: error: cannot find input file: $f" >&5 + test -f "$f" || { { echo "$as_me:12993: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } echo $f;; @@ -12480,7 +13003,7 @@ echo "$as_me: error: cannot find input file: $f" >&2;} echo $srcdir/$f else # /dev/null tree - { { echo "$as_me:12483: error: cannot find input file: $f" >&5 + { { echo "$as_me:13006: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } fi;; @@ -12598,7 +13121,7 @@ cat >>$CONFIG_STATUS <<\EOF rm -f $tmp/in if test x"$ac_file" != x-; then if cmp -s $ac_file $tmp/config.h 2>/dev/null; then - { echo "$as_me:12601: $ac_file is unchanged" >&5 + { echo "$as_me:13124: $ac_file is unchanged" >&5 echo "$as_me: $ac_file is unchanged" >&6;} else ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ diff --git a/app/xterm/configure.in b/app/xterm/configure.in index 20a794330..f7bdb901d 100644 --- a/app/xterm/configure.in +++ b/app/xterm/configure.in @@ -1,10 +1,8 @@ -dnl $XTermId: configure.in,v 1.218 2006/07/15 12:21:26 tom Exp $ -dnl -dnl $XFree86: xc/programs/xterm/configure.in,v 3.77 2006/06/19 00:36:51 dickey Exp $ +dnl $XTermId: configure.in,v 1.241 2008/02/24 21:46:37 tom Exp $ dnl dnl --------------------------------------------------------------------------- dnl -dnl Copyright 1997-2005,2006 by Thomas E. Dickey +dnl Copyright 1997-2007,2008 by Thomas E. Dickey dnl dnl All Rights Reserved dnl @@ -70,6 +68,8 @@ CF_SIGWINCH AC_CHECK_HEADERS( \ ncurses/term.h \ stdlib.h \ +sys/ttydefaults.h \ +term.h \ termios.h \ unistd.h \ wchar.h \ @@ -120,6 +120,34 @@ no_appsdir= test "$appsdir" = no && no_appsdir="#" AC_SUBST(no_appsdir) +AC_MSG_CHECKING(for directory to install icons) +CF_WITH_PATH(icondir, + [ --with-icondir=DIR directory in which to install icons], + [icondir],[EPREFIX/share/pixmaps], + ['\$(exec_prefix)/share/pixmaps']) +AC_MSG_RESULT($icondir) +AC_SUBST(icondir) + +no_icondir= +test "$icondir" = no && no_icondir="#" +AC_SUBST(no_icondir) + +# Comment-out the install-desktop rule if the desktop-utils are not found. +AC_MSG_CHECKING(if you want to install desktop files) +CF_ARG_OPTION(desktop, + [ --disable-desktop disable install of xterm desktop files], + [enable_desktop=$enableval], + [enable_desktop=$enableval],yes) +AC_MSG_RESULT($enable_desktop) + +desktop_utils= +if test "$enable_desktop" = yes ; then +AC_CHECK_PROG(desktop_utils,desktop-file-install,yes,no) +fi + +test "$desktop_utils" = yes && desktop_utils= || desktop_utils="#" +AC_SUBST(DESKTOP_FLAGS) + # inherit SINSTALL_OPTS from environment to allow packager to customize it. AC_MSG_CHECKING(for install-permissions reference) @@ -146,6 +174,7 @@ AC_ARG_WITH(xterm-symlink, [with_symlink=$withval], [with_symlink=xterm]) AC_MSG_RESULT($with_symlink) +test "$with_symlink" = yes && with_symlink=xterm test -n "$with_symlink" && \ test "$with_symlink" != no && \ test "$with_symlink" != $cf_name && \ @@ -154,12 +183,20 @@ fi AC_MSG_CHECKING(if you want to disable setuid) CF_ARG_DISABLE(setuid, - [ --disable-setuid disable setuid in xterm, do not install setuid], + [ --disable-setuid disable setuid in xterm, do not install setuid/setgid], [disable_setuid=yes], [disable_setuid=no], no) AC_MSG_RESULT($disable_setuid) +AC_MSG_CHECKING(if you want to disable setgid) +CF_ARG_DISABLE(setgid, + [ --disable-setgid disable setgid in xterm, do not install setuid/setgid], + [disable_setgid=yes], + [disable_setgid=no], + no) +AC_MSG_RESULT($disable_setgid) + AC_MSG_CHECKING(if you want to run xterm setuid to a given user) AC_ARG_WITH(setuid, [ --with-setuid=XXX use the given setuid user], @@ -207,7 +244,18 @@ AC_MSG_RESULT($use_utempter) if test "$use_utempter" = yes ; then CF_UTEMPTER - test "$cf_cv_have_utempter" = yes && disable_setuid=yes + test "$cf_cv_have_utempter" != yes && use_utempter=no +else + use_utempter=no +fi + +# Some configurations permit (or require) either setuid or setgid mode. +# Let the user decide. +if test "$use_utempter" = yes ; then + if test "${enable_setuid+set}" != set ; then + disable_setuid=yes + CF_VERBOSE([No --disable-setuid option given, force to yes]) + fi fi ### checks for external data @@ -224,6 +272,7 @@ CF_X_TOOLKIT AC_CHECK_HEADERS( \ X11/DECkeysym.h \ X11/Sunkeysym.h \ + X11/XF86keysym.h \ X11/Xpoll.h \ ) @@ -458,6 +507,22 @@ CF_ARG_DISABLE(boxchars, AC_MSG_RESULT($enable_boxchars) test "$enable_boxchars" = no && AC_DEFINE(OPT_BOX_CHARS,0) +AC_MSG_CHECKING(if you want to allow spawning new xterms) +CF_ARG_ENABLE(exec-xterm, + [ --enable-exec-xterm enable "spawn-new-terminal" action], + [enable_exec_xterm=yes], + [enable_exec_xterm=no]) +AC_MSG_RESULT($enable_exec_xterm) +if test "$enable_exec_xterm" = yes ; then + CF_PROCFS_CWD + if test "$cf_cv_procfs_cwd" = no ; then + AC_MSG_WARN(no suitable proc filesystem found) + else + AC_DEFINE_UNQUOTED(PROCFS_ROOT,"$cf_cv_procfs_cwd") + AC_DEFINE(OPT_EXEC_XTERM) + fi +fi + AC_MSG_CHECKING(if you want to use FreeType library) CF_ARG_DISABLE(freetype, [ --disable-freetype disable freetype library-support], @@ -656,6 +721,14 @@ CF_ARG_DISABLE(session-mgt, AC_MSG_RESULT($enable_session_mgt) test "$enable_session_mgt" = no && AC_DEFINE(OPT_SESSION_MGT,0) +AC_MSG_CHECKING(if you want to use termcap function-keys) +CF_ARG_DISABLE(tcap-fkeys, + [ --disable-tcap-fkeys disable termcap function-keys support], + [enable_tcap_fkeys=no], + [enable_tcap_fkeys=yes]) +AC_MSG_RESULT($enable_tcap_fkeys) +test "$enable_tcap_fkeys" = yes && AC_DEFINE(OPT_TCAP_FKEYS,1) + AC_MSG_CHECKING(if you want to use termcap-query/report) CF_ARG_ENABLE(tcap-query, [ --enable-tcap-query compile-in termcap-query support], @@ -751,6 +824,16 @@ if test "$enable_dec_locator" = yes ; then AC_DEFINE(OPT_DEC_LOCATOR,1) fi +AC_MSG_CHECKING(if you want VT420 rectangle support) +CF_ARG_DISABLE(rectangles, + [ --disable-rectangles disable VT420 rectangle support], + [enable_rectangles=no], + [enable_rectangles=yes]) +AC_MSG_RESULT($enable_rectangles) +if test "$enable_rectangles" = yes ; then + AC_DEFINE(OPT_DEC_RECTOPS,1) +fi + AC_MSG_CHECKING(if you want -ziconbeep option) CF_ARG_DISABLE(ziconbeep, [ --disable-ziconbeep disable -ziconbeep option], @@ -798,6 +881,9 @@ if test "$enable_xmc" = yes ; then EXTRAOBJS="$EXTRAOBJS testxmc.o" fi +dnl FIXME - extra test needed to make tcap-fkeys work on HPUX +AC_CHECK_FUNCS(tigetstr) + if test -n "$GCC" ; then AC_MSG_CHECKING(if you want to turn on gcc warnings) CF_ARG_ENABLE(warnings, @@ -808,7 +894,7 @@ AC_MSG_RESULT($with_warnings) if test "$with_warnings" = yes then CF_GCC_ATTRIBUTES - CF_GCC_WARNINGS + CF_GCC_WARNINGS(Wdeclaration-after-statement Wextra Wno-unknown-pragmas Wswitch-enum) fi fi @@ -818,10 +904,15 @@ AC_SUBST(EXTRAHDRS) AC_SUBST(EXTRASRCS) AC_SUBST(EXTRAOBJS) +test "$disable_setuid" = yes && AC_DEFINE(DISABLE_SETUID) +test "$disable_setgid" = yes && AC_DEFINE(DISABLE_SETGID) + if test $disable_setuid = yes ; then MAY_SETUID="#" NOT_SETUID= - AC_DEFINE(DISABLE_SETUID) +elif test $disable_setgid = yes ; then + MAY_SETUID="#" + NOT_SETUID= else MAY_SETUID= NOT_SETUID="#" diff --git a/app/xterm/fontutils.c b/app/xterm/fontutils.c index 43fcbe93b..d66933b8e 100644 --- a/app/xterm/fontutils.c +++ b/app/xterm/fontutils.c @@ -1,12 +1,8 @@ -/* $XTermId: fontutils.c,v 1.208 2006/07/23 20:31:30 tom Exp $ */ - -/* - * $XFree86: xc/programs/xterm/fontutils.c,v 1.60 2006/04/30 21:55:39 dickey Exp $ - */ +/* $XTermId: fontutils.c,v 1.270 2008/02/29 00:25:16 Andrea.Odetti Exp $ */ /************************************************************ -Copyright 1998-2005,2006 by Thomas E. Dickey +Copyright 1998-2007,2008 by Thomas E. Dickey All Rights Reserved @@ -119,7 +115,7 @@ typedef struct { } FontNameProperties; #if OPT_SHIFT_FONTS -static void lookupOneFontSize(TScreen *, int); +static void lookupOneFontSize(XtermWidget, int); #endif #if OPT_WIDE_CHARS @@ -433,7 +429,7 @@ xtermSpecialFont(TScreen * screen, unsigned atts, unsigned chrset) int res_x; int res_y; - props = get_font_name_props(screen->display, screen->fnts[fNorm], 0); + props = get_font_name_props(screen->display, screen->fnts[fNorm].fs, 0); if (props == 0) return result; @@ -602,7 +598,7 @@ is_double_width_font(XFontStruct * fs) "\xec\x9c\xa1\xec\xb9\xa0\xed\x8c\x94" \ "\xea\xb5\xac\xec\x98\x81" -#define HALF_WIDTH_CHAR1 0x0031 /* 'l' */ +#define HALF_WIDTH_CHAR1 0x0031 /* '1' */ #define HALF_WIDTH_CHAR2 0x0057 /* 'W' */ #define FULL_WIDTH_CHAR1 0x4E00 /* CJK Ideograph 'number one' */ #define FULL_WIDTH_CHAR2 0xAC00 /* Korean script syllable 'Ka' */ @@ -684,25 +680,37 @@ cache_menu_font_name(TScreen * screen, int fontnum, int which, const char *name) * Open the given font and verify that it is non-empty. Return a null on * failure. */ -XFontStruct * -xtermOpenFont(TScreen * screen, char *name) +Bool +xtermOpenFont(XtermWidget xw, char *name, XTermFonts * result) { - XFontStruct *nfs = 0; + Bool code = False; + TScreen *screen = TScreenOf(xw); if (name != 0 - && (nfs = XLoadQueryFont(screen->display, name)) != 0) { - if (EmptyFont(nfs)) { - nfs = xtermCloseFont(screen, nfs); + && (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); } } - return nfs; + return code; } -XFontStruct * -xtermCloseFont(TScreen * screen, XFontStruct * fnt) +/* + * Close the font and Free the font info + */ +XTermFonts * +xtermCloseFont(XtermWidget xw, XTermFonts * fnt) { - if (fnt != 0) { - XFreeFont(screen->display, fnt); + if (fnt != 0 && fnt->fs != 0) { + TScreen *screen = TScreenOf(xw); + + clrCgsFonts(xw, WhichVWin(screen), fnt); + XFreeFont(screen->display, fnt->fs); + xtermFreeFontInfo(fnt); } return 0; } @@ -711,22 +719,51 @@ xtermCloseFont(TScreen * screen, XFontStruct * fnt) * Close the listed fonts, noting that some may use copies of the pointer. */ void -xtermCloseFonts(TScreen * screen, XFontStruct ** fnts) +xtermCloseFonts(XtermWidget xw, XTermFonts * fnts) { int j, k; for (j = 0; j < fMAX; ++j) { - if (fnts[j] != 0) { - xtermCloseFont(screen, fnts[j]); + /* + * Need to save the pointer since xtermCloseFont zeroes it + */ + XFontStruct *thisFont = fnts[j].fs; + if (thisFont != 0) { + xtermCloseFont(xw, &fnts[j]); for (k = j + 1; k < fMAX; ++k) { - if (fnts[j] == fnts[k]) - fnts[k] = 0; + if (thisFont == fnts[k].fs) + xtermFreeFontInfo(&fnts[k]); } - fnts[j] = 0; } } } +/* + * Make a copy of the source, assuming the XFontStruct's to be unique, but + * ensuring that the names are reallocated to simplify freeing. + */ +void +xtermCopyFontInfo(XTermFonts * target, XTermFonts * source) +{ + xtermFreeFontInfo(target); + target->chrset = source->chrset; + target->flags = source->flags; + target->fn = x_strdup(source->fn); + target->fs = source->fs; +} + +void +xtermFreeFontInfo(XTermFonts * target) +{ + target->chrset = 0; + target->flags = 0; + if (target->fn != 0) { + free(target->fn); + target->fn = 0; + } + target->fs = 0; +} + int xtermLoadFont(XtermWidget xw, const VTFontNames * fonts, @@ -734,17 +771,11 @@ xtermLoadFont(XtermWidget xw, int fontnum) { TScreen *screen = &(xw->screen); + VTwin *win = WhichVWin(screen); VTFontNames myfonts; - /* FIXME: use XFreeFontInfo */ FontNameProperties *fp; - XFontStruct *fnts[fMAX]; - XGCValues xgcv; - unsigned long mask; - GC new_normalGC = NULL; - GC new_normalboldGC = NULL; - GC new_reverseGC = NULL; - GC new_reverseboldGC = NULL; + XTermFonts fnts[fMAX]; Pixel new_normal; Pixel new_revers; char *tmpname = NULL; @@ -765,6 +796,9 @@ xtermLoadFont(XtermWidget xw, return 0; } + TRACE(("Begin Cgs - xtermLoadFont(%s)\n", myfonts.f_n)); + releaseWindowGCs(xw, win); + TRACE(("xtermLoadFont #%d normal %s\n", fontnum, NonNull(myfonts.f_n))); TRACE(("xtermLoadFont #%d bold %s\n", fontnum, NonNull(myfonts.f_b))); #if OPT_WIDE_CHARS @@ -772,34 +806,34 @@ xtermLoadFont(XtermWidget xw, TRACE(("xtermLoadFont #%d w/bold %s\n", fontnum, NonNull(myfonts.f_wb))); #endif - if (!(fnts[fNorm] = xtermOpenFont(screen, myfonts.f_n))) + if (!xtermOpenFont(xw, myfonts.f_n, &fnts[fNorm])) goto bad; strcpy(normal, myfonts.f_n); if (myfonts.f_b == 0) { - fp = get_font_name_props(screen->display, fnts[fNorm], normal); + fp = get_font_name_props(screen->display, fnts[fNorm].fs, normal); if (fp != 0) { myfonts.f_b = bold_font_name(fp, fp->average_width); - if ((fnts[fBold] = xtermOpenFont(screen, myfonts.f_b)) == 0) { + if (!xtermOpenFont(xw, myfonts.f_b, &fnts[fBold])) { myfonts.f_b = bold_font_name(fp, -1); - fnts[fBold] = xtermOpenFont(screen, myfonts.f_b); + (void) xtermOpenFont(xw, myfonts.f_b, &fnts[fBold]); } TRACE(("...derived bold %s\n", NonNull(myfonts.f_b))); } - if (fp == 0 || fnts[fBold] == 0) { - fnts[fBold] = fnts[fNorm]; + if (fp == 0 || fnts[fBold].fs == 0) { + xtermCopyFontInfo(&fnts[fBold], &fnts[fNorm]); TRACE(("...cannot load a matching bold font\n")); - } else if (same_font_size(xw, fnts[fNorm], fnts[fBold]) - && got_bold_font(screen->display, fnts[fBold], myfonts.f_b)) { + } else if (same_font_size(xw, fnts[fNorm].fs, fnts[fBold].fs) + && got_bold_font(screen->display, fnts[fBold].fs, myfonts.f_b)) { TRACE(("...got a matching bold font\n")); cache_menu_font_name(screen, fontnum, fBold, myfonts.f_b); } else { - xtermCloseFont(screen, fnts[fBold]); + xtermCloseFont(xw, &fnts[fBold]); fnts[fBold] = fnts[fNorm]; TRACE(("...did not get a matching bold font\n")); } - } else if ((fnts[fBold] = xtermOpenFont(screen, myfonts.f_b)) == 0) { - fnts[fBold] = fnts[fNorm]; + } else if (!xtermOpenFont(xw, myfonts.f_b, &fnts[fBold])) { + xtermCopyFontInfo(&fnts[fBold], &fnts[fNorm]); TRACE(("...cannot load bold font %s\n", NonNull(myfonts.f_b))); } else { cache_menu_font_name(screen, fontnum, fBold, myfonts.f_b); @@ -816,8 +850,8 @@ xtermLoadFont(XtermWidget xw, if (myfonts.f_w != 0) { cache_menu_font_name(screen, fontnum, fWide, myfonts.f_w); - } else if (!is_double_width_font(fnts[fNorm])) { - fp = get_font_name_props(screen->display, fnts[fNorm], normal); + } else if (!is_double_width_font(fnts[fNorm].fs)) { + fp = get_font_name_props(screen->display, fnts[fNorm].fs, normal); if (fp != 0) { myfonts.f_w = wide_font_name(fp); TRACE(("...derived wide %s\n", NonNull(myfonts.f_w))); @@ -826,14 +860,14 @@ xtermLoadFont(XtermWidget xw, } if (myfonts.f_w) { - fnts[fWide] = xtermOpenFont(screen, myfonts.f_w); + (void) xtermOpenFont(xw, myfonts.f_w, &fnts[fWide]); } else { - fnts[fWide] = fnts[fNorm]; + xtermCopyFontInfo(&fnts[fWide], &fnts[fNorm]); } derived = False; if (myfonts.f_wb == 0) { - fp = get_font_name_props(screen->display, fnts[fBold], bold); + fp = get_font_name_props(screen->display, fnts[fBold].fs, bold); if (fp != 0) { myfonts.f_wb = widebold_font_name(fp); derived = True; @@ -842,30 +876,31 @@ xtermLoadFont(XtermWidget xw, if (myfonts.f_wb) { - fnts[fWBold] = xtermOpenFont(screen, myfonts.f_wb); + (void) xtermOpenFont(xw, myfonts.f_wb, &fnts[fWBold]); if (derived - && !compatibleWideCounts(fnts[fWide], fnts[fWBold])) { - fnts[fWBold] = xtermCloseFont(screen, fnts[fWBold]); + && !compatibleWideCounts(fnts[fWide].fs, fnts[fWBold].fs)) { + xtermCloseFont(xw, &fnts[fWBold]); } - if (fnts[fWBold] == 0) { - free(myfonts.f_wb); + if (fnts[fWBold].fs == 0) { myfonts.f_wb = myfonts.f_w; - fnts[fWBold] = fnts[fWide]; + xtermCopyFontInfo(&fnts[fWBold], &fnts[fWide]); TRACE(("...cannot load wide-bold, use wide %s\n", NonNull(myfonts.f_w))); } else { - TRACE(("...derived wide/bold %s\n", NonNull(myfonts.f_wb))); + TRACE(("...%s wide/bold %s\n", + derived ? "derived" : "given", + NonNull(myfonts.f_wb))); cache_menu_font_name(screen, fontnum, fWBold, myfonts.f_wb); } - } else if (is_double_width_font(fnts[fBold])) { - fnts[fWBold] = fnts[fBold]; + } else if (is_double_width_font(fnts[fBold].fs)) { + xtermCopyFontInfo(&fnts[fWBold], &fnts[fBold]); TRACE(("...bold font is double-width, use it %s\n", NonNull(myfonts.f_b))); } else { - fnts[fWBold] = fnts[fWide]; + xtermCopyFontInfo(&fnts[fWBold], &fnts[fWide]); TRACE(("...cannot load wide bold font, use wide %s\n", NonNull(myfonts.f_w))); } - if (EmptyFont(fnts[fWBold])) + if (EmptyFont(fnts[fWBold].fs)) goto bad; /* can't use a 0-sized font */ }); @@ -876,24 +911,24 @@ xtermLoadFont(XtermWidget xw, * * But if it did fail for some reason, then nevermind. */ - if (EmptyFont(fnts[fBold])) + if (EmptyFont(fnts[fBold].fs)) goto bad; /* can't use a 0-sized font */ - if (!same_font_size(xw, fnts[fNorm], fnts[fBold]) - && (is_fixed_font(fnts[fNorm]) && is_fixed_font(fnts[fBold]))) { + if (!same_font_size(xw, fnts[fNorm].fs, fnts[fBold].fs) + && (is_fixed_font(fnts[fNorm].fs) && is_fixed_font(fnts[fBold].fs))) { TRACE(("...ignoring mismatched normal/bold fonts\n")); - xtermCloseFont(screen, fnts[fBold]); - fnts[fBold] = fnts[fNorm]; + xtermCloseFont(xw, &fnts[fBold]); + xtermCopyFontInfo(&fnts[fBold], &fnts[fNorm]); } if_OPT_WIDE_CHARS(screen, { - if (fnts[fWide] != 0 - && fnts[fWBold] != 0 - && !same_font_size(xw, fnts[fWide], fnts[fWBold]) - && (is_fixed_font(fnts[fWide]) && is_fixed_font(fnts[fWBold]))) { + if (fnts[fWide].fs != 0 + && fnts[fWBold].fs != 0 + && !same_font_size(xw, fnts[fWide].fs, fnts[fWBold].fs) + && (is_fixed_font(fnts[fWide].fs) && is_fixed_font(fnts[fWBold].fs))) { TRACE(("...ignoring mismatched normal/bold wide fonts\n")); - xtermCloseFont(screen, fnts[fWBold]); - fnts[fWBold] = fnts[fWide]; + xtermCloseFont(xw, &fnts[fWBold]); + xtermCopyFontInfo(&fnts[fWBold], &fnts[fWide]); } }); @@ -901,28 +936,28 @@ xtermLoadFont(XtermWidget xw, * Normal/bold fonts should be the same width. Also, the min/max * values should be the same. */ - if (!is_fixed_font(fnts[fNorm]) - || !is_fixed_font(fnts[fBold]) - || fnts[fNorm]->max_bounds.width != fnts[fBold]->max_bounds.width) { + if (!is_fixed_font(fnts[fNorm].fs) + || !is_fixed_font(fnts[fBold].fs) + || fnts[fNorm].fs->max_bounds.width != fnts[fBold].fs->max_bounds.width) { TRACE(("Proportional font! normal %d/%d, bold %d/%d\n", - fnts[fNorm]->min_bounds.width, - fnts[fNorm]->max_bounds.width, - fnts[fBold]->min_bounds.width, - fnts[fBold]->max_bounds.width)); + fnts[fNorm].fs->min_bounds.width, + fnts[fNorm].fs->max_bounds.width, + fnts[fBold].fs->min_bounds.width, + fnts[fBold].fs->max_bounds.width)); proportional = True; } if_OPT_WIDE_CHARS(screen, { - if (fnts[fWide] != 0 - && fnts[fWBold] != 0 - && (!is_fixed_font(fnts[fWide]) - || !is_fixed_font(fnts[fWBold]) - || fnts[fWide]->max_bounds.width != fnts[fWBold]->max_bounds.width)) { + if (fnts[fWide].fs != 0 + && fnts[fWBold].fs != 0 + && (!is_fixed_font(fnts[fWide].fs) + || !is_fixed_font(fnts[fWBold].fs) + || fnts[fWide].fs->max_bounds.width != fnts[fWBold].fs->max_bounds.width)) { TRACE(("Proportional font! wide %d/%d, wide bold %d/%d\n", - fnts[fWide]->min_bounds.width, - fnts[fWide]->max_bounds.width, - fnts[fWBold]->min_bounds.width, - fnts[fWBold]->max_bounds.width)); + fnts[fWide].fs->min_bounds.width, + fnts[fWide].fs->max_bounds.width, + fnts[fWBold].fs->min_bounds.width, + fnts[fWBold].fs->max_bounds.width)); proportional = True; } }); @@ -930,75 +965,58 @@ xtermLoadFont(XtermWidget xw, /* TODO : enforce that the width of the wide font is 2* the width of the narrow font */ - mask = (GCFont | GCForeground | GCBackground | GCGraphicsExposures | - GCFunction); + /* + * If we're switching fonts, free the old ones. Otherwise we'll leak + * the memory that is associated with the old fonts. The + * XLoadQueryFont call allocates a new XFontStruct. + */ + xtermCloseFonts(xw, screen->fnts); + + xtermCopyFontInfo(&(screen->fnts[fNorm]), &fnts[fNorm]); + xtermCopyFontInfo(&(screen->fnts[fBold]), &fnts[fBold]); +#if OPT_WIDE_CHARS + xtermCopyFontInfo(&(screen->fnts[fWide]), &fnts[fWide]); + if (fnts[fWBold].fs == NULL) + xtermCopyFontInfo(&fnts[fWBold], &fnts[fWide]); + xtermCopyFontInfo(&(screen->fnts[fWBold]), &fnts[fWBold]); +#endif new_normal = getXtermForeground(xw, xw->flags, xw->cur_foreground); new_revers = getXtermBackground(xw, xw->flags, xw->cur_background); - xgcv.font = fnts[fNorm]->fid; - xgcv.foreground = new_normal; - xgcv.background = new_revers; - xgcv.graphics_exposures = True; /* default */ - xgcv.function = GXcopy; + setCgsFore(xw, win, gcNorm, new_normal); + setCgsBack(xw, win, gcNorm, new_revers); + setCgsFont(xw, win, gcNorm, &(screen->fnts[fNorm])); - new_normalGC = XtGetGC((Widget) xw, mask, &xgcv); - if (!new_normalGC) - goto bad; - - if (fnts[fNorm] == fnts[fBold]) { /* there is no bold font */ - new_normalboldGC = new_normalGC; - } else { - xgcv.font = fnts[fBold]->fid; - new_normalboldGC = XtGetGC((Widget) xw, mask, &xgcv); - if (!new_normalboldGC) - goto bad; - } + copyCgs(xw, win, gcBold, gcNorm); + setCgsFont(xw, win, gcBold, &(screen->fnts[fBold])); - xgcv.font = fnts[fNorm]->fid; - xgcv.foreground = new_revers; - xgcv.background = new_normal; - new_reverseGC = XtGetGC((Widget) xw, mask, &xgcv); - if (!new_reverseGC) - goto bad; + setCgsFore(xw, win, gcNormReverse, new_revers); + setCgsBack(xw, win, gcNormReverse, new_normal); + setCgsFont(xw, win, gcNormReverse, &(screen->fnts[fNorm])); - if (fnts[fNorm] == fnts[fBold]) { /* there is no bold font */ - new_reverseboldGC = new_reverseGC; - } else { - xgcv.font = fnts[fBold]->fid; - new_reverseboldGC = XtGetGC((Widget) xw, mask, &xgcv); - if (!new_reverseboldGC) - goto bad; - } + copyCgs(xw, win, gcBoldReverse, gcNormReverse); + setCgsFont(xw, win, gcBoldReverse, &(screen->fnts[fBold])); - if (NormalGC(screen) != NormalBoldGC(screen)) - XtReleaseGC((Widget) xw, NormalBoldGC(screen)); - XtReleaseGC((Widget) xw, NormalGC(screen)); + if_OPT_WIDE_CHARS(screen, { + if (screen->fnts[fWide].fs != 0 + && screen->fnts[fWBold].fs != 0) { + setCgsFore(xw, win, gcWide, new_normal); + setCgsBack(xw, win, gcWide, new_revers); + setCgsFont(xw, win, gcWide, &(screen->fnts[fWide])); - if (ReverseGC(screen) != ReverseBoldGC(screen)) - XtReleaseGC((Widget) xw, ReverseBoldGC(screen)); - XtReleaseGC((Widget) xw, ReverseGC(screen)); + copyCgs(xw, win, gcWBold, gcWide); + setCgsFont(xw, win, gcWBold, &(screen->fnts[fWBold])); - NormalGC(screen) = new_normalGC; - NormalBoldGC(screen) = new_normalboldGC; - ReverseGC(screen) = new_reverseGC; - ReverseBoldGC(screen) = new_reverseboldGC; + setCgsFore(xw, win, gcWideReverse, new_revers); + setCgsBack(xw, win, gcWideReverse, new_normal); + setCgsFont(xw, win, gcWideReverse, &(screen->fnts[fWide])); - /* - * If we're switching fonts, free the old ones. Otherwise we'll leak - * the memory that is associated with the old fonts. The - * XLoadQueryFont call allocates a new XFontStruct. - */ - xtermCloseFonts(screen, screen->fnts); + copyCgs(xw, win, gcWBoldReverse, gcWideReverse); + setCgsFont(xw, win, gcWBoldReverse, &(screen->fnts[fWBold])); + } + }); - screen->fnts[fNorm] = fnts[fNorm]; - screen->fnts[fBold] = fnts[fBold]; -#if OPT_WIDE_CHARS - screen->fnts[fWide] = fnts[fWide]; - if (fnts[fWBold] == NULL) - fnts[fWBold] = fnts[fWide]; - screen->fnts[fWBold] = fnts[fWBold]; -#endif screen->fnt_prop = proportional; screen->fnt_boxes = True; @@ -1029,12 +1047,12 @@ xtermLoadFont(XtermWidget xw, continue; } #endif - if (xtermMissingChar(xw, n, fnts[fNorm])) { + if (xtermMissingChar(xw, n, fnts[fNorm].fs)) { TRACE(("missing normal char #%d\n", n)); screen->fnt_boxes = False; break; } - if (xtermMissingChar(xw, n, fnts[fBold])) { + if (xtermMissingChar(xw, n, fnts[fBold].fs)) { TRACE(("missing bold char #%d\n", n)); screen->fnt_boxes = False; break; @@ -1045,8 +1063,13 @@ xtermLoadFont(XtermWidget xw, screen->fnt_boxes ? "not " : "")); #endif - screen->enbolden = screen->bold_mode - && ((fnts[fNorm] == fnts[fBold]) || same_font_name(normal, myfonts.f_b)); + if (screen->always_bold_mode) { + screen->enbolden = screen->bold_mode; + } else { + screen->enbolden = screen->bold_mode + && ((fnts[fNorm].fs == fnts[fBold].fs) + || same_font_name(normal, myfonts.f_b)); + } TRACE(("Will %suse 1-pixel offset/overstrike to simulate bold\n", screen->enbolden ? "" : "not ")); @@ -1062,26 +1085,21 @@ xtermLoadFont(XtermWidget xw, True); } #if OPT_SHIFT_FONTS - screen->menu_font_sizes[fontnum] = FontSize(fnts[fNorm]); + screen->menu_font_sizes[fontnum] = FontSize(fnts[fNorm].fs); #endif } set_cursor_gcs(xw); xtermUpdateFontInfo(xw, doresize); + TRACE(("Success Cgs - xtermLoadFont\n")); return 1; bad: if (tmpname) free(tmpname); - if (new_normalGC) - XtReleaseGC((Widget) xw, new_normalGC); - if (new_normalboldGC && new_normalGC != new_normalboldGC) - XtReleaseGC((Widget) xw, new_normalboldGC); - if (new_reverseGC) - XtReleaseGC((Widget) xw, new_reverseGC); - if (new_reverseboldGC && new_reverseGC != new_reverseboldGC) - XtReleaseGC((Widget) xw, new_reverseboldGC); - - xtermCloseFonts(screen, fnts); + releaseWindowGCs(xw, win); + + xtermCloseFonts(xw, fnts); + TRACE(("Fail Cgs - xtermLoadFont\n")); return 0; } @@ -1104,7 +1122,7 @@ typedef struct { #define COPY_MENU_FONTS(src,dst) \ TRACE(("COPY_MENU_FONTS " #src " to " #dst "\n")); \ - for (n = fontMenu_fontdefault; n <= fontMenu_lastBuiltin; ++n) { \ + for (n = fontMenu_default; n <= fontMenu_lastBuiltin; ++n) { \ for (m = 0; m < fMAX; ++m) { \ dst.menu_font_names[n][m] = src.menu_font_names[n][m]; \ } \ @@ -1185,7 +1203,7 @@ xtermLoadVTFonts(XtermWidget w, char *myName, char *myClass) */ w->misc.default_font = subresourceRec.default_font; COPY_MENU_FONTS(subresourceRec, w->screen); - w->screen.MenuFontName(fontMenu_fontdefault) = w->misc.default_font.f_n; + w->screen.MenuFontName(fontMenu_default) = w->misc.default_font.f_n; } else { TRACE(("...no resources found\n")); status = False; @@ -1201,7 +1219,7 @@ isWideFont(XFontStruct * fp, char *tag, Bool nullOk) Bool result = False; (void) tag; - if (fp != 0) { + if (okFont(fp)) { unsigned count = countGlyphs(fp); TRACE(("isWideFont(%s) found %d cells\n", tag, count)); result = (count > 256) ? True : False; @@ -1226,15 +1244,15 @@ xtermLoadWideFonts(XtermWidget xw, Bool nullOk) TScreen *screen = &(xw->screen); Bool result; - if (EmptyFont(screen->fnts[fWide])) { - result = (isWideFont(screen->fnts[fNorm], "normal", nullOk) - && isWideFont(screen->fnts[fBold], "bold", nullOk)); + if (EmptyFont(screen->fnts[fWide].fs)) { + result = (isWideFont(screen->fnts[fNorm].fs, "normal", nullOk) + && isWideFont(screen->fnts[fBold].fs, "bold", nullOk)); } else { - result = (isWideFont(screen->fnts[fWide], "wide", nullOk) - && isWideFont(screen->fnts[fWBold], "wide-bold", nullOk)); + result = (isWideFont(screen->fnts[fWide].fs, "wide", nullOk) + && isWideFont(screen->fnts[fWBold].fs, "wide-bold", nullOk)); if (result && !screen->utf8_latin1) { - result = (isWideFont(screen->fnts[fNorm], "normal", nullOk) - && isWideFont(screen->fnts[fBold], "bold", nullOk)); + result = (isWideFont(screen->fnts[fNorm].fs, "normal", nullOk) + && isWideFont(screen->fnts[fBold].fs, "bold", nullOk)); } } if (!result) { @@ -1268,37 +1286,39 @@ HandleLoadVTFonts(Widget w, { static char empty[] = ""; /* appease strict compilers */ - XtermWidget xw = (XtermWidget) w; - char buf[80]; - char *myName = (*param_count > 0) ? params[0] : empty; - char *convert = (*param_count > 1) ? params[1] : myName; - char *myClass = (char *) MyStackAlloc(strlen(convert), buf); - int n; - - TRACE(("HandleLoadVTFonts(%d)\n", *param_count)); - strcpy(myClass, convert); - if (*param_count == 1 - && islower(CharOf(myClass[0]))) - myClass[0] = toupper(CharOf(myClass[0])); + if (IsXtermWidget(w)) { + XtermWidget xw = (XtermWidget) w; + char buf[80]; + char *myName = (*param_count > 0) ? params[0] : empty; + char *convert = (*param_count > 1) ? params[1] : myName; + char *myClass = (char *) MyStackAlloc(strlen(convert), buf); + int n; + + TRACE(("HandleLoadVTFonts(%d)\n", *param_count)); + strcpy(myClass, convert); + if (*param_count == 1 + && islower(CharOf(myClass[0]))) + myClass[0] = toupper(CharOf(myClass[0])); + + if (xtermLoadVTFonts(xw, myName, myClass)) { + /* + * When switching fonts, try to preserve the font-menu selection, since + * it is less surprising to do that (if the font-switching can be + * undone) than to switch to "Default". + */ + int font_number = xw->screen.menu_font_number; + if (font_number > fontMenu_lastBuiltin) + font_number = fontMenu_lastBuiltin; + for (n = 0; n < NMENUFONTS; ++n) + xw->screen.menu_font_sizes[n] = 0; + SetVTFont(xw, font_number, True, + ((font_number == fontMenu_default) + ? &(xw->misc.default_font) + : NULL)); + } - if (xtermLoadVTFonts(xw, myName, myClass)) { - /* - * When switching fonts, try to preserve the font-menu selection, since - * it is less surprising to do that (if the font-switching can be - * undone) than to switch to "Default". - */ - int font_number = xw->screen.menu_font_number; - if (font_number > fontMenu_lastBuiltin) - font_number = fontMenu_lastBuiltin; - for (n = 0; n < NMENUFONTS; ++n) - xw->screen.menu_font_sizes[n] = 0; - SetVTFont(xw, font_number, True, - ((font_number == fontMenu_fontdefault) - ? &(xw->misc.default_font) - : NULL)); + MyStackFree(myClass, buf); } - - MyStackFree(myClass, buf); } #endif /* OPT_LOAD_VTFONTS */ @@ -1356,12 +1376,90 @@ xtermOpenXft(Display * dpy, XftPattern * pat, const char *tag GCC_UNUSED) } #endif +#if OPT_RENDERFONT +#if OPT_SHIFT_FONTS +/* + * Don't make a dependency on the math library for a single function. + * (Newton Raphson). + */ +static double +mySquareRoot(double value) +{ + double result = 0.0; + if (value > 0.0) { + int n; + double older = value; + for (n = 0; n < 10; ++n) { + double delta = (older * older - value) / (2.0 * older); + double newer = older - delta; + older = newer; + result = newer; + if (delta > -0.001 && delta < 0.001) + break; + } + } + return result; +} +#endif + +/* + * 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, VTwin * win, XftFont * font, const char *tag) +{ + if (font != 0) { + int width, height, ascent, descent; + + (void) screen; + + 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 */ void xtermComputeFontInfo(XtermWidget xw, - struct _vtwin *win, + VTwin * win, XFontStruct * font, int sbwidth) { @@ -1391,50 +1489,103 @@ xtermComputeFontInfo(XtermWidget xw, 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 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; + 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 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. + * By observation (there is no documentation), XftPatternBuild is + * cumulative. Build the bold- and italic-patterns on top of the + * normal pattern. */ - 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)); - } -#endif +#define NormXftPattern \ + XFT_FAMILY, XftTypeString, "mono", \ + XFT_SIZE, XftTypeDouble, face_size, \ + XFT_SPACING, XftTypeInteger, XFT_MONO + +#define BoldXftPattern(norm) \ + XFT_WEIGHT, XftTypeInteger, XFT_WEIGHT_BOLD, \ + XFT_CHAR_WIDTH, XftTypeInteger, norm->max_advance_width + +#define ItalXftPattern(norm) \ + XFT_SLANT, XftTypeInteger, XFT_SLANT_ITALIC, \ + XFT_CHAR_WIDTH, XftTypeInteger, norm->max_advance_width if ((pat = XftNameParse(xw->misc.face_name)) != 0) { XftPatternBuild(pat, - XFT_FAMILY, XftTypeString, "mono", - XFT_SIZE, XftTypeDouble, face_size, - XFT_SPACING, XftTypeInteger, XFT_MONO, + NormXftPattern, (void *) 0); norm = xtermOpenXft(dpy, pat, "normal"); if (norm != 0) { XftPatternBuild(pat, - XFT_WEIGHT, XftTypeInteger, XFT_WEIGHT_BOLD, - XFT_CHAR_WIDTH, XftTypeInteger, norm->max_advance_width, + BoldXftPattern(norm), (void *) 0); bold = xtermOpenXft(dpy, pat, "bold"); #if OPT_ISO_COLORS - if (screen->italicULMode) { + if (screen->italicULMode + && (pat = XftNameParse(xw->misc.face_name)) != 0) { XftPatternBuild(pat, - XFT_SLANT, XftTypeInteger, XFT_SLANT_ITALIC, - XFT_CHAR_WIDTH, XftTypeInteger, norm->max_advance_width, + NormXftPattern, + ItalXftPattern(norm), (void *) 0); ital = xtermOpenXft(dpy, pat, "italic"); } @@ -1472,35 +1623,35 @@ xtermComputeFontInfo(XtermWidget xw, face_name, char_width)); - if ((pat = XftNameParse(xw->misc.face_name)) != 0) { +#define WideXftPattern \ + XFT_FAMILY, XftTypeString, "mono", \ + XFT_SIZE, XftTypeDouble, face_size, \ + XFT_SPACING, XftTypeInteger, XFT_MONO + + if ((pat = XftNameParse(face_name)) != 0) { XftPatternBuild(pat, - XFT_FAMILY, XftTypeString, face_name, - XFT_SIZE, XftTypeDouble, face_size, - XFT_SPACING, XftTypeInteger, XFT_MONO, + WideXftPattern, XFT_CHAR_WIDTH, XftTypeInteger, char_width, (void *) 0); wnorm = xtermOpenXft(dpy, pat, "wide"); if (wnorm != 0) { XftPatternBuild(pat, - XFT_FAMILY, XftTypeString, face_name, - XFT_SIZE, XftTypeDouble, face_size, - XFT_SPACING, XftTypeInteger, XFT_MONO, - XFT_CHAR_WIDTH, XftTypeInteger, char_width, - XFT_WEIGHT, XftTypeInteger, XFT_WEIGHT_BOLD, + WideXftPattern, + BoldXftPattern(wnorm), (void *) 0); wbold = xtermOpenXft(dpy, pat, "wide-bold"); - if (screen->italicULMode) { +#if OPT_ISO_COLORS + if (screen->italicULMode + && (pat = XftNameParse(face_name)) != 0) { XftPatternBuild(pat, - XFT_FAMILY, XftTypeString, face_name, - XFT_SIZE, XftTypeDouble, face_size, - XFT_SPACING, XftTypeInteger, XFT_MONO, - XFT_CHAR_WIDTH, XftTypeInteger, char_width, - XFT_SLANT, XftTypeInteger, XFT_SLANT_ITALIC, + WideXftPattern, + ItalXftPattern(wnorm), (void *) 0); wital = xtermOpenXft(dpy, pat, "wide-italic"); } +#endif } XftPatternDestroy(pat); } @@ -1509,24 +1660,23 @@ xtermComputeFontInfo(XtermWidget xw, 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); @@ -1575,18 +1725,18 @@ xtermUpdateFontInfo(XtermWidget xw, Bool doresize) TScreen *screen = &(xw->screen); int scrollbar_width; - struct _vtwin *win = &(screen->fullVwin); + VTwin *win = &(screen->fullVwin); scrollbar_width = (xw->misc.scrollbar ? (screen->scrollWidget->core.width + BorderWidth(screen->scrollWidget)) : 0); - xtermComputeFontInfo(xw, win, screen->fnts[fNorm], scrollbar_width); - xtermSaveFontInfo(screen, screen->fnts[fNorm]); + xtermComputeFontInfo(xw, win, screen->fnts[fNorm].fs, scrollbar_width); + xtermSaveFontInfo(screen, screen->fnts[fNorm].fs); if (doresize) { if (VWindow(screen)) { - XClearWindow(screen->display, VWindow(screen)); + xtermClear(xw); } TRACE(("xtermUpdateFontInfo {{\n")); DoResizeScreen(xw); /* set to the new natural size */ @@ -1625,7 +1775,7 @@ xtermMissingChar(XtermWidget xw, unsigned ch, XFontStruct * font) } #if OPT_WIDE_CHARS else { - CI_GET_CHAR_INFO_2D(font, (ch >> 8), (ch & 0xff), tmp, pc); + CI_GET_CHAR_INFO_2D(font, HI_BYTE(ch), LO_BYTE(ch), tmp, pc); } #else @@ -1638,7 +1788,7 @@ xtermMissingChar(XtermWidget xw, unsigned ch, XFontStruct * font) return True; } } - if (ch < 32 + if (xtermIsDecGraphic(ch) && xw->screen.force_box_chars) { TRACE(("xtermMissingChar %#04x (forced off)\n", ch)); return True; @@ -1677,41 +1827,42 @@ xtermDrawBoxChar(XtermWidget xw, unsigned flags, GC gc, int x, - int y) + int y, + int cells) { TScreen *screen = &(xw->screen); /* *INDENT-OFF* */ static const short glyph_ht[] = { - SEG( 0, 0, 0, 5*MID_HIGH/6), /* H */ + SEG(1*BOX_WIDE/10, 0, 1*BOX_WIDE/10,5*MID_HIGH/6), /* H */ SEG(6*BOX_WIDE/10, 0, 6*BOX_WIDE/10,5*MID_HIGH/6), - SEG( 0, 5*MID_HIGH/12,6*BOX_WIDE/10,5*MID_HIGH/12), + SEG(1*BOX_WIDE/10,5*MID_HIGH/12,6*BOX_WIDE/10,5*MID_HIGH/12), SEG(2*BOX_WIDE/10, MID_HIGH, CHR_WIDE, MID_HIGH), /* T */ SEG(6*BOX_WIDE/10, MID_HIGH, 6*BOX_WIDE/10, CHR_HIGH), -1 }, glyph_ff[] = { - SEG( 0, 0, 6*BOX_WIDE/10, 0), /* F */ - SEG( 0, 5*MID_HIGH/12,6*CHR_WIDE/12,5*MID_HIGH/12), - SEG( 0, 0, 0*BOX_WIDE/3, 5*MID_HIGH/6), + SEG(1*BOX_WIDE/10, 0, 6*BOX_WIDE/10, 0), /* F */ + SEG(1*BOX_WIDE/10,5*MID_HIGH/12,6*CHR_WIDE/12,5*MID_HIGH/12), + SEG(1*BOX_WIDE/10, 0, 0*BOX_WIDE/3, 5*MID_HIGH/6), SEG(1*BOX_WIDE/3, MID_HIGH, CHR_WIDE, MID_HIGH), /* F */ SEG(1*BOX_WIDE/3, 8*MID_HIGH/6,10*CHR_WIDE/12,8*MID_HIGH/6), SEG(1*BOX_WIDE/3, MID_HIGH, 1*BOX_WIDE/3, CHR_HIGH), -1 }, glyph_lf[] = { - SEG( 0, 0, 0, 5*MID_HIGH/6), /* L */ - SEG( 0, 5*MID_HIGH/6, 6*BOX_WIDE/10,5*MID_HIGH/6), + SEG(1*BOX_WIDE/10, 0, 1*BOX_WIDE/10,9*MID_HIGH/12), /* L */ + SEG(1*BOX_WIDE/10,9*MID_HIGH/12,6*BOX_WIDE/10,9*MID_HIGH/12), SEG(1*BOX_WIDE/3, MID_HIGH, CHR_WIDE, MID_HIGH), /* F */ SEG(1*BOX_WIDE/3, 8*MID_HIGH/6,10*CHR_WIDE/12,8*MID_HIGH/6), SEG(1*BOX_WIDE/3, MID_HIGH, 1*BOX_WIDE/3, CHR_HIGH), -1 }, glyph_nl[] = { - SEG( 0, 5*MID_HIGH/6, 0, 0), /* N */ - SEG( 0, 0, 5*BOX_WIDE/6, 5*MID_HIGH/6), + SEG(1*BOX_WIDE/10,5*MID_HIGH/6, 1*BOX_WIDE/10, 0), /* N */ + SEG(1*BOX_WIDE/10, 0, 5*BOX_WIDE/6, 5*MID_HIGH/6), SEG(5*BOX_WIDE/6, 5*MID_HIGH/6, 5*BOX_WIDE/6, 0), SEG(1*BOX_WIDE/3, MID_HIGH, 1*BOX_WIDE/3, CHR_HIGH), /* L */ SEG(1*BOX_WIDE/3, CHR_HIGH, CHR_WIDE, CHR_HIGH), -1 }, glyph_vt[] = { - SEG( 0, 0, 5*BOX_WIDE/12,5*MID_HIGH/6), /* V */ + SEG(1*BOX_WIDE/10, 0, 5*BOX_WIDE/12,5*MID_HIGH/6), /* V */ SEG(5*BOX_WIDE/12,5*MID_HIGH/6, 5*BOX_WIDE/6, 0), SEG(2*BOX_WIDE/10, MID_HIGH, CHR_WIDE, MID_HIGH), /* T */ SEG(6*BOX_WIDE/10, MID_HIGH, 6*BOX_WIDE/10, CHR_HIGH), @@ -1854,13 +2005,16 @@ xtermDrawBoxChar(XtermWidget xw, 0, /* 1F bullet */ }; - XGCValues values; - unsigned long mask; GC gc2; + CgsEnum cgsId = (ch == 2) ? gcDots : gcLine; + VTwin *cgsWin = WhichVWin(screen); const short *p; unsigned font_width = ((flags & DOUBLEWFONT) ? 2 : 1) * screen->fnt_wide; unsigned font_height = ((flags & DOUBLEHFONT) ? 2 : 1) * screen->fnt_high; + if (cells > 1) + font_width *= cells; + #if OPT_WIDE_CHARS /* * Try to show line-drawing characters if we happen to be in UTF-8 @@ -1875,9 +2029,10 @@ xtermDrawBoxChar(XtermWidget xw, unsigned n; for (n = 1; n < 32; n++) { if (dec2ucs(n) == ch - && !xtermMissingChar(xw, n, (flags & BOLD) - ? screen->fnts[fBold] - : screen->fnts[fNorm])) { + && !xtermMissingChar(xw, n, + ((flags & BOLD) + ? screen->fnts[fBold].fs + : screen->fnts[fNorm].fs))) { TRACE(("...use xterm-style linedrawing\n")); ch = n; break; @@ -1892,30 +2047,16 @@ xtermDrawBoxChar(XtermWidget xw, ? "-BAD" : ""))); - memset(&values, 0, sizeof(values)); - if (!XGetGCValues(screen->display, gc, GCBackground, &values)) - return; - - mask = GCForeground; - if (ch == 2) { - values.tile = - XmuCreateStippledPixmap(XtScreen((Widget) xw), - getXtermForeground(xw, xw->flags, xw->cur_foreground), - getXtermBackground(xw, xw->flags, xw->cur_background), - xw->core.depth); - if (values.stipple != XtUnspecifiedPixmap) { - mask |= GCBackground | GCTile | GCFillStyle; - values.fill_style = FillTiled; - } else { - ch = (unsigned) (~0); /* make this not match anything */ - } + if (cgsId == gcDots) { + setCgsFont(xw, cgsWin, cgsId, getCgsFont(xw, cgsWin, gc)); + setCgsFore(xw, cgsWin, cgsId, getCgsFore(xw, cgsWin, gc)); + setCgsBack(xw, cgsWin, cgsId, getCgsBack(xw, cgsWin, gc)); } else { - values.foreground = values.background; + setCgsFont(xw, cgsWin, cgsId, getCgsFont(xw, cgsWin, gc)); + setCgsFore(xw, cgsWin, cgsId, getCgsBack(xw, cgsWin, gc)); + setCgsBack(xw, cgsWin, cgsId, getCgsBack(xw, cgsWin, gc)); } - gc2 = XCreateGC(screen->display, - VWindow(screen), - mask, - &values); + gc2 = getCgsGC(xw, cgsWin, cgsId); if (!(flags & NOBACKGROUND)) { XFillRectangle(screen->display, VWindow(screen), gc2, x, y, @@ -1923,7 +2064,11 @@ xtermDrawBoxChar(XtermWidget xw, font_height); } - XCopyGC(screen->display, gc, (1 << GCLastBit) - 1, gc2); + setCgsFont(xw, cgsWin, cgsId, getCgsFont(xw, cgsWin, gc)); + setCgsFore(xw, cgsWin, cgsId, getCgsFore(xw, cgsWin, gc)); + setCgsBack(xw, cgsWin, cgsId, getCgsBack(xw, cgsWin, gc)); + gc2 = getCgsGC(xw, cgsWin, cgsId); + XSetLineAttributes(screen->display, gc2, (flags & BOLD) ? ((font_height > 12) @@ -1943,13 +2088,13 @@ xtermDrawBoxChar(XtermWidget xw, points[0].x = MID_WIDE; points[0].y = BOX_HIGH / 4; - points[1].x = 3 * BOX_WIDE / 4; + points[1].x = 8 * BOX_WIDE / 8; points[1].y = MID_HIGH; points[2].x = points[0].x; points[2].y = 3 * BOX_HIGH / 4; - points[3].x = BOX_WIDE / 4; + points[3].x = 0 * BOX_WIDE / 8; points[3].y = points[1].y; points[4].x = points[0].x; @@ -1966,8 +2111,6 @@ xtermDrawBoxChar(XtermWidget xw, VWindow(screen), gc2, points, npoints, Convex, CoordModeOrigin); - } else if (ch == 2) { /* box */ - XmuReleaseStippledPixmap(XtScreen((Widget) xw), values.tile); } else if (ch == 7) { /* degrees */ unsigned width = (BOX_WIDE / 3); int x_coord = MID_WIDE - (width / 2); @@ -1991,7 +2134,7 @@ xtermDrawBoxChar(XtermWidget xw, SCALE_Y(y_coord); SCALE_X(width); - XFillArc(screen->display, + XDrawArc(screen->display, VWindow(screen), gc2, x + x_coord, y + y_coord, width, width, 0, @@ -2020,11 +2163,9 @@ xtermDrawBoxChar(XtermWidget xw, font_width - 1, font_height - 1); } - - XFreeGC(screen->display, gc2); } -#if OPT_RENDERFONT && OPT_WIDE_CHARS +#if OPT_RENDERFONT /* * Check if the given character has a glyph known to Xft. @@ -2037,52 +2178,18 @@ xtermXftMissing(XtermWidget xw, XftFont * font, unsigned wc) Bool result = False; if (font != 0) { - unsigned check = XftCharIndex(xw->screen.display, font, wc); - - if (check == 0) { - TRACE(("missingXft %d (%d)\n", wc, ucs2dec(wc))); + if (!XftGlyphExists(xw->screen.display, font, wc)) { +#if OPT_WIDE_CHARS + TRACE(("xtermXftMissing %d (dec=%#x, ucs=%#x)\n", + wc, ucs2dec(wc), dec2ucs(wc))); +#else + TRACE(("xtermXftMissing %d\n", wc)); +#endif result = True; } } return result; } - -/* - * Check if the character corresponds to one of xterm's internal codes for - * line-drawing characters. That is only a subset of the 1-31 codes used for - * graphic characters. We want to know specifically about the line-drawing - * characters because the fonts used by Xft do not always give useful glyphs - * for line-drawing, and there is no reliable way to detect this. - */ -Bool -xtermIsLineDrawing(unsigned wc) -{ - Bool result; - switch (wc) { - case 0x0B: /* lower_right_corner */ - case 0x0C: /* upper_right_corner */ - case 0x0D: /* upper_left_corner */ - case 0x0E: /* lower_left_corner */ - case 0x0F: /* cross */ - case 0x10: /* scan_line_1 */ - case 0x11: /* scan_line_3 */ - case 0x12: /* scan_line_7 */ - case 0x13: /* scan_line_9 */ - case 0x14: /* horizontal_line */ - case 0x15: /* left_tee */ - case 0x16: /* right_tee */ - case 0x17: /* bottom_tee */ - case 0x18: /* top_tee */ - case 0x19: /* vertical_line */ - result = True; - TRACE(("xtermIsLineDrawing %d\n", wc)); - break; - default: - result = False; - break; - } - return result; -} #endif /* OPT_RENDERFONT && OPT_WIDE_CHARS */ #endif /* OPT_BOX_CHARS */ @@ -2140,7 +2247,7 @@ unsigned dec2ucs(unsigned ch) { unsigned result = ch; - if (ch < 32) { + if (xtermIsDecGraphic(ch)) { switch (ch) { MY_UCS(0x25ae, 0); /* black vertical rectangle */ MY_UCS(0x25c6, 1); /* black diamond */ @@ -2182,23 +2289,21 @@ dec2ucs(unsigned ch) #endif /* OPT_WIDE_CHARS */ #if OPT_SHIFT_FONTS -static XFontStruct * -xtermFindFont(TScreen * screen, int fontnum) -{ - return xtermOpenFont(screen, screen->MenuFontName(fontnum)); -} - static void -lookupOneFontSize(TScreen * screen, int fontnum) +lookupOneFontSize(XtermWidget xw, int fontnum) { + TScreen *screen = TScreenOf(xw); + if (screen->menu_font_sizes[fontnum] == 0) { - XFontStruct *fs = xtermFindFont(screen, fontnum); + XTermFonts fnt; + + memset(&fnt, 0, sizeof(fnt)); screen->menu_font_sizes[fontnum] = -1; - if (fs != 0) { - screen->menu_font_sizes[fontnum] = FontSize(fs); + if (xtermOpenFont(xw, screen->MenuFontName(fontnum), &fnt)) { + screen->menu_font_sizes[fontnum] = FontSize(fnt.fs); TRACE(("menu_font_sizes[%d] = %ld\n", fontnum, screen->menu_font_sizes[fontnum])); - xtermCloseFont(screen, fs); + xtermCloseFont(xw, &fnt); } } } @@ -2207,12 +2312,12 @@ lookupOneFontSize(TScreen * screen, int fontnum) * Cache the font-sizes so subsequent larger/smaller font actions will go fast. */ static void -lookupFontSizes(TScreen * screen) +lookupFontSizes(XtermWidget xw) { int n; for (n = 0; n < NMENUFONTS; n++) { - lookupOneFontSize(screen, n); + lookupOneFontSize(xw, n); } } @@ -2221,12 +2326,13 @@ lookupFontSizes(TScreen * screen) * and its magnitude), starting from the 'old' index. */ int -lookupRelativeFontSize(TScreen * screen, int old, int relative) +lookupRelativeFontSize(XtermWidget xw, int old, int relative) { + TScreen *screen = TScreenOf(xw); int n, m = -1; if (!IsIcon(screen)) { - lookupFontSizes(screen); + lookupFontSizes(xw); if (relative != 0) { for (n = 0; n < NMENUFONTS; ++n) { if (screen->menu_font_sizes[n] > 0 && @@ -2248,9 +2354,9 @@ lookupRelativeFontSize(TScreen * screen, int old, int relative) } if (m >= 0) { if (relative > 1) - m = lookupRelativeFontSize(screen, m, relative - 1); + m = lookupRelativeFontSize(xw, m, relative - 1); else if (relative < -1) - m = lookupRelativeFontSize(screen, m, relative + 1); + m = lookupRelativeFontSize(xw, m, relative + 1); } } } @@ -2264,17 +2370,19 @@ HandleLargerFont(Widget w GCC_UNUSED, String * params GCC_UNUSED, Cardinal *param_count GCC_UNUSED) { - XtermWidget xw = (XtermWidget) w; + if (IsXtermWidget(w)) { + XtermWidget xw = (XtermWidget) w; - if (xw->misc.shift_fonts) { - TScreen *screen = &xw->screen; - int m; + if (xw->misc.shift_fonts) { + TScreen *screen = &xw->screen; + int m; - m = lookupRelativeFontSize(screen, screen->menu_font_number, 1); - if (m >= 0) { - SetVTFont(xw, m, True, NULL); - } else { - Bell(XkbBI_MinorError, 0); + m = lookupRelativeFontSize(xw, screen->menu_font_number, 1); + if (m >= 0) { + SetVTFont(xw, m, True, NULL); + } else { + Bell(XkbBI_MinorError, 0); + } } } } @@ -2286,22 +2394,68 @@ HandleSmallerFont(Widget w GCC_UNUSED, String * params GCC_UNUSED, Cardinal *param_count GCC_UNUSED) { - XtermWidget xw = (XtermWidget) w; + if (IsXtermWidget(w)) { + XtermWidget xw = (XtermWidget) w; - if (xw->misc.shift_fonts) { - TScreen *screen = &xw->screen; - int m; + if (xw->misc.shift_fonts) { + TScreen *screen = &xw->screen; + int m; - m = lookupRelativeFontSize(screen, screen->menu_font_number, -1); - if (m >= 0) { - SetVTFont(xw, m, True, NULL); - } else { - Bell(XkbBI_MinorError, 0); + m = lookupRelativeFontSize(xw, screen->menu_font_number, -1); + if (m >= 0) { + SetVTFont(xw, m, True, NULL); + } else { + Bell(XkbBI_MinorError, 0); + } } } } #endif +int +xtermGetFont(const char *param) +{ + int fontnum; + + switch (param[0]) { + case 'd': + case 'D': + case '0': + fontnum = fontMenu_default; + break; + case '1': + fontnum = fontMenu_font1; + break; + case '2': + fontnum = fontMenu_font2; + break; + case '3': + fontnum = fontMenu_font3; + break; + case '4': + fontnum = fontMenu_font4; + break; + case '5': + fontnum = fontMenu_font5; + break; + case '6': + fontnum = fontMenu_font6; + break; + case 'e': + case 'E': + fontnum = fontMenu_fontescape; + break; + case 's': + case 'S': + fontnum = fontMenu_fontsel; + break; + default: + fontnum = -1; + break; + } + return fontnum; +} + /* ARGSUSED */ void HandleSetFont(Widget w GCC_UNUSED, @@ -2309,81 +2463,67 @@ HandleSetFont(Widget w GCC_UNUSED, String * params, Cardinal *param_count) { - int fontnum; - VTFontNames fonts; + if (IsXtermWidget(w)) { + int fontnum; + VTFontNames fonts; - memset(&fonts, 0, sizeof(fonts)); + memset(&fonts, 0, sizeof(fonts)); - if (*param_count == 0) { - fontnum = fontMenu_fontdefault; - } else { - Cardinal maxparams = 1; /* total number of params allowed */ - - switch (params[0][0]) { - case 'd': - case 'D': - case '0': - fontnum = fontMenu_fontdefault; - break; - case '1': - fontnum = fontMenu_font1; - break; - case '2': - fontnum = fontMenu_font2; - break; - case '3': - fontnum = fontMenu_font3; - break; - case '4': - fontnum = fontMenu_font4; - break; - case '5': - fontnum = fontMenu_font5; - break; - case '6': - fontnum = fontMenu_font6; - break; - case 'e': - case 'E': - fontnum = fontMenu_fontescape; + if (*param_count == 0) { + fontnum = fontMenu_default; + } else { + Cardinal maxparams = 1; /* total number of params allowed */ + int result = xtermGetFont(params[0]); + + switch (result) { + case fontMenu_default: /* FALLTHRU */ + case fontMenu_font1: /* FALLTHRU */ + case fontMenu_font2: /* FALLTHRU */ + case fontMenu_font3: /* FALLTHRU */ + case fontMenu_font4: /* FALLTHRU */ + case fontMenu_font5: /* FALLTHRU */ + case fontMenu_font6: /* FALLTHRU */ + break; + case fontMenu_fontescape: #if OPT_WIDE_CHARS - maxparams = 5; + maxparams = 5; #else - maxparams = 3; + maxparams = 3; #endif - break; - case 's': - case 'S': - fontnum = fontMenu_fontsel; - maxparams = 2; - break; - default: - Bell(XkbBI_MinorError, 0); - return; - } - if (*param_count > maxparams) { /* see if extra args given */ - Bell(XkbBI_MinorError, 0); - return; - } - switch (*param_count) { /* assign 'em */ + break; + case fontMenu_fontsel: + maxparams = 2; + break; + default: + Bell(XkbBI_MinorError, 0); + return; + } + fontnum = result; + + if (*param_count > maxparams) { /* see if extra args given */ + Bell(XkbBI_MinorError, 0); + return; + } + switch (*param_count) { /* assign 'em */ #if OPT_WIDE_CHARS - case 5: - fonts.f_wb = params[4]; - /* FALLTHRU */ - case 4: - fonts.f_w = params[3]; - /* FALLTHRU */ + case 5: + fonts.f_wb = params[4]; + /* FALLTHRU */ + case 4: + fonts.f_w = params[3]; + /* FALLTHRU */ #endif - case 3: - fonts.f_b = params[2]; - /* FALLTHRU */ - case 2: - fonts.f_n = params[1]; - break; + case 3: + fonts.f_b = params[2]; + /* FALLTHRU */ + case 2: + fonts.f_n = params[1]; + break; + } } - } - SetVTFont((XtermWidget) w, fontnum, True, &fonts); + SetVTFont((XtermWidget) w, fontnum, True, &fonts); + } } void @@ -2411,6 +2551,8 @@ SetVTFont(XtermWidget xw, FindFontSelection(xw, myfonts.f_n, False); return; } else { + int oldFont = screen->menu_font_number; + #define USE_CACHED(field, name) \ if (myfonts.field == 0) { \ myfonts.field = screen->menu_font_names[which][name]; \ @@ -2429,6 +2571,10 @@ SetVTFont(XtermWidget xw, &myfonts, doresize, which)) { return; + } else { + xtermLoadFont(xw, + xtermFontName(screen->MenuFontName(oldFont)), + doresize, oldFont); } } } diff --git a/app/xterm/main.c b/app/xterm/main.c index 7011fb0cd..80e08a74f 100644 --- a/app/xterm/main.c +++ b/app/xterm/main.c @@ -1,4 +1,4 @@ -/* $XTermId: main.c,v 1.582 2008/01/15 23:58:01 tom Exp $ */ +/* $XTermId: main.c,v 1.586 2008/02/28 00:28:00 Matthieu.Herrb Exp $ */ /* * W A R N I N G @@ -429,6 +429,10 @@ extern struct utmp *getutid __((struct utmp * _Id)); #undef ECHOCTL #endif +#if defined(HAVE_SYS_TTYDEFAULTS_H) && !defined(CEOF) +#include <sys/ttydefaults.h> +#endif + #ifdef X_NOT_POSIX extern long lseek(); #if defined(USG) || defined(SVR4) @@ -536,7 +540,7 @@ static char **command_to_exec_with_luit = NULL; #define CINTR CONTROL('C') #endif #ifndef CKILL -#define CKILL CTRL('U') /* was '@' */ +#define CKILL CONTROL('U') /* was '@' */ #endif #ifndef CLNEXT #define CLNEXT CONTROL('V') @@ -816,6 +820,14 @@ static sigjmp_buf env; strncpy(dst, host, sizeof(dst)); \ } +#ifdef HAVE_UTMP_UT_SYSLEN +# define SetUtmpSysLen(utmp) \ + { \ + utmp.ut_host[sizeof(utmp.ut_host)-1] = '\0'; \ + utmp.ut_syslen = strlen(utmp.ut_host) + 1; \ + } +#endif + /* used by VT (charproc.c) */ static XtResource application_resources[] = @@ -4011,6 +4023,10 @@ spawnXTerm(XtermWidget xw) #ifdef HAVE_UTMP_UT_HOST SetUtmpHost(utmp.ut_host, screen); #endif +#ifdef HAVE_UTMP_UT_SYSLEN + SetUtmpSysLen(utmp); +#endif + (void) strncpy(utmp.ut_name, (login_name) ? login_name : "????", sizeof(utmp.ut_name)); @@ -4072,6 +4088,10 @@ spawnXTerm(XtermWidget xw) #ifdef HAVE_UTMP_UT_HOST SetUtmpHost(utmp.ut_host, screen); #endif +#ifdef HAVE_UTMP_UT_SYSLEN + SetUtmpSysLen(utmp); +#endif + utmp.ut_time = time((time_t *) 0); lseek(i, (long) (tslot * sizeof(utmp)), 0); write(i, (char *) &utmp, sizeof(utmp)); diff --git a/app/xterm/ptydata.c b/app/xterm/ptydata.c index 641f0a4f0..055e51c82 100644 --- a/app/xterm/ptydata.c +++ b/app/xterm/ptydata.c @@ -1,4 +1,4 @@ -/* $XTermId: ptydata.c,v 1.74 2006/07/11 21:53:15 tom Exp $ */ +/* $XTermId: ptydata.c,v 1.79 2008/02/21 22:19:03 tom Exp $ */ /* * $XFree86: xc/programs/xterm/ptydata.c,v 1.25 2006/02/13 01:14:59 dickey Exp $ @@ -6,7 +6,7 @@ /************************************************************ -Copyright 1999-2005,2006 by Thomas E. Dickey +Copyright 1999-2006,2007 by Thomas E. Dickey All Rights Reserved @@ -62,7 +62,7 @@ authorization. * Convert the 8-bit codes in data->buffer[] into Unicode in data->utf_data. * The number of bytes converted will be nonzero iff there is data. */ -static Bool +Bool decodeUtf8(PtyData * data) { int i; @@ -110,22 +110,21 @@ decodeUtf8(PtyData * data) if (!utf_char && !((c & 0x7f) >> (7 - utf_count))) { utf_char = UCS_REPL; } - /* characters outside UCS-2 become UCS_REPL */ - if (utf_char > 0x03ff) { - /* value would be >0xffff */ - utf_char = UCS_REPL; - } else { - utf_char <<= 6; - utf_char |= (c & 0x3f); - } + utf_char <<= 6; + utf_char |= (c & 0x3f); if ((utf_char >= 0xd800 && utf_char <= 0xdfff) || (utf_char == 0xfffe) || - (utf_char == 0xffff)) { + (utf_char == HIDDEN_CHAR)) { utf_char = UCS_REPL; } utf_count--; if (utf_count == 0) { + /* characters outside UCS-2 become UCS_REPL */ + if (utf_char > 0xffff) { + TRACE(("using replacement for %#x\n", utf_char)); + utf_char = UCS_REPL; + } data->utf_data = utf_char; data->utf_size = (i + 1); break; @@ -249,7 +248,7 @@ readPtyData(TScreen * screen, PtySelect * select_mask, PtyData * data) */ #if OPT_WIDE_CHARS Bool -morePtyData(TScreen * screen GCC_UNUSED, PtyData * data) +morePtyData(TScreen * screen, PtyData * data) { Bool result = (data->last > data->next); if (result && screen->utf8_inparse) { @@ -272,9 +271,7 @@ nextPtyData(TScreen * screen, PtyData * data) { IChar result; if (screen->utf8_inparse) { - result = data->utf_data; - data->next += data->utf_size; - data->utf_size = 0; + result = skipPtyData(data); } else { result = *((data)->next++); if (!screen->output_eight_bits) @@ -283,6 +280,20 @@ nextPtyData(TScreen * screen, PtyData * data) TRACE2(("nextPtyData returns %#x\n", result)); return result; } + +/* + * Simply return the data and skip past it. + */ +IChar +skipPtyData(PtyData * data) +{ + IChar result = data->utf_data; + + data->next += data->utf_size; + data->utf_size = 0; + + return result; +} #endif #if OPT_WIDE_CHARS @@ -302,6 +313,9 @@ switchPtyData(TScreen * screen, int flag) } #endif +/* + * Allocate a buffer. + */ void initPtyData(PtyData ** result) { @@ -329,6 +343,23 @@ initPtyData(PtyData ** result) } /* + * Initialize a buffer for the caller, using its data in 'source'. + */ +#if OPT_WIDE_CHARS +PtyData * +fakePtyData(PtyData * result, Char * next, Char * last) +{ + PtyData *data = result; + + memset(data, 0, sizeof(*data)); + data->next = next; + data->last = last; + + return data; +} +#endif + +/* * Remove used data by shifting the buffer down, to make room for more data, * e.g., a continuation-read. */ diff --git a/app/xterm/ptyx.h b/app/xterm/ptyx.h index 844758dda..692b0443c 100644 --- a/app/xterm/ptyx.h +++ b/app/xterm/ptyx.h @@ -1,4 +1,4 @@ -/* $XTermId: ptyx.h,v 1.510 2008/01/31 01:01:52 tom Exp $ */ +/* $XTermId: ptyx.h,v 1.513 2008/02/25 00:05:13 tom Exp $ */ /* * Copyright 1999-2007,2008 by Thomas E. Dickey @@ -1010,6 +1010,9 @@ extern int A2E(int); /***====================================================================***/ +#define LO_BYTE(ch) ((ch) & 0xff) +#define HI_BYTE(ch) ((ch) >> 8) + #if OPT_WIDE_CHARS #define if_OPT_WIDE_CHARS(screen, code) if(screen->wide_chars) code #define if_WIDE_OR_NARROW(screen, wide, narrow) if(screen->wide_chars) wide else narrow @@ -1627,6 +1630,7 @@ typedef struct { EventMode eventMode; Time selection_time; /* latest event timestamp */ Time lastButtonUpTime; + unsigned lastButton; CELL rawPos; /* raw position for selection start */ CELL startRaw; /* area before selectUnit processing */ diff --git a/app/xterm/scrollbar.c b/app/xterm/scrollbar.c index 023b5c3bb..c82da89de 100644 --- a/app/xterm/scrollbar.c +++ b/app/xterm/scrollbar.c @@ -1,9 +1,9 @@ -/* $XTermId: scrollbar.c,v 1.124 2006/07/23 19:48:49 tom Exp $ */ +/* $XTermId: scrollbar.c,v 1.134 2008/02/28 01:07:30 tom Exp $ */ /* $XFree86: xc/programs/xterm/scrollbar.c,v 3.48 2006/02/13 01:14:59 dickey Exp $ */ /* - * Copyright 2000-2005,2006 by Thomas E. Dickey + * Copyright 2000-2007,2008 by Thomas E. Dickey * * All Rights Reserved * @@ -100,13 +100,10 @@ DoResizeScreen(XtermWidget xw) int border = 2 * xw->screen.border; int min_wide = border + xw->screen.fullVwin.sb_info.width; int min_high = border; -#if 1 /* ndef nothack */ - long supp; -#endif XtGeometryResult geomreqresult; Dimension reqWidth, reqHeight, repWidth, repHeight; #ifndef NO_ACTIVE_ICON - struct _vtwin *saveWin = WhichVWin(screen); + VTwin *saveWin = WhichVWin(screen); /* all units here want to be in the normal font units */ WhichVWin(screen) = &screen->fullVwin; @@ -164,9 +161,7 @@ DoResizeScreen(XtermWidget xw) */ TRACE(("%s@%d -- ", __FILE__, __LINE__)); TRACE_WM_HINTS(xw); - if (!XGetWMNormalHints(screen->display, XtWindow(SHELL_OF(xw)), - &xw->hints, &supp)) - bzero(&xw->hints, sizeof(xw->hints)); + getXtermSizeHints(xw); xtermSizeHints(xw, ScrollbarWidth(screen)); @@ -197,6 +192,13 @@ DoResizeScreen(XtermWidget xw) geomreqresult = XtMakeResizeRequest((Widget) xw, repWidth, repHeight, NULL, NULL); } + + if (geomreqresult != XtGeometryYes) { + /* The resize wasn't successful, so we might need to adjust + our idea of how large the screen is. */ + TRACE(("...still no (%d) - resize the core-class\n", geomreqresult)); + xw->core.widget_class->core_class.resize((Widget) xw); + } #if 1 /* ndef nothack */ /* * XtMakeResizeRequest() has the undesirable side-effect of clearing @@ -212,7 +214,7 @@ DoResizeScreen(XtermWidget xw) XSetWMNormalHints(screen->display, VShellWindow, &xw->hints); } #endif - XSync(screen->display, FALSE); /* synchronize */ + XSync(screen->display, False); /* synchronize */ if (XtAppPending(app_con)) xevents(); @@ -221,6 +223,25 @@ DoResizeScreen(XtermWidget xw) #endif /* NO_ACTIVE_ICON */ } +static XtermWidget +xtermScroller(Widget xw) +{ + XtermWidget result = 0; + + if (xw != 0) { + if (IsXtermWidget(xw)) { + result = (XtermWidget) xw; + } else { + /* + * This may have been the scrollbar widget. Try its parent, which + * would be the VT100 widget. + */ + result = xtermScroller(XtParent(xw)); + } + } + return result; +} + static Widget CreateScrollBar(XtermWidget xw, int x, int y, int height) { @@ -244,51 +265,61 @@ CreateScrollBar(XtermWidget xw, int x, int y, int height) void ScrollBarReverseVideo(Widget scrollWidget) { - SbInfo *sb = &(term->screen.fullVwin.sb_info); - Arg args[4]; - Cardinal nargs = XtNumber(args); - - /* - * Remember the scrollbar's original colors. - */ - if (sb->rv_cached == False) { - XtSetArg(args[0], XtNbackground, &(sb->bg)); - XtSetArg(args[1], XtNforeground, &(sb->fg)); - XtSetArg(args[2], XtNborderColor, &(sb->bdr)); - XtSetArg(args[3], XtNborderPixmap, &(sb->bdpix)); - XtGetValues(scrollWidget, args, nargs); - sb->rv_cached = True; - sb->rv_active = 0; - } + XtermWidget xw = xtermScroller(scrollWidget); + + if (xw != 0) { + SbInfo *sb = &(xw->screen.fullVwin.sb_info); + Arg args[4]; + Cardinal nargs = XtNumber(args); + + /* + * Remember the scrollbar's original colors. + */ + if (sb->rv_cached == False) { + XtSetArg(args[0], XtNbackground, &(sb->bg)); + XtSetArg(args[1], XtNforeground, &(sb->fg)); + XtSetArg(args[2], XtNborderColor, &(sb->bdr)); + XtSetArg(args[3], XtNborderPixmap, &(sb->bdpix)); + XtGetValues(scrollWidget, args, nargs); + sb->rv_cached = True; + sb->rv_active = 0; + } - sb->rv_active = !(sb->rv_active); - XtSetArg(args[!(sb->rv_active)], XtNbackground, sb->bg); - XtSetArg(args[(sb->rv_active)], XtNforeground, sb->fg); - nargs = 2; /* don't set border_pixmap */ - if (sb->bdpix == XtUnspecifiedPixmap) { /* if not pixmap then pixel */ - if (sb->rv_active) { /* keep border visible */ - XtSetArg(args[2], XtNborderColor, args[1].value); - } else { - XtSetArg(args[2], XtNborderColor, sb->bdr); + sb->rv_active = !(sb->rv_active); + XtSetArg(args[!(sb->rv_active)], XtNbackground, sb->bg); + XtSetArg(args[(sb->rv_active)], XtNforeground, sb->fg); + nargs = 2; /* don't set border_pixmap */ + if (sb->bdpix == XtUnspecifiedPixmap) { + /* if not pixmap then pixel */ + if (sb->rv_active) { + /* keep border visible */ + XtSetArg(args[2], XtNborderColor, args[1].value); + } else { + XtSetArg(args[2], XtNborderColor, sb->bdr); + } + nargs = 3; } - nargs = 3; + XtSetValues(scrollWidget, args, nargs); } - XtSetValues(scrollWidget, args, nargs); } void ScrollBarDrawThumb(Widget scrollWidget) { - TScreen *screen = &term->screen; - int thumbTop, thumbHeight, totalHeight; + XtermWidget xw = xtermScroller(scrollWidget); - thumbTop = ROW2INX(screen, screen->savedlines); - thumbHeight = MaxRows(screen); - totalHeight = thumbHeight + screen->savedlines; + if (xw != 0) { + TScreen *screen = &xw->screen; + int thumbTop, thumbHeight, totalHeight; - XawScrollbarSetThumb(scrollWidget, - ((float) thumbTop) / totalHeight, - ((float) thumbHeight) / totalHeight); + thumbTop = ROW2INX(screen, screen->savedlines); + thumbHeight = MaxRows(screen); + totalHeight = thumbHeight + screen->savedlines; + + XawScrollbarSetThumb(scrollWidget, + ((float) thumbTop) / totalHeight, + ((float) thumbHeight) / totalHeight); + } } void @@ -322,8 +353,9 @@ ResizeScrollBar(XtermWidget xw) } void -WindowScroll(TScreen * screen, int top) +WindowScroll(XtermWidget xw, int top) { + TScreen *screen = &(xw->screen); int i, lines; int scrolltop, scrollheight, refreshtop; @@ -348,7 +380,7 @@ WindowScroll(TScreen * screen, int top) scrolltop = lines; refreshtop = scrollheight; } - scrolling_copy_area(term, scrolltop, scrollheight, -i); + scrolling_copy_area(xw, scrolltop, scrollheight, -i); screen->topline = top; ScrollSelection(screen, i, True); @@ -360,8 +392,8 @@ WindowScroll(TScreen * screen, int top) OriginY(screen) + refreshtop * FontHeight(screen), (unsigned) Width(screen), (unsigned) lines * FontHeight(screen), - FALSE); - ScrnRefresh(term, refreshtop, 0, lines, MaxCols(screen), False); + False); + ScrnRefresh(xw, refreshtop, 0, lines, MaxCols(screen), False); ScrollBarDrawThumb(screen->scrollWidget); } @@ -384,8 +416,8 @@ updateRightScrollbar(XtermWidget xw) XtNx, screen->fullVwin.fullwidth - BorderWidth(screen->scrollWidget), (XtPointer) 0); } - #endif + void ScrollBarOn(XtermWidget xw, int init, int doalloc) { @@ -459,26 +491,28 @@ ScrollBarOn(XtermWidget xw, int init, int doalloc) XtMapWidget(screen->scrollWidget); update_scrollbar(); if (screen->visbuf) { - XClearWindow(screen->display, XtWindow(xw)); + xtermClear(xw); Redraw(); } } } void -ScrollBarOff(TScreen * screen) +ScrollBarOff(XtermWidget xw) { + TScreen *screen = &xw->screen; + if (!screen->fullVwin.sb_info.width || IsIcon(screen)) return; TRACE(("ScrollBarOff\n")); - if (XtIsRealized((Widget) term)) { + if (XtIsRealized((Widget) xw)) { XtUnmapWidget(screen->scrollWidget); screen->fullVwin.sb_info.width = 0; - DoResizeScreen(term); + DoResizeScreen(xw); update_scrollbar(); if (screen->visbuf) { - XClearWindow(screen->display, XtWindow(term)); + xtermClear(xw); Redraw(); } } else { @@ -490,18 +524,18 @@ ScrollBarOff(TScreen * screen) * Toggle the visibility of the scrollbars. */ void -ToggleScrollBar(XtermWidget w) +ToggleScrollBar(XtermWidget xw) { - TScreen *screen = &w->screen; + TScreen *screen = &xw->screen; if (IsIcon(screen)) { Bell(XkbBI_MinorError, 0); } else { TRACE(("ToggleScrollBar{{\n")); if (screen->fullVwin.sb_info.width) { - ScrollBarOff(screen); + ScrollBarOff(xw); } else { - ScrollBarOn(w, FALSE, FALSE); + ScrollBarOn(xw, False, False); } update_scrollbar(); TRACE(("...ToggleScrollBar}}\n")); @@ -511,45 +545,53 @@ ToggleScrollBar(XtermWidget w) /*ARGSUSED*/ static void ScrollTextTo( - Widget scrollbarWidget GCC_UNUSED, + Widget scrollbarWidget, XtPointer client_data GCC_UNUSED, XtPointer call_data) { - float *topPercent = (float *) call_data; - TScreen *screen = &term->screen; - int thumbTop; /* relative to first saved line */ - int newTopLine; - - /* - * screen->savedlines : Number of offscreen text lines, - * MaxRows(screen) : Number of onscreen text lines, - */ - thumbTop = (int) (*topPercent * (screen->savedlines + MaxRows(screen))); - newTopLine = thumbTop - screen->savedlines; - WindowScroll(screen, newTopLine); + XtermWidget xw = xtermScroller(scrollbarWidget); + + if (xw != 0) { + float *topPercent = (float *) call_data; + TScreen *screen = &xw->screen; + int thumbTop; /* relative to first saved line */ + int newTopLine; + + /* + * screen->savedlines : Number of offscreen text lines, + * MaxRows(screen) : Number of onscreen text lines, + */ + thumbTop = (int) (*topPercent * (screen->savedlines + MaxRows(screen))); + newTopLine = thumbTop - screen->savedlines; + WindowScroll(xw, newTopLine); + } } /*ARGSUSED*/ static void ScrollTextUpDownBy( - Widget scrollbarWidget GCC_UNUSED, + Widget scrollbarWidget, XtPointer client_data GCC_UNUSED, XtPointer call_data) { - long pixels = (long) call_data; + XtermWidget xw = xtermScroller(scrollbarWidget); - TScreen *screen = &term->screen; - int rowOnScreen, newTopLine; + if (xw != 0) { + long pixels = (long) call_data; - rowOnScreen = pixels / FontHeight(screen); - if (rowOnScreen == 0) { - if (pixels < 0) - rowOnScreen = -1; - else if (pixels > 0) - rowOnScreen = 1; + TScreen *screen = &xw->screen; + int rowOnScreen, newTopLine; + + rowOnScreen = pixels / FontHeight(screen); + if (rowOnScreen == 0) { + if (pixels < 0) + rowOnScreen = -1; + else if (pixels > 0) + rowOnScreen = 1; + } + newTopLine = ROW2INX(screen, rowOnScreen); + WindowScroll(xw, newTopLine); } - newTopLine = ROW2INX(screen, rowOnScreen); - WindowScroll(screen, newTopLine); } /* @@ -624,11 +666,11 @@ params_to_pixels(TScreen * screen, String * params, Cardinal n) } static long -AmountToScroll(Widget gw, String * params, Cardinal nparams) +AmountToScroll(Widget xw, String * params, Cardinal nparams) { - if (gw != 0) { - if (IsXtermWidget(gw)) { - TScreen *screen = &((XtermWidget) gw)->screen; + if (xw != 0) { + if (IsXtermWidget(xw)) { + TScreen *screen = TScreenOf((XtermWidget) xw); if (nparams > 2 && screen->send_mouse_pos != MOUSE_OFF) return 0; @@ -638,7 +680,7 @@ AmountToScroll(Widget gw, String * params, Cardinal nparams) * This may have been the scrollbar widget. Try its parent, which * would be the VT100 widget. */ - return AmountToScroll(XtParent(gw), params, nparams); + return AmountToScroll(XtParent(xw), params, nparams); } } return 0; @@ -647,29 +689,29 @@ AmountToScroll(Widget gw, String * params, Cardinal nparams) /*ARGSUSED*/ void HandleScrollForward( - Widget gw, + Widget xw, XEvent * event GCC_UNUSED, String * params, Cardinal *nparams) { long amount; - if ((amount = AmountToScroll(gw, params, *nparams)) != 0) { - ScrollTextUpDownBy(gw, (XtPointer) 0, (XtPointer) amount); + if ((amount = AmountToScroll(xw, params, *nparams)) != 0) { + ScrollTextUpDownBy(xw, (XtPointer) 0, (XtPointer) amount); } } /*ARGSUSED*/ void HandleScrollBack( - Widget gw, + Widget xw, XEvent * event GCC_UNUSED, String * params, Cardinal *nparams) { long amount; - if ((amount = -AmountToScroll(gw, params, *nparams)) != 0) { - ScrollTextUpDownBy(gw, (XtPointer) 0, (XtPointer) amount); + if ((amount = -AmountToScroll(xw, params, *nparams)) != 0) { + ScrollTextUpDownBy(xw, (XtPointer) 0, (XtPointer) amount); } } diff --git a/app/xterm/sinstall.sh b/app/xterm/sinstall.sh index bd410cf9f..c88a22658 100644 --- a/app/xterm/sinstall.sh +++ b/app/xterm/sinstall.sh @@ -1,6 +1,5 @@ #!/bin/sh -# $XTermId: sinstall.sh,v 1.15 2006/01/04 02:10:27 tom Exp $ -# $XFree86: xc/programs/xterm/sinstall.sh,v 1.5 2006/01/04 02:10:27 dickey Exp $ +# $XTermId: sinstall.sh,v 1.16 2008/03/02 23:35:02 tom Exp $ # # Install program setuid if the installer is running as root, and if xterm is # already installed on the system with setuid privilege. This is a safeguard @@ -20,6 +19,13 @@ trace=: trace=echo +# override locale... +# (otherwise GNU ls displays date column in a locale-dependent manner). +LANG=C; export LANG +LANGUAGE=C; export LANGUAGE +LC_ALL=C; export LC_ALL +LC_CTYPE=C; export LC_CTYPE + OPTS_SUID= OPTS_SGID= OPTS_MODE= @@ -79,11 +85,13 @@ elif test -f "$REF_PROG" ; then # Expect listing to have fields like this: #-r--r--r-- 1 user group 34293 Jul 18 16:29 pathname + ls $cf_option $REF_PROG ls $cf_option $REF_PROG >$MYTEMP read cf_mode cf_links cf_usr cf_grp cf_size cf_date1 cf_date2 cf_date3 cf_rest <$MYTEMP $trace "... if \"$cf_rest\" is null, try the ls -g option" if test -z "$cf_rest" ; then cf_option="$cf_option -g" + ls $cf_option $REF_PROG ls $cf_option $REF_PROG >$MYTEMP read cf_mode cf_links cf_usr cf_grp cf_size cf_date1 cf_date2 cf_date3 cf_rest <$MYTEMP fi @@ -105,14 +113,17 @@ elif test -f "$REF_PROG" ; then $trace "... see if mode \"$cf_mode\" has s-bit set" case ".$cf_mode" in #(vi .???s??s*) #(vi + $trace "... both setuid/setgid" PROG_SUID=4000 PROG_SGID=2000 ;; .???s*) #(vi + $trace "... setuid" PROG_SUID=4000 PROG_GRP= ;; .??????s*) + $trace "... setgid" PROG_SGID=2000 PROG_USR= ;; diff --git a/app/xterm/tabs.c b/app/xterm/tabs.c index ce5193612..28880ec3e 100644 --- a/app/xterm/tabs.c +++ b/app/xterm/tabs.c @@ -1,11 +1,11 @@ -/* $XTermId: tabs.c,v 1.27 2006/07/23 20:27:31 tom Exp $ */ +/* $XTermId: tabs.c,v 1.31 2008/02/24 17:35:03 Nemeth Exp $ */ /* * $XFree86: xc/programs/xterm/tabs.c,v 3.14 2006/02/13 01:14:59 dickey Exp $ */ /* - * Copyright 2000-2005,2006 by Thomas E. Dickey + * Copyright 2000-2006,2008 by Thomas E. Dickey * * All Rights Reserved * @@ -60,11 +60,7 @@ #include <xterm.h> #include <data.h> -/* - * This file presumes 32bits/word. This is somewhat of a crock, and should - * be fixed sometime. - */ -#define TAB_INDEX(n) ((n) >> 5) +#define TAB_INDEX(n) ((n) >> TAB_BITS_SHIFT) #define TAB_MASK(n) (1 << ((n) & (TAB_BITS_WIDTH-1))) #define SET_TAB(tabs,n) tabs[TAB_INDEX(n)] |= TAB_MASK(n) @@ -79,8 +75,7 @@ TabReset(Tabs tabs) { int i; - for (i = 0; i < TAB_ARRAY_SIZE; ++i) - tabs[i] = 0; + TabZonk(tabs); for (i = 0; i < MAX_TABS; i += 8) TabSet(tabs, i); @@ -92,7 +87,9 @@ TabReset(Tabs tabs) void TabSet(Tabs tabs, int col) { - SET_TAB(tabs, col); + if (col >= 0 && col < MAX_TABS) { + SET_TAB(tabs, col); + } } /* @@ -101,7 +98,9 @@ TabSet(Tabs tabs, int col) void TabClear(Tabs tabs, int col) { - CLR_TAB(tabs, col); + if (col >= 0 && col < MAX_TABS) { + CLR_TAB(tabs, col); + } } /* @@ -179,8 +178,5 @@ TabToPrevStop(XtermWidget xw) void TabZonk(Tabs tabs) { - int i; - - for (i = 0; i < TAB_ARRAY_SIZE; ++i) - tabs[i] = 0; + memset(tabs, 0, sizeof(*tabs) * TAB_ARRAY_SIZE); } diff --git a/app/xterm/util.c b/app/xterm/util.c index 9f806c86c..05860261a 100644 --- a/app/xterm/util.c +++ b/app/xterm/util.c @@ -1,9 +1,7 @@ -/* $XTermId: util.c,v 1.291 2006/07/23 22:06:00 tom Exp $ */ - -/* $XFree86: xc/programs/xterm/util.c,v 3.98 2006/06/19 00:36:52 dickey Exp $ */ +/* $XTermId: util.c,v 1.407 2008/02/21 20:29:01 tom Exp $ */ /* - * Copyright 1999-2005,2006 by Thomas E. Dickey + * Copyright 1999-2007,2008 by Thomas E. Dickey * * All Rights Reserved * @@ -75,7 +73,6 @@ #include <wcwidth.h> #endif -static int ClearInLine(XtermWidget xw, int row, int col, unsigned len); static int handle_translated_exposure(XtermWidget xw, int rect_x, int rect_y, @@ -96,6 +93,52 @@ static void vertical_copy_area(XtermWidget xw, int (*my_wcwidth) (wchar_t); #endif +#if OPT_WIDE_CHARS +/* + * We will modify the 'n' cells beginning at the current position. + * Some of those cells may be part of multi-column characters, including + * carryover from the left. Find the limits of the multi-column characters + * that we should fill with blanks, return true if filling is needed. + */ +int +DamagedCells(TScreen * screen, unsigned n, int *klp, int *krp, int row, int col) +{ + int kl = col; + int kr = col + n; + + if (XTERM_CELL(row, kl) == HIDDEN_CHAR) { + while (kl > 0) { + if (XTERM_CELL(row, --kl) != HIDDEN_CHAR) { + break; + } + } + } else { + kl = col + 1; + } + if (XTERM_CELL(row, kr) == HIDDEN_CHAR) { + while (kr < screen->max_col) { + if (XTERM_CELL(row, ++kr) != HIDDEN_CHAR) { + --kr; + break; + } + } + } else { + kr = col - 1; + } + if (klp) + *klp = kl; + if (krp) + *krp = kr; + return (kr >= kl); +} + +int +DamagedCurCells(TScreen * screen, unsigned n, int *klp, int *krp) +{ + return DamagedCells(screen, n, klp, krp, screen->cur_row, screen->cur_col); +} +#endif /* OPT_WIDE_CHARS */ + /* * These routines are used for the jump scroll feature */ @@ -179,32 +222,69 @@ FlushScroll(XtermWidget xw) return; } +/* + * Returns true if there are lines off-screen due to scrolling which should + * include the current line. If false, the line is visible and we should + * paint it now rather than waiting for the line to become visible. + */ int -AddToRefresh(TScreen * screen) +AddToRefresh(XtermWidget xw) { + TScreen *screen = &(xw->screen); int amount = screen->refresh_amt; int row = screen->cur_row; + int result; if (amount == 0) { - return (0); + result = 0; } else if (amount > 0) { int bottom; if (row == (bottom = screen->bot_marg) - amount) { screen->refresh_amt++; - return (1); + result = 1; + } else { + result = (row >= bottom - amount + 1 && row <= bottom); } - return (row >= bottom - amount + 1 && row <= bottom); } else { int top; amount = -amount; if (row == (top = screen->top_marg) + amount) { screen->refresh_amt--; - return (1); + result = 1; + } else { + result = (row <= top + amount - 1 && row >= top); + } + } + + /* + * If this line is visible, and there are scrolled-off lines, flush out + * those which are now visible. + */ + if (!result && screen->scroll_amt) + FlushScroll(xw); + + return result; +} + +/* + * Returns true if the current row is in the visible area (it should be for + * screen operations) and incidentally flush the scrolled-in lines which + * have newly become visible. + */ +static Bool +AddToVisible(XtermWidget xw) +{ + TScreen *screen = &(xw->screen); + Bool result = False; + + if (INX2ROW(screen, screen->cur_row) <= screen->max_row) { + if (!AddToRefresh(xw)) { + result = True; } - return (row <= top + amount - 1 && row >= top); } + return result; } /* @@ -547,6 +627,119 @@ RevScroll(XtermWidget xw, int amount) } /* + * write a string str of length len onto the screen at + * the current cursor position. update cursor position. + */ +void +WriteText(XtermWidget xw, PAIRED_CHARS(Char * str, Char * str2), Cardinal len) +{ + TScreen *screen = &(xw->screen); + ScrnPtr temp_str = 0; + unsigned test; + unsigned flags = xw->flags; + unsigned fg_bg = makeColorPair(xw->cur_foreground, xw->cur_background); + unsigned cells = visual_width(PAIRED_CHARS(str, str2), len); + GC currentGC; + + TRACE(("WriteText (%2d,%2d) (%d) %3d:%s\n", + screen->cur_row, + screen->cur_col, + curXtermChrSet(xw, screen->cur_row), + len, visibleChars(PAIRED_CHARS(str, str2), len))); + + if (ScrnHaveSelection(screen) + && ScrnIsLineInSelection(screen, INX2ROW(screen, screen->cur_row))) { + ScrnDisownSelection(xw); + } + + /* if we are in insert-mode, reserve space for the new cells */ + if (flags & INSERT) { + InsertChar(xw, cells); + } + + if (AddToVisible(xw)) { + if (screen->cursor_state) + HideCursor(); + + /* + * If we overwrite part of a multi-column character, fill the rest + * of it with blanks. + */ + if_OPT_WIDE_CHARS(screen, { + int kl; + int kr; + if (DamagedCurCells(screen, cells, &kl, &kr)) + ClearInLine(xw, screen->cur_row, kl, (unsigned) (kr - kl + 1)); + }); + + if (flags & INVISIBLE) { + if (cells > len) { + str = temp_str = TypeMallocN(Char, cells); + if (str == 0) + return; + } + len = cells; + + memset(str, ' ', len); + if_OPT_WIDE_CHARS(screen, { + str2 = 0; + }); + } + + TRACE(("WriteText calling drawXtermText (%d,%d)\n", + screen->cur_col, + screen->cur_row)); + + test = flags; + checkVeryBoldColors(test, xw->cur_foreground); + + /* make sure that the correct GC is current */ + currentGC = updatedXtermGC(xw, flags, fg_bg, False); + + drawXtermText(xw, test & DRAWX_MASK, currentGC, + CurCursorX(screen, screen->cur_row, screen->cur_col), + CursorY(screen, screen->cur_row), + curXtermChrSet(xw, screen->cur_row), + PAIRED_CHARS(str, str2), len, 0); + + resetXtermGC(xw, flags, False); + } + + ScrnWriteText(xw, PAIRED_CHARS(str, str2), flags, fg_bg, len); + CursorForward(screen, (int) cells); +#if OPT_ZICONBEEP + /* Flag icon name with "***" on window output when iconified. + */ + if (resource.zIconBeep && mapstate == IsUnmapped && !screen->zIconBeep_flagged) { + static char *icon_name; + static Arg args[] = + { + {XtNiconName, (XtArgVal) & icon_name} + }; + + icon_name = NULL; + XtGetValues(toplevel, args, XtNumber(args)); + + if (icon_name != NULL) { + screen->zIconBeep_flagged = True; + ChangeIconName(icon_name); + } + if (resource.zIconBeep > 0) { +#if defined(HAVE_XKB_BELL_EXT) + XkbBell(XtDisplay(toplevel), VShellWindow, resource.zIconBeep, XkbBI_Info); +#else + XBell(XtDisplay(toplevel), resource.zIconBeep); +#endif + } + } + mapstate = -1; +#endif /* OPT_ZICONBEEP */ + if (temp_str != 0) + free(temp_str); + return; +} + +/* * If cursor not in scrolling region, returns. Else, * inserts n blank lines at the cursor's position. Lines above the * bottom margin are lost. @@ -746,33 +939,49 @@ InsertChar(XtermWidget xw, unsigned n) n = limit; assert(n != 0); - if (row <= screen->max_row) { - if (!AddToRefresh(screen)) { - int col = MaxCols(screen) - n; - if (screen->scroll_amt) - FlushScroll(xw); + if (AddToVisible(xw)) { + int col = MaxCols(screen) - n; -#if OPT_DEC_CHRSET - if (CSET_DOUBLE(SCRN_BUF_CSETS(screen, screen->cur_row)[0])) { - col = MaxCols(screen) / 2 - n; + /* + * If we shift part of a multi-column character, fill the rest + * of it with blanks. Do similar repair for the text which will + * be shifted into the right-margin. + */ + if_OPT_WIDE_CHARS(screen, { + int kl; + int kr = screen->cur_col; + if (DamagedCurCells(screen, n, &kl, (int *) 0) && kr > kl) { + ClearInLine(xw, screen->cur_row, kl, (unsigned) (kr - kl + 1)); } -#endif - /* - * prevent InsertChar from shifting the end of a line over - * if it is being appended to - */ - if (non_blank_line(screen, screen->cur_row, - screen->cur_col, MaxCols(screen))) - horizontal_copy_area(xw, screen->cur_col, - col - screen->cur_col, - (int) n); + kr = screen->max_col - n + 1; + if (DamagedCells(screen, n, &kl, (int *) 0, + screen->cur_row, + kr) && kr > kl) { + ClearInLine(xw, screen->cur_row, kl, (unsigned) (kr - kl + 1)); + } + }); - ClearCurBackground(xw, - CursorY(screen, screen->cur_row), - CurCursorX(screen, screen->cur_row, screen->cur_col), - (unsigned) FontHeight(screen), - n * CurFontWidth(screen, screen->cur_row)); +#if OPT_DEC_CHRSET + if (CSET_DOUBLE(SCRN_BUF_CSETS(screen, screen->cur_row)[0])) { + col = MaxCols(screen) / 2 - n; + } +#endif + /* + * prevent InsertChar from shifting the end of a line over + * if it is being appended to + */ + if (non_blank_line(screen, screen->cur_row, + screen->cur_col, MaxCols(screen))) { + horizontal_copy_area(xw, screen->cur_col, + col - screen->cur_col, + (int) n); } + + ClearCurBackground(xw, + CursorY(screen, screen->cur_row), + CurCursorX(screen, screen->cur_row, screen->cur_col), + (unsigned) FontHeight(screen), + n * CurFontWidth(screen, screen->cur_row)); } /* adjust screen->buf */ ScrnInsertChar(xw, n); @@ -806,32 +1015,39 @@ DeleteChar(XtermWidget xw, unsigned n) n = limit; assert(n != 0); - if (row <= screen->max_row) { - if (!AddToRefresh(screen)) { - int col = MaxCols(screen) - n; - if (screen->scroll_amt) - FlushScroll(xw); + if (AddToVisible(xw)) { + int col = MaxCols(screen) - n; + + /* + * If we delete part of a multi-column character, fill the rest + * of it with blanks. + */ + if_OPT_WIDE_CHARS(screen, { + int kl; + int kr; + if (DamagedCurCells(screen, n, &kl, &kr)) + ClearInLine(xw, screen->cur_row, kl, (unsigned) (kr - kl + 1)); + }); #if OPT_DEC_CHRSET - if (CSET_DOUBLE(SCRN_BUF_CSETS(screen, screen->cur_row)[0])) { - col = MaxCols(screen) / 2 - n; - } + if (CSET_DOUBLE(SCRN_BUF_CSETS(screen, screen->cur_row)[0])) { + col = MaxCols(screen) / 2 - n; + } #endif - horizontal_copy_area(xw, - (int) (screen->cur_col + n), - col - screen->cur_col, - -((int) n)); + horizontal_copy_area(xw, + (int) (screen->cur_col + n), + col - screen->cur_col, + -((int) n)); - ClearCurBackground(xw, - CursorY(screen, screen->cur_row), - CurCursorX(screen, screen->cur_row, col), - (unsigned) FontHeight(screen), - n * CurFontWidth(screen, screen->cur_row)); - } + ClearCurBackground(xw, + CursorY(screen, screen->cur_row), + CurCursorX(screen, screen->cur_row, col), + (unsigned) FontHeight(screen), + n * CurFontWidth(screen, screen->cur_row)); } - if (n > 0) { + if (n != 0) { /* adjust screen->buf */ - ScrnDeleteChar(xw, (unsigned) n); + ScrnDeleteChar(xw, n); } } @@ -916,11 +1132,10 @@ ClearBelow(XtermWidget xw) * protected characters were found, 0 otherwise. */ static int -ClearInLine(XtermWidget xw, int row, int col, unsigned len) +ClearInLine2(XtermWidget xw, int flags, int row, int col, unsigned len) { TScreen *screen = &(xw->screen); int rc = 1; - int flags = TERM_COLOR_FLAGS(xw); TRACE(("ClearInLine(row=%d, col=%d, len=%d) vs %d..%d\n", row, col, len, @@ -932,15 +1147,7 @@ ClearInLine(XtermWidget xw, int row, int col, unsigned len) ScrnDisownSelection(xw); } - /* - * If we're clearing to the end of the line, we won't count this as - * "drawn" characters. We'll only do cut/paste on "drawn" characters, - * so this has the effect of suppressing trailing blanks from a - * selection. - */ - if (col + (int) len < MaxCols(screen)) { - flags |= CHARDRAWN; - } else { + if (col + (int) len >= MaxCols(screen)) { len = MaxCols(screen) - col; } @@ -988,47 +1195,39 @@ ClearInLine(XtermWidget xw, int row, int col, unsigned len) HideCursor(); screen->do_wrap = 0; - if (INX2ROW(screen, row) <= screen->max_row) { - if (!AddToRefresh(screen)) { - if (screen->scroll_amt) - FlushScroll(xw); - ClearCurBackground(xw, - CursorY(screen, row), - CurCursorX(screen, row, col), - (unsigned) FontHeight(screen), - len * CurFontWidth(screen, row)); - } + if (AddToVisible(xw)) { + ClearCurBackground(xw, + CursorY(screen, row), + CurCursorX(screen, row, col), + (unsigned) FontHeight(screen), + len * CurFontWidth(screen, row)); } if (len != 0) { - memset(SCRN_BUF_CHARS(screen, row) + col, ' ', len); - memset(SCRN_BUF_ATTRS(screen, row) + col, flags, len); - - if_OPT_EXT_COLORS(screen, { - memset(SCRN_BUF_FGRND(screen, row) + col, - xw->sgr_foreground, len); - memset(SCRN_BUF_BGRND(screen, row) + col, - xw->cur_background, len); - }); - if_OPT_ISO_TRADITIONAL_COLORS(screen, { - memset(SCRN_BUF_COLOR(screen, row) + col, - (int) xtermColorPair(xw), len); - }); - if_OPT_DEC_CHRSET({ - memset(SCRN_BUF_CSETS(screen, row) + col, - curXtermChrSet(xw, screen->cur_row), len); - }); - if_OPT_WIDE_CHARS(screen, { - int off; - for (off = OFF_WIDEC; off < MAX_PTRS; ++off) { - memset(SCREEN_PTR(screen, row, off) + col, 0, len); - } - }); + ClearCells(xw, flags, len, row, col); } return rc; } +int +ClearInLine(XtermWidget xw, int row, int col, unsigned len) +{ + TScreen *screen = &(xw->screen); + int flags = 0; + + /* + * If we're clearing to the end of the line, we won't count this as + * "drawn" characters. We'll only do cut/paste on "drawn" characters, + * so this has the effect of suppressing trailing blanks from a + * selection. + */ + if (col + (int) len < MaxCols(screen)) { + flags |= CHARDRAWN; + } + return ClearInLine2(xw, flags, row, col, len); +} + /* * Clear the next n characters on the cursor's line, including the cursor's * position. @@ -1050,7 +1249,28 @@ ClearRight(XtermWidget xw, int n) if (len > (unsigned) n) len = n; - (void) ClearInLine(xw, screen->cur_row, screen->cur_col, len); + if (AddToVisible(xw)) { + if_OPT_WIDE_CHARS(screen, { + int col = screen->cur_col; + int row = screen->cur_row; + int kl; + int kr; + int xx; + if (DamagedCurCells(screen, len, &kl, &kr) && kr >= kl) { + xx = col; + if (kl < xx) { + ClearInLine2(xw, 0, row, kl, (unsigned) (xx - kl)); + } + xx = col + len - 1; + if (kr > xx) { + ClearInLine2(xw, 0, row, xx + 1, (unsigned) (kr - xx)); + } + } + }); + (void) ClearInLine(xw, screen->cur_row, screen->cur_col, len); + } else { + ScrnClearCells(xw, screen->cur_row, screen->cur_col, len); + } /* with the right part cleared, we can't be wrapping */ ScrnClrWrapped(screen, screen->cur_row); @@ -1066,7 +1286,19 @@ ClearLeft(XtermWidget xw) unsigned len = screen->cur_col + 1; assert(screen->cur_col >= 0); - (void) ClearInLine(xw, screen->cur_row, 0, len); + if (AddToVisible(xw)) { + if_OPT_WIDE_CHARS(screen, { + int row = screen->cur_row; + int kl; + int kr; + if (DamagedCurCells(screen, 1, &kl, &kr) && kr >= kl) { + ClearInLine2(xw, 0, row, kl, (unsigned) (kr - kl + 1)); + } + }); + (void) ClearInLine(xw, screen->cur_row, 0, len); + } else { + ScrnClearCells(xw, screen->cur_row, 0, len); + } } /* @@ -1275,7 +1507,7 @@ copy_area(XtermWidget xw, XCopyArea(screen->display, VWindow(screen), VWindow(screen), - NormalGC(screen), + NormalGC(xw, screen), src_x, src_y, width, height, dest_x, dest_y); } } @@ -1396,6 +1628,17 @@ HandleExposure(XtermWidget xw, XEvent * event) } } +static void +set_background(XtermWidget xw, int color GCC_UNUSED) +{ + TScreen *screen = &(xw->screen); + Pixel c = getXtermBackground(xw, xw->flags, color); + + TRACE(("set_background(%d) %#lx\n", color, c)); + XSetWindowBackground(screen->display, VShellWindow, c); + XSetWindowBackground(screen->display, VWindow(screen), c); +} + /* * Called by the ExposeHandler to do the actual repaint after the coordinates * have been translated to allow for any CopyArea in progress. @@ -1412,6 +1655,7 @@ handle_translated_exposure(XtermWidget xw, int toprow, leftcol, nrows, ncols; int x0, x1; int y0, y1; + int result = 0; TRACE(("handle_translated_exposure at %d,%d size %dx%d\n", rect_y, rect_x, rect_height, rect_width)); @@ -1422,6 +1666,17 @@ handle_translated_exposure(XtermWidget xw, y0 = (rect_y - OriginY(screen)); y1 = (y0 + rect_height); + if ((x0 < 0 || + y0 < 0 || + x1 > Width(screen) || + y1 > Height(screen))) { + set_background(xw, -1); + XClearArea(screen->display, VWindow(screen), + rect_x, + rect_y, + (unsigned) rect_width, + (unsigned) rect_height, False); + } toprow = y0 / FontHeight(screen); if (toprow < 0) toprow = 0; @@ -1443,18 +1698,18 @@ handle_translated_exposure(XtermWidget xw, ncols = MaxCols(screen) - leftcol; if (nrows > 0 && ncols > 0) { - ScrnRefresh(xw, toprow, leftcol, nrows, ncols, False); - if (waiting_for_initial_map) { - first_map_occurred(); - } + ScrnRefresh(xw, toprow, leftcol, nrows, ncols, True); + first_map_occurred(); if (screen->cur_row >= toprow && screen->cur_row < toprow + nrows && screen->cur_col >= leftcol && - screen->cur_col < leftcol + ncols) - return (1); + screen->cur_col < leftcol + ncols) { + result = 1; + } } - return (0); + TRACE(("...handle_translated_exposure %d\n", result)); + return (result); } /***====================================================================***/ @@ -1476,9 +1731,7 @@ ChangeColors(XtermWidget xw, ScrnColors * pNew) { Bool repaint = False; TScreen *screen = &xw->screen; -#if OPT_TEK4014 - Window tek = TWindow(screen); -#endif + VTwin *win = WhichVWin(screen); TRACE(("ChangeColors\n")); @@ -1498,10 +1751,10 @@ ChangeColors(XtermWidget xw, ScrnColors * pNew) T_COLOR(screen, TEXT_FG) = fg; TRACE(("... TEXT_FG: %#lx\n", T_COLOR(screen, TEXT_FG))); if (screen->Vshow) { - XSetForeground(screen->display, NormalGC(screen), fg); - XSetBackground(screen->display, ReverseGC(screen), fg); - XSetForeground(screen->display, NormalBoldGC(screen), fg); - XSetBackground(screen->display, ReverseBoldGC(screen), fg); + setCgsFore(xw, win, gcNorm, fg); + setCgsBack(xw, win, gcNormReverse, fg); + setCgsFore(xw, win, gcBold, fg); + setCgsBack(xw, win, gcBoldReverse, fg); repaint = True; } } @@ -1511,12 +1764,11 @@ ChangeColors(XtermWidget xw, ScrnColors * pNew) T_COLOR(screen, TEXT_BG) = bg; TRACE(("... TEXT_BG: %#lx\n", T_COLOR(screen, TEXT_BG))); if (screen->Vshow) { - XSetBackground(screen->display, NormalGC(screen), bg); - XSetForeground(screen->display, ReverseGC(screen), bg); - XSetBackground(screen->display, NormalBoldGC(screen), bg); - XSetForeground(screen->display, ReverseBoldGC(screen), bg); - XSetWindowBackground(screen->display, VWindow(screen), - T_COLOR(screen, TEXT_BG)); + setCgsBack(xw, win, gcNorm, bg); + setCgsFore(xw, win, gcNormReverse, bg); + setCgsBack(xw, win, gcBold, bg); + setCgsFore(xw, win, gcBoldReverse, bg); + set_background(xw, -1); repaint = True; } } @@ -1526,6 +1778,11 @@ ChangeColors(XtermWidget xw, ScrnColors * pNew) TRACE(("... HIGHLIGHT_BG: %#lx\n", T_COLOR(screen, HIGHLIGHT_BG))); repaint = screen->Vshow; } + if (COLOR_DEFINED(pNew, HIGHLIGHT_FG)) { + T_COLOR(screen, HIGHLIGHT_FG) = COLOR_VALUE(pNew, HIGHLIGHT_FG); + TRACE(("... HIGHLIGHT_FG: %#lx\n", T_COLOR(screen, HIGHLIGHT_FG))); + repaint = screen->Vshow; + } #endif if (COLOR_DEFINED(pNew, MOUSE_FG) || (COLOR_DEFINED(pNew, MOUSE_BG))) { @@ -1538,20 +1795,26 @@ ChangeColors(XtermWidget xw, ScrnColors * pNew) TRACE(("... MOUSE_BG: %#lx\n", T_COLOR(screen, MOUSE_BG))); } - recolor_cursor(screen, - screen->pointer_cursor, - T_COLOR(screen, MOUSE_FG), - T_COLOR(screen, MOUSE_BG)); - recolor_cursor(screen, - screen->arrow, - T_COLOR(screen, MOUSE_FG), - T_COLOR(screen, MOUSE_BG)); - XDefineCursor(screen->display, VWindow(screen), - screen->pointer_cursor); - + if (screen->Vshow) { + recolor_cursor(screen, + screen->pointer_cursor, + T_COLOR(screen, MOUSE_FG), + T_COLOR(screen, MOUSE_BG)); + XDefineCursor(screen->display, VWindow(screen), + screen->pointer_cursor); + } #if OPT_TEK4014 - if (tek) - XDefineCursor(screen->display, tek, screen->arrow); + if (TEK4014_SHOWN(xw)) { + TekScreen *tekscr = &(tekWidget->screen); + Window tekwin = TWindow(tekscr); + if (tekwin) { + recolor_cursor(screen, + tekscr->arrow, + T_COLOR(screen, MOUSE_FG), + T_COLOR(screen, MOUSE_BG)); + XDefineCursor(screen->display, tekwin, tekscr->arrow); + } + } #endif /* no repaint needed */ } @@ -1564,44 +1827,162 @@ ChangeColors(XtermWidget xw, ScrnColors * pNew) #if OPT_TEK4014 if (COLOR_DEFINED(pNew, TEK_FG) || COLOR_DEFINED(pNew, TEK_BG)) { - ChangeTekColors(screen, pNew); - if (screen->Tshow) { - XClearWindow(screen->display, tek); - TekExpose((Widget) NULL, (XEvent *) NULL, (Region) NULL); + ChangeTekColors(tekWidget, screen, pNew); + if (TEK4014_SHOWN(xw)) { + TekRepaint(tekWidget); } } else if (COLOR_DEFINED(pNew, TEK_CURSOR)) { - ChangeTekColors(screen, pNew); + ChangeTekColors(tekWidget, screen, pNew); } #endif - if (repaint) { - XClearWindow(screen->display, VWindow(screen)); - ScrnRefresh(xw, 0, 0, MaxRows(screen), - MaxCols(screen), False); - } + if (repaint) + xtermRepaint(xw); } void -ChangeAnsiColors(XtermWidget xw) +xtermClear(XtermWidget xw) { TScreen *screen = &xw->screen; + TRACE(("xtermClear\n")); XClearWindow(screen->display, VWindow(screen)); - ScrnRefresh(xw, 0, 0, - MaxRows(screen), - MaxCols(screen), False); } +void +xtermRepaint(XtermWidget xw) +{ + TScreen *screen = &xw->screen; + + TRACE(("xtermRepaint\n")); + xtermClear(xw); + ScrnRefresh(xw, 0, 0, MaxRows(screen), MaxCols(screen), True); +} + +/***====================================================================***/ + +Boolean +isDefaultForeground(const char *name) +{ + return !x_strcasecmp(name, XtDefaultForeground); +} + +Boolean +isDefaultBackground(const char *name) +{ + return !x_strcasecmp(name, XtDefaultBackground); +} + +#if OPT_WIDE_CHARS +/* + * Check for Unicode BIDI control characters, which may be miscategorized via + * wcwidth() and iswprint() as zero-width printable characters. + */ +Boolean +isWideControl(unsigned ch) +{ + Boolean result; + + switch (ch) { + case 0x200E: + case 0x200F: + case 0x202A: + case 0x202B: + case 0x202C: + case 0x202D: + case 0x202E: + result = True; + break; + default: + result = False; + break; + } + return result; +} +#endif + /***====================================================================***/ +typedef struct { + Pixel fg; + Pixel bg; +} ToSwap; + +#if OPT_HIGHLIGHT_COLOR +#define hc_param ,Bool hilite_color +#define hc_value ,screen->hilite_color +#else +#define hc_param /* nothing */ +#define hc_value /* nothing */ +#endif + +/* + * Use this to swap the foreground/background color values in the resource + * data, and to build up a list of the pairs which must be swapped in the + * GC cache. + */ +static void +swapLocally(ToSwap * list, int *count, ColorRes * fg, ColorRes * bg hc_param) +{ + ColorRes tmp; + int n; + Boolean found = False; + +#if OPT_COLOR_RES + Pixel fg_color = fg->value; + Pixel bg_color = bg->value; +#else + Pixel fg_color = *fg; + Pixel bg_color = *bg; +#endif + +#if OPT_HIGHLIGHT_COLOR + if ((fg_color != bg_color) || !hilite_color) +#endif + { + EXCHANGE(*fg, *bg, tmp); + for (n = 0; n < *count; ++n) { + if ((list[n].fg == fg_color && list[n].bg == bg_color) + || (list[n].fg == bg_color && list[n].bg == fg_color)) { + found = True; + break; + } + } + if (!found) { + list[*count].fg = fg_color; + list[*count].bg = bg_color; + *count = *count + 1; + TRACE(("swapLocally fg %#lx, bg %#lx ->%d\n", + fg_color, bg_color, *count)); + } + } +} + +static void +reallySwapColors(XtermWidget xw, ToSwap * list, int count) +{ + int j, k; + + TRACE(("reallySwapColors\n")); + for (j = 0; j < count; ++j) { + for_each_text_gc(k) { + redoCgs(xw, list[j].fg, list[j].bg, (CgsEnum) k); + } + } +} + +static void +swapVTwinGCs(XtermWidget xw, VTwin * win) +{ + swapCgs(xw, win, gcNorm, gcNormReverse); + swapCgs(xw, win, gcBold, gcBoldReverse); +} + void ReverseVideo(XtermWidget xw) { TScreen *screen = &xw->screen; - GC tmpGC; - Pixel tmp; -#if OPT_TEK4014 - Window tek = TWindow(screen); -#endif + ToSwap listToSwap[5]; + int numToSwap = 0; TRACE(("ReverseVideo\n")); @@ -1614,75 +1995,59 @@ ReverseVideo(XtermWidget xw) * We don't swap colors that happen to match the screen's foreground * and background because that tends to produce bizarre effects. */ +#define swapAnyColor(name,a,b) swapLocally(listToSwap, &numToSwap, &(screen->name[a]), &(screen->name[b]) hc_value) +#define swapAColor(a,b) swapAnyColor(Acolors, a, b) if_OPT_ISO_COLORS(screen, { - ColorRes tmp2; - EXCHANGE(screen->Acolors[0], screen->Acolors[7], tmp2); - EXCHANGE(screen->Acolors[8], screen->Acolors[15], tmp2); + swapAColor(0, 7); + swapAColor(8, 15); }); - tmp = T_COLOR(screen, TEXT_BG); if (T_COLOR(screen, TEXT_CURSOR) == T_COLOR(screen, TEXT_FG)) - T_COLOR(screen, TEXT_CURSOR) = tmp; - T_COLOR(screen, TEXT_BG) = T_COLOR(screen, TEXT_FG); - T_COLOR(screen, TEXT_FG) = tmp; + T_COLOR(screen, TEXT_CURSOR) = T_COLOR(screen, TEXT_BG); - EXCHANGE(T_COLOR(screen, MOUSE_FG), T_COLOR(screen, MOUSE_BG), tmp); - EXCHANGE(NormalGC(screen), ReverseGC(screen), tmpGC); - EXCHANGE(NormalBoldGC(screen), ReverseBoldGC(screen), tmpGC); -#ifndef NO_ACTIVE_ICON - tmpGC = screen->iconVwin.normalGC; - screen->iconVwin.normalGC = screen->iconVwin.reverseGC; - screen->iconVwin.reverseGC = tmpGC; +#define swapTColor(a,b) swapAnyColor(Tcolors, a, b) + swapTColor(TEXT_FG, TEXT_BG); + swapTColor(MOUSE_FG, MOUSE_BG); - tmpGC = screen->iconVwin.normalboldGC; - screen->iconVwin.normalboldGC = screen->iconVwin.reverseboldGC; - screen->iconVwin.reverseboldGC = tmpGC; -#endif /* NO_ACTIVE_ICON */ + reallySwapColors(xw, listToSwap, numToSwap); - recolor_cursor(screen, - screen->pointer_cursor, - T_COLOR(screen, MOUSE_FG), - T_COLOR(screen, MOUSE_BG)); - recolor_cursor(screen, - screen->arrow, - T_COLOR(screen, MOUSE_FG), - T_COLOR(screen, MOUSE_BG)); + swapVTwinGCs(xw, &(screen->fullVwin)); +#ifndef NO_ACTIVE_ICON + swapVTwinGCs(xw, &(screen->iconVwin)); +#endif /* NO_ACTIVE_ICON */ xw->misc.re_verse = !xw->misc.re_verse; if (XtIsRealized((Widget) xw)) { - XDefineCursor(screen->display, VWindow(screen), screen->pointer_cursor); + xtermDisplayCursor(xw); } #if OPT_TEK4014 - if (tek) - XDefineCursor(screen->display, tek, screen->arrow); + if (TEK4014_SHOWN(xw)) { + TekScreen *tekscr = &(tekWidget->screen); + Window tekwin = TWindow(tekscr); + recolor_cursor(screen, + tekscr->arrow, + T_COLOR(screen, MOUSE_FG), + T_COLOR(screen, MOUSE_BG)); + XDefineCursor(screen->display, tekwin, tekscr->arrow); + } #endif if (screen->scrollWidget) ScrollBarReverseVideo(screen->scrollWidget); if (XtIsRealized((Widget) xw)) { - XSetWindowBackground(screen->display, VWindow(screen), - T_COLOR(screen, TEXT_BG)); - - /* the shell-window's background will be used in the first repainting - * on resizing - */ - XSetWindowBackground(screen->display, VShellWindow, - T_COLOR(screen, TEXT_BG)); + set_background(xw, -1); } #if OPT_TEK4014 - TekReverseVideo(screen); + TekReverseVideo(tekWidget); #endif if (XtIsRealized((Widget) xw)) { - XClearWindow(screen->display, VWindow(screen)); - ScrnRefresh(xw, 0, 0, MaxRows(screen), - MaxCols(screen), False); + xtermRepaint(xw); } #if OPT_TEK4014 - if (screen->Tshow) { - XClearWindow(screen->display, tek); - TekExpose((Widget) NULL, (XEvent *) NULL, (Region) NULL); + if (TEK4014_SHOWN(xw)) { + TekRepaint(tekWidget); } #endif ReverseOldColors(); @@ -1710,7 +2075,7 @@ recolor_cursor(TScreen * screen, #if OPT_RENDERFONT static XftColor * -getColor(XtermWidget xw, Pixel pixel) +getXftColor(XtermWidget xw, Pixel pixel) { #define CACHE_SIZE 4 static struct { @@ -1749,6 +2114,35 @@ getColor(XtermWidget xw, Pixel pixel) } /* + * The cell-width is related to, but not the same as the wide-character width. + * We will only get useful values from wcwidth() for codes above 255. + * Otherwise, interpret according to internal data. + */ +#if OPT_RENDERWIDE +static int +xtermCellWidth(XtermWidget xw, wchar_t ch) +{ + int result = 0; + + (void) xw; + if (ch == 0 || ch == 127) { + result = 0; + } else if (ch < 256) { +#if OPT_C1_PRINT + if (ch >= 128 && ch < 160) { + result = (xw->screen.c1_printable ? 1 : 0); + } else +#endif + + result = 1; /* 1..31 are line-drawing characters */ + } else { + result = my_wcwidth(ch); + } + return result; +} +#endif /* OPT_RENDERWIDE */ + +/* * fontconfig/Xft combination prior to 2.2 has a problem with * CJK truetype 'double-width' (bi-width/monospace) fonts leading * to the 's p a c e d o u t' rendering. Consequently, we can't @@ -1758,95 +2152,106 @@ getColor(XtermWidget xw, Pixel pixel) * was applied to gnome vte and gtk2 port of vim. * See http://bugzilla.mozilla.org/show_bug.cgi?id=196312 */ -static void -xtermXftDrawString(TScreen * screen, +static int +xtermXftDrawString(XtermWidget xw, unsigned flags GCC_UNUSED, XftColor * color, XftFont * font, int x, int y, PAIRED_CHARS(Char * text, Char * text2), - int len, - int fwidth, - int *deltax) + Cardinal len, + Bool really) { + TScreen *screen = &(xw->screen); + int ncells = 0; + + if (len != 0) { #if OPT_RENDERWIDE - XftFont *wfont; - int n; - int ncells = 0; /* # of 'half-width' charcells */ - static XftCharSpec *sbuf; - static int slen = 0; - XftFont *lastFont = 0; - XftFont *currFont = 0; - int start = 0; - int charWidth; - FcChar32 wc; - int fontnum = screen->menu_font_number; - - if (len == 0 || !(*text || *text2)) { - return; - } + static XftCharSpec *sbuf; + static Cardinal slen = 0; + + XftFont *wfont; + Cardinal src, dst; + XftFont *lastFont = 0; + XftFont *currFont = 0; + Cardinal start = 0; + int charWidth; + int fontnum = screen->menu_font_number; + int fwidth = FontWidth(screen); + #if OPT_ISO_COLORS - if ((flags & UNDERLINE) - && screen->italicULMode - && screen->renderWideItal[fontnum]) { - wfont = screen->renderWideItal[fontnum]; - } else + if ((flags & UNDERLINE) + && screen->italicULMode + && screen->renderWideItal[fontnum]) { + wfont = screen->renderWideItal[fontnum]; + } else #endif - if ((flags & BOLDATTR(screen)) - && screen->renderWideBold[fontnum]) { - wfont = screen->renderWideBold[fontnum]; - } else { - wfont = screen->renderWideNorm[fontnum]; - } - - if ((int) slen < len) { - slen = (len + 1) * 2; - sbuf = (XftCharSpec *) XtRealloc((char *) sbuf, - slen * sizeof(XftCharSpec)); - } + if ((flags & BOLDATTR(screen)) + && screen->renderWideBold[fontnum]) { + wfont = screen->renderWideBold[fontnum]; + } else { + wfont = screen->renderWideNorm[fontnum]; + } - for (n = 0; n < len; n++) { - if (text2) - wc = *text++ | (*text2++ << 8); - else - wc = *text++; - sbuf[n].ucs4 = wc; - sbuf[n].x = x + fwidth * ncells; - sbuf[n].y = y; - charWidth = my_wcwidth((int) wc); - currFont = (charWidth == 2 && wfont != 0) ? wfont : font; - ncells += charWidth; - if (lastFont != currFont) { - if (lastFont != 0) { - XftDrawCharSpec(screen->renderDraw, - color, - lastFont, - sbuf + start, - n - start); - } - start = n; - lastFont = currFont; + if (slen < len) { + slen = (len + 1) * 2; + sbuf = (XftCharSpec *) XtRealloc((char *) sbuf, + slen * sizeof(XftCharSpec)); } - } - XftDrawCharSpec(screen->renderDraw, - color, - lastFont, - sbuf + start, - n - start); - if (deltax) - *deltax = ncells * fwidth; -#else + for (src = dst = 0; src < len; src++) { + FcChar32 wc = *text++; + + if (text2) + wc |= (*text2++ << 8); + + charWidth = xtermCellWidth(xw, (wchar_t) wc); + if (charWidth < 0) + continue; + + sbuf[dst].ucs4 = wc; + sbuf[dst].x = x + fwidth * ncells; + sbuf[dst].y = y; + + currFont = (charWidth == 2 && wfont != 0) ? wfont : font; + ncells += charWidth; - XftDrawString8(screen->renderDraw, - color, - font, - x, y, (unsigned char *) text, len); - if (deltax) - *deltax = len * fwidth; + if (lastFont != currFont) { + if ((lastFont != 0) && really) { + XftDrawCharSpec(screen->renderDraw, + color, + lastFont, + sbuf + start, + (int) (dst - start)); + } + start = dst; + lastFont = currFont; + } + ++dst; + } + if ((dst != start) && really) { + XftDrawCharSpec(screen->renderDraw, + color, + lastFont, + sbuf + start, + (int) (dst - start)); + } +#else /* !OPT_RENDERWIDE */ + PAIRED_CHARS((void) text, (void) text2); + if (really) { + XftDrawString8(screen->renderDraw, + color, + font, + x, y, (unsigned char *) text, len); + } + ncells = len; #endif + } + return ncells; } +#define xtermXftWidth(xw, flags, color, font, x, y, paired_chars, len) \ + xtermXftDrawString(xw, flags, color, font, x, y, paired_chars, len, False) #endif /* OPT_RENDERFONT */ #define DrawX(col) x + (col * (font_width)) @@ -1854,6 +2259,50 @@ xtermXftDrawString(TScreen * screen, #if OPT_WIDE_CHARS /* + * Map characters commonly "fixed" by groff back to their ASCII equivalents. + * Also map other useful equivalents. + */ +unsigned +AsciiEquivs(unsigned ch) +{ + switch (ch) { + case 0x2010: /* groff "-" */ + case 0x2011: + case 0x2012: + case 0x2013: + case 0x2014: + case 0x2015: + case 0x2212: /* groff "\-" */ + ch = '-'; + break; + case 0x2018: /* groff "`" */ + ch = '`'; + break; + case 0x2019: /* groff ' */ + ch = '\''; + break; + case 0x201C: /* groff lq */ + case 0x201D: /* groff rq */ + ch = '"'; + break; + case 0x2329: /* groff ".URL" */ + ch = '<'; + break; + case 0x232a: /* groff ".URL" */ + ch = '>'; + break; + default: + if (ch >= 0xff01 && ch <= 0xff5e) { + /* "Fullwidth" codes (actually double-width) */ + ch -= 0xff00; + ch += ANSI_SPA; + break; + } + } + return ch; +} + +/* * Actually this should be called "groff_workaround()" - for the places where * groff stomps on compatibility. Still, if enough people get used to it, * this might someday become a quasi-standard. @@ -1872,50 +2321,164 @@ ucs_workaround(XtermWidget xw, int fixed = False; if (screen->wide_chars && screen->utf8_mode && ch > 256) { - switch (ch) { - case 0x2010: /* groff "-" */ - case 0x2011: - case 0x2012: - case 0x2013: - case 0x2014: - case 0x2015: - case 0x2212: /* groff "\-" */ - ch = '-'; + unsigned eqv = AsciiEquivs(ch); + + if (eqv != ch) { + int width = my_wcwidth((int) ch); + Char text[2]; + Char text2[2]; + + text[0] = eqv; + text2[0] = 0; + + do { + drawXtermText(xw, + flags, + gc, + x, + y, + chrset, + PAIRED_CHARS(text, text2), + 1, + on_wide); + x += FontWidth(screen); + text[0] = '?'; + } while (width-- > 1); + fixed = True; - break; - case 0x2018: /* groff "`" */ - ch = '`'; + } else if (ch == HIDDEN_CHAR) { fixed = True; + } + } + return fixed; +} +#endif + +/* + * Use this when the characters will not fill the cell area properly. Fill the + * area where we'll write the characters, otherwise we'll get gaps between + * them, e.g., in the original background color. + * + * The cursor is a special case, because the XFillRectangle call only uses the + * foreground, while we've set the cursor color in the background. So we need + * a special GC for that. + */ +static void +xtermFillCells(XtermWidget xw, + unsigned flags, + GC gc, + int x, + int y, + Cardinal len) +{ + TScreen *screen = &(xw->screen); + VTwin *currentWin = WhichVWin(screen); + + if (!(flags & NOBACKGROUND)) { + CgsEnum srcId = getCgsId(xw, currentWin, gc); + CgsEnum dstId = gcMAX; + Pixel fg = getCgsFore(xw, currentWin, gc); + Pixel bg = getCgsBack(xw, currentWin, gc); + + switch (srcId) { + case gcVTcursNormal: + case gcVTcursReverse: + dstId = gcVTcursOutline; break; - case 0x2019: /* groff ' */ - ch = '\''; - fixed = True; + case gcVTcursFilled: + case gcVTcursOutline: + /* FIXME */ break; - case 0x201C: /* groff lq */ - case 0x201D: /* groff rq */ - ch = '"'; - fixed = True; + case gcNorm: + dstId = gcNormReverse; + break; + case gcNormReverse: + dstId = gcNorm; + break; + case gcBold: + dstId = gcBoldReverse; + break; + case gcBoldReverse: + dstId = gcBold; + break; +#if OPT_BOX_CHARS + case gcLine: + case gcDots: + /* FIXME */ + break; +#endif +#if OPT_DEC_CHRSET + case gcCNorm: + case gcCBold: + /* FIXME */ + break; +#endif +#if OPT_WIDE_CHARS + case gcWide: + dstId = gcWideReverse; + break; + case gcWBold: + dstId = gcBoldReverse; + break; + case gcWideReverse: + case gcWBoldReverse: + /* FIXME */ + break; +#endif +#if OPT_TEK4014 + case gcTKcurs: + /* FIXME */ + break; +#endif + case gcMAX: break; } - if (fixed) { - Char text[2]; - Char text2[2]; - text[0] = ch; - text2[0] = 0; - drawXtermText(xw, - flags, - gc, - x, - y, - chrset, - PAIRED_CHARS(text, text2), - 1, - on_wide); + if (dstId != gcMAX) { + setCgsFore(xw, currentWin, dstId, bg); + setCgsBack(xw, currentWin, dstId, fg); + + XFillRectangle(screen->display, VWindow(screen), + getCgsGC(xw, currentWin, dstId), + x, y, + len * FontWidth(screen), + (unsigned) FontHeight(screen)); } } - return fixed; } + +#if OPT_TRACE +static void +xtermSetClipRectangles(Display * dpy, + GC gc, + int x, + int y, + XRectangle * rp, + Cardinal nr, + int order) +{ +#if 0 + TScreen *screen = &(term->screen); + Drawable draw = VWindow(screen); + + XSetClipMask(dpy, gc, None); + XDrawRectangle(screen->display, draw, gc, + x + rp->x - 1, + y + rp->y - 1, + rp->width, + rp->height); +#endif + + XSetClipRectangles(dpy, gc, + x, y, rp, nr, order); + TRACE(("clipping @(%3d,%3d) (%3d,%3d)..(%3d,%3d)\n", + y, x, + rp->y, rp->x, rp->height, rp->width)); +} + +#else +#define xtermSetClipRectangles(dpy, gc, x, y, rp, nr, order) \ + XSetClipRectangles(dpy, gc, x, y, rp, nr, order) #endif #if OPT_CLIP_BOLD @@ -1924,7 +2487,7 @@ ucs_workaround(XtermWidget xw, * trash in rxcurses' hanoi.cmd demo (e.g., 10x20 font). */ #define beginClipping(screen,gc,pwidth,plength) \ - if (pwidth > 2) { \ + if (screen->use_clipping && (pwidth > 2)) { \ XRectangle clip; \ int clip_x = x; \ int clip_y = y - FontHeight(screen) + FontDescent(screen); \ @@ -1932,9 +2495,9 @@ ucs_workaround(XtermWidget xw, clip.y = 0; \ clip.height = FontHeight(screen); \ clip.width = pwidth * plength; \ - XSetClipRectangles(screen->display, gc, \ - clip_x, clip_y, \ - &clip, 1, Unsorted); \ + xtermSetClipRectangles(screen->display, gc, \ + clip_x, clip_y, \ + &clip, 1, Unsorted); \ } #define endClipping(screen,gc) \ XSetClipMask(screen->display, gc, None) @@ -1943,6 +2506,57 @@ ucs_workaround(XtermWidget xw, #define endClipping(screen,gc) /* nothing */ #endif /* OPT_CLIP_BOLD */ +#if OPT_CLIP_BOLD && OPT_RENDERFONT && defined(HAVE_XFTDRAWSETCLIP) && defined(HAVE_XFTDRAWSETCLIPRECTANGLES) +#define beginXftClipping(screen,px,py,plength) \ + if (screen->use_clipping && (FontWidth(screen) > 2)) { \ + XRectangle clip; \ + int clip_x = px; \ + int clip_y = py - FontHeight(screen) + FontDescent(screen); \ + clip.x = 0; \ + clip.y = 0; \ + clip.height = FontHeight(screen); \ + clip.width = FontWidth(screen) * plength; \ + XftDrawSetClipRectangles (screen->renderDraw, \ + clip_x, clip_y, \ + &clip, 1); \ + } +#define endXftClipping(screen) \ + XftDrawSetClip (screen->renderDraw, 0) +#else +#define beginXftClipping(screen,px,py,plength) /* nothing */ +#define endXftClipping(screen) /* nothing */ +#endif /* OPT_CLIP_BOLD */ + +#if OPT_RENDERFONT +static int +drawClippedXftString(XtermWidget xw, + unsigned flags, + XftFont * font, + XftColor * fg_color, + int x, + int y, + PAIRED_CHARS(Char * text, Char * text2), + Cardinal len) +{ + int ncells = xtermXftWidth(xw, flags, + fg_color, + font, x, y, + PAIRED_CHARS(text, text2), + len); + TScreen *screen = &(xw->screen); + + beginXftClipping(screen, x, y, ncells); + xtermXftDrawString(xw, flags, + fg_color, + font, x, y, + PAIRED_CHARS(text, text2), + len, + True); + endXftClipping(screen); + return ncells; +} +#endif + /* * Draws text with the specified combination of bold/underline. The return * value is the updated x position. @@ -1959,8 +2573,8 @@ drawXtermText(XtermWidget xw, int on_wide) { TScreen *screen = &(xw->screen); - int real_length = len; - int underline_len; + Cardinal real_length = len; + Cardinal underline_len = 0; /* Intended width of the font to draw (as opposed to the actual width of the X font, and the width of the default font) */ int font_width = ((flags & DOUBLEWFONT) ? 2 : 1) * screen->fnt_wide; @@ -1991,64 +2605,58 @@ drawXtermText(XtermWidget xw, * given that the icon font is usually nil or nil2, there * doesn't seem to be much point. */ + int inx = 0; GC gc2 = ((!IsIcon(screen) && screen->font_doublesize) - ? xterm_DoubleGC((unsigned) chrset, flags, gc) + ? xterm_DoubleGC(xw, (unsigned) chrset, flags, gc, &inx) : 0); - TRACE(("DRAWTEXT%c[%4d,%4d] (%d) %d:%.*s\n", + TRACE(("DRAWTEXT%c[%4d,%4d] (%d)%3d:%s\n", screen->cursor_state == OFF ? ' ' : '*', - y, x, chrset, len, (int) len, text)); + y, x, chrset, len, + visibleChars(PAIRED_CHARS(text, text2), len))); if (gc2 != 0) { /* draw actual double-sized characters */ - /* Update the last-used cache of double-sized fonts */ - int inx = xterm_Double_index((unsigned) chrset, flags); XFontStruct *fs = screen->double_fonts[inx].fs; - XRectangle rect, *rp = ▭ - int nr = 1; - int adjust; - - font_width *= 2; - flags |= DOUBLEWFONT; - - rect.x = 0; - rect.y = 0; - rect.width = len * font_width; - rect.height = FontHeight(screen); - - switch (chrset) { - case CSET_DHL_TOP: - rect.y = -(rect.height / 2); - y -= rect.y; - flags |= DOUBLEHFONT; - break; - case CSET_DHL_BOT: - rect.y = (rect.height / 2); - y -= rect.y; - flags |= DOUBLEHFONT; - break; - default: - nr = 0; - break; - } - /* - * Though it is the right "size", a given bold font may - * be shifted up by a pixel or two. Shift it back into - * the clipping rectangle. - */ - if (nr != 0) { - adjust = fs->ascent - + fs->descent - - (2 * FontHeight(screen)); - rect.y -= adjust; - y += adjust; - } +#if OPT_RENDERFONT + if (!xw->misc.render_font || IsIconWin(screen, WhichVWin(screen))) +#endif + { + XRectangle rect, *rp = ▭ + int nr = 1; + + font_width *= 2; + flags |= DOUBLEWFONT; + + rect.x = 0; + rect.y = 0; + rect.width = len * font_width; + rect.height = FontHeight(screen); + + TRACE(("drawing %s\n", visibleChrsetName(chrset))); + switch (chrset) { + case CSET_DHL_TOP: + rect.y = -(fs->ascent / 2); + y -= rect.y; + flags |= DOUBLEHFONT; + break; + case CSET_DHL_BOT: + rect.y = rect.height - (fs->ascent / 2); + y -= rect.y; + flags |= DOUBLEHFONT; + break; + default: + nr = 0; + break; + } - if (nr) - XSetClipRectangles(screen->display, gc2, - x, y, rp, nr, YXBanded); - else - XSetClipMask(screen->display, gc2, None); + if (nr) { + xtermSetClipRectangles(screen->display, gc2, + x, y, rp, nr, YXBanded); + } else { + XSetClipMask(screen->display, gc2, None); + } + } /* Call ourselves recursively with the new gc */ @@ -2116,10 +2724,12 @@ drawXtermText(XtermWidget xw, #endif #if OPT_RENDERFONT if (UsingRenderFont(xw)) { + VTwin *currentWin = WhichVWin(screen); Display *dpy = screen->display; XftFont *font; XGCValues values; int fontnum = screen->menu_font_number; + int ncells; if (!screen->renderDraw) { int scr; @@ -2145,95 +2755,170 @@ drawXtermText(XtermWidget xw, } else { font = screen->renderFontNorm[fontnum]; } - XGetGCValues(dpy, gc, GCForeground | GCBackground, &values); - if (!(flags & NOBACKGROUND)) + values.foreground = getCgsFore(xw, currentWin, gc); + values.background = getCgsBack(xw, currentWin, gc); + + if (!(flags & NOBACKGROUND)) { + XftColor *bg_color = getXftColor(xw, values.background); + ncells = xtermXftWidth(xw, flags, + bg_color, + font, x, y, + PAIRED_CHARS(text, text2), + len); XftDrawRect(screen->renderDraw, - getColor(xw, values.background), + bg_color, x, y, - len * FontWidth(screen), + (unsigned) (ncells * FontWidth(screen)), (unsigned) FontHeight(screen)); + } y += font->ascent; #if OPT_BOX_CHARS - if (!screen->force_box_chars) { + { /* adding code to substitute simulated line-drawing characters */ int last, first = 0; Dimension old_wide, old_high = 0; int curX = x; for (last = 0; last < (int) len; last++) { - unsigned ch = text[last]; - int deltax = 0; + Boolean replace = False; + Boolean missing = False; + unsigned ch = PACK_PAIR(text, text2, last); + int nc; + Char temp[2]; +#if OPT_WIDE_CHARS + Char temp2[2]; + + if (xtermIsDecGraphic(ch)) { + /* + * Xft generally does not have the line-drawing characters + * in cells 1-31. Check for this, and attempt to fill in + * from real line-drawing character in the font at the + * Unicode position. Failing that, use our own + * box-characters. + */ + if (xtermXftMissing(xw, font, ch)) { + if (screen->force_box_chars + || xtermXftMissing(xw, font, dec2ucs(ch))) { + missing = 1; + } else { + ch = dec2ucs(ch); + replace = True; + } + } + } else if (ch > 256) { + /* + * If we're reading UTF-8 from the client, we may have a + * line-drawing character. Translate it back to our + * box-code if Xft tells us that the glyph is missing. + */ + if_OPT_WIDE_CHARS(screen, { + unsigned part = ucs2dec(ch); + if (xtermIsDecGraphic(part) && + (screen->force_box_chars + || xtermXftMissing(xw, font, ch))) { + ch = part; + missing = True; + } + }); + } +#else + if (xtermIsDecGraphic(ch)) { + /* + * Xft generally does not have the line-drawing characters + * in cells 1-31. Check for this, and attempt to fill in + * from real line-drawing character in the font at the + * Unicode position. Failing that, use our own + * box-characters. + */ + if (xtermXftMissing(xw, font, ch)) { + missing = 1; + } + } +#endif /* - * If we're reading UTF-8 from the client, we may have a - * line-drawing character. Translate it back to our box-code - * if it is really a line-drawing character (since the - * fonts used by Xft generally do not have correct glyphs), - * or if Xft can tell us that the glyph is really missing. - */ - if_OPT_WIDE_CHARS(screen, { - unsigned full = (ch | (text2[last] << 8)); - unsigned part = ucs2dec(full); - if (xtermIsDecGraphic(part) && - (xtermIsLineDrawing(part) - || xtermXftMissing(xw, font, full))) - ch = part; - else - ch = full; - }); - /* - * If we have one of our box-codes, draw it directly. + * If we now have one of our box-codes, draw it directly. */ - if (xtermIsDecGraphic(ch)) { + if (missing || replace) { /* line drawing character time */ if (last > first) { - xtermXftDrawString(screen, flags, - getColor(xw, values.foreground), - font, curX, y, - PAIRED_CHARS(text + first, - text2 + first), - last - first, - FontWidth(screen), - &deltax); - curX += deltax; + nc = drawClippedXftString(xw, + flags, + font, + getXftColor(xw, values.foreground), + curX, + y, + PAIRED_CHARS(text + first, + text2 + first), + (Cardinal) (last - first)); + curX += nc * FontWidth(screen); + underline_len += nc; + } + if (missing) { + old_wide = screen->fnt_wide; + old_high = screen->fnt_high; + screen->fnt_wide = FontWidth(screen); + screen->fnt_high = FontHeight(screen); + xtermDrawBoxChar(xw, ch, flags, gc, + curX, y - FontAscent(screen), 1); + curX += FontWidth(screen); + underline_len += 1; + screen->fnt_wide = old_wide; + screen->fnt_high = old_high; + } else { + temp[0] = LO_BYTE(ch); +#if OPT_WIDE_CHARS + temp2[0] = HI_BYTE(ch); +#endif + nc = drawClippedXftString(xw, + flags, + font, + getXftColor(xw, values.foreground), + curX, + y, + PAIRED_CHARS(temp, + temp2), + 1); + curX += nc * FontWidth(screen); + underline_len += nc; } - old_wide = screen->fnt_wide; - old_high = screen->fnt_high; - screen->fnt_wide = FontWidth(screen); - screen->fnt_high = FontHeight(screen); - xtermDrawBoxChar(xw, ch, flags, gc, - curX, y - FontAscent(screen)); - curX += FontWidth(screen); - screen->fnt_wide = old_wide; - screen->fnt_high = old_high; first = last + 1; } } if (last > first) { - xtermXftDrawString(screen, flags, - getColor(xw, values.foreground), - font, curX, y, - PAIRED_CHARS(text + first, text2 + first), - last - first, - FontWidth(screen), - NULL); + underline_len += + drawClippedXftString(xw, + flags, + font, + getXftColor(xw, values.foreground), + curX, + y, + PAIRED_CHARS(text + first, + text2 + first), + (Cardinal) (last - first)); } - } else -#endif /* OPT_BOX_CHARS */ + } +#else { - xtermXftDrawString(screen, flags, - getColor(xw, values.foreground), - font, x, y, PAIRED_CHARS(text, text2), - (int) len, FontWidth(screen), NULL); + underline_len += + drawClippedXftString(xw, + flags, + font, + getXftColor(xw, values.foreground), + x, + y, + PAIRED_CHARS(text, text2), + len); } +#endif /* OPT_BOX_CHARS */ if ((flags & UNDERLINE) && screen->underline && !did_ul) { if (FontDescent(screen) > 1) y++; XDrawLine(screen->display, VWindow(screen), gc, x, y, - x + (int) len * FontWidth(screen) - 1, + x + (int) underline_len * FontWidth(screen) - 1, y); } return x + len * FontWidth(screen); @@ -2247,36 +2932,22 @@ drawXtermText(XtermWidget xw, */ if (!IsIcon(screen) && !(flags & CHARBYCHAR) && screen->fnt_prop) { int adj, width; - GC fillGC = gc; /* might be cursorGC */ XFontStruct *fs = ((flags & BOLDATTR(screen)) ? BoldFont(screen) : NormalFont(screen)); -#define GC_PAIRS(a,b) \ - if (gc == a) fillGC = b; \ - if (gc == b) fillGC = a - - /* - * Fill the area where we'll write the characters, otherwise - * we'll get gaps between them. The cursor is a special case, - * because the XFillRectangle call only uses the foreground, - * while we've set the cursor color in the background. So we - * need a special GC for that. - */ - if (gc == screen->cursorGC - || gc == screen->reversecursorGC) - fillGC = screen->fillCursorGC; - GC_PAIRS(NormalGC(screen), ReverseGC(screen)); - GC_PAIRS(NormalBoldGC(screen), ReverseBoldGC(screen)); - - if (!(flags & NOBACKGROUND)) - XFillRectangle(screen->display, VWindow(screen), fillGC, - x, y, - len * FontWidth(screen), - (unsigned) FontHeight(screen)); + xtermFillCells(xw, flags, gc, x, y, len); while (len--) { - width = XTextWidth(fs, (char *) text, 1); + if_WIDE_OR_NARROW(screen, { + XChar2b temp[1]; + temp[0].byte2 = *text; + temp[0].byte1 = *text2; + width = XTextWidth16(fs, temp, 1); + } + , { + width = XTextWidth(fs, (char *) text, 1); + }); adj = (FontWidth(screen) - width) / 2; (void) drawXtermText(xw, flags | NOBACKGROUND | CHARBYCHAR, gc, x + adj, y, chrset, @@ -2299,20 +2970,45 @@ drawXtermText(XtermWidget xw, : NormalFont(screen)); int last, first = 0; for (last = 0; last < (int) len; last++) { - unsigned ch = text[last]; + unsigned ch = PACK_PAIR(text, text2, last); Bool isMissing; + int ch_width; #if OPT_WIDE_CHARS - if (text2 != 0) - ch |= (text2[last] << 8); - isMissing = (ch != HIDDEN_CHAR) - && (xtermMissingChar(xw, ch, - ((on_wide || iswide((int) ch)) - && screen->fnts[fWide]) - ? screen->fnts[fWide] - : font)); + + if (ch == HIDDEN_CHAR) { + if (last > first) + DrawSegment(first, last); + first = last + 1; + continue; + } + ch_width = my_wcwidth((int) ch); + isMissing = + xtermMissingChar(xw, ch, + ((on_wide || ch_width > 1) + && okFont(NormalWFont(screen))) + ? NormalWFont(screen) + : font); #else isMissing = xtermMissingChar(xw, ch, font); + ch_width = 1; #endif + /* + * If the character is not missing, but we're in wide-character + * mode and the character happens to be a wide-character that + * corresponds to the line-drawing set, allow the forceBoxChars + * resource (or menu entry) to force it to display using our + * tables. + */ + if_OPT_WIDE_CHARS(screen, { + if (!isMissing + && ch > 255 + && ucs2dec(ch) < 32 + && xw->screen.force_box_chars) { + ch = ucs2dec(ch); + isMissing = True; + } + }); + if (isMissing) { if (last > first) DrawSegment(first, last); @@ -2320,7 +3016,9 @@ drawXtermText(XtermWidget xw, if (!ucs_workaround(xw, ch, flags, gc, DrawX(last), y, chrset, on_wide)) #endif - xtermDrawBoxChar(xw, ch, flags, gc, DrawX(last), y); + xtermDrawBoxChar(xw, ch, flags, gc, DrawX(last), y, ch_width); + if (ch_width > 1) + x += (ch_width - 1) * FontWidth(screen); first = last + 1; } } @@ -2349,8 +3047,7 @@ drawXtermText(XtermWidget xw, /* * Behave as if the font has (maybe Unicode-replacements for) drawing * characters in the range 1-31 (either we were not asked to ignore them, - * or the caller made sure that there is none). The only translation we do - * in this branch is the removal of HIDDEN_CHAR (for the wide-char case). + * or the caller made sure that there is none). */ TRACE(("drawtext%c[%4d,%4d] (%d) %d:%s\n", screen->cursor_state == OFF ? ' ' : '*', @@ -2360,105 +3057,145 @@ drawXtermText(XtermWidget xw, #if OPT_WIDE_CHARS if (screen->wide_chars || screen->unicode_font) { + Bool needWide = False; int ascent_adjust = 0; - int n; - unsigned ch = text[0] | (text2[0] << 8); - int wideness = (!IsIcon(screen) - && ((on_wide || iswide((int) ch) != 0) - && (screen->fnts[fWide] != NULL))); - unsigned char *endtext = text + len; + int src, dst; + if (screen->draw_len < len) { screen->draw_len = (len + 1) * 2; screen->draw_buf = (XChar2b *) XtRealloc((char *) screen->draw_buf, screen->draw_len * sizeof(*screen->draw_buf)); } - for (n = 0; n < (int) len; n++) { - screen->draw_buf[n].byte2 = *text; - screen->draw_buf[n].byte1 = *text2; + + for (src = dst = 0; src < (int) len; src++) { + unsigned ch = PACK_PAIR(text, text2, src); + + if (ch == HIDDEN_CHAR) + continue; + + if (!needWide + && !IsIcon(screen) + && ((on_wide || my_wcwidth((int) ch) > 1) + && okFont(NormalWFont(screen)))) { + needWide = True; + } + + /* + * bitmap-fonts are limited to 16-bits. + */ + if (ch > 0xffff) { + ch = UCS_REPL; + screen->draw_buf[dst].byte2 = LO_BYTE(ch); + screen->draw_buf[dst].byte1 = HI_BYTE(ch); + } else { + screen->draw_buf[dst].byte2 = text[src]; + screen->draw_buf[dst].byte1 = text2[src]; + } #if OPT_MINI_LUIT -#define UCS2SBUF(n,value) screen->draw_buf[n].byte2 = (value & 0xff);\ - screen->draw_buf[n].byte1 = (value >> 8) -#define Map2Sbuf(n,from,to) (*text == from) { UCS2SBUF(n,to); } - if (screen->latin9_mode && !screen->utf8_mode && *text2 == 0) { +#define UCS2SBUF(value) screen->draw_buf[dst].byte2 = LO_BYTE(value);\ + screen->draw_buf[dst].byte1 = HI_BYTE(value) + +#define Map2Sbuf(from,to) (text[src] == from) { UCS2SBUF(to); } + + if (screen->latin9_mode && !screen->utf8_mode && text2[src] == 0) { /* see http://www.cs.tut.fi/~jkorpela/latin9.html */ /* *INDENT-OFF* */ - if Map2Sbuf(n, 0xa4, 0x20ac) - else if Map2Sbuf(n, 0xa6, 0x0160) - else if Map2Sbuf(n, 0xa8, 0x0161) - else if Map2Sbuf(n, 0xb4, 0x017d) - else if Map2Sbuf(n, 0xb8, 0x017e) - else if Map2Sbuf(n, 0xbc, 0x0152) - else if Map2Sbuf(n, 0xbd, 0x0153) - else if Map2Sbuf(n, 0xbe, 0x0178) + if Map2Sbuf(0xa4, 0x20ac) + else if Map2Sbuf(0xa6, 0x0160) + else if Map2Sbuf(0xa8, 0x0161) + else if Map2Sbuf(0xb4, 0x017d) + else if Map2Sbuf(0xb8, 0x017e) + else if Map2Sbuf(0xbc, 0x0152) + else if Map2Sbuf(0xbd, 0x0153) + else if Map2Sbuf(0xbe, 0x0178) /* *INDENT-ON* */ } if (screen->unicode_font - && *text2 == 0 - && (*text == DEL || *text < 0x20)) { - int ni = dec2ucs((unsigned) ((*text == DEL) ? 0 : *text)); - UCS2SBUF(n, ni); + && text2[src] == 0 + && (text[src] == ANSI_DEL || + text[src] < ANSI_SPA)) { + int ni = dec2ucs((unsigned) ((text[src] == ANSI_DEL) + ? 0 + : text[src])); + UCS2SBUF(ni); } #endif /* OPT_MINI_LUIT */ - text++; - text2++; - if (wideness) { - /* filter out those pesky fake characters. */ - while (text < endtext - && *text == HIDDEN_HI - && *text2 == HIDDEN_LO) { - text++; - text2++; - len--; - } - } + ++dst; } - /* This is probably wrong. But it works. */ + /* FIXME This is probably wrong. But it works. */ underline_len = len; /* Set the drawing font */ - if (flags & (DOUBLEHFONT | DOUBLEWFONT)) { - ; /* Do nothing: font is already set */ - } else if (wideness - && (screen->fnts[fWide]->fid || screen->fnts[fWBold]->fid)) { - underline_len = real_length = len * 2; - if ((flags & BOLDATTR(screen)) != 0 - && screen->fnts[fWBold]->fid) { - XSetFont(screen->display, gc, screen->fnts[fWBold]->fid); - ascent_adjust = (screen->fnts[fWBold]->ascent - - NormalFont(screen)->ascent); + if (!(flags & (DOUBLEHFONT | DOUBLEWFONT))) { + VTwin *currentWin = WhichVWin(screen); + VTFontEnum fntId; + CgsEnum cgsId; + Pixel fg = getCgsFore(xw, currentWin, gc); + Pixel bg = getCgsBack(xw, currentWin, gc); + + if (needWide + && (okFont(NormalWFont(screen)) || okFont(BoldWFont(screen)))) { + if ((flags & BOLDATTR(screen)) != 0 + && okFont(BoldWFont(screen))) { + fntId = fWBold; + cgsId = gcWBold; + } else { + fntId = fWide; + cgsId = gcWide; + } + } else if ((flags & BOLDATTR(screen)) != 0 + && okFont(BoldFont(screen))) { + fntId = fBold; + cgsId = gcBold; } else { - XSetFont(screen->display, gc, screen->fnts[fWide]->fid); - ascent_adjust = (screen->fnts[fWide]->ascent + fntId = fNorm; + cgsId = gcNorm; + } + + setCgsFore(xw, currentWin, cgsId, fg); + setCgsBack(xw, currentWin, cgsId, bg); + gc = getCgsGC(xw, currentWin, cgsId); + + if (fntId != fNorm) { + XFontStruct *thisFp = WhichVFont(screen, fnts[fntId].fs); + ascent_adjust = (thisFp->ascent - NormalFont(screen)->ascent); + if (thisFp->max_bounds.width == + NormalFont(screen)->max_bounds.width * 2) { + underline_len = real_length = dst * 2; + } else if (cgsId == gcWide || cgsId == gcWBold) { + underline_len = real_length = dst * 2; + xtermFillCells(xw, + flags, + gc, + x, + y - thisFp->ascent, + real_length); + } } - /* fix ascent */ - } else if ((flags & BOLDATTR(screen)) != 0 - && BoldFont(screen)->fid) { - XSetFont(screen->display, gc, BoldFont(screen)->fid); - } else { - XSetFont(screen->display, gc, NormalFont(screen)->fid); } - if (flags & NOBACKGROUND) + if (flags & NOBACKGROUND) { XDrawString16(screen->display, VWindow(screen), gc, x, y + ascent_adjust, - screen->draw_buf, n); - else + screen->draw_buf, dst); + } else { XDrawImageString16(screen->display, VWindow(screen), gc, x, y + ascent_adjust, - screen->draw_buf, n); + screen->draw_buf, dst); + } if ((flags & BOLDATTR(screen)) && screen->enbolden) { beginClipping(screen, gc, font_width, len); XDrawString16(screen->display, VWindow(screen), gc, x + 1, y + ascent_adjust, - screen->draw_buf, n); + screen->draw_buf, dst); endClipping(screen, gc); } @@ -2467,12 +3204,13 @@ drawXtermText(XtermWidget xw, { int length = len; /* X should have used unsigned */ - if (flags & NOBACKGROUND) + if (flags & NOBACKGROUND) { XDrawString(screen->display, VWindow(screen), gc, x, y, (char *) text, length); - else + } else { XDrawImageString(screen->display, VWindow(screen), gc, x, y, (char *) text, length); + } underline_len = length; if ((flags & BOLDATTR(screen)) && screen->enbolden) { beginClipping(screen, gc, font_width, length); @@ -2486,7 +3224,7 @@ drawXtermText(XtermWidget xw, if (FontDescent(screen) > 1) y++; XDrawLine(screen->display, VWindow(screen), gc, - x, y, x + underline_len * font_width - 1, y); + x, y, (int) (x + underline_len * font_width - 1), y); } return x + real_length * FontWidth(screen); @@ -2526,6 +3264,18 @@ xtermSizeHints(XtermWidget xw, int scrollbarWidth) TRACE_HINTS(&(xw->hints)); } +void +getXtermSizeHints(XtermWidget xw) +{ + TScreen *screen = &xw->screen; + long supp; + + if (!XGetWMNormalHints(screen->display, XtWindow(SHELL_OF(xw)), + &xw->hints, &supp)) + bzero(&xw->hints, sizeof(xw->hints)); + TRACE_HINTS(&(xw->hints)); +} + /* * Returns a GC, selected according to the font (reverse/bold/normal) that is * required for the current position (implied). The GC is updated with the @@ -2535,15 +3285,20 @@ GC updatedXtermGC(XtermWidget xw, unsigned flags, unsigned fg_bg, Bool hilite) { TScreen *screen = &(xw->screen); + VTwin *win = WhichVWin(screen); + CgsEnum cgsId = gcMAX; int my_fg = extract_fg(xw, fg_bg, flags); int my_bg = extract_bg(xw, fg_bg, flags); Pixel fg_pix = getXtermForeground(xw, flags, my_fg); Pixel bg_pix = getXtermBackground(xw, flags, my_bg); Pixel xx_pix; #if OPT_HIGHLIGHT_COLOR - Pixel hi_pix = T_COLOR(screen, HIGHLIGHT_BG); + Pixel selbg_pix = T_COLOR(screen, HIGHLIGHT_BG); + Pixel selfg_pix = T_COLOR(screen, HIGHLIGHT_FG); + Boolean always = screen->hilite_color; + Boolean use_selbg = always || isNotForeground(xw, fg_pix, bg_pix, selbg_pix); + Boolean use_selfg = always && isNotBackground(xw, fg_pix, bg_pix, selfg_pix); #endif - GC gc; (void) fg_bg; (void) my_bg; @@ -2552,30 +3307,57 @@ updatedXtermGC(XtermWidget xw, unsigned flags, unsigned fg_bg, Bool hilite) checkVeryBoldColors(flags, my_fg); if (ReverseOrHilite(screen, flags, hilite)) { - if (flags & BOLDATTR(screen)) - gc = ReverseBoldGC(screen); - else - gc = ReverseGC(screen); + if (flags & BOLDATTR(screen)) { + cgsId = gcBoldReverse; + } else { + cgsId = gcNormReverse; + } #if OPT_HIGHLIGHT_COLOR - if (hi_pix != T_COLOR(screen, TEXT_FG) - && hi_pix != fg_pix - && hi_pix != bg_pix - && hi_pix != xw->dft_foreground) { - bg_pix = fg_pix; - fg_pix = hi_pix; + if (!screen->hilite_color) { + if (selbg_pix != T_COLOR(screen, TEXT_FG) + && selbg_pix != fg_pix + && selbg_pix != bg_pix + && selbg_pix != xw->dft_foreground) { + bg_pix = fg_pix; + fg_pix = selbg_pix; + } + } +#endif + EXCHANGE(fg_pix, bg_pix, xx_pix); +#if OPT_HIGHLIGHT_COLOR + if (screen->hilite_color) { + if (screen->hilite_reverse) { + if (use_selbg) { + if (use_selfg) + bg_pix = fg_pix; + else + fg_pix = bg_pix; + } + if (use_selbg) + bg_pix = selbg_pix; + if (use_selfg) + fg_pix = selfg_pix; + } } #endif - xx_pix = bg_pix; - bg_pix = fg_pix; - fg_pix = xx_pix; } else { - if (flags & BOLDATTR(screen)) - gc = NormalBoldGC(screen); - else - gc = NormalGC(screen); - + if (flags & BOLDATTR(screen)) { + cgsId = gcBold; + } else { + cgsId = gcNorm; + } + } +#if OPT_HIGHLIGHT_COLOR + if (!screen->hilite_color || !screen->hilite_reverse) { + if (hilite && !screen->hilite_reverse) { + if (use_selbg) + bg_pix = selbg_pix; + if (use_selfg) + fg_pix = selfg_pix; + } } +#endif #if OPT_BLINK_TEXT if ((screen->blink_state == ON) && (!screen->blink_as_bold) && (flags & BLINK)) { @@ -2583,9 +3365,9 @@ updatedXtermGC(XtermWidget xw, unsigned flags, unsigned fg_bg, Bool hilite) } #endif - XSetForeground(screen->display, gc, fg_pix); - XSetBackground(screen->display, gc, bg_pix); - return gc; + setCgsFore(xw, win, cgsId, fg_pix); + setCgsBack(xw, win, cgsId, bg_pix); + return getCgsGC(xw, win, cgsId); } /* @@ -2597,29 +3379,32 @@ void resetXtermGC(XtermWidget xw, unsigned flags, Bool hilite) { TScreen *screen = &(xw->screen); + VTwin *win = WhichVWin(screen); + CgsEnum cgsId = gcMAX; Pixel fg_pix = getXtermForeground(xw, flags, xw->cur_foreground); Pixel bg_pix = getXtermBackground(xw, flags, xw->cur_background); - GC gc; checkVeryBoldColors(flags, xw->cur_foreground); if (ReverseOrHilite(screen, flags, hilite)) { - if (flags & BOLDATTR(screen)) - gc = ReverseBoldGC(screen); - else - gc = ReverseGC(screen); + if (flags & BOLDATTR(screen)) { + cgsId = gcBoldReverse; + } else { + cgsId = gcNormReverse; + } - XSetForeground(screen->display, gc, bg_pix); - XSetBackground(screen->display, gc, fg_pix); + setCgsFore(xw, win, cgsId, bg_pix); + setCgsBack(xw, win, cgsId, fg_pix); } else { - if (flags & BOLDATTR(screen)) - gc = NormalBoldGC(screen); - else - gc = NormalGC(screen); + if (flags & BOLDATTR(screen)) { + cgsId = gcBold; + } else { + cgsId = gcNorm; + } - XSetForeground(screen->display, gc, fg_pix); - XSetBackground(screen->display, gc, bg_pix); + setCgsFore(xw, win, cgsId, fg_pix); + setCgsBack(xw, win, cgsId, bg_pix); } } @@ -2695,16 +3480,17 @@ ClearCurBackground(XtermWidget xw, { TScreen *screen = &(xw->screen); - XSetWindowBackground(screen->display, - VWindow(screen), - getXtermBackground(xw, xw->flags, xw->cur_background)); + TRACE(("ClearCurBackground(%d,%d,%d,%d) %d\n", + top, left, height, width, xw->cur_background)); + + if (VWindow(screen)) { + set_background(xw, xw->cur_background); - XClearArea(screen->display, VWindow(screen), - left, top, width, height, False); + XClearArea(screen->display, VWindow(screen), + left, top, width, height, False); - XSetWindowBackground(screen->display, - VWindow(screen), - getXtermBackground(xw, xw->flags, MAXCOLORS)); + set_background(xw, -1); + } } #endif /* OPT_ISO_COLORS */ @@ -2727,10 +3513,10 @@ getXtermCell(TScreen * screen, int row, int col) void putXtermCell(TScreen * screen, int row, int col, int ch) { - SCRN_BUF_CHARS(screen, row)[col] = ch; + SCRN_BUF_CHARS(screen, row)[col] = LO_BYTE(ch); if_OPT_WIDE_CHARS(screen, { int off; - SCRN_BUF_WIDEC(screen, row)[col] = (ch >> 8); + SCRN_BUF_WIDEC(screen, row)[col] = HI_BYTE(ch); for (off = OFF_WIDEC + 1; off < MAX_PTRS; ++off) { SCREEN_PTR(screen, row, off)[col] = 0; } @@ -2741,9 +3527,9 @@ putXtermCell(TScreen * screen, int row, int col, int ch) unsigned getXtermCellComb(TScreen * screen, int row, int col, int off) { - unsigned ch = SCREEN_PTR(screen, row, off)[col]; - ch |= (SCREEN_PTR(screen, row, off + 1)[col] << 8); - return ch; + return PACK_PAIR(SCREEN_PTR(screen, row, off), + SCREEN_PTR(screen, row, off + 1), + col); } /* @@ -2754,11 +3540,15 @@ addXtermCombining(TScreen * screen, int row, int col, unsigned ch) { if (ch != 0) { int off; + + TRACE(("addXtermCombining %d,%d %#x (%d)\n", + row, col, ch, my_wcwidth(ch))); + for (off = OFF_FINAL; off < MAX_PTRS; off += 2) { if (!SCREEN_PTR(screen, row, off + 0)[col] && !SCREEN_PTR(screen, row, off + 1)[col]) { - SCREEN_PTR(screen, row, off + 0)[col] = ch & 0xff; - SCREEN_PTR(screen, row, off + 1)[col] = ch >> 8; + SCREEN_PTR(screen, row, off + 0)[col] = LO_BYTE(ch); + SCREEN_PTR(screen, row, off + 1)[col] = HI_BYTE(ch); break; } } @@ -2825,6 +3615,7 @@ void update_keyboard_type(void) { update_delete_del(); + update_tcap_fkeys(); update_old_fkeys(); update_hp_fkeys(); update_sco_fkeys(); @@ -2917,6 +3708,9 @@ decode_keyboard_type(XtermWidget xw, XTERM_RESOURCE * rp) #if OPT_SUNPC_KBD DATA(NAME_VT220_KT, keyboardIsVT220, sunKeyboard), #endif +#if OPT_TCAP_FKEYS + DATA(NAME_TCAP_KT, keyboardIsTermcap, termcapKeys), +#endif }; Cardinal n; @@ -2966,13 +3760,12 @@ decode_keyboard_type(XtermWidget xw, XTERM_RESOURCE * rp) * old runtime configurations which yield incomplete or inaccurate data. */ static Bool -systemWcwidthOk(void) +systemWcwidthOk(int samplesize, int samplepass) { wchar_t n; int oops = 0; - int last = 1024; - for (n = 0; n < last; ++n) { + for (n = 0; n < (wchar_t) samplesize; ++n) { int system_code = wcwidth(n); int intern_code = mk_wcwidth(n); @@ -2998,25 +3791,29 @@ systemWcwidthOk(void) ++oops; } } - TRACE(("systemWcwidthOk: %d/%d mismatches\n", oops, last)); - return (oops < (last / 4)); + TRACE(("systemWcwidthOk: %d/%d mismatches, allowed %d\n", + oops, samplesize, samplepass)); + return (oops <= samplepass); } #endif /* HAVE_WCWIDTH */ void -decode_wcwidth(int mode) +decode_wcwidth(int mode, int samplesize, int samplepass) { switch (mode) { default: #if defined(HAVE_WCHAR_H) && defined(HAVE_WCWIDTH) - if (xtermEnvUTF8() && systemWcwidthOk()) { + if (xtermEnvUTF8() && systemWcwidthOk(samplesize, samplepass)) { my_wcwidth = wcwidth; TRACE(("using system wcwidth() function\n")); break; } /* FALLTHRU */ - case 2: +#else + (void) samplesize; + (void) samplepass; #endif + case 2: my_wcwidth = &mk_wcwidth; TRACE(("using MK wcwidth() function\n")); break; diff --git a/app/xterm/version.h b/app/xterm/version.h index ab02065ba..b74cf2be9 100644 --- a/app/xterm/version.h +++ b/app/xterm/version.h @@ -1,4 +1,4 @@ -/* $XTermId: version.h,v 1.288 2008/01/06 22:36:16 tom Exp $ */ +/* $XTermId: version.h,v 1.290 2008/02/28 00:17:03 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 232 +#define XTERM_PATCH 234 #ifndef __vendorversion__ #define __vendorversion__ "XTerm/OpenBSD" diff --git a/app/xterm/xterm.log.html b/app/xterm/xterm.log.html index b6f9b005a..0e10ac1b0 100644 --- a/app/xterm/xterm.log.html +++ b/app/xterm/xterm.log.html @@ -1,7 +1,7 @@ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <!-- ***************************************************************************** - * Copyright 1996-2005,2006 by Thomas E. Dickey * + * Copyright 1996-2007,2008 by Thomas E. Dickey * * All Rights Reserved. * * * * Permission to use, copy, modify, and distribute this software and its * @@ -20,8 +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.460 2006/08/03 23:58:30 tom Exp $ - $XFree86: xc/programs/xterm/xterm.log.html,v 1.151 2006/06/20 00:42:38 dickey Exp $ + $XTermId: xterm.log.html,v 1.664 2008/03/02 23:32:51 tom Exp $ --> <HTML> <HEAD> @@ -31,7 +30,7 @@ </HEAD> <BODY> <HR> -Copyright 1997-2005,2006 by <A +Copyright © 1997-2007,2008 by <A HREF="mailto:dickey@invisible-island.net">Thomas E. Dickey</A> <HR> <H1>Contents</H1> @@ -46,6 +45,24 @@ Most of these are summarized in the XFree86 CHANGELOG is the latest version of this file. <UL> +<LI><A HREF="#xterm_234">Patch #234 - 2008-03/02</A> +<LI><A HREF="#xterm_233">Patch #233 - 2008/02/24</A> +<LI><A HREF="#xterm_232">Patch #232 - 2008/01/30</A> +<LI><A HREF="#xterm_231">Patch #231 - 2008/01/05</A> +<LI><A HREF="#xterm_230">Patch #230 - 2007/12/31</A> +<LI><A HREF="#xterm_229">Patch #229 - 2007/8/12</A> +<LI><A HREF="#xterm_228">Patch #228 - 2007/7/22</A> +<LI><A HREF="#xterm_227">Patch #227 - 2007/6/27</A> +<LI><A HREF="#xterm_226">Patch #226 - 2007/6/17</A> +<LI><A HREF="#xterm_225">Patch #225 - 2007/3/24</A> +<LI><A HREF="#xterm_224">Patch #224 - 2007/2/11</A> +<LI><A HREF="#xterm_223">Patch #223 - 2006/11/30</A> +<LI><A HREF="#xterm_222">Patch #222 - 2006/10/17</A> +<LI><A HREF="#xterm_221">Patch #221 - 2006/10/1</A> +<LI><A HREF="#xterm_220">Patch #220 - 2006/9/10</A> +<LI><A HREF="#xterm_219">Patch #219 - 2006/9/4</A> +<LI><A HREF="#xterm_218">Patch #218 - 2006/8/27</A> +<LI><A HREF="#xterm_217">Patch #217 - 2006/8/20</A> <LI><A HREF="#xterm_216">Patch #216 - 2006/8/3</A> <LI><A HREF="#xterm_215">Patch #215 - 2006/6/19 - XFree86 4.6.99.2</A> <LI><A HREF="#xterm_214">Patch #214 - 2006/6/18 - XFree86 4.6.99.2</A> @@ -265,6 +282,767 @@ is the latest version of this file. <LI><A HREF="#xterm_01">Patch #1 - 1996/1/6</A> </UL> +<H1><A NAME="xterm_234">Patch #234 - 2008-03/02</A></H1> +<ul> + <li>modify <code>sinstall.sh</code> to use POSIX locale to + bypass GNU ls changes to date-format. + + <li>improved/refined changes for closing bitmap font (patch by + Andrea Odetti). + + <li>improve resize computation for situations where the negotiation + fails, by invoking the xterm widget's core-class resize method + (Debian #365602, patch by Jim Paris). + + <li>restore initialization of terminal's <code>VMIN</code> and + <code>VTIME</code> settings, + from <a href="#xterm_232">patch #232</a> changes + (patch by Matthieu Herrb). +</ul> + +<H1><A NAME="xterm_233">Patch #233 - 2008/02/24</A></H1> +<ul> + <li>add configure check for <code>ttydefaults.h</code>, include if + needed, e.g., for systems where defining + <code>_POSIX_C_SOURCE</code>, etc., + prevents it from being included via + <code>termios.h</code> (prompted by comments by Robert Delius Royar + and Jeremy Huddleston). + + <li>patches from Alan Coopersmith. These correspond + to bug-ids on bugs.opensolaris.org + <dl> + <dt>4029911 + <dd>fix a typo in manpage + <dt>4045962 + <dd>xterm doesn't properly set ut_syslen + <dt>4192572 + <dd>left-left-right misinterpreted as triple click + </dl> + + <li>minor optimization to tab-initialization (patch by + Németh Márton). + + <li>fix a case where an incorrect font was freed during initialization + from <a href="#xterm_232">patch #232</a> changes (patch by + Andrea Odetti). + + <li>improve comparison used in <code>SameFont</code> function for + GC-caching (Julien Cristau). + + <li>correct macro name used for default <code>CKILL</code> definition + to work with Mac OS X (report by Jeremy Huddleston). +</ul> + +<H1><A NAME="xterm_232">Patch #232 - 2008/01/30</A></H1> +<ul> + <li>corrected logic in a font-cache used for reverse-video (Debian + #404079). + + <li>add control sequence to alter <code>pointerMode</code> at runtime. + + <li>add limit-checks for rectangle operation parameters (report by + Martin Pirker). + + <li>modify <code>minstall.sh</code> to suppress <code>$MANPAGER</code> + and <code>$PAGER</code> environment variables, which may interfere + with redirecting output of <code>man</code> to a shell variable + (report/patch by Zdenek Sekera). + + <li>do not try to hide mouse pointer in the tek4014 window, fixes + broken "-t" option at startup from + <a href="#xterm_230">patch #230</a> changes + (report by Robert K. Nelson). + + <li>correct datatype used when drawing tek4014 data using xterm + compiled for wide-characters, on big-endian machines (reports + by Jeremy Huddleston, Harald Hanche-Olsen, Martin Costabel, Merle + Reinhart). + + <li>modify to cache the font-names along with the bitmap font data, + to improve comparison of fonts. + + <li>modify to allow building with configure options + <code>--disable-ansi-color</code> and + <code>--disable-leaks</code> (Debian #459817, report/patch by Németh Márton). + + <li>modify to allow building with configure options + <code>--enable-wide-chars</code> and + <code>--disable-c1-print</code> (Debian #459816, report/patch by Németh Márton). + + <li>add <code>pointerMode</code> resource to control whether and + when the pointer cursor is hidden as the user types. + + <li>simplify initialization of ttyMode- and related characters using + a table. + + <li>modify initialization-logic for stty values that correspond to + ltchars structure and the BSD TIOCSLTC ioctl (susp, dsusp, rprnt + flush, werase, lnext). These were reset to constants for both + termios and legacy interfaces immediately after asking the system + for the existing values since X11R6.1, rather than using them to + provide inherited values. While the legacy interface has some + constraints, e.g., on HPUX, the POSIX or termios interface should + not. Your shell may reset these anyway + (prompted by patch by Ed Schouten). + + <li>improve logic for hiding/displaying pointer-cursor (report by + Mark Brukhartz). + + <li>add limit-checks to tabs.c, increase maximum column for setting + tab-stops from 320 to 1024 (report by Németh Márton). + + <li>correct length, i.e., number of types of selection targets, + computed by <code>ConvertSelection()</code> when not handling + wide characters for the <code>XA_TARGETS()</code> case. + This leaves an extra Atom on the end of the list which is + not handled by + <a href="http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6322854">Java applications</a>. + The problem was introduced in <a href="#xterm_151">patch #151</a> + (report by David Wood). +</ul> + +<H1><A NAME="xterm_231">Patch #231 - 2008/01/05</A></H1> +<ul> + <li>undo change to <code>getXtermCell()</code> from patch #230 + using <code>PACK_PAIR</code> macro (Debian #459014, analysis by + Caetano Jimenez Carezzato). + + <li>minor documentation fixes (patch by Slava Semushin) + + <li>add makefile actions to install KOI8RXTerm app-defaults file + (patch by Julien Cristau). +</ul> + +<H1><A NAME="xterm_230">Patch #230 - 2007/12/31</A></H1> +<ul> + <li>add <code>quietGrab</code> resource, which when true, suppresses + cursor repainting when <code>NotifyGrab</code> and + <code>NotifyUngrab</code> event types are received during + change of focus (request by Nicolas George). + + <li>do not treat Unicode BIDI control characters as combining + characters (Debian #457634). + + <li>add <code>koi8rxterm</code>, from Debian. + + <li>add manpage for <code>uxterm</code>, from Debian (Ubuntu #128136, + Debian #438645) + + <li>remove ".xpm" suffixes from Icon filenames in desktop files since + it confuses some lookups following the + <a href="http://standards.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html">Icon Theme Specification</a> + (report by Slava Semushin) + + <li>correct width-calculation used for adjusting proportional fonts, + to work with wide-characters (Debian #441354). + + <li>fixes/improvements for double-size characters: + <ul> + <li>correct old clipping calculation which used total height of + glyphs where ascent was needed. + + <li>if bold font is unavailable, fall back to normal font + + <li>adjust to "work" with Xft (which does not support double-width + single-height characters). + + <li>restore reset of doublesize for a line when it is cleared, + broken in <a href="#xterm-228">patch #228</a>. + </ul> + + <li>modify logic for <code>forceBoxChars</code> resource when using + TrueType fonts to be consistent with bitmap fonts + + <li>modify logic for <code>forceBoxChars</code> resource to make the + "Line-Drawing Characters" menu entry use xterm's line-drawing + characters even asked to draw wide line-drawing characters which + are available in the font. + + <li>modify rectangle-support functions to preserve colors when + filling/erasing (request by Enzo Toscano, to match WRQ Reflection + behavior). + + <li>add getopt-parsing to tcapquery.pl, including feature to test the + extended cursor/editing keys. + + <li>make missing double-width glyphs display as double-width + (Debian #456236). + + <li>change <code>tcap-fkeys</code> and <code>rectangles</code> + configure options to enable them by default. + + <li>hide the mouse pointer while user is typing (request by Rodolfo + Borges). + + <li>extend configure options + <code>--enable-tcap-query</code> and + <code>--enable-tcap-fkeys</code> to + send cursor- and editing-keypad keys modified according to the + keyboard (or termcap) selection for shift, alt, control, meta. + + <li>modify <code>kdch1</code> in termcap, e.g., <code>xterm-r6</code> + to match the terminfo file. + + <li>add <code>-hm</code> option to turn <code>highlightColorMode</code> + on or off. + + <li>add <code>highlightColorMode</code> resource to separate the + new (since <a href="#xterm_225">patch #225</a>) highlighting with both text- and + background-colors (prompted by report/example by Thomas Wolff). + + <li>add <em>Keep Selection</em> menu entry to turn the + <code>keepSelection</code> resource on/off at runtime. + + <li>add <code>keepSelection</code> resource, which when enabled, + tells xterm to retain the X selection even after it stops + highlighting it (patch by Sergey Vlasov). + + <li>extend the <code>CSI > n</code> sequence to allow + disabling all types of modified-keys that the + <code>CSI > m</code> sequence affects. + + <li>move include for <code><xtermcap.h></code> in + <code>resize.c</code> to avoid redefinition of <code>termios</code> + structure on OpenSolaris (report by Rahul Gopinathan Nair). + + <li>extend terminfo building blocks for modified editing keys to + include all six keys. + + <li>synchronize terminfo with ncurses (report by Stephane Chazelas): + <ul> + <li>equate <code>xterm-xfree86</code> + and <code>xterm-xf86-v44</code>. + <li>add ncurses extensions OTbs, AX, for termcap conversions. + <li>make old/legacy entries such as + <code>xterm-24</code>, <code>xterm-65</code> + and aliases <code>xterms</code>, <code>vs100</code> + inherit from <code>xterm-old</code>. + <li>make <code>xterm-r5</code> and <code>xterm-r6</code> the + same, ignoring historical errors in X Consortium's version. + </ul> + + <li>fix an ifdef in logic for selecting regular + expressions while in a narrow-character locale (Debian #449227). +</ul> + +<H1><A NAME="xterm_229">Patch #229 - 2007/8/12</A></H1> +<ul> + <li>override locale in minstall.sh; + change in <a href="#xterm_226">patch #226</a> + does not work in UTF-8 locale (report by Zdenek Sekera). + + <li>undo an incorrect fix for a memory leak + in <a href="#xterm_209">patch #209</a> (Debian #435858). +</ul> + +<H1><A NAME="xterm_228">Patch #228 - 2007/7/22</A></H1> +<ul> + <li>modify configure script to permit combining + <code>--with-utempter</code> + and <code>--enable-setuid</code>, e.g., for using xterm with + the utempter library on FreeBSD (report by Andriy Gapon). + + <li>modify "Quit" menu entry to override the <code>-hold</code> + command-line option. + + <li>add a check in the startup error-reporting to avoid writing to + pipe when it has not been opened. In that case, report errors + directly to the standard error. + + <li>add OPT_READLINE definition to xtermcfg.hin, overlooked in + <a href="#xterm_205">patch #205</a> + (report by Kalle Olavi Niemitalo). + + <li>modify <code>88colors2.pl</code> and <code>256colors2.pl</code>, + adding <code>-r</code> + option to reverse the palettes for the extended colors. + + <li>check for partial overwrite or deletion of multi-column characters + in several cases, e.g., insert-character, delete-character, + etc., + and fill the remainder of the cells used by the multi-column + characters affected with blanks. + + <li>correct character-class codes in wide-character mode for characters + 215, 247 (see also <a href="#xterm_165">patch #165</a>). + + <li>fix missing assignment for UTF-8 parsing in widget initialization + (Debian #403360). + + <li>correct index expression used to set line-wrapping flag, making + selection from scrollback work consistently (Debian #430121, + report by Vincent Lefevre). + + <li>amend changes to handshake in + <a href="#xterm_226">patch #226</a> + to accommodate Solaris, which relies on the extra setting of + the terminal size after I/O initialization. + Do this by adding new resource <code>ptySttySize</code>, + which is false for Linux and MacOS X, i.e., true for + for Solaris and other SVR4 platforms, as well as FreeBSD + (reports by David Wood, Renato Botelho). + + <li>check for X events after cursor-left, and carriage return, + consistent with indexing operations + (comments by Vegard Nossum and Ingo Molnar on a mailing-list). + + <li>initialize the <code>.keyboard</code> structure, + needed for some platforms (such as Solaris) after + <a href="#xterm_227">patch #227</a> fixes for keysyms + (patch by David Wood). + + <li>update config.guess, config.sub +</ul> + +<H1><A NAME="xterm_227">Patch #227 - 2007/6/27</A></H1> +<ul> + <li>exclude the Intel compiler from the extra gcc warning options + added in + <a href="#xterm_226">patch #226</a>. + + <li>modify change for Debian #422521 + from <a href="#xterm_226">patch #226</a> + to work with configurations where the X server does not + recognize + the <code>XF86Paste</code> + or <code>SunPaste</code> keysyms (report by Paolo Pumilia). + + <li>fix incorrect free in fix for "Selection" menu entry in + <a href="#xterm_226">patch #226</a>. +</ul> + +<H1><A NAME="xterm_226">Patch #226 - 2007/6/17</A></H1> +<ul> + <li>add configure check to use <code>-Wno-unknown-pragmas</code> for + Solaris, and a few other new gcc warning options to address + regressions in its warning options. + + <li>add sample desktop and icon files, along with configure options for + manipulating them. + + <li>fix an infinite loop when showing a 2-column character in a + 1-column screen (Debian #426863). + + <li>add <code>XF86Paste</code> and <code>SunPaste</code> to the + default translations (Debian #422521, patch by Bernhard R Link). + + <li>update wcwidth.c (partly based on/prompted by mailing list + comment). + + <li>update/improve keysym2ucs.c based on Unicode 5.0.1d3 and Xorg + 7.1 keysymdef.h file. + + <li>improve <code>gen-pc-fkeys.pl</code>, making it show all of the + building-block terminfo entries used by xterm. + + <li>correct strings used for modifiers applied to F1-F4 in xterm+pcf1 + terminfo entry. + + <li>improve session management by adding the ICE connection number + to the <code>select</code> call rather than waking up once per + second (patch by Miroslav Lichvar). + + <li>add environment variable <code>$XTERM_LOCALE</code> to help + with shell initialization, e.g., to set a specific locale for + xterm on systems where a global locale is set in the shell + startup scripts. + + <li>add resource settings <code>mkSampleSize</code> and + <code>mkSamplePass</code> + to modify the <code>mkWidth</code> added + in <a href="#xterm_201">patch #201</a>. + In <a href="#xterm_202">patch #202</a>, + xterm would also check if the system's + <code>wcwidth</code> matched its built-in tables + "well enough" to be used when <code>mkWidth</code> was false, + and if not would use the built-in tables anyway. + These resources allow the user to customize the decision + (prompted by comments by Emanuele Giaquinta) + + <li>modify logic which resets/updates the screensize on the child + process side of the pseudo-terminal to do this only if a + successful handshake was received, e.g., as determined by + the <code>waitForMap</code> resource (prompted by reports + by Emanuele Giaquinta and Bernhard R Link, but see also + <a href="#xterm_177">patch #177</a> and + <a href="#xterm_159">patch #159</a>. + + <li>improve permissions logic when closing pseudo-terminal + (Debian #12261, + patch by Nathanael Nerode, + analysis by Richard Braakman). + + <li>add resource <code>highlightReverse</code> which controls whether + xterm will allow selection highlighting to hide reverse-video + or use the older behavior which inverts the foreground and + background colors when selected text with reverse-video attribute + (report by Adam M Costello, comments by Victor Vaile). + + <li>restore a special case for cursor-color in + <code>ReverseVideo()</code> + lost in rewrite for <a href="#xterm_224">patch #224</a> + (report by Adam Sulmicki). + + <li>correct initialization for menu entry for <code>bellIsUrgent</code> + (patch by Emanuele Giaquinta). + + <li>correct length of underlining for double-width Xft fonts + (report by Shidai Liu "Leo"). + + <li>correct clipping for double-width Xft fonts + (report by Shidai Liu "Leo"). + + <li>modify initialization for <code>italicULMode</code> to avoid + <code>XftPatternBuild</code> reusing bold attributes + (report by Shidai Liu "Leo"). + + <li>add a check in case someone tries to call the + <code>popup-menu()</code> action on a menu which is not initialized + (Debian #426364). + + <li>improve CF_IMAKE_CFLAGS to work with Solaris sed (report by Peter + Bray). + + <li>improve guess for X's manpage section in <code>minstall.sh</code>, + (prompted by comment by Miroslav Lichvar). + + <li>modify <code>minstall.sh</code> to handle manpage patch with more + than one dot (patch by Miroslav Lichvar). + + <li>fix configure message for --disable-setgid option (patch by + Miroslav Lichvar). + + <li>add <code>allowTitleOps</code> resource to allow users to prevent + the title- and icon-names from changing (request by John Bashinski). + + <li>fix "spawn-new-terminal" action, for the case where no parameter + is passed to the action (patch by Daniel Colascione). + + <li>fix error-checking on internal font switching for "Selection" + menu entry (Debian #421523). + + <li>amend select/paste change from + <a href="#xterm_225">patch #225</a> + by limiting it to non-UTF-8/non-KOI8-R encoding (Debian #420974). + + <li>add workaround for groff ".URL" codes which are not present in + some commonly-used bitmap fonts (Debian #418324). +</ul> + +<H1><A NAME="xterm_225">Patch #225 - 2007/3/24</A></H1> +<ul> + <li>add <code>useClipping</code> resource to allow clipping to be + disabled. + + <li>use <code>XftDrawSetClipRectangles</code> + to work around Xft pixel-trash (report by Reuben Thomas). + + <li>add configure option <code>--enable-tcap-fkeys</code>, and + resource <code>tcapFunctionKeys</code>, which can be used + to tell xterm to use function-key definitions from the termcap + (or terminfo) which it uses to set $TERM on startup. + + <li>add resources <code>altIsNotMeta</code> and + <code>altSendsEscape</code> to allow one to use Alt-keys like the + meta-key even if they are bound to different keycodes (prompted by + discussion with Daniel Jacobowitz). + + <li>revert a change from <a href="#xterm_216">patch #216</a> + that unnecessarily made the meta modifier override + the <code>eightBitInput</code> resource if the alt- and + meta-modifiers happened to overlap + (report/patch by Daniel Jacobowitz). + + <li>correct associated font for active icon for colored text + (broken in <a href="#xterm_224">patch #224</a>). + + <li>correct ifdef's for Darwin (patch by Emanuele Giaquinta). + + <li>add <code>highlightTextColor</code> resource, and options + <code>-selfg</code>, <code>-selbg</code> like <code>xwsh</code> + (adapted from patch by Victor Vaile). + + <li>revise <code>find_closest_color()</code> function to address + concern about borrowing from <code>Tcl/Tk</code> + (request by Dan McNichol). + + <li>add "spawn-new-terminal" action, which can be assigned to key + translation, allowing one to spawn a new copy of xterm using + the current process' working directory (adapted from patch + by Daniel Colascione). + + <li>improve select/paste between UTF-8 and Latin1 xterms by adapting + the translations from <a href="#xterm_185">patch #185</a>. + Extend that to include Unicode fullwidth forms FF00-FF5E. + Also modify select/paste of DEC line-drawing characters in + Latin1 mode to use ASCII characters. + + <li>add "Enable Bell Urgency" to VT Options menu, removed "Enable + Margin Bell". + + <li>add <code>bellIsUrgent</code> resource to control whether the + Urgency hint is set/reset. + + <li>modify to set Urgency window manager hint on bell, reset it on + Focus-In event (patch by Emanuele Giaquinta). + + <li>add <code>--disable-setgid</code> configure option (request by + Miroslav Lichvar). + + <li>fix a possible infinite loop in last change to + <code>dabbrev-expand()</code> (patch by Emanuele Giaquinta). + + <li>modify initialization to set the pty erase value if the + <code>erase</code> is set in the <code>ttyModes</code> resource. + This overrides the <code>ptyInitialErase</code> setting (request by + Lluís Batlle i Rossell). + + <li>add <code>initialFont</code> resource to xterm widget, like + tek-widget (Debian #299669). + + <li>amend change to <code>boldMode</code> from + <a href="#xterm_223">patch #223</a> for Debian #347790. + As noted in Debian #412599, that made xterm + no longer match the documented behavior. + Add new resource <code>alwaysBoldMode</code> + to allow overriding the comparison + between normal/bold fonts when deciding whether to use overstriking + to simulate bold fonts. + + <li>restore background color in ClearCurBackground(), omitted in + changes for <a href="#xterm_223">patch #223</a> (report by + Miroslav Lichvar). + + <li>correct logic for repainting double-width TrueType characters + (prompted by test-case for Novell #246573). + + <li>add a check to avoid trying to repeat a multibyte character + (report by Sami Farin). + + <li>modify parameter to <code>XftNameParse()</code> to select wide + face-name as needed, to make <code>-fd</code> option work (patch by + Mike Fabian, Novell #246573). + + <li>correct logic for mouse highlight tracking's abort sequence, + broken in a restructuring modification from + <a href="#xterm_224">patch #224</a> + (report by Thomas Wolff). + + <li>revert the simplification of blinking cursor, since that broke + the xor'ing introduced in <a href="#xterm_193">patch #193</a> + (report by Thomas Wolff). +</ul> + +<H1><A NAME="xterm_224">Patch #224 - 2007/2/11</A></H1> +<ul> + <li>simplify code for set/reset mode for blinking cursor + (patch by Emanuele Giaquinta). + + <li>modify <code>dabbrev-expand()</code> to restart after the last + match (patch by Emanuele Giaquinta). + + <li>add control sequences for enabling/disabling focus in/out event + reporting (request by Bram Moolenaar). + + <li>improve startup performance of menus by adding resource setting + <code>menuLocale</code> which can be set to override X's + lengthy initialization of fontsets - which are seldom used + for the <code>Xaw</code> popup menus (adapted from patch by + Dave Coffin). + + <li>modify do_precomposition() function and make-compose.sh to handle + 21-bit codes vs the 16-bit codes those were written for, and + fix a few mis-sorted codes + (patch by Thomas Wolff). + + <li>handle special case in <code>-cjk_width</code> + which unexpectedly caused a character's width to change when + a combining character + (patch by Thomas Wolff) + + <li>fix build for GNU/KFreeBSD (Debian #40111). + + <li>consolidate GC creation/updating into a single module to reduce GC + manipulation (prompted by Debian #389476, though a complete fix + would involve optimizing the scrolling behavior). + + <li>fix ifdef of xtermCellWidth(), which broke for a case without + TrueType and without wide-character support (report by Martin + Pirker). + + <li>undo a comparison in <code>handle_translated_exposure</code> which + did not work due to X server optimization. That caused the + inner border to be repainted with unexpected colors when handling + a repaint, e.g., after switching to/from another workspace + (Debian #401726, Redhat Bugzilla #223027). + + <li>allow <code>-cr</code> option to override cursor color when + <code>-ah</code> option is used (Debian #406502). + + <li>add a note in xterm's manpage explaining that the <code>-bw</code> + (or <code>-w</code>) option is only used by the window manager, + if at all (Debian #405043). + + <li>make <code>Selection</code> of <code>VT Fonts</code> work with + <code>selectToClipboard</code> resource. + + <li>correct length calculation for <code>Selection</code> entry of + <code>VT Fonts</code> menu, broken since it ignored the + actual selection length since X11R4. + + <li>fixes for fontsize changes with <code>-fa</code> option (Redhat + Bugzilla #222340). +</ul> + +<H1><A NAME="xterm_223">Patch #223 - 2006/11/30</A></H1> +<ul> + <li>add <code>--enable-rectangles</code> configure option (request by + Martin Pirker). + + <li>correct default value for <code>--with-symlink</code> configure + option. + + <li>fixes configure script macros that use <code>$X_EXTRA_LIBS</code>. + + <li>modify configure script to provide support for pre-package config + versions of Xft (FreeType). + + <li>add the Xaw scrollbar translations resource to the xterm manpage, + add an example showing how to change the mouse button assignments + (Debian #382225). + + <li>amend a change from <a href="#xterm_216">patch #216</a>, + which omitted modifiers for control, meta, etc., if they were + mixed with any other modifiers. The intent of the change was + to avoid confusion with + <code>XK_Mode_switch</code> + and <code>XK_ISO_Level3_Shift</code>; + the check is now done explicitly (report by Daniel Jacobowitz). + + <li>interpret a negative value for <code>modifyCursorKeys</code> + or <code>modifyFunctionKeys</code> resources to disable the + respective features (prompted by Novell #220728). + + <li>amend cell-width computation for FreeType from + <a href="#xterm_217">patch #217</a>, which did not work + for VT100 line-drawing characters (Debian #399638, GenToo #147111). + + <li>amend a change from <a href="#xterm_216">patch #216</a>, + which made alt-modifier on a cursor-key send a modifier parameter + (Novell #220728). + + <li>correct an off-by-one that made DECCRA not work (report/patch by + Martin Pirker). + + <li>revert an optimization in SGR_Foreground() and SGR_Background + from <a href="#xterm_209">patch #209</a> (Debian #347722, + analysis by Pierre Lombard). + + <li>fix for <code>boldMode</code> (Debian #347790, patch by Tim Pope). + + <li>amend fix for <code>-iconic</code> in + <a href="#xterm_208">patch #208</a>, + which broke the positioning part of <code>-geom</code> with toolbar + configuration. + + <li>fix to prevent indexing error in regular expressions (patch + by Dennis Schneider). + + <li>fixes to make the internalBorder area not change color due to + reverseVideo and/or related exposure events. The latter was a very + old bug exposed in <a href="#xterm_196">patch #196</a> (report by + Neil Hoggarth, also Debian #397624). +</ul> + +<H1><A NAME="xterm_222">Patch #222 - 2006/10/17</A></H1> +<ul> + <li>minor optimization for recoloring cursor via dynamic colors. + + <li>fix a bug caused by restructuring of tek4014 widget (report by Paul + Schenkeveld) +</ul> + +<H1><A NAME="xterm_221">Patch #221 - 2006/10/1</A></H1> +<ul> + <li>fix for regular expressions: the code which converted the column + offset within a line did not check properly for the end of a line, + and if allowed to match the whole line, would select the beginning + of the following line. If the following line were empty, in turn + it would select from the next, etc. (report by Sean + Reifschneider). + + <li>minor optimization of color allocation to avoid repainting the + screen if the corresponding color had not been allocated. + + <li>fixes for vttests/256colors.pl (report by Egmont Koblinger). + + <li>add terminfo building block entries for modifiers of the 6-key + editing keypad. + + <li>fix for initialization of tek4014 which broke on QNX 6.1 +</ul> + +<H1><A NAME="xterm_220">Patch #220 - 2006/9/10</A></H1> +<ul> + <li>make "xterm -t -iconic" work as expected, i.e., start in tek4014 + mode, but iconified. +</ul> + +<H1><A NAME="xterm_219">Patch #219 - 2006/9/4</A></H1> +<ul> + <li>some internal restructuring to separate data for vt100 and tek4014 + widgets. + + <li>fix a few cases where form-events would be seen by the vt100 + widget when built with the toolbar configuration. +</ul> + +<H1><A NAME="xterm_218">Patch #218 - 2006/8/27</A></H1> +<ul> + <li>change behavior when encountering an illegal character in a title + string. Rather than reject the string, translate illegal + characters into "?" and use the string (requested by Thomas Wolff). + + <li>improve checks for nonprinting characters in title strings + (report by Samuel Thibault). + + <li>correct typo in menu labels, changing <code>print-redirect</code> + to <code>print-redir</code>, making it follow the manpage and + match the usage for the actions table (report by Samuel Thibault). + + <li>correct a typo that prevents building with some older systems such + as Solaris 2.6 (report by Julian Bridle). +</ul> + +<H1><A NAME="xterm_217">Patch #217 - 2006/8/20</A></H1> +<ul> + <li>minor improvements to FreeType font layout and drawing. + + <li>add a check in the ptyInitialErase logic to ensure that the + termcap was read (Redhat Bugzilla #201246). + + <li>limit changes for reverse-video from + <a href="#xterm_216">patch #216</a> to cases where the + reverse-video command-line option is used + (report by Zdenek Sekera). + + <li>correct bitmap-derived pointsizes for TrueType fonts; they should + be proportional to the square root of the area of the bitmap + fonts. + + <li>add resources to specify pointsize of TrueType fonts (request + by Reuben Thomas). + + <li>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). + + <li>update "xterm+pcfkeys" terminfo entry to correspond to + <a href="#xterm_216">patch #216</a>. +</ul> + <H1><A NAME="xterm_216">Patch #216 - 2006/8/3</A></H1> <ul> <li>improve handling of <code>ConfigureNotify</code> events by checking @@ -357,7 +1135,7 @@ is the latest version of this file. colors inconsistent. <li>corrected calls used for <code>--disable-setuid</code> option, - add debugging traces to help diagnose this area. + add debugging traces to help diagnose this area. <li>modify configure script to ensure that <code>USE_UTMP_SETGID</code> is defined only if the check for POSIX saved-ids succeeds, or @@ -435,7 +1213,7 @@ is the latest version of this file. <li>minor optimization to cell layout; will use that to simplify some logic and allow for more than two combining characters in another patch. - + <li>add <code>utf8Latin1</code> resource to make optional the feature from <a href="#xterm_209">patch #209</a> which allowed ISO-8859-1 fonts to be used in cases @@ -527,7 +1305,7 @@ is the latest version of this file. <li>add vttests/paste64.pl script to test experimental option for setting/getting selection data. - <li>add some error-checking in fontutils.c + <li>add some error-checking in fontutils.c (prompted by David Dawes commit message for XFree86). <li>change xterm manpage to show the actual color resource names @@ -569,7 +1347,7 @@ is the latest version of this file. "Select To Clipboard"). <li>add resource <code>selectToClipboard</code>, - action <code>set-select</code> and a menu entry to allow + action <code>set-select</code> and a menu entry to allow users to switch between PRIMARY and CLIPBOARD for select/paste. <li>allow cursor to have the same color as foreground (text), since it @@ -787,7 +1565,7 @@ is the latest version of this file. <li>modify parsing of control sequence <code>CSI T</code> to allow scroll-down to be sent while mouse tracking is enabled (request by - D Hugh Redelmeier). + D Hugh Redelmeier). <li>correct termcap "me" (mode-end) string so it does not modify the alternate character set (report by Andrey Chernov). @@ -1015,7 +1793,8 @@ is the latest version of this file. <li>rename <code>$CMD</code> variable in <code>plink.sh</code> because it is a reserved symbol in bash 3.00.16 (report by Ted Taylor). - <li>add environment variables $XTERM_SHELL and $XTERM_VERSION + <li>add environment variables <code>$XTERM_SHELL</code> and + <code>$XTERM_VERSION</code> (request by Zdenek Sekera). <li>corrected workaround for background color of menubar, which gave @@ -3632,7 +4411,7 @@ is the latest version of this file. Jim Knoble <jmknoble@pobox.com>). <li>correct ifdef'ing for conflict between definitions in AIX's - <sys/select.h> and <X11/XPoll.h> (reported by Clint + <sys/select.h> and <X11/Xpoll.h> (reported by Clint Olsen). <li>add checks for return-values of getutid(), initgroups() and @@ -4019,12 +4798,12 @@ is the latest version of this file. (prompted by a problem report for <code>-C</code> by Jeremie Petit <Jeremie.Petit@digital.com>). - <li>add workaround for conflict between <X11/XPoll.h> and + <li>add workaround for conflict between <X11/Xpoll.h> and <sys/select.h> on AIX 4.3 (Richard Griswold <griswold@acm.org>). <li>add configure script test to resolve conflict between between - <X11/XPoll.h> and <sys/select.h> + <X11/Xpoll.h> and <sys/select.h> <li>modify translation of UTF-8 sequences to reject "overly long" variations (patch by Markus Kuhn). diff --git a/app/xterm/xterm.man b/app/xterm/xterm.man index c36731ebc..e47a5c060 100644 --- a/app/xterm/xterm.man +++ b/app/xterm/xterm.man @@ -1,5 +1,5 @@ '\" t -.\" $XTermId: xterm.man,v 1.405 2008/01/27 17:37:46 tom Exp $ +.\" $XTermId: xterm.man,v 1.406 2008/02/24 19:09:31 Alan.Coopersmith Exp $ .\" .\" Copyright 1996-2007,2008 by Thomas E. Dickey .\" @@ -294,7 +294,7 @@ This is equivalent to setting the \fIvt100\fP resource This option indicates that auto-wraparound should be allowed. This allows the cursor to automatically wrap to the beginning of the next -line when when it is at the rightmost position of a line and text is +line when it is at the rightmost position of a line and text is output. .TP 8 .B +aw diff --git a/app/xterm/xtermcfg.h b/app/xterm/xtermcfg.h index bc24dc2fb..a09edbb38 100644 --- a/app/xterm/xtermcfg.h +++ b/app/xterm/xtermcfg.h @@ -63,6 +63,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #define HAVE_STRERROR 1 /* AC_CHECK_FUNCS(strerror) */ #define HAVE_STRFTIME 1 /* AC_CHECK_FUNCS(strftime) */ /* #undef HAVE_SYS_TIME_H */ /* AC_HEADER_TIME */ +#define HAVE_SYS_TTYDEFAULTS_H /* AC_CHECK_HEADERS(sys/ttydefaults.h) */ #define HAVE_SYS_WAIT_H 1 /* AC_HEADER_SYS_WAIT */ #define HAVE_TCGETATTR 1 /* AC_CHECK_FUNCS(tcgetattr) */ #define HAVE_TERMCAP_H 1 /* AC_CHECK_HEADERS(termcap.h) */ @@ -74,6 +75,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #define HAVE_UTMP 1 /* CF_UTMP */ #define HAVE_UTMP_UT_HOST 1 /* CF_UTMP_UT_HOST */ /* #undef HAVE_UTMP_UT_SESSION */ /* CF_UTMP_UT_SESSION */ +/* #undef HAVE_UTMP_UT_SYSLEN */ /* CF_UTMP_UT_SYSLEN */ /* #undef HAVE_UTMP_UT_XSTATUS */ /* CF_UTMP_UT_XSTATUS */ /* #undef HAVE_UTMP_UT_XTIME */ /* CF_UTMP_UT_XTIME */ #define HAVE_WAITPID 1 /* AC_CHECK_FUNCS(waitpid) */ diff --git a/app/xterm/xtermcfg.hin b/app/xterm/xtermcfg.hin index 39086ff07..07317da85 100644 --- a/app/xterm/xtermcfg.hin +++ b/app/xterm/xtermcfg.hin @@ -1,4 +1,4 @@ -/* $XTermId: xtermcfg.hin,v 1.154 2006/07/15 12:10:03 tom Exp $ */ +/* $XTermId: xtermcfg.hin,v 1.169 2008/02/24 21:47:48 tom Exp $ */ /* * $XFree86: xc/programs/xterm/xtermcfg.hin,v 3.61 2006/06/19 00:36:52 dickey Exp $ @@ -6,7 +6,7 @@ /************************************************************ -Copyright 1997-2005,2006 by Thomas E. Dickey +Copyright 1997-2007,2008 by Thomas E. Dickey All Rights Reserved @@ -41,6 +41,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #undef DFT_COLORMODE /* AC_ARG_WITH(default-color-mode) */ #undef DFT_DECID /* AC_ARG_WITH(default-terminal-id) */ #undef DFT_TERMTYPE /* AC_ARG_WITH(default-term-type) */ +#undef DISABLE_SETGID /* CF_ARG_DISABLE(setgid) */ #undef DISABLE_SETUID /* CF_ARG_DISABLE(setuid) */ #undef HAVE_GETHOSTNAME /* AC_CHECK_FUNCS(gethostname) */ #undef HAVE_GETLOGIN /* AC_CHECK_FUNCS(getlogin) */ @@ -61,15 +62,19 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #undef HAVE_STRERROR /* AC_CHECK_FUNCS(strerror) */ #undef HAVE_STRFTIME /* AC_CHECK_FUNCS(strftime) */ #undef HAVE_SYS_TIME_H /* AC_HEADER_TIME */ +#undef HAVE_SYS_TTYDEFAULTS_H /* AC_CHECK_HEADERS(sys/ttydefaults.h) */ #undef HAVE_SYS_WAIT_H /* AC_HEADER_SYS_WAIT */ #undef HAVE_TCGETATTR /* AC_CHECK_FUNCS(tcgetattr) */ #undef HAVE_TERMCAP_H /* AC_CHECK_HEADERS(termcap.h) */ #undef HAVE_TERMIOS_H /* AC_CHECK_HEADERS(termios.h) */ #undef HAVE_TERMIO_C_ISPEED /* CF_TERMIO_C_ISPEED */ +#undef HAVE_TERM_H /* AC_CHECK_HEADERS(term.h) */ +#undef HAVE_TIGETSTR /* AC_CHECK_FUNCS(tigetstr) */ #undef HAVE_UNISTD_H /* AC_CHECK_HEADERS(unistd.h) */ #undef HAVE_UTMP /* CF_UTMP */ #undef HAVE_UTMP_UT_HOST /* CF_UTMP_UT_HOST */ #undef HAVE_UTMP_UT_SESSION /* CF_UTMP_UT_SESSION */ +#undef HAVE_UTMP_UT_SYSLEN /* CF_UTMP_UT_SYSLEN */ #undef HAVE_UTMP_UT_XSTATUS /* CF_UTMP_UT_XSTATUS */ #undef HAVE_UTMP_UT_XTIME /* CF_UTMP_UT_XTIME */ #undef HAVE_WAITPID /* AC_CHECK_FUNCS(waitpid) */ @@ -78,7 +83,10 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #undef HAVE_WCWIDTH /* AC_CHECK_FUNCS(wcwidth) */ #undef HAVE_X11_DECKEYSYM_H /* AC_CHECK_HEADERS(X11/DECkeysym.h) */ #undef HAVE_X11_SUNKEYSYM_H /* AC_CHECK_HEADERS(X11/Sunkeysym.h) */ +#undef HAVE_X11_XF86KEYSYM_H /* AC_CHECK_HEADERS(X11/XF86keysym.h) */ #undef HAVE_X11_XPOLL_H /* AC_CHECK_HEADERS(X11/Xpoll.h) */ +#undef HAVE_XFTDRAWSETCLIP /* CF_X_FREETYPE */ +#undef HAVE_XFTDRAWSETCLIPRECTANGLES /* CF_X_FREETYPE */ #undef HAVE_XKB_BELL_EXT /* CF_XKB_BELL_EXT */ #undef LUIT_PATH /* CF_ARG_ENABLE(luit) */ #undef NO_ACTIVE_ICON /* CF_ARG_DISABLE(active-icon) */ @@ -96,6 +104,8 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #undef OPT_DABBREV /* CF_ARG_ENABLE(dabbrev) */ #undef OPT_DEC_CHRSET /* CF_ARG_DISABLE(doublechars) */ #undef OPT_DEC_LOCATOR /* CF_ARG_ENABLE(dec-locator) */ +#undef OPT_DEC_RECTOPS /* CF_ARG_ENABLE(rectangles) */ +#undef OPT_EXEC_XTERM /* CF_ARG_ENABLE(exec-xterm) */ #undef OPT_HIGHLIGHT_COLOR /* CF_ARG_DISABLE(highlighting) */ #undef OPT_HP_FUNC_KEYS /* CF_ARG_ENABLE(hp-fkeys) */ #undef OPT_I18N_SUPPORT /* CF_ARG_DISABLE(i18n) */ @@ -110,20 +120,22 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #undef OPT_PASTE64 /* CF_ARG_ENABLE(past64) */ #undef OPT_PC_COLORS /* CF_ARG_DISABLE(pc-color) */ #undef OPT_PTY_HANDSHAKE /* CF_ARG_ENABLE(pty-handshake) */ +#undef OPT_READLINE /* CF_ARG_ENABLE(readline-mouse) */ #undef OPT_SAME_NAME /* CF_ARG_DISABLE(samename) */ #undef OPT_SCO_FUNC_KEYS /* CF_ARG_ENABLE(sco-fkeys) */ #undef OPT_SELECT_REGEX /* CF_ARG_DISABLE(regex) */ #undef OPT_SESSION_MGT /* CF_ARG_DISABLE(session-mgt) */ #undef OPT_SUN_FUNC_KEYS /* CF_ARG_ENABLE(sun-fkeys) */ +#undef OPT_TCAP_FKEYS /* CF_ARG_ENABLE(tcap-fkeys) */ #undef OPT_TCAP_QUERY /* CF_ARG_ENABLE(tcap-query) */ #undef OPT_TEK4014 /* CF_ARG_DISABLE(tek4014) */ #undef OPT_TOOLBAR /* CF_ARG_ENABLE(toolbar) */ -#undef OPT_TRACE /* CF_ARG_ENABLE(trace) */ #undef OPT_VT52_MODE /* CF_ARG_DISABLE(vt52) */ #undef OPT_WIDE_CHARS /* CF_ARG_OPTION(wide-chars) */ #undef OPT_XMC_GLITCH /* CF_ARG_ENABLE(xmc-glitch) */ #undef OPT_ZICONBEEP /* CF_ARG_DISABLE(ziconbeep) */ #undef OWN_TERMINFO_DIR /* AC_ARG_WITH(own-terminfo) */ +#undef PROCFS_ROOT /* CF_ARG_ENABLE(exec-xterm) */ #undef SCROLLBAR_RIGHT /* CF_ARG_ENABLE(rightbar) */ #undef SIG_ATOMIC_T /* CF_SIG_ATOMIC_T */ #undef SVR4 /* CF_SVR4, imake */ @@ -157,6 +169,14 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #undef ut_xtime /* CF_UTMP_UT_XTIME */ /* + * Ifdef'd to make it simple to override. + */ +#ifndef OPT_TRACE +#undef OPT_TRACE /* CF_ARG_ENABLE(trace) */ +#undef OPT_TRACE_FLAGS /* ...no option */ +#endif + +/* * g++ support for __attribute__() is haphazard. */ #ifndef __cplusplus @@ -182,4 +202,6 @@ extern char *my_strerror(int n); #define NO_XPOLL_H /* X11R6.1 & up use Xpoll.h for select() definitions */ #endif +/* vile:cmode + */ #endif /* included_xtermcfg_h */ |