diff -Naur xdvik-22.40o/CHANGES xdvik-22.40p/CHANGES --- xdvik-22.40o/CHANGES Thu Oct 17 00:26:15 2002 +++ xdvik-22.40p/CHANGES Thu Oct 31 00:15:21 2002 @@ -12,6 +12,15 @@ Only major changes are listed (mostly those visible to the user); for a more detailed list of changes, see the CVS logs. + * 22.40p: + + Fixed --version and --help options (#626569) + + Fixed a bug with TT fonts in X giving an error with the file + selector (#627607) + + Used kpathsea hash table to speed up processing of large .map + files + + Added help page on mouse buttons + + Added X server info for ease of debugging + * 22.40o: + More changes for ANSI C; fixed a few compilation problems on Tru64 v5.1, HP-UX-10.20 and Mac OS X. diff -Naur xdvik-22.40o/CVS/Entries xdvik-22.40p/CVS/Entries --- xdvik-22.40o/CVS/Entries Thu Oct 17 21:48:11 2002 +++ xdvik-22.40p/CVS/Entries Thu Oct 31 00:23:40 2002 @@ -1,6 +1,6 @@ /.indent.pro/1.1.1.1/Wed Apr 18 14:23:08 2001//Txdvik_22_40_STABLE /BUGS/1.1.1.1/Wed Apr 18 14:23:07 2001//Txdvik_22_40_STABLE -/CHANGES/1.1.6.14/Thu Oct 17 00:26:15 2002//Txdvik_22_40_STABLE +/CHANGES/1.1.6.16/Thu Oct 31 00:15:21 2002//Txdvik_22_40_STABLE /INSTALL/1.4.6.3/Tue Aug 20 22:33:23 2002//Txdvik_22_40_STABLE /Makefile.in/1.5.6.1/Sat Sep 14 00:24:46 2002//Txdvik_22_40_STABLE /README/1.3.8.5/Mon Sep 23 19:48:38 2002//Txdvik_22_40_STABLE diff -Naur xdvik-22.40o/texk/kpathsea/CVS/Entries xdvik-22.40p/texk/kpathsea/CVS/Entries --- xdvik-22.40o/texk/kpathsea/CVS/Entries Thu Oct 17 21:47:32 2002 +++ xdvik-22.40p/texk/kpathsea/CVS/Entries Thu Oct 31 00:23:31 2002 @@ -153,7 +153,7 @@ /xopendir.c/1.2.8.1/Wed Oct 16 22:26:22 2002//Txdvik_22_40_STABLE /xopendir.h/1.2.8.1/Wed Oct 16 22:26:22 2002//Txdvik_22_40_STABLE /xputenv.c/1.2.8.1/Wed Oct 16 22:26:22 2002//Txdvik_22_40_STABLE -/xrealloc.c/1.2.8.1/Wed Oct 16 22:26:22 2002//Txdvik_22_40_STABLE +/xrealloc.c/1.2.8.2/Thu Oct 31 00:10:49 2002//Txdvik_22_40_STABLE /xstat.c/1.2.8.2/Wed Oct 16 22:26:22 2002//Txdvik_22_40_STABLE /xstat.h/1.2.8.1/Wed Oct 16 22:26:22 2002//Txdvik_22_40_STABLE /xstrdup.c/1.2.8.1/Wed Oct 16 22:26:22 2002//Txdvik_22_40_STABLE diff -Naur xdvik-22.40o/texk/kpathsea/xrealloc.c xdvik-22.40p/texk/kpathsea/xrealloc.c --- xdvik-22.40o/texk/kpathsea/xrealloc.c Wed Oct 16 22:26:22 2002 +++ xdvik-22.40p/texk/kpathsea/xrealloc.c Thu Oct 31 00:10:49 2002 @@ -39,6 +39,7 @@ is of little or no value anyway, just don't print it. */ fprintf (stderr, "fatal: memory exhausted (realloc of %u bytes).\n", size); + abort(); /* 1 means success on VMS, so pick a random number (ASCII `B'). */ exit (66); } diff -Naur xdvik-22.40o/texk/xdvik/CVS/Entries xdvik-22.40p/texk/xdvik/CVS/Entries --- xdvik-22.40o/texk/xdvik/CVS/Entries Thu Oct 17 21:48:11 2002 +++ xdvik-22.40p/texk/xdvik/CVS/Entries Thu Oct 31 00:23:40 2002 @@ -3,36 +3,35 @@ /BUGS/1.1.1.1/Wed Apr 18 14:24:38 2001//Txdvik_22_40_STABLE /FAQ/1.1.1.1/Wed Apr 18 14:24:38 2001//Txdvik_22_40_STABLE /MAKE-VMS.COM/1.1.1.1/Wed Apr 18 14:24:38 2001//Txdvik_22_40_STABLE -/Makefile.in/1.8.4.6/Sat Oct 12 13:28:49 2002//Txdvik_22_40_STABLE +/Makefile.in/1.8.4.7/Fri Oct 18 23:15:20 2002//Txdvik_22_40_STABLE /README.VMS/1.1.1.1/Wed Apr 18 14:24:39 2001//Txdvik_22_40_STABLE /README.src-specials/1.1.6.2/Thu Aug 1 23:40:08 2002//Txdvik_22_40_STABLE /README.t1fonts/1.2.4.6/Sat Oct 12 14:51:16 2002//Txdvik_22_40_STABLE /VMS-C.OPT/1.1.1.1/Wed Apr 18 14:24:39 2001//Txdvik_22_40_STABLE /XDVI.RNH/1.1.1.1/Wed Apr 18 14:24:39 2001//Txdvik_22_40_STABLE /acconfig.h/1.1.4.1/Wed Apr 10 01:14:48 2002//Txdvik_22_40_STABLE -/aclocal.m4/1.2.6.2/Sun Oct 6 15:26:46 2002//Txdvik_22_40_STABLE +/aclocal.m4/1.2.6.3/Fri Oct 18 23:32:27 2002//Txdvik_22_40_STABLE /alloc-debug.h/1.1.1.1/Wed Apr 18 14:24:39 2001//Txdvik_22_40_STABLE /alloca.c/1.1.1.1.6.2/Tue Oct 15 21:15:02 2002//Txdvik_22_40_STABLE /app-defaults-xdvik/1.1.1.1.6.2/Fri Aug 30 23:49:40 2002//Txdvik_22_40_STABLE -/c-auto.in/1.6.4.5/Wed Oct 16 22:26:23 2002//Txdvik_22_40_STABLE +/c-auto.in/1.6.4.6/Fri Oct 18 23:32:27 2002//Txdvik_22_40_STABLE /c-openmx.h/1.2/Mon May 21 14:19:25 2001//Txdvik_22_40_STABLE -/configure/1.6.4.13/Wed Oct 16 22:26:23 2002//Txdvik_22_40_STABLE +/configure/1.6.4.14/Fri Oct 18 23:32:27 2002//Txdvik_22_40_STABLE /configure.in/1.7.4.9/Mon Oct 14 23:05:48 2002//Txdvik_22_40_STABLE /depend.mk/1.6.4.5/Wed Oct 16 22:26:23 2002//Txdvik_22_40_STABLE -/dvi-draw.c/1.33.4.40/Tue Oct 15 21:15:02 2002//Txdvik_22_40_STABLE -/dvi-init.c/1.22.4.16/Thu Oct 10 22:54:34 2002//Txdvik_22_40_STABLE +/dvi-draw.c/1.33.4.50/Thu Oct 31 00:10:49 2002//Txdvik_22_40_STABLE +/dvi-init.c/1.22.4.17/Mon Oct 21 23:25:17 2002//Txdvik_22_40_STABLE /dvi.h/1.1.1.1/Wed Apr 18 14:24:42 2001//Txdvik_22_40_STABLE /dvips.c/1.3.6.3/Thu Oct 10 18:38:21 2002//Txdvik_22_40_STABLE -/events.c/1.10.4.34/Tue Oct 15 21:15:02 2002//Txdvik_22_40_STABLE +/events.c/1.10.4.37/Wed Oct 23 21:41:51 2002//Txdvik_22_40_STABLE /font-open.c/1.3.6.8/Sat Oct 12 16:52:20 2002//Txdvik_22_40_STABLE /gf.c/1.1.1.1.6.1/Thu Sep 19 23:10:04 2002//Txdvik_22_40_STABLE /gs/1.1.1.1/Wed Apr 18 14:24:43 2001//Txdvik_22_40_STABLE -/help-window.c/1.10.4.5/Sun Oct 6 15:26:47 2002//Txdvik_22_40_STABLE -/help-window.h/1.1.1.1/Wed Apr 18 14:24:43 2001//Txdvik_22_40_STABLE -/hypertex.c/1.16.4.20/Sun Oct 6 15:26:47 2002//Txdvik_22_40_STABLE +/help-window.c/1.10.4.7/Wed Oct 23 01:18:49 2002//Txdvik_22_40_STABLE +/hypertex.c/1.16.4.24/Tue Oct 29 20:09:41 2002//Txdvik_22_40_STABLE /message-window.c/1.15.4.6/Mon Oct 14 23:42:31 2002//Txdvik_22_40_STABLE /message-window.h/1.3.4.2/Tue Aug 6 23:40:26 2002//Txdvik_22_40_STABLE -/mime.c/1.5.4.2/Thu Sep 19 23:10:04 2002//Txdvik_22_40_STABLE +/mime.c/1.5.4.3/Fri Oct 18 23:15:20 2002//Txdvik_22_40_STABLE /mksedscript/1.1.1.1.6.3/Tue Apr 30 17:35:57 2002//Txdvik_22_40_STABLE /my-vsnprintf.c/1.1.1.1.6.3/Tue Oct 15 21:15:02 2002//Txdvik_22_40_STABLE /my-vsnprintf.h/1.1.1.1.6.3/Tue Oct 15 21:15:02 2002//Txdvik_22_40_STABLE @@ -42,33 +41,35 @@ /psheader.txt/1.1.1.1/Wed Apr 18 14:24:45 2001//Txdvik_22_40_STABLE /psnews.c/1.1.1.1.6.7/Tue Oct 15 21:15:02 2002//Txdvik_22_40_STABLE /sfDir.c/1.2.6.1/Thu Sep 19 23:10:04 2002//Txdvik_22_40_STABLE -/sfDraw.c/1.2.6.2/Sun Oct 6 15:26:47 2002//Txdvik_22_40_STABLE -/sfPath.c/1.2.6.2/Sun Oct 6 15:26:47 2002//Txdvik_22_40_STABLE -/sfSelFile.c/1.2.6.3/Sun Oct 6 15:26:47 2002//Txdvik_22_40_STABLE +/sfDraw.c/1.2.6.5/Tue Oct 29 20:09:41 2002//Txdvik_22_40_STABLE +/sfPath.c/1.2.6.3/Fri Oct 18 23:15:20 2002//Txdvik_22_40_STABLE +/sfSelFile.c/1.2.6.4/Fri Oct 18 23:15:20 2002//Txdvik_22_40_STABLE /sfinternal.h/1.1.1.1.6.1/Sun Oct 6 15:26:47 2002//Txdvik_22_40_STABLE -/special.c/1.5.4.13/Sun Oct 6 15:26:47 2002//Txdvik_22_40_STABLE +/special.c/1.5.4.15/Tue Oct 29 20:09:41 2002//Txdvik_22_40_STABLE /squeeze.c/1.2/Mon May 21 14:19:25 2001//Txdvik_22_40_STABLE /stamp-auto.in/1.2.6.1/Wed Oct 16 22:26:23 2002//Txdvik_22_40_STABLE /startxdvi/1.1.6.2/Tue Aug 6 23:47:53 2002//Txdvik_22_40_STABLE /statusline.c/1.3.6.8/Tue Oct 15 21:15:02 2002//Txdvik_22_40_STABLE /statusline.h/1.1.1.1/Wed Apr 18 14:24:46 2001//Txdvik_22_40_STABLE -/string-utils.c/1.3.4.2/Thu Sep 19 23:10:05 2002//Txdvik_22_40_STABLE +/string-utils.c/1.3.4.3/Fri Oct 18 23:15:20 2002//Txdvik_22_40_STABLE /string-utils.h/1.2/Sat Jun 30 17:00:46 2001//Txdvik_22_40_STABLE /t1mapper/1.1.1.1.6.1/Wed Aug 14 22:50:17 2002//Txdvik_22_40_STABLE /t1mapper.1/1.1.2.3/Mon Mar 4 17:35:11 2002//Txdvik_22_40_STABLE /tfmload.c/1.5.4.1/Sat Sep 14 23:18:44 2002//Txdvik_22_40_STABLE -/util.c/1.12.4.12/Thu Sep 19 23:10:05 2002//Txdvik_22_40_STABLE -/version.h/1.7.4.25/Wed Oct 16 23:22:32 2002//Txdvik_22_40_STABLE +/util.c/1.12.4.18/Wed Oct 30 09:38:19 2002//Txdvik_22_40_STABLE +/version.h/1.7.4.30/Thu Oct 31 00:10:50 2002//Txdvik_22_40_STABLE /vf.c/1.1.1.1.6.2/Thu Oct 10 18:38:22 2002//Txdvik_22_40_STABLE /withenable.ac/1.4.4.3/Sat Aug 24 16:10:05 2002//Txdvik_22_40_STABLE /wwwfetch.c/1.9.4.11/Sat Oct 12 23:59:36 2002//Txdvik_22_40_STABLE -/xdvi-config.h/1.3.6.1/Tue Oct 15 21:15:02 2002//Txdvik_22_40_STABLE +/xdvi-config.h/1.3.6.2/Fri Oct 18 23:15:21 2002//Txdvik_22_40_STABLE /xdvi-search.el/1.2.4.4/Thu Sep 12 22:04:29 2002//Txdvik_22_40_STABLE /xdvi-sh/1.1.1.1.6.2/Mon Mar 4 20:03:41 2002//Txdvik_22_40_STABLE -/xdvi.c/1.19.4.30/Tue Oct 15 21:15:02 2002//Txdvik_22_40_STABLE -/xdvi.h/1.16.4.28/Tue Oct 15 22:48:32 2002//Txdvik_22_40_STABLE +/xdvi.c/1.19.4.35/Thu Oct 31 00:10:50 2002//Txdvik_22_40_STABLE +/xdvi.h/1.16.4.35/Wed Oct 30 02:29:34 2002//Txdvik_22_40_STABLE /xdvi.icon/1.1.1.1/Wed Apr 18 14:24:48 2001//Txdvik_22_40_STABLE -/xdvi.man/1.5.4.26/Sun Oct 13 21:03:11 2002//Txdvik_22_40_STABLE +/xdvi.man/1.5.4.27/Wed Oct 23 21:43:37 2002//Txdvik_22_40_STABLE /xdvizilla/1.1.2.1/Sat Oct 12 13:28:50 2002//Txdvik_22_40_STABLE /xdvizilla.1/1.1.2.1/Sat Oct 12 13:28:50 2002//Txdvik_22_40_STABLE +/xserver-info.c/1.1.2.2/Thu Oct 31 00:10:50 2002//Txdvik_22_40_STABLE +/xserver-info.h/1.1.2.1/Fri Oct 18 23:14:43 2002//Txdvik_22_40_STABLE D/texmf//// diff -Naur xdvik-22.40o/texk/xdvik/Makefile.in xdvik-22.40p/texk/xdvik/Makefile.in --- xdvik-22.40o/texk/xdvik/Makefile.in Sat Oct 12 13:28:49 2002 +++ xdvik-22.40p/texk/xdvik/Makefile.in Fri Oct 18 23:15:20 2002 @@ -36,6 +36,7 @@ # Extra xdvi-specific compiler options. ## ps_def = @PS_DEF@ -DSRC ps_def = @PS_DEF@ +ps_def += -DXSERVER_INFO prog_cflags = $(LIBWWWCPPFLAGS) $(LIBT1CPPFLAGS) $(ps_def) -I../../libs/t1lib/lib/t1lib -I../kpathsea $(x_cppflags) # We don't use alloca ourselves, but the X library might, and this way @@ -43,7 +44,7 @@ ALLOCA = alloca.o objects = xdvi.o dvi-draw.o dvi-init.o events.o font-open.o string-utils.o my-vsnprintf.o \ - help-window.o message-window.o statusline.o \ + help-window.o message-window.o statusline.o xserver-info.o \ gf.o pk.o psdps.o psgs.o psheader.o psnews.o special.o util.o vf.o sfDir.o \ sfDraw.o sfPath.o sfSelFile.o hypertex.o mime.o wwwfetch.o \ $(ALLOCA) dvips.o tfmload.o diff -Naur xdvik-22.40o/texk/xdvik/aclocal.m4 xdvik-22.40p/texk/xdvik/aclocal.m4 --- xdvik-22.40o/texk/xdvik/aclocal.m4 Sun Oct 6 15:26:46 2002 +++ xdvik-22.40p/texk/xdvik/aclocal.m4 Fri Oct 18 23:32:27 2002 @@ -95,6 +95,17 @@ AC_DEFINE(HAVE_VSNPRINTF) fi]) +dnl ### Check for memicmp(), which some installations have in string.h +AC_DEFUN(AC_FUNC_VSNPRINTF, +[AC_CACHE_CHECK([for vsnprintf], xdvi_cv_vsnprintf, +[AC_TRY_LINK( +[#include +], [(void)memicmp((char *)NULL, (char *)NULL, 0);], +xdvi_cv_memicmp=yes, xdvi_cv_memicmp=no)]) +if test $xdvi_cv_memicmp = yes; then + AC_DEFINE(HAVE_MEMICMP) +fi]) + dnl ### Check for realpath() added by SU 2002/04/10 AC_DEFUN(AC_FUNC_REALPATH, [AC_CACHE_CHECK([for realpath], xdvi_cv_realpath, diff -Naur xdvik-22.40o/texk/xdvik/c-auto.in xdvik-22.40p/texk/xdvik/c-auto.in --- xdvik-22.40o/texk/xdvik/c-auto.in Wed Oct 16 22:26:23 2002 +++ xdvik-22.40p/texk/xdvik/c-auto.in Fri Oct 18 23:32:27 2002 @@ -100,12 +100,19 @@ /* Define to compile in t1lib */ #undef T1LIB +/* Define if your C compiler can do string concatenation */ #undef HAVE_CC_CONCAT +/* Define if you have vsnprintf() */ #undef HAVE_VSNPRINTF +/* Define if the memicmp() function is in */ +#undef HAVE_MEMICMP + +/* Define if your system has the realpath() function */ #undef HAVE_REALPATH +/* Define if you want to compile without toolkit support */ #undef NOTOOL /* Define if you have the fchdir function. */ diff -Naur xdvik-22.40o/texk/xdvik/configure xdvik-22.40p/texk/xdvik/configure --- xdvik-22.40o/texk/xdvik/configure Wed Oct 16 22:26:23 2002 +++ xdvik-22.40p/texk/xdvik/configure Fri Oct 18 23:32:27 2002 @@ -1,5 +1,12 @@ #! /bin/sh + + + + + + + # Guess values for system-dependent variables and create Makefiles. # Generated automatically using autoconf version 2.13 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. @@ -590,7 +597,7 @@ # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:594: checking for $ac_word" >&5 +echo "configure:601: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -621,7 +628,7 @@ # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:625: checking for $ac_word" >&5 +echo "configure:632: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -673,7 +680,7 @@ # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:677: checking for $ac_word" >&5 +echo "configure:684: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -706,7 +713,7 @@ fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:710: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:717: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -717,12 +724,12 @@ cat > conftest.$ac_ext << EOF -#line 721 "configure" +#line 728 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:726: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -748,12 +755,12 @@ { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:752: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:759: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:757: checking whether we are using GNU C" >&5 +echo "configure:764: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -762,7 +769,7 @@ yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:766: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:773: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -781,7 +788,7 @@ ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:785: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:792: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -849,7 +856,7 @@ # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:853: checking for a BSD compatible install" >&5 +echo "configure:860: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -904,7 +911,7 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:908: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:915: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -931,7 +938,7 @@ fi echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:935: checking whether ln -s works" >&5 +echo "configure:942: checking whether ln -s works" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -954,12 +961,12 @@ fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:958: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:965: checking whether time.h and sys/time.h may both be included" >&5 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -968,7 +975,7 @@ struct tm *tp; ; return 0; } EOF -if { (eval echo configure:972: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:979: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -991,7 +998,7 @@ echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 -echo "configure:995: checking whether to enable maintainer-specific portions of Makefiles" >&5 +echo "configure:1002: checking whether to enable maintainer-specific portions of Makefiles" >&5 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then enableval="$enable_maintainer_mode" @@ -1010,7 +1017,7 @@ echo $ac_n "checking for loader (symbol LD)""... $ac_c" 1>&6 -echo "configure:1014: checking for loader (symbol LD)" >&5 +echo "configure:1021: checking for loader (symbol LD)" >&5 if eval "test \"`echo '$''{'cf_cv_subst_LD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1024,7 +1031,7 @@ echo $ac_n "checking for archiver (symbol AR)""... $ac_c" 1>&6 -echo "configure:1028: checking for archiver (symbol AR)" >&5 +echo "configure:1035: checking for archiver (symbol AR)" >&5 if eval "test \"`echo '$''{'cf_cv_subst_AR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1038,7 +1045,7 @@ echo $ac_n "checking for archiver options (symbol ARFLAGS)""... $ac_c" 1>&6 -echo "configure:1042: checking for archiver options (symbol ARFLAGS)" >&5 +echo "configure:1049: checking for archiver options (symbol ARFLAGS)" >&5 if eval "test \"`echo '$''{'cf_cv_subst_ARFLAGS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1114,7 +1121,7 @@ fi echo $ac_n "checking host system type""... $ac_c" 1>&6 -echo "configure:1118: checking host system type" >&5 +echo "configure:1125: checking host system type" >&5 host_alias=$host case "$host_alias" in @@ -1146,7 +1153,7 @@ echo $ac_n "checking where the main texmf tree is located""... $ac_c" 1>&6 -echo "configure:1150: checking where the main texmf tree is located" >&5 +echo "configure:1157: checking where the main texmf tree is located" >&5 texmfmain= if test "x$datadir" != 'x${prefix}/share'; then # First case, datadir is defined... @@ -1202,7 +1209,7 @@ echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:1206: checking how to run the C preprocessor" >&5 +echo "configure:1213: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -1217,13 +1224,13 @@ # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1227: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1234: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -1234,13 +1241,13 @@ rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1244: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1251: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -1251,13 +1258,13 @@ rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1261: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1268: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -1282,12 +1289,12 @@ echo "$ac_t""$CPP" 1>&6 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:1286: checking for ANSI C header files" >&5 +echo "configure:1293: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -1295,7 +1302,7 @@ #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1299: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1306: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -1312,7 +1319,7 @@ if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -1330,7 +1337,7 @@ 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 < EOF @@ -1351,7 +1358,7 @@ : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -1362,7 +1369,7 @@ exit (0); } EOF -if { (eval echo configure:1366: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -1386,12 +1393,12 @@ fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:1390: checking for pid_t" >&5 +echo "configure:1397: checking for pid_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -1420,17 +1427,17 @@ ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for vfork.h""... $ac_c" 1>&6 -echo "configure:1424: checking for vfork.h" >&5 +echo "configure:1431: checking for vfork.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1434: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1441: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -1455,18 +1462,18 @@ fi echo $ac_n "checking for working vfork""... $ac_c" 1>&6 -echo "configure:1459: checking for working vfork" >&5 +echo "configure:1466: checking for working vfork" >&5 if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$cross_compiling" = yes; then echo $ac_n "checking for vfork""... $ac_c" 1>&6 -echo "configure:1465: checking for vfork" >&5 +echo "configure:1472: checking for vfork" >&5 if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1500: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_vfork=yes" else @@ -1511,7 +1518,7 @@ ac_cv_func_vfork_works=$ac_cv_func_vfork else cat > conftest.$ac_ext < @@ -1606,7 +1613,7 @@ } } EOF -if { (eval echo configure:1610: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1617: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_vfork_works=yes else @@ -1629,12 +1636,12 @@ fi echo $ac_n "checking for vprintf""... $ac_c" 1>&6 -echo "configure:1633: checking for vprintf" >&5 +echo "configure:1640: checking for vprintf" >&5 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1668: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_vprintf=yes" else @@ -1681,12 +1688,12 @@ if test "$ac_cv_func_vprintf" != yes; then echo $ac_n "checking for _doprnt""... $ac_c" 1>&6 -echo "configure:1685: checking for _doprnt" >&5 +echo "configure:1692: checking for _doprnt" >&5 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func__doprnt=yes" else @@ -1735,12 +1742,12 @@ # begin additions SU, 2000/03/07 echo $ac_n "checking for vsnprintf""... $ac_c" 1>&6 -echo "configure:1739: checking for vsnprintf" >&5 +echo "configure:1746: checking for vsnprintf" >&5 if eval "test \"`echo '$''{'xdvi_cv_vsnprintf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -1748,7 +1755,7 @@ (void)vsnprintf((char *)NULL, 0, (char *)NULL, NULL); ; return 0; } EOF -if { (eval echo configure:1752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1759: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* xdvi_cv_vsnprintf=yes else @@ -1768,12 +1775,12 @@ fi echo $ac_n "checking for realpath""... $ac_c" 1>&6 -echo "configure:1772: checking for realpath" >&5 +echo "configure:1779: checking for realpath" >&5 if eval "test \"`echo '$''{'xdvi_cv_realpath'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -1781,7 +1788,7 @@ (void)realpath((const char *)NULL, NULL); ; return 0; } EOF -if { (eval echo configure:1785: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1792: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* xdvi_cv_realpath=yes else @@ -1803,19 +1810,19 @@ # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 -echo "configure:1807: checking for working alloca.h" >&5 +echo "configure:1814: checking for working alloca.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { char *p = alloca(2 * sizeof(int)); ; return 0; } EOF -if { (eval echo configure:1819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1826: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_header_alloca_h=yes else @@ -1836,12 +1843,12 @@ fi echo $ac_n "checking for alloca""... $ac_c" 1>&6 -echo "configure:1840: checking for alloca" >&5 +echo "configure:1847: checking for alloca" >&5 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_alloca_works=yes else @@ -1901,12 +1908,12 @@ echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 -echo "configure:1905: checking whether alloca needs Cray hooks" >&5 +echo "configure:1912: checking whether alloca needs Cray hooks" >&5 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 -echo "configure:1935: checking for $ac_func" >&5 +echo "configure:1942: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1970: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -1986,7 +1993,7 @@ fi echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 -echo "configure:1990: checking stack direction for C alloca" >&5 +echo "configure:1997: checking stack direction for C alloca" >&5 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1994,7 +2001,7 @@ ac_cv_c_stack_direction=0 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2024: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_stack_direction=1 else @@ -2036,7 +2043,7 @@ # end additions SU echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6 -echo "configure:2040: checking for 8-bit clean memcmp" >&5 +echo "configure:2047: checking for 8-bit clean memcmp" >&5 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2044,7 +2051,7 @@ ac_cv_func_memcmp_clean=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2065: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_memcmp_clean=yes else @@ -2072,12 +2079,12 @@ test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}" echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 -echo "configure:2076: checking for sys/wait.h that is POSIX.1 compatible" >&5 +echo "configure:2083: checking for sys/wait.h that is POSIX.1 compatible" >&5 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2093,7 +2100,7 @@ s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } EOF -if { (eval echo configure:2097: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2104: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_sys_wait_h=yes else @@ -2114,12 +2121,12 @@ fi echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:2118: checking return type of signal handlers" >&5 +echo "configure:2125: checking return type of signal handlers" >&5 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2136,7 +2143,7 @@ int i; ; return 0; } EOF -if { (eval echo configure:2140: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2147: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -2155,14 +2162,14 @@ echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 -echo "configure:2159: checking whether byte ordering is bigendian" >&5 +echo "configure:2166: checking whether byte ordering is bigendian" >&5 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_bigendian=unknown # See if sys/param.h defines the BYTE_ORDER macro. cat > conftest.$ac_ext < #include @@ -2173,11 +2180,11 @@ #endif ; return 0; } EOF -if { (eval echo configure:2177: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2184: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* # It does; now see whether it defined to BIG_ENDIAN or not. cat > conftest.$ac_ext < #include @@ -2188,7 +2195,7 @@ #endif ; return 0; } EOF -if { (eval echo configure:2192: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2199: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_bigendian=yes else @@ -2208,7 +2215,7 @@ { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2232: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_bigendian=no else @@ -2251,7 +2258,7 @@ # Uses ac_ vars as temps to allow command line to override cache and checks. # --without-x overrides everything else, but does not touch the cache. echo $ac_n "checking for X""... $ac_c" 1>&6 -echo "configure:2255: checking for X" >&5 +echo "configure:2262: checking for X" >&5 # Check whether --with-x or --without-x was given. if test "${with_x+set}" = set; then @@ -2313,12 +2320,12 @@ # First, try using that file with no special directory specified. cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2322: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2329: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2387,14 +2394,14 @@ ac_save_LIBS="$LIBS" LIBS="-l$x_direct_test_library $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2405: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* LIBS="$ac_save_LIBS" # We can link X programs with no special library path. @@ -2502,17 +2509,17 @@ case "`(uname -sr) 2>/dev/null`" in "SunOS 5"*) echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6 -echo "configure:2506: checking whether -R must be followed by a space" >&5 +echo "configure:2513: checking whether -R must be followed by a space" >&5 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2523: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_R_nospace=yes else @@ -2528,14 +2535,14 @@ else LIBS="$ac_xsave_LIBS -R $x_libraries" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_R_space=yes else @@ -2573,7 +2580,7 @@ # libraries were built with DECnet support. And karl@cs.umb.edu says # the Alpha needs dnet_stub (dnet does not exist). echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6 -echo "configure:2577: checking for dnet_ntoa in -ldnet" >&5 +echo "configure:2584: checking for dnet_ntoa in -ldnet" >&5 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2581,7 +2588,7 @@ ac_save_LIBS="$LIBS" LIBS="-ldnet $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2603: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2614,7 +2621,7 @@ if test $ac_cv_lib_dnet_dnet_ntoa = no; then echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6 -echo "configure:2618: checking for dnet_ntoa in -ldnet_stub" >&5 +echo "configure:2625: checking for dnet_ntoa in -ldnet_stub" >&5 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2622,7 +2629,7 @@ ac_save_LIBS="$LIBS" LIBS="-ldnet_stub $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2644: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2662,12 +2669,12 @@ # The nsl library prevents programs from opening the X display # on Irix 5.2, according to dickey@clark.net. echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6 -echo "configure:2666: checking for gethostbyname" >&5 +echo "configure:2673: checking for gethostbyname" >&5 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2701: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_gethostbyname=yes" else @@ -2711,7 +2718,7 @@ if test $ac_cv_func_gethostbyname = no; then echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6 -echo "configure:2715: checking for gethostbyname in -lnsl" >&5 +echo "configure:2722: checking for gethostbyname in -lnsl" >&5 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2719,7 +2726,7 @@ ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2741: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2760,12 +2767,12 @@ # -lsocket must be given before -lnsl if both are needed. # We assume that if connect needs -lnsl, so does gethostbyname. echo $ac_n "checking for connect""... $ac_c" 1>&6 -echo "configure:2764: checking for connect" >&5 +echo "configure:2771: checking for connect" >&5 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2799: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_connect=yes" else @@ -2809,7 +2816,7 @@ if test $ac_cv_func_connect = no; then echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6 -echo "configure:2813: checking for connect in -lsocket" >&5 +echo "configure:2820: checking for connect in -lsocket" >&5 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2817,7 +2824,7 @@ ac_save_LIBS="$LIBS" LIBS="-lsocket $X_EXTRA_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2852,12 +2859,12 @@ # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX. echo $ac_n "checking for remove""... $ac_c" 1>&6 -echo "configure:2856: checking for remove" >&5 +echo "configure:2863: checking for remove" >&5 if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2891: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_remove=yes" else @@ -2901,7 +2908,7 @@ if test $ac_cv_func_remove = no; then echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6 -echo "configure:2905: checking for remove in -lposix" >&5 +echo "configure:2912: checking for remove in -lposix" >&5 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2909,7 +2916,7 @@ ac_save_LIBS="$LIBS" LIBS="-lposix $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2931: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2944,12 +2951,12 @@ # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. echo $ac_n "checking for shmat""... $ac_c" 1>&6 -echo "configure:2948: checking for shmat" >&5 +echo "configure:2955: checking for shmat" >&5 if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2983: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_shmat=yes" else @@ -2993,7 +3000,7 @@ if test $ac_cv_func_shmat = no; then echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6 -echo "configure:2997: checking for shmat in -lipc" >&5 +echo "configure:3004: checking for shmat in -lipc" >&5 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3001,7 +3008,7 @@ ac_save_LIBS="$LIBS" LIBS="-lipc $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3023: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3045,7 +3052,7 @@ # libraries we check for below, so use a different variable. # --interran@uluru.Stanford.EDU, kb@cs.umb.edu. echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6 -echo "configure:3049: checking for IceConnectionNumber in -lICE" >&5 +echo "configure:3056: checking for IceConnectionNumber in -lICE" >&5 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3053,7 +3060,7 @@ ac_save_LIBS="$LIBS" LIBS="-lICE $X_EXTRA_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3075: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3089,12 +3096,12 @@ fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:3093: checking for size_t" >&5 +echo "configure:3100: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3124,12 +3131,12 @@ # XDVI checks by Paul Vojta echo $ac_n "checking whether C compiler supports string concatenation""... $ac_c" 1>&6 -echo "configure:3128: checking whether C compiler supports string concatenation" >&5 +echo "configure:3135: checking whether C compiler supports string concatenation" >&5 if eval "test \"`echo '$''{'xdvi_cc_concat'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -3138,7 +3145,7 @@ ; return 0; } EOF -if { (eval echo configure:3142: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3149: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* xdvi_cc_concat=yes else @@ -3158,7 +3165,7 @@ fi echo $ac_n "checking for integer type to use in bitmaps""... $ac_c" 1>&6 -echo "configure:3162: checking for integer type to use in bitmaps" >&5 +echo "configure:3169: checking for integer type to use in bitmaps" >&5 if eval "test \"`echo '$''{'xdvi_cv_bitmap_type'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3166,7 +3173,7 @@ { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < main() @@ -3184,7 +3191,7 @@ exit(0); } EOF -if { (eval echo configure:3188: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3195: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then xdvi_cv_bitmap_type="`cat conftestval`" else @@ -3209,12 +3216,12 @@ echo "$ac_t""unsigned $BMTYPE, size = $BMBYTES" 1>&6 echo $ac_n "checking for stropts.h and isastream()""... $ac_c" 1>&6 -echo "configure:3213: checking for stropts.h and isastream()" >&5 +echo "configure:3220: checking for stropts.h and isastream()" >&5 if eval "test \"`echo '$''{'xdvi_cv_sys_streams'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -3226,7 +3233,7 @@ #endif ; return 0; } EOF -if { (eval echo configure:3230: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3237: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* xdvi_cv_sys_streams=yes else @@ -3246,7 +3253,7 @@ fi echo $ac_n "checking for SunOS 4""... $ac_c" 1>&6 -echo "configure:3250: checking for SunOS 4" >&5 +echo "configure:3257: checking for SunOS 4" >&5 if eval "test \"`echo '$''{'xdvi_cv_sys_sunos_4'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3265,12 +3272,12 @@ fi echo $ac_n "checking for poll.h and poll()""... $ac_c" 1>&6 -echo "configure:3269: checking for poll.h and poll()" >&5 +echo "configure:3276: checking for poll.h and poll()" >&5 if eval "test \"`echo '$''{'xdvi_cv_func_poll'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -3278,7 +3285,7 @@ poll((struct pollfd *) 0, 0, 0); ; return 0; } EOF -if { (eval echo configure:3282: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3289: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* xdvi_cv_func_poll=yes else @@ -3301,17 +3308,17 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3305: checking for $ac_hdr" >&5 +echo "configure:3312: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3315: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3322: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -3351,7 +3358,7 @@ echo $ac_n "checking what warning flags to pass to the C compiler""... $ac_c" 1>&6 -echo "configure:3355: checking what warning flags to pass to the C compiler" >&5 +echo "configure:3362: checking what warning flags to pass to the C compiler" >&5 warnCFLAGS= if test "x$GCC" != xyes; then enable_compile_warnings=no @@ -3386,7 +3393,7 @@ echo $ac_n "checking what language compliance flags to pass to the C compiler""... $ac_c" 1>&6 -echo "configure:3390: checking what language compliance flags to pass to the C compiler" >&5 +echo "configure:3397: checking what language compliance flags to pass to the C compiler" >&5 complCFLAGS= if test "x$enable_iso_c" != "xno"; then if test "x$GCC" = "xyes"; then @@ -3417,12 +3424,12 @@ for ac_func in mkstemp memcpy strerror waitpid sigaction strchr setenv ulltostr fchdir getcwd lstat do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3421: checking for $ac_func" >&5 +echo "configure:3428: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3456: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3475,17 +3482,17 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3479: checking for $ac_hdr" >&5 +echo "configure:3486: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3489: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3496: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -3658,7 +3665,7 @@ # Extract the first word of "pwd", so it can be a program name with args. set dummy pwd; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3662: checking for $ac_word" >&5 +echo "configure:3669: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_BINPWD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3807,7 +3814,7 @@ # Extract the first word of "$libwww_config", so it can be a program name with args. set dummy $libwww_config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3811: checking for $ac_word" >&5 +echo "configure:3818: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_LIBWWW_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3883,17 +3890,17 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3887: checking for $ac_hdr" >&5 +echo "configure:3894: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3897: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3904: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -3938,7 +3945,7 @@ LDLIBWWW=-lwww libwww_libdir_found=yes echo $ac_n "checking for HTParse in -lwww""... $ac_c" 1>&6 -echo "configure:3942: checking for HTParse in -lwww" >&5 +echo "configure:3949: checking for HTParse in -lwww" >&5 ac_lib_var=`echo www'_'HTParse | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3946,7 +3953,7 @@ ac_save_LIBS="$LIBS" LIBS="-lwww $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3968: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4059,7 +4066,7 @@ if test "$with_system_t1lib" = yes; then echo $ac_n "checking for T1_AddFont in -lt1""... $ac_c" 1>&6 -echo "configure:4063: checking for T1_AddFont in -lt1" >&5 +echo "configure:4070: checking for T1_AddFont in -lt1" >&5 ac_lib_var=`echo t1'_'T1_AddFont | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4067,7 +4074,7 @@ ac_save_LIBS="$LIBS" LIBS="-lt1 -lz -lm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4089: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4105,13 +4112,13 @@ LDFLAGS="$LDFLAGS $EXTRA_LIBT1_LIBDIR -lt1 -lm" if test "$with_system_t1lib" = yes; then echo $ac_n "checking whether installed T1 lib is >= v 1.3.1 ""... $ac_c" 1>&6 -echo "configure:4109: checking whether installed T1 lib is >= v 1.3.1 " >&5 +echo "configure:4116: checking whether installed T1 lib is >= v 1.3.1 " >&5 if test "$cross_compiling" = yes; then ac_compile_t1lib=1 ] else cat > conftest.$ac_ext < @@ -4142,7 +4149,7 @@ } EOF -if { (eval echo configure:4146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4153: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_compile_t1lib=0 else @@ -4195,7 +4202,7 @@ XLFLAG= fi echo $ac_n "checking for XextCreateExtension in -lXext""... $ac_c" 1>&6 -echo "configure:4199: checking for XextCreateExtension in -lXext" >&5 +echo "configure:4206: checking for XextCreateExtension in -lXext" >&5 ac_lib_var=`echo Xext'_'XextCreateExtension | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4203,7 +4210,7 @@ ac_save_LIBS="$LIBS" LIBS="-lXext -lX11 $X_EXTRA_LIBS $XLFLAG $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4225: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4270,7 +4277,7 @@ echo "$ac_t""adding DPS includes and libraries for Solaris" 1>&6 X_CFLAGS="$X_CFLAGS -I/usr/openwin/include/X11" echo $ac_n "checking for isinf in -lsunmath""... $ac_c" 1>&6 -echo "configure:4274: checking for isinf in -lsunmath" >&5 +echo "configure:4281: checking for isinf in -lsunmath" >&5 ac_lib_var=`echo sunmath'_'isinf | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4278,7 +4285,7 @@ ac_save_LIBS="$LIBS" LIBS="-lsunmath $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4300: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4316,12 +4323,12 @@ for ac_func in isinf do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4320: checking for $ac_func" >&5 +echo "configure:4327: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4355: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4372,17 +4379,17 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4376: checking for $ac_hdr" >&5 +echo "configure:4383: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4386: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4393: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -4420,7 +4427,7 @@ # needed for web2c later than 7.3.4: echo $ac_n "checking for main in -lm""... $ac_c" 1>&6 -echo "configure:4424: checking for main in -lm" >&5 +echo "configure:4431: checking for main in -lm" >&5 ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4428,14 +4435,14 @@ ac_save_LIBS="$LIBS" LIBS="-lm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4446: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else diff -Naur xdvik-22.40o/texk/xdvik/dvi-draw.c xdvik-22.40p/texk/xdvik/dvi-draw.c --- xdvik-22.40o/texk/xdvik/dvi-draw.c Tue Oct 15 21:15:02 2002 +++ xdvik-22.40p/texk/xdvik/dvi-draw.c Thu Oct 31 00:10:49 2002 @@ -34,6 +34,7 @@ #include "kpathsea/magstep.h" #include "kpathsea/tex-file.h" #include "kpathsea/c-vararg.h" +#include "kpathsea/expand.h" /* for kpse_path_expand() */ #include "dvi.h" #include "xdvi.h" #include "string-utils.h" @@ -49,6 +50,12 @@ #endif #define BUF_SIZE 1024 +/* hashing stuff for fontname lookup */ +#define T1FONTS_INITIAL_HASHTABLE_SIZE 1031 +static hash_table_type t1fonts_hash; +static hash_table_type tfminfo_hash; +static hash_table_type fontmaps_hash; + typedef enum { FAILURE_BLANK = -2, FAILURE_PK = -1, SUCCESS = 0 } t1font_load_status_t; #ifdef T1LIB @@ -150,7 +157,7 @@ startup of the program the startup-time becomes ecessively high due to the high number of fonts used by any normaly LaTeX-document. - 0 extention and slant means no extention/slant. If the input + 0 extension and slant means no extension/slant. If the input values are decimal (less than 10) they're multiplied by 1000 and 10000 respectively to obtain fixed-point integer values. Integer values have the advandage of being testable for exact match (== 0) @@ -162,7 +169,7 @@ typedef struct fontmap { char *texname; int enc; /* Index in encoding array */ - int extention; /* Fixed point, *1000 */ + int extension; /* Fixed point, *1000 */ int slant; /* Fixed point, *10000, some font slantings have 4 significant digits, all after the decimalpoint */ char *filename; /* Name of the t1 font file as given in map/dvi */ @@ -535,11 +542,11 @@ /* * Explanation of the following constant: * offset_[xy] << 16: margin (defaults to one inch) - * shrink_factor << 16: one pixel page border - * shrink_factor << 15: rounding for pixel_conv + * currwin.shrinkfactor << 16: one pixel page border + * currwin.shrinkfactor << 15: rounding for pixel_conv */ -#define OFFSET_X (offset_x << 16) + (shrink_factor * 3 << 15) -#define OFFSET_Y (offset_y << 16) + (shrink_factor * 3 << 15) +#define OFFSET_X (offset_x << 16) + (currwin.shrinkfactor * 3 << 15) +#define OFFSET_Y (offset_y << 16) + (currwin.shrinkfactor * 3 << 15) #if (BMBYTES == 1) BMUNIT bit_masks[9] = { @@ -843,7 +850,7 @@ #else for (i = BMBITS - 1; i >= 0; --i) #endif - Putchar((*ptr & (1 << i)) ? '@' : ' '); + Putchar((*ptr & (1 << i)) ? '@' : '.'); ++ptr; } Putchar('\n'); @@ -976,28 +983,28 @@ int cols; BMUNIT *old_ptr, *new_ptr; BMUNIT m, *cp; - int min_sample = shrink_factor * shrink_factor * density / 100; + int min_sample = currwin.shrinkfactor * currwin.shrinkfactor * density / 100; int rtmp; /* These machinations ensure that the character is shrunk according to its hot point, rather than its upper left-hand corner. */ - g->x2 = g->x / shrink_factor; - init_cols = g->x - g->x2 * shrink_factor; + g->x2 = g->x / currwin.shrinkfactor; + init_cols = g->x - g->x2 * currwin.shrinkfactor; if (init_cols <= 0) - init_cols += shrink_factor; + init_cols += currwin.shrinkfactor; else ++g->x2; - g->bitmap2.w = g->x2 + ROUNDUP((int)g->bitmap.w - g->x, shrink_factor); + g->bitmap2.w = g->x2 + ROUNDUP((int)g->bitmap.w - g->x, currwin.shrinkfactor); /* include row zero with the positively numbered rows */ rtmp = g->y + 1; - g->y2 = rtmp / shrink_factor; - rows = rtmp - g->y2 * shrink_factor; + g->y2 = rtmp / currwin.shrinkfactor; + rows = rtmp - g->y2 * currwin.shrinkfactor; if (rows <= 0) { - rows += shrink_factor; + rows += currwin.shrinkfactor; --g->y2; } g->bitmap2.h = shrunk_height = g->y2 + - ROUNDUP((int)g->bitmap.h - rtmp, shrink_factor) + 1; + ROUNDUP((int)g->bitmap.h - rtmp, currwin.shrinkfactor) + 1; alloc_bitmap(&g->bitmap2); old_ptr = (BMUNIT *) g->bitmap.bits; new_ptr = (BMUNIT *) g->bitmap2.bits; @@ -1038,14 +1045,14 @@ m >>= 1; #endif cols_left -= cols; - cols = shrink_factor; + cols = currwin.shrinkfactor; } *((char **)&new_ptr) += shrunk_bytes_wide; *((char **)&old_ptr) += rows * g->bitmap.bytes_wide; rows_left -= rows; - rows = shrink_factor; + rows = currwin.shrinkfactor; } - g->y2 = g->y / shrink_factor; + g->y2 = g->y / currwin.shrinkfactor; if (debug & DBG_BITMAP) print_bitmap(&g->bitmap2); } @@ -1062,26 +1069,26 @@ BMUNIT *old_ptr; unsigned int size; int rtmp; + int c; /* These machinations ensure that the character is shrunk according to its hot point, rather than its upper left-hand corner. */ - g->x2 = g->x / shrink_factor; - init_cols = g->x - g->x2 * shrink_factor; + g->x2 = g->x / currwin.shrinkfactor; + init_cols = g->x - g->x2 * currwin.shrinkfactor; if (init_cols <= 0) - init_cols += shrink_factor; + init_cols += currwin.shrinkfactor; else ++g->x2; - g->bitmap2.w = g->x2 + ROUNDUP((int)g->bitmap.w - g->x, shrink_factor); + g->bitmap2.w = g->x2 + ROUNDUP((int)g->bitmap.w - g->x, currwin.shrinkfactor); /* include row zero with the positively numbered rows */ rtmp = g->y + 1; - g->y2 = rtmp / shrink_factor; - rows = rtmp - g->y2 * shrink_factor; + g->y2 = rtmp / currwin.shrinkfactor; + rows = rtmp - g->y2 * currwin.shrinkfactor; if (rows <= 0) { - rows += shrink_factor; + rows += currwin.shrinkfactor; --g->y2; } - g->bitmap2.h = g->y2 + ROUNDUP((int)g->bitmap.h - rtmp, shrink_factor) - + 1; + g->bitmap2.h = g->y2 + ROUNDUP((int)g->bitmap.h - rtmp, currwin.shrinkfactor) + 1; g->image2 = XCreateImage(DISP, our_visual, our_depth, ZPixmap, 0, (char *)NULL, g->bitmap2.w, g->bitmap2.h, @@ -1106,36 +1113,75 @@ thesample = sample(old_ptr, g->bitmap.bytes_wide, (int)g->bitmap.w - cols_left, cols, rows); +#ifdef XSERVER_INFO + if (debug & DBG_PK) { + if (pixeltbl[thesample] > 65536) + c = pixeltbl[thesample] / 65536; + else + c = pixeltbl[thesample] / 256; + if (c == 0) + fprintf(stdout, ",.."); + else + fprintf(stdout, ",%.2x", c); + } +#endif XPutPixel(g->image2, x, y, pixeltbl[thesample]); if (pixeltbl_t != NULL) { g->image2->data = g->pixmap2_t; + c = pixeltbl_t[thesample] / 256; +#ifdef XSERVER_INFO + if (debug & DBG_PK) + fprintf(stdout, "|%.2x", c); +#endif XPutPixel(g->image2, x, y, pixeltbl_t[thesample]); g->image2->data = g->pixmap2; } cols_left -= cols; - cols = shrink_factor; + cols = currwin.shrinkfactor; x++; } *((char **)&old_ptr) += rows * g->bitmap.bytes_wide; rows_left -= rows; - rows = shrink_factor; + rows = currwin.shrinkfactor; y++; +#ifdef XSERVER_INFO + if (debug & DBG_PK) + putchar('\n'); +#endif } +#ifdef XSERVER_INFO + if (debug & DBG_PK) + putchar('\n'); +#endif while (y < (int)g->bitmap2.h) { for (x = 0; x < (int)g->bitmap2.w; x++) { +#ifdef XSERVER_INFO + c = *pixeltbl / 256; + if (debug & DBG_PK) + fprintf(stdout, ";%.2x", c); +#endif XPutPixel(g->image2, x, y, *pixeltbl); if (pixeltbl_t != NULL) { +#ifdef XSERVER_INFO + c = *pixeltbl / 256; + if (debug & DBG_PK) + fprintf(stdout, ":%.2x", c); +#endif g->image2->data = g->pixmap2_t; XPutPixel(g->image2, x, y, *pixeltbl_t); g->image2->data = g->pixmap2; } } +#ifdef XSERVER_INFO + if (debug & DBG_PK) + putchar('\n'); +#endif y++; } - g->y2 = g->y / shrink_factor; + g->y2 = g->y / currwin.shrinkfactor; } #endif /* GREY */ @@ -1422,7 +1468,7 @@ if (scan_frame == NULL) { #endif - if (shrink_factor == 1) { + if (currwin.shrinkfactor == 1) { put_bitmap(&g->bitmap, PXL_H - g->x, PXL_V - g->y); } else { @@ -1926,7 +1972,7 @@ void draw_page(void) { - if (dvi_file_changed() || page_offset == NULL) { + if (dvi_file_changed() > 0 || page_offset == NULL) { /* dvi_time--; */ return; } @@ -1937,14 +1983,14 @@ #endif put_border(-currwin.base_x, -currwin.base_y, - ROUNDUP(unshrunk_paper_w, shrink_factor) + 2, - ROUNDUP(unshrunk_paper_h, shrink_factor) + 2, highGC); + ROUNDUP(unshrunk_paper_w, currwin.shrinkfactor) + 2, + ROUNDUP(unshrunk_paper_h, currwin.shrinkfactor) + 2, highGC); #ifdef GRID if (grid_mode > 0) /* grid is wanted */ put_grid(-currwin.base_x, -currwin.base_y, - ROUNDUP(unshrunk_paper_w, shrink_factor) + 2, - ROUNDUP(unshrunk_paper_h, shrink_factor) + 2, - ROUNDUP(unshrunk_paper_unit, shrink_factor), + ROUNDUP(unshrunk_paper_w, currwin.shrinkfactor) + 2, + ROUNDUP(unshrunk_paper_h, currwin.shrinkfactor) + 2, + ROUNDUP(unshrunk_paper_unit, currwin.shrinkfactor), rulerGC); #endif /* GRID */ (void)lseek(fileno(dvi_file), page_offset[current_page], SEEK_SET); @@ -2009,7 +2055,7 @@ { if (debug & DBG_HYPER) fprintf(stderr, "htex_parse_page called for %d\n", i); - if (dvi_file_changed() || page_offset == NULL) { + if (dvi_file_changed() > 0 || page_offset == NULL) { /* dvi_time--; */ return False; } @@ -2943,7 +2989,7 @@ * case 1: * try absolute filename */ - if (filename[0] == '/') { + if (filename[0] == DIR_SEPARATOR) { if (stat(filename, statbuf) == 0) { TRACE_SRC((stderr, "Found absolute filename \"%s\"", filename)); return xstrdup(filename); @@ -2959,11 +3005,11 @@ * prepend filename with path name from the `main' xdvi file (global_dvi_name) */ assert(global_dvi_name != NULL); - if ((tmp = strrchr(global_dvi_name, '/')) != NULL) { /* does it have a path component? */ + if ((tmp = strrchr(global_dvi_name, DIR_SEPARATOR)) != NULL) { /* does it have a path component? */ int len = tmp - global_dvi_name; - char *pathname = xmalloc(len + strlen(filename) + 2); /* 2 for '/' + '\0' */ + char *pathname = xmalloc(len + strlen(filename) + 2); /* 1 for DIR_SEPARATOR */ memcpy(pathname, global_dvi_name, len); - pathname[len] = '/'; + pathname[len] = DIR_SEPARATOR; pathname[len + 1] = '\0'; strcat(pathname, filename); @@ -3201,7 +3247,7 @@ struct src_spec_data data; struct src_parsed_special *foundp; - if (dvi_file_changed() || page_offset == NULL) { + if (dvi_file_changed() > 1 || page_offset == NULL) { /* dvi_time--; */ return; } @@ -3573,7 +3619,9 @@ ubyte maxchar_save; struct geom_info g_info; - if (dvi_file_changed()) + int test = dvi_file_changed(); + fprintf(stderr, "DVI FILE changed: %d\n", test); + if (test > 1) return; TRACE_CLIENT((stderr, "Entering source_forward_search(%s)", str)); @@ -3795,9 +3843,12 @@ int i; - for (i = 0; i <= wlidx; i++) - if (strcmp(tfminfo[i].texname, texname) == 0) - return i; + if (tfminfo_hash.size == 0) + tfminfo_hash = hash_create(T1FONTS_INITIAL_HASHTABLE_SIZE); + + if (find_str_int_hash(&tfminfo_hash, texname, &i)) { + return i; + } wlidx++; while (wlidx >= maxw) { @@ -3806,7 +3857,8 @@ } tfminfo[wlidx].texname = texname; - + put_str_int_hash(&tfminfo_hash, tfminfo[wlidx].texname, wlidx); + if (!tfmload(texname, &tfminfo[wlidx].designsize, tfminfo[wlidx].widths)) { fprintf(stderr,"Cannot find font metrics file %s.tfm, fallback cmr10.tfm is also missing.\nAborting\n",texname); exit(1); @@ -3843,12 +3895,11 @@ char *path; /* Already set up by that name? */ - for (i = 0; i <= t1lidx; i++) { - if (strcmp(t1fonts[i].shortname, fontname) == 0 || - strcmp(t1fonts[i].file, fontname) == 0) { - TRACE_T1((stderr, "Type1 font %s already loaded from %s", fontname, filename)); - return i; - } + if (t1fonts_hash.size == 0) + t1fonts_hash = hash_create(T1FONTS_INITIAL_HASHTABLE_SIZE); + + if (find_str_int_hash(&t1fonts_hash, fontname, &i)) { + return i; } /* Insert and set up new t1 font */ @@ -3879,6 +3930,9 @@ t1fonts[t1lidx].shortname = strdup(fontname); t1fonts[t1lidx].loaded = 0; + /* also save the info in the hashtable (note: no duplication of the string here!) */ + put_str_int_hash(&t1fonts_hash, t1fonts[t1lidx].shortname, t1lidx); + if (free_it) free(path); @@ -3902,13 +3956,13 @@ PRIVATE int find_texfont(const char *texname) { - /* Find fontmap index of texfont */ int i; - for (i = 0; i < g_maplidx; i++) { - if (strcmp(fontmaps[i].texname, texname) == 0) { - TRACE_T1((stderr, "Type1 font already loaded at index %d: %s\n", i, texname)); - return i; - } + /* Find fontmap index of texfont */ + if (fontmaps_hash.size == 0) + fontmaps_hash = hash_create(T1FONTS_INITIAL_HASHTABLE_SIZE); + + if (find_str_int_hash(&fontmaps_hash, texname, &i)) { + return i; } return -1; } @@ -3964,6 +4018,9 @@ /* Already setup by that name? */ idx = find_texfont(texname); + + assert(idx == -1 || (idx > -1 && idx < g_maplidx)); + if (mapfile != NULL && idx != -1) { /* font is already set up, and we're scanning the map file: replace existing font with new one */ curr_idx = idx; @@ -3987,8 +4044,8 @@ g_maxmap += FNTMAPGROW; fontmaps = xrealloc(fontmaps, sizeof(*fontmaps) * g_maxmap); - fprintf(stderr, "Enlarged the fontmap from %d to %d entries", - curr_idx, g_maxmap); + TRACE_T1((stderr, "Enlarged the fontmap from %d to %d entries", + curr_idx, g_maxmap)); } } @@ -3996,8 +4053,15 @@ alias = texname; fontmaps[curr_idx].texname = xstrdup(texname); + + if (idx == -1) { + /* save into hash */ + if (fontmaps_hash.size == 0) + fontmaps_hash = hash_create(T1FONTS_INITIAL_HASHTABLE_SIZE); + put_str_int_hash(&fontmaps_hash, fontmaps[curr_idx].texname, curr_idx); + } fontmaps[curr_idx].enc = enc; - fontmaps[curr_idx].extention = ext; + fontmaps[curr_idx].extension = ext; fontmaps[curr_idx].slant = sl; fontmaps[curr_idx].filename = xstrdup(alias); @@ -4103,7 +4167,7 @@ /* If there is nothing further to do, just return */ enc = fontmaps[idx].enc; - ext = fontmaps[idx].extention; + ext = fontmaps[idx].extension; sl = fontmaps[idx].slant; if (enc == -1 && ext == 0 && sl == 0) @@ -4322,7 +4386,7 @@ if (spec != NULL) { /* Try to analyze the postscript string. We recognize two things: "n ExtendFont" and "m SlantFont". n can be a decimal number in - which case it's an extention factor, or a integer, in which + which case it's an extension factor, or a integer, in which case it's a charspace unit? In any case 850 = .85 */ last = strtok(spec, delim); @@ -4372,7 +4436,21 @@ filename = kpse_find_file(file, kpse_program_text_format, 1); if (filename == NULL) { - fprintf(stderr, "xdvi: Warning: unable to find %s\n", file); + char *path = kpse_path_expand("$XDVIINPUTS"); + do_popup_message(MSG_ERR, + "Direct Type 1 (PostScript) font rendering has been disabled. " + "You should try to fix this error, since direct " + "Type 1 font rendering gives you a lot of benefits, such as:\n" + " - quicker startup time, since no bitmap fonts need to be generated;\n" + " - saving disk space for storing the bitmap fonts.\n" + "To fix this error, check that the dvips map file is located somewhere " + "in your XDVIINPUTS path. Have a look at the xdvi wrapper shell script " + "(type \"which xdvi\" to locate that shell script) for the current setting " + "of XDVIINPUTS.", + "Could not find config file %s in path \"%s\" - disabling T1lib.", + file, path); + free(path); + resource.t1lib = False; return; } @@ -4430,7 +4508,7 @@ "in your XDVIINPUTS path. Have a look at the xdvi wrapper shell script " "(type \"which xdvi\" to locate that shell script) for the current setting " "of XDVIINPUTS.", - "Could not load dvips map %s - disabling T1lib.", + "Could not find dvips map %s - disabling T1lib.", f); resource.t1lib = False; return; @@ -4512,7 +4590,7 @@ TRACE_T1((stderr, "scale: %ld, ppi %d, sf: %d, size: %f", currinf.fontp->scale, pixels_per_inch, - shrink_factor, size)); + currwin.shrinkfactor, size)); if (t1libid == -1) { TRACE_T1((stderr, "trying to load font %d", id)); @@ -4526,7 +4604,7 @@ TRACE_T1((stderr, "Setting '0x%x' of %d, at %ld(%.2fpt), shrinkage is %d", ch, t1libid, currinf.fontp->scale, - size, shrink_factor)); + size, currwin.shrinkfactor)); /* Check if the glyph already has been rendered */ if ((g = &currinf.fontp->glyph[ch])->bitmap.bits == NULL) { diff -Naur xdvik-22.40o/texk/xdvik/dvi-init.c xdvik-22.40p/texk/xdvik/dvi-init.c --- xdvik-22.40o/texk/xdvik/dvi-init.c Thu Oct 10 22:54:34 2002 +++ xdvik-22.40p/texk/xdvik/dvi-init.c Mon Oct 21 23:25:17 2002 @@ -892,10 +892,10 @@ /** ** Check for changes in dvi file. - ** return True if file has changed, False else. + ** return 0 if file hasn't changed, 1 if it can be reloaded, 2 if it is corrupted. **/ -Boolean +int dvi_file_changed(void) { struct font *fontp; @@ -947,13 +947,14 @@ htex_reinit(); #endif /* HTEX */ redraw_page(); - return True; + print_statusline(STATUS_MEDIUM, "DVI file reloaded"); + return 1; } else { print_statusline(STATUS_MEDIUM, "DVI file corrupted"); XClearWindow(DISP, mane.win); - return True; + return 2; } } - return False; + return 0; } diff -Naur xdvik-22.40o/texk/xdvik/events.c xdvik-22.40p/texk/xdvik/events.c --- xdvik-22.40o/texk/xdvik/events.c Tue Oct 15 21:15:02 2002 +++ xdvik-22.40p/texk/xdvik/events.c Wed Oct 23 21:41:51 2002 @@ -3587,6 +3587,11 @@ UNUSED(params); UNUSED(num_params); + if (skip_next_mouseevent) { + skip_next_mouseevent = False; + return; + } + if ((event->type == ButtonPress && mouse_release != null_mouse) || alt.win != (Window) 0) { XBell(DISP, 20); @@ -3630,6 +3635,11 @@ UNUSED(params); UNUSED(num_params); + if (skip_next_mouseevent) { + skip_next_mouseevent = False; + return; + } + (void)XTranslateCoordinates(DISP, event->xkey.window, mane.win, event->xkey.x, event->xkey.y, &my_x, &my_y, &ww); /* throw away last argument */ my_x = (my_x + mane_base_x) * mane.shrinkfactor; diff -Naur xdvik-22.40o/texk/xdvik/help-window.c xdvik-22.40p/texk/xdvik/help-window.c --- xdvik-22.40o/texk/xdvik/help-window.c Sun Oct 6 15:26:47 2002 +++ xdvik-22.40p/texk/xdvik/help-window.c Wed Oct 23 01:18:49 2002 @@ -53,9 +53,12 @@ #define help_othercommands resource._help_othercommands #define help_pagemotion_menulabel resource._help_pagemotion_menulabel #define help_pagemotion resource._help_pagemotion +#define help_mousebuttons_menulabel resource._help_mousebuttons_menulabel +#define help_mousebuttons resource._help_mousebuttons #define help_sourcespecials_menulabel resource._help_sourcespecials_menulabel #define help_sourcespecials resource._help_sourcespecials +#define WIDGET_INFO_LIST_LEN 10 /* number of help texts */ /* ======================================================================== @@ -225,6 +228,7 @@ "More detailed help is available with `man xdvi'.\n", NULL }; + static _Xconst char *default_help_general[] = { "\n", "This is xdvik, version ", @@ -269,6 +273,7 @@ #endif NULL }; + #ifdef HTEX static _Xconst char *default_help_hypertex[] = { "\n", @@ -287,9 +292,11 @@ " at the cursor position.\n", "B or \"Back\" button\n", " Go back to the previous anchor.\n", + "\n", NULL }; #endif + static _Xconst char *default_help_othercommands[] = { "\n", "Other Commands\n", @@ -361,8 +368,10 @@ "x Toggles expert mode (in which the buttons do not appear).\n", " `1x' toggles display of the statusline at the bottom of\n", " the window.\n", + "\n", NULL }; + static _Xconst char *default_help_pagemotion[] = { "\n", "Moving around in the document\n", @@ -407,8 +416,39 @@ "\n", "< Move to first page in document.\n", "> Move to last page in document.\n", + "\n", + NULL + }; + + static _Xconst char *default_help_mousebuttons[] = { + "\n", + "Mouse buttons\n", + "\n", + "\n", + "The mouse buttons can be customized just like the keys;\n", + "however the bindings cannot be intermixed (since\n", + "a mouse event always requires the pointer location\n", + "to be present, which a key event doesn't).\n", + "\n", + "Buttons 1-3\n", + " Pops up a magnifier window at different sizes.\n", + " When the mouse is over a hyperlink, the link overrides\n", + " the magnifier. In that case, Button 1 jumps to the link\n", + " in the current Xdvi window, Button 2 opens the link target\n", + " in a new instance of Xdvik.\n" + "\n", + "Shift-Button1 to Shift-Button3\n", + " Drag the page in each direction (Button 1), vertically\n", + " only (Button 2) or horizontally only (Button 3).\n", + "\n", + "Ctrl-Button1\n", + " Invoke a reverse search for the text on the cursor\n", + " location (see the section INVERSE SEARCH for more\n", + " information on this).\n", + "\n", NULL }; + static _Xconst char *default_help_sourcespecials[] = { "\n", "Source Special Commands\n", @@ -466,7 +506,7 @@ char *title_string; /* string used for menu entry; NULL if widget is not a menu entry */ char *resource_string; /* value of X resource */ _Xconst char **default_resource_string; /* fallback if resource is unspecified */ - } widget_info_list[7]; + } widget_info_list[WIDGET_INFO_LIST_LEN]; /* * store info on all widgets into array so that we can initialize them within a loop; @@ -515,6 +555,13 @@ k++; #endif + widget_info_list[k].name = "helpMousebuttons"; + widget_info_list[k].title_string = help_mousebuttons_menulabel; + widget_info_list[k].resource_string = help_mousebuttons; + widget_info_list[k].default_resource_string = default_help_mousebuttons; + + k++; + widget_info_list[k].name = "helpSourcespecials"; widget_info_list[k].title_string = help_sourcespecials_menulabel; widget_info_list[k].resource_string = help_sourcespecials; @@ -527,6 +574,8 @@ widget_info_list[k].resource_string = NULL; widget_info_list[k].default_resource_string = NULL; + if (k >= WIDGET_INFO_LIST_LEN) + oops("BUG: k (%d) not smaller than WIDGET_INFO_LIST_LEN (%d)!", k, WIDGET_INFO_LIST_LEN); #ifdef TOOLKIT if (!help_created) { diff -Naur xdvik-22.40o/texk/xdvik/help-window.h xdvik-22.40p/texk/xdvik/help-window.h --- xdvik-22.40o/texk/xdvik/help-window.h Wed Apr 18 14:24:43 2001 +++ xdvik-22.40p/texk/xdvik/help-window.h Thu Jan 1 00:00:00 1970 @@ -1,8 +0,0 @@ -/* mappings of help texts to resources */ -#define help_topics_button_label resource._help_topics_button_label -#define help_intro resource._help_intro -#define help_general resource._help_general; -#define help_hypertex resource._help_hypertex; -#define help_othercommands resource._help_othercommands; -#define help_pagemotion resource._help_pagemotion; -#define help_sourcespecials resource._help_sourcespecials; diff -Naur xdvik-22.40o/texk/xdvik/hypertex.c xdvik-22.40p/texk/xdvik/hypertex.c --- xdvik-22.40o/texk/xdvik/hypertex.c Sun Oct 6 15:26:47 2002 +++ xdvik-22.40p/texk/xdvik/hypertex.c Tue Oct 29 20:09:41 2002 @@ -119,7 +119,7 @@ static Boolean htex_goback_flag = False; static int cur_anchor_on_page; /* number of current anchor on page when scanning the page */ -static char *anchor_name; +static char *anchor_name = NULL; #define HTeX_AnchorSTEP 20 /* new memory for anchors is allocated in these steps */ static HTeX_Anchor **HTeX_anchorlist; /* array containing the anchors */ static int *nHTeX_anchors; /* array of numbers of anchors per page */ @@ -238,7 +238,7 @@ ++cp; while (isspace(*cp)) cp++; - if (*cp == '/') { + if (*cp == DIR_SEPARATOR) { beginend = END; cp++; } @@ -884,7 +884,7 @@ check_for_anchor(void) { if (debug & DBG_HYPER) - fprintf(stderr, "check_for_anchor |%s|\n", anchor_name); + fprintf(stderr, "check_for_anchor |%s|\n", anchor_name ? anchor_name : ""); if (jump_to_anchor) { htex_to_anchor(0, jump_to_anchorinfo.page, jump_to_anchorinfo.num); jump_to_anchor = False; @@ -972,8 +972,8 @@ argv[i++] = "xdvi"; argv[i++] = "-s"; - shrink_arg = xmalloc(length_of_int((int)shrink_factor) + 1); - sprintf(shrink_arg, "%d", shrink_factor); + shrink_arg = xmalloc(length_of_int((int)currwin.shrinkfactor) + 1); + sprintf(shrink_arg, "%d", currwin.shrinkfactor); argv[i++] = shrink_arg; if (anchor_name == NULL) { @@ -1481,7 +1481,7 @@ URLbase = NULL; } - if (strrchr(file, '/') != NULL) { /* If no /'s then leave dir NULL */ + if (strrchr(file, DIR_SEPARATOR) != NULL) { /* If no /'s then leave dir NULL */ n = strlen(file); if (htex_is_url(file)) { /* It already is a URL */ URLbase = xmalloc((unsigned)(n + 1)); @@ -1492,7 +1492,7 @@ URLbase = xmalloc((unsigned)(n + 6 + strlen(cwd))); Sprintf(URLbase, "file:%s/%s", cwd, file); } - cp = strrchr(URLbase, '/'); + cp = strrchr(URLbase, DIR_SEPARATOR); if (cp == NULL) { fprintf(stderr, "extractbase: should not happen: cp == NULL!\n"); free(URLbase); diff -Naur xdvik-22.40o/texk/xdvik/mime.c xdvik-22.40p/texk/xdvik/mime.c --- xdvik-22.40o/texk/xdvik/mime.c Thu Sep 19 23:10:04 2002 +++ xdvik-22.40p/texk/xdvik/mime.c Fri Oct 18 23:15:20 2002 @@ -312,7 +312,7 @@ filename); /* See if this is a directory */ - if (filename[strlen(filename) - 1] == '/') { + if (filename[strlen(filename) - 1] == DIR_SEPARATOR) { if (debug & DBG_HYPER) fprintf(stderr, "It's a directory, returning www/unknown\n"); return "www/unknown"; diff -Naur xdvik-22.40o/texk/xdvik/sfDraw.c xdvik-22.40p/texk/xdvik/sfDraw.c --- xdvik-22.40o/texk/xdvik/sfDraw.c Sun Oct 6 15:26:47 2002 +++ xdvik-22.40p/texk/xdvik/sfDraw.c Tue Oct 29 20:09:41 2002 @@ -91,9 +91,19 @@ } } - SFcharWidth = (SFfont->max_bounds.width + SFfont->min_bounds.width) / 2; + SFcharWidth = get_avg_font_width(SFfont); SFcharAscent = SFfont->max_bounds.ascent; SFcharHeight = SFcharAscent + SFfont->max_bounds.descent; + if (SFcharWidth == 0) { + /* if min_bounds.width = -max_bounds.width, we probably + have a scalable TT font; try to determine its actual + width by measuring the letter `x': + */ + SFcharWidth = XTextWidth(SFfont, "x", 1); + } + if (SFcharWidth == 0) { /* last resort */ + SFcharWidth = SFfont->max_bounds.width / 2; + } } void diff -Naur xdvik-22.40o/texk/xdvik/sfPath.c xdvik-22.40p/texk/xdvik/sfPath.c --- xdvik-22.40o/texk/xdvik/sfPath.c Sun Oct 6 15:26:47 2002 +++ xdvik-22.40p/texk/xdvik/sfPath.c Fri Oct 18 23:15:20 2002 @@ -24,13 +24,10 @@ * erik@sra.co.jp */ -#ifdef HAVE_CONFIG_H -#include "c-auto.h" -#endif - #if !defined (NOSELFILE) && !defined (NOTOOL) /* for xdvik */ #include +#include "xdvi.h" #ifdef SEL_FILE_IGNORE_CASE #include @@ -191,7 +188,7 @@ *(dir->path) = 0; len = strlen(str); - if (str[len - 1] == '/') { + if (str[len - 1] == DIR_SEPARATOR) { (void)strcat(SFcurrentPath, str); } else { @@ -274,7 +271,7 @@ SFexpand(str); return 1; } - else if (str[len - 1] == '/') { + else if (str[len - 1] == DIR_SEPARATOR) { len--; } @@ -327,7 +324,7 @@ ) { dir->changed = 1; dir->beginSelection = begin; - if (str[strlen(str) - 1] == '/') { + if (str[strlen(str) - 1] == DIR_SEPARATOR) { dir->endSelection = begin; } else { @@ -558,22 +555,22 @@ prevChange = 0; while (*end) { - while (*end++ == '/') { + while (*end++ == DIR_SEPARATOR) { ; } end--; begin = end; - while ((*end) && (*end++ != '/')) { + while ((*end) && (*end++ != DIR_SEPARATOR)) { ; } - if ((end - SFcurrentPath <= SFtextPos) && (*(end - 1) == '/')) { + if ((end - SFcurrentPath <= SFtextPos) && (*(end - 1) == DIR_SEPARATOR)) { SFdirPtr = i - 1; if (SFdirPtr < 0) { SFdirPtr = 0; } } if (*begin) { - if (*(end - 1) == '/') { + if (*(end - 1) == DIR_SEPARATOR) { char save = *end; if (SFtwiddle) { @@ -877,7 +874,7 @@ SFstatChar(struct stat *statBuf) { if (S_ISDIR(statBuf->st_mode)) { - return '/'; + return DIR_SEPARATOR; } else if (S_ISREG(statBuf->st_mode)) { return S_ISXXX(statBuf->st_mode) ? '*' : ' '; diff -Naur xdvik-22.40o/texk/xdvik/sfSelFile.c xdvik-22.40p/texk/xdvik/sfSelFile.c --- xdvik-22.40o/texk/xdvik/sfSelFile.c Sun Oct 6 15:26:47 2002 +++ xdvik-22.40p/texk/xdvik/sfSelFile.c Fri Oct 18 23:15:20 2002 @@ -878,7 +878,7 @@ { extern void SFupdatePath(); - if ((SFtextBuffer[0] == '/') || (SFtextBuffer[0] == '~')) { + if ((SFtextBuffer[0] == DIR_SEPARATOR) || (SFtextBuffer[0] == '~')) { (void)strcpy(SFcurrentPath, SFtextBuffer); SFtextPos = XawTextGetInsertionPoint(selFileField); @@ -985,7 +985,7 @@ (void)strcpy(SFcurrentDir, SFstartDir); if (init_path) { - if (init_path[0] == '/') { + if (init_path[0] == DIR_SEPARATOR) { (void)strcpy(SFcurrentPath, init_path); if (strncmp(SFcurrentPath, SFstartDir, strlen(SFstartDir) )) { diff -Naur xdvik-22.40o/texk/xdvik/special.c xdvik-22.40p/texk/xdvik/special.c --- xdvik-22.40o/texk/xdvik/special.c Sun Oct 6 15:26:47 2002 +++ xdvik-22.40p/texk/xdvik/special.c Tue Oct 29 20:09:41 2002 @@ -93,8 +93,8 @@ static Boolean blacken = False; /* Unfortunately, these values also appear in dvisun.c */ -#define xRESOLUTION (pixels_per_inch/shrink_factor) -#define yRESOLUTION (pixels_per_inch/shrink_factor) +#define xRESOLUTION (pixels_per_inch/currwin.shrinkfactor) +#define yRESOLUTION (pixels_per_inch/currwin.shrinkfactor) # if HAVE_VFORK_H # include @@ -120,8 +120,8 @@ */ #define toint(x) ((int) ((x) + 0.5)) -#define xconv(x) (toint(tpic_conv*(x))/shrink_factor + PXL_H) -#define yconv(y) (toint(tpic_conv*(y))/shrink_factor + PXL_V) +#define xconv(x) (toint(tpic_conv*(x))/currwin.shrinkfactor + PXL_H) +#define yconv(y) (toint(tpic_conv*(y))/currwin.shrinkfactor + PXL_V) /* * Draw a line from (fx,fy) to (tx,ty). @@ -912,8 +912,8 @@ /* FIXME: make this, and src_find_file from dvi-draw.c, a single function that can be used in both cases! */ - if (filename[0] != '/') { - char *p = rindex(global_dvi_name, '/'); + if (filename[0] != DIR_SEPARATOR) { + char *p = rindex(global_dvi_name, DIR_SEPARATOR); if (p == NULL) { bufp = (char *)filename; } @@ -1239,11 +1239,11 @@ bbox_width = 0.1 * ((flags & 0x10) ? KEY_RWI : KEY_RHI * (KEY_URX - KEY_LLX) / (KEY_URY - KEY_LLY)) * - dimconv / shrink_factor + 0.5; + dimconv / currwin.shrinkfactor + 0.5; bbox_voffset = bbox_height = 0.1 * ((flags & 0x20) ? KEY_RHI : KEY_RWI * (KEY_URY - KEY_LLY) / (KEY_URX - KEY_LLX)) - * dimconv / shrink_factor + 0.5; + * dimconv / currwin.shrinkfactor + 0.5; } if (currwin.win == mane.win) { diff -Naur xdvik-22.40o/texk/xdvik/string-utils.c xdvik-22.40p/texk/xdvik/string-utils.c --- xdvik-22.40o/texk/xdvik/string-utils.c Thu Sep 19 23:10:05 2002 +++ xdvik-22.40p/texk/xdvik/string-utils.c Fri Oct 18 23:15:20 2002 @@ -177,12 +177,12 @@ } /* skip over `./' in relative paths */ - if (expanded_filename[0] == '.' && expanded_filename[1] == '/') { + if (memcmp(expanded_filename, "./", 2) == 0) { expanded_filename += 2; } /* expand to full path if needed */ - if (expanded_filename[0] != '/') { + if (expanded_filename[0] != DIR_SEPARATOR) { for (;;) { char *tmp; path_name = xrealloc(path_name, path_name_len); @@ -194,7 +194,7 @@ break; } } - len += strlen(path_name) + 1; /* 1 for '/' */ + len += strlen(path_name) + 1; /* for DIR_SEPARATOR */ path_name = xrealloc(path_name, len); strcat(path_name, "/"); strcat(path_name, expanded_filename); diff -Naur xdvik-22.40o/texk/xdvik/util.c xdvik-22.40p/texk/xdvik/util.c --- xdvik-22.40o/texk/xdvik/util.c Thu Sep 19 23:10:05 2002 +++ xdvik-22.40p/texk/xdvik/util.c Wed Oct 30 09:38:19 2002 @@ -32,7 +32,11 @@ #include "HTEscape.h" #include -#include /* needed for memicmp() */ + +#ifndef HAVE_MEMICMP +#include +#endif + #include #include /* get WORD64 and LONG64 */ @@ -176,7 +180,7 @@ #ifdef HTEX htex_cleanup(); #endif - exit(status); + exit(2); } @@ -268,7 +272,7 @@ for (;;) { /* loop for resolving symlinks in base name */ /* get base name and dir name components */ - char *p = strrchr(resolved, '/'); + char *p = strrchr(resolved, DIR_SEPARATOR); if (p != NULL) { base = p + 1; if (p == resolved) { @@ -279,7 +283,7 @@ } else { /* not in root dir; chop off path name at slash */ - while (p > resolved && *p == '/') /* for multiple trailing slashes */ + while (p > resolved && *p == DIR_SEPARATOR) /* for multiple trailing slashes */ p--; *(p + 1) = '\0'; p = resolved; @@ -336,7 +340,7 @@ break; /* need to append a slash if resolved is not the root dir */ - if (!(resolved[0] == '/' && resolved[1] == '\0')) { + if (!(resolved[0] == DIR_SEPARATOR && resolved[1] == '\0')) { if (strlen(resolved) + 2 > MAXPATHLEN) { errno = ENAMETOOLONG; break; @@ -535,6 +539,7 @@ #endif /* not KPATHSEA */ +#ifndef HAVE_MEMICMP /* * Hopefully a self-explanatory name. This code assumes the second * argument is lower case. @@ -553,7 +558,7 @@ } return 0; } - +#endif /* * Close the pixel file for the least recently used font. @@ -635,7 +640,7 @@ /* If what we're left with starts in // then we need to remove a hostname part too */ if (strncmp(filename, "//", 2) == 0) - filename = strchr(filename + 2, '/'); + filename = strchr(filename + 2, DIR_SEPARATOR); HTUnEscape(filename); @@ -770,7 +775,7 @@ ++p; /* skip the tilde */ p1 = p; - while (p1 < p_end && *p1 != '/') + while (p1 < p_end && *p1 != DIR_SEPARATOR) ++p1; len = p1 - p; @@ -957,7 +962,7 @@ ourdir = "."; } len = strlen(ourdir); - if (len > 0 && ourdir[len - 1] == '/') + if (len > 0 && ourdir[len - 1] == DIR_SEPARATOR) --len; template = p = xmalloc(len + sizeof tmp_suffix); memcpy(p, ourdir, len); @@ -1108,3 +1113,60 @@ free(err_buf); } + +/* determine average width of a font */ +int +get_avg_font_width(XFontStruct *font) +{ + int width; + + assert(font != NULL); + width = font->max_bounds.width + font->min_bounds.width / 2; + if (width == 0) { + /* if min_bounds.width = -max_bounds.width, we probably + have a scalable TT font; try to determine its actual + width by measuring the letter `x': + */ + width = XTextWidth(font, "x", 1); + } + if (width == 0) { /* last resort */ + width = font->max_bounds.width / 2; + } + return width; + +} + +/* hashtable functions */ +/* + If key is in hashtable, return True and the integer value in val; + else return False (and leave val untouched). +*/ +Boolean +find_str_int_hash(hash_table_type *hashtable, const char *key, int *val) +{ + string *ret; +#ifdef KPSE_DEBUG + if (KPSE_DEBUG_P (KPSE_DEBUG_HASH)) + kpse_debug_hash_lookup_int = true; +#endif + ret = hash_lookup(*hashtable, key); +#ifdef KPSE_DEBUG + if (KPSE_DEBUG_P (KPSE_DEBUG_HASH)) + kpse_debug_hash_lookup_int = false; +#endif + + if (ret != NULL) { + long l = (long)*ret; + *val = l; +/* fprintf(stderr, "found key: %s -> %d\n", key, l); */ + return True; + } + return False; +} + +void +put_str_int_hash(hash_table_type *hashtable, const char *key, int val) +{ + long ptr = (long)val; + hash_insert(hashtable, key, (const string)ptr); +} diff -Naur xdvik-22.40o/texk/xdvik/version.h xdvik-22.40p/texk/xdvik/version.h --- xdvik-22.40o/texk/xdvik/version.h Wed Oct 16 23:22:32 2002 +++ xdvik-22.40p/texk/xdvik/version.h Thu Oct 31 00:10:50 2002 @@ -1,4 +1,4 @@ -#define XDVERSION "22.40o" +#define XDVERSION "22.40p" #ifdef Omega #define TVERSION XDVERSION" for Omega" #else diff -Naur xdvik-22.40o/texk/xdvik/xdvi-config.h xdvik-22.40p/texk/xdvik/xdvi-config.h --- xdvik-22.40o/texk/xdvik/xdvi-config.h Tue Oct 15 21:15:02 2002 +++ xdvik-22.40p/texk/xdvik/xdvi-config.h Fri Oct 18 23:15:21 2002 @@ -4,7 +4,9 @@ #ifndef CONFIG_H #define CONFIG_H +#ifndef KPATHSEA #define KPATHSEA 1 +#endif #ifndef HAVE_VPRINTF #ifdef HAVE_DOPRNT diff -Naur xdvik-22.40o/texk/xdvik/xdvi.c xdvik-22.40p/texk/xdvik/xdvi.c --- xdvik-22.40o/texk/xdvik/xdvi.c Tue Oct 15 21:15:02 2002 +++ xdvik-22.40p/texk/xdvik/xdvi.c Thu Oct 31 00:10:50 2002 @@ -111,6 +111,8 @@ #include "krheader.h" #endif +#include "xserver-info.h" + #include /* sometimes includes atof() */ #include @@ -869,6 +871,10 @@ offset(_help_pagemotion_menulabel), XtRString, "Page Motion"}, {"helpPagemotion", "HelpPagemotion", XtRString, sizeof(char *), offset(_help_pagemotion), XtRString, NULL}, + {"helpMousebuttonsMenulabel", "HelpMousebuttonsMenulabel", XtRString, sizeof(char *), + offset(_help_mousebuttons_menulabel), XtRString, "Mouse buttons"}, + {"helpMousebuttons", "HelpMousebuttons", XtRString, sizeof(char *), + offset(_help_mousebuttons), XtRString, NULL}, {"helpSourcespecialsMenulabel", "HelpSourcespecialsMenulabel", XtRString, sizeof(char *), offset(_help_sourcespecials_menulabel), XtRString, "Source Specials"}, {"helpSourcespecials", "HelpSoucespecials", XtRString, sizeof(char *), @@ -1103,7 +1109,7 @@ {"-regression", "regression", TrueArg, BooleanArg, 1, NULL, ADDR(regression)}, {"+regression", "regression", FalseArg, BooleanArg, 2, NULL, ADDR(regression)}, { "+", NULL, StickyArg, StringArg, 1, NULL, (XPointer) & curr_page}, - { "-s", "shrinkFactor", SepArg, NumberArg, 1, "shrink", (XPointer) & shrink_factor}, + { "-s", "shrinkFactor", SepArg, NumberArg, 1, "shrink", (XPointer) & currwin.shrinkfactor}, #ifndef VMS { "-S", NULL, SepArg, NumberArg, 2, "density", ADDR(_density)}, { "-density", "densityPercent", SepArg, NumberArg, 1, silent, ADDR(_density)}, @@ -1226,7 +1232,7 @@ #endif /* TOOLKIT */ static NORETURN void -usage(void) +usage(int exitval) { #ifdef TOOLKIT XrmOptionDescRec *opt; @@ -1315,7 +1321,7 @@ #else Fputs("dvi_file\n", stdout); #endif - exit(1); + exit(exitval); } static int @@ -1749,7 +1755,7 @@ } if (candidate == NULL) { if (**arg == '-' || dvi_name) - usage(); + usage(EXIT_FAILURE); else { /* need to make sure that dvi_name can be freed safely */ dvi_name = xmalloc((unsigned)strlen(*arg) + 1); @@ -1774,7 +1780,7 @@ case SepArg: ++arg; if (arg >= argvend) - usage(); + usage(EXIT_FAILURE); optstring = *arg; break; } @@ -2176,7 +2182,7 @@ _Xconst char *_Xconst title_name_fmt = "Xdvi: %s (%d page%s)"; #endif - icon_name = strrchr(dvi_name, '/'); + icon_name = strrchr(dvi_name, DIR_SEPARATOR); if (icon_name != NULL) ++icon_name; else { @@ -2224,9 +2230,30 @@ } } - - +static void +display_version_info(void) +{ + Printf("xdvik version %s\n", TVERSION); + Printf("Copyright (C) 1990-2002 Paul Vojta and others.\n\ +Primary author of Xdvi: Paul Vojta;\n\ +Xdvik maintainers: \n\ + Nicolai Langfeldt \n\ + Stefan Ulrich \n\ +\n\ +xdvi itself is licensed under the X Consortium license. Xdvik relies on\n\ +- The kpathsea library which is covered by the GNU LIBRARY General\n\ + Public License (see COPYING.LIB for full details)\n\ +- libwww which is copyrighted by the World Wide Web Consortium and CERN\n\ + (see COPYRIGH for full details).\n\ +- t1lib which is (C) Rainer Menzner and licensed under the GNU LIBRARY\n\ + General Public License but are in part (C) Adobe Systems Inc., IBM\n\ + and the X11-consortium.\n\ +There is NO WARRANTY of anything.\n\n\ +Please send bug reports, feature requests etc. to:\n\ +http://sourceforge.net/tracker/?group_id=23164&atid=377580\n\n"); +} + /* * main program @@ -2258,22 +2285,33 @@ /* This has to be a special case, for now. */ - if (argc == 2 && ((strcmp(argv[1], "-help") == 0) - || (strcmp(argv[1], "-h") == 0) - || (strcmp(argv[1], "+help") == 0) - || (strcmp(argv[1], "--help") == 0) - )) { - Printf("xdvik version %s\n", TVERSION); - Printf("Preview a DVI file under the X window system.\nPlease submit bug reports to:\n\ -http://sourceforge.net/tracker/?group_id=23164&atid=377580\n\n"); - usage(); /* Unfortunately this exits with status 1. */ + /* This has to be a special case, for now. We need to loop through all args + * in case xdvi is aliased, or a shell script (like in teTeX) that adds + * things like `-name' at the beginning of the arglist. + */ + for (i = 1; i < argc; i++) { + if (strcmp(argv[i], "-help") == 0 + || strcmp(argv[i], "-h") == 0 + || strcmp(argv[i], "+help") == 0 + || strcmp(argv[i], "--help") == 0) { + /* extern char *kpse_bug_address; */ + printf("xdvik version %s\n", TVERSION); + printf(" A DVI file previewer for the X window system.\n" + " Please submit bug reports to:\n" + " http://sourceforge.net/tracker/?group_id=23164&atid=377580\n\n"); + usage(0); + } + else if (strcmp(argv[i], "--version") == 0 + || strcmp(argv[i], "-v") == 0) { + display_version_info(); + exit(0); + } } - -#ifndef VMS - prog = strrchr(*argv, '/'); -#else +#ifdef VMS prog = strrchr(*argv, ']'); +#else + prog = strrchr(*argv, DIR_SEPARATOR); #endif if (prog != NULL) ++prog; @@ -2344,16 +2382,14 @@ while (--argc > 0) { if (*(*++argv) == '+') if (curr_page != NULL) - usage(); + usage(EXIT_FAILURE); else curr_page = *argv + 1; else if (dvi_name != NULL) - usage(); + usage(EXIT_FAILURE); else { /* need to make sure that dvi_name can be freed safely */ - dvi_name = xmalloc((unsigned)strlen(*argv) + 1); - Strcpy(dvi_name, *argv); - + dvi_name = xstrdup(*argv); /* save a normalized representation of dvi_name to global_dvi_name, * used for forward search: Without `file:' prefix, with extension * and full path name. @@ -2377,7 +2413,7 @@ application_resources, XtNumber(application_resources), (ArgList) NULL, 0); - shrink_factor = resource.shrinkfactor; + currwin.shrinkfactor = resource.shrinkfactor; #if CFGFILE if (resource.progname != NULL) @@ -2391,24 +2427,7 @@ #endif /* TOOLKIT */ if (resource.version_flag) { - Printf("xdvik version %s\n", TVERSION); - Printf("Copyright (C) 1990-2002 Paul Vojta and others.\n\ -Primary author of Xdvi: Paul Vojta;\n\ -Xdvik maintainers: \n\ - Nicolai Langfeldt \n\ - Stefan Ulrich \n\ -\n\ -xdvi itself is licensed under the X Consortium license. Xdvik relies on\n\ -- The kpathsea library which is covered by the GNU LIBRARY General\n\ - Public License (see COPYING.LIB for full details)\n\ -- libwww which is copyrighted by the World Wide Web Consortium and CERN\n\ - (see COPYRIGH for full details).\n\ -- t1lib which is (C) Rainer Menzner and licensed under the GNU LIBRARY\n\ - General Public License but are in part (C) Adobe Systems Inc., IBM\n\ - and the X11-consortium.\n\ -There is NO WARRANTY of anything.\n\n\ -Please send bug reports, feature requests etc. to:\n\ -http://sourceforge.net/tracker/?group_id=23164&atid=377580\n\n"); + display_version_info(); exit(0); } @@ -2470,7 +2489,7 @@ if (dvi_name == NULL) exit(0); #else - usage(); + usage(EXIT_FAILURE); #endif } @@ -2527,15 +2546,15 @@ pixels_per_inch = atoi(p); } } - if (shrink_factor < 0 || density <= 0 || pixels_per_inch <= 0 + if (currwin.shrinkfactor < 0 || density <= 0 || pixels_per_inch <= 0 #ifndef SELFILE || dvi_name == NULL #endif ) - usage(); - if (shrink_factor > 1) { - bak_shrink = shrink_factor; - mane.shrinkfactor = shrink_factor; /* otherwise it's 1 */ + usage(EXIT_FAILURE); + if (currwin.shrinkfactor > 1) { + bak_shrink = currwin.shrinkfactor; + mane.shrinkfactor = currwin.shrinkfactor; /* otherwise it's 1 */ } if (resource.sidemargin) @@ -2600,7 +2619,11 @@ fprintf(stderr, "Xdvi(k) %s, ", TVERSION); fprintf(stderr, "configured with: ppi=%d shrink=%d mfmode=%s alt_font=%s paper=%s\n", - pixels_per_inch, shrink_factor, resource.mfmode, alt_font, resource.paper); + pixels_per_inch, + currwin.shrinkfactor, + resource.mfmode ? resource.mfmode : "", + alt_font, + resource.paper); } kpse_set_program_enabled(kpse_any_glyph_format, @@ -2630,11 +2653,19 @@ * values, but I don't think that makes any difference.) */ +#ifdef XSERVER_INFO + print_xserver_info(); +#endif + #ifdef GREY our_depth = DefaultDepthOfScreen(SCRN); our_visual = DefaultVisualOfScreen(SCRN); our_colormap = DefaultColormapOfScreen(SCRN); +#ifdef XSERVER_INFO + if (debug & DBG_PK) + fprintf(stdout, "--- our_depth: %d\n", our_depth); +#endif if (resource.install != False && our_visual->class == PseudoColor) { /* look for a TrueColor visual with more bits */ @@ -2642,6 +2673,10 @@ XVisualInfo *list; int nitems_return; +#ifdef XSERVER_INFO + if (debug & DBG_PK) + fprintf(stdout, "--- looking for a better TrueColor visual\n"); +#endif template.screen = XScreenNumberOfScreen(SCRN); template.class = TrueColor; list = XGetVisualInfo(DISP, VisualScreenMask | VisualClassMask, @@ -2650,7 +2685,11 @@ XVisualInfo *list1; XVisualInfo *best = NULL; - for (list1 = list; list1 < list + nitems_return; ++list1) + for (list1 = list; list1 < list + nitems_return; ++list1) { +#ifdef XSERVER_INFO + if (debug & DBG_PK) + fprintf(stdout, "--- checking %d\n", list1->depth); +#endif if ((unsigned int)list1->depth > our_depth # if PS_GS /* patch by Toni Ronkko , fixes bug #458057: @@ -2664,7 +2703,12 @@ # endif && (best == NULL || list1->depth > best->depth)) best = list1; + } if (best != NULL) { +#ifdef XSERVER_INFO + if (debug & DBG_PK) + fprintf(stdout, "--- best depth: %d\n", best->depth); +#endif our_depth = best->depth; our_visual = best->visual; our_colormap = XCreateColormap(DISP, @@ -2697,6 +2741,10 @@ if (resource.install == True && our_visual->class == PseudoColor) { XColor tmp_color; +#ifdef XSERVER_INFO + if (debug & DBG_PK) + fprintf(stdout, "--- PseudoColor, trying to install colormap\n"); +#endif /* This next bit makes sure that the standard black and white pixels are allocated in the new colormap. */ @@ -2742,16 +2790,29 @@ copy = resource.copy; #ifdef GREY - if (our_depth == 1) + if (our_depth == 1) { +#ifdef XSERVER_INFO + if (debug & DBG_PK) + fprintf(stdout, "--- using depth 1\n"); +#endif use_grey = False; + } if (use_grey && our_visual->class != TrueColor) { +#ifdef XSERVER_INFO + if (debug & DBG_PK) + fprintf(stdout, "--- using grey, but not TrueColor\n"); +#endif fore_color_data.pixel = fore_Pixel; XQueryColor(DISP, our_colormap, &fore_color_data); back_color_data.pixel = back_Pixel; XQueryColor(DISP, our_colormap, &back_color_data); init_plane_masks(); if (!copy) { +#ifdef XSERVER_INFO + if (debug & DBG_PK) + fprintf(stdout, "--- not using copy\n"); +#endif back_color_data.pixel = back_Pixel; XStoreColor(DISP, our_colormap, &back_color_data); } @@ -3033,16 +3094,16 @@ /* now reply.{width,height} contain max. usable window size */ - if (shrink_factor != 0) + if (currwin.shrinkfactor != 0) break; - shrink_factor = ROUNDUP(unshrunk_page_w, reply.width - 2); + currwin.shrinkfactor = ROUNDUP(unshrunk_page_w, reply.width - 2); i = ROUNDUP(unshrunk_page_h, reply.height - 2); - if (i >= shrink_factor) - shrink_factor = i; - if (shrink_factor > 1) - bak_shrink = shrink_factor; - mane.shrinkfactor = shrink_factor; + if (i >= currwin.shrinkfactor) + currwin.shrinkfactor = i; + if (currwin.shrinkfactor > 1) + bak_shrink = currwin.shrinkfactor; + mane.shrinkfactor = currwin.shrinkfactor; init_page(); set_wh_args[0].value = (XtArgVal) page_w; set_wh_args[1].value = (XtArgVal) page_h; @@ -3085,15 +3146,15 @@ if (!(flag & HeightValue)) window_h = screen_h; - if (shrink_factor == 0) { + if (currwin.shrinkfactor == 0) { /* compute best shrink factor based on window_w and window_h */ - shrink_factor = ROUNDUP(unshrunk_page_w, window_w - 2); + currwin.shrinkfactor = ROUNDUP(unshrunk_page_w, window_w - 2); i = ROUNDUP(unshrunk_page_h, window_h - 2); - if (i >= shrink_factor) - shrink_factor = i; - if (shrink_factor > 1) - bak_shrink = shrink_factor; - mane.shrinkfactor = shrink_factor; + if (i >= currwin.shrinkfactor) + currwin.shrinkfactor = i; + if (currwin.shrinkfactor > 1) + bak_shrink = currwin.shrinkfactor; + mane.shrinkfactor = currwin.shrinkfactor; init_page(); } @@ -3210,6 +3271,7 @@ XSelectInput(DISP, top_level, KeyPressMask | StructureNotifyMask | PropertyChangeMask); + /* ... and off we go! */ XMapWindow(DISP, top_level); XFlush(DISP); diff -Naur xdvik-22.40o/texk/xdvik/xdvi.h xdvik-22.40p/texk/xdvik/xdvi.h --- xdvik-22.40o/texk/xdvik/xdvi.h Tue Oct 15 22:48:32 2002 +++ xdvik-22.40p/texk/xdvik/xdvi.h Wed Oct 30 02:29:34 2002 @@ -43,6 +43,7 @@ the kpathsea settings for header compatiblility. */ #include "kpathsea/c-auto.h" #include "kpathsea/config.h" +#include "kpathsea/hash.h" /* access to the hash functions */ #ifdef __hpux /* On HP-UX 10.10 B and 20.10, compiling with _XOPEN_SOURCE + ..._EXTENDED @@ -69,6 +70,9 @@ #define _ALL_SOURCE 1 #endif +/* just a kludge, no real portability here ... */ +#define DIR_SEPARATOR '/' + #if 0 // FIXME: not in xdvi #ifdef __linux /* needed only for kernel versions 2.1.xxx -- 2.2.8 */ // FIXME: not in xdvi #define FLAKY_SIGPOLL 1 @@ -91,6 +95,14 @@ # endif #endif +/* in case stdlib.h doesn't define these ... */ +#ifndef EXIT_SUCCESS +#define EXIT_SUCCESS 0 +#endif +#ifndef EXIT_FAILURE +#define EXIT_FAILURE 1 +#endif + /* Avoid name clashes with kpathsea. */ #define xfopen xdvi_xfopen @@ -321,12 +333,12 @@ /* * pixel_conv is currently used only for converting absolute positions * to pixel values; although normally it should be - * ((int) ((x) / shrink_factor + (1 << 15) >> 16)), + * ((int) ((x) / currwin.shrinkfactor + (1 << 15) >> 16)), * the rounding is achieved instead by moving the constant 1 << 15 to * PAGE_OFFSET in dvi-draw.c. */ -#define pixel_conv(x) ((int) ((x) / shrink_factor >> 16)) -#define pixel_round(x) ((int) ROUNDUP(x, shrink_factor << 16)) +#define pixel_conv(x) ((int) ((x) / currwin.shrinkfactor >> 16)) +#define pixel_round(x) ((int) ROUNDUP(x, currwin.shrinkfactor << 16)) #define spell_conv0(n, f) ((long) (n * f)) #define spell_conv(n) spell_conv0(n, dimconv) @@ -341,9 +353,9 @@ /* * added SU: * when magnifier is active, mane.shrinkfactor is still the shrinkfactor of the - * main window, while shrink_factor is the shrinkfactor of the magnifier. + * main window, while currwin.shrinkfactor is the shrinkfactor of the magnifier. */ -#define MAGNIFIER_ACTIVE (mane.shrinkfactor != shrink_factor) +#define MAGNIFIER_ACTIVE (mane.shrinkfactor != currwin.shrinkfactor) struct frame { /* dvi_h and dvi_v is the horizontal and vertical baseline position; @@ -682,6 +694,8 @@ char * _help_othercommands; char * _help_pagemotion_menulabel; char * _help_pagemotion; + char * _help_mousebuttons_menulabel; + char * _help_mousebuttons; char * _help_sourcespecials_menulabel; char * _help_sourcespecials; } resource; @@ -774,6 +788,7 @@ #define TRACE_CLIENT(X) /* as nothing */ #define TRACE_T1(X) /* as nothing */ #define TRACE_T1_VERBOSE(X) /* as nothing */ +#define TRACE_GUI(X) #else #define TRACE_SRC(X) \ do { \ @@ -807,6 +822,14 @@ fprintf(stderr, "\n"); \ } \ } while(0) +#define TRACE_GUI(X) \ + do { \ + if (debug & DBG_EVENT) { /* in HEAD we have DBG_GUI for this ...) */ \ + fprintf(stderr, "%s:%d: GUI: ", __FILE__, __LINE__); \ + fprintf X; \ + fprintf(stderr, "\n"); \ + } \ + } while(0) #endif EXTERN int offset_x, offset_y; @@ -893,8 +916,6 @@ extern struct WindowRec mane, alt, currwin; EXTERN int min_x, max_x, min_y, max_y; -#define shrink_factor currwin.shrinkfactor - #ifdef TOOLKIT EXTERN Widget top_level INIT(0); EXTERN Widget vport_widget, draw_widget, clip_widget; @@ -1003,6 +1024,7 @@ extern void fork_process ARGS((_Xconst char *file, char *_Xconst argv[])); extern void print_child_error ARGS((void)); +extern int get_avg_font_width(XFontStruct *font); #ifdef BUTTONS extern void create_buttons ARGS((void)); @@ -1074,7 +1096,7 @@ extern void form_dvi_property ARGS((void)); extern void init_dvi_file ARGS((void)); extern void set_dvi_property ARGS((void)); -extern Boolean dvi_file_changed ARGS((void)); +extern int dvi_file_changed ARGS((void)); #ifdef GRID extern void put_grid ARGS((int, int, unsigned int, unsigned int, unsigned int, GC)); #endif /* GRID */ @@ -1260,5 +1282,22 @@ #define stwo(fp) snum(fp, 2) #define four(fp) num (fp, 4) #define sfour(fp) snum(fp, 4) +/* + hashtable wrapper functions, mostly used by dvi-draw.c to + map filenames to integers. This uses the hashtable implementation + from kpathsea, which is reasonably fast. +*/ + +/* + We use this dummy wrapper stuct, which we cast to void *, to get integer + values into/from the hashtable (natively, kpahtsea only supports string + values). +*/ +struct str_int_hash_item { + int value; +}; + +extern Boolean find_str_int_hash(hash_table_type *hashtable, const char *key, int *val); +void put_str_int_hash(hash_table_type *hashtable, const char *key, int val); #endif /* XDVI_H */ diff -Naur xdvik-22.40o/texk/xdvik/xdvi.man xdvik-22.40p/texk/xdvik/xdvi.man --- xdvik-22.40o/texk/xdvik/xdvi.man Sun Oct 13 21:03:11 2002 +++ xdvik-22.40p/texk/xdvik/xdvi.man Wed Oct 23 21:43:37 2002 @@ -1537,17 +1537,34 @@ in wheel units; otherwise, pixels. #ifhyper .SH HYPERLINKS -The mouse actions +Usually, if a binding specifies more then one action, all actions +are executed in a sequence. The hyperlink bindings .B do-href() and -.BR do-href-newwindow() -are special in that they override other actions specified for the same -button if the mouse is located over a hyperlink. Hyperlinks are underlined -by default. When the cursor is over a hyperlink, it changes to a hand -shape, and the link target is displayed in the statusline at the bottom of the window. -.pp -The default setting is to override the -magnifier for buttons 1 and 2: +.B do-href-newwindow() +are special in that they are used as an +.I alternative +to other actions that might follow them +.I if +the mouse is currently located on a hyperlink. +In this case, none of the other actions will be executed. +Otherwise, +.I only +the other actions are executed. +The action +.B do-href() +jumps to the link target in the current xdvi +window (possibly changing the page), and +.B do-href-newwindow() +opens a new instance of xdvi +with the link target. In both cases, the location of the target is +indicated by a small arrow drawn in +.highlight +color +in the left corner of the window. +.PP +As an example, consider the following settings, which are the default +settings for buttons 1 and 2: .RS 5 .nf .ft 3 @@ -1561,18 +1578,12 @@ .fi .RE .PP -.B do-href() -jumps to the link target in the current xdvi -window (possibly changing the page), -.B do-href-newwindow() -opens a new instance of xdvi -with the link target. In both cases, the location of the target is -indicated by a small arrow drawn in -.highlight -color -in the left corner of the window. +The fact that the mouse is located over a hyperlink is indicated by +(a) changing the pointer to a hand shape, and (b) displaying the link +target in the statusline at the bottom of the window. .PP -For links to files other than DVI (e.g. HTML, or PostScript), the files +If a link points to a file which is not a DVI file (e.g. HTML, or +PostScript), the files .B mime.types and .B mailcap diff -Naur xdvik-22.40o/texk/xdvik/xserver-info.c xdvik-22.40p/texk/xdvik/xserver-info.c --- xdvik-22.40o/texk/xdvik/xserver-info.c Thu Jan 1 00:00:00 1970 +++ xdvik-22.40p/texk/xdvik/xserver-info.c Thu Oct 31 00:10:50 2002 @@ -0,0 +1,279 @@ +/* Xserver debugging functions, lifted from X11 R6.6's xdpyinfo.c. + Original copyright follows: +*/ + +/* +Copyright 1988, 1998 The Open Group + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from The Open Group. + * + * Author: Jim Fulton, MIT X Consortium + */ + +#include "xdvi.h" +#include "xserver-info.h" + +#ifdef XSERVER_INFO + +static void +print_display_info (dpy) + Display *dpy; +{ + char dummybuf[40]; + char *cp; + int minkeycode, maxkeycode; + int i, n; + long req_size; + XPixmapFormatValues *pmf; + Window focuswin; + int focusrevert; + + printf ("name of display: %s\n", DisplayString (dpy)); + printf ("version number: %d.%d\n", + ProtocolVersion (dpy), ProtocolRevision (dpy)); + printf ("vendor string: %s\n", ServerVendor (dpy)); + printf ("vendor release number: %d\n", VendorRelease (dpy)); + req_size = XExtendedMaxRequestSize (dpy); + if (!req_size) req_size = XMaxRequestSize (dpy); + printf ("maximum request size: %ld bytes\n", req_size * 4); + printf ("motion buffer size: %lu\n", XDisplayMotionBufferSize (dpy)); + + switch (BitmapBitOrder (dpy)) { + case LSBFirst: cp = "LSBFirst"; break; + case MSBFirst: cp = "MSBFirst"; break; + default: + sprintf (dummybuf, "unknown order %d", BitmapBitOrder (dpy)); + cp = dummybuf; + break; + } + printf ("bitmap unit, bit order, padding: %d, %s, %d\n", + BitmapUnit (dpy), cp, BitmapPad (dpy)); + + switch (ImageByteOrder (dpy)) { + case LSBFirst: cp = "LSBFirst"; break; + case MSBFirst: cp = "MSBFirst"; break; + default: + sprintf (dummybuf, "unknown order %d", ImageByteOrder (dpy)); + cp = dummybuf; + break; + } + printf ("image byte order: %s\n", cp); + + pmf = XListPixmapFormats (dpy, &n); + printf ("number of supported pixmap formats: %d\n", n); + if (pmf) { + printf ("supported pixmap formats:\n"); + for (i = 0; i < n; i++) { + printf (" depth %d, bits_per_pixel %d, scanline_pad %d\n", + pmf[i].depth, pmf[i].bits_per_pixel, pmf[i].scanline_pad); + } + XFree ((char *) pmf); + } + + + /* + * when we get interfaces to the PixmapFormat stuff, insert code here + */ + + XDisplayKeycodes (dpy, &minkeycode, &maxkeycode); + printf ("keycode range: minimum %d, maximum %d\n", + minkeycode, maxkeycode); + + XGetInputFocus (dpy, &focuswin, &focusrevert); + printf ("focus: "); + switch (focuswin) { + case PointerRoot: + printf ("PointerRoot\n"); + break; + case None: + printf ("None\n"); + break; + default: + printf("window 0x%lx, revert to ", focuswin); + switch (focusrevert) { + case RevertToParent: + printf ("Parent\n"); + break; + case RevertToNone: + printf ("None\n"); + break; + case RevertToPointerRoot: + printf ("PointerRoot\n"); + break; + default: /* should not happen */ + printf ("%d\n", focusrevert); + break; + } + break; + } + +/* print_extension_info (dpy); */ + + printf ("default screen number: %d\n", DefaultScreen (dpy)); + printf ("number of screens: %d\n", ScreenCount (dpy)); +} + +static void +print_visual_info (vip) + XVisualInfo *vip; +{ + char errorbuf[40]; /* for sprintfing into */ + char *class = NULL; /* for printing */ + + switch (vip->class) { + case StaticGray: class = "StaticGray"; break; + case GrayScale: class = "GrayScale"; break; + case StaticColor: class = "StaticColor"; break; + case PseudoColor: class = "PseudoColor"; break; + case TrueColor: class = "TrueColor"; break; + case DirectColor: class = "DirectColor"; break; + default: + sprintf (errorbuf, "unknown class %d", vip->class); + class = errorbuf; + break; + } + + printf (" visual:\n"); + printf (" visual id: 0x%lx\n", vip->visualid); + printf (" class: %s\n", class); + printf (" depth: %d plane%s\n", vip->depth, + vip->depth == 1 ? "" : "s"); + if (vip->class == TrueColor || vip->class == DirectColor) + printf (" available colormap entries: %d per subfield\n", + vip->colormap_size); + else + printf (" available colormap entries: %d\n", + vip->colormap_size); + printf (" red, green, blue masks: 0x%lx, 0x%lx, 0x%lx\n", + vip->red_mask, vip->green_mask, vip->blue_mask); + printf (" significant bits in color specification: %d bits\n", + vip->bits_per_rgb); +} + +static void +print_screen_info (dpy, scr) + Display *dpy; + int scr; +{ + Screen *s = ScreenOfDisplay (dpy, scr); /* opaque structure */ + XVisualInfo viproto; /* fill in for getting info */ + XVisualInfo *vip; /* retured info */ + int nvi; /* number of elements returned */ + int i; /* temp variable: iterator */ + /* char eventbuf[80]; */ /* want 79 chars per line + nul */ + static char *yes = "YES", *no = "NO", *when = "WHEN MAPPED"; + double xres, yres; + int ndepths = 0, *depths = NULL; + unsigned int width, height; + + + /* + * there are 2.54 centimeters to an inch; so there are 25.4 millimeters. + * + * dpi = N pixels / (M millimeters / (25.4 millimeters / 1 inch)) + * = N pixels / (M inch / 25.4) + * = N * 25.4 pixels / M inch + */ + + xres = ((((double) DisplayWidth(dpy,scr)) * 25.4) / + ((double) DisplayWidthMM(dpy,scr))); + yres = ((((double) DisplayHeight(dpy,scr)) * 25.4) / + ((double) DisplayHeightMM(dpy,scr))); + + printf ("\n"); + printf ("screen #%d:\n", scr); + printf (" dimensions: %dx%d pixels (%dx%d millimeters)\n", + DisplayWidth (dpy, scr), DisplayHeight (dpy, scr), + DisplayWidthMM(dpy, scr), DisplayHeightMM (dpy, scr)); + printf (" resolution: %dx%d dots per inch\n", + (int) (xres + 0.5), (int) (yres + 0.5)); + depths = XListDepths (dpy, scr, &ndepths); + if (!depths) ndepths = 0; + printf (" depths (%d): ", ndepths); + for (i = 0; i < ndepths; i++) { + printf ("%d", depths[i]); + if (i < ndepths - 1) { + putchar (','); + putchar (' '); + } + } + putchar ('\n'); + if (depths) XFree ((char *) depths); + printf (" root window id: 0x%lx\n", RootWindow (dpy, scr)); + printf (" depth of root window: %d plane%s\n", + DisplayPlanes (dpy, scr), + DisplayPlanes (dpy, scr) == 1 ? "" : "s"); + printf (" number of colormaps: minimum %d, maximum %d\n", + MinCmapsOfScreen(s), MaxCmapsOfScreen(s)); + printf (" default colormap: 0x%lx\n", DefaultColormap (dpy, scr)); + printf (" default number of colormap cells: %d\n", + DisplayCells (dpy, scr)); + printf (" preallocated pixels: black %lu, white %lu\n", + BlackPixel (dpy, scr), WhitePixel (dpy, scr)); + printf (" options: backing-store %s, save-unders %s\n", + (DoesBackingStore (s) == NotUseful) ? no : + ((DoesBackingStore (s) == Always) ? yes : when), + DoesSaveUnders (s) ? yes : no); + XQueryBestSize (dpy, CursorShape, RootWindow (dpy, scr), 65535, 65535, + &width, &height); + if (width == 65535 && height == 65535) + printf (" largest cursor: unlimited\n"); + else + printf (" largest cursor: %dx%d\n", width, height); + printf (" current input event mask: 0x%lx\n", EventMaskOfScreen (s)); +/* (void) print_event_mask (eventbuf, 79, 4, EventMaskOfScreen (s)); */ + + + nvi = 0; + viproto.screen = scr; + vip = XGetVisualInfo (dpy, VisualScreenMask, &viproto, &nvi); + printf (" number of visuals: %d\n", nvi); + printf (" default visual id: 0x%lx\n", + XVisualIDFromVisual (DefaultVisual (dpy, scr))); + for (i = 0; i < nvi; i++) { + print_visual_info (vip+i); + } + if (vip) XFree ((char *) vip); +} + + +/* + public function: when DBG_ALL is enabled, dump info on Xserver + to stdout. +*/ +void +print_xserver_info(void) +{ + int i; + if (debug & DBG_PK) { + puts("========== Xserver properties info begin ==========\n"); + print_display_info(DISP); + for (i = 0; i < ScreenCount(DISP); i++) { + print_screen_info(DISP, i); + } + puts("========== Xserver properties info end ==========\n"); + } +} + + +#else +int ___xserver_info; /* avoid empty compilation unit warning */ +#endif /* XSERVER_INFO */ diff -Naur xdvik-22.40o/texk/xdvik/xserver-info.h xdvik-22.40p/texk/xdvik/xserver-info.h --- xdvik-22.40o/texk/xdvik/xserver-info.h Thu Jan 1 00:00:00 1970 +++ xdvik-22.40p/texk/xdvik/xserver-info.h Fri Oct 18 23:14:43 2002 @@ -0,0 +1,10 @@ +#ifndef XSERVER_INFO_H +#define XSERVER_INFO_H + +#ifdef XSERVER_INFO + +extern void print_xserver_info(void); + +#endif /* XSERVER_INFO */ + +#endif /* XSERVER_INFO_H */