http://ftp.x.org/contrib/applications/xscreensaver-2.24.tar.gz
authorZygo Blaxell <zblaxell@hungrycats.org>
Mon, 2 Mar 2009 05:42:26 +0000 (00:42 -0500)
committerZygo Blaxell <zblaxell@hungrycats.org>
Mon, 2 Mar 2009 05:42:26 +0000 (00:42 -0500)
-rw-r--r-- 1 zblaxell zblaxell 831651 Jun 29  1998 xscreensaver-2.24.tar.gz
86886653f4dd4c68bf76ca07320d5bad513f5c43  xscreensaver-2.24.tar.gz

36 files changed:
Makefile.in
README
README.debugging
configure
configure.in
driver/Makefile.in
driver/XScreenSaver.ad.in
driver/XScreenSaver_ad.h
driver/demo.c
driver/dialogs-Xaw.c
driver/lock.c
driver/stderr.c
driver/subprocs.c
driver/timers.c
driver/windows.c
driver/xscreensaver-command.man
driver/xscreensaver.c
driver/xscreensaver.h
driver/xscreensaver.man
driver/xset.c
hacks/Makefile.in
hacks/bubbles.c
hacks/compile_axp.com
hacks/compile_decc.com
hacks/distort.c [new file with mode: 0644]
hacks/kumppa.c [new file with mode: 0644]
hacks/maze.c
hacks/maze.man
hacks/vidwhacker
setup.com
utils/Makefile.in
utils/grabscreen.c
utils/version.h
utils/visual.c
utils/visual.h
xscreensaver.lsm

index 4985d506e1cff5f1ddba024ad29d87c32d4997ba..8638d53606ced959873206d1be0a69b289b7be47 100644 (file)
@@ -53,8 +53,10 @@ dist: tar
 
 # This really makes me sick...
 tar:
-       @$(MAKE) distdepend ;                                               \
+       @                                                                   \
   sh config.status ;                                                       \
+  $(MAKE) hack_configure ;                                                 \
+  $(MAKE) distdepend ;                                                     \
   sh xscreensaver.lsm.sh > xscreensaver.lsm.$$$$ ;                         \
   mv xscreensaver.lsm.$$$$ xscreensaver.lsm ;                              \
   NAME=`sed -n                                                             \
@@ -74,3 +76,46 @@ tar:
     `echo $(TARFILES) $$FILES | sed "s|^|$$NAME/|g; s| | $$NAME/|g" `      \
    | $(COMPRESS) > $${NAME}.tar.$(COMPRESS_EXT) ;                          \
   rm $$NAME
+
+
+# This also makes me sick...
+# autoconf generates a configure script that begins with a very hard to read,
+# nearly impossible to customize --help blurb.  This horrid set of regexps
+# go through and clean up the help text, by inserting whitespace and ripping
+# out options we don't use.  Odds are good that this will fail with any version
+# of autoconf other than 2.12.
+#
+hack_configure::
+       autoconf
+       @TMP=configure.$$$$ ;                                                \
+       echo "munging configure's --help message..." ;                       \
+       ( perl -e '                                                          \
+               my $$file="";                                                \
+               while (<>) { $$file .= $$_; }                                \
+               $$_ = $$file;                                                \
+                                                                            \
+               s/^(Configuration:)$$/\n$$1\n/m;                             \
+               s/^(Directory and file names:)$$/\n$$1\n/m;                  \
+               s/^  --sbindir=.*\n//m;                                      \
+               s/^  --libexecdir.*\n//m;                                    \
+               s/^  --datadir.*\n.*\n//m;                                   \
+               s/^  --sysconfdir.*\n//m;                                    \
+               s/^  --sharedstatedir.*\n.*\n//m;                            \
+               s/^  --localstatedir.*\n//m;                                 \
+               s/^  --infodir.*\n//m;                                       \
+               s/^(Host type:)$$/\n$$1\n/m;                                 \
+               s/\nFeatures and packages:\n.*library files are in DIR\n/\n/s;\
+               s/--enable and --with options recognized://m;                \
+               s/\n  --with-x .*?(["\n])/$$1/s;                             \
+               s/\n(Installation options:\n)/$$1/s;                         \
+               s/\n(X Server Extension options:\n)/$$1/s;                   \
+                                                                            \
+               s/^  --oldincludedir=.*$$/ \
+ --x-includes=DIR        X include files are in DIR\n \
+ --x-libraries=DIR       X library files are in DIR/m; \
+                                                                            \
+               print;'                                                      \
+       < configure                                                          \
+       > $$TMP &&                                                           \
+       cat $$TMP > configure ) ;                                            \
+       rm -f $$TMP
diff --git a/README b/README
index 060af05c8c648387de4d6c259482f4f24069b6ce..e024874ef01194d3b0caef3e539ebd1021444b01 100644 (file)
--- a/README
+++ b/README
@@ -145,6 +145,8 @@ window, which are pointed at by the screensaver's default resource settings.
    bsod                - Simulates the system crashes of various other OSes.
    crystal     - A kaleidoscope of moving polygons.
    discrete    - Various fractal-ish "discrete map" forms.
+   distort     - A moving lens wanders around the screen, magnifying it.
+   kumppa      - Spinning 3D color fields, kinda.
    gears       - Draws interlocking rotating gears (GLX only.)
    morph3d     - Draws shiny shape-changing 3d forms (GLX only.)
    superquadrics - More shiny shape-changing 3d forms (GLX only.)
@@ -187,6 +189,22 @@ http://people.netscape.com/jwz/xscreensaver/.
        -- Jamie Zawinski <jwz@netscape.com>
 
 \f
+Changes since 2.23:   * Tweaked the order of the -L options again.
+                     * Cleaned up configure's --help message.
+                     * Added `kumppa' hack.
+                     * Smarter maze-solving algorithm in `maze'.
+                     * Took `xlyap' out of the default list of hacks, since
+                       it's just incredibly buggy (and slow.)  Maybe someday
+                       someone will fix it...
+                     * Added `distort' hack, but didn't add it to the default
+                       list (yet) because it's still too slow.
+                     * Made the Athena demo dialog look more like the Motif
+                       version; it has a text-entry field now, too.
+                     * Made the Athena password dialog echo asterisks, like
+                       Motif does, instead of using a flyspeck font.
+                     * Some random configure tweaks.
+                     * Added a `timestamp' resource that makes the `-verbose'
+                       messages include the time at which they were printed.
 Changes since 2.22:   * The fix for SGI's "scheme" nonsense broke things, and
                        let the user's "*background" resource show through.
                        Fixed it in a different way.
index f1a26220abf91b63d8916b3abac7851035a1d1cd..b7e7fe0bb6bd554dc0d7e9c7e9bffdc9be946bba 100644 (file)
@@ -128,6 +128,10 @@ RUNNING:
            prevent the data from being displayed on the screensaver
            window as well.
 
+           You also might want to set the "*timestamp" resource to True, which
+           will cause the xscreensaver messages to include the time at which
+           they were printed.
+
         *  If the problem is intermittent, you might want to capture the
            log information to a file and examine it later.
 
index c983155e048aee8e2fb74053475f607088465f3d..88a0de6570453ecc62753edfdf1f39e64ca3a7ed 100755 (executable)
--- a/configure
+++ b/configure
@@ -12,7 +12,6 @@ ac_help=
 ac_default_prefix=/usr/local
 # Any additions from configure.in:
 ac_help="$ac_help
-
 Installation options:
 
   --enable-subdir=DIR     Put the demo programs in a subdirectory of \`bindir',
@@ -20,19 +19,14 @@ Installation options:
                           specify the name of the subdirectory.  For example,
                           --exec-prefix=/usr/local/bin --enable-subdir=demos
                           would put xscreensaver in /usr/local/bin/, and would
-                          put the demos in /usr/local/bin/demos/.  Note that if
-                          you do this, you must make sure that the directory
-                          is on your \$PATH before xscreensaver is started: the
-                          directory name is not hardcoded into the program.
-                          This merely sets the default installation location.
+                          put the demos in /usr/local/bin/demos/.  (If DIR
+                          begins with /, then bindir will not be prepended.)
 
   --disable-subdir        Just put the demos in \`bindir' (this is the default.)
 "
+ac_help="$ac_help"
 ac_help="$ac_help
-  --with-x                use the X Window System"
-ac_help="$ac_help
-
-Server options:
+X Server Extension options:
 
   --with-sgi-ext          Include support for the SGI SCREEN_SAVER
                           server extension, if possible (this is the default).
@@ -59,7 +53,7 @@ ac_help="$ac_help
   --without-dpms-ext      Do not compile in support for this extension."
 ac_help="$ac_help
 
-Toolkit options:
+X Client Toolkit options:
 
   --with-motif            Use the Motif toolkit for the user interface,
                           if possible (this is the default).
@@ -70,7 +64,7 @@ ac_help="$ac_help
   --without-athena        Do not use Athena."
 ac_help="$ac_help
 
-Demo options:
+Graphics Demo options:
 
   --with-xpm              Include support for XPM files in some demos,
                           if possible (this is the default).
@@ -96,7 +90,7 @@ ac_help="$ac_help
                           have it) or else to use \"fortune\"."
 ac_help="$ac_help
 
-Locking options:
+Screen Locking options:
 
   --enable-locking        Compile in support for locking the display
                           (this is the default.)
@@ -236,30 +230,26 @@ do
     cat << EOF
 Usage: configure [options] [host]
 Options: [defaults in brackets after descriptions]
+
 Configuration:
+
   --cache-file=FILE       cache test results in FILE
   --help                  print this message
   --no-create             do not create output files
   --quiet, --silent       do not print \`checking...' messages
   --version               print the version of autoconf that created configure
+
 Directory and file names:
+
   --prefix=PREFIX         install architecture-independent files in PREFIX
                           [$ac_default_prefix]
   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
                           [same as prefix]
   --bindir=DIR            user executables in DIR [EPREFIX/bin]
-  --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
-  --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
-  --datadir=DIR           read-only architecture-independent data in DIR
-                          [PREFIX/share]
-  --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
-  --sharedstatedir=DIR    modifiable architecture-independent data in DIR
-                          [PREFIX/com]
-  --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
   --includedir=DIR        C header files in DIR [PREFIX/include]
-  --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
-  --infodir=DIR           info documentation in DIR [PREFIX/info]
+  --x-includes=DIR        X include files are in DIR
+  --x-libraries=DIR       X library files are in DIR
   --mandir=DIR            man documentation in DIR [PREFIX/man]
   --srcdir=DIR            find the sources in DIR [configure dir or ..]
   --program-prefix=PREFIX prepend PREFIX to installed program names
@@ -268,20 +258,15 @@ Directory and file names:
                           run sed PROGRAM on installed program names
 EOF
     cat << EOF
+
 Host type:
+
   --build=BUILD           configure for building on BUILD [BUILD=HOST]
   --host=HOST             configure for HOST [guessed]
   --target=TARGET         configure for TARGET [TARGET=HOST]
-Features and packages:
-  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
-  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
-  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
-  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
-  --x-includes=DIR        X include files are in DIR
-  --x-libraries=DIR       X library files are in DIR
 EOF
     if test -n "$ac_help"; then
-      echo "--enable and --with options recognized:$ac_help"
+      echo "$ac_help"
     fi
     exit 0 ;;
 
@@ -645,7 +630,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
 fi
 
 echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:649: checking host system type" >&5
+echo "configure:646: checking host system type" >&5
 
 host_alias=$host
 case "$host_alias" in
@@ -669,7 +654,7 @@ echo "$ac_t""$host" 1>&6
 # 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:673: checking for $ac_word" >&5
+echo "configure:670: 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
@@ -698,7 +683,7 @@ if test -z "$CC"; then
   # Extract the first word of "cc", so it can be a program name with args.
 set dummy cc; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:702: checking for $ac_word" >&5
+echo "configure:699: 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
@@ -746,7 +731,7 @@ fi
 fi
 
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:750: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:747: 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.
@@ -756,11 +741,11 @@ ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS
 cross_compiling=$ac_cv_prog_cc_cross
 
 cat > conftest.$ac_ext <<EOF
-#line 760 "configure"
+#line 757 "configure"
 #include "confdefs.h"
 main(){return(0);}
 EOF
-if { (eval echo configure:764: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:761: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
@@ -780,12 +765,12 @@ if test $ac_cv_prog_cc_works = no; then
   { 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:784: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:781: 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:789: checking whether we are using GNU C" >&5
+echo "configure:786: 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
@@ -794,7 +779,7 @@ else
   yes;
 #endif
 EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:798: \"$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:795: \"$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
@@ -809,7 +794,7 @@ if test $ac_cv_prog_gcc = yes; then
   ac_save_CFLAGS="$CFLAGS"
   CFLAGS=
   echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:813: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:810: 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
@@ -839,7 +824,7 @@ fi
 
 if test -z "$GCC"; then
   echo $ac_n "checking how to request ANSI compilation""... $ac_c" 1>&6
-echo "configure:843: checking how to request ANSI compilation" >&5
+echo "configure:840: checking how to request ANSI compilation" >&5
   case "$host" in
     *-hpux*)
       echo "$ac_t""HPUX: adding -Ae" 1>&6
@@ -861,16 +846,16 @@ fi
 
 
 echo $ac_n "checking whether the compiler works on ANSI C""... $ac_c" 1>&6
-echo "configure:865: checking whether the compiler works on ANSI C" >&5
+echo "configure:862: checking whether the compiler works on ANSI C" >&5
 if test "$cross_compiling" = yes; then
   { echo "configure: error: Couldn't build even a trivial ANSI C program: check CC." 1>&2; exit 1; }
 else
   cat > conftest.$ac_ext <<EOF
-#line 870 "configure"
+#line 867 "configure"
 #include "confdefs.h"
  main(int ac, char **av) { return 0; } 
 EOF
-if { (eval echo configure:874: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:871: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
 then
   echo "$ac_t""yes" 1>&6
 else
@@ -899,7 +884,7 @@ esac
 
 
 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:903: checking how to run the C preprocessor" >&5
+echo "configure:900: checking how to run the C preprocessor" >&5
 # On Suns, sometimes $CPP names a directory.
 if test -n "$CPP" && test -d "$CPP"; then
   CPP=
@@ -914,13 +899,13 @@ else
   # On the NeXT, cc -E runs the code through the compiler's parser,
   # not just through cpp.
   cat > conftest.$ac_ext <<EOF
-#line 918 "configure"
+#line 915 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:924: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:921: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   :
@@ -931,13 +916,13 @@ else
   rm -rf conftest*
   CPP="${CC-cc} -E -traditional-cpp"
   cat > conftest.$ac_ext <<EOF
-#line 935 "configure"
+#line 932 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:941: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:938: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   :
@@ -970,7 +955,7 @@ echo "$ac_t""$CPP" 1>&6
 # 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:974: checking for a BSD compatible install" >&5
+echo "configure:971: 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
@@ -1020,7 +1005,7 @@ test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
 
 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:1024: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "configure:1021: 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
@@ -1048,12 +1033,12 @@ fi
 
 
 echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:1052: checking for working const" >&5
+echo "configure:1049: checking for working const" >&5
 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1057 "configure"
+#line 1054 "configure"
 #include "confdefs.h"
 
 int main() {
@@ -1102,7 +1087,7 @@ ccp = (char const *const *) p;
 
 ; return 0; }
 EOF
-if { (eval echo configure:1106: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1103: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_const=yes
 else
@@ -1123,21 +1108,21 @@ EOF
 fi
 
 echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:1127: checking for inline" >&5
+echo "configure:1124: checking for inline" >&5
 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   ac_cv_c_inline=no
 for ac_kw in inline __inline__ __inline; do
   cat > conftest.$ac_ext <<EOF
-#line 1134 "configure"
+#line 1131 "configure"
 #include "confdefs.h"
 
 int main() {
 } $ac_kw foo() {
 ; return 0; }
 EOF
-if { (eval echo configure:1141: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1138: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_inline=$ac_kw; break
 else
@@ -1164,12 +1149,12 @@ esac
 
 
 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:1168: checking for ANSI C header files" >&5
+echo "configure:1165: 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 <<EOF
-#line 1173 "configure"
+#line 1170 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 #include <stdarg.h>
@@ -1177,7 +1162,7 @@ else
 #include <float.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1181: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1178: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -1194,7 +1179,7 @@ rm -f conftest*
 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
-#line 1198 "configure"
+#line 1195 "configure"
 #include "confdefs.h"
 #include <string.h>
 EOF
@@ -1212,7 +1197,7 @@ fi
 if test $ac_cv_header_stdc = yes; then
   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
-#line 1216 "configure"
+#line 1213 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 EOF
@@ -1233,7 +1218,7 @@ if test "$cross_compiling" = yes; then
   :
 else
   cat > conftest.$ac_ext <<EOF
-#line 1237 "configure"
+#line 1234 "configure"
 #include "confdefs.h"
 #include <ctype.h>
 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -1244,7 +1229,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
 exit (0); }
 
 EOF
-if { (eval echo configure:1248: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1245: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
 then
   :
 else
@@ -1268,12 +1253,12 @@ EOF
 fi
 
 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
-echo "configure:1272: checking whether time.h and sys/time.h may both be included" >&5
+echo "configure:1269: 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 <<EOF
-#line 1277 "configure"
+#line 1274 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/time.h>
@@ -1282,7 +1267,7 @@ int main() {
 struct tm *tp;
 ; return 0; }
 EOF
-if { (eval echo configure:1286: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1283: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_header_time=yes
 else
@@ -1303,12 +1288,12 @@ EOF
 fi
 
 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
-echo "configure:1307: checking for sys/wait.h that is POSIX.1 compatible" >&5
+echo "configure:1304: 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 <<EOF
-#line 1312 "configure"
+#line 1309 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/wait.h>
@@ -1324,7 +1309,7 @@ wait (&s);
 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
 ; return 0; }
 EOF
-if { (eval echo configure:1328: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1325: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_header_sys_wait_h=yes
 else
@@ -1349,12 +1334,12 @@ for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
-echo "configure:1353: checking for $ac_hdr that defines DIR" >&5
+echo "configure:1350: checking for $ac_hdr that defines DIR" >&5
 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1358 "configure"
+#line 1355 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <$ac_hdr>
@@ -1362,7 +1347,7 @@ int main() {
 DIR *dirp = 0;
 ; return 0; }
 EOF
-if { (eval echo configure:1366: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1363: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   eval "ac_cv_header_dirent_$ac_safe=yes"
 else
@@ -1387,7 +1372,7 @@ done
 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
 if test $ac_header_dirent = dirent.h; then
 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
-echo "configure:1391: checking for opendir in -ldir" >&5
+echo "configure:1388: checking for opendir in -ldir" >&5
 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1395,7 +1380,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-ldir  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1399 "configure"
+#line 1396 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -1406,7 +1391,7 @@ int main() {
 opendir()
 ; return 0; }
 EOF
-if { (eval echo configure:1410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:1407: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -1428,7 +1413,7 @@ fi
 
 else
 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
-echo "configure:1432: checking for opendir in -lx" >&5
+echo "configure:1429: checking for opendir in -lx" >&5
 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1436,7 +1421,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lx  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1440 "configure"
+#line 1437 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -1447,7 +1432,7 @@ int main() {
 opendir()
 ; return 0; }
 EOF
-if { (eval echo configure:1451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:1448: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -1471,12 +1456,12 @@ fi
 
 
 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
-echo "configure:1475: checking for mode_t" >&5
+echo "configure:1472: checking for mode_t" >&5
 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1480 "configure"
+#line 1477 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -1504,12 +1489,12 @@ EOF
 fi
 
 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
-echo "configure:1508: checking for pid_t" >&5
+echo "configure:1505: 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 <<EOF
-#line 1513 "configure"
+#line 1510 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -1537,12 +1522,12 @@ EOF
 fi
 
 echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:1541: checking for size_t" >&5
+echo "configure:1538: 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 <<EOF
-#line 1546 "configure"
+#line 1543 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -1570,12 +1555,12 @@ EOF
 fi
 
 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
-echo "configure:1574: checking return type of signal handlers" >&5
+echo "configure:1571: 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 <<EOF
-#line 1579 "configure"
+#line 1576 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <signal.h>
@@ -1592,7 +1577,7 @@ int main() {
 int i;
 ; return 0; }
 EOF
-if { (eval echo configure:1596: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1593: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_type_signal=void
 else
@@ -1612,12 +1597,12 @@ EOF
 
 
 echo $ac_n "checking how to call gettimeofday""... $ac_c" 1>&6
-echo "configure:1616: checking how to call gettimeofday" >&5
+echo "configure:1613: checking how to call gettimeofday" >&5
 if eval "test \"`echo '$''{'ac_cv_gettimeofday_args'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1621 "configure"
+#line 1618 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
                  #include <sys/time.h>
@@ -1626,7 +1611,7 @@ struct timeval tv; struct timezone tzp;
                  gettimeofday(&tv, &tzp);
 ; return 0; }
 EOF
-if { (eval echo configure:1630: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1627: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_gettimeofday_args=2
 else
@@ -1634,7 +1619,7 @@ else
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   cat > conftest.$ac_ext <<EOF
-#line 1638 "configure"
+#line 1635 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
                                  #include <sys/time.h>
@@ -1642,7 +1627,7 @@ int main() {
 struct timeval tv; gettimeofday(&tv);
 ; return 0; }
 EOF
-if { (eval echo configure:1646: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1643: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_gettimeofday_args=1
 else
@@ -1682,12 +1667,12 @@ fi
 for ac_func in select fcntl uname nice setpriority getcwd getwd putenv
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1686: checking for $ac_func" >&5
+echo "configure:1683: 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 <<EOF
-#line 1691 "configure"
+#line 1688 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -1710,7 +1695,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:1714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:1711: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -1737,12 +1722,12 @@ done
 for ac_func in sigaction
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1741: checking for $ac_func" >&5
+echo "configure:1738: 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 <<EOF
-#line 1746 "configure"
+#line 1743 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -1765,7 +1750,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:1769: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:1766: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -1794,17 +1779,17 @@ for ac_hdr in unistd.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1798: checking for $ac_hdr" >&5
+echo "configure:1795: 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
-#line 1803 "configure"
+#line 1800 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1808: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1805: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -1863,7 +1848,7 @@ fi
 # 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:1867: checking for X" >&5
+echo "configure:1864: checking for X" >&5
 
 # Check whether --with-x or --without-x was given.
 if test "${with_x+set}" = set; then
@@ -1925,12 +1910,12 @@ if test "$ac_x_includes" = NO; then
 
   # First, try using that file with no special directory specified.
 cat > conftest.$ac_ext <<EOF
-#line 1929 "configure"
+#line 1926 "configure"
 #include "confdefs.h"
 #include <$x_direct_test_include>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1934: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1931: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -1999,14 +1984,14 @@ if test "$ac_x_libraries" = NO; then
   ac_save_LIBS="$LIBS"
   LIBS="-l$x_direct_test_library $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2003 "configure"
+#line 2000 "configure"
 #include "confdefs.h"
 
 int main() {
 ${x_direct_test_function}()
 ; return 0; }
 EOF
-if { (eval echo configure:2010: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2007: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   LIBS="$ac_save_LIBS"
 # We can link X programs with no special library path.
@@ -2112,17 +2097,17 @@ else
     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:2116: checking whether -R must be followed by a space" >&5
+echo "configure:2113: checking whether -R must be followed by a space" >&5
       ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
       cat > conftest.$ac_ext <<EOF
-#line 2119 "configure"
+#line 2116 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:2126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   ac_R_nospace=yes
 else
@@ -2138,14 +2123,14 @@ rm -f conftest*
       else
        LIBS="$ac_xsave_LIBS -R $x_libraries"
        cat > conftest.$ac_ext <<EOF
-#line 2142 "configure"
+#line 2139 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:2149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   ac_R_space=yes
 else
@@ -2177,7 +2162,7 @@ rm -f conftest*
     # 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:2181: checking for dnet_ntoa in -ldnet" >&5
+echo "configure:2178: 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
@@ -2185,7 +2170,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-ldnet  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2189 "configure"
+#line 2186 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -2196,7 +2181,7 @@ int main() {
 dnet_ntoa()
 ; return 0; }
 EOF
-if { (eval echo configure:2200: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2197: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2218,7 +2203,7 @@ fi
 
     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:2222: checking for dnet_ntoa in -ldnet_stub" >&5
+echo "configure:2219: 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
@@ -2226,7 +2211,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-ldnet_stub  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2230 "configure"
+#line 2227 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -2237,7 +2222,7 @@ int main() {
 dnet_ntoa()
 ; return 0; }
 EOF
-if { (eval echo configure:2241: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2266,12 +2251,12 @@ fi
     # 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:2270: checking for gethostbyname" >&5
+echo "configure:2267: 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 <<EOF
-#line 2275 "configure"
+#line 2272 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char gethostbyname(); below.  */
@@ -2294,7 +2279,7 @@ gethostbyname();
 
 ; return 0; }
 EOF
-if { (eval echo configure:2298: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2295: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_gethostbyname=yes"
 else
@@ -2315,7 +2300,7 @@ fi
 
     if test $ac_cv_func_gethostbyname = no; then
       echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
-echo "configure:2319: checking for gethostbyname in -lnsl" >&5
+echo "configure:2316: 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
@@ -2323,7 +2308,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lnsl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2327 "configure"
+#line 2324 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -2334,7 +2319,7 @@ int main() {
 gethostbyname()
 ; return 0; }
 EOF
-if { (eval echo configure:2338: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2335: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2364,12 +2349,12 @@ fi
     # -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:2368: checking for connect" >&5
+echo "configure:2365: 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 <<EOF
-#line 2373 "configure"
+#line 2370 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char connect(); below.  */
@@ -2392,7 +2377,7 @@ connect();
 
 ; return 0; }
 EOF
-if { (eval echo configure:2396: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_connect=yes"
 else
@@ -2413,7 +2398,7 @@ fi
 
     if test $ac_cv_func_connect = no; then
       echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
-echo "configure:2417: checking for connect in -lsocket" >&5
+echo "configure:2414: 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
@@ -2421,7 +2406,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2425 "configure"
+#line 2422 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -2432,7 +2417,7 @@ int main() {
 connect()
 ; return 0; }
 EOF
-if { (eval echo configure:2436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2433: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2456,12 +2441,12 @@ fi
 
     # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
     echo $ac_n "checking for remove""... $ac_c" 1>&6
-echo "configure:2460: checking for remove" >&5
+echo "configure:2457: 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 <<EOF
-#line 2465 "configure"
+#line 2462 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char remove(); below.  */
@@ -2484,7 +2469,7 @@ remove();
 
 ; return 0; }
 EOF
-if { (eval echo configure:2488: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2485: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_remove=yes"
 else
@@ -2505,7 +2490,7 @@ fi
 
     if test $ac_cv_func_remove = no; then
       echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
-echo "configure:2509: checking for remove in -lposix" >&5
+echo "configure:2506: 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
@@ -2513,7 +2498,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lposix  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2517 "configure"
+#line 2514 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -2524,7 +2509,7 @@ int main() {
 remove()
 ; return 0; }
 EOF
-if { (eval echo configure:2528: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2548,12 +2533,12 @@ fi
 
     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
     echo $ac_n "checking for shmat""... $ac_c" 1>&6
-echo "configure:2552: checking for shmat" >&5
+echo "configure:2549: 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 <<EOF
-#line 2557 "configure"
+#line 2554 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char shmat(); below.  */
@@ -2576,7 +2561,7 @@ shmat();
 
 ; return 0; }
 EOF
-if { (eval echo configure:2580: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2577: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_shmat=yes"
 else
@@ -2597,7 +2582,7 @@ fi
 
     if test $ac_cv_func_shmat = no; then
       echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
-echo "configure:2601: checking for shmat in -lipc" >&5
+echo "configure:2598: 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
@@ -2605,7 +2590,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lipc  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2609 "configure"
+#line 2606 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -2616,7 +2601,7 @@ int main() {
 shmat()
 ; return 0; }
 EOF
-if { (eval echo configure:2620: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2617: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2649,7 +2634,7 @@ fi
   # 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:2653: checking for IceConnectionNumber in -lICE" >&5
+echo "configure:2650: 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
@@ -2657,7 +2642,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lICE  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2661 "configure"
+#line 2658 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -2668,7 +2653,7 @@ int main() {
 IceConnectionNumber()
 ; return 0; }
 EOF
-if { (eval echo configure:2672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2669: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2705,7 +2690,7 @@ fi
 
 
     echo $ac_n "checking for X app-defaults directory""... $ac_c" 1>&6
-echo "configure:2709: checking for X app-defaults directory" >&5
+echo "configure:2706: checking for X app-defaults directory" >&5
 if eval "test \"`echo '$''{'ac_cv_x_app_defaults'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2725,7 +2710,8 @@ EOF
     cd ..
     rm -fr conftestdir
   fi
-        # Look for the directory under a standard set of common directories.
+      if test x"$ac_x_app_defaults" = x; then
+          # Look for the directory under a standard set of common directories.
   # Check X11 before X11Rn because it's often a symlink to the current release.
   for ac_dir in                                        \
     /usr/X11/lib/app-defaults                  \
@@ -2782,6 +2768,7 @@ EOF
     fi
   done
 
+      fi
       if test x"$ac_x_app_defaults" = x; then
         ac_cv_x_app_defaults="/usr/lib/X11/app-defaults"
       else
@@ -2832,7 +2819,7 @@ APPDEFAULTS=$ac_x_app_defaults
   fi
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   cat > conftest.$ac_ext <<EOF
-#line 2836 "configure"
+#line 2835 "configure"
 #include "confdefs.h"
 #include <X11/XHPlib.h>
 EOF
@@ -2853,7 +2840,7 @@ rm -f conftest*
 # Check for the availability of the XPointer typedef, and define it otherwise.
 #
 echo $ac_n "checking for XPointer""... $ac_c" 1>&6
-echo "configure:2857: checking for XPointer" >&5
+echo "configure:2856: checking for XPointer" >&5
 if eval "test \"`echo '$''{'ac_cv_xpointer'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2864,14 +2851,14 @@ else
   fi
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   cat > conftest.$ac_ext <<EOF
-#line 2868 "configure"
+#line 2867 "configure"
 #include "confdefs.h"
 #include <X11/Xlib.h>
 int main() {
 XPointer foo = (XPointer) 0;
 ; return 0; }
 EOF
-if { (eval echo configure:2875: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2874: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_xpointer=yes
 else
@@ -2930,7 +2917,7 @@ case "$host" in
 
       # Some versions of Slowlaris Motif require -lgen.  But not all.  Why?
       echo $ac_n "checking for regcmp in -lgen""... $ac_c" 1>&6
-echo "configure:2934: checking for regcmp in -lgen" >&5
+echo "configure:2933: checking for regcmp in -lgen" >&5
 ac_lib_var=`echo gen'_'regcmp | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2938,7 +2925,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lgen  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2942 "configure"
+#line 2941 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -2949,7 +2936,7 @@ int main() {
 regcmp()
 ; return 0; }
 EOF
-if { (eval echo configure:2953: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2952: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2986,17 +2973,17 @@ have_xmu=no
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   ac_safe=`echo "X11/Xmu/Error.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for X11/Xmu/Error.h""... $ac_c" 1>&6
-echo "configure:2990: checking for X11/Xmu/Error.h" >&5
+echo "configure:2989: checking for X11/Xmu/Error.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
-#line 2995 "configure"
+#line 2994 "configure"
 #include "confdefs.h"
 #include <X11/Xmu/Error.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3000: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2999: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -3040,7 +3027,7 @@ if test $have_xmu = yes ; then
   case "$host" in
     *-sunos4*)
     echo $ac_n "checking for the SunOS 4.1.x _get_wmShellWidgetClass bug""... $ac_c" 1>&6
-echo "configure:3044: checking for the SunOS 4.1.x _get_wmShellWidgetClass bug" >&5
+echo "configure:3043: checking for the SunOS 4.1.x _get_wmShellWidgetClass bug" >&5
 if eval "test \"`echo '$''{'ac_cv_sunos_xmu_bug'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3053,14 +3040,14 @@ else
                    # with X libraries because we know it's SunOS.
                    LDFLAGS="$LDFLAGS -lXmu -lXt -lX11 -lXext -lm"
                    cat > conftest.$ac_ext <<EOF
-#line 3057 "configure"
+#line 3056 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:3064: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3063: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   ac_cv_sunos_xmu_bug=no
 else
@@ -3076,21 +3063,21 @@ fi
 echo "$ac_t""$ac_cv_sunos_xmu_bug" 1>&6
     if test $ac_cv_sunos_xmu_bug = yes ; then
       echo $ac_n "checking whether the compiler understands -static""... $ac_c" 1>&6
-echo "configure:3080: checking whether the compiler understands -static" >&5
+echo "configure:3079: checking whether the compiler understands -static" >&5
 if eval "test \"`echo '$''{'ac_cv_ld_static'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   ac_save_LDFLAGS="$LDFLAGS"
                      LDFLAGS="$LDFLAGS -static"
                      cat > conftest.$ac_ext <<EOF
-#line 3087 "configure"
+#line 3086 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:3094: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3093: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   ac_cv_ld_static=yes
 else
@@ -3136,17 +3123,17 @@ if test $with_sgi = yes; then
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   ac_safe=`echo "X11/extensions/XScreenSaver.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for X11/extensions/XScreenSaver.h""... $ac_c" 1>&6
-echo "configure:3140: checking for X11/extensions/XScreenSaver.h" >&5
+echo "configure:3139: checking for X11/extensions/XScreenSaver.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
-#line 3145 "configure"
+#line 3144 "configure"
 #include "confdefs.h"
 #include <X11/extensions/XScreenSaver.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3150: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3149: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -3201,17 +3188,17 @@ if test $have_sgi != yes; then
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   ac_safe=`echo "X11/extensions/scrnsaver.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for X11/extensions/scrnsaver.h""... $ac_c" 1>&6
-echo "configure:3205: checking for X11/extensions/scrnsaver.h" >&5
+echo "configure:3204: checking for X11/extensions/scrnsaver.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
-#line 3210 "configure"
+#line 3209 "configure"
 #include "confdefs.h"
 #include <X11/extensions/scrnsaver.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3215: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3214: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -3255,7 +3242,7 @@ fi
     LDFLAGS="$LDFLAGS -L$x_libraries"
   fi
   echo $ac_n "checking for XScreenSaverRegister in -lXext""... $ac_c" 1>&6
-echo "configure:3259: checking for XScreenSaverRegister in -lXext" >&5
+echo "configure:3258: checking for XScreenSaverRegister in -lXext" >&5
 ac_lib_var=`echo Xext'_'XScreenSaverRegister | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -3263,7 +3250,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lXext -lm $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3267 "configure"
+#line 3266 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -3274,7 +3261,7 @@ int main() {
 XScreenSaverRegister()
 ; return 0; }
 EOF
-if { (eval echo configure:3278: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3277: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3325,7 +3312,7 @@ fi
     LDFLAGS="$LDFLAGS -L$x_libraries"
   fi
   echo $ac_n "checking for XScreenSaverRegister in -lXExExt""... $ac_c" 1>&6
-echo "configure:3329: checking for XScreenSaverRegister in -lXExExt" >&5
+echo "configure:3328: checking for XScreenSaverRegister in -lXExExt" >&5
 ac_lib_var=`echo XExExt'_'XScreenSaverRegister | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -3333,7 +3320,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lXExExt -lX11 -lXext -lm $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3337 "configure"
+#line 3336 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -3344,7 +3331,7 @@ int main() {
 XScreenSaverRegister()
 ; return 0; }
 EOF
-if { (eval echo configure:3348: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3347: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3390,7 +3377,7 @@ fi
     LDFLAGS="$LDFLAGS -L$x_libraries"
   fi
   echo $ac_n "checking for XScreenSaverRegister in -lXss""... $ac_c" 1>&6
-echo "configure:3394: checking for XScreenSaverRegister in -lXss" >&5
+echo "configure:3393: checking for XScreenSaverRegister in -lXss" >&5
 ac_lib_var=`echo Xss'_'XScreenSaverRegister | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -3398,7 +3385,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lXss -lX11 -lXext -lm $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3402 "configure"
+#line 3401 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -3409,7 +3396,7 @@ int main() {
 XScreenSaverRegister()
 ; return 0; }
 EOF
-if { (eval echo configure:3413: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3412: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3470,17 +3457,17 @@ if test $with_xidle = yes; then
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   ac_safe=`echo "X11/extensions/xidle.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for X11/extensions/xidle.h""... $ac_c" 1>&6
-echo "configure:3474: checking for X11/extensions/xidle.h" >&5
+echo "configure:3473: checking for X11/extensions/xidle.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
-#line 3479 "configure"
+#line 3478 "configure"
 #include "confdefs.h"
 #include <X11/extensions/xidle.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3484: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3483: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -3535,17 +3522,17 @@ if test $with_xshm = yes; then
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   ac_safe=`echo "X11/extensions/XShm.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for X11/extensions/XShm.h""... $ac_c" 1>&6
-echo "configure:3539: checking for X11/extensions/XShm.h" >&5
+echo "configure:3538: checking for X11/extensions/XShm.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
-#line 3544 "configure"
+#line 3543 "configure"
 #include "confdefs.h"
 #include <X11/extensions/XShm.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3549: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3548: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -3579,17 +3566,17 @@ fi
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   ac_safe=`echo "sys/ipc.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for sys/ipc.h""... $ac_c" 1>&6
-echo "configure:3583: checking for sys/ipc.h" >&5
+echo "configure:3582: checking for sys/ipc.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
-#line 3588 "configure"
+#line 3587 "configure"
 #include "confdefs.h"
 #include <sys/ipc.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3593: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3592: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -3624,17 +3611,17 @@ fi
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   ac_safe=`echo "sys/shm.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for sys/shm.h""... $ac_c" 1>&6
-echo "configure:3628: checking for sys/shm.h" >&5
+echo "configure:3627: checking for sys/shm.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
-#line 3633 "configure"
+#line 3632 "configure"
 #include "confdefs.h"
 #include <sys/shm.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3638: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3637: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -3683,7 +3670,7 @@ fi
     LDFLAGS="$LDFLAGS -L$x_libraries"
   fi
   echo $ac_n "checking for XShmQueryExtension in -lXextSam""... $ac_c" 1>&6
-echo "configure:3687: checking for XShmQueryExtension in -lXextSam" >&5
+echo "configure:3686: checking for XShmQueryExtension in -lXextSam" >&5
 ac_lib_var=`echo XextSam'_'XShmQueryExtension | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -3691,7 +3678,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lXextSam -lX11 -lXext -lm $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3695 "configure"
+#line 3694 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -3702,7 +3689,7 @@ int main() {
 XShmQueryExtension()
 ; return 0; }
 EOF
-if { (eval echo configure:3706: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3764,17 +3751,17 @@ if test $with_sgivc = yes; then
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   ac_safe=`echo "X11/extensions/XSGIvc.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for X11/extensions/XSGIvc.h""... $ac_c" 1>&6
-echo "configure:3768: checking for X11/extensions/XSGIvc.h" >&5
+echo "configure:3767: checking for X11/extensions/XSGIvc.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
-#line 3773 "configure"
+#line 3772 "configure"
 #include "confdefs.h"
 #include <X11/extensions/XSGIvc.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3778: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3777: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -3817,7 +3804,7 @@ fi
     LDFLAGS="$LDFLAGS -L$x_libraries"
   fi
   echo $ac_n "checking for XSGIvcQueryGammaMap in -lXsgivc""... $ac_c" 1>&6
-echo "configure:3821: checking for XSGIvcQueryGammaMap in -lXsgivc" >&5
+echo "configure:3820: checking for XSGIvcQueryGammaMap in -lXsgivc" >&5
 ac_lib_var=`echo Xsgivc'_'XSGIvcQueryGammaMap | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -3825,7 +3812,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lXsgivc -lXext -lX11 $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3829 "configure"
+#line 3828 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -3836,7 +3823,7 @@ int main() {
 XSGIvcQueryGammaMap()
 ; return 0; }
 EOF
-if { (eval echo configure:3840: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3897,17 +3884,17 @@ if test $with_dpms = yes; then
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   ac_safe=`echo "X11/extensions/dpms.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for X11/extensions/dpms.h""... $ac_c" 1>&6
-echo "configure:3901: checking for X11/extensions/dpms.h" >&5
+echo "configure:3900: checking for X11/extensions/dpms.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
-#line 3906 "configure"
+#line 3905 "configure"
 #include "confdefs.h"
 #include <X11/extensions/dpms.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3911: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3910: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -3950,7 +3937,7 @@ fi
     LDFLAGS="$LDFLAGS -L$x_libraries"
   fi
   echo $ac_n "checking for DPMSInfo in -lXdpms""... $ac_c" 1>&6
-echo "configure:3954: checking for DPMSInfo in -lXdpms" >&5
+echo "configure:3953: checking for DPMSInfo in -lXdpms" >&5
 ac_lib_var=`echo Xdpms'_'DPMSInfo | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -3958,7 +3945,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lXdpms -lXext -lX11 $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3962 "configure"
+#line 3961 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -3969,7 +3956,7 @@ int main() {
 DPMSInfo()
 ; return 0; }
 EOF
-if { (eval echo configure:3973: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3972: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -4068,17 +4055,17 @@ check_motif() {
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6
-echo "configure:4072: checking for Xm/Xm.h" >&5
+echo "configure:4071: checking for Xm/Xm.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
-#line 4077 "configure"
+#line 4076 "configure"
 #include "confdefs.h"
 #include <Xm/Xm.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4082: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4081: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -4118,17 +4105,17 @@ check_athena() {
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   ac_safe=`echo "X11/Xaw/Dialog.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for X11/Xaw/Dialog.h""... $ac_c" 1>&6
-echo "configure:4122: checking for X11/Xaw/Dialog.h" >&5
+echo "configure:4121: checking for X11/Xaw/Dialog.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
-#line 4127 "configure"
+#line 4126 "configure"
 #include "confdefs.h"
 #include <X11/Xaw/Dialog.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4132: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4131: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -4167,7 +4154,7 @@ fi
     LDFLAGS="$LDFLAGS -L$x_libraries"
   fi
   echo $ac_n "checking for Xaw3dComputeTopShadowRGB in -lXaw3d""... $ac_c" 1>&6
-echo "configure:4171: checking for Xaw3dComputeTopShadowRGB in -lXaw3d" >&5
+echo "configure:4170: checking for Xaw3dComputeTopShadowRGB in -lXaw3d" >&5
 ac_lib_var=`echo Xaw3d'_'Xaw3dComputeTopShadowRGB | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -4175,7 +4162,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lXaw3d -lXt -lXmu -lXext -lX11 $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4179 "configure"
+#line 4178 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -4186,7 +4173,7 @@ int main() {
 Xaw3dComputeTopShadowRGB()
 ; return 0; }
 EOF
-if { (eval echo configure:4190: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4189: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -4262,7 +4249,7 @@ fi
 # XawViewportSetCoordinates in Viewport.h (R3 (or R4?) don't.)
 if test $have_athena = yes ; then
   echo $ac_n "checking for XawViewportSetCoordinates in Viewport.h""... $ac_c" 1>&6
-echo "configure:4266: checking for XawViewportSetCoordinates in Viewport.h" >&5
+echo "configure:4265: checking for XawViewportSetCoordinates in Viewport.h" >&5
 if eval "test \"`echo '$''{'ac_cv_have_XawViewportSetCoordinates'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -4274,7 +4261,7 @@ else
   fi
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   cat > conftest.$ac_ext <<EOF
-#line 4278 "configure"
+#line 4277 "configure"
 #include "confdefs.h"
 #include <X11/Xaw/Viewport.h>
 EOF
@@ -4303,7 +4290,7 @@ fi
 have_lesstif=no
 if test $have_motif = yes ; then
   echo $ac_n "checking whether Motif is really LessTif""... $ac_c" 1>&6
-echo "configure:4307: checking whether Motif is really LessTif" >&5
+echo "configure:4306: checking whether Motif is really LessTif" >&5
 if eval "test \"`echo '$''{'ac_cv_have_lesstif'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -4314,14 +4301,14 @@ else
   fi
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   cat > conftest.$ac_ext <<EOF
-#line 4318 "configure"
+#line 4317 "configure"
 #include "confdefs.h"
 #include <Xm/Xm.h>
 int main() {
 long vers = LesstifVersion;
 ; return 0; }
 EOF
-if { (eval echo configure:4325: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4324: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_have_lesstif=yes
 else
@@ -4346,7 +4333,7 @@ if test $have_lesstif = yes ; then
   # It must be at least "GNU Lesstif 0.82".
   # #### If you change this, also sync the warning message lower down.
   echo $ac_n "checking whether LessTif is of a recent enough vintage""... $ac_c" 1>&6
-echo "configure:4350: checking whether LessTif is of a recent enough vintage" >&5
+echo "configure:4349: checking whether LessTif is of a recent enough vintage" >&5
 if eval "test \"`echo '$''{'ac_cv_good_lesstif'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -4361,12 +4348,12 @@ else
                               ac_cv_good_lesstif=yes
 else
   cat > conftest.$ac_ext <<EOF
-#line 4365 "configure"
+#line 4364 "configure"
 #include "confdefs.h"
 #include <Xm/Xm.h>
                                int main() { exit(LesstifVersion < 82); }
 EOF
-if { (eval echo configure:4370: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4369: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
 then
   ac_cv_good_lesstif=yes
 else
@@ -4410,7 +4397,7 @@ if test $have_motif = yes ; then
     LDFLAGS="$LDFLAGS -L$x_libraries"
   fi
   echo $ac_n "checking for XpQueryExtension in -lXp""... $ac_c" 1>&6
-echo "configure:4414: checking for XpQueryExtension in -lXp" >&5
+echo "configure:4413: checking for XpQueryExtension in -lXp" >&5
 ac_lib_var=`echo Xp'_'XpQueryExtension | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -4418,7 +4405,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lXp -lX11 -lXext -lm $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4422 "configure"
+#line 4421 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -4429,7 +4416,7 @@ int main() {
 XpQueryExtension()
 ; return 0; }
 EOF
-if { (eval echo configure:4433: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4432: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -4475,17 +4462,17 @@ if test $with_xpm = yes; then
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   ac_safe=`echo "X11/xpm.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for X11/xpm.h""... $ac_c" 1>&6
-echo "configure:4479: checking for X11/xpm.h" >&5
+echo "configure:4478: checking for X11/xpm.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
-#line 4484 "configure"
+#line 4483 "configure"
 #include "confdefs.h"
 #include <X11/xpm.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4489: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4488: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -4540,17 +4527,17 @@ if test $with_gl = yes; then
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   ac_safe=`echo "GL/gl.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for GL/gl.h""... $ac_c" 1>&6
-echo "configure:4544: checking for GL/gl.h" >&5
+echo "configure:4543: checking for GL/gl.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
-#line 4549 "configure"
+#line 4548 "configure"
 #include "confdefs.h"
 #include <GL/gl.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4554: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4553: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -4581,17 +4568,17 @@ fi
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   ac_safe=`echo "GL/glx.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for GL/glx.h""... $ac_c" 1>&6
-echo "configure:4585: checking for GL/glx.h" >&5
+echo "configure:4584: checking for GL/glx.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
-#line 4590 "configure"
+#line 4589 "configure"
 #include "confdefs.h"
 #include <GL/glx.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4595: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4594: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -4631,7 +4618,7 @@ EOF
   fi
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   cat > conftest.$ac_ext <<EOF
-#line 4635 "configure"
+#line 4634 "configure"
 #include "confdefs.h"
 #include <GL/glx.h>
 EOF
@@ -4681,17 +4668,17 @@ if test $with_readdisplay = yes; then
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   ac_safe=`echo "X11/extensions/readdisplay.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for X11/extensions/readdisplay.h""... $ac_c" 1>&6
-echo "configure:4685: checking for X11/extensions/readdisplay.h" >&5
+echo "configure:4684: checking for X11/extensions/readdisplay.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
-#line 4690 "configure"
+#line 4689 "configure"
 #include "confdefs.h"
 #include <X11/extensions/readdisplay.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4695: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4694: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -4743,17 +4730,17 @@ if test $with_sgivideo = yes; then
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   ac_safe=`echo "dmedia/vl.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for dmedia/vl.h""... $ac_c" 1>&6
-echo "configure:4747: checking for dmedia/vl.h" >&5
+echo "configure:4746: checking for dmedia/vl.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
-#line 4752 "configure"
+#line 4751 "configure"
 #include "confdefs.h"
 #include <dmedia/vl.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4757: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4756: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -4778,7 +4765,7 @@ fi
   if test $have_sgivideo = yes; then
     have_sgivideo=no
     echo $ac_n "checking for vlOpenVideo in -lvl""... $ac_c" 1>&6
-echo "configure:4782: checking for vlOpenVideo in -lvl" >&5
+echo "configure:4781: checking for vlOpenVideo in -lvl" >&5
 ac_lib_var=`echo vl'_'vlOpenVideo | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -4786,7 +4773,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lvl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4790 "configure"
+#line 4789 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -4797,7 +4784,7 @@ int main() {
 vlOpenVideo()
 ; return 0; }
 EOF
-if { (eval echo configure:4801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -4865,7 +4852,7 @@ if test -n "$with_zippy_req" ; then
   case "$with_zippy_req" in
     /*)
       echo $ac_n "checking for $with_zippy_req""... $ac_c" 1>&6
-echo "configure:4869: checking for $with_zippy_req" >&5
+echo "configure:4868: checking for $with_zippy_req" >&5
       if test -x "$with_zippy_req" ; then
         echo "$ac_t""yes" 1>&6
       else
@@ -4879,7 +4866,7 @@ echo "configure:4869: checking for $with_zippy_req" >&5
       # Extract the first word of "$with_zippy_req", so it can be a program name with args.
 set dummy $with_zippy_req; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4883: checking for $ac_word" >&5
+echo "configure:4882: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_zip2'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -4925,7 +4912,7 @@ do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4929: checking for $ac_word" >&5
+echo "configure:4928: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_emacs_exe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -4958,7 +4945,7 @@ do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4962: checking for $ac_word" >&5
+echo "configure:4961: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_xemacs_exe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -4992,7 +4979,7 @@ done
 
   if test -n "$emacs_exe" ; then
     echo $ac_n "checking for emacs yow""... $ac_c" 1>&6
-echo "configure:4996: checking for emacs yow" >&5
+echo "configure:4995: checking for emacs yow" >&5
     #
     # get emacs to tell us where the libexec directory is.
     #
@@ -5014,7 +5001,7 @@ echo "configure:4996: checking for emacs yow" >&5
 
   if test -z "$ac_cv_zippy_program" ; then
     echo $ac_n "checking for xemacs yow""... $ac_c" 1>&6
-echo "configure:5018: checking for xemacs yow" >&5
+echo "configure:5017: checking for xemacs yow" >&5
     if test -n "$xemacs_exe" ; then
       #
       # get xemacs to tell us where the libexec directory is.
@@ -5060,7 +5047,7 @@ do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:5064: checking for $ac_word" >&5
+echo "configure:5063: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_fortune'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -5095,7 +5082,7 @@ do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:5099: checking for $ac_word" >&5
+echo "configure:5098: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_fortune'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -5174,7 +5161,7 @@ fi
 
   if test $with_kerberos = yes; then
     echo $ac_n "checking for Kerberos""... $ac_c" 1>&6
-echo "configure:5178: checking for Kerberos" >&5
+echo "configure:5177: checking for Kerberos" >&5
 if eval "test \"`echo '$''{'ac_cv_kerberos'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -5185,14 +5172,14 @@ else
   fi
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   cat > conftest.$ac_ext <<EOF
-#line 5189 "configure"
+#line 5188 "configure"
 #include "confdefs.h"
 #include <krb.h>
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:5196: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5195: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_kerberos=yes
 else
@@ -5242,7 +5229,7 @@ fi
   #
   if test $passwd_cruft_done = no ; then
     echo $ac_n "checking for Sun-style shadow passwords""... $ac_c" 1>&6
-echo "configure:5246: checking for Sun-style shadow passwords" >&5
+echo "configure:5245: checking for Sun-style shadow passwords" >&5
 if eval "test \"`echo '$''{'ac_cv_sun_adjunct'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -5253,7 +5240,7 @@ else
   fi
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   cat > conftest.$ac_ext <<EOF
-#line 5257 "configure"
+#line 5256 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
                                      #include <unistd.h>
@@ -5266,7 +5253,7 @@ struct passwd_adjunct *p = getpwanam("nobody");
                         const char *pw = p->pwa_passwd;
 ; return 0; }
 EOF
-if { (eval echo configure:5270: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5269: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_sun_adjunct=yes
 else
@@ -5295,7 +5282,7 @@ EOF
   #
   if test $passwd_cruft_done = no ; then
     echo $ac_n "checking for DEC-style shadow passwords""... $ac_c" 1>&6
-echo "configure:5299: checking for DEC-style shadow passwords" >&5
+echo "configure:5298: checking for DEC-style shadow passwords" >&5
 if eval "test \"`echo '$''{'ac_cv_enhanced_passwd'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -5306,7 +5293,7 @@ else
   fi
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   cat > conftest.$ac_ext <<EOF
-#line 5310 "configure"
+#line 5309 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
                                      #include <unistd.h>
@@ -5323,7 +5310,7 @@ struct pr_passwd *p;
                         pw = p->ufld.fd_encrypt;
 ; return 0; }
 EOF
-if { (eval echo configure:5327: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5326: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_enhanced_passwd=yes
 else
@@ -5349,7 +5336,7 @@ EOF
       # On SCO, getprpwnam() is in -lprot (which uses nap() from -lx)
       # (I'm told it needs -lcurses too, but I don't understand why.)
       echo $ac_n "checking for getprpwnam in -lprot""... $ac_c" 1>&6
-echo "configure:5353: checking for getprpwnam in -lprot" >&5
+echo "configure:5352: checking for getprpwnam in -lprot" >&5
 ac_lib_var=`echo prot'_'getprpwnam | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -5357,7 +5344,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lprot -lx $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 5361 "configure"
+#line 5360 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -5368,7 +5355,7 @@ int main() {
 getprpwnam()
 ; return 0; }
 EOF
-if { (eval echo configure:5372: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5371: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -5388,7 +5375,7 @@ else
   echo "$ac_t""no" 1>&6
 # On DEC, getprpwnam() is in -lsecurity
                    echo $ac_n "checking for getprpwnam in -lsecurity""... $ac_c" 1>&6
-echo "configure:5392: checking for getprpwnam in -lsecurity" >&5
+echo "configure:5391: checking for getprpwnam in -lsecurity" >&5
 ac_lib_var=`echo security'_'getprpwnam | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -5396,7 +5383,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lsecurity  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 5400 "configure"
+#line 5399 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -5407,7 +5394,7 @@ int main() {
 getprpwnam()
 ; return 0; }
 EOF
-if { (eval echo configure:5411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -5436,7 +5423,7 @@ fi
   #
   if test $passwd_cruft_done = no ; then
     echo $ac_n "checking for HP-style shadow passwords""... $ac_c" 1>&6
-echo "configure:5440: checking for HP-style shadow passwords" >&5
+echo "configure:5439: checking for HP-style shadow passwords" >&5
 if eval "test \"`echo '$''{'ac_cv_hpux_passwd'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -5447,7 +5434,7 @@ else
   fi
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   cat > conftest.$ac_ext <<EOF
-#line 5451 "configure"
+#line 5450 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
                                      #include <unistd.h>
@@ -5460,7 +5447,7 @@ struct s_passwd *p = getspwnam("nobody");
                         const char *pw = p->pw_passwd;
 ; return 0; }
 EOF
-if { (eval echo configure:5464: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5463: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_hpux_passwd=yes
 else
@@ -5485,7 +5472,7 @@ EOF
 
       # on HPUX, bigcrypt is in -lsec
       echo $ac_n "checking for bigcrypt in -lsec""... $ac_c" 1>&6
-echo "configure:5489: checking for bigcrypt in -lsec" >&5
+echo "configure:5488: checking for bigcrypt in -lsec" >&5
 ac_lib_var=`echo sec'_'bigcrypt | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -5493,7 +5480,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lsec  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 5497 "configure"
+#line 5496 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -5504,7 +5491,7 @@ int main() {
 bigcrypt()
 ; return 0; }
 EOF
-if { (eval echo configure:5508: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5507: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -5531,7 +5518,7 @@ fi
   #
   if test $passwd_cruft_done = no ; then
     echo $ac_n "checking for generic shadow passwords""... $ac_c" 1>&6
-echo "configure:5535: checking for generic shadow passwords" >&5
+echo "configure:5534: checking for generic shadow passwords" >&5
 if eval "test \"`echo '$''{'ac_cv_shadow'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -5542,7 +5529,7 @@ else
   fi
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   cat > conftest.$ac_ext <<EOF
-#line 5546 "configure"
+#line 5545 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
                                      #include <unistd.h>
@@ -5554,7 +5541,7 @@ struct spwd *p = getspnam("nobody");
                         const char *pw = p->sp_pwdp;
 ; return 0; }
 EOF
-if { (eval echo configure:5558: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5557: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_shadow=yes
 else
@@ -5580,7 +5567,7 @@ EOF
       # On some systems (UnixWare 2.1), getspnam() is in -lgen instead of -lc.
       have_getspnam=no
       echo $ac_n "checking for getspnam in -lc""... $ac_c" 1>&6
-echo "configure:5584: checking for getspnam in -lc" >&5
+echo "configure:5583: checking for getspnam in -lc" >&5
 ac_lib_var=`echo c'_'getspnam | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -5588,7 +5575,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lc  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 5592 "configure"
+#line 5591 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -5599,7 +5586,7 @@ int main() {
 getspnam()
 ; return 0; }
 EOF
-if { (eval echo configure:5603: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -5621,7 +5608,7 @@ fi
 
       if test $have_getspnam = no ; then
         echo $ac_n "checking for getspnam in -lgen""... $ac_c" 1>&6
-echo "configure:5625: checking for getspnam in -lgen" >&5
+echo "configure:5624: checking for getspnam in -lgen" >&5
 ac_lib_var=`echo gen'_'getspnam | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -5629,7 +5616,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lgen  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 5633 "configure"
+#line 5632 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -5640,7 +5627,7 @@ int main() {
 getspnam()
 ; return 0; }
 EOF
-if { (eval echo configure:5644: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -5671,7 +5658,7 @@ fi
   #
   if test $passwd_cruft_done = no ; then
     echo $ac_n "checking for FreeBSD-style shadow passwords""... $ac_c" 1>&6
-echo "configure:5675: checking for FreeBSD-style shadow passwords" >&5
+echo "configure:5674: checking for FreeBSD-style shadow passwords" >&5
 if eval "test \"`echo '$''{'ac_cv_master_passwd'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -5692,7 +5679,7 @@ echo "$ac_t""$ac_cv_master_passwd" 1>&6
   # On some systems (UnixWare 2.1), crypt() is in -lcrypt instead of -lc.
   have_crypt=no
   echo $ac_n "checking for crypt in -lc""... $ac_c" 1>&6
-echo "configure:5696: checking for crypt in -lc" >&5
+echo "configure:5695: checking for crypt in -lc" >&5
 ac_lib_var=`echo c'_'crypt | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -5700,7 +5687,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lc  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 5704 "configure"
+#line 5703 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -5711,7 +5698,7 @@ int main() {
 crypt()
 ; return 0; }
 EOF
-if { (eval echo configure:5715: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -5733,7 +5720,7 @@ fi
 
   if test $have_crypt = no ; then
     echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
-echo "configure:5737: checking for crypt in -lcrypt" >&5
+echo "configure:5736: checking for crypt in -lcrypt" >&5
 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -5741,7 +5728,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lcrypt  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 5745 "configure"
+#line 5744 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -5752,7 +5739,7 @@ int main() {
 crypt()
 ; return 0; }
 EOF
-if { (eval echo configure:5756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -6462,7 +6449,7 @@ echo ""
 echo "      If you would prefer the demos to be installed elsewhere"
 echo "      (for example, in a dedicated directory) you should re-run"
 echo "      configure with the --enable-subdir=DIR option.  For more"
-echo "       information, run $0 --help."
+echo "      information, run $0 --help."
 echo ""
 echo "$warnsep"
 echo ""
index 4fd08b644254c2e78c3acd19d8e7ff89dce930b2..be98708834421d676a1d1a7ced0448feda9ce4b0 100644 (file)
@@ -109,11 +109,8 @@ Installation options:
                           specify the name of the subdirectory.  For example,
                           --exec-prefix=/usr/local/bin --enable-subdir=demos
                           would put xscreensaver in /usr/local/bin/, and would
-                          put the demos in /usr/local/bin/demos/.  Note that if
-                          you do this, you must make sure that the directory
-                          is on your \$PATH before xscreensaver is started: the
-                          directory name is not hardcoded into the program.
-                          This merely sets the default installation location.
+                          put the demos in /usr/local/bin/demos/.  (If DIR
+                          begins with /, then bindir will not be prepended.)
 
   --disable-subdir        Just put the demos in \`bindir' (this is the default.)
 ],
@@ -222,7 +219,9 @@ AC_DEFUN(AC_PATH_X_APP_DEFAULTS,
   [AC_REQUIRE_CPP()
     AC_CACHE_CHECK([for X app-defaults directory], ac_cv_x_app_defaults,
      [AC_PATH_X_APP_DEFAULTS_XMKMF
-      AC_PATH_X_APP_DEFAULTS_DIRECT
+      if test x"$ac_x_app_defaults" = x; then
+        AC_PATH_X_APP_DEFAULTS_DIRECT
+      fi
       if test x"$ac_x_app_defaults" = x; then
         ac_cv_x_app_defaults="/usr/lib/X11/app-defaults"
       else
@@ -430,7 +429,7 @@ fi
 have_sgi=no
 with_sgi_req=unspecified
 AC_ARG_WITH(sgi-ext,[
-Server options:
+X Server Extension options:
 
   --with-sgi-ext          Include support for the SGI SCREEN_SAVER
                           server extension, if possible (this is the default).
@@ -643,7 +642,7 @@ with_motif_req=unspecified
 with_athena_req=unspecified
 
 AC_ARG_WITH(motif,[
-Toolkit options:
+X Client Toolkit options:
 
   --with-motif            Use the Motif toolkit for the user interface,
                           if possible (this is the default).
@@ -810,7 +809,7 @@ fi
 have_xpm=no
 with_xpm_req=unspecified
 AC_ARG_WITH(xpm,[
-Demo options:
+Graphics Demo options:
 
   --with-xpm              Include support for XPM files in some demos,
                           if possible (this is the default).
@@ -1065,7 +1064,7 @@ with_shadow_req=unspecified
 need_setuid=no
 
 AC_ARG_ENABLE(locking,[
-Locking options:
+Screen Locking options:
 
   --enable-locking        Compile in support for locking the display
                           (this is the default.)
index 2b2b0e1450880a155c4fb1d611290f3e1bdb4abc..64e19587877e12b5367f5ee96259b39a7850246b 100644 (file)
@@ -48,8 +48,9 @@ X_EXTRA_LIBS  = @X_EXTRA_LIBS@
 # X_EXTRA_LIBS contains extra libraries needed by X that aren't a part of X.
 #         (e.g., -lsocket, -lnsl, etc.)
 #
-XLIBS          = $(X_LIBS) $(X_PRE_LIBS)      -lX11 -lXext $(X_EXTRA_LIBS)
-XTLIBS         = $(X_LIBS) $(X_PRE_LIBS) -lXt -lX11 -lXext $(X_EXTRA_LIBS)
+# SAVER_LIBS is the link line for "xscreensaver", and
+# CMD_LIBS is the link line for "xscreensaver-command".
+
 
 AD_DIR         = @APPDEFAULTS@
 
@@ -99,11 +100,17 @@ SAVER_OBJS_1       = demo.o stderr.o subprocs.o timers.o windows.o \
 
 SAVER_SRCS     = $(SAVER_SRCS_1) $(DIALOG_SRCS) $(LOCK_SRCS) $(UTIL_SRCS)
 SAVER_OBJS     = $(SAVER_OBJS_1) $(DIALOG_OBJS) $(LOCK_OBJS) $(UTIL_OBJS)
-SAVER_LIBS     = @SAVER_LIBS@ -lXt $(XTLIBS) $(PASSWD_LIBS) $(LIBS)
 
 CMD_SRCS       = xscreensaver-command.c
 CMD_OBJS       = xscreensaver-command.o
-CMD_LIBS       = $(XLIBS) $(LIBS)
+
+SAVER_LIBS     = $(X_LIBS) $(X_PRE_LIBS) @SAVER_LIBS@ -lXt   \
+                 -lX11 -lXext $(X_EXTRA_LIBS) $(PASSWD_LIBS) \
+                 $(LIBS)
+
+CMD_LIBS       = $(X_LIBS) $(X_PRE_LIBS)      \
+                 -lX11 -lXext $(X_EXTRA_LIBS) \
+                 $(LIBS)
 
 EXES           = xscreensaver xscreensaver-command
 
@@ -195,7 +202,7 @@ depend: XScreenSaver_ad.h
        $(DEPEND) -s '# DO NOT DELETE: updated by make depend'              \
        $(DEPEND_FLAGS) --                                                  \
        $(INCLUDES) $(DEFS) $(DEPEND_DEFINES) $(CFLAGS) $(X_CFLAGS) --      \
-       $(SAVER_SRCS_1) $(CMD_SRCS)
+       $(SAVER_SRCS) $(CMD_SRCS)
 
 # Adds some dependencies to Makefile.in -- not totally accurate, but pretty
 # close.  This excludes dependencies on files in /usr/include, etc.  It tries
@@ -206,7 +213,8 @@ distdepend: update_ad_version update_man_version XScreenSaver_ad.h
        $(DEPEND) -w 0 -f -                                                 \
        -s '# DO NOT DELETE: updated by make distdepend' $(DEPEND_FLAGS) -- \
        $(INCLUDES) $(DEFS) $(DEPEND_DEFINES) $(CFLAGS) $(X_CFLAGS) --      \
-       $(SAVER_SRCS_1) $(CMD_SRCS) |                                       \
+       $(SAVER_SRCS_1) $(MOTIF_SRCS) $(ATHENA_SRCS) $(PWENT_SRCS)          \
+       $(LOCK_SRCS_1) $(CMD_SRCS) |                                        \
        (                                                                   \
          awk '/^# .*Makefile.in ---/,/^# DO .*distdepend/' < Makefile.in ; \
          sed -e 's@ \./@ @g;s@ /[^ ]*@@g;/^.*:$$/d'                        \
@@ -308,6 +316,13 @@ xscreensaver-command: $(CMD_OBJS)
        $(CC) $(LDFLAGS) -o $@ $(CMD_OBJS) $(CMD_LIBS)
 
 
+TEST_PASSWD_OBJS = test-passwd.o $(LOCK_OBJS_1) $(PWENT_OBJS) $(DIALOG_OBJS) \
+        subprocs.o demo.o \
+       $(UTIL_OBJS)
+
+test-passwd: $(TEST_PASSWD_OBJS)
+       $(CC) $(LDFLAGS) -o $@ $(TEST_PASSWD_OBJS) $(SAVER_LIBS)
+
 ##############################################################################
 #
 # DO NOT DELETE: updated by make distdepend
@@ -337,6 +352,14 @@ xscreensaver.o: $(UTILS_SRC)/visual.h
 xscreensaver.o: XScreenSaver_ad.h
 xset.o: ../config.h
 xset.o: $(srcdir)/xscreensaver.h
+dialogs-Xm.o: ../config.h
+dialogs-Xm.o: $(UTILS_SRC)/visual.h
+dialogs-Xaw.o: ../config.h
+dialogs-Xaw.o: $(UTILS_SRC)/visual.h
+passwd.o: ../config.h
+lock.o: ../config.h
+lock.o: $(srcdir)/xscreensaver.h
+lock.o: $(UTILS_SRC)/resources.h
 xscreensaver-command.o: ../config.h
 xscreensaver-command.o: $(UTILS_SRC)/version.h
 
index 6da779d925413210526531aac5100e140ceff329..7c29cd789b81c14dd0fba65f59237d96fdffce96 100644 (file)
@@ -4,8 +4,8 @@
 !            a screen saver and locker for the X window system
 !                            by Jamie Zawinski
 !
-!                              version 2.23
-!                                21-Jun-98
+!                              version 2.24
+!                                30-Jun-98
 !
 ! See "man xscreensaver" for more info.  The latest version is always
 ! available at http://people.netscape.com/jwz/xscreensaver/
@@ -17,6 +17,7 @@
 *nice:                 10
 *lock:                 False
 *verbose:              False
+*timestamp:            False
 *fade:                 True
 *unfade:               False
 *fadeSeconds:          3
                vines -root                                             \n\
                kaleidescope -root                                      \n\
                xjack -root                                             \n\
-               xlyap -root -randomize                                  \n\
                cynosure -root                                          \n\
                flow -root                                              \n\
                epicycle -root                                          \n\
                bsod -root                                              \n\
                crystal -root                                           \n\
                discrete -root                                          \n\
+               kumppa -root                                            \n\
                                                                          \
        mono:   rocks -root                                             \n\
        color:  rocks -root -fg darksalmon                              \n\
@@ -357,16 +358,15 @@ XScreenSaver*dragReceiverProtocolStyle:  DRAG_NONE
 *resources_dialog*label1.font: *-helvetica-bold-r-*-*-*-140-*-*-*-iso8859-1
 XScreenSaver.demo_dialog*List.font: \
                                *-courier-medium-r-*-*-*-120-*-*-*-iso8859-1
-
-! This is a hack to make the typed password invisible.
-! Surely someone can do better than this...
-XScreenSaver.passwd_dialog*passwd_form.value*font:     *nil*
+XScreenSaver.demo_dialog*Text*font: \
+                               *-courier-medium-r-*-*-*-120-*-*-*-iso8859-1
 
 XScreenSaver.demo_dialog*foreground:                   #000000
 XScreenSaver.demo_dialog*background:                   #E5E5E5
 XScreenSaver.demo_dialog*List.background:              #FFFFFF
 XScreenSaver.demo_dialog*Scrollbar.background:         #D9D9D9
 XScreenSaver.demo_dialog*Command.background:           #D9D9D9
+XScreenSaver.demo_dialog*Text*background:              #FFFFFF
 
 XScreenSaver.resources_dialog*foreground:              #000000
 XScreenSaver.resources_dialog*background:              #E5E5E5
@@ -384,7 +384,6 @@ XScreenSaver.passwd_dialog*Text*background:         #FFFFFF
 XScreenSaver.passwd_dialog*roger.foreground:           #CD0000
 XScreenSaver.passwd_dialog*roger.background:           #FFFFFF
 
-*demo_dialog*viewport.width:                   400
 *demo_dialog*viewport.height:                  200
 *Form.borderWidth:                             0
 *Box.borderWidth:                              0
@@ -396,6 +395,8 @@ XScreenSaver.passwd_dialog*roger.background:                #FFFFFF
 *demo_dialog*edit.label:                       Preferences
 *demo_dialog*done.label:                       Exit Demo Mode
 *demo_dialog*restart.label:                    Reinitialize
+XScreenSaver.demo_dialog*Command.internalWidth:  10
+XScreenSaver.demo_dialog*Command.internalHeight: 4
 
 *resources_dialog*timeout.label:               Saver Timeout:
 *resources_dialog*cycle.label:                 Cycle Timeout:
@@ -418,9 +419,10 @@ XScreenSaver.passwd_dialog*roger.background:               #FFFFFF
 *passwd_dialog*label3.label:           Please type %s's password to unlock it.
 *passwd_dialog*ok.label:                       OK
 *passwd_dialog*cancel.label:                   Cancel
-*passwd_dialog*passwd_form*label.label:                Enter password:
-*passwd_dialog*Dialog.label:                   Enter password:
+*passwd_dialog*passwd_form*label.label:                
+*passwd_dialog*Dialog.label:                   
 *passwd_dialog*passwd_form*Text.width:         200
+*passwd_dialog*passwd_form.borderWidth:                0
 *passwd_dialog*roger.width:                    150
 *passwd_dialog*roger.height:                   150
 *passwd_dialog*roger.borderWidth:              1
index 24f82dc6877a3b8162478633e890c00ddeefb528..315208e2db9982f36fc7f666f2768762cff2178e 100644 (file)
@@ -5,6 +5,7 @@
 "*nice:                        10",
 "*lock:                        False",
 "*verbose:             False",
+"*timestamp:           False",
 "*fade:                        True",
 "*unfade:              False",
 "*fadeSeconds:         3",
@@ -78,7 +79,6 @@
                vines -root                                             \\n\
                kaleidescope -root                                      \\n\
                xjack -root                                             \\n\
-               xlyap -root -randomize                                  \\n\
                cynosure -root                                          \\n\
                flow -root                                              \\n\
                epicycle -root                                          \\n\
@@ -87,6 +87,7 @@
                bsod -root                                              \\n\
                crystal -root                                           \\n\
                discrete -root                                          \\n\
+               kumppa -root                                            \\n\
                                                                          \
        mono:   rocks -root                                             \\n\
        color:  rocks -root -fg darksalmon                              \\n\
 "*resources_dialog*label1.font:        *-helvetica-bold-r-*-*-*-140-*-*-*-iso8859-1",
 "XScreenSaver.demo_dialog*List.font: \
                                *-courier-medium-r-*-*-*-120-*-*-*-iso8859-1",
-"XScreenSaver.passwd_dialog*passwd_form.value*font:    *nil*",
+"XScreenSaver.demo_dialog*Text*font: \
+                               *-courier-medium-r-*-*-*-120-*-*-*-iso8859-1",
 "XScreenSaver.demo_dialog*foreground:                  #000000",
 "XScreenSaver.demo_dialog*background:                  #E5E5E5",
 "XScreenSaver.demo_dialog*List.background:             #FFFFFF",
 "XScreenSaver.demo_dialog*Scrollbar.background:                #D9D9D9",
 "XScreenSaver.demo_dialog*Command.background:          #D9D9D9",
+"XScreenSaver.demo_dialog*Text*background:             #FFFFFF",
 "XScreenSaver.resources_dialog*foreground:             #000000",
 "XScreenSaver.resources_dialog*background:             #E5E5E5",
 "XScreenSaver.resources_dialog*Command.background:     #D9D9D9",
 "XScreenSaver.passwd_dialog*Text*background:           #FFFFFF",
 "XScreenSaver.passwd_dialog*roger.foreground:          #CD0000",
 "XScreenSaver.passwd_dialog*roger.background:          #FFFFFF",
-"*demo_dialog*viewport.width:                  400",
 "*demo_dialog*viewport.height:                 200",
 "*Form.borderWidth:                            0",
 "*Box.borderWidth:                             0",
 "*demo_dialog*edit.label:                      Preferences",
 "*demo_dialog*done.label:                      Exit Demo Mode",
 "*demo_dialog*restart.label:                   Reinitialize",
+"XScreenSaver.demo_dialog*Command.internalWidth:  10",
+"XScreenSaver.demo_dialog*Command.internalHeight: 4",
 "*resources_dialog*timeout.label:              Saver Timeout:",
 "*resources_dialog*cycle.label:                        Cycle Timeout:",
 "*resources_dialog*fade.label:                 Fade Duration:",
 "*passwd_dialog*label3.label:          Please type %s's password to unlock it.",
 "*passwd_dialog*ok.label:                      OK",
 "*passwd_dialog*cancel.label:                  Cancel",
-"*passwd_dialog*passwd_form*label.label:               Enter password:",
-"*passwd_dialog*Dialog.label:                  Enter password:",
+"*passwd_dialog*passwd_form*label.label:               ",
+"*passwd_dialog*Dialog.label:                  ",
 "*passwd_dialog*passwd_form*Text.width:                200",
+"*passwd_dialog*passwd_form.borderWidth:               0",
 "*passwd_dialog*roger.width:                   150",
 "*passwd_dialog*roger.height:                  150",
 "*passwd_dialog*roger.borderWidth:             1",
index 23a42974c6ae88d7015d173d4b6940835efa04ae..10a177efbf258d2939d9b3dc400e21428f489c0c 100644 (file)
@@ -40,6 +40,7 @@
 # include <X11/Xaw/Viewport.h>
 # include <X11/Xaw/Dialog.h>
 # include <X11/Xaw/Scrollbar.h>
+# include <X11/Xaw/Text.h>
 #endif /* HAVE_ATHENA */
 
 #include "xscreensaver.h"
@@ -104,7 +105,13 @@ get_text_string (Widget text_widget)
   return XmTextGetString (text_widget);
 #else  /* HAVE_ATHENA */
   char *string = 0;
-  XtVaGetValues (text_widget, XtNvalue, &string, 0);
+  if (XtIsSubclass(text_widget, textWidgetClass))
+    XtVaGetValues (text_widget, XtNstring, &string, 0);
+  else if (XtIsSubclass(text_widget, dialogWidgetClass))
+    XtVaGetValues (text_widget, XtNvalue, &string, 0);
+  else
+    string = 0;
+
   return string;
 #endif /* HAVE_ATHENA */
 }
@@ -204,7 +211,6 @@ destroy_screenhack_dialogs (saver_info *si)
     XInstallColormap (si->dpy, ssi->cmap);
 }
 
-#ifdef HAVE_MOTIF
 
 static void
 text_cb (Widget text_widget, XtPointer client_data, XtPointer call_data)
@@ -215,7 +221,24 @@ text_cb (Widget text_widget, XtPointer client_data, XtPointer call_data)
   demo_mode_hack (si, line);
 }
 
-#endif /* HAVE_MOTIF */
+
+#ifdef HAVE_ATHENA
+/* Bend over backwards to make hitting Return in the text field do the
+   right thing. 
+   */
+extern saver_info *global_si_kludge;
+static void text_enter (Widget w, XEvent *event, String *av, Cardinal *ac)
+{
+  text_cb (w, global_si_kludge, 0);
+}
+
+static XtActionsRec actions[] = {{"done",      text_enter}
+                               };
+static char translations[] = ("<Key>Return:    done()\n"
+                             "<Key>Linefeed:   done()\n"
+                             "Ctrl<Key>M:      done()\n"
+                             "Ctrl<Key>J:      done()\n");
+#endif /* HAVE_ATHENA */
 
 
 static void
@@ -225,6 +248,8 @@ select_cb (Widget button, XtPointer client_data, XtPointer call_data)
 
 #ifdef HAVE_ATHENA
   XawListReturnStruct *item = (XawListReturnStruct*)call_data;
+  XtVaSetValues(text_line, XtNstring, item->string, 0);
+
   demo_mode_hack (si, item->string);
   if (item->list_index >= 0)
     si->default_screen->current_hack = item->list_index;
@@ -353,7 +378,7 @@ next_cb (Widget button, XtPointer client_data, XtPointer call_data)
   int cnt;
   XawListReturnStruct *current = XawListShowCurrent(demo_list);
   if (current->list_index == XAW_LIST_NONE)
-    XawListHighlight(demo_list,1);
+    XawListHighlight(demo_list, 0);
   else
     {
       XtVaGetValues(demo_list,
@@ -368,6 +393,7 @@ next_cb (Widget button, XtPointer client_data, XtPointer call_data)
 
   ensure_selected_item_visible (demo_list);
   current = XawListShowCurrent(demo_list);
+  XtVaSetValues(text_line, XtNstring, current->string, 0);
   demo_mode_hack (si, current->string);
 
 #else  /* HAVE_MOTIF */
@@ -403,10 +429,10 @@ prev_cb (Widget button, XtPointer client_data, XtPointer call_data)
 #ifdef HAVE_ATHENA
   XawListReturnStruct *current=XawListShowCurrent(demo_list);
   if (current->list_index == XAW_LIST_NONE)
-    XawListHighlight(demo_list,1);
+    XawListHighlight(demo_list, 0);
   else
     {
-      if (current->list_index>=1)
+      if (current->list_index >= 1)
        {
          current->list_index--;
          XawListHighlight(demo_list, current->list_index);
@@ -415,6 +441,7 @@ prev_cb (Widget button, XtPointer client_data, XtPointer call_data)
 
   ensure_selected_item_visible (demo_list);
   current = XawListShowCurrent(demo_list);
+  XtVaSetValues(text_line, XtNstring, current->string, 0);
   demo_mode_hack (si, current->string);
 
 #else  /* HAVE_MOTIF */
@@ -547,7 +574,7 @@ pop_up_dialog_box (Widget dialog, Widget form, int where)
 }
 
 
-static void
+void
 make_screenhack_dialog (saver_info *si)
 {
   saver_screen_info *ssi = si->default_screen;
@@ -585,12 +612,13 @@ make_screenhack_dialog (saver_info *si)
                 select_cb, (XtPointer) si);
   XtAddCallback (text_line, XmNactivateCallback, text_cb, (XtPointer) si);
 
-  for (; *hacks; hacks++)
-    {
-      XmString xmstr = XmStringCreate (*hacks, XmSTRING_DEFAULT_CHARSET);
-      XmListAddItem (demo_list, xmstr, 0);
-      XmStringFree (xmstr);
-    }
+  if (hacks)
+    for (; *hacks; hacks++)
+      {
+       XmString xmstr = XmStringCreate (*hacks, XmSTRING_DEFAULT_CHARSET);
+       XmListAddItem (demo_list, xmstr, 0);
+       XmStringFree (xmstr);
+      }
 
   /* Cause the most-recently-run hack to be selected in the list.
      Do some voodoo to make it be roughly centered in the list (really,
@@ -620,6 +648,18 @@ make_screenhack_dialog (saver_info *si)
 
 #else  /* HAVE_ATHENA */
 
+  /* Hook up the text line. */
+
+  XtAppAddActions(XtWidgetToApplicationContext(text_line),
+                 actions, XtNumber(actions));
+  XtOverrideTranslations(text_line, XtParseTranslationTable(translations));
+
+
+  /* Must realize the widget before populating the list, or the dialog
+     will be as wide as the longest string.
+  */
+  XtRealizeWidget (demo_dialog);
+
   XtVaSetValues (demo_list,
                 XtNlist, hacks,
                 XtNnumberStrings, si->prefs.screenhacks_count,
@@ -628,6 +668,48 @@ make_screenhack_dialog (saver_info *si)
   if (ssi->current_hack > 0)
   XawListHighlight(demo_list, ssi->current_hack);
 
+  /* Now that we've populated the list, make sure that the list is as
+     wide as the dialog itself.
+  */
+  {
+    Widget viewport = XtParent(demo_list);
+    Widget subform = XtParent(viewport);
+    Widget box = XtNameToWidget(demo_dialog, "*box");
+    Widget label1 = XtNameToWidget(demo_dialog, "*label1");
+    Widget label2 = XtNameToWidget(demo_dialog, "*label2");
+    Dimension x=0, y=0, w=0, h=0, bw=0, w2=0;
+    XtVaGetValues(subform,
+                 XtNwidth, &w, XtNheight, &h, XtNborderWidth, &bw, 0);
+    XtVaGetValues(box, XtNwidth, &w2, 0);
+    if (w2 != w)
+      XtResizeWidget(subform, w2, h, bw);
+
+    /* Why isn't the viewport getting centered? */
+    XtVaGetValues(viewport,
+                 XtNx, &x, XtNy, &y, XtNheight, &h, XtNborderWidth, &bw, 0);
+    printf("%d %d %d %d\n", x, y, w, h);
+    XtConfigureWidget(viewport, x, y, w2-x-x, h, bw);
+
+    /* And the text line, too. */
+    XtVaGetValues(text_line,
+                 XtNwidth, &w, XtNheight, &h, XtNborderWidth, &bw, 0);
+    XtVaGetValues(viewport, XtNwidth, &w2, 0);
+    if (w2 != w)
+      XtResizeWidget(text_line, w2, h, bw);
+
+    /* And the labels too. */
+    XtVaGetValues(label1,
+                 XtNwidth, &w, XtNheight, &h, XtNborderWidth, &bw, 0);
+    if (w2 != w)
+      XtResizeWidget(label1, w2, h, bw);
+
+    XtVaGetValues(label2,
+                 XtNwidth, &w, XtNheight, &h, XtNborderWidth, &bw, 0);
+    if (w2 != w)
+      XtResizeWidget(label2, w2, h, bw);
+
+  }
+
 #endif /* HAVE_ATHENA */
 
   monitor_power_on (si);
@@ -758,7 +840,7 @@ res_done_cb (Widget button, XtPointer client_data, XtPointer call_data)
        timeout: %d\n\tcycle:   %d\n\tlock:    %d\n\tpasswd:  %d\n\
        fade:    %d\n\tfade:    %d\n\tverbose: %d\n\tinstall: %d\n\
        fade:    %d\n\tunfade:  %d\n\tlock:    %d\n",
-            progname, p->timeout, p->cycle, p->lock_timeout,
+            blurb(), p->timeout, p->cycle, p->lock_timeout,
 #ifdef NO_LOCKING
             0,
 #else
@@ -782,7 +864,7 @@ res_done_cb (Widget button, XtPointer client_data, XtPointer call_data)
          if (p->verbose_p)
            fprintf (stderr,
                   "%s: configuring server for saver timeout of %d seconds.\n",
-                    progname, server_timeout);
+                    blurb(), server_timeout);
          /* Leave all other parameters the same. */
          XSetScreenSaver (si->dpy, server_timeout, server_interval,
                           prefer_blank, allow_exp);
@@ -960,7 +1042,7 @@ demo_mode (saver_info *si)
 #ifdef DEBUG_TIMERS
              if (p->verbose_p)
                printf ("%s: starting notice_events_timer for 0x%X (%lu)\n",
-                       progname,
+                       blurb(),
                        (unsigned int) event.xcreatewindow.window,
                        p->notice_events_timeout);
 #endif /* DEBUG_TIMERS */
index 179381368744020672add8f2a0dad31de5e2086b..1555544bb10a44d9b3ad201d165cd6572762beae 100644 (file)
@@ -27,6 +27,7 @@
 #include <X11/Xaw/Toggle.h>
 #include <X11/Xaw/Viewport.h>
 #include <X11/Xaw/Dialog.h>
+#include <X11/Xaw/AsciiText.h>
 
 #include <stdio.h>
 
@@ -278,33 +279,45 @@ create_demo_dialog(Widget parent, Visual *visual, Colormap colormap)
                            XtNfromVert, label1,
                            NULL);
 
-  subform=
+  subform =
     XtVaCreateManagedWidget("subform", formWidgetClass, demo_form,
                            XtNleft, XtChainLeft,
                            XtNright, XtChainRight,
                            XtNfromVert, label2,
-                           XtNbottom, XtChainBottom,
                            NULL);
-  viewport=
+  viewport =
     XtVaCreateManagedWidget("viewport", viewportWidgetClass, subform,
+                           XtNtop, XtChainTop,
+                           XtNleft, XtChainLeft,
+                           XtNright, XtChainRight,
                            XtNallowVert, TRUE,
                            XtNallowHoriz, TRUE,
                            XtNforceBars, TRUE,
                            NULL);
 
   demo_list = XtVaCreateManagedWidget("demo_list", listWidgetClass, viewport,
-                                   XtNverticalList, TRUE,
-                                   XtNdefaultColumns, 1,
-                                   NULL);
-  box=
+                                     XtNverticalList, TRUE,
+                                     XtNdefaultColumns, 1,
+                                     NULL);
+
+  text_line = XtVaCreateManagedWidget("text", asciiTextWidgetClass, subform,
+                                     XtNleft, XtChainLeft,
+                                     XtNright, XtChainRight,
+                                     XtNfromVert, viewport,
+                                     XtNbottom, XtChainBottom,
+                                     XtNeditType, XawtextEdit,
+                                     NULL);
+
+  box =
     XtVaCreateManagedWidget("box", boxWidgetClass, demo_form,
-                           XtNfromHoriz, subform,
-                           XtNfromVert, label2,
+                           XtNleft, XtChainLeft,
+                           XtNfromVert, subform,
                            XtNbottom, XtChainBottom,
                            XtNright, XtChainRight,
+                           XtNorientation, XtEhorizontal,
                            NULL);
-  prev = XtVaCreateManagedWidget("prev", commandWidgetClass, box, NULL);
   next = XtVaCreateManagedWidget("next", commandWidgetClass, box, NULL);
+  prev = XtVaCreateManagedWidget("prev", commandWidgetClass, box, NULL);
   edit = XtVaCreateManagedWidget("edit", commandWidgetClass, box, NULL);
   restart = XtVaCreateManagedWidget("restart", commandWidgetClass, box, NULL);
   done = XtVaCreateManagedWidget("done", commandWidgetClass, box, NULL);
index c6a715a5df43aea807911704c3ea68d84d368a22..25dad5546e555e7e0a41387b0ccf7afa31318ccf 100644 (file)
@@ -21,6 +21,7 @@
 
 #include <X11/StringDefs.h>
 #include <X11/Intrinsic.h>
+#include <X11/IntrinsicP.h>    /* for XtResizeWidget */
 #include "xscreensaver.h"
 #include "resources.h"
 
@@ -29,7 +30,6 @@
 #else /* VMS */
 extern char *getenv(const char *name);
 extern int validate_user(char *name, char *password);
-static char * user_vms;
 #endif /* VMS */
 
 
@@ -41,17 +41,6 @@ static char * user_vms;
 # include <X11/Xaw/Label.h>
 # include <X11/Xaw/Dialog.h>
 
-static void passwd_done_cb (Widget, XtPointer, XtPointer);
-static XtActionsRec actionsList[] =
-{
-    {"passwdentered", (XtActionProc) passwd_done_cb},
-};
-
-static char Translations[] =
-"\
-<Key>Return:   passwdentered()\
-";
-
 #else  /* HAVE_MOTIF */
 
 # include <Xm/Xm.h>
@@ -93,31 +82,32 @@ passwd_cancel_cb (Widget button, XtPointer client_data, XtPointer call_data)
   passwd_state = pw_cancel;
 }
 
+
+#ifdef VMS
+static Bool
+vms_passwd_valid_p(char *pw)
+{
+  char *u = getenv("USER");
+  return (validate_user (i, typed_passwd) == 1);
+}
+# undef passwd_valid_p
+# define passwd_valid_p vms_passwd_valid_p
+
+#endif /* VMS */
+
+
 static void
 passwd_done_cb (Widget button, XtPointer client_data, XtPointer call_data)
 {
   if (passwd_state != pw_read) return; /* already done */
-#ifndef VMS
 
-# ifdef HAVE_ATHENA
-  strncpy(typed_passwd, XawDialogGetValueString(passwd_form),
-         sizeof(typed_passwd)-1);
-  typed_passwd[sizeof(typed_passwd)-1] = 0;
-# endif /* HAVE_ATHENA */
   if (passwd_valid_p (typed_passwd))
     passwd_state = pw_ok;
   else
     passwd_state = pw_fail;
-
-#else  /* VMS */
-  user_vms = getenv("USER");
-  if (validate_user(user_vms,typed_passwd) == 1) 
-    passwd_state = pw_ok;
-  else 
-    passwd_state = pw_fail;
-#endif /* VMS */
 }
 
+
 #if defined(HAVE_MOTIF) && defined(VERIFY_CALLBACK_WORKS)
 
   /* It looks to me like adding any modifyVerify callback causes
@@ -171,22 +161,21 @@ static XtActionsRec actions[] = {{"keypress",  keypress},
                                 {"done",      done}
                                };
 
-# ifdef HAVE_MOTIF
-#  if 0  /* oh fuck, why doesn't this work? */
-static char translations[] = "\
-<Key>BackSpace:                backspace()\n\
-<Key>Delete:           backspace()\n\
-Ctrl<Key>H:            backspace()\n\
-Ctrl<Key>U:            kill_line()\n\
-Ctrl<Key>X:            kill_line()\n\
-Ctrl<Key>J:            done()\n\
-Ctrl<Key>M:            done()\n\
-<Key>:                 keypress()\n\
-";
-#  else  /* !0 */
-static char translations[] = "<Key>:keypress()";
-#  endif /* !0 */
-# endif /* HAVE_MOTIF */
+# if 0  /* This works for Athena, but not Motif: keypress() gets called
+          for all keys anyway.  So, the implementation of keypress()
+          has BackSpace, etc, hardcoded into it instead.  FMH!
+        */
+static char translations[] = ("<Key>BackSpace: backspace()\n"
+                             "<Key>Delete:     backspace()\n"
+                             "Ctrl<Key>H:      backspace()\n"
+                             "Ctrl<Key>U:      kill_line()\n"
+                             "Ctrl<Key>X:      kill_line()\n"
+                             "Ctrl<Key>J:      done()\n"
+                             "Ctrl<Key>M:      done()\n"
+                             "<Key>:           keypress()\n");
+# else  /* !0 */
+static char translations[] = ("<Key>:          keypress()\n");
+# endif /* !0 */
 
 
 static void
@@ -347,7 +336,6 @@ make_passwd_dialog (saver_info *si)
   create_passwd_dialog (parent, ssi->default_visual, ssi->demo_cmap);
 
 #ifdef HAVE_ATHENA
-
   XtVaSetValues(passwd_form, XtNvalue, typed_passwd, 0);
 
   XawDialogAddButton(passwd_form,"ok", passwd_done_cb, 0);
@@ -355,9 +343,15 @@ make_passwd_dialog (saver_info *si)
   passwd_done = XtNameToWidget(passwd_form,"ok");
   passwd_text = XtNameToWidget(passwd_form,"value");
 
-  XtAppAddActions(XtWidgetToApplicationContext(passwd_text), 
-                 actionsList, XtNumber(actionsList));
-  XtOverrideTranslations(passwd_text, XtParseTranslationTable(Translations));
+  XtAppAddActions(XtWidgetToApplicationContext(passwd_text),
+                 actions, XtNumber(actions));
+  XtOverrideTranslations(passwd_text, XtParseTranslationTable(translations));
+
+  /* Lose the label on the inner dialog. */
+  {
+    Widget w = XtNameToWidget(passwd_form, "label");
+    if (w) XtUnmanageChild(w);
+  }
 
 #else  /* HAVE_MOTIF */
 
@@ -368,15 +362,15 @@ make_passwd_dialog (saver_info *si)
 # ifdef VERIFY_CALLBACK_WORKS
   XtAddCallback (passwd_text, XmNmodifyVerifyCallback, check_passwd_cb, 0);
   XtAddCallback (passwd_text, XmNactivateCallback, check_passwd_cb, 0);
-# else
+# else  /* !VERIFY_CALLBACK_WORKS */
   XtAddCallback (passwd_text, XmNactivateCallback, passwd_done_cb, 0);
   XtOverrideTranslations (passwd_text, XtParseTranslationTable (translations));
-# endif
+# endif /* !VERIFY_CALLBACK_WORKS */
 
 # if defined(HAVE_MOTIF) && (XmVersion >= 1002)
   /* The focus stuff changed around; this didn't exist in 1.1.5. */
   XtVaSetValues (passwd_form, XmNinitialFocus, passwd_text, 0);
-# endif
+# endif /* HAVE_MOTIF && XmVersion >= 1002 */
 
   /* Another random thing necessary in 1.2.1 but not 1.1.5... */
   XtVaSetValues (roger_label, XmNborderWidth, 2, 0);
@@ -446,7 +440,7 @@ passwd_idle_timer (XtPointer closure, XtIntervalId *id)
 
       x = (w / 2);
 
-#ifdef __sgi   /* Kludge -- SGI's Motif hacks place buttons differently. */
+# ifdef __sgi  /* Kludge -- SGI's Motif hacks place buttons differently. */
       {
        static int sgi_mode = -1;
        if (sgi_mode == -1)
@@ -455,7 +449,7 @@ passwd_idle_timer (XtPointer closure, XtIntervalId *id)
        if (sgi_mode)
          x = d;
       }
-#endif /* __sgi */
+# endif /* __sgi */
 
       x -= d/2;
       y += d/2;
@@ -501,78 +495,6 @@ passwd_idle_timer (XtPointer closure, XtIntervalId *id)
 }
 
 
-#ifdef HAVE_ATHENA
-
-void
-pop_up_athena_dialog_box (Widget parent, Widget focus, Widget dialog,
-                         Widget form, int where)
-{
-  /* modified from demo.c */
-  /* I'm sure this is the wrong way to pop up a dialog box, but I can't
-     figure out how else to do it.
-
-     It's important that the screensaver dialogs not get decorated or
-     otherwise reparented by the window manager, because they need to be
-     children of the *real* root window, not the WM's virtual root, in
-     order for us to guarentee that they are visible above the screensaver
-     window itself.
-   */
-  Arg av [100];
-  int ac = 0;
-  Dimension sw, sh, x, y, w, h;
-
-  XtRealizeWidget(dialog);
-  sw = WidthOfScreen (XtScreen (dialog));
-  sh = HeightOfScreen (XtScreen (dialog));
-  ac = 0;
-  XtSetArg (av [ac], XtNwidth, &w); ac++;
-  XtSetArg (av [ac], XtNheight, &h); ac++;
-  XtGetValues (form, av, ac);
-  switch (where)
-    {
-    case 0:    /* center it in the top-right quadrant */
-      x = (sw/2 + w) / 2 + (sw/2) - w;
-      y = (sh/2 + h) / 2 - h;
-      break;
-    case 1:    /* center it in the bottom-right quadrant */
-      x = (sw/2 + w) / 2 + (sw/2) - w;
-      y = (sh/2 + h) / 2 + (sh/2) - h;
-      break;
-    case 2:    /* center it on the screen */
-      x = (sw + w) / 2 - w;
-      y = (sh + h) / 2 - h;
-      break;
-    default:
-      abort ();
-    }
-  if (x + w > sw) x = sw - w;
-  if (y + h > sh) y = sh - h;
-  ac = 0;
-  XtVaSetValues(dialog,
-               XtNx, x,
-               XtNy, y,
-               NULL);
-  XtVaSetValues(form,
-               XtNx, x,
-               XtNy, y,
-               NULL);
-  XtPopup(dialog,XtGrabNone);
-  steal_focus_and_colormap (focus);
-}
-
-static void
-passwd_set_label (char *buf, int len)
-{
-  Widget label;
-  if (!passwd_text)
-    return;
-  label=XtNameToWidget(XtParent(passwd_text),"*label");
-  XtVaSetValues(label,
-               XtNlabel, buf,
-               NULL);
-}
-#endif /* HAVE_ATHENA */
-
 static Bool
 pop_passwd_dialog (saver_info *si)
 {
@@ -602,25 +524,39 @@ pop_passwd_dialog (saver_info *si)
    */
   if (XtWindow (passwd_form))
     XMapRaised (dpy, XtWindow (passwd_dialog));
-#endif
+#endif /* HAVE_MOTIF && !DESTROY_WORKS */
 
   monitor_power_on (si);
-#ifdef HAVE_ATHENA
-  pop_up_athena_dialog_box (parent, passwd_text, passwd_dialog,
-                           passwd_form, 2);
-#else
   pop_up_dialog_box (passwd_dialog, passwd_form,
                     /* for debugging -- don't ask */
                     (si->prefs.debug_p ? 69 : 0) +
                     2);
   XtManageChild (passwd_form);
-#endif
+
+#ifdef HAVE_ATHENA
+  steal_focus_and_colormap (passwd_text);
+
+  /* For some reason, the passwd_form box is not stretching all the way
+     to the right edge of the window, despite being XtChainRight.
+     So... resize it by hand.
+  */
+  {
+    Dimension x=0, w=0, h=0;
+    XtVaGetValues(passwd_form, XtNx, &x, XtNwidth, &w, XtNheight, &h, 0);
+    XtVaGetValues(XtParent(passwd_form), XtNwidth, &w, 0);
+    w -= x;
+    w -= 6;
+    if (w > 0) XtResizeWidget(passwd_form, w, h, 0);
+  }
+
+#endif /* HAVE_ATHENA */
+
 
 #if defined(HAVE_MOTIF) && (XmVersion < 1002)
   /* The focus stuff changed around; this causes problems in 1.2.1
      but is necessary in 1.1.5. */
   XmProcessTraversal (passwd_text, XmTRAVERSE_CURRENT);
-#endif
+#endif /* HAVE_MOTIF && XmVersion < 1002 */
 
   passwd_idle_timer_tick = p->passwd_timeout / 1000;
   passwd_idle_id = XtAppAddTimeOut (si->app, 1000,  passwd_idle_timer,
@@ -663,21 +599,17 @@ pop_passwd_dialog (saver_info *si)
        case pw_cancel: lose = 0; break;
        default: abort ();
        }
+
 #ifdef HAVE_MOTIF
       XmProcessTraversal (passwd_cancel, 0); /* turn off I-beam */
-#endif
+#else  /* HAVE_ATHENA */
+      steal_focus_and_colormap (passwd_done);
+#endif /* HAVE_ATHENA */
+
       if (lose)
        {
-#ifdef HAVE_ATHENA
-         /* show the message */
-         passwd_set_label(lose,strlen(lose)+1);
-
-         /* and clear the password line */
-         memset(typed_passwd, 0, sizeof(typed_passwd));
-         text_field_set_string (passwd_text, "", 0);
-#else
          text_field_set_string (passwd_text, lose, strlen (lose) + 1);
-#endif
+
          passwd_idle_timer_tick = 1;
          passwd_idle_id = XtAppAddTimeOut (si->app, 3000, passwd_idle_timer,
                                (XtPointer) si);
@@ -699,9 +631,9 @@ pop_passwd_dialog (saver_info *si)
 #ifdef DESTROY_WORKS
   XtDestroyWidget (passwd_dialog);
   passwd_dialog = 0;
-#else
+#else  /* !DESTROY_WORKS */
   XUnmapWindow (XtDisplay (passwd_dialog), XtWindow (passwd_dialog));
-#endif
+#endif /* !DESTROY_WORKS */
   {
     XErrorHandler old_handler = XSetErrorHandler (BadWindow_ehandler);
     /* I don't understand why this doesn't refocus on the old selected
@@ -731,9 +663,11 @@ unlock_p (saver_info *si)
   static Bool initted = False;
   if (! initted)
     {
+
 #ifndef VERIFY_CALLBACK_WORKS
       XtAppAddActions (si->app, actions, XtNumber (actions));
-#endif
+#endif /* !VERIFY_CALLBACK_WORKS */
+
       passwd_dialog = 0;
       initted = True;
     }
index 0c999e2fcfd55cdef991c2712069e15b3243b902..0743a50e799e58733c2510615001cfb30b5455f5 100644 (file)
@@ -57,7 +57,7 @@ reset_stderr (saver_screen_info *ssi)
 
   if (si->prefs.debug_p)
     fprintf ((real_stderr ? real_stderr : stderr),
-            "%s: resetting stderr\n", progname);
+            "%s: resetting stderr\n", blurb());
 
   ssi->stderr_text_x = 0;
   ssi->stderr_text_y = 0;
@@ -207,7 +207,7 @@ make_stderr_overlay_window (saver_screen_info *ssi)
       if (si->prefs.debug_p)
        fprintf(real_stderr,
                "%s: using overlay visual 0x%0x for stderr text layer.\n",
-               progname, (int) XVisualIDFromVisual (visual));
+               blurb(), (int) XVisualIDFromVisual (visual));
 
       ssi->stderr_cmap = XCreateColormap(si->dpy,
                                         RootWindowOfScreen(ssi->screen),
index b2b341a8fde7e2af2f00e1dd423367e1f4cba260..1876f83290d06c624e085a134bb2fe009f5825e9 100644 (file)
@@ -93,7 +93,7 @@ nice_subproc (int nice_level)
     if (nice (n) == -1 && errno != 0)
       {
        char buf [512];
-       sprintf (buf, "%s: nice(%d) failed", progname, n);
+       sprintf (buf, "%s: nice(%d) failed", blurb(), n);
        perror (buf);
     }
   }
@@ -102,13 +102,13 @@ nice_subproc (int nice_level)
     {
       char buf [512];
       sprintf (buf, "%s: setpriority(PRIO_PROCESS, %lu, %d) failed",
-              progname, (unsigned long) getpid(), nice_level);
+              blurb(), (unsigned long) getpid(), nice_level);
       perror (buf);
     }
 #else
   fprintf (stderr,
           "%s: don't know how to change process priority on this system.\n",
-          progname);
+          blurb());
 
 #endif
 }
@@ -133,7 +133,7 @@ exec_simple_command (const char *command)
 
   {
     char buf [512];
-    sprintf (buf, "%s: could not execute \"%s\"", progname, av[0]);
+    sprintf (buf, "%s: could not execute \"%s\"", blurb(), av[0]);
     perror (buf);
 
     if (errno == ENOENT &&
@@ -191,7 +191,7 @@ exec_complex_command (const char *shell, const char *command)
 
   {
     char buf [512];
-    sprintf (buf, "%s: execvp(\"%s\") failed", progname, av[0]);
+    sprintf (buf, "%s: execvp(\"%s\") failed", blurb(), av[0]);
     perror (buf);
     fflush(stderr);
     fflush(stdout);
@@ -257,7 +257,7 @@ exec_screenhack (saver_info *si, const char *command)
 
   if (p->verbose_p)
     printf ("%s: spawning \"%s\" in pid %lu%s.\n",
-           progname, command, (unsigned long) getpid (),
+           blurb(), command, (unsigned long) getpid (),
            (hairy_p ? " (via shell)" : ""));
 
   if (hairy_p)
@@ -270,7 +270,7 @@ exec_screenhack (saver_info *si, const char *command)
 
 #else /* VMS */
   if (p->verbose_p)
-    printf ("%s: spawning \"%s\" in pid %lu.\n", progname, command, getpid());
+    printf ("%s: spawning \"%s\" in pid %lu.\n", blurb(), command, getpid());
   exec_vms_command (command);
 #endif /* VMS */
 
@@ -306,7 +306,7 @@ void
 show_job_list (void)
 {
   struct screenhack_job *job;
-  fprintf(stderr, "%s: job list:\n", progname);
+  fprintf(stderr, "%s: job list:\n", blurb());
   for (job = jobs; job; job = job->next)
     fprintf (stderr, "  %5ld: (%s) %s\n",
             (long) job->pid,
@@ -471,7 +471,7 @@ kill_job (saver_info *si, pid_t pid, int signal)
     {
       if (p->verbose_p)
        fprintf (stderr, "%s: no child %ld to signal!\n",
-                progname, (long) pid);
+                blurb(), (long) pid);
       goto DONE;
     }
 
@@ -487,14 +487,14 @@ kill_job (saver_info *si, pid_t pid, int signal)
 
 #ifdef SIGSTOP
   if (p->verbose_p)
-    fprintf (stderr, "%s: %s pid %lu.\n", progname,
+    fprintf (stderr, "%s: %s pid %lu.\n", blurb(),
             (signal == SIGTERM ? "killing" :
              signal == SIGSTOP ? "suspending" :
              signal == SIGCONT ? "resuming" : "signalling"),
             (unsigned long) job->pid);
 #else  /* !SIGSTOP */
   if (p->verbose_p)
-    fprintf (stderr, "%s: %s pid %lu.\n", progname, "killing",
+    fprintf (stderr, "%s: %s pid %lu.\n", blurb(), "killing",
             (unsigned long) job->pid);
 #endif /* !SIGSTOP */
 
@@ -504,12 +504,12 @@ kill_job (saver_info *si, pid_t pid, int signal)
     {
       if (errno == ESRCH)
        fprintf (stderr, "%s: child process %lu (%s) was already dead.\n",
-                progname, job->pid, job->name);
+                blurb(), job->pid, job->name);
       else
        {
          char buf [1024];
          sprintf (buf, "%s: couldn't kill child process %lu (%s)",
-                  progname, job->pid, job->name);
+                  blurb(), job->pid, job->name);
          perror (buf);
        }
     }
@@ -533,7 +533,7 @@ sigchld_handler (int sig)
   saver_info *si = global_si_kludge;   /* I hate C so much... */
 
   if (si->prefs.debug_p)
-    fprintf(stderr, "%s: got SIGCHLD%s\n", progname,
+    fprintf(stderr, "%s: got SIGCHLD%s\n", blurb(),
            (block_sigchld_handler ? " (blocked)" : ""));
 
   if (block_sigchld_handler < 0)
@@ -565,10 +565,10 @@ await_dying_children (saver_info *si)
       if (si->prefs.debug_p)
        {
          if (kid < 0 && errno)
-           fprintf (stderr, "%s: waitpid(-1) ==> %ld (%d)\n", progname,
+           fprintf (stderr, "%s: waitpid(-1) ==> %ld (%d)\n", blurb(),
                     (long) kid, errno);
          else
-           fprintf (stderr, "%s: waitpid(-1) ==> %ld\n", progname,
+           fprintf (stderr, "%s: waitpid(-1) ==> %ld\n", blurb(),
                     (long) kid);
        }
 
@@ -610,10 +610,10 @@ describe_dead_child (saver_info *si, pid_t kid, int wait_status)
           (p->verbose_p || job->status != job_killed)))
        fprintf (stderr,
                 "%s: child pid %lu (%s) exited abnormally (code %d).\n",
-                progname, (unsigned long) kid, name, exit_status);
+                blurb(), (unsigned long) kid, name, exit_status);
       else if (p->verbose_p)
        printf ("%s: child pid %lu (%s) exited normally.\n",
-               progname, (unsigned long) kid, name);
+               blurb(), (unsigned long) kid, name);
 
       if (job)
        job->status = job_dead;
@@ -625,7 +625,7 @@ describe_dead_child (saver_info *si, pid_t kid, int wait_status)
          job->status != job_killed ||
          WTERMSIG (wait_status) != SIGTERM)
        fprintf (stderr, "%s: child pid %lu (%s) terminated with %s.\n",
-                progname, (unsigned long) kid, name,
+                blurb(), (unsigned long) kid, name,
                 signal_name (WTERMSIG(wait_status)));
 
       if (job)
@@ -635,7 +635,7 @@ describe_dead_child (saver_info *si, pid_t kid, int wait_status)
     {
       if (p->verbose_p)
        fprintf (stderr, "%s: child pid %lu (%s) stopped with %s.\n",
-                progname, (unsigned long) kid, name,
+                blurb(), (unsigned long) kid, name,
                 signal_name (WSTOPSIG (wait_status)));
 
       if (job)
@@ -644,7 +644,7 @@ describe_dead_child (saver_info *si, pid_t kid, int wait_status)
   else
     {
       fprintf (stderr, "%s: child pid %lu (%s) died in a mysterious way!",
-              progname, (unsigned long) kid, name);
+              blurb(), (unsigned long) kid, name);
       if (job)
        job->status = job_dead;
     }
@@ -684,7 +684,7 @@ init_sigchld (void)
       if (sigaction(SIGCHLD, &action, &old) < 0)
        {
          char buf [255];
-         sprintf (buf, "%s: couldn't catch SIGCHLD", progname);
+         sprintf (buf, "%s: couldn't catch SIGCHLD", blurb());
          perror (buf);
        }
       sigchld_initialized_p = True;
@@ -695,7 +695,7 @@ init_sigchld (void)
   if (((long) signal (SIGCHLD, sigchld_handler)) == -1L)
     {
       char buf [255];
-      sprintf (buf, "%s: couldn't catch SIGCHLD", progname);
+      sprintf (buf, "%s: couldn't catch SIGCHLD", blurb());
       perror (buf);
     }
 # endif /* !HAVE_SIGACTION */
@@ -734,7 +734,7 @@ select_visual_of_hack (saver_screen_info *ssi, const char *hack)
               (si->demo_mode_p
                ? "%s: warning, no \"%s\" visual for \"%s\".\n"
                : "%s: no \"%s\" visual; skipping \"%s\".\n"),
-              progname, (vis ? vis : "???"), in);
+              blurb(), (vis ? vis : "???"), in);
     }
 
   return selected;
@@ -794,7 +794,7 @@ spawn_screenhack_1 (saver_screen_info *ssi, Bool first_time_p)
                  if (p->verbose_p)
                    fprintf(stderr,
                            "%s: no suitable visuals for these programs.\n",
-                           progname);
+                           blurb());
                  return;
                }
              else
@@ -823,7 +823,7 @@ spawn_screenhack_1 (saver_screen_info *ssi, Bool first_time_p)
       switch ((int) (forked = fork ()))
        {
        case -1:
-         sprintf (buf, "%s: couldn't fork", progname);
+         sprintf (buf, "%s: couldn't fork", blurb());
          perror (buf);
          restore_real_vroot (si);
          saver_exit (si, 1);
@@ -854,7 +854,7 @@ spawn_screenhack (saver_info *si, Bool first_time_p)
     {
       if (si->prefs.verbose_p)
        printf ("%s: server reports that monitor has powered down; "
-               "not launching a new hack.\n", progname);
+               "not launching a new hack.\n", blurb());
       return;
     }
 
@@ -955,7 +955,7 @@ restart_process (saver_info *si)
   execvp (saved_argv [0], saved_argv); /* shouldn't return */
   {
     char buf [512];
-    sprintf (buf, "%s: could not restart process", progname);
+    sprintf (buf, "%s: could not restart process", blurb());
     perror(buf);
     fflush(stderr);
   }
@@ -1150,12 +1150,12 @@ hack_uid_warn (saver_info *si)
   else if (hack_uid_errno == 0)
     {
       if (p->verbose_p)
-       printf ("%s: %s\n", progname, hack_uid_error);
+       printf ("%s: %s\n", blurb(), hack_uid_error);
     }
   else
     {
       char buf [255];
-      sprintf (buf, "%s: %s", progname, hack_uid_error);
+      sprintf (buf, "%s: %s", blurb(), hack_uid_error);
       if (hack_uid_errno == -1)
        fprintf (stderr, "%s\n", buf);
       else
index 89026d1bd6d5b168bba4004cf1966c243e1e1fc2..dbab1b387ec1cca5897ff84a8731cbf5becbcf40 100644 (file)
@@ -106,7 +106,7 @@ notice_events (saver_info *si, Window window, Bool top_p)
   if (top_p && p->verbose_p && (events & KeyPressMask))
     {
       /* Only mention one window per tree (hack hack). */
-      printf ("%s: selected KeyPress on 0x%lX\n", progname,
+      printf ("%s: selected KeyPress on 0x%lX\n", blurb(),
              (unsigned long) window);
       top_p = False;
     }
@@ -184,13 +184,13 @@ cycle_timer (XtPointer closure, XtIntervalId *id)
   if (si->dbox_up_p || si->question_up_p)
     {
       if (p->verbose_p)
-       printf ("%s: dialog box up; delaying hack change.\n", progname);
+       printf ("%s: dialog box up; delaying hack change.\n", blurb());
       how_long = 30000; /* 30 secs */
     }
   else
     {
       if (p->verbose_p)
-       printf ("%s: changing graphics hacks.\n", progname);
+       printf ("%s: changing graphics hacks.\n", blurb());
       kill_screenhack (si);
       spawn_screenhack (si, False);
     }
@@ -200,7 +200,7 @@ cycle_timer (XtPointer closure, XtIntervalId *id)
 #ifdef DEBUG_TIMERS
   if (p->verbose_p)
     printf ("%s: starting cycle_timer (%ld, %ld)\n",
-           progname, how_long, si->cycle_id);
+           blurb(), how_long, si->cycle_id);
 #endif /* DEBUG_TIMERS */
 }
 
@@ -212,7 +212,7 @@ activate_lock_timer (XtPointer closure, XtIntervalId *id)
   saver_preferences *p = &si->prefs;
 
   if (p->verbose_p)
-    printf ("%s: timed out; activating lock\n", progname);
+    printf ("%s: timed out; activating lock\n", blurb());
   si->locked_p = True;
 
 #ifdef HAVE_XHPDISABLERESET
@@ -237,7 +237,7 @@ reset_timers (saver_info *si)
 #ifdef DEBUG_TIMERS
   if (p->verbose_p)
     printf ("%s:   killing idle_timer    (%ld, %ld)\n",
-           progname, p->timeout, si->timer_id);
+           blurb(), p->timeout, si->timer_id);
 #endif /* DEBUG_TIMERS */
 
   XtRemoveTimeOut (si->timer_id);
@@ -248,7 +248,7 @@ reset_timers (saver_info *si)
 #ifdef DEBUG_TIMERS
   if (p->verbose_p)
     printf ("%s:   restarting idle_timer (%ld, %ld)\n",
-           progname, p->timeout, si->timer_id);
+           blurb(), p->timeout, si->timer_id);
 #endif /* DEBUG_TIMERS */
 
   si->last_activity_time = time ((time_t *) 0);
@@ -299,10 +299,10 @@ check_pointer_timer (XtPointer closure, XtIntervalId *id)
            root_y == ssi->poll_mouse_last_root_y &&
            child  == ssi->poll_mouse_last_child)
          printf ("%s: modifiers changed at %s on screen %d.\n",
-                 progname, timestring(), i);
+                 blurb(), timestring(), i);
        else
          printf ("%s: pointer moved at %s on screen %d.\n",
-                 progname, timestring(), i);
+                 blurb(), timestring(), i);
 #endif /* DEBUG_TIMERS */
 
       si->last_activity_screen    = ssi;
@@ -334,7 +334,7 @@ sleep_until_idle (saver_info *si, Bool until_idle_p)
 #ifdef DEBUG_TIMERS
          if (p->verbose_p)
            printf ("%s: starting idle_timer (%ld, %ld)\n",
-                   progname, p->timeout, si->timer_id);
+                   blurb(), p->timeout, si->timer_id);
 #endif /* DEBUG_TIMERS */
        }
 
@@ -359,7 +359,7 @@ sleep_until_idle (saver_info *si, Bool until_idle_p)
              {
                if (! XGetIdleTime (si->dpy, &idle))
                  {
-                   fprintf (stderr, "%s: XGetIdleTime() failed.\n", progname);
+                   fprintf (stderr, "%s: XGetIdleTime() failed.\n", blurb());
                    saver_exit (si, 1);
                  }
              }
@@ -399,7 +399,7 @@ sleep_until_idle (saver_info *si, Bool until_idle_p)
 #ifdef DEBUG_TIMERS
                if (p->verbose_p)
                  printf ("%s: starting idle_timer (%ld, %ld)\n",
-                         progname, p->timeout - idle, si->timer_id);
+                         blurb(), p->timeout - idle, si->timer_id);
 #endif /* DEBUG_TIMERS */
              }
          }
@@ -419,7 +419,7 @@ sleep_until_idle (saver_info *si, Bool until_idle_p)
 #ifdef DEBUG_TIMERS
            if (p->verbose_p)
              printf ("%s: starting notice_events_timer for 0x%X (%lu)\n",
-                     progname,
+                     blurb(),
                      (unsigned int) event.xcreatewindow.window,
                      p->notice_events_timeout);
 #endif /* DEBUG_TIMERS */
@@ -436,9 +436,9 @@ sleep_until_idle (saver_info *si, Bool until_idle_p)
        if (p->verbose_p)
          {
            if (event.xany.type == MotionNotify)
-             printf ("%s: MotionNotify at %s\n", progname, timestring ());
+             printf ("%s: MotionNotify at %s\n", blurb(), timestring ());
            else if (event.xany.type == KeyPress)
-             printf ("%s: KeyPress seen on 0x%X at %s\n", progname,
+             printf ("%s: KeyPress seen on 0x%X at %s\n", blurb(),
                      (unsigned int) event.xkey.window, timestring ());
          }
 #endif /* DEBUG_TIMERS */
@@ -462,7 +462,7 @@ sleep_until_idle (saver_info *si, Bool until_idle_p)
 # ifdef DEBUG_TIMERS
                if (p->verbose_p)
                  printf ("%s: ScreenSaverOn event received at %s\n",
-                         progname, timestring ());
+                         blurb(), timestring ());
 # endif /* DEBUG_TIMERS */
 
                /* Get the "real" server window(s) out of the way as soon
@@ -482,7 +482,7 @@ sleep_until_idle (saver_info *si, Bool until_idle_p)
 # ifdef DEBUG_TIMERS
                    fprintf (stderr,
                         "%s: ScreenSaverOn event wasn't of type External!\n",
-                            progname);
+                            blurb());
 # endif /* DEBUG_TIMERS */
                  }
 
@@ -494,7 +494,7 @@ sleep_until_idle (saver_info *si, Bool until_idle_p)
 # ifdef DEBUG_TIMERS
                if (p->verbose_p)
                  printf ("%s: ScreenSaverOff event received at %s\n",
-                         progname, timestring ());
+                         blurb(), timestring ());
 # endif /* DEBUG_TIMERS */
                if (!until_idle_p)
                  goto DONE;
@@ -502,7 +502,7 @@ sleep_until_idle (saver_info *si, Bool until_idle_p)
 # ifdef DEBUG_TIMERS
            else if (p->verbose_p)
              printf ("%s: unknown MIT-SCREEN-SAVER event received at %s\n",
-                     progname, timestring ());
+                     blurb(), timestring ());
 # endif /* DEBUG_TIMERS */
          }
        else
@@ -516,7 +516,7 @@ sleep_until_idle (saver_info *si, Bool until_idle_p)
 # ifdef DEBUG_TIMERS
            if (p->verbose_p)
              printf ("%s: ScreenSaverStart event received at %s\n",
-                     progname, timestring ());
+                     blurb(), timestring ());
 # endif /* DEBUG_TIMERS */
 
            if (until_idle_p)
@@ -528,7 +528,7 @@ sleep_until_idle (saver_info *si, Bool until_idle_p)
 # ifdef DEBUG_TIMERS
            if (p->verbose_p)
              printf ("%s: ScreenSaverEnd event received at %s\n",
-                     progname, timestring ());
+                     blurb(), timestring ());
 # endif /* DEBUG_TIMERS */
            if (!until_idle_p)
              goto DONE;
@@ -604,7 +604,7 @@ watchdog_timer (XtPointer closure, XtIntervalId *id)
 #ifdef DEBUG_TIMERS
          if (si->prefs.verbose_p)
            printf ("%s: watchdog timer raising %sscreen.\n",
-                   progname, (running_p ? "" : "and clearing "));
+                   blurb(), (running_p ? "" : "and clearing "));
 #endif /* DEBUG_TIMERS */
 
          raise_window (si, True, True, running_p);
@@ -613,7 +613,7 @@ watchdog_timer (XtPointer closure, XtIntervalId *id)
            {
              if (si->prefs.verbose_p)
                printf ("%s: server reports that monitor has powered down; "
-                       "killing running hacks.\n", progname);
+                       "killing running hacks.\n", blurb());
              kill_screenhack (si);
            }
        }
@@ -640,7 +640,7 @@ reset_watchdog_timer (saver_info *si, Bool on_p)
 #ifdef DEBUG_TIMERS
       if (p->verbose_p)
        printf ("%s: restarting watchdog_timer (%ld, %ld)\n",
-               progname, p->watchdog_timeout, si->watchdog_id);
+               blurb(), p->watchdog_timeout, si->watchdog_id);
 #endif /* DEBUG_TIMERS */
 
     }
index 1ec24e4e4af2fecdad427bf8f7900d172163edeb..a460e6da4937377d9727e951b449c6d4439d60b1 100644 (file)
@@ -95,7 +95,7 @@ grab_kbd(saver_info *si, Window w)
 
   if (p->debug_p)
     fprintf(stderr, "%s: XGrabKeyboard(... 0x%x ...) ==> %s\n",
-           progname, (unsigned long) w,
+           blurb(), (unsigned long) w,
            (status == GrabSuccess ? "GrabSuccess" :
             status == AlreadyGrabbed ? "AlreadyGrabbed" :
             status == GrabInvalidTime ? "GrabInvalidTime" :
@@ -138,7 +138,7 @@ grab_mouse (saver_info *si, Window w, Cursor cursor)
 
   if (p->debug_p)
     fprintf(stderr, "%s: XGrabPointer(... 0x%x, 0x%x ...) ==> %s\n",
-           progname, (unsigned long) w, (unsigned long) cursor,
+           blurb(), (unsigned long) w, (unsigned long) cursor,
            grab_string(status));
   return status;
 }
@@ -150,7 +150,7 @@ ungrab_kbd(saver_info *si)
   saver_preferences *p = &si->prefs;
   XUngrabKeyboard(si->dpy, CurrentTime);
   if (p->debug_p)
-    fprintf(stderr, "%s: XUngrabKeyboard (was 0x%x)\n", progname,
+    fprintf(stderr, "%s: XUngrabKeyboard (was 0x%x)\n", blurb(),
            (unsigned long) si->keyboard_grab_window);
   si->keyboard_grab_window = 0;
 }
@@ -162,7 +162,7 @@ ungrab_mouse(saver_info *si)
   saver_preferences *p = &si->prefs;
   XUngrabPointer(si->dpy, CurrentTime);
   if (p->debug_p)
-    fprintf(stderr, "%s: XUngrabPointer (was 0x%x)\n", progname,
+    fprintf(stderr, "%s: XUngrabPointer (was 0x%x)\n", blurb(),
            (unsigned long) si->mouse_grab_window);
   si->mouse_grab_window = 0;
 }
@@ -181,7 +181,7 @@ grab_keyboard_and_mouse (saver_info *si, Window window, Cursor cursor)
       status = grab_kbd (si, window);
       if (status != GrabSuccess)
        fprintf (stderr, "%s: couldn't grab keyboard!  (%s)\n",
-                progname, grab_string(status));
+                blurb(), grab_string(status));
     }
 
   status = grab_mouse (si, window, cursor);
@@ -191,7 +191,7 @@ grab_keyboard_and_mouse (saver_info *si, Window window, Cursor cursor)
       status = grab_mouse (si, window, cursor);
       if (status != GrabSuccess)
        fprintf (stderr, "%s: couldn't grab pointer!  (%s)\n",
-                progname, grab_string(status));
+                blurb(), grab_string(status));
     }
 }
 
@@ -244,7 +244,7 @@ ensure_no_screensaver_running (Display *dpy, Screen *screen)
 
          fprintf (stderr,
       "%s: already running on display %s (window 0x%x)\n from process %s.\n",
-                  progname, DisplayString (dpy), (int) kids [i], id);
+                  blurb(), DisplayString (dpy), (int) kids [i], id);
          status = True;
        }
     }
@@ -269,7 +269,7 @@ store_vroot_property (Display *dpy, Window win, Window value)
 #if 0
   if (p->verbose_p)
     fprintf (stderr,
-            "%s: storing XA_VROOT = 0x%x (%s) = 0x%x (%s)\n", progname
+            "%s: storing XA_VROOT = 0x%x (%s) = 0x%x (%s)\n", blurb()
             win,
             (win == screensaver_window ? "ScreenSaver" :
              (win == real_vroot ? "VRoot" :
@@ -288,7 +288,7 @@ remove_vroot_property (Display *dpy, Window win)
 {
 #if 0
   if (p->verbose_p)
-    fprintf (stderr, "%s: removing XA_VROOT from 0x%x (%s)\n", progname, win, 
+    fprintf (stderr, "%s: removing XA_VROOT from 0x%x (%s)\n", blurb(), win, 
             (win == screensaver_window ? "ScreenSaver" :
              (win == real_vroot ? "VRoot" :
               (win == real_vroot_value ? "Vroot_value" : "???"))));
@@ -328,13 +328,13 @@ kill_xsetroot_data (Display *dpy, Window window, Bool verbose_p)
        {
          if (verbose_p)
            printf ("%s: destroying xsetroot data (0x%lX).\n",
-                   progname, *dataP);
+                   blurb(), *dataP);
          XKillClient (dpy, *dataP);
        }
       else
        fprintf (stderr, "%s: deleted unrecognised _XSETROOT_ID property: \n\
        %lu, %lu; type: %lu, format: %d, nitems: %lu, bytesafter %ld\n",
-                progname, (unsigned long) dataP, (dataP ? *dataP : 0), type,
+                blurb(), (unsigned long) dataP, (dataP ? *dataP : 0), type,
                 format, nitems, bytesafter);
     }
 }
@@ -380,7 +380,7 @@ save_real_vroot (saver_screen_info *ssi)
          if (*vrootP == ssi->screensaver_window) abort ();
          fprintf (stderr,
            "%s: more than one virtual root window found (0x%x and 0x%x).\n",
-                  progname, (int) ssi->real_vroot, (int) kids [i]);
+                  blurb(), (int) ssi->real_vroot, (int) kids [i]);
          exit (1);
        }
       ssi->real_vroot = kids [i];
@@ -405,7 +405,7 @@ restore_real_vroot_2 (saver_screen_info *ssi)
   saver_preferences *p = &si->prefs;
   if (p->verbose_p && ssi->real_vroot)
     printf ("%s: restoring __SWM_VROOT property on the real vroot (0x%lx).\n",
-           progname, (unsigned long) ssi->real_vroot);
+           blurb(), (unsigned long) ssi->real_vroot);
   remove_vroot_property (si->dpy, ssi->screensaver_window);
   if (ssi->real_vroot)
     {
@@ -530,7 +530,7 @@ restore_real_vroot_handler (int sig)
   signal (sig, SIG_DFL);
   if (restore_real_vroot_1 (si))
     fprintf (real_stderr, "\n%s: %s intercepted, vroot restored.\n",
-            progname, signal_name(sig));
+            blurb(), signal_name(sig));
   kill (getpid (), sig);
 }
 
@@ -544,7 +544,7 @@ catch_signal (saver_info *si, int sig, Bool on_p)
       if (((long) signal (sig, restore_real_vroot_handler)) == -1L)
        {
          char buf [255];
-         sprintf (buf, "%s: couldn't catch %s", progname, signal_name(sig));
+         sprintf (buf, "%s: couldn't catch %s", blurb(), signal_name(sig));
          perror (buf);
          saver_exit (si, 1);
        }
@@ -603,9 +603,9 @@ saver_exit (saver_info *si, int status)
   emergency_kill_subproc (si);
 
   if (vrs && (p->verbose_p || status != 0))
-    fprintf (real_stderr, "%s: vroot restored, exiting.\n", progname);
+    fprintf (real_stderr, "%s: vroot restored, exiting.\n", blurb());
   else if (p->verbose_p)
-    fprintf (real_stderr, "%s: no vroot to restore; exiting.\n", progname);
+    fprintf (real_stderr, "%s: no vroot to restore; exiting.\n", blurb());
 
   fflush(real_stdout);
 
@@ -616,7 +616,7 @@ saver_exit (saver_info *si, int status)
 
   if (si->prefs.debug_p)
     {
-      fprintf(real_stderr, "%s: dumping core (because of -debug)\n", progname);
+      fprintf(real_stderr, "%s: dumping core (because of -debug)\n", blurb());
       /* Do this to drop a core file, so that we can get a stack trace. */
       abort();
     }
@@ -645,7 +645,7 @@ initialize_screensaver_window_1 (saver_screen_info *ssi)
 {
   saver_info *si = ssi->global;
   saver_preferences *p = &si->prefs;
-  Bool install_cmap_p = ssi->install_cmap_p;
+  Bool install_cmap_p = (ssi->install_cmap_p || p->install_cmap_p);
 
   /* This resets the screensaver window as fully as possible, since there's
      no way of knowing what some random client may have done to us in the
@@ -717,16 +717,19 @@ initialize_screensaver_window_1 (saver_screen_info *ssi)
     ;
   else if (ssi->current_visual == DefaultVisualOfScreen (ssi->screen))
     {
-      fprintf (stderr, "%s: using default visual ", progname);
-      describe_visual (stderr, ssi->screen, ssi->current_visual);
+      fprintf (stderr, "%s: using default visual ", blurb());
+      describe_visual (stderr, ssi->screen, ssi->current_visual,
+                      install_cmap_p);
     }
   else
     {
-      fprintf (stderr, "%s: using visual:   ", progname);
-      describe_visual (stderr, ssi->screen, ssi->current_visual);
-      fprintf (stderr, "%s: default visual: ", progname);
+      fprintf (stderr, "%s: using visual:   ", blurb());
+      describe_visual (stderr, ssi->screen, ssi->current_visual,
+                      install_cmap_p);
+      fprintf (stderr, "%s: default visual: ", blurb());
       describe_visual (stderr, ssi->screen,
-                      DefaultVisualOfScreen (ssi->screen));
+                      DefaultVisualOfScreen (ssi->screen),
+                      ssi->install_cmap_p);
     }
   printed_visual_info = True;
 
@@ -806,7 +809,7 @@ initialize_screensaver_window_1 (saver_screen_info *ssi)
       store_activate_time(si, True);
       if (p->verbose_p)
        fprintf (stderr, "%s: saver window is 0x%lx.\n",
-                progname, (unsigned long) ssi->screensaver_window);
+                blurb(), (unsigned long) ssi->screensaver_window);
     }
 
 #ifdef HAVE_MIT_SAVER_EXTENSION
@@ -913,7 +916,7 @@ raise_window (saver_info *si,
                                ssi->black_pixel);
        }
 
-      if (p->verbose_p) fprintf (stderr, "%s: fading... ", progname);
+      if (p->verbose_p) fprintf (stderr, "%s: fading... ", blurb());
 
       XGrabServer (si->dpy);                   /* ############ DANGER! */
 
@@ -1063,7 +1066,7 @@ unblank_screen (saver_info *si)
                                ssi->black_pixel);
        }
 
-      if (p->verbose_p) fprintf (stderr, "%s: unfading... ", progname);
+      if (p->verbose_p) fprintf (stderr, "%s: unfading... ", blurb());
 
 
       XSync (si->dpy, False);
@@ -1237,16 +1240,12 @@ select_visual (saver_screen_info *ssi, const char *visual_name)
 
       if (p->verbose_p)
        {
+         fprintf (stderr, "%s: switching to visual ", blurb());
+         describe_visual (stderr, ssi->screen, new_v, install_cmap_p);
 #if 0
-         fprintf (stderr, "%s: switching visuals\tfrom: ", progname);
-         describe_visual (stderr, ssi->screen, ssi->current_visual);
-         fprintf (stderr, "\t\t\t\tto:   ");
-         describe_visual (stderr, ssi->screen, new_v);
-         fprintf (stderr, "\t\t\t\t install cmap:   %s\n",
-                  (install_cmap_p ? "yes" : "no"));
-#else
-         fprintf (stderr, "%s: switching to visual ", progname);
-         describe_visual (stderr, ssi->screen, new_v);
+         fprintf (stderr, "%s:                from ", blurb());
+         describe_visual (stderr, ssi->screen, ssi->current_visual,
+                          was_installed_p);
 #endif
        }
 
@@ -1304,7 +1303,7 @@ select_visual (saver_screen_info *ssi, const char *visual_name)
 
       if (p->verbose_p)
        fprintf (stderr, "%s: destroyed old saver window 0x%lx.\n",
-                progname, (unsigned long) old_w);
+                blurb(), (unsigned long) old_w);
 
       if (old_c &&
          old_c != DefaultColormapOfScreen (ssi->screen) &&
index f3d345bc071dc878e04a3d05b0f3f440627c017b..a542d552bd56f789af1a3153ded2f49290b12b9a 100644 (file)
@@ -11,7 +11,7 @@
 .if n .sp 1
 .if t .sp .5
 ..
-.TH XScreenSaver 1 "21-Jun-98 (2.23)" "X Version 11"
+.TH XScreenSaver 1 "30-Jun-98 (2.24)" "X Version 11"
 .SH NAME
 xscreensaver-command - control a running xscreensaver process
 .SH SYNOPSIS
index f3f43a772747a098742b86cb6cf9ec0659126aae..accfbdf596f7c9b0053a520a405ed3ace8495322 100644 (file)
@@ -292,7 +292,7 @@ get_screenhacks (saver_info *si)
     {
       fprintf (stderr,
        "%s: the `monoPrograms' and `colorPrograms' resources are obsolete;\n\
-       see the manual for details.\n", progname);
+       see the manual for details.\n", blurb());
       free(d);
     }
 
@@ -376,6 +376,9 @@ get_screenhacks (saver_info *si)
 }
 
 
+static Bool blurb_timestamp_p = False;   /* kludge */
+
+
 static void
 get_resources (saver_info *si)
 {
@@ -383,6 +386,7 @@ get_resources (saver_info *si)
   saver_preferences *p = &si->prefs;
 
   p->verbose_p     = get_boolean_resource ("verbose", "Boolean");
+  p->timestamp_p    = get_boolean_resource ("timestamp", "Boolean");
   p->lock_p        = get_boolean_resource ("lock", "Boolean");
   p->fade_p        = get_boolean_resource ("fade", "Boolean");
   p->unfade_p      = get_boolean_resource ("unfade", "Boolean");
@@ -468,12 +472,12 @@ get_resources (saver_info *si)
     {
       p->lock_p = False;
       fprintf (stderr, "%s: not compiled with support for locking.\n",
-              progname);
+              blurb());
     }
 #else  /* ! NO_LOCKING */
   if (p->lock_p && si->locking_disabled_p)
     {
-      fprintf (stderr, "%s: locking is disabled (%s).\n", progname,
+      fprintf (stderr, "%s: locking is disabled (%s).\n", blurb(),
               si->nolock_reason);
       p->lock_p = False;
     }
@@ -485,8 +489,11 @@ get_resources (saver_info *si)
     {
       XSynchronize(si->dpy, True);
       p->verbose_p = True;
+      p->timestamp_p = True;
       p->initial_delay = 0;
     }
+
+  blurb_timestamp_p = p->timestamp_p;
 }
 
 
@@ -520,7 +527,7 @@ saver_ehandler (Display *dpy, XErrorEvent *error)
 {
   saver_info *si = global_si_kludge;   /* I hate C so much... */
 
-  fprintf (real_stderr, "\nX error in %s:\n", progname);
+  fprintf (real_stderr, "\nX error in %s:\n", blurb());
   if (XmuPrintDefaultErrorMessage (dpy, error, real_stderr))
     saver_exit (si, -1);
   else
@@ -528,13 +535,44 @@ saver_ehandler (Display *dpy, XErrorEvent *error)
   return 0;
 }
 
+
+const char *
+blurb (void)
+{
+  if (!blurb_timestamp_p)
+    return progname;
+  else
+    {
+      static char buf[255];
+      time_t now = time ((time_t *) 0);
+      char *ct = (char *) ctime (&now);
+      int n = strlen(progname);
+      if (n > 100) n = 99;
+      strncpy(buf, progname, n);
+      buf[n++] = ':';
+      buf[n++] = ' ';
+      strncpy(buf+n, ct+11, 8);
+      strcpy(buf+n+9, ": ");
+      return buf;
+    }
+}
+
 static void
 initialize_connection (saver_info *si, int argc, char **argv)
 {
   int i;
-  Widget toplevel_shell = XtAppInitialize (&si->app, progclass,
-                                          options, XtNumber (options),
-                                          &argc, argv, defaults, 0, 0);
+  Widget toplevel_shell;
+
+  /* The X resource database blows up if argv[0] has a "." in it. */
+  {
+    char *s = argv[0];
+    while ((s = strchr (s, '.')))
+      *s = '_';
+  }
+
+  toplevel_shell = XtAppInitialize (&si->app, progclass,
+                                   options, XtNumber (options),
+                                   &argc, argv, defaults, 0, 0);
 
   si->dpy = XtDisplay (toplevel_shell);
   si->db = XtDatabase (si->dpy);
@@ -554,7 +592,7 @@ initialize_connection (saver_info *si, int argc, char **argv)
     {
       const char *s = argv[1];
       fprintf (stderr, "%s: unknown option \"%s\".  Try \"-help\".\n",
-              progname, s);
+              blurb(), s);
 
       if (s[0] == '-' && s[1] == '-') s++;
       if (!strcmp (s, "-activate") ||
@@ -716,27 +754,27 @@ initialize (saver_info *si, int argc, char **argv)
        {
          fprintf (stderr,
         "%s: display %s does not support the SGI SCREEN_SAVER extension.\n",
-                  progname, DisplayString (si->dpy));
+                  blurb(), DisplayString (si->dpy));
          p->use_sgi_saver_extension = False;
        }
       else if (p->use_mit_saver_extension)
        {
          fprintf (stderr, "%s: SGI SCREEN_SAVER extension used instead\
  of MIT-SCREEN-SAVER extension.\n",
-                  progname);
+                  blurb());
          p->use_mit_saver_extension = False;
        }
       else if (p->use_xidle_extension)
        {
          fprintf (stderr,
         "%s: SGI SCREEN_SAVER extension used instead of XIDLE extension.\n",
-                  progname);
+                  blurb());
          p->use_xidle_extension = False;
        }
 #else  /* !HAVE_MIT_SAVER_EXTENSION */
       fprintf (stderr,
        "%s: not compiled with support for the SGI SCREEN_SAVER extension.\n",
-              progname);
+              blurb());
       p->use_sgi_saver_extension = False;
 #endif /* !HAVE_SGI_SAVER_EXTENSION */
     }
@@ -748,20 +786,20 @@ initialize (saver_info *si, int argc, char **argv)
        {
          fprintf (stderr,
         "%s: display %s does not support the MIT-SCREEN-SAVER extension.\n",
-                  progname, DisplayString (si->dpy));
+                  blurb(), DisplayString (si->dpy));
          p->use_mit_saver_extension = False;
        }
       else if (p->use_xidle_extension)
        {
          fprintf (stderr,
         "%s: MIT-SCREEN-SAVER extension used instead of XIDLE extension.\n",
-                  progname);
+                  blurb());
          p->use_xidle_extension = False;
        }
 #else  /* !HAVE_MIT_SAVER_EXTENSION */
       fprintf (stderr,
        "%s: not compiled with support for the MIT-SCREEN-SAVER extension.\n",
-              progname);
+              blurb());
       p->use_mit_saver_extension = False;
 #endif /* !HAVE_MIT_SAVER_EXTENSION */
     }
@@ -774,12 +812,12 @@ initialize (saver_info *si, int argc, char **argv)
        {
          fprintf (stderr,
                   "%s: display %s does not support the XIdle extension.\n",
-                  progname, DisplayString (si->dpy));
+                  blurb(), DisplayString (si->dpy));
          p->use_xidle_extension = False;
        }
 #else  /* !HAVE_XIDLE_EXTENSION */
       fprintf (stderr, "%s: not compiled with support for XIdle.\n",
-              progname);
+              blurb());
       p->use_xidle_extension = False;
 #endif /* !HAVE_XIDLE_EXTENSION */
     }
@@ -793,13 +831,13 @@ initialize (saver_info *si, int argc, char **argv)
 
   if (p->verbose_p && p->use_mit_saver_extension)
     fprintf (stderr, "%s: using MIT-SCREEN-SAVER server extension.\n",
-            progname);
+            blurb());
   if (p->verbose_p && p->use_sgi_saver_extension)
     fprintf (stderr, "%s: using SGI SCREEN_SAVER server extension.\n",
-            progname);
+            blurb());
   if (p->verbose_p && p->use_xidle_extension)
     fprintf (stderr, "%s: using XIdle server extension.\n",
-            progname);
+            blurb());
 
   initialize_stderr (si);
   XSetErrorHandler (saver_ehandler);
@@ -816,7 +854,7 @@ initialize (saver_info *si, int argc, char **argv)
        {
          if (p->verbose_p)
            {
-             printf ("%s: waiting for %d second%s...", progname,
+             printf ("%s: waiting for %d second%s...", blurb(),
                      (int) p->initial_delay,
                      (p->initial_delay == 1 ? "" : "s"));
              fflush (stdout);
@@ -827,7 +865,7 @@ initialize (saver_info *si, int argc, char **argv)
        }
       if (p->verbose_p)
        {
-         printf ("%s: selecting events on extant windows...", progname);
+         printf ("%s: selecting events on extant windows...", blurb());
          fflush (stdout);
        }
 
@@ -859,7 +897,7 @@ main_loop (saver_info *si)
 #endif /* !NO_DEMO_MODE */
        {
          if (p->verbose_p)
-           printf ("%s: user is idle; waking up at %s.\n", progname,
+           printf ("%s: user is idle; waking up at %s.\n", blurb(),
                    timestring());
          blank_screen (si);
          spawn_screenhack (si, True);
@@ -906,10 +944,10 @@ main_loop (saver_info *si)
                suspend_screenhack (si, True);
                XUndefineCursor (si->dpy, ssi->screensaver_window);
                if (p->verbose_p)
-                 printf ("%s: prompting for password.\n", progname);
+                 printf ("%s: prompting for password.\n", blurb());
                val = unlock_p (si);
                if (p->verbose_p && val == False)
-                 printf ("%s: password incorrect!\n", progname);
+                 printf ("%s: password incorrect!\n", blurb());
                si->dbox_up_p = False;
                XDefineCursor (si->dpy, ssi->screensaver_window, ssi->cursor);
                suspend_screenhack (si, False);
@@ -947,7 +985,7 @@ main_loop (saver_info *si)
 #endif /* !NO_LOCKING */
 
          if (p->verbose_p)
-           printf ("%s: user is active; going to sleep at %s.\n", progname,
+           printf ("%s: user is active; going to sleep at %s.\n", blurb(),
                    timestring ());
        }
     }
@@ -965,14 +1003,14 @@ handle_clientmessage (saver_info *si, XEvent *event, Bool until_idle_p)
       char *str;
       str = XGetAtomName (si->dpy, event->xclient.message_type);
       fprintf (stderr, "%s: unrecognised ClientMessage type %s received\n",
-              progname, (str ? str : "(null)"));
+              blurb(), (str ? str : "(null)"));
       if (str) XFree (str);
       return False;
     }
   if (event->xclient.format != 32)
     {
       fprintf (stderr, "%s: ClientMessage of format %d received, not 32\n",
-              progname, event->xclient.format);
+              blurb(), event->xclient.format);
       return False;
     }
 
@@ -982,7 +1020,7 @@ handle_clientmessage (saver_info *si, XEvent *event, Bool until_idle_p)
       if (until_idle_p)
        {
          if (p->verbose_p)
-           printf ("%s: ACTIVATE ClientMessage received.\n", progname);
+           printf ("%s: ACTIVATE ClientMessage received.\n", blurb());
          if (p->use_mit_saver_extension || p->use_sgi_saver_extension)
            {
              XForceScreenSaver (si->dpy, ScreenSaverActive);
@@ -995,14 +1033,14 @@ handle_clientmessage (saver_info *si, XEvent *event, Bool until_idle_p)
        }
       fprintf (stderr,
               "%s: ClientMessage ACTIVATE received while already active.\n",
-              progname);
+              blurb());
     }
   else if (type == XA_DEACTIVATE)
     {
       if (! until_idle_p)
        {
          if (p->verbose_p)
-           printf ("%s: DEACTIVATE ClientMessage received.\n", progname);
+           printf ("%s: DEACTIVATE ClientMessage received.\n", blurb());
          if (p->use_mit_saver_extension || p->use_sgi_saver_extension)
            {
              XForceScreenSaver (si->dpy, ScreenSaverReset);
@@ -1015,14 +1053,14 @@ handle_clientmessage (saver_info *si, XEvent *event, Bool until_idle_p)
        }
       fprintf (stderr,
               "%s: ClientMessage DEACTIVATE received while inactive.\n",
-              progname);
+              blurb());
     }
   else if (type == XA_CYCLE)
     {
       if (! until_idle_p)
        {
          if (p->verbose_p)
-           printf ("%s: CYCLE ClientMessage received.\n", progname);
+           printf ("%s: CYCLE ClientMessage received.\n", blurb());
          if (si->cycle_id)
            XtRemoveTimeOut (si->cycle_id);
          si->cycle_id = 0;
@@ -1030,12 +1068,12 @@ handle_clientmessage (saver_info *si, XEvent *event, Bool until_idle_p)
          return False;
        }
       fprintf (stderr, "%s: ClientMessage CYCLE received while inactive.\n",
-              progname);
+              blurb());
     }
   else if (type == XA_NEXT || type == XA_PREV)
     {
       if (p->verbose_p)
-       printf ("%s: %s ClientMessage received.\n", progname,
+       printf ("%s: %s ClientMessage received.\n", blurb(),
                (type == XA_NEXT ? "NEXT" : "PREV"));
       si->next_mode_p = 1 + (type == XA_PREV);
 
@@ -1055,7 +1093,7 @@ handle_clientmessage (saver_info *si, XEvent *event, Bool until_idle_p)
       if (until_idle_p || !si->locked_p)
        {
          if (p->verbose_p)
-           printf ("%s: EXIT ClientMessage received.\n", progname);
+           printf ("%s: EXIT ClientMessage received.\n", blurb());
          if (! until_idle_p)
            {
              unblank_screen (si);
@@ -1066,7 +1104,7 @@ handle_clientmessage (saver_info *si, XEvent *event, Bool until_idle_p)
        }
       else
        fprintf (stderr, "%s: EXIT ClientMessage received while locked.\n",
-                progname);
+                blurb());
     }
   else if (type == XA_RESTART)
     {
@@ -1076,7 +1114,7 @@ handle_clientmessage (saver_info *si, XEvent *event, Bool until_idle_p)
       if (until_idle_p || !si->locked_p)
        {
          if (p->verbose_p)
-           printf ("%s: RESTART ClientMessage received.\n", progname);
+           printf ("%s: RESTART ClientMessage received.\n", blurb());
          if (! until_idle_p)
            {
              unblank_screen (si);
@@ -1094,45 +1132,45 @@ handle_clientmessage (saver_info *si, XEvent *event, Bool until_idle_p)
        }
       else
        fprintf(stderr, "%s: RESTART ClientMessage received while locked.\n",
-               progname);
+               blurb());
     }
   else if (type == XA_DEMO)
     {
 #ifdef NO_DEMO_MODE
       fprintf (stderr, "%s: not compiled with support for DEMO mode\n",
-              progname);
+              blurb());
 #else
       if (until_idle_p)
        {
          if (p->verbose_p)
-           printf ("%s: DEMO ClientMessage received.\n", progname);
+           printf ("%s: DEMO ClientMessage received.\n", blurb());
          si->demo_mode_p = True;
          return True;
        }
       fprintf (stderr,
-              "%s: DEMO ClientMessage received while active.\n", progname);
+              "%s: DEMO ClientMessage received while active.\n", blurb());
 #endif
     }
   else if (type == XA_LOCK)
     {
 #ifdef NO_LOCKING
       fprintf (stderr, "%s: not compiled with support for LOCK mode\n",
-              progname);
+              blurb());
 #else
       if (si->locking_disabled_p)
        fprintf (stderr,
               "%s: LOCK ClientMessage received, but locking is disabled.\n",
-                progname);
+                blurb());
       else if (si->locked_p)
        fprintf (stderr,
               "%s: LOCK ClientMessage received while already locked.\n",
-                progname);
+                blurb());
       else
        {
          si->locked_p = True;
          if (p->verbose_p) 
            printf ("%s: LOCK ClientMessage received;%s locking.\n",
-                   progname, until_idle_p ? " activating and" : "");
+                   blurb(), until_idle_p ? " activating and" : "");
 
          if (si->lock_id)      /* we're doing it now, so lose the timeout */
            {
@@ -1162,11 +1200,11 @@ handle_clientmessage (saver_info *si, XEvent *event, Bool until_idle_p)
       if (str)
        fprintf (stderr,
                 "%s: unrecognised screensaver ClientMessage %s received\n",
-                progname, str);
+                blurb(), str);
       else
        fprintf (stderr,
                "%s: unrecognised screensaver ClientMessage 0x%x received\n",
-                progname, (unsigned int) event->xclient.data.l[0]);
+                blurb(), (unsigned int) event->xclient.data.l[0]);
       if (str) XFree (str);
     }
   return False;
index 92cba9672b3960b9e4257ffc6a99bb8744691fb2..db2f87841352ebb914628f8760c945a81a8cddd0 100644 (file)
@@ -37,10 +37,11 @@ typedef struct saver_screen_info saver_screen_info;
    command line, the resource database, or entered through a dialog box.
  */
 struct saver_preferences {
-  Bool verbose_p;
-  Bool lock_p;                 /* whether to lock as well as save */
+  Bool verbose_p;              /* whether to print out lots of status info */
+  Bool timestamp_p;            /* whether to mark messages with a timestamp */
+  Bool debug_p;                        /* pay no mind to the man behind the curtain */
 
-  Bool debug_p;
+  Bool lock_p;                 /* whether to lock as well as save */
   Bool fade_p;                 /* whether to fade to black */
   Bool unfade_p;               /* whether to fade from black */
   int fade_seconds;            /* how long that should take */
@@ -375,6 +376,7 @@ extern void clear_stderr (saver_screen_info *ssi);
    misc
    ======================================================================= */
 
+extern const char *blurb (void);
 extern void save_argv (int argc, char **argv);
 extern void saver_exit (saver_info *si, int status);
 extern void restart_process (saver_info *si);
index 6d646453cc27a1bdb89f090f9158b9b14b60ff90..3db467c4726038606295c727a3d83a45d62637f1 100644 (file)
@@ -11,7 +11,7 @@
 .if n .sp 1
 .if t .sp .5
 ..
-.TH XScreenSaver 1 "21-Jun-98 (2.23)" "X Version 11"
+.TH XScreenSaver 1 "30-Jun-98 (2.24)" "X Version 11"
 .SH NAME
 xscreensaver - graphics hack and screen locker, launched when the user is idle
 .SH SYNOPSIS
@@ -602,6 +602,27 @@ locking; for example, by using this pair of commands:
 xscreensaver-command -exit
 xscreensaver
 .EE
+If you get "connection refused" errors when running \fIxscreensaver\fP
+from \fIxdm\fP, then this probably means that you have
+.BR xauth (1)
+or some other security mechanism turned on.  One way around this is to
+add \fB"xhost\ +localhost"\fP to \fIXsetup\fP, just before \fIxscreensaver\fP
+is launched.  
+
+Note that this will give access to the X server to anyone capable of logging
+in to the local machine, so in some environments, this might not be 
+appropriate.  If turning off file-system-based access control is not
+acceptable, then running \fIxscreensaver\fP from \fIxdm\fP might not be
+possible, and users will have to launch it themselves instead of having it
+be launched by \fIxdm\fP before anyone logs in.
+
+For more information on the X server's access control mechanisms, see the
+man pages for
+.BR X (1),
+.BR Xsecurity (1),
+.BR xauth (1),
+and
+.BR xhost (1).
 .SH USING CDE (COMMON DESKTOP ENVIRONMENT)
 The easiest way to use \fIxscreensaver\fP on a system with CDE is to simply
 switch off the built-in CDE screensaver, and use \fIxscreensaver\fP instead;
@@ -814,13 +835,16 @@ in code intended for use as a screensaver.  This prevents too much graphics
 activity from being buffered up.
 .TP 8
 .B Locking and XDM
-If xscreensaver has been launched from XDM, you will need to cause the
-xscreensaver daemon to exit and restart in order to lock the screen.
+If xscreensaver has been launched from 
+.BR xdm (1),
+you will need to cause the xscreensaver daemon to exit and restart in 
+order to lock the screen.
 
-The reason for this is, if xscreensaver has been launched by XDM, that
-means it was launched \fIbefore\fP you logged in: so it has no way of
-knowing who the logged-in user is, and therefore, whose password it
-should prompt for.
+The reason for this is, if xscreensaver has been launched by 
+.BR xdm (1),
+that means it was launched \fIbefore\fP you logged in: so it has no way of
+knowing who the logged-in user is, and therefore, whose password it should
+prompt for.
 
 So if you want to use it as a locker, you must start it with your user id.
 If it has already been started by \fIxdm\fP, you can kill it by sending
@@ -830,6 +854,7 @@ something like the following in your personal X startup script:
 xscreensaver-command -exit
 xscreensaver &
 .EE
+See the ``\fIUsing XDM(1)\fP'' section, above, for more details.
 .TP 8
 .B Locking and root logins
 An implication of the above is that if you log in as \fIroot\fP on the
@@ -846,6 +871,24 @@ should log in as you, and
 to \fIroot\fP as necessary.  People who spend their day logged in 
 as \fIroot\fP are just begging for disaster.
 .TP 8
+.B XAUTH and XDM
+For xscreensaver to work when launched by
+.BR xdm (1),
+programs running on the local machine as user \fI"nobody"\fP must be
+able to connect to the X server.  This means that \fB"xhost +localhost"\fP
+is required if xscreensaver is to be launched by
+.BR xdm (1).
+This is \fInot\fP required if \fIxscreensaver\fP is launched by the
+individual users: it is only necessary when it is launched by
+.BR xdm (1),
+before any user has logged in.  See the ``\fIUsing XDM(1)\fP'' section, 
+above, for more details.
+
+If anyone has suggestions on how xscreensaver could be made to work with
+.BR xdm (1)
+without first turning off \fI.Xauthority\fP-based access control, please
+let me know.
+.TP 8
 .B Passwords
 If you get an error message like ``couldn't get password of \fIuser\fP'' 
 then this probably means that you're on a system in which the
@@ -998,6 +1041,9 @@ http://people.netscape.com/jwz/xscreensaver/
 .BR xscreensaver\-command (1),
 .BR xdm (1),
 .BR xset (1),
+.BR Xsecurity (1),
+.BR xauth (1),
+.BR xhost (1).
 .BR ant (1),
 .BR atlantis (1),
 .BR attraction (1),
index 142acc325a35fba988530f1123fb1989647a2c85..305ce846367944d2d8d4dfb2e4e3ca50a630c59f 100644 (file)
@@ -124,7 +124,7 @@ init_sgi_saver_extension (saver_info *si)
          fprintf (stderr,
        "%s: SGI SCREEN_SAVER extension exists, but can't be initialized;\n\
                perhaps some other screensaver program is already running?\n",
-                  progname);
+                  blurb());
          p->use_sgi_saver_extension = False;
          return;
        }
@@ -198,11 +198,11 @@ disable_builtin_screensaver (saver_info *si, Bool turn_off_p)
       if (desired_server_timeout == 0)
        printf ("%s%sisabling server builtin screensaver.\n\
        You can re-enable it with \"xset s on\".\n",
-               (p->verbose_p ? "" : progname),
+               (p->verbose_p ? "" : blurb()),
                (p->verbose_p ? "\n\tD" : ": d"));
 
       if (p->verbose_p)
-       fprintf (stderr, "%s: (xset s %d %d %s %s)\n", progname,
+       fprintf (stderr, "%s: (xset s %d %d %s %s)\n", blurb(),
                 desired_server_timeout, desired_server_interval,
                 (desired_prefer_blank ? "blank" : "noblank"),
                 (desired_allow_exp ? "noexpose" : "expose"));
@@ -333,7 +333,7 @@ monitor_power_on (saver_info *si)
       if (!monitor_powered_on_p (si))
        fprintf (stderr,
        "%s: DPMSForceLevel(dpy, DPMSModeOn) did not power the monitor on?\n",
-                progname);
+                blurb());
     }
 }
 
index ecc170c075525c30aa034c16ed27ba3ef048ae78..1b81c0f8fda5b8ca717a072ffcfa1cd9d9ac0b92 100644 (file)
@@ -78,7 +78,7 @@ SRCS          = attraction.c blitspin.c bouboule.c braid.c bubbles.c \
                  rd-bomb.c coral.c mountain.c triangle.c lissie.c worm.c \
                  rotor.c ant.c xjack.c xlyap.c jigsaw.c xscreensaver-sgigl.c \
                  cynosure.c moire2.c flow.c epicycle.c interference.c \
-                 truchet.c bsod.c crystal.c discrete.c
+                 truchet.c bsod.c crystal.c discrete.c distort.c kumppa.c
 
 OBJS           = attraction.o blitspin.o bouboule.o braid.o bubbles.o \
                  bubbles-default.o decayscreen.o deco.o drift.o flag.o \
@@ -92,7 +92,7 @@ OBJS          = attraction.o blitspin.o bouboule.o braid.o bubbles.o \
                  rd-bomb.o coral.o mountain.o triangle.o lissie.o worm.o \
                  rotor.o ant.o xjack.o xlyap.o jigsaw.o xscreensaver-sgigl.o \
                  cynosure.o moire2.o flow.o epicycle.o interference.o \
-                 truchet.o bsod.o crystal.o discrete.o
+                 truchet.o bsod.o crystal.o discrete.o distort.o kumppa.o
 
 EXES           = attraction blitspin bouboule braid bubbles decayscreen deco \
                  drift flag flame forest vines galaxy grav greynetic halo \
@@ -102,7 +102,7 @@ EXES                = attraction blitspin bouboule braid bubbles decayscreen deco \
                  slip sphere spiral strange swirl xroger goop starfish munch \
                  fadeplot rd-bomb coral mountain triangle lissie worm rotor \
                  ant xjack xlyap jigsaw cynosure moire2 flow epicycle \
-                 interference truchet bsod crystal discrete
+                 interference truchet bsod crystal discrete distort kumppa
 
 HACK_OBJS_1    = $(UTILS_BIN)/resources.o $(UTILS_BIN)/visual.o \
                  $(UTILS_BIN)/usleep.o $(UTILS_BIN)/yarandom.o @XMU_OBJS@
@@ -441,6 +441,12 @@ truchet: $(HACK_OBJS) truchet.o $(COL)
 bsod: $(HACK_OBJS) bsod.o $(COL)
        $(CC_HACK) -o $@ $(HACK_OBJS) bsod.o $(COL) $(HACK_LIBS) $(XPM_LIBS)
 
+distort:                $(HACK_OBJS) distort.o $(GRAB)
+       $(CC_HACK) -o $@ $(HACK_OBJS) distort.o $(GRAB) $(HACK_LIBS) $(GRAB_LIBS)
+
+kumppa:                 $(HACK_OBJS) kumppa.o
+       $(CC_HACK) -o $@ $(HACK_OBJS) kumppa.o $(HACK_LIBS)
+
 
 # The rules for those hacks which follow the `xlockmore' API.
 #
@@ -1356,4 +1362,22 @@ discrete.o: $(UTILS_SRC)/colors.h
 discrete.o: $(UTILS_SRC)/grabscreen.h
 discrete.o: $(UTILS_SRC)/visual.h
 discrete.o: $(UTILS_SRC)/erase.h
+distort.o: $(srcdir)/screenhack.h
+distort.o: ../config.h
+distort.o: $(UTILS_SRC)/yarandom.h
+distort.o: $(UTILS_SRC)/usleep.h
+distort.o: $(UTILS_SRC)/resources.h
+distort.o: $(UTILS_SRC)/hsv.h
+distort.o: $(UTILS_SRC)/colors.h
+distort.o: $(UTILS_SRC)/grabscreen.h
+distort.o: $(UTILS_SRC)/visual.h
+kumppa.o: $(srcdir)/screenhack.h
+kumppa.o: ../config.h
+kumppa.o: $(UTILS_SRC)/yarandom.h
+kumppa.o: $(UTILS_SRC)/usleep.h
+kumppa.o: $(UTILS_SRC)/resources.h
+kumppa.o: $(UTILS_SRC)/hsv.h
+kumppa.o: $(UTILS_SRC)/colors.h
+kumppa.o: $(UTILS_SRC)/grabscreen.h
+kumppa.o: $(UTILS_SRC)/visual.h
 
index 4946aeefde273ff2a7beb79a45eff9f87db9ed79..735033d191b587f2886a6aed4efa469e53e8cfe7 100644 (file)
@@ -1,6 +1,6 @@
 /* bubbles.c - frying pan / soft drink in a glass simulation */
 
-/*$Id: bubbles.c,v 1.14 1998/06/04 22:55:09 jwz Exp $*/
+/*$Id: bubbles.c,v 1.15 1998/06/21 23:49:25 jwz Exp $*/
 
 /*
  *  Copyright (C) 1995-1996 James Macnicol
index 809004c86eec14ee4b0a27dc4fd4764917c8e437..bcfa03f7739d2bf4911632f0a69124f23b6aed01 100644 (file)
@@ -12,6 +12,7 @@ $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) DECAYSCREEN.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) DECO.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) DISCRETE.C
+$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) DISTORT.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) DRIFT.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) EPICYCLE.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) FADEPLOT.C
@@ -33,6 +34,7 @@ $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) JIGSAW.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) JULIA.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) KALEIDESCOPE.C
+$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) KUMPPA.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) LASER.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) LIGHTNING.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) LISA.C
index 809004c86eec14ee4b0a27dc4fd4764917c8e437..bcfa03f7739d2bf4911632f0a69124f23b6aed01 100644 (file)
@@ -12,6 +12,7 @@ $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) DECAYSCREEN.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) DECO.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) DISCRETE.C
+$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) DISTORT.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) DRIFT.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) EPICYCLE.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) FADEPLOT.C
@@ -33,6 +34,7 @@ $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) JIGSAW.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) JULIA.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) KALEIDESCOPE.C
+$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) KUMPPA.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) LASER.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) LIGHTNING.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) LISA.C
diff --git a/hacks/distort.c b/hacks/distort.c
new file mode 100644 (file)
index 0000000..a26dfbb
--- /dev/null
@@ -0,0 +1,201 @@
+/* xscreensaver, Copyright (c) 1992, 1993, 1994, 1996, 1997, 1998
+ * Jamie Zawinski <jwz@netscape.com>
+ *
+ * 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.  No representations are made about the suitability of this
+ * software for any purpose.  It is provided "as is" without express or 
+ * implied warranty.
+ */
+
+/* distort
+ * by Jonas Munsin (jmunsin@iki.fi)
+ * it's a bit of a resource hog at the moment
+ * TODO:
+ *     -optimize for speed
+ *     -mutiple spheres/lenses (with bounces/layering)
+ *     -different distortion matrices
+ *     -randomize movement a bit
+ * program idea borrowed from a screensaver on a non-*NIX OS,
+ * code based on decayscreen by Jamie Zawinski
+ */
+
+#include <math.h>
+#include "screenhack.h"
+
+static int delay, radius, speed, size_x, size_y;
+static XWindowAttributes xgwa;
+static GC gc;
+static Pixmap orig_map, buffer_map;
+
+static int ***from;
+
+static void init_distort (Display *dpy, Window window) {
+       XGCValues gcv;
+       long gcflags;
+       int i, j;
+    
+       delay = get_integer_resource ("delay", "Integer");
+       radius = get_integer_resource ("radius", "Integer");
+       speed = get_integer_resource ("speed", "Integer");
+
+       if (delay < 0)
+               delay = 0;
+       if (radius <= 0)
+               radius = 60;
+       if (speed == 0) 
+               speed = 2;
+
+       XGetWindowAttributes (dpy, window, &xgwa);
+
+       gcv.function = GXcopy;
+       gcv.subwindow_mode = IncludeInferiors;
+       gcflags = GCForeground |GCFunction;
+       if (use_subwindow_mode_p(xgwa.screen, window)) /* see grabscreen.c */
+               gcflags |= GCSubwindowMode;
+       gc = XCreateGC (dpy, window, gcflags, &gcv);
+
+       size_x = xgwa.width;
+       size_y = xgwa.height;
+    
+       grab_screen_image (xgwa.screen, window);
+
+       orig_map = XCreatePixmap(dpy, window,
+                       xgwa.width, xgwa.height, xgwa.depth);
+       XCopyArea(dpy, window,
+                       orig_map, gc, 0, 0, xgwa.width, xgwa.height, 0, 0);
+       buffer_map = XCreatePixmap(dpy, window,
+                       2*radius + speed, 2*radius + speed,
+                       xgwa.depth);
+
+       from = (int ***)malloc ((2*radius+1) * sizeof(int **));
+       for(i = 0; i <= 2*radius; i++) {
+               from[i] = (int **)malloc((2*radius+1) * sizeof(int *));
+               for (j = 0; j <= 2*radius; j++)
+                       from[i][j] = (int *)malloc(2*sizeof(int));
+       }
+
+       /* initialize a "see-trough" matrix */
+       for (i = 0; i <= 2*radius; i++) {
+               for (j = 0 ; j <= 2*radius ; j++) {
+                       from[i][j][0]=i-radius/2;
+                       from[i][j][1]=j-radius/2;
+               }
+       }
+
+       /* initialize the distort matrix */
+       for (i = 0; i <= 2*radius; i++) {
+               for(j = 0; j <= 2*radius; j++) {
+                       double r;
+                       r = sqrt ((i-radius)*(i-radius)+(j-radius)*(j-radius));
+                       if (r < radius) {
+                               r = sin(r*(M_PI_2)/radius);
+                               if (i < radius)
+                                       from[i][j][0] = radius/2 + (i-radius)*r;
+                               else
+                                       from[i][j][0] = radius/2 + (i-radius)*r;
+                               if (j < radius)
+                                       from[i][j][1] = radius/2 + (j-radius)*r;
+                               else
+                                       from[i][j][1] = radius/2 + (j-radius)*r;
+                       }
+               }
+       }
+
+       XSetGraphicsExposures(dpy, gc, False); /* stop events from XCopyArea */
+}
+
+static void
+move_lens (int *x, int *y, int *xmove, int *ymove) {
+       if (*xmove==0)
+               *xmove=speed;
+       if (*ymove==0)
+               *ymove=speed;
+       if (*x==0)
+               *x = radius + (random() % (size_x-2*radius));
+       if (*y==0)
+               *y = radius + (random() % (size_y-2*radius));
+       if (*x + 3*radius/2 >= size_x)
+               *xmove = -abs(*xmove);
+       if (*x - radius/2 <= 0) 
+               *xmove = abs(*xmove);
+       if (*y + 3*radius/2 >= size_y)
+               *ymove = -abs(*ymove);
+       if (*y - radius/2 <= 0)
+               *ymove = abs(*ymove);
+
+       *x = *x + *xmove;
+       *y = *y + *ymove;
+}
+
+static void distort (Display *dpy, Window window)
+{
+       static int x, y, xmove=0, ymove=0;
+       int i,j;
+
+       move_lens (&x, &y, &xmove, &ymove);
+
+       XCopyArea(dpy, orig_map, buffer_map, gc,
+                       x-radius/2 - xmove, y-radius/2 - ymove,
+                       2*radius + abs(xmove), 2*radius + abs(ymove),
+                       0,0);
+
+       /* it's possible to lower the number of loop iterations by a factor
+        * of 4, but since it's the XCopyArea's which eat resources, and
+        * I've only supplied one distortion routine (which is circular),
+        * here's a check-if-inside circle variation of this for loop.
+        * Using both optimizations turns the matrix rendering into one
+        * ugly mess... I'm counting on gcc optimization ;)
+        */
+
+       for(i = 0 ; i <= 2*radius ; i++) {
+               for(j = 0 ; j <= 2*radius ; j++) {
+                       if (((radius-i)*(radius-i) + (j-radius)*(j-radius))
+                               < radius*radius) {
+                       XCopyArea (dpy, orig_map, buffer_map, gc,
+                                       x+from[i][j][0],
+                                       y+from[i][j][1],
+                                       1, 1, i + xmove, j+ymove);
+                       }
+               }
+       }
+
+       XCopyArea(dpy, buffer_map, window, gc, 0, 0,
+                       2*radius + abs(xmove), 2*radius + abs(ymove),
+                       x-radius/2 - xmove, y-radius/2 - ymove);
+}
+
+\f
+
+char *progclass = "Distort";
+
+char *defaults [] = {
+       "*dontClearRoot:                True",
+#ifdef __sgi    /* really, HAVE_READ_DISPLAY_EXTENSION */
+       "*visualID:                     Best",
+#endif
+
+       "*delay:                        10000",
+       "*radius:                       60",
+       "*speed:                        2",
+       0
+};
+
+XrmOptionDescRec options [] = {
+       { "-delay",     ".delay",       XrmoptionSepArg, 0 },
+       { "-radius",    ".radius",      XrmoptionSepArg, 0 },
+       { "-speed",     ".speed",       XrmoptionSepArg, 0 },
+       { 0, 0, 0, 0 }
+};
+               
+
+void screenhack (Display *dpy, Window window) {
+       init_distort (dpy, window);
+       while (1) {
+               distort (dpy, window);
+               XSync (dpy, True);
+               if (delay) usleep (delay);
+       }
+}
diff --git a/hacks/kumppa.c b/hacks/kumppa.c
new file mode 100644 (file)
index 0000000..953f3c3
--- /dev/null
@@ -0,0 +1,481 @@
+/*
+
+Copyright (C) Teemu Suutari (temisu@utu.fi) Feb 1998
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+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 X CONSORTIUM 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 X Consortium 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 X Consortium.
+
+*/
+
+
+
+
+/*
+
+*** This is contest-version. Don't look any further, code is *very* ugly.
+
+*/
+
+
+#include <math.h>
+#include "screenhack.h"
+
+#ifdef HAVE_XDBE_EXTENSION
+# include <X11/extensions/Xdbe.h>
+#endif /* HAVE_XDBE_EXTENSION */
+
+char *progclass="Kumppa";
+
+char *defaults [] ={
+       ".background:           black",
+       "*speed:                0.1",
+       "*delay:                0",
+       0
+};
+
+XrmOptionDescRec options [] = {
+       {"-delay",".delay",XrmoptionSepArg,0},
+       {"-speed",".speed",XrmoptionSepArg,0},
+       {"-random",".random",XrmoptionIsArg,0},
+#ifdef HAVE_XDBE_EXTENSION
+       {"-dbuf",".dbuf",XrmoptionIsArg,0},
+#endif /* HAVE_XDBE_EXTENSION */
+       {0,0,0,0}
+};
+
+const char colors[96]=
+       {0,0,255, 0,51,255, 0,102,255, 0,153,255, 0,204,255,
+       0,255,255,0,255,204, 0,255,153, 0,255,102, 0,255,51,
+       0,255,0, 51,255,0, 102,255,0, 153,255,0, 204,255,0,
+       255,255,0, 255,204,0, 255,153,0, 255,102,0, 255,51,0,
+       255,0,0, 255,0,51, 255,0,102, 255,0,153, 255,0,204,
+       255,0,255, 219,0,255, 182,0,255, 146,0,255, 109,0,255,
+       73,0,255, 37,0,255};
+const float cosinus[8][6]={{-0.07,0.12,-0.06,32,25,37},{0.08,-0.03,0.05,51,46,32},{0.12,0.07,-0.13,27,45,36},
+       {0.05,-0.04,-0.07,36,27,39},{-0.02,-0.07,0.1,21,43,42},{-0.11,0.06,0.02,51,25,34},{0.04,-0.15,0.02,42,32,25},
+       {-0.02,-0.04,-0.13,34,20,15}};
+
+static float acosinus[8][3]={{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}};
+static int coords[8];
+static int ocoords[8]={0,0,0,0,0,0,0,0};
+
+static Display *dpy;
+static Window win[2];
+static GC fgc[33];
+static GC cgc;
+static int sizx,sizy;
+static int midx,midy;
+static unsigned long delay;
+static Bool cosilines=True;
+#ifdef HAVE_XDBE_EXTENSION
+static Bool usedouble=False;
+#endif /* HAVE_XDBE_EXTENSION */
+
+static int *Xrotations;
+static int *Yrotations;
+static int *Xrottable;
+static int *Yrottable;
+
+static int *rotateX;
+static int *rotateY;
+
+static int rotsizeX,rotsizeY;
+static int stateX,stateY;
+
+static int rx,ry;
+
+
+int Satnum(int maxi)
+{
+return (int)(maxi*frand(1));
+}
+
+
+void palaRotate(int x,int y)
+{
+int ax,ay,bx,by,cx,cy;
+
+ax=rotateX[x];
+ay=rotateY[y];
+bx=rotateX[x+1]+2;
+by=rotateY[y+1]+2;
+cx=rotateX[x]-(y-ry)+x-rx;
+cy=rotateY[y]+(x-rx)+y-ry;
+if (cx<0)
+       {
+       ax-=cx;
+       cx=0;
+       }
+if (cy<0)
+       {
+       ay-=cy;
+       cy=0;
+       }
+if (cx+bx-ax>sizx) bx=ax-cx+sizx;
+if (cy+by-ay>sizy) by=ay-cy+sizy;
+if (ax<bx && ay<by)
+       XCopyArea(dpy,win[0],win[1],cgc,ax,ay,bx-ax,by-ay,cx,cy);
+}
+
+
+void rotate(void)
+{
+int x,y;
+int dx,dy;
+
+rx=Xrottable[stateX+1]-Xrottable[stateX];
+ry=Yrottable[stateX+1]-Yrottable[stateY];
+
+
+for (x=0;x<=rx;x++)
+       rotateX[x]=(x)?midx-1-Xrotations[Xrottable[stateX+1]-x]:0;
+for (x=0;x<=rx;x++)
+       rotateX[x+rx+1]=(x==rx)?sizx-1:midx+Xrotations[Xrottable[stateX]+x];
+for (y=0;y<=ry;y++)
+       rotateY[y]=(y)?midy-1-Yrotations[Yrottable[stateY+1]-y]:0;
+for (y=0;y<=ry;y++)
+       rotateY[y+ry+1]=(y==ry)?sizy-1:midy+Yrotations[Yrottable[stateY]+y];
+
+x=(rx>ry)?rx:ry;
+for (dy=0;dy<(x+1)<<1;dy++)
+       for (dx=0;dx<(x+1)<<1;dx++)
+               {
+               y=(rx>ry)?ry-rx:0;
+               if (dy+y>=0 && dy<(ry+1)<<1 && dx<(rx+1)<<1)
+                       if (dy+y+dx<=ry+rx && dy+y-dx<=ry-rx)
+                               {
+                               palaRotate((rx<<1)+1-dx,dy+y);
+                               palaRotate(dx,(ry<<1)+1-dy-y);
+                               }
+               y=(ry>rx)?rx-ry:0;
+               if (dy+y>=0 && dx<(ry+1)<<1 && dy<(rx+1)<<1)
+                       if (dy+y+dx<=ry+rx && dx-dy-y>=ry-rx)
+                               {
+                               palaRotate(dy+y,dx);
+                               palaRotate((rx<<1)+1-dy-y,(ry<<1)+1-dx);
+                               }
+               }
+stateX++;
+if (stateX==rotsizeX) stateX=0;
+stateY++;
+if (stateY==rotsizeY) stateY=0;
+}
+
+
+
+Bool make_rots(double xspeed,double yspeed)
+{
+int a,b,c,f,g,j,k,l;
+double m,om,ok;
+double d,ix,iy;
+int maxi;
+
+Bool *chks;
+
+rotsizeX=(int)(2/xspeed+1);
+ix=(double)(midx+1)/(double)(rotsizeX);
+rotsizeY=(int)(2/yspeed+1);
+iy=(double)(midy+1)/(double)(rotsizeY);
+
+Xrotations=malloc((midx+2)*sizeof(unsigned int));
+Xrottable=malloc((rotsizeX+1)*sizeof(unsigned int));
+Yrotations=malloc((midy+2)*sizeof(unsigned int));
+Yrottable=malloc((rotsizeY+1)*sizeof(unsigned int));
+chks=malloc(((midx>midy)?midx:midy)*sizeof(Bool));
+if (!Xrottable || !Yrottable || !Xrotations || !Yrotations || !chks) return False;
+
+
+maxi=0;
+c=0;
+d=0;
+g=0;
+for (a=0;a<midx;a++) chks[a]=True;
+for (a=0;a<rotsizeX;a++)
+       {
+       Xrottable[a]=c;
+       f=(int)(d+ix)-g;                                /*viivojen lkm.*/
+       g+=f;
+       if (g>midx)
+               {
+               f-=g-midx;
+               g=midx;
+               }
+       for (b=0;b<f;b++)
+               {
+               m=0;
+               for (j=0;j<midx;j++)                    /*testi*/
+                       {
+                       if (chks[j])
+                               {
+                               om=0;
+                               ok=1;
+                               l=0;
+                               while (j+l<midx && om+12*ok>m)
+                                       {
+                                       if (j-l>=0) if (chks[j-l]) om+=ok;
+                                               else; else if (chks[l-j]) om+=ok;
+                                       if (chks[j+l]) om+=ok;
+                                       ok/=1.5;
+                                       l++;
+                                       }
+                               if (om>=m)
+                                       {
+                                       k=j;
+                                       m=om;
+                                       }
+                               }
+                       }
+               chks[k]=False;
+               l=c;
+               while (l>=Xrottable[a])
+                       {
+                       if (l!=Xrottable[a]) Xrotations[l]=Xrotations[l-1];
+                       if (k>Xrotations[l] || l==Xrottable[a])
+                               {
+                               Xrotations[l]=k;
+                               c++;
+                               l=Xrottable[a];
+                               }
+                       l--;
+                       }
+               }
+       d+=ix;
+       if (maxi<c-Xrottable[a]) maxi=c-Xrottable[a];
+       }
+Xrottable[a]=c;
+rotateX=malloc((maxi+2)*sizeof(int)<<1);
+if (!rotateX) return False;
+
+maxi=0;
+c=0;
+d=0;
+g=0;
+for (a=0;a<midy;a++) chks[a]=True;
+for (a=0;a<rotsizeY;a++)
+       {
+       Yrottable[a]=c;
+       f=(int)(d+iy)-g;                                /*viivojen lkm.*/
+       g+=f;
+       if (g>midy)
+               {
+               f-=g-midy;
+               g=midy;
+               }
+       for (b=0;b<f;b++)
+               {
+               m=0;
+               for (j=0;j<midy;j++)                    /*testi*/
+                       {
+                       if (chks[j])
+                               {
+                               om=0;
+                               ok=1;
+                               l=0;
+                               while (j+l<midy && om+12*ok>m)
+                                       {
+                                       if (j-l>=0) if (chks[j-l]) om+=ok;
+                                               else; else if (chks[l-j]) om+=ok;
+                                       if (chks[j+l]) om+=ok;
+                                       ok/=1.5;
+                                       l++;
+                                       }
+                               if (om>=m)
+                                       {
+                                       k=j;
+                                       m=om;
+                                       }
+                               }
+                       }
+               chks[k]=False;
+               l=c;
+               while (l>=Yrottable[a])
+                       {
+                       if (l!=Yrottable[a]) Yrotations[l]=Yrotations[l-1];
+                       if (k>Yrotations[l] || l==Yrottable[a])
+                               {
+                               Yrotations[l]=k;
+                               c++;
+                               l=Yrottable[a];
+                               }
+                       l--;
+                       }
+
+               }
+       d+=iy;
+       if (maxi<c-Yrottable[a]) maxi=c-Yrottable[a];
+       }
+Yrottable[a]=c;
+rotateY=malloc((maxi+2)*sizeof(int)<<1);
+if (!rotateY) return False;
+
+free(chks);
+return (True);
+}
+
+
+Bool InitializeAll(void)
+{
+XGCValues xgcv;
+XWindowAttributes xgwa;
+XSetWindowAttributes xswa;
+Colormap cmap;
+XColor color;
+int n,i;
+double rspeed;
+
+XGetWindowAttributes(dpy,win[0],&xgwa);
+cmap=xgwa.colormap;
+xswa.backing_store=Always;
+XChangeWindowAttributes(dpy,win[0],CWBackingStore,&xswa);
+xgcv.function=GXcopy;
+
+xgcv.foreground=get_pixel_resource ("background", "Background", dpy, cmap);
+fgc[32]=XCreateGC(dpy,win[0],GCForeground|GCFunction,&xgcv);
+
+n=0;
+if (mono_p)
+       {
+       fgc[0]=fgc[32];
+       xgcv.foreground=get_pixel_resource ("foreground", "Foreground", dpy, cmap);
+       fgc[1]=XCreateGC(dpy,win[0],GCForeground|GCFunction,&xgcv);
+       for (i=0;i<32;i+=2) fgc[i]=fgc[0];
+       for (i=1;i<32;i+=2) fgc[i]=fgc[1];
+       } else
+       for (i=0;i<32;i++)
+       {
+               color.red=colors[n++]<<8;
+               color.green=colors[n++]<<8;
+               color.blue=colors[n++]<<8;
+               color.flags=DoRed|DoGreen|DoBlue;
+               XAllocColor(dpy,cmap,&color);
+               xgcv.foreground=color.pixel;
+               fgc[i]=XCreateGC(dpy,win[0],GCForeground|GCFunction,&xgcv);
+       }
+cgc=XCreateGC(dpy,win[0],GCForeground|GCFunction,&xgcv);
+XSetGraphicsExposures(dpy,cgc,False);
+
+if (get_string_resource("random","String")!=NULL && get_string_resource("random","String")[0]!=0) cosilines=False;
+
+#ifdef HAVE_XDBE_EXTENSION
+if (get_string_resource("dbuf","String")!=NULL && get_string_resource("dbuf","String")[0]!=0) usedouble=True;
+if (usedouble)
+       {
+       XdbeQueryExtension(dpy,&n,&i);
+       if (n==0 && i==0)
+               {
+               fprintf(stderr,"Double buffer extension not supported!\n");
+               usedouble=False;
+               }
+       }
+if (usedouble) win[1]=XdbeAllocateBackBufferName(dpy,win[0],XdbeUndefined);
+#endif /* HAVE_XDBE_EXTENSION */
+
+delay=get_integer_resource("delay","Integer");
+rspeed=get_float_resource("speed","Float");
+if (rspeed<0.0001 || rspeed>0.2)
+       {
+       fprintf(stderr,"Speed not in valid range! (0.0001 - 0.2), using 0.1 \n");
+       rspeed=0.1;
+       }
+
+sizx=xgwa.width;
+sizy=xgwa.height;
+midx=sizx>>1;
+midy=sizy>>1;
+stateX=0;
+stateY=0;
+
+if (!make_rots(rspeed,rspeed))
+       {
+       fprintf(stderr,"Not enough memory for tables!\n");
+       return False;
+       }
+return True;
+}
+
+
+void screenhack(Display *d, Window w)
+{
+#ifdef HAVE_XDBE_EXTENSION
+XdbeSwapInfo xdswp;
+#endif /* HAVE_XDBE_EXTENSION */
+int a,b,c,e;
+float f;
+
+dpy=d;
+win[0]=w;
+if (!InitializeAll()) return;
+
+#ifdef HAVE_XDBE_EXTENSION
+if (usedouble)
+       {
+       xdswp.swap_action=XdbeUndefined;
+       xdswp.swap_window=win[0];
+       }
+ else
+#endif /* HAVE_XDBE_EXTENSION */
+   win[1]=win[0];
+
+while (0==0)
+       {
+       if (cosilines)
+               {
+               c++;
+               for (a=0;a<8;a++)
+                       {
+                       f=0;
+                       for (b=0;b<3;b++)
+                               {
+                               acosinus[a][b]+=cosinus[a][b];
+                               f+=cosinus[a][b+3]*sin((double)acosinus[a][b]);
+                               }
+                       coords[a]=(int)f;
+                       }
+               for (a=0;a<4;a++)
+                       {
+                       XDrawLine(dpy,win[0],(mono_p)?fgc[1]:fgc[((a<<2)+c)&31],midx+ocoords[a<<1],midy+ocoords[(a<<1)+1]
+                       ,midx+coords[a<<1],midy+coords[(a<<1)+1]);
+                       ocoords[a<<1]=coords[a<<1];
+                       ocoords[(a<<1)+1]=coords[(a<<1)+1];
+                       }
+
+               } else {
+               for (e=0;e<8;e++)
+                       {
+                       a=Satnum(50);
+                       if (a>=32) a=32;
+                       b=Satnum(32)-16+midx;
+                       c=Satnum(32)-16+midy;
+                       XFillRectangle(dpy,win[0],fgc[a],b,c,2,2);
+                       }
+               }
+       XFillRectangle(dpy,win[0],fgc[32],midx-2,midy-2,4,4);
+       rotate();
+#ifdef HAVE_XDBE_EXTENSION
+       if (usedouble) XdbeSwapBuffers(dpy,&xdswp,1);
+#endif /* HAVE_XDBE_EXTENSION */
+       XSync(dpy,True);
+       if (delay) usleep (delay);
+       }
+}
index dbb77535155b64474d892a50d4c8a032fc9ba6cb..2593f235dad23be6df40b8f27a368a6dc5cfe9f3 100644 (file)
@@ -1,6 +1,35 @@
 /******************************************************************************
  * [ maze ] ...
  *
+ * modified:  [ 6-28-98 ]  Zack Weinberg <zack@rabi.phys.columbia.edu>
+ *
+ *              Made the maze-solver somewhat more intelligent.  There are
+ *              three optimizations:
+ *
+ *              - Straight-line lookahead: the solver does not enter dead-end
+ *                corridors.  This is a win with all maze generators.
+ *
+ *              - First order direction choice: the solver knows where the
+ *                exit is in relation to itself, and will try paths leading in
+ *                that direction first. This is a major win on maze generator 1
+ *                which tends to offer direct routes to the exit.
+ *
+ *              - Dead region elimination: the solver already has a map of
+ *                all squares visited.  Whenever it starts to backtrack, it
+ *                consults this map and marks off all squares that cannot be
+ *                reached from the exit without crossing a square already
+ *                visited.  Those squares can never contribute to the path to
+ *                the exit, so it doesn't bother checking them.  This helps a
+ *                lot with maze generator 2 and somewhat less with generator 1.
+ *
+ *              Further improvements would require knowledge of the wall map
+ *              as well as the position of the exit and the squares visited.
+ *              I would consider that to be cheating.  Generator 0 makes
+ *              mazes which are remarkably difficult to solve mechanically --
+ *              even with these optimizations the solver generally must visit
+ *              at least two-thirds of the squares.  This is partially
+ *              because generator 0's mazes have longer paths to the exit.
+ *
  * modified:  [ 4-10-97 ]  Johannes Keukelaar <johannes@nada.kth.se>
  *              Added multiple maze creators. Robustified solver.
  *              Added bridge option.
@@ -69,10 +98,16 @@ static int solve_delay, pre_solve_delay, post_solve_delay;
 
 #define MOVE_LIST_SIZE  (MAX_MAZE_SIZE_X * MAX_MAZE_SIZE_Y)
 
-#define WALL_TOP       0x8000
-#define WALL_RIGHT     0x4000
-#define WALL_BOTTOM    0x2000
-#define WALL_LEFT      0x1000
+#define NOT_DEAD       0x8000
+#define SOLVER_VISIT    0x4000
+#define START_SQUARE   0x2000
+#define END_SQUARE     0x1000
+
+#define WALL_TOP       0x8
+#define WALL_RIGHT     0x4
+#define WALL_BOTTOM    0x2
+#define WALL_LEFT      0x1
+#define WALL_ANY       0xF
 
 #define DOOR_IN_TOP    0x800
 #define DOOR_IN_RIGHT  0x400
@@ -85,15 +120,13 @@ static int solve_delay, pre_solve_delay, post_solve_delay;
 #define DOOR_OUT_BOTTOM        0x20
 #define DOOR_OUT_LEFT  0x10
 
-#define SOLVER_VISIT    0x4
-#define START_SQUARE   0x2
-#define END_SQUARE     0x1
 
 #define        border_x        (0)
 #define        border_y        (0)
 
 #define        get_random(x)   (random() % (x))
-  
+
+
 static int logo_x, logo_y;
 
 #ifdef XROGER
@@ -111,7 +144,7 @@ static unsigned short maze[MAX_MAZE_SIZE_X][MAX_MAZE_SIZE_Y];
 static struct {
   unsigned char x;
   unsigned char y;
-  unsigned char dir;
+  unsigned char dir, ways;
 } move_list[MOVE_LIST_SIZE], save_path[MOVE_LIST_SIZE], path[MOVE_LIST_SIZE];
 
 static int maze_size_x, maze_size_y;
@@ -122,7 +155,7 @@ static int bw;
 
 static Display *dpy;
 static Window  win;
-static GC      gc, cgc, tgc, logo_gc, erase_gc;
+static GC      gc, cgc, tgc, sgc, ugc, logo_gc, erase_gc;
 static Pixmap  logo_map;
 
 static int     x = 0, y = 0, restart = 0, stop = 1, state = 1, max_length;
@@ -1094,8 +1127,8 @@ draw_maze_border (void)                         /* draw the maze outline */
                  border_x + 3 + grid_width * logo_x,
                  border_y + 3 + grid_height * logo_y, 1);
     }
-  draw_solid_square (start_x, start_y, start_dir, tgc);
-  draw_solid_square (end_x, end_y, end_dir, tgc);
+  draw_solid_square (start_x, start_y, WALL_TOP >> start_dir, tgc);
+  draw_solid_square (end_x, end_y, WALL_TOP >> end_dir, tgc);
 }
 
 
@@ -1210,85 +1243,269 @@ draw_solid_square(int i, int j,          /* draw a solid square in a square */
                  int dir, GC gc)
 {
   switch (dir) {
-  case 0: XFillRectangle(dpy, win, gc,
-                        border_x + bw + grid_width * i, 
-                        border_y - bw + grid_height * j, 
-                        grid_width - (bw+bw), grid_height);
-    break;
-  case 1: XFillRectangle(dpy, win, gc,
-                        border_x + bw + grid_width * i, 
-                        border_y + bw + grid_height * j, 
-                        grid_width, grid_height - (bw+bw));
-    break;
-  case 2: XFillRectangle(dpy, win, gc,
-                        border_x + bw + grid_width * i, 
-                        border_y + bw + grid_height * j, 
-                        grid_width - (bw+bw), grid_height);
-    break;
-  case 3: XFillRectangle(dpy, win, gc,
-                        border_x - bw + grid_width * i, 
-                        border_y + bw + grid_height * j, 
-                        grid_width, grid_height - (bw+bw));
-    break;
+  case WALL_TOP:
+      XFillRectangle(dpy, win, gc,
+                    border_x + bw + grid_width * i, 
+                    border_y - bw + grid_height * j, 
+                    grid_width - (bw+bw), grid_height);
+      break;
+  case WALL_RIGHT:
+      XFillRectangle(dpy, win, gc,
+                    border_x + bw + grid_width * i, 
+                    border_y + bw + grid_height * j, 
+                    grid_width, grid_height - (bw+bw));
+      break;
+  case WALL_BOTTOM:
+      XFillRectangle(dpy, win, gc,
+                    border_x + bw + grid_width * i, 
+                    border_y + bw + grid_height * j, 
+                    grid_width - (bw+bw), grid_height);
+      break;
+  case WALL_LEFT:
+      XFillRectangle(dpy, win, gc,
+                    border_x - bw + grid_width * i, 
+                    border_y + bw + grid_height * j, 
+                    grid_width, grid_height - (bw+bw));
+      break;
   }
   XSync (dpy, False);
 }
 
+int
+longdeadend_p(int x1, int y1, int x2, int y2, int endwall)
+{
+    int dx = x2 - x1, dy = y2 - y1;
+    int sidewalls;
+
+    sidewalls = endwall | (endwall >> 2 | endwall << 2);
+    sidewalls = ~sidewalls & WALL_ANY;
+
+    while((maze[x2][y2] & WALL_ANY) == sidewalls)
+    {
+       x2 += dx;
+       y2 += dy;
+    }
+
+    if((maze[x2][y2] & WALL_ANY) == (sidewalls | endwall))
+    {
+       endwall = (endwall >> 2 | endwall << 2) & WALL_ANY;
+       while(x1 != x2 || y1 != y2)
+       {
+           x1 += dx;
+           y1 += dy;
+           draw_solid_square(x1, y1, endwall, sgc);
+           maze[x1][y1] |= SOLVER_VISIT;
+       }
+       return 1;
+    }
+    else
+       return 0;
+}
+
+/* Find all dead regions -- areas from which the goal cannot be reached --
+   and mark them visited. */
+void
+find_dead_regions(void)
+{
+    int x, y, flipped;
+
+    /* Find all not SOLVER_VISIT squares bordering NOT_DEAD squares
+       and mark them NOT_DEAD also.  Repeat until no more such squares. */
+    maze[start_x][start_y] |= NOT_DEAD;
+    
+    do
+    {
+       flipped = 0;
+       for(x = 0; x < maze_size_x; x++)
+           for(y = 0; y < maze_size_y; y++)
+               if(!(maze[x][y] & (SOLVER_VISIT | NOT_DEAD))
+                  && (   (x && (maze[x-1][y] & NOT_DEAD))
+                      || (y && (maze[x][y-1] & NOT_DEAD))))
+               {
+                   flipped = 1;
+                   maze[x][y] |= NOT_DEAD;
+               }
+       for(x = maze_size_x-1; x >= 0; x--)
+           for(y = maze_size_y-1; y >= 0; y--)
+               if(!(maze[x][y] & (SOLVER_VISIT | NOT_DEAD))
+                  && (   (x != maze_size_x-1 && (maze[x+1][y] & NOT_DEAD))
+                      || (y != maze_size_y-1 && (maze[x][y+1] & NOT_DEAD))))
+               {
+                   flipped = 1;
+                   maze[x][y] |= NOT_DEAD;
+               }
+    }
+    while(flipped);
+
+    for (y = 0; y < maze_size_y; y++)
+      for (x = 0; x < maze_size_x; x++)
+      {
+       if (maze[x][y] & NOT_DEAD)
+         maze[x][y] &= ~NOT_DEAD;
+       else if (!(maze[x][y] & SOLVER_VISIT))
+       {
+         maze[x][y] |= SOLVER_VISIT;
+         if((x < logo_x || x > logo_x + logo_width / grid_width) ||
+            (y < logo_y || y > logo_y + logo_height / grid_height))
+         {
+           if (!maze[x][y] & WALL_ANY)
+             XFillRectangle(dpy, win, ugc,
+                            border_x + bw + grid_width * x,
+                            border_y + bw + grid_height * y,
+                            grid_width - (bw+bw), grid_height - (bw+bw));
+           else
+           {
+             if (! (maze[x][y] & WALL_LEFT))
+               draw_solid_square(x, y, WALL_LEFT, ugc);
+             if (! (maze[x][y] & WALL_RIGHT))
+               draw_solid_square(x, y, WALL_RIGHT, ugc);
+             if (! (maze[x][y] & WALL_TOP))
+               draw_solid_square(x, y, WALL_TOP, ugc);
+             if (! (maze[x][y] & WALL_BOTTOM))
+               draw_solid_square(x, y, WALL_BOTTOM, ugc);
+           }
+         }
+       }
+      }
+    XSync(dpy, 0);
+}
 
 static void
 solve_maze (void)                     /* solve it with graphical feedback */
 {
-  int i;
-  int step_x[4] = { 0, 1, 0, -1 };
-  int step_y[4] = { -1, 0, 1, 0 };
+    int i, dir, from, x, y, ways, bt;
+
+    /* plug up the surrounding wall */
+    maze[end_x][end_y] |= (WALL_TOP >> end_dir);
     
-  /* plug up the surrounding wall */
-  maze[start_x][start_y] |= (WALL_TOP >> start_dir);
-  maze[end_x][end_y] |= (WALL_TOP >> end_dir);
-  
-  /* initialize search path */
-  i = 0;
-  path[i].x = end_x;
-  path[i].y = end_y;
-  path[i].dir = -1;
-  maze[end_x][end_y] |= SOLVER_VISIT;
-  
-  /* do it */
-  while (1) {
-    if ( ++path[i].dir >= 4 ) {
-      XFillRectangle(dpy, win, cgc,
-                    border_x + bw + grid_width * (int)(path[i].x),
-                    border_y + bw + grid_height * (int)(path[i].y),
-                    grid_width - (bw+bw), grid_height - (bw+bw));
-      i--;
-      if(i<0) /* Can't solve this maze. */
+    /* initialize search path */
+    i = 0;
+    path[i].x = end_x;
+    path[i].y = end_y;
+    path[i].dir = 0;
+    maze[end_x][end_y] |= SOLVER_VISIT;
+    
+    /* do it */
+    while (1)
+    {
+       if ( maze[path[i].x][path[i].y] & START_SQUARE )
+           return;
+
+       /* Abort solve on expose - cheapo repaint strategy */
+       if (check_events()) return;
+       
+       if (solve_delay) usleep (solve_delay);
+       
+       if(!path[i].dir)
+       {
+           ways = 0;
+           /* First visit this square.  Which adjacent squares are open? */
+           for(dir = WALL_TOP; dir & WALL_ANY; dir >>= 1)
+           {
+               if(maze[path[i].x][path[i].y] & dir)
+                   continue;
+               
+               y = path[i].y - !!(dir & WALL_TOP) + !!(dir & WALL_BOTTOM);
+               x = path[i].x + !!(dir & WALL_RIGHT) - !!(dir & WALL_LEFT);
+               
+               if(maze[x][y] & SOLVER_VISIT)
+                   continue;
+               
+               from = (dir << 2 & WALL_ANY) | (dir >> 2 & WALL_ANY);
+               /* don't enter obvious dead ends */
+               if(((maze[x][y] & WALL_ANY) | from) != WALL_ANY)
+               {
+                   if(!longdeadend_p(path[i].x, path[i].y, x, y, dir))
+                       ways |= dir;
+               }
+               else
+               {
+                   draw_solid_square(x, y, from, sgc);
+                   maze[x][y] |= SOLVER_VISIT;
+               }
+           }
+       }
+       else
+           ways = path[i].ways;
+       /* ways now has a bitmask of open paths. */
+       
+       if(!ways)
+           goto backtrack;
+      
+       x = path[i].x - start_x;
+       y = path[i].y - start_y;
+       /* choice one */
+       if(abs(y) <= abs(x))
+           dir = (x > 0) ? WALL_LEFT : WALL_RIGHT;
+       else
+           dir = (y > 0) ? WALL_TOP : WALL_BOTTOM;
+       
+       if(dir & ways)
+           goto found;
+       
+       /* choice two */
+       switch(dir)
+       {
+       case WALL_LEFT:
+       case WALL_RIGHT:
+           dir = (y > 0) ? WALL_TOP : WALL_BOTTOM; break;
+       case WALL_TOP:
+       case WALL_BOTTOM:
+           dir = (x > 0) ? WALL_LEFT : WALL_RIGHT;
+       }
+       
+       if(dir & ways)
+           goto found;
+       
+       /* choice three */
+       
+       dir = (dir << 2 & WALL_ANY) | (dir >> 2 & WALL_ANY);
+       if(dir & ways)
+           goto found;
+       
+       /* choice four */
+       dir = ways;
+       if(!dir)
+           goto backtrack;
+
+    found:
+       bt = 0;
+       ways &= ~dir;  /* tried this one */
+       
+       y = path[i].y - !!(dir & WALL_TOP) + !!(dir & WALL_BOTTOM);
+       x = path[i].x + !!(dir & WALL_RIGHT) - !!(dir & WALL_LEFT);
+       
+       /* advance in direction dir */
+       path[i].dir = dir;
+       path[i].ways = ways;
+       draw_solid_square(path[i].x, path[i].y, dir, tgc);
+       
+       i++;
+       path[i].dir = 0;
+       path[i].ways = 0;
+       path[i].x = x;
+       path[i].y = y;
+       maze[x][y] |= SOLVER_VISIT;
+       continue;
+
+    backtrack:
+       if(i == 0)
        {
-         printf("Unsolvable maze.\n");
-         return;
+           printf("Unsolvable maze.\n");
+           return;
        }
-      draw_solid_square( (int)(path[i].x), (int)(path[i].y), 
-                       (int)(path[i].dir), cgc);
+
+       if(!bt)
+           find_dead_regions();
+       bt = 1;
+       from = path[i-1].dir;
+       from = (from << 2 & WALL_ANY) | (from >> 2 & WALL_ANY);
+       
+       draw_solid_square(path[i].x, path[i].y, from, cgc);
+       i--;
     }
-    else if ( (! (maze[path[i].x][path[i].y] & (WALL_TOP >> path[i].dir))) && 
-            (!( maze[path[i].x+step_x[path[i].dir]]
-                   [path[i].y+step_y[path[i].dir]]&SOLVER_VISIT)) ) {
-      path[i+1].x = path[i].x+step_x[path[i].dir];
-      path[i+1].y = path[i].y+step_y[path[i].dir];
-      path[i+1].dir = -1;
-      draw_solid_square(path[i].x, path[i].y, path[i].dir, tgc);
-      i++;
-      maze[path[i].x][path[i].y] |= SOLVER_VISIT;
-      if ( maze[path[i].x][path[i].y] & START_SQUARE ) {
-       return;
-      }
-    } 
-    if (check_events()) return;
-    /* Abort solve on expose - cheapo repaint strategy */
-    if (solve_delay) usleep (solve_delay);
-  }
 } 
 
-
 #if 0
 static void
 enter_square (int n)                      /* move into a neighboring square */
@@ -1332,6 +1549,8 @@ char *defaults[] = {
   "*postDelay: 4000000",
   "*liveColor: green",
   "*deadColor: red",
+  "*skipColor:  orange",
+  "*surroundColor: slateblue",
   "*generator:  -1",
   "*maxLength:  5",
   "*syncDraw:   False",
@@ -1349,6 +1568,8 @@ XrmOptionDescRec options[] = {
   { "-post-delay",     ".postDelay",   XrmoptionSepArg, 0 },
   { "-live-color",     ".liveColor",   XrmoptionSepArg, 0 },
   { "-dead-color",     ".deadColor",   XrmoptionSepArg, 0 },
+  { "-skip-color",     ".skipColor",   XrmoptionSepArg, 0 },
+  { "-surround-color", ".surroundColor",XrmoptionSepArg, 0 },
   { "-generator",       ".generator",   XrmoptionSepArg, 0 },
   { "-max-length",      ".maxLength",   XrmoptionSepArg, 0 },
   { "-bridge",          ".bridge",      XrmoptionNoArg, "True" },
@@ -1366,7 +1587,7 @@ screenhack(Display *display, Window window)
   Pixmap gray;
   int size, root, generator, this_gen;
   XWindowAttributes xgwa;
-  unsigned long bg, fg, pfg, pbg, lfg;
+  unsigned long bg, fg, pfg, pbg, lfg, sfg, ufg;
 
   size = get_integer_resource ("gridSize", "Dimension");
   root = get_boolean_resource("root", "Boolean");
@@ -1393,9 +1614,11 @@ screenhack(Display *display, Window window)
   if (! root)
     XSelectInput (dpy, win, ExposureMask|ButtonPressMask|StructureNotifyMask);
   
-  gc = XCreateGC(dpy, win, 0, 0);
+  gc  = XCreateGC(dpy, win, 0, 0);
   cgc = XCreateGC(dpy, win, 0, 0);
-  tgc = XCreateGC(dpy,win,0,0);
+  tgc = XCreateGC(dpy, win, 0, 0);
+  sgc = XCreateGC(dpy, win, 0, 0);
+  ugc = XCreateGC(dpy, win, 0, 0);
   logo_gc = XCreateGC(dpy, win, 0, 0);
   erase_gc = XCreateGC(dpy, win, 0, 0);
   
@@ -1406,6 +1629,8 @@ screenhack(Display *display, Window window)
   lfg = get_pixel_resource ("logoColor", "Foreground", dpy, xgwa.colormap);
   pfg = get_pixel_resource ("liveColor", "Foreground", dpy, xgwa.colormap);
   pbg = get_pixel_resource ("deadColor", "Foreground", dpy, xgwa.colormap);
+  sfg = get_pixel_resource ("skipColor", "Foreground", dpy, xgwa.colormap);
+  ufg = get_pixel_resource ("surroundColor", "Foreground", dpy, xgwa.colormap);
   if (mono_p) lfg = pfg = fg;
 
   if (lfg == bg)
@@ -1419,6 +1644,10 @@ screenhack(Display *display, Window window)
   XSetBackground (dpy, cgc, bg);
   XSetForeground (dpy, tgc, pfg);
   XSetBackground (dpy, tgc, bg);
+  XSetForeground (dpy, sgc, sfg);
+  XSetBackground (dpy, sgc, bg);
+  XSetForeground (dpy, ugc, ufg);
+  XSetBackground (dpy, ugc, bg);
   XSetForeground (dpy, logo_gc, lfg);
   XSetBackground (dpy, logo_gc, bg);
   XSetForeground (dpy, erase_gc, bg);
@@ -1426,6 +1655,10 @@ screenhack(Display *display, Window window)
 
   XSetStipple (dpy, cgc, gray);
   XSetFillStyle (dpy, cgc, FillOpaqueStippled);
+  XSetStipple (dpy, sgc, gray);
+  XSetFillStyle (dpy, sgc, FillOpaqueStippled);
+  XSetStipple (dpy, ugc, gray);
+  XSetFillStyle (dpy, ugc, FillOpaqueStippled);
   
 #ifdef XROGER
   {
index 1321995a47a0eb9700fad04d2fc9272ed8b50075..f48265059ead8f18bf1beba750ae3698c582042a 100644 (file)
@@ -34,6 +34,17 @@ The color of the path.
 .B \-dead\-color \fIcolor\fP
 The color of the failed path (it is also stippled with a 50% pattern.)
 .TP 8
+.B \-skip\-color \fIcolor\fP
+The maze solver will choose to not go down a path if it can "see" (in a
+straight line) that it is a dead end.  This is the color to use for paths
+that are skipped for this reason.
+.TP 8
+.B \-surround\-color \fIcolor\fP
+If the maze solver ever completely encloses an area within the maze, then
+it knows that the exit is not in there (and in fact the interior of that
+area might not even be reachable.)  It will mark out those cells using this
+color.
+.TP 8
 .B \-solve\-delay \fIinteger\fP
 Delay (in microseconds) between each step of the solution path.
 Default 5000, or about 1/200th second.
@@ -121,6 +132,7 @@ WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
 OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 .SH AUTHOR(s)
 .nf
+Zack Weinberg [ Smarter maze-solver ] zack@rabi.phys.columbia.edu
 Johannes Keukelaar [ Generators 1 and 2 ] johannes@nada.kth.se 
   Royal Institute of Technology, Stockholm, Sweden
 Jim Randell    [ XScreenSaver version ] jmr@mddjmr.fc.hp.com
index 7bbc4079b920fbadd506fa1d78107ad44e8fed9e..a2ab029b99c0cb54e99b8660e75ada37f0bde51e 100755 (executable)
@@ -308,8 +308,11 @@ main() {
       if [ -s $tmp_ppm2 ]; then
         if [ "$verbose" = true ]; then
           echo "launching xv $xvargs $tmp_ppm2" >&2
+         ls -lF $tmp_ppm2
         fi
-        xv $xvargs $tmp_ppm2 &
+
+       # cat the file so that we can nuke it without racing against xv.
+        cat $tmp_ppm2 | xv $xvargs - &
         pid=$!
       fi
     fi
@@ -324,4 +327,4 @@ main() {
 main $@
 
 # to find stray xv data:
-# xwininfo -root -children|grep 'xv image comments' | awk '{print $1}'
+# xwininfo -root -children|grep 'xv image comments' | awk '{print "xkill -id ", $1}'
index 00f3b0315d60caf6866f8c0effcf35c38cba5d62..d6d2d1e0124c597813a397849c9337694777c6a6 100644 (file)
--- a/setup.com
+++ b/setup.com
@@ -16,6 +16,7 @@ $ cynosure    :== $'mydir'cynosure
 $ decayscreen  :== $'mydir'decayscreen
 $ deco         :== $'mydir'deco
 $ discrete     :== $'mydir'discrete
+$ distort      :== $'mydir'distort
 $ drift                :== $'mydir'drift
 $ epicycle     :== $'mydir'epicycle
 $ fadeplot     :== $'mydir'fadeplot
@@ -37,6 +38,7 @@ $ interference        :== $'mydir'interference
 $ jigsaw       :== $'mydir'jigsaw
 $ julia                :== $'mydir'julia
 $ kaleidescope :== $'mydir'kaleidescope
+$ kumppa       :== $'mydir'kumppa
 $ laser                :== $'mydir'laser
 $ lightning    :== $'mydir'lightning
 $ lisa         :== $'mydir'lisa
index ef96cd5f64bb0e7a1da93f77e52c3ac8e8fc97ac..17fd7b664a331f1059a5db5d29641c783e1d73f2 100644 (file)
@@ -1,6 +1,79 @@
 # utils/Makefile.in --- xscreensaver, Copyright (c) 1997 Jamie Zawinski.
 # the `../configure' script generates `utils/Makefile' from this file.
 
+
+# The utilities in this directory are used mostly by the demos in ../hacks/.
+# The Makefile in that directory builds executables by simply referencing
+# the .o files in this directory.
+
+
+##############################################################################
+#
+# Some rambling about dynamic libraries follows, ignore it if you don't care
+# (which is almost assuredly the case.)
+#
+#
+# It would probably be sensible to just build a single .a file in this
+# directory, and link the hacks against that (statically.)  I haven't done
+# that for two reasons: first, it works now, and why fix what ain't broke;
+# second, it wouldn't actually improve anything for the end user (it would
+# just make the Makefiles be a little smaller.)
+#
+# People sometimes suggest that the stuff in this directory should be in a
+# dynamic library, and that the hacks should be linked dynamically against
+# it.  I haven't done this for a number of reasons:
+#
+#  *  First, the only thing that would improve would be disk space, in that
+#     the executable files themselves would be smaller.  That's it.  Many other
+#     things would get worse if we used a dynamic library:
+#
+#  *  Complication of installation procedures: suddenly, before any of the
+#     hacks will work, you need to have a dynamic library installed, and
+#     the system configured to use it.  This is, basically, rocket science.
+#     Most people don't know how to do this, it's a huge pain, and on many
+#     systems, it requires root access.
+#
+#  *  Complication of the Makefile: every system builds dynamic libraries
+#     differently.  Every compiler takes different flags.  I don't want to
+#     do the hand-holding for the scores of Unix systems and compilers on 
+#     which people try to build this program.
+#
+#  *  Reduction of maintainability: gdb is remarkably bad at dealing with
+#     debug info in dynamic libraries, and when debugging a hack, one would
+#     constantly be fighting the linker and the debugger (or linking
+#     statically when debugging.)
+#
+#  *  Version skew: when things are statically linked, it's perfectly ok to
+#     make incompatible changes to the APIs defined in this directory, so long
+#     as the current version in ../hacks/ is in sync.  Much more care would 
+#     need to be taken with such things if dynamic libraries were involved,
+#     to make sure that the major and minor versions of the library changed
+#     at the appropriate time.  This isn't too hard, but it's more work, and
+#     yet another opportunity to screw up.
+#
+#  *  Runtime memory usage goes *up*.  That's right, up!  When a program
+#     links in a dynamic library, the whole library is brought into the 
+#     address space, not just the files that are actually used.  Normally,
+#     this is ok, because if several programs are using (for example)
+#     libX11.so, chances are that the savings outweighs the overhead.  But
+#     the nature of xscreensaver is that only one of the hacks ever runs at
+#     a time -- so there would never be a second program using the utils/
+#     dynamic library with which things could be shared.
+#
+#  *  Runtime speed decreases slightly, since dynamic code is marginally
+#     slower.  On modern machines, this probably doesn't make a perceptible
+#     difference, however.
+#
+# So basically, I just don't think using libraries would be a win, and it would
+# definitely cause more of a maintenance and portability headache.  However,
+# if someone else wants to do the work to make it be an option to configure,
+# and verifies that it works on several (more than three) different Unixes,
+# I'd be happy to take the patches.
+#                                                           -- jwz, 30-Jun-98
+#
+##############################################################################
+
+
 @SET_MAKE@
 .SUFFIXES:
 .SUFFIXES: .c .o
index 78c21163fe7877b757b603ceee9a0798f3e2b9d9..6bf8cc8b848bdd8e6edd5ce57025a8642a6b44bb 100644 (file)
@@ -245,7 +245,8 @@ grab_screen_image_1 (Screen *screen, Window window)
     XWindowAttributes xgwa2;
     XGetWindowAttributes (dpy, window, &xgwa2);
     fprintf(stderr, "%s: ", progname);
-    describe_visual(stderr, screen, xgwa2.visual);
+    describe_visual(stderr, screen, xgwa2.visual, ####);
+    fprintf (stderr, "\n");
   }
 #endif /* DEBUG */
 
index 021352d599c56018fda6be34f671d5c79a6a21d5..0dbdf7a5061db150ac462ca8fa56cdecf18fc2a1 100644 (file)
@@ -1,2 +1,2 @@
 static const char screensaver_id[] =
-       "@(#)xscreensaver 2.23, by Jamie Zawinski (jwz@netscape.com)";
+       "@(#)xscreensaver 2.24, by Jamie Zawinski (jwz@netscape.com)";
index c83643601773299068623af60775a641a513c36a..993db5aa4746f0c1d6f6aa7815a33d77ac863829 100644 (file)
@@ -373,8 +373,9 @@ has_writable_cells (Screen *screen, Visual *visual)
 }
 
 void
-describe_visual (FILE *f, Screen *screen, Visual *visual)
+describe_visual (FILE *f, Screen *screen, Visual *visual, Bool private_cmap_p)
 {
+  char n[10];
   Display *dpy = DisplayOfScreen (screen);
   XVisualInfo vi_in, *vi_out;
   int out_count;
@@ -383,7 +384,12 @@ describe_visual (FILE *f, Screen *screen, Visual *visual)
   vi_out = XGetVisualInfo (dpy, (VisualScreenMask | VisualIDMask),
                           &vi_in, &out_count);
   if (! vi_out) abort ();
-  fprintf (f, "0x%02x (%s depth: %2d, cmap: %3d)\n",
+  if (private_cmap_p)
+    sprintf(n, "%3d", vi_out->colormap_size);
+  else
+    strcpy(n, "default");
+
+  fprintf (f, "0x%02x (%s depth: %2d, cmap: %s)\n",
           (unsigned int) vi_out->visualid,
           (vi_out->class == StaticGray  ? "StaticGray, " :
            vi_out->class == StaticColor ? "StaticColor," :
@@ -392,7 +398,7 @@ describe_visual (FILE *f, Screen *screen, Visual *visual)
            vi_out->class == PseudoColor ? "PseudoColor," :
            vi_out->class == DirectColor ? "DirectColor," :
                                           "UNKNOWN:    "),
-          vi_out->depth, vi_out->colormap_size /*, vi_out->bits_per_rgb*/);
+          vi_out->depth, n);
   XFree ((char *) vi_out);
 }
 
index 14820a9c52b5541e54b693c3b64b09b62171ceaf..68804b30e69c359ad0ce213f5cbeccf9ec4ce6f2 100644 (file)
@@ -20,7 +20,7 @@ extern int visual_class (Screen *, Visual *);
 extern int visual_cells (Screen *, Visual *);
 extern int screen_number (Screen *);
 extern Visual *find_similar_visual (Screen *, Visual *old);
-extern void describe_visual (FILE *f, Screen *, Visual *);
+extern void describe_visual (FILE *f, Screen *, Visual *, Bool private_cmap_p);
 extern Visual *get_overlay_visual (Screen *, unsigned long *pixel_return);
 extern Bool has_writable_cells (Screen *screen, Visual *visual);
 
index d729d382f55d954015c153d8bfe9850106e37991..223a3011e3f66f4c3275f9f52fd13243298c7e88 100644 (file)
@@ -1,7 +1,7 @@
 Begin3
 Title:          xscreensaver
-Version:        2.23
-Entered-date:   21JUN98
+Version:        2.24
+Entered-date:   30JUN98
 Description:    A modular screen saver and locker for the X Window System.
                 Highly customizable: allows the use of any program that
                 can draw on the root window as a display mode.
@@ -11,12 +11,12 @@ Keywords:       screen saver, screen lock, lock, xlock, X11
 Author:         jwz@netscape.com (Jamie Zawinski)
 Maintained-by:  jwz@netscape.com (Jamie Zawinski)
 Primary-site:   ftp.x.org /contrib/applications/
-                819K xscreensaver-2.23.tar.gz
-                22K  xscreensaver.README
+                831K xscreensaver-2.24.tar.gz
+                23K  xscreensaver.README
                 1K   xscreensaver.lsm
 Alternate-site: sunsite.unc.edu /pub/Linux/X11/screensavers/
-                819K xscreensaver-2.23.tar.gz
-                22K  xscreensaver.README
+                831K xscreensaver-2.24.tar.gz
+                23K  xscreensaver.README
                 1K   xscreensaver.lsm
 Platforms:      Linux, Irix, SunOS, Solaris, HPUX, AIX, FreeBSD, NetBSD,
                 BSDI, SCO, OSF1, Ultrix, VMS.