http://ftp.x.org/contrib/applications/xscreensaver-3.09.tar.gz
authorZygo Blaxell <zblaxell@hungrycats.org>
Mon, 2 Mar 2009 05:42:33 +0000 (00:42 -0500)
committerZygo Blaxell <zblaxell@hungrycats.org>
Mon, 2 Mar 2009 05:42:33 +0000 (00:42 -0500)
-rw-r--r-- 1 zblaxell zblaxell 1047544 Apr 10  1999 xscreensaver-3.09.tar.gz
14fda1b490d7f1ef9764d2b418f4c302e6ce6668  xscreensaver-3.09.tar.gz

52 files changed:
Makefile.in
README
config.h.in
configure
configure.in
driver/Makefile.in
driver/XScreenSaver.ad.in
driver/XScreenSaver_ad.h
driver/test-grab.c [new file with mode: 0644]
driver/test-xdpms.c
driver/timers.c
driver/windows.c
driver/xscreensaver-command.man
driver/xscreensaver-demo.man
driver/xscreensaver.c
driver/xscreensaver.h
driver/xscreensaver.man
hacks/Makefile.in
hacks/bsod.c
hacks/compass.c [new file with mode: 0644]
hacks/compile_axp.com
hacks/compile_decc.com
hacks/critical.c [new file with mode: 0644]
hacks/critical.man [new file with mode: 0644]
hacks/decayscreen.c
hacks/decayscreen.man
hacks/deluxe.c
hacks/flame.c
hacks/interference.c
hacks/kumppa.c
hacks/moire2.c
hacks/penetrate.c
hacks/rd-bomb.c
hacks/screenhack.c
hacks/spotlight.c [new file with mode: 0644]
hacks/spotlight.man [new file with mode: 0644]
hacks/squiral.c [new file with mode: 0644]
hacks/squiral.man [new file with mode: 0644]
hacks/vidwhacker
hacks/wander.c [new file with mode: 0644]
hacks/xflame.c [new file with mode: 0755]
setup.com
utils/Makefile.in
utils/compile_axp.com
utils/compile_decc.com
utils/erase.c
utils/version.h
utils/xdbe.c [new file with mode: 0644]
utils/xdbe.h [new file with mode: 0644]
xscreensaver.lsm
xscreensaver.lsm.sh
xscreensaver.spec

index 29d883d06c5c104248324bf8de0c28d3bd9168fd..10235b17e97896ecd373fb8ed8e4f019fcc7c877 100644 (file)
@@ -213,7 +213,8 @@ test-tar::
   ( cd BIN/motif ;                                                         \
     CC=cc ;                                                                \
     export CC ;                                                                    \
-    ../../configure --without-xpm --with-motif=/usr/local/motif ;          \
+    ../../configure --without-xpm --without-xdbe --without-xshm            \
+                   --with-motif=/usr/local/motif ;                         \
     echo --------------------------------------------------------------- ;  \
     gmake ;                                                                \
     ( cd driver; gmake xscreensaver-demo-Xaw ) ;                           \
diff --git a/README b/README
index 8e9538000dada267ce67a2053bf3b6e9de77ca3c..889044378762937c5232784ca195ae5e923ad717 100644 (file)
--- a/README
+++ b/README
@@ -67,7 +67,7 @@ Along with the xscreensaver daemon itself, this package also includes
 numerous graphics hacks for use as screensavers.  There is nothing magic
 about these: they are just programs that draw on the root window.
 
-More than 80 such programs are included.  For details, see the xscreensaver
+More than 90 such programs are included.  For details, see the xscreensaver
 web page, or the enclosed manual pages.  There are also some helpful hints
 on customization in the xscreensaver app-defaults file (normally installed
 in /usr/lib/X11/app-defaults/XScreenSaver.)
@@ -77,6 +77,21 @@ http://www.jwz.org/xscreensaver/.
 
                               ============
 
+Changes since 3.08:   * Added `compass', `squiral', `xflame', `wander',
+                        `spotlight', and `critical' hacks.
+                      * Added some new modes to `decayscreen'.
+                      * Made `deluxe' work in monochrome.
+                      * Generalized usage of the Double-Buffer server extension
+                        in several hacks (`compass', `deluxe', `interference',
+                        `kumppa', and `moire2'.)
+                      * Fixed another visual-depth problem in `rd-bomb'.
+                      * The screen saver will now defer blanking if neither
+                        the keyboard nor the mouse could be grabbed.  Instead,
+                        it will just try again in a few minutes.  This fixes
+                        a bad interaction between xscreensaver and programs
+                        like VMware that hold the mouse and keyboard grabbed
+                        for a long time.
+                      * Added a new erase mode (expanding spiral.)
 Changes since 3.07:   * Fixed some bugs in my port of `t3d'.
                       * Added `penetrate' and `deluxe' hacks.
                       * When linking against Motif 2.x, also link against XPM.
index e27f8d8c091de4a8dc7e05ead4fdb9ae964f321d..5707bd8c0ac99bb22f4763852a94dbc0b9bbae27 100644 (file)
  */
 #undef HAVE_XSHM_EXTENSION
 
+/*  Define this if you have the X Double Buffer Extension.
+ */
+#undef HAVE_DOUBLE_BUFFER_EXTENSION
+
 /*  Some screenhacks like to run an external program to generate random pieces
     of text; set this to the one you like ("yow" and "fortune" are the most
     likely prospects.)  Note that this is just the default; X resources can
index e4f7748957a24c3aa12296aecea8f9290406f16a..43a972c2ee534dd6e352cea86695085ce1b30ede 100755 (executable)
--- a/configure
+++ b/configure
@@ -17,7 +17,7 @@ Installation options:
   --enable-subdir=DIR     Put the demo programs in a subdirectory of \`bindir',
                           instead of putting them in bindir itself.  You can
                           specify the name of the subdirectory.  For example,
-                          --exec-prefix=/usr/local/bin --enable-subdir=demos
+                          \`--exec-prefix=/usr/local --enable-subdir=demos'
                           would put xscreensaver in /usr/local/bin/, and would
                           put the demos in /usr/local/bin/demos/.  (If DIR
                           begins with /, then bindir will not be prepended.)
@@ -48,6 +48,10 @@ ac_help="$ac_help
   --with-xshm-ext         Include support for the XSHM (Shared Memory) server
                           extension, if possible (this is the default).
   --without-xshm-ext      Do not compile in support for this extension."
+ac_help="$ac_help
+  --with-xdbe-ext         Include support for the DOUBLE-BUFFER server
+                          extension, if possible (this is the default).
+  --without-xdbe-ext      Do not compile in support for this extension."
 ac_help="$ac_help
   --with-sgivc-ext        Include support for the SGI-VIDEO-CONTROL server
                           extension, if possible (this is the default).
@@ -658,7 +662,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:673: checking host system type" >&5
+echo "configure:677: checking host system type" >&5
 
 host_alias=$host
 case "$host_alias" in
@@ -682,7 +686,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:697: checking for $ac_word" >&5
+echo "configure:701: 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
@@ -712,7 +716,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:727: checking for $ac_word" >&5
+echo "configure:731: 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
@@ -763,7 +767,7 @@ fi
       # Extract the first word of "cl", so it can be a program name with args.
 set dummy cl; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:778: checking for $ac_word" >&5
+echo "configure:782: 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
@@ -795,7 +799,7 @@ fi
 fi
 
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:810: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:814: 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.
@@ -806,12 +810,12 @@ cross_compiling=$ac_cv_prog_cc_cross
 
 cat > conftest.$ac_ext << EOF
 
-#line 821 "configure"
+#line 825 "configure"
 #include "confdefs.h"
 
 main(){return(0);}
 EOF
-if { (eval echo configure:826: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:830: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   ac_cv_prog_cc_works=yes
   # If we can't run a trivial program, we are probably using a cross compiler.
   if (./conftest; exit) 2>/dev/null; then
@@ -837,12 +841,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:852: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:856: 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:857: checking whether we are using GNU C" >&5
+echo "configure:861: 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
@@ -851,7 +855,7 @@ else
   yes;
 #endif
 EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:866: \"$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:870: \"$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
@@ -870,7 +874,7 @@ ac_test_CFLAGS="${CFLAGS+set}"
 ac_save_CFLAGS="$CFLAGS"
 CFLAGS=
 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:885: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:889: 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
@@ -904,7 +908,7 @@ fi
 
 if test -z "$GCC"; then
   echo $ac_n "checking how to request ANSI compilation""... $ac_c" 1>&6
-echo "configure:919: checking how to request ANSI compilation" >&5
+echo "configure:923: checking how to request ANSI compilation" >&5
   case "$host" in
     *-hpux*)
       echo "$ac_t""HPUX: adding -Ae" 1>&6
@@ -928,16 +932,16 @@ fi
 
 
 echo $ac_n "checking whether the compiler works on ANSI C""... $ac_c" 1>&6
-echo "configure:943: checking whether the compiler works on ANSI C" >&5
+echo "configure:947: 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 948 "configure"
+#line 952 "configure"
 #include "confdefs.h"
  main(int ac, char **av) { return 0; } 
 EOF
-if { (eval echo configure:952: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:956: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   echo "$ac_t""yes" 1>&6
 else
@@ -986,7 +990,7 @@ esac
 
 
 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:1001: checking how to run the C preprocessor" >&5
+echo "configure:1005: checking how to run the C preprocessor" >&5
 # On Suns, sometimes $CPP names a directory.
 if test -n "$CPP" && test -d "$CPP"; then
   CPP=
@@ -1001,13 +1005,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 1016 "configure"
+#line 1020 "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:1022: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1026: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   :
@@ -1018,13 +1022,13 @@ else
   rm -rf conftest*
   CPP="${CC-cc} -E -traditional-cpp"
   cat > conftest.$ac_ext <<EOF
-#line 1033 "configure"
+#line 1037 "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:1039: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1043: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   :
@@ -1035,13 +1039,13 @@ else
   rm -rf conftest*
   CPP="${CC-cc} -nologo -E"
   cat > conftest.$ac_ext <<EOF
-#line 1050 "configure"
+#line 1054 "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:1056: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1060: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   :
@@ -1077,7 +1081,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:1092: checking for a BSD compatible install" >&5
+echo "configure:1096: 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
@@ -1131,7 +1135,7 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
 
 INSTALL_DIRS='${INSTALL} -d'
    echo $ac_n "checking whether \"\${INSTALL} -d\" creates intermediate directories""... $ac_c" 1>&6
-echo "configure:1146: checking whether \"\${INSTALL} -d\" creates intermediate directories" >&5
+echo "configure:1150: checking whether \"\${INSTALL} -d\" creates intermediate directories" >&5
    rm -rf conftestdir
    if mkdir conftestdir; then
       cd conftestdir >&-
@@ -1142,7 +1146,7 @@ echo "configure:1146: checking whether \"\${INSTALL} -d\" creates intermediate d
       else
         echo "$ac_t""no" 1>&6
         echo $ac_n "checking whether \"mkdir -p\" creates intermediate directories""... $ac_c" 1>&6
-echo "configure:1157: checking whether \"mkdir -p\" creates intermediate directories" >&5
+echo "configure:1161: checking whether \"mkdir -p\" creates intermediate directories" >&5
         rm -rf dir1
         mkdir -p dir1/dir2 >&- 2>&-
         if test -d dir1/dir2/. ; then
@@ -1157,7 +1161,7 @@ echo "configure:1157: checking whether \"mkdir -p\" creates intermediate directo
    fi
 
 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:1172: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "configure:1176: 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
@@ -1185,12 +1189,12 @@ fi
 
 
 echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:1200: checking for working const" >&5
+echo "configure:1204: 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 1205 "configure"
+#line 1209 "configure"
 #include "confdefs.h"
 
 int main() {
@@ -1239,7 +1243,7 @@ ccp = (char const *const *) p;
 
 ; return 0; }
 EOF
-if { (eval echo configure:1254: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1258: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_const=yes
 else
@@ -1260,21 +1264,21 @@ EOF
 fi
 
 echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:1275: checking for inline" >&5
+echo "configure:1279: 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 1282 "configure"
+#line 1286 "configure"
 #include "confdefs.h"
 
 int main() {
 } $ac_kw foo() {
 ; return 0; }
 EOF
-if { (eval echo configure:1289: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1293: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_inline=$ac_kw; break
 else
@@ -1301,12 +1305,12 @@ esac
 
 
 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:1316: checking for ANSI C header files" >&5
+echo "configure:1320: 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 1321 "configure"
+#line 1325 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 #include <stdarg.h>
@@ -1314,7 +1318,7 @@ else
 #include <float.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1329: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1333: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -1331,7 +1335,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 1346 "configure"
+#line 1350 "configure"
 #include "confdefs.h"
 #include <string.h>
 EOF
@@ -1349,7 +1353,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 1364 "configure"
+#line 1368 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 EOF
@@ -1370,7 +1374,7 @@ if test "$cross_compiling" = yes; then
   :
 else
   cat > conftest.$ac_ext <<EOF
-#line 1385 "configure"
+#line 1389 "configure"
 #include "confdefs.h"
 #include <ctype.h>
 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -1381,7 +1385,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
 exit (0); }
 
 EOF
-if { (eval echo configure:1396: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1400: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   :
 else
@@ -1405,12 +1409,12 @@ EOF
 fi
 
 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
-echo "configure:1420: checking whether time.h and sys/time.h may both be included" >&5
+echo "configure:1424: 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 1425 "configure"
+#line 1429 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/time.h>
@@ -1419,7 +1423,7 @@ int main() {
 struct tm *tp;
 ; return 0; }
 EOF
-if { (eval echo configure:1434: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1438: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_header_time=yes
 else
@@ -1440,12 +1444,12 @@ EOF
 fi
 
 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
-echo "configure:1455: checking for sys/wait.h that is POSIX.1 compatible" >&5
+echo "configure:1459: 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 1460 "configure"
+#line 1464 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/wait.h>
@@ -1461,7 +1465,7 @@ wait (&s);
 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
 ; return 0; }
 EOF
-if { (eval echo configure:1476: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1480: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_header_sys_wait_h=yes
 else
@@ -1486,12 +1490,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:1501: checking for $ac_hdr that defines DIR" >&5
+echo "configure:1505: 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 1506 "configure"
+#line 1510 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <$ac_hdr>
@@ -1499,7 +1503,7 @@ int main() {
 DIR *dirp = 0;
 ; return 0; }
 EOF
-if { (eval echo configure:1514: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1518: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   eval "ac_cv_header_dirent_$ac_safe=yes"
 else
@@ -1524,7 +1528,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:1539: checking for opendir in -ldir" >&5
+echo "configure:1543: 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
@@ -1532,7 +1536,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-ldir  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1547 "configure"
+#line 1551 "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
@@ -1543,7 +1547,7 @@ int main() {
 opendir()
 ; return 0; }
 EOF
-if { (eval echo configure:1558: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1562: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -1565,7 +1569,7 @@ fi
 
 else
 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
-echo "configure:1580: checking for opendir in -lx" >&5
+echo "configure:1584: 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
@@ -1573,7 +1577,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lx  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1588 "configure"
+#line 1592 "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
@@ -1584,7 +1588,7 @@ int main() {
 opendir()
 ; return 0; }
 EOF
-if { (eval echo configure:1599: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1603: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -1608,12 +1612,12 @@ fi
 
 
 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
-echo "configure:1623: checking for mode_t" >&5
+echo "configure:1627: 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 1628 "configure"
+#line 1632 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -1641,12 +1645,12 @@ EOF
 fi
 
 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
-echo "configure:1656: checking for pid_t" >&5
+echo "configure:1660: 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 1661 "configure"
+#line 1665 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -1674,12 +1678,12 @@ EOF
 fi
 
 echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:1689: checking for size_t" >&5
+echo "configure:1693: 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 1694 "configure"
+#line 1698 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -1707,12 +1711,12 @@ EOF
 fi
 
 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
-echo "configure:1722: checking return type of signal handlers" >&5
+echo "configure:1726: 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 1727 "configure"
+#line 1731 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <signal.h>
@@ -1729,7 +1733,7 @@ int main() {
 int i;
 ; return 0; }
 EOF
-if { (eval echo configure:1744: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1748: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_type_signal=void
 else
@@ -1749,12 +1753,12 @@ EOF
 
 
 echo $ac_n "checking how to call gettimeofday""... $ac_c" 1>&6
-echo "configure:1764: checking how to call gettimeofday" >&5
+echo "configure:1768: 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 1769 "configure"
+#line 1773 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
                  #include <sys/time.h>
@@ -1763,7 +1767,7 @@ struct timeval tv; struct timezone tzp;
                  gettimeofday(&tv, &tzp);
 ; return 0; }
 EOF
-if { (eval echo configure:1778: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1782: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_gettimeofday_args=2
 else
@@ -1771,7 +1775,7 @@ else
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   cat > conftest.$ac_ext <<EOF
-#line 1786 "configure"
+#line 1790 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
                                  #include <sys/time.h>
@@ -1779,7 +1783,7 @@ int main() {
 struct timeval tv; gettimeofday(&tv);
 ; return 0; }
 EOF
-if { (eval echo configure:1794: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1798: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_gettimeofday_args=1
 else
@@ -1819,12 +1823,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:1834: checking for $ac_func" >&5
+echo "configure:1838: 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 1839 "configure"
+#line 1843 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -1847,7 +1851,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:1862: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -1874,12 +1878,12 @@ done
 for ac_func in sigaction syslog
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1889: checking for $ac_func" >&5
+echo "configure:1893: 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 1894 "configure"
+#line 1898 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -1902,7 +1906,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:1917: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1921: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -1931,17 +1935,17 @@ for ac_hdr in unistd.h crypt.h sys/select.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1946: checking for $ac_hdr" >&5
+echo "configure:1950: 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 1951 "configure"
+#line 1955 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1956: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1960: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2003,7 +2007,7 @@ HACKDIR=`echo "${HACKDIR}" | sed 's@/$@@;s@//*@/@g'`
 # 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:2018: checking for X" >&5
+echo "configure:2022: checking for X" >&5
 
 # Check whether --with-x or --without-x was given.
 if test "${with_x+set}" = set; then
@@ -2065,12 +2069,12 @@ if test "$ac_x_includes" = NO; then
 
   # First, try using that file with no special directory specified.
 cat > conftest.$ac_ext <<EOF
-#line 2080 "configure"
+#line 2084 "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:2085: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2089: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2139,14 +2143,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 2154 "configure"
+#line 2158 "configure"
 #include "confdefs.h"
 
 int main() {
 ${x_direct_test_function}()
 ; return 0; }
 EOF
-if { (eval echo configure:2161: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2165: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   LIBS="$ac_save_LIBS"
 # We can link X programs with no special library path.
@@ -2252,17 +2256,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:2267: checking whether -R must be followed by a space" >&5
+echo "configure:2271: 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 2270 "configure"
+#line 2274 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:2277: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2281: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_R_nospace=yes
 else
@@ -2278,14 +2282,14 @@ rm -f conftest*
       else
        LIBS="$ac_xsave_LIBS -R $x_libraries"
        cat > conftest.$ac_ext <<EOF
-#line 2293 "configure"
+#line 2297 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:2300: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2304: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_R_space=yes
 else
@@ -2317,7 +2321,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:2332: checking for dnet_ntoa in -ldnet" >&5
+echo "configure:2336: 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
@@ -2325,7 +2329,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-ldnet  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2340 "configure"
+#line 2344 "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
@@ -2336,7 +2340,7 @@ int main() {
 dnet_ntoa()
 ; return 0; }
 EOF
-if { (eval echo configure:2351: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2355: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2358,7 +2362,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:2373: checking for dnet_ntoa in -ldnet_stub" >&5
+echo "configure:2377: 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
@@ -2366,7 +2370,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-ldnet_stub  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2381 "configure"
+#line 2385 "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
@@ -2377,7 +2381,7 @@ int main() {
 dnet_ntoa()
 ; return 0; }
 EOF
-if { (eval echo configure:2392: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2396: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2406,12 +2410,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:2421: checking for gethostbyname" >&5
+echo "configure:2425: 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 2426 "configure"
+#line 2430 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char gethostbyname(); below.  */
@@ -2434,7 +2438,7 @@ gethostbyname();
 
 ; return 0; }
 EOF
-if { (eval echo configure:2449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2453: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_gethostbyname=yes"
 else
@@ -2455,7 +2459,7 @@ fi
 
     if test $ac_cv_func_gethostbyname = no; then
       echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
-echo "configure:2470: checking for gethostbyname in -lnsl" >&5
+echo "configure:2474: 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
@@ -2463,7 +2467,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lnsl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2478 "configure"
+#line 2482 "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
@@ -2474,7 +2478,7 @@ int main() {
 gethostbyname()
 ; return 0; }
 EOF
-if { (eval echo configure:2489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2493: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2504,12 +2508,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:2519: checking for connect" >&5
+echo "configure:2523: 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 2524 "configure"
+#line 2528 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char connect(); below.  */
@@ -2532,7 +2536,7 @@ connect();
 
 ; return 0; }
 EOF
-if { (eval echo configure:2547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2551: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_connect=yes"
 else
@@ -2553,7 +2557,7 @@ fi
 
     if test $ac_cv_func_connect = no; then
       echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
-echo "configure:2568: checking for connect in -lsocket" >&5
+echo "configure:2572: 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
@@ -2561,7 +2565,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2576 "configure"
+#line 2580 "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
@@ -2572,7 +2576,7 @@ int main() {
 connect()
 ; return 0; }
 EOF
-if { (eval echo configure:2587: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2596,12 +2600,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:2611: checking for remove" >&5
+echo "configure:2615: 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 2616 "configure"
+#line 2620 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char remove(); below.  */
@@ -2624,7 +2628,7 @@ remove();
 
 ; return 0; }
 EOF
-if { (eval echo configure:2639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_remove=yes"
 else
@@ -2645,7 +2649,7 @@ fi
 
     if test $ac_cv_func_remove = no; then
       echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
-echo "configure:2660: checking for remove in -lposix" >&5
+echo "configure:2664: 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
@@ -2653,7 +2657,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lposix  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2668 "configure"
+#line 2672 "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
@@ -2664,7 +2668,7 @@ int main() {
 remove()
 ; return 0; }
 EOF
-if { (eval echo configure:2679: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2688,12 +2692,12 @@ fi
 
     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
     echo $ac_n "checking for shmat""... $ac_c" 1>&6
-echo "configure:2703: checking for shmat" >&5
+echo "configure:2707: 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 2708 "configure"
+#line 2712 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char shmat(); below.  */
@@ -2716,7 +2720,7 @@ shmat();
 
 ; return 0; }
 EOF
-if { (eval echo configure:2731: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_shmat=yes"
 else
@@ -2737,7 +2741,7 @@ fi
 
     if test $ac_cv_func_shmat = no; then
       echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
-echo "configure:2752: checking for shmat in -lipc" >&5
+echo "configure:2756: 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
@@ -2745,7 +2749,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lipc  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2760 "configure"
+#line 2764 "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
@@ -2756,7 +2760,7 @@ int main() {
 shmat()
 ; return 0; }
 EOF
-if { (eval echo configure:2771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2775: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2789,7 +2793,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:2804: checking for IceConnectionNumber in -lICE" >&5
+echo "configure:2808: 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
@@ -2797,7 +2801,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2812 "configure"
+#line 2816 "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
@@ -2808,7 +2812,7 @@ int main() {
 IceConnectionNumber()
 ; return 0; }
 EOF
-if { (eval echo configure:2823: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2827: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2850,7 +2854,7 @@ fi
 
 
     echo $ac_n "checking for X app-defaults directory""... $ac_c" 1>&6
-echo "configure:2865: checking for X app-defaults directory" >&5
+echo "configure:2869: 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
@@ -2997,7 +3001,7 @@ APPDEFAULTS=$ac_x_app_defaults
   fi
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   cat > conftest.$ac_ext <<EOF
-#line 3012 "configure"
+#line 3016 "configure"
 #include "confdefs.h"
 #include <X11/XHPlib.h>
 EOF
@@ -3018,7 +3022,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:3033: checking for XPointer" >&5
+echo "configure:3037: checking for XPointer" >&5
 if eval "test \"`echo '$''{'ac_cv_xpointer'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3029,14 +3033,14 @@ else
   fi
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   cat > conftest.$ac_ext <<EOF
-#line 3044 "configure"
+#line 3048 "configure"
 #include "confdefs.h"
 #include <X11/Xlib.h>
 int main() {
 XPointer foo = (XPointer) 0;
 ; return 0; }
 EOF
-if { (eval echo configure:3051: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3055: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_xpointer=yes
 else
@@ -3170,7 +3174,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:3185: checking for regcmp in -lgen" >&5
+echo "configure:3189: 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
@@ -3178,7 +3182,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lgen  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3193 "configure"
+#line 3197 "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
@@ -3189,7 +3193,7 @@ int main() {
 regcmp()
 ; return 0; }
 EOF
-if { (eval echo configure:3204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3208: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3226,17 +3230,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:3241: checking for X11/Xmu/Error.h" >&5
+echo "configure:3245: 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 3246 "configure"
+#line 3250 "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:3251: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3255: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -3281,7 +3285,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:3296: checking for the SunOS 4.1.x _get_wmShellWidgetClass bug" >&5
+echo "configure:3300: 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
@@ -3294,14 +3298,14 @@ else
                    # with X libraries because we know it's SunOS.
                    LDFLAGS="$LDFLAGS -lXmu -lXt -lX11 -lXext -lm"
                    cat > conftest.$ac_ext <<EOF
-#line 3309 "configure"
+#line 3313 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:3316: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3320: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_cv_sunos_xmu_bug=no
 else
@@ -3317,21 +3321,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:3332: checking whether the compiler understands -static" >&5
+echo "configure:3336: 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 3339 "configure"
+#line 3343 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:3346: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3350: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_cv_ld_static=yes
 else
@@ -3376,7 +3380,7 @@ fi
 
     /*)
      echo $ac_n "checking for SGI SCREEN_SAVER headers""... $ac_c" 1>&6
-echo "configure:3391: checking for SGI SCREEN_SAVER headers" >&5
+echo "configure:3395: checking for SGI SCREEN_SAVER headers" >&5
      d=$with_sgi/include
      if test -d $d; then
        X_CFLAGS="-I$d $X_CFLAGS"
@@ -3386,7 +3390,7 @@ echo "configure:3391: checking for SGI SCREEN_SAVER headers" >&5
      fi
 
      echo $ac_n "checking for SGI SCREEN_SAVER libs""... $ac_c" 1>&6
-echo "configure:3401: checking for SGI SCREEN_SAVER libs" >&5
+echo "configure:3405: checking for SGI SCREEN_SAVER libs" >&5
      d=$with_sgi/lib
      if test -d $d; then
        X_LIBS="-L$d $X_LIBS"
@@ -3424,17 +3428,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:3439: checking for X11/extensions/XScreenSaver.h" >&5
+echo "configure:3443: 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 3444 "configure"
+#line 3448 "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:3449: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3453: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -3487,7 +3491,7 @@ fi
 
     /*)
      echo $ac_n "checking for MIT-SCREEN-SAVER headers""... $ac_c" 1>&6
-echo "configure:3502: checking for MIT-SCREEN-SAVER headers" >&5
+echo "configure:3506: checking for MIT-SCREEN-SAVER headers" >&5
      d=$with_mit/include
      if test -d $d; then
        X_CFLAGS="-I$d $X_CFLAGS"
@@ -3497,7 +3501,7 @@ echo "configure:3502: checking for MIT-SCREEN-SAVER headers" >&5
      fi
 
      echo $ac_n "checking for MIT-SCREEN-SAVER libs""... $ac_c" 1>&6
-echo "configure:3512: checking for MIT-SCREEN-SAVER libs" >&5
+echo "configure:3516: checking for MIT-SCREEN-SAVER libs" >&5
      d=$with_mit/lib
      if test -d $d; then
        X_LIBS="-L$d $X_LIBS"
@@ -3536,17 +3540,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:3551: checking for X11/extensions/scrnsaver.h" >&5
+echo "configure:3555: 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 3556 "configure"
+#line 3560 "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:3561: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3565: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -3590,7 +3594,7 @@ fi
   LDFLAGS="$LDFLAGS $X_LIBS"
 
   echo $ac_n "checking for XScreenSaverRegister in -lXext""... $ac_c" 1>&6
-echo "configure:3605: checking for XScreenSaverRegister in -lXext" >&5
+echo "configure:3609: 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
@@ -3598,7 +3602,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lXext -lm $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3613 "configure"
+#line 3617 "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
@@ -3609,7 +3613,7 @@ int main() {
 XScreenSaverRegister()
 ; return 0; }
 EOF
-if { (eval echo configure:3624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3628: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3660,7 +3664,7 @@ fi
   LDFLAGS="$LDFLAGS $X_LIBS"
 
   echo $ac_n "checking for XScreenSaverRegister in -lXExExt""... $ac_c" 1>&6
-echo "configure:3675: checking for XScreenSaverRegister in -lXExExt" >&5
+echo "configure:3679: 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
@@ -3668,7 +3672,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lXExExt -lX11 -lXext -lm $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3683 "configure"
+#line 3687 "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
@@ -3679,7 +3683,7 @@ int main() {
 XScreenSaverRegister()
 ; return 0; }
 EOF
-if { (eval echo configure:3694: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3725,7 +3729,7 @@ fi
   LDFLAGS="$LDFLAGS $X_LIBS"
 
   echo $ac_n "checking for XScreenSaverRegister in -lXss""... $ac_c" 1>&6
-echo "configure:3740: checking for XScreenSaverRegister in -lXss" >&5
+echo "configure:3744: 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
@@ -3733,7 +3737,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lXss -lX11 -lXext -lm $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3748 "configure"
+#line 3752 "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
@@ -3744,7 +3748,7 @@ int main() {
 XScreenSaverRegister()
 ; return 0; }
 EOF
-if { (eval echo configure:3759: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3763: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3804,7 +3808,7 @@ fi
 
     /*)
      echo $ac_n "checking for XIDLE headers""... $ac_c" 1>&6
-echo "configure:3819: checking for XIDLE headers" >&5
+echo "configure:3823: checking for XIDLE headers" >&5
      d=$with_xidle/include
      if test -d $d; then
        X_CFLAGS="-I$d $X_CFLAGS"
@@ -3814,7 +3818,7 @@ echo "configure:3819: checking for XIDLE headers" >&5
      fi
 
      echo $ac_n "checking for XIDLE libs""... $ac_c" 1>&6
-echo "configure:3829: checking for XIDLE libs" >&5
+echo "configure:3833: checking for XIDLE libs" >&5
      d=$with_xidle/lib
      if test -d $d; then
        X_LIBS="-L$d $X_LIBS"
@@ -3852,17 +3856,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:3867: checking for X11/extensions/xidle.h" >&5
+echo "configure:3871: 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 3872 "configure"
+#line 3876 "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:3877: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3881: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -3914,7 +3918,7 @@ fi
 
     /*)
      echo $ac_n "checking for XSHM headers""... $ac_c" 1>&6
-echo "configure:3929: checking for XSHM headers" >&5
+echo "configure:3933: checking for XSHM headers" >&5
      d=$with_xshm/include
      if test -d $d; then
        X_CFLAGS="-I$d $X_CFLAGS"
@@ -3924,7 +3928,7 @@ echo "configure:3929: checking for XSHM headers" >&5
      fi
 
      echo $ac_n "checking for XSHM libs""... $ac_c" 1>&6
-echo "configure:3939: checking for XSHM libs" >&5
+echo "configure:3943: checking for XSHM libs" >&5
      d=$with_xshm/lib
      if test -d $d; then
        X_LIBS="-L$d $X_LIBS"
@@ -3964,17 +3968,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:3979: checking for X11/extensions/XShm.h" >&5
+echo "configure:3983: 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 3984 "configure"
+#line 3988 "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:3989: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3993: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -4008,17 +4012,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:4023: checking for sys/ipc.h" >&5
+echo "configure:4027: 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 4028 "configure"
+#line 4032 "configure"
 #include "confdefs.h"
 #include <sys/ipc.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4033: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4037: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -4053,17 +4057,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:4068: checking for sys/shm.h" >&5
+echo "configure:4072: 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 4073 "configure"
+#line 4077 "configure"
 #include "confdefs.h"
 #include <sys/shm.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4078: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4082: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -4112,7 +4116,7 @@ fi
   LDFLAGS="$LDFLAGS $X_LIBS"
 
   echo $ac_n "checking for XShmQueryExtension in -lXextSam""... $ac_c" 1>&6
-echo "configure:4127: checking for XShmQueryExtension in -lXextSam" >&5
+echo "configure:4131: 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
@@ -4120,7 +4124,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lXextSam -lX11 -lXext -lm $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4135 "configure"
+#line 4139 "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
@@ -4131,7 +4135,7 @@ int main() {
 XShmQueryExtension()
 ; return 0; }
 EOF
-if { (eval echo configure:4146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -4170,6 +4174,120 @@ elif test "$with_xshm" != no; then
 fi
 
 
+# Check for the DOUBLE-BUFFER server extension header.
+#
+have_xdbe=no
+with_xdbe_req=unspecified
+# Check whether --with-xdbe-ext or --without-xdbe-ext was given.
+if test "${with_xdbe_ext+set}" = set; then
+  withval="$with_xdbe_ext"
+  with_xdbe="$withval"; with_xdbe_req="$withval"
+else
+  with_xdbe=yes
+fi
+
+
+
+   case "$with_xdbe" in
+    yes) ;;
+    no)  ;;
+
+    /*)
+     echo $ac_n "checking for DOUBLE-BUFFER headers""... $ac_c" 1>&6
+echo "configure:4209: checking for DOUBLE-BUFFER headers" >&5
+     d=$with_xdbe/include
+     if test -d $d; then
+       X_CFLAGS="-I$d $X_CFLAGS"
+       echo "$ac_t""$d" 1>&6
+     else
+       echo "$ac_t""not found ($d: no such directory)" 1>&6
+     fi
+
+     echo $ac_n "checking for DOUBLE-BUFFER libs""... $ac_c" 1>&6
+echo "configure:4219: checking for DOUBLE-BUFFER libs" >&5
+     d=$with_xdbe/lib
+     if test -d $d; then
+       X_LIBS="-L$d $X_LIBS"
+       echo "$ac_t""$d" 1>&6
+     else
+       echo "$ac_t""not found ($d: no such directory)" 1>&6
+     fi
+
+     # replace the directory string with "yes".
+     with_xdbe_req="yes"
+     with_xdbe=$with_xdbe_req
+     ;;
+
+    *)
+     echo ""
+     echo "error: argument to --with-xdbe-ext must be \"yes\", \"no\", or a directory."
+     echo "       If it is a directory, then \`DIR/include' will be added to"
+     echo "       the -I list, and \`DIR/lib' will be added to the -L list."
+     exit 1
+     ;;
+   esac
+
+   # why is this necessary?
+   # if we don't do this, then "./configure --with-motif=/usr/local/lesstif"
+   # behaves as if "--with-zippy=/usr/local/lesstif" was also present!
+   withval=
+  
+
+if test "$with_xdbe" = yes; then
+
+  
+  ac_save_CPPFLAGS="$CPPFLAGS"
+  if test \! -z "$includedir" ; then 
+    CPPFLAGS="$CPPFLAGS -I$includedir"
+  fi
+  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
+  ac_safe=`echo "X11/extensions/Xdbe.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for X11/extensions/Xdbe.h""... $ac_c" 1>&6
+echo "configure:4258: checking for X11/extensions/Xdbe.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 4263 "configure"
+#include "confdefs.h"
+#include <X11/extensions/Xdbe.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:4268: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  have_xdbe=yes
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+  CPPFLAGS="$ac_save_CPPFLAGS"
+  if test "$have_xdbe" = yes; then
+    cat >> confdefs.h <<\EOF
+#define HAVE_DOUBLE_BUFFER_EXTENSION 1
+EOF
+    
+  fi
+
+elif test "$with_xdbe" != no; then
+  echo "error: must be yes or no: --with-xdbe-ext=$with_xshm"
+  exit 1
+fi
+
+
 # Check for the SGI-VIDEO-CONTROL server extension header.
 #
 have_sgivc=no
@@ -4190,7 +4308,7 @@ fi
 
     /*)
      echo $ac_n "checking for SGI-VIDEO-CONTROL headers""... $ac_c" 1>&6
-echo "configure:4205: checking for SGI-VIDEO-CONTROL headers" >&5
+echo "configure:4323: checking for SGI-VIDEO-CONTROL headers" >&5
      d=$with_sgivc/include
      if test -d $d; then
        X_CFLAGS="-I$d $X_CFLAGS"
@@ -4200,7 +4318,7 @@ echo "configure:4205: checking for SGI-VIDEO-CONTROL headers" >&5
      fi
 
      echo $ac_n "checking for SGI-VIDEO-CONTROL libs""... $ac_c" 1>&6
-echo "configure:4215: checking for SGI-VIDEO-CONTROL libs" >&5
+echo "configure:4333: checking for SGI-VIDEO-CONTROL libs" >&5
      d=$with_sgivc/lib
      if test -d $d; then
        X_LIBS="-L$d $X_LIBS"
@@ -4240,17 +4358,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:4255: checking for X11/extensions/XSGIvc.h" >&5
+echo "configure:4373: 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 4260 "configure"
+#line 4378 "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:4265: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4383: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -4293,7 +4411,7 @@ fi
   LDFLAGS="$LDFLAGS $X_LIBS"
 
   echo $ac_n "checking for XSGIvcQueryGammaMap in -lXsgivc""... $ac_c" 1>&6
-echo "configure:4308: checking for XSGIvcQueryGammaMap in -lXsgivc" >&5
+echo "configure:4426: 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
@@ -4301,7 +4419,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lXsgivc -lXext -lX11 $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4316 "configure"
+#line 4434 "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
@@ -4312,7 +4430,7 @@ int main() {
 XSGIvcQueryGammaMap()
 ; return 0; }
 EOF
-if { (eval echo configure:4327: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4445: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -4370,7 +4488,7 @@ fi
 
     /*)
      echo $ac_n "checking for DPMS headers""... $ac_c" 1>&6
-echo "configure:4385: checking for DPMS headers" >&5
+echo "configure:4503: checking for DPMS headers" >&5
      d=$with_dpms/include
      if test -d $d; then
        X_CFLAGS="-I$d $X_CFLAGS"
@@ -4380,7 +4498,7 @@ echo "configure:4385: checking for DPMS headers" >&5
      fi
 
      echo $ac_n "checking for DPMS libs""... $ac_c" 1>&6
-echo "configure:4395: checking for DPMS libs" >&5
+echo "configure:4513: checking for DPMS libs" >&5
      d=$with_dpms/lib
      if test -d $d; then
        X_LIBS="-L$d $X_LIBS"
@@ -4420,17 +4538,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:4435: checking for X11/extensions/dpms.h" >&5
+echo "configure:4553: 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 4440 "configure"
+#line 4558 "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:4445: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4563: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -4473,7 +4591,7 @@ fi
   LDFLAGS="$LDFLAGS $X_LIBS"
 
   echo $ac_n "checking for DPMSInfo in -lXdpms""... $ac_c" 1>&6
-echo "configure:4488: checking for DPMSInfo in -lXdpms" >&5
+echo "configure:4606: 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
@@ -4481,7 +4599,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lXdpms -lXext -lX11 $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4496 "configure"
+#line 4614 "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
@@ -4492,7 +4610,7 @@ int main() {
 DPMSInfo()
 ; return 0; }
 EOF
-if { (eval echo configure:4507: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4625: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -4546,7 +4664,7 @@ fi
 if test "$with_proc_interrupts" = yes; then
 
    echo $ac_n "checking whether /proc/interrupts contains keyboard data""... $ac_c" 1>&6
-echo "configure:4561: checking whether /proc/interrupts contains keyboard data" >&5
+echo "configure:4679: checking whether /proc/interrupts contains keyboard data" >&5
    if eval "test \"`echo '$''{'ac_cv_have_proc_interrupts'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -4599,7 +4717,7 @@ fi
 
     /*)
      echo $ac_n "checking for Motif headers""... $ac_c" 1>&6
-echo "configure:4614: checking for Motif headers" >&5
+echo "configure:4732: checking for Motif headers" >&5
      d=$with_motif/include
      if test -d $d; then
        X_CFLAGS="-I$d $X_CFLAGS"
@@ -4609,7 +4727,7 @@ echo "configure:4614: checking for Motif headers" >&5
      fi
 
      echo $ac_n "checking for Motif libs""... $ac_c" 1>&6
-echo "configure:4624: checking for Motif libs" >&5
+echo "configure:4742: checking for Motif libs" >&5
      d=$with_motif/lib
      if test -d $d; then
        X_LIBS="-L$d $X_LIBS"
@@ -4654,7 +4772,7 @@ fi
 
     /*)
      echo $ac_n "checking for Athena headers""... $ac_c" 1>&6
-echo "configure:4669: checking for Athena headers" >&5
+echo "configure:4787: checking for Athena headers" >&5
      d=$with_athena/include
      if test -d $d; then
        X_CFLAGS="-I$d $X_CFLAGS"
@@ -4664,7 +4782,7 @@ echo "configure:4669: checking for Athena headers" >&5
      fi
 
      echo $ac_n "checking for Athena libs""... $ac_c" 1>&6
-echo "configure:4679: checking for Athena libs" >&5
+echo "configure:4797: checking for Athena libs" >&5
      d=$with_athena/lib
      if test -d $d; then
        X_LIBS="-L$d $X_LIBS"
@@ -4727,17 +4845,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:4742: checking for Xm/Xm.h" >&5
+echo "configure:4860: 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 4747 "configure"
+#line 4865 "configure"
 #include "confdefs.h"
 #include <Xm/Xm.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4752: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4870: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -4777,17 +4895,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:4792: checking for X11/Xaw/Dialog.h" >&5
+echo "configure:4910: 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 4797 "configure"
+#line 4915 "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:4802: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4920: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -4827,7 +4945,7 @@ fi
   LDFLAGS="$LDFLAGS $X_LIBS"
 
   echo $ac_n "checking for Xaw3dComputeTopShadowRGB in -lXaw3d""... $ac_c" 1>&6
-echo "configure:4842: checking for Xaw3dComputeTopShadowRGB in -lXaw3d" >&5
+echo "configure:4960: 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
@@ -4835,7 +4953,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lXaw3d -lXt -lXmu -lXext -lX11 $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4850 "configure"
+#line 4968 "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
@@ -4846,7 +4964,7 @@ int main() {
 Xaw3dComputeTopShadowRGB()
 ; return 0; }
 EOF
-if { (eval echo configure:4861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -4923,7 +5041,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:4938: checking for XawViewportSetCoordinates in Viewport.h" >&5
+echo "configure:5056: 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
@@ -4935,7 +5053,7 @@ else
   fi
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   cat > conftest.$ac_ext <<EOF
-#line 4950 "configure"
+#line 5068 "configure"
 #include "confdefs.h"
 #include <X11/Xaw/Viewport.h>
 EOF
@@ -4964,7 +5082,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:4979: checking whether Motif is really LessTif" >&5
+echo "configure:5097: 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
@@ -4975,14 +5093,14 @@ else
   fi
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   cat > conftest.$ac_ext <<EOF
-#line 4990 "configure"
+#line 5108 "configure"
 #include "confdefs.h"
 #include <Xm/Xm.h>
 int main() {
 long vers = LesstifVersion;
 ; return 0; }
 EOF
-if { (eval echo configure:4997: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5115: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_have_lesstif=yes
 else
@@ -5010,7 +5128,7 @@ if test "$have_lesstif" = yes ; then
   ltv=unknown
   echo unknown > conftest-lt
   echo $ac_n "checking LessTif version number""... $ac_c" 1>&6
-echo "configure:5025: checking LessTif version number" >&5
+echo "configure:5143: checking LessTif version number" >&5
 if eval "test \"`echo '$''{'ac_cv_lesstif_version_string'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -5025,7 +5143,7 @@ else
                     ac_cv_lesstif_version_string=unknown
 else
   cat > conftest.$ac_ext <<EOF
-#line 5040 "configure"
+#line 5158 "configure"
 #include "confdefs.h"
 #include <stdio.h>
                     #include <Xm/Xm.h>
@@ -5038,7 +5156,7 @@ else
                       exit(0);
                     }
 EOF
-if { (eval echo configure:5053: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:5171: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ltv=`cat conftest-lt`
                     ac_cv_lesstif_version=`echo $ltv | sed 's/ .*//'`
@@ -5068,7 +5186,7 @@ if test "$have_motif" = yes ; then
   mtv=unknown
   echo unknown > conftest-mt
   echo $ac_n "checking Motif version number""... $ac_c" 1>&6
-echo "configure:5083: checking Motif version number" >&5
+echo "configure:5201: checking Motif version number" >&5
 if eval "test \"`echo '$''{'ac_cv_motif_version_string'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -5083,7 +5201,7 @@ else
                     ac_cv_motif_version_string=unknown
 else
   cat > conftest.$ac_ext <<EOF
-#line 5098 "configure"
+#line 5216 "configure"
 #include "confdefs.h"
 #include <stdio.h>
                     #include <Xm/Xm.h>
@@ -5096,7 +5214,7 @@ else
                       exit(0);
                     }
 EOF
-if { (eval echo configure:5111: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:5229: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   mtv=`cat conftest-mt`
                     ac_cv_motif_version=`echo $mtv | sed 's/ .*//'`
@@ -5134,7 +5252,7 @@ fi
 motif_requires_xpm=no
 if test "$have_motif" = yes ; then
    echo $ac_n "checking whether Motif requires XPM""... $ac_c" 1>&6
-echo "configure:5149: checking whether Motif requires XPM" >&5
+echo "configure:5267: checking whether Motif requires XPM" >&5
    if test "$motif_version" -ge 2000; then
      motif_requires_xpm=yes
      echo "$ac_t""maybe" 1>&6
@@ -5169,7 +5287,7 @@ if test "$have_motif" = yes ; then
   LDFLAGS="$LDFLAGS $X_LIBS"
 
   echo $ac_n "checking for XpQueryExtension in -lXp""... $ac_c" 1>&6
-echo "configure:5184: checking for XpQueryExtension in -lXp" >&5
+echo "configure:5302: 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
@@ -5177,7 +5295,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lXp -lX11 -lXext -lm $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 5192 "configure"
+#line 5310 "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
@@ -5188,7 +5306,7 @@ int main() {
 XpQueryExtension()
 ; return 0; }
 EOF
-if { (eval echo configure:5203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5321: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -5235,7 +5353,7 @@ if test "$have_motif" = yes ; then
   LDFLAGS="$LDFLAGS $X_LIBS"
 
   echo $ac_n "checking for _Xsetlocale in -lXintl""... $ac_c" 1>&6
-echo "configure:5250: checking for _Xsetlocale in -lXintl" >&5
+echo "configure:5368: checking for _Xsetlocale in -lXintl" >&5
 ac_lib_var=`echo Xintl'_'_Xsetlocale | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -5243,7 +5361,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lXintl -lX11 -lXext -lm $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 5258 "configure"
+#line 5376 "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
@@ -5254,7 +5372,7 @@ int main() {
 _Xsetlocale()
 ; return 0; }
 EOF
-if { (eval echo configure:5269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5387: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -5303,7 +5421,7 @@ fi
 
     /*)
      echo $ac_n "checking for XPM headers""... $ac_c" 1>&6
-echo "configure:5318: checking for XPM headers" >&5
+echo "configure:5436: checking for XPM headers" >&5
      d=$with_xpm/include
      if test -d $d; then
        X_CFLAGS="-I$d $X_CFLAGS"
@@ -5313,7 +5431,7 @@ echo "configure:5318: checking for XPM headers" >&5
      fi
 
      echo $ac_n "checking for XPM libs""... $ac_c" 1>&6
-echo "configure:5328: checking for XPM libs" >&5
+echo "configure:5446: checking for XPM libs" >&5
      d=$with_xpm/lib
      if test -d $d; then
        X_LIBS="-L$d $X_LIBS"
@@ -5351,17 +5469,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:5366: checking for X11/xpm.h" >&5
+echo "configure:5484: 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 5371 "configure"
+#line 5489 "configure"
 #include "confdefs.h"
 #include <X11/xpm.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5376: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5494: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -5424,7 +5542,7 @@ fi
 
     /*)
      echo $ac_n "checking for GL headers""... $ac_c" 1>&6
-echo "configure:5439: checking for GL headers" >&5
+echo "configure:5557: checking for GL headers" >&5
      d=$with_gl/include
      if test -d $d; then
        X_CFLAGS="-I$d $X_CFLAGS"
@@ -5434,7 +5552,7 @@ echo "configure:5439: checking for GL headers" >&5
      fi
 
      echo $ac_n "checking for GL libs""... $ac_c" 1>&6
-echo "configure:5449: checking for GL libs" >&5
+echo "configure:5567: checking for GL libs" >&5
      d=$with_gl/lib
      if test -d $d; then
        X_LIBS="-L$d $X_LIBS"
@@ -5475,17 +5593,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:5490: checking for GL/gl.h" >&5
+echo "configure:5608: 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 5495 "configure"
+#line 5613 "configure"
 #include "confdefs.h"
 #include <GL/gl.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5500: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5618: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -5516,17 +5634,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:5531: checking for GL/glx.h" >&5
+echo "configure:5649: 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 5536 "configure"
+#line 5654 "configure"
 #include "confdefs.h"
 #include <GL/glx.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5541: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5659: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -5563,7 +5681,7 @@ EOF
     # to link against.
     #
     echo $ac_n "checking whether GL is really MesaGL""... $ac_c" 1>&6
-echo "configure:5578: checking whether GL is really MesaGL" >&5
+echo "configure:5696: checking whether GL is really MesaGL" >&5
     if eval "test \"`echo '$''{'ac_cv_have_mesa_gl'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -5575,7 +5693,7 @@ else
   fi
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   cat > conftest.$ac_ext <<EOF
-#line 5590 "configure"
+#line 5708 "configure"
 #include "confdefs.h"
 #include <GL/glx.h>
 EOF
@@ -5616,12 +5734,12 @@ EOF
       unset ac_cv_mesagl_version_string
 
       echo $ac_n "checking MesaGL version number""... $ac_c" 1>&6
-echo "configure:5631: checking MesaGL version number" >&5
+echo "configure:5749: checking MesaGL version number" >&5
       if eval "test \"`echo '$''{'ac_cv_mesagl_version_string'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5636 "configure"
+#line 5754 "configure"
 #include "confdefs.h"
 #include <GL/gl.h>
 configure: MESA_MAJOR_VERSION MESA_MINOR_VERSION
@@ -5674,7 +5792,7 @@ fi
     if test "$ac_have_mesa_gl" = yes; then
 
       echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
-echo "configure:5689: checking for pthread_create in -lpthread" >&5
+echo "configure:5807: checking for pthread_create in -lpthread" >&5
 ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -5682,7 +5800,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lpthread  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 5697 "configure"
+#line 5815 "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
@@ -5693,7 +5811,7 @@ int main() {
 pthread_create()
 ; return 0; }
 EOF
-if { (eval echo configure:5708: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5826: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -5731,7 +5849,7 @@ fi
   LDFLAGS="$LDFLAGS $X_LIBS"
 
   echo $ac_n "checking for gl_get_thread_context in -l$gl_lib_1""... $ac_c" 1>&6
-echo "configure:5746: checking for gl_get_thread_context in -l$gl_lib_1" >&5
+echo "configure:5864: checking for gl_get_thread_context in -l$gl_lib_1" >&5
 ac_lib_var=`echo $gl_lib_1'_'gl_get_thread_context | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -5739,7 +5857,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-l$gl_lib_1 $GL_LIBS -lpthread -lX11 -lXext -lm $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 5754 "configure"
+#line 5872 "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
@@ -5750,7 +5868,7 @@ int main() {
 gl_get_thread_context()
 ; return 0; }
 EOF
-if { (eval echo configure:5765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -5798,7 +5916,7 @@ fi
   LDFLAGS="$LDFLAGS $X_LIBS"
 
   echo $ac_n "checking for glBindTexture in -l$gl_lib_1""... $ac_c" 1>&6
-echo "configure:5813: checking for glBindTexture in -l$gl_lib_1" >&5
+echo "configure:5931: checking for glBindTexture in -l$gl_lib_1" >&5
 ac_lib_var=`echo $gl_lib_1'_'glBindTexture | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -5806,7 +5924,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-l$gl_lib_1 $GL_LIBS -lX11 -lXext -lm $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 5821 "configure"
+#line 5939 "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
@@ -5817,7 +5935,7 @@ int main() {
 glBindTexture()
 ; return 0; }
 EOF
-if { (eval echo configure:5832: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5950: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -5871,7 +5989,7 @@ fi
 
     /*)
      echo $ac_n "checking for XReadDisplay headers""... $ac_c" 1>&6
-echo "configure:5886: checking for XReadDisplay headers" >&5
+echo "configure:6004: checking for XReadDisplay headers" >&5
      d=$with_readdisplay/include
      if test -d $d; then
        X_CFLAGS="-I$d $X_CFLAGS"
@@ -5881,7 +5999,7 @@ echo "configure:5886: checking for XReadDisplay headers" >&5
      fi
 
      echo $ac_n "checking for XReadDisplay libs""... $ac_c" 1>&6
-echo "configure:5896: checking for XReadDisplay libs" >&5
+echo "configure:6014: checking for XReadDisplay libs" >&5
      d=$with_readdisplay/lib
      if test -d $d; then
        X_LIBS="-L$d $X_LIBS"
@@ -5919,17 +6037,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:5934: checking for X11/extensions/readdisplay.h" >&5
+echo "configure:6052: 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 5939 "configure"
+#line 6057 "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:5944: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6062: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -5980,7 +6098,7 @@ fi
 
     /*)
      echo $ac_n "checking for Iris Video headers""... $ac_c" 1>&6
-echo "configure:5995: checking for Iris Video headers" >&5
+echo "configure:6113: checking for Iris Video headers" >&5
      d=$with_sgivideo/include
      if test -d $d; then
        X_CFLAGS="-I$d $X_CFLAGS"
@@ -5990,7 +6108,7 @@ echo "configure:5995: checking for Iris Video headers" >&5
      fi
 
      echo $ac_n "checking for Iris Video libs""... $ac_c" 1>&6
-echo "configure:6005: checking for Iris Video libs" >&5
+echo "configure:6123: checking for Iris Video libs" >&5
      d=$with_sgivideo/lib
      if test -d $d; then
        X_LIBS="-L$d $X_LIBS"
@@ -6028,17 +6146,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:6043: checking for dmedia/vl.h" >&5
+echo "configure:6161: 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 6048 "configure"
+#line 6166 "configure"
 #include "confdefs.h"
 #include <dmedia/vl.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6053: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6171: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -6063,7 +6181,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:6078: checking for vlOpenVideo in -lvl" >&5
+echo "configure:6196: 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
@@ -6071,7 +6189,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lvl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 6086 "configure"
+#line 6204 "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
@@ -6082,7 +6200,7 @@ int main() {
 vlOpenVideo()
 ; return 0; }
 EOF
-if { (eval echo configure:6097: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6215: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -6150,7 +6268,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:6165: checking for $with_zippy_req" >&5
+echo "configure:6283: checking for $with_zippy_req" >&5
       if test -x "$with_zippy_req" ; then
         echo "$ac_t""yes" 1>&6
       else
@@ -6164,7 +6282,7 @@ echo "configure:6165: 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:6179: checking for $ac_word" >&5
+echo "configure:6297: 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
@@ -6214,7 +6332,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:6229: checking for $ac_word" >&5
+echo "configure:6347: 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
@@ -6248,7 +6366,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:6263: checking for $ac_word" >&5
+echo "configure:6381: 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
@@ -6283,7 +6401,7 @@ done
 
   if test -n "$emacs_exe" ; then
     echo $ac_n "checking for emacs yow""... $ac_c" 1>&6
-echo "configure:6298: checking for emacs yow" >&5
+echo "configure:6416: checking for emacs yow" >&5
     #
     # get emacs to tell us where the libexec directory is.
     #
@@ -6305,7 +6423,7 @@ echo "configure:6298: 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:6320: checking for xemacs yow" >&5
+echo "configure:6438: checking for xemacs yow" >&5
     if test -n "$xemacs_exe" ; then
       #
       # get xemacs to tell us where the libexec directory is.
@@ -6331,12 +6449,25 @@ echo "configure:6320: checking for xemacs yow" >&5
          dir_up=`echo "$dir" | sed 's@/[^/]*$@@'`
          
 
-          yow="yow -f $dir_up/etc/yow.lines"
-         if $dir/$yow >&- 2>&- ; then
-           ac_cv_zippy_program="$dir/$yow"
+         yowlines="$dir_up/etc/yow.lines"
+         if $dir/yow -f $yowlines >&- 2>&- ; then
+           ac_cv_zippy_program="$dir/yow -f $yowlines"
            echo "$ac_t""$ac_cv_zippy_program" 1>&6
          else
-           echo "$ac_t""no" 1>&6
+            #
+            # In newer XEmacs releases, yow.lines is in a different place,
+            # and the easiest way to get it is by calling the new function
+            # `locate-data-file'.
+            #
+            yowlines=`$xemacs_exe $eargs \
+              '(princ (concat (locate-data-file "yow.lines") "\n"))' \
+              2>/dev/null | tail -1`
+            if $dir/yow -f $yowlines >&- 2>&- ; then
+              ac_cv_zippy_program="$dir/yow -f $yowlines"
+              echo "$ac_t""$ac_cv_zippy_program" 1>&6
+            else
+              echo "$ac_t""no" 1>&6
+            fi
          fi
         fi
       fi
@@ -6351,7 +6482,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:6366: checking for $ac_word" >&5
+echo "configure:6497: 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
@@ -6387,7 +6518,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:6402: checking for $ac_word" >&5
+echo "configure:6533: 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
@@ -6486,12 +6617,12 @@ fi
 if test "$enable_vt_locking" = yes; then
 
   echo $ac_n "checking for the VT_LOCKSWITCH ioctl""... $ac_c" 1>&6
-echo "configure:6501: checking for the VT_LOCKSWITCH ioctl" >&5
+echo "configure:6632: checking for the VT_LOCKSWITCH ioctl" >&5
   if eval "test \"`echo '$''{'ac_cv_vt_lockswitch'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6506 "configure"
+#line 6637 "configure"
 #include "confdefs.h"
 #include <fcntl.h>
                    #include <sys/ioctl.h>
@@ -6500,7 +6631,7 @@ int main() {
 int x = VT_LOCKSWITCH; int y = VT_UNLOCKSWITCH;
 ; return 0; }
 EOF
-if { (eval echo configure:6515: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6646: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_vt_lockswitch=yes
 else
@@ -6554,7 +6685,7 @@ fi
 
     /*)
      echo $ac_n "checking for Kerberos headers""... $ac_c" 1>&6
-echo "configure:6569: checking for Kerberos headers" >&5
+echo "configure:6700: checking for Kerberos headers" >&5
      d=$with_kerberos/include
      if test -d $d; then
        X_CFLAGS="-I$d $X_CFLAGS"
@@ -6564,7 +6695,7 @@ echo "configure:6569: checking for Kerberos headers" >&5
      fi
 
      echo $ac_n "checking for Kerberos libs""... $ac_c" 1>&6
-echo "configure:6579: checking for Kerberos libs" >&5
+echo "configure:6710: checking for Kerberos libs" >&5
      d=$with_kerberos/lib
      if test -d $d; then
        X_LIBS="-L$d $X_LIBS"
@@ -6595,7 +6726,7 @@ echo "configure:6579: checking for Kerberos libs" >&5
 
   if test "$with_kerberos" = yes; then
     echo $ac_n "checking for Kerberos""... $ac_c" 1>&6
-echo "configure:6610: checking for Kerberos" >&5
+echo "configure:6741: checking for Kerberos" >&5
 if eval "test \"`echo '$''{'ac_cv_kerberos'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -6606,14 +6737,14 @@ else
   fi
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   cat > conftest.$ac_ext <<EOF
-#line 6621 "configure"
+#line 6752 "configure"
 #include "confdefs.h"
 #include <krb.h>
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:6628: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6759: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_kerberos=yes
 else
@@ -6637,12 +6768,12 @@ EOF
       # from Tim Showalter <tjs+@andrew.cmu.edu>
       PASSWD_LIBS="$PASSWD_LIBS -lkrb -ldes"
       echo $ac_n "checking for res_search""... $ac_c" 1>&6
-echo "configure:6652: checking for res_search" >&5
+echo "configure:6783: checking for res_search" >&5
 if eval "test \"`echo '$''{'ac_cv_func_res_search'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6657 "configure"
+#line 6788 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char res_search(); below.  */
@@ -6665,7 +6796,7 @@ res_search();
 
 ; return 0; }
 EOF
-if { (eval echo configure:6680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6811: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_res_search=yes"
 else
@@ -6683,7 +6814,7 @@ if eval "test \"`echo '$ac_cv_func_'res_search`\" = yes"; then
 else
   echo "$ac_t""no" 1>&6
 echo $ac_n "checking for res_search in -lresolv""... $ac_c" 1>&6
-echo "configure:6698: checking for res_search in -lresolv" >&5
+echo "configure:6829: checking for res_search in -lresolv" >&5
 ac_lib_var=`echo resolv'_'res_search | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -6691,7 +6822,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lresolv  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 6706 "configure"
+#line 6837 "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
@@ -6702,7 +6833,7 @@ int main() {
 res_search()
 ; return 0; }
 EOF
-if { (eval echo configure:6717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6848: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -6752,7 +6883,7 @@ fi
 
     /*)
      echo $ac_n "checking for PAM headers""... $ac_c" 1>&6
-echo "configure:6767: checking for PAM headers" >&5
+echo "configure:6898: checking for PAM headers" >&5
      d=$with_pam/include
      if test -d $d; then
        X_CFLAGS="-I$d $X_CFLAGS"
@@ -6762,7 +6893,7 @@ echo "configure:6767: checking for PAM headers" >&5
      fi
 
      echo $ac_n "checking for PAM libs""... $ac_c" 1>&6
-echo "configure:6777: checking for PAM libs" >&5
+echo "configure:6908: checking for PAM libs" >&5
      d=$with_pam/lib
      if test -d $d; then
        X_LIBS="-L$d $X_LIBS"
@@ -6793,7 +6924,7 @@ echo "configure:6777: checking for PAM libs" >&5
 
   if test "$with_pam" = yes; then
     echo $ac_n "checking for PAM""... $ac_c" 1>&6
-echo "configure:6808: checking for PAM" >&5
+echo "configure:6939: checking for PAM" >&5
 if eval "test \"`echo '$''{'ac_cv_pam'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -6804,14 +6935,14 @@ else
   fi
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   cat > conftest.$ac_ext <<EOF
-#line 6819 "configure"
+#line 6950 "configure"
 #include "confdefs.h"
 #include <security/pam_appl.h>
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:6826: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6957: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_pam=yes
 else
@@ -6857,7 +6988,7 @@ fi
 
     /*)
      echo $ac_n "checking for shadow password headers""... $ac_c" 1>&6
-echo "configure:6872: checking for shadow password headers" >&5
+echo "configure:7003: checking for shadow password headers" >&5
      d=$with_shadow/include
      if test -d $d; then
        X_CFLAGS="-I$d $X_CFLAGS"
@@ -6867,7 +6998,7 @@ echo "configure:6872: checking for shadow password headers" >&5
      fi
 
      echo $ac_n "checking for shadow password libs""... $ac_c" 1>&6
-echo "configure:6882: checking for shadow password libs" >&5
+echo "configure:7013: checking for shadow password libs" >&5
      d=$with_shadow/lib
      if test -d $d; then
        X_LIBS="-L$d $X_LIBS"
@@ -6908,7 +7039,7 @@ echo "configure:6882: checking for shadow password libs" >&5
   #
   if test "$pwent_cruft_done" = no ; then
     echo $ac_n "checking for Sun-style shadow passwords""... $ac_c" 1>&6
-echo "configure:6923: checking for Sun-style shadow passwords" >&5
+echo "configure:7054: 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
@@ -6919,7 +7050,7 @@ else
   fi
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   cat > conftest.$ac_ext <<EOF
-#line 6934 "configure"
+#line 7065 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
                                      #include <unistd.h>
@@ -6932,7 +7063,7 @@ struct passwd_adjunct *p = getpwanam("nobody");
                         const char *pw = p->pwa_passwd;
 ; return 0; }
 EOF
-if { (eval echo configure:6947: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7078: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_sun_adjunct=yes
 else
@@ -6961,7 +7092,7 @@ EOF
   #
   if test "$pwent_cruft_done" = no ; then
     echo $ac_n "checking for DEC-style shadow passwords""... $ac_c" 1>&6
-echo "configure:6976: checking for DEC-style shadow passwords" >&5
+echo "configure:7107: 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
@@ -6972,7 +7103,7 @@ else
   fi
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   cat > conftest.$ac_ext <<EOF
-#line 6987 "configure"
+#line 7118 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
                                      #include <unistd.h>
@@ -6989,7 +7120,7 @@ struct pr_passwd *p;
                         pw = p->ufld.fd_encrypt;
 ; return 0; }
 EOF
-if { (eval echo configure:7004: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7135: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_enhanced_passwd=yes
 else
@@ -7015,7 +7146,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:7030: checking for getprpwnam in -lprot" >&5
+echo "configure:7161: 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
@@ -7023,7 +7154,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lprot -lx $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 7038 "configure"
+#line 7169 "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
@@ -7034,7 +7165,7 @@ int main() {
 getprpwnam()
 ; return 0; }
 EOF
-if { (eval echo configure:7049: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7180: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -7054,7 +7185,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:7069: checking for getprpwnam in -lsecurity" >&5
+echo "configure:7200: 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
@@ -7062,7 +7193,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lsecurity  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 7077 "configure"
+#line 7208 "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
@@ -7073,7 +7204,7 @@ int main() {
 getprpwnam()
 ; return 0; }
 EOF
-if { (eval echo configure:7088: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -7102,7 +7233,7 @@ fi
   #
   if test "$pwent_cruft_done" = no ; then
     echo $ac_n "checking for HP-style shadow passwords""... $ac_c" 1>&6
-echo "configure:7117: checking for HP-style shadow passwords" >&5
+echo "configure:7248: 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
@@ -7113,7 +7244,7 @@ else
   fi
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   cat > conftest.$ac_ext <<EOF
-#line 7128 "configure"
+#line 7259 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
                                      #include <unistd.h>
@@ -7126,7 +7257,7 @@ struct s_passwd *p = getspwnam("nobody");
                         const char *pw = p->pw_passwd;
 ; return 0; }
 EOF
-if { (eval echo configure:7141: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7272: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_hpux_passwd=yes
 else
@@ -7151,7 +7282,7 @@ EOF
 
       # on HPUX, bigcrypt is in -lsec
       echo $ac_n "checking for bigcrypt in -lsec""... $ac_c" 1>&6
-echo "configure:7166: checking for bigcrypt in -lsec" >&5
+echo "configure:7297: 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
@@ -7159,7 +7290,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lsec  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 7174 "configure"
+#line 7305 "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
@@ -7170,7 +7301,7 @@ int main() {
 bigcrypt()
 ; return 0; }
 EOF
-if { (eval echo configure:7185: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7316: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -7197,7 +7328,7 @@ fi
   #
   if test "$pwent_cruft_done" = no ; then
     echo $ac_n "checking for generic shadow passwords""... $ac_c" 1>&6
-echo "configure:7212: checking for generic shadow passwords" >&5
+echo "configure:7343: 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
@@ -7208,7 +7339,7 @@ else
   fi
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   cat > conftest.$ac_ext <<EOF
-#line 7223 "configure"
+#line 7354 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
                                      #include <unistd.h>
@@ -7220,7 +7351,7 @@ struct spwd *p = getspnam("nobody");
                         const char *pw = p->sp_pwdp;
 ; return 0; }
 EOF
-if { (eval echo configure:7235: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7366: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_shadow=yes
 else
@@ -7246,7 +7377,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:7261: checking for getspnam in -lc" >&5
+echo "configure:7392: 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
@@ -7254,7 +7385,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lc  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 7269 "configure"
+#line 7400 "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
@@ -7265,7 +7396,7 @@ int main() {
 getspnam()
 ; return 0; }
 EOF
-if { (eval echo configure:7280: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -7287,7 +7418,7 @@ fi
 
       if test "$have_getspnam" = no ; then
         echo $ac_n "checking for getspnam in -lgen""... $ac_c" 1>&6
-echo "configure:7302: checking for getspnam in -lgen" >&5
+echo "configure:7433: 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
@@ -7295,7 +7426,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lgen  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 7310 "configure"
+#line 7441 "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
@@ -7306,7 +7437,7 @@ int main() {
 getspnam()
 ; return 0; }
 EOF
-if { (eval echo configure:7321: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7452: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -7337,7 +7468,7 @@ fi
   #
   if test "$pwent_cruft_done" = no ; then
     echo $ac_n "checking for FreeBSD-style shadow passwords""... $ac_c" 1>&6
-echo "configure:7352: checking for FreeBSD-style shadow passwords" >&5
+echo "configure:7483: 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
@@ -7358,7 +7489,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:7373: checking for crypt in -lc" >&5
+echo "configure:7504: 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
@@ -7366,7 +7497,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lc  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 7381 "configure"
+#line 7512 "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
@@ -7377,7 +7508,7 @@ int main() {
 crypt()
 ; return 0; }
 EOF
-if { (eval echo configure:7392: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7523: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -7399,7 +7530,7 @@ fi
 
   if test "$have_crypt" = no ; then
     echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
-echo "configure:7414: checking for crypt in -lcrypt" >&5
+echo "configure:7545: 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
@@ -7407,7 +7538,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lcrypt  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 7422 "configure"
+#line 7553 "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
@@ -7418,7 +7549,7 @@ int main() {
 crypt()
 ; return 0; }
 EOF
-if { (eval echo configure:7433: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7564: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -7626,6 +7757,10 @@ if test "$with_xshm_req" = yes -a "$have_xshm" = no ; then
   warn 'The XSHM extension was requested, but was not found.'
 fi
 
+if test "$with_xdbe_req" = yes -a "$have_xdbe" = no ; then
+  warn 'The DOUBLE-BUFFER extension was requested, but was not found.'
+fi
+
 if test "$with_sgivc_req" = yes -a "$have_sgivc" = no ; then
   warn 'The SGI-VIDEO-CONTROL extension was requested, but was not found.'
 fi
@@ -8200,7 +8335,7 @@ if test "${bindir}" = "${HACKDIR}" ; then
   echo '      "xscreensaver-demo", and "xscreensaver-command" executables'
   echo "      will be installed in ${bindir}."
   echo ""
-  echo "      The various graphics demos (80+ different executables) will"
+  echo "      The various graphics demos (90+ different executables) will"
   echo "      also be installed in ${HACKDIR}."
   echo ""
   echo "      If you would prefer the demos to be installed elsewhere"
index df6f23e67cbde728a45f12e8689963d9e7b87966..39a30f9daf980d8f22962c02c833d03dab3dee55 100644 (file)
@@ -159,7 +159,7 @@ Installation options:
   --enable-subdir=DIR     Put the demo programs in a subdirectory of \`bindir',
                           instead of putting them in bindir itself.  You can
                           specify the name of the subdirectory.  For example,
-                          --exec-prefix=/usr/local/bin --enable-subdir=demos
+                          \`--exec-prefix=/usr/local --enable-subdir=demos'
                           would put xscreensaver in /usr/local/bin/, and would
                           put the demos in /usr/local/bin/demos/.  (If DIR
                           begins with /, then bindir will not be prepended.)
@@ -777,6 +777,31 @@ elif test "$with_xshm" != no; then
 fi
 
 
+# Check for the DOUBLE-BUFFER server extension header.
+#
+have_xdbe=no
+with_xdbe_req=unspecified
+AC_ARG_WITH(xdbe-ext,
+[  --with-xdbe-ext         Include support for the DOUBLE-BUFFER server
+                          extension, if possible (this is the default).
+  --without-xdbe-ext      Do not compile in support for this extension.],
+  [with_xdbe="$withval"; with_xdbe_req="$withval"],[with_xdbe=yes])
+
+HANDLE_X_PATH_ARG(with_xdbe, --with-xdbe-ext, DOUBLE-BUFFER)
+
+if test "$with_xdbe" = yes; then
+
+  AC_CHECK_X_HEADER(X11/extensions/Xdbe.h, [have_xdbe=yes])
+  if test "$have_xdbe" = yes; then
+    AC_DEFINE(HAVE_DOUBLE_BUFFER_EXTENSION)    
+  fi
+
+elif test "$with_xdbe" != no; then
+  echo "error: must be yes or no: --with-xdbe-ext=$with_xshm"
+  exit 1
+fi
+
+
 # Check for the SGI-VIDEO-CONTROL server extension header.
 #
 have_sgivc=no
@@ -1476,12 +1501,25 @@ if test ! -n "$ac_cv_zippy_program"; then
          dir_up=`echo "$dir" | sed 's@/[^/]*$@@'`
          changequote([,])
 
-          yow="yow -f $dir_up/etc/yow.lines"
-         if $dir/$yow >&- 2>&- ; then
-           ac_cv_zippy_program="$dir/$yow"
+         yowlines="$dir_up/etc/yow.lines"
+         if $dir/yow -f $yowlines >&- 2>&- ; then
+           ac_cv_zippy_program="$dir/yow -f $yowlines"
            AC_MSG_RESULT($ac_cv_zippy_program)
          else
-           AC_MSG_RESULT(no)
+            #
+            # In newer XEmacs releases, yow.lines is in a different place,
+            # and the easiest way to get it is by calling the new function
+            # `locate-data-file'.
+            #
+            yowlines=`$xemacs_exe $eargs \
+              '(princ (concat (locate-data-file "yow.lines") "\n"))' \
+              2>/dev/null | tail -1`
+            if $dir/yow -f $yowlines >&- 2>&- ; then
+              ac_cv_zippy_program="$dir/yow -f $yowlines"
+              AC_MSG_RESULT($ac_cv_zippy_program)
+            else
+              AC_MSG_RESULT(no)
+            fi
          fi
         fi
       fi
@@ -1975,6 +2013,10 @@ if test "$with_xshm_req" = yes -a "$have_xshm" = no ; then
   warn 'The XSHM extension was requested, but was not found.'
 fi
 
+if test "$with_xdbe_req" = yes -a "$have_xdbe" = no ; then
+  warn 'The DOUBLE-BUFFER extension was requested, but was not found.'
+fi
+
 if test "$with_sgivc_req" = yes -a "$have_sgivc" = no ; then
   warn 'The SGI-VIDEO-CONTROL extension was requested, but was not found.'
 fi
@@ -2146,7 +2188,7 @@ if test "${bindir}" = "${HACKDIR}" ; then
   echo '      "xscreensaver-demo", and "xscreensaver-command" executables'
   echo "      will be installed in ${bindir}."
   echo ""
-  echo "      The various graphics demos (80+ different executables) will"
+  echo "      The various graphics demos (90+ different executables) will"
   echo "      also be installed in ${HACKDIR}."
   echo ""
   echo "      If you would prefer the demos to be installed elsewhere"
index 7391a19f2584c108b0df0f4149d633a2665096ae..d9b512295c178766710b84e45e79fa0d0b5ef618 100644 (file)
@@ -81,7 +81,7 @@ PAM_OBJS      = passwd-pam.o
 LOCK_SRCS_1    = lock.c passwd.c
 LOCK_OBJS_1    = lock.o passwd.o
 
-TEST_SRCS      = test-passwd.c test-uid.c test-xdpms.c
+TEST_SRCS      = test-passwd.c test-uid.c test-xdpms.c test-grab.c
 
 TOOLKIT_SRCS   = @TOOLKIT_SRCS@
 TOOLKIT_OBJS   = @TOOLKIT_OBJS@
@@ -401,6 +401,9 @@ test-uid: test-uid.o
 test-xdpms: test-xdpms.o
        $(CC) $(LDFLAGS) -o $@ test-xdpms.o $(SAVER_LIBS)
 
+test-grab: test-grab.o
+       $(CC) $(LDFLAGS) -o $@ test-grab.o $(SAVER_LIBS)
+
 
 # This kludge is so that I can build/test the Athena version of the
 # xscreensaver-demo program without having to re-run configure.
@@ -499,4 +502,5 @@ test-passwd.o: $(UTILS_SRC)/visual.h
 test-passwd.o: XScreenSaver_ad.h
 test-uid.o: ../config.h
 test-xdpms.o: ../config.h
+test-grab.o: ../config.h
 
index e65ce81b8b5b8a9ddc77997b68f098977b249098..bdfcc5868dc07442a422e1cc655bcf13de359ee2 100644 (file)
@@ -4,8 +4,8 @@
 !            a screen saver and locker for the X window system
 !                            by Jamie Zawinski
 !
-!                              version 3.08
-!                                15-Mar-99
+!                              version 3.09
+!                                11-Apr-99
 !
 ! See "man xscreensaver" for more info.  The latest version is always
 ! available at http://www.jwz.org/xscreensaver/
                blitspin -root -grab                                    \n\
                slip -root                                              \n\
                distort -root                                           \n\
+               spotlight -root                                         \n\
                hypercube -root                                         \n\
                halo -root                                              \n\
                maze -root                                              \n\
                t3d -root                                               \n\
                penetrate -root                                         \n\
                deluxe -root                                            \n\
+               compass -root                                           \n\
+               squiral -root                                           \n\
+               xflame -root                                            \n\
+               wander -root                                            \n\
+               wander -root -advance 0 -size 10 -circles True            \
+                 -length 10000 -reset 100000                           \n\
+               critical -root                                          \n\
                                                                          \
        mono:   rocks -root                                             \n\
        color:  rocks -root -fg darksalmon                              \n\
index 593d19ba5d3db988ce527ab5ad3fbd53e3256a9e..9d4c348e1a773e419177b8b070396e039c168b4e 100644 (file)
@@ -47,6 +47,7 @@
                blitspin -root -grab                                    \\n\
                slip -root                                              \\n\
                distort -root                                           \\n\
+               spotlight -root                                         \\n\
                hypercube -root                                         \\n\
                halo -root                                              \\n\
                maze -root                                              \\n\
                t3d -root                                               \\n\
                penetrate -root                                         \\n\
                deluxe -root                                            \\n\
+               compass -root                                           \\n\
+               squiral -root                                           \\n\
+               xflame -root                                            \\n\
+               wander -root                                            \\n\
+               wander -root -advance 0 -size 10 -circles True            \
+                 -length 10000 -reset 100000                           \\n\
+               critical -root                                          \\n\
                                                                          \
        mono:   rocks -root                                             \\n\
        color:  rocks -root -fg darksalmon                              \\n\
diff --git a/driver/test-grab.c b/driver/test-grab.c
new file mode 100644 (file)
index 0000000..9b4a914
--- /dev/null
@@ -0,0 +1,89 @@
+/* test-uid.c --- playing with grabs.
+ * xscreensaver, Copyright (c) 1999 Jamie Zawinski <jwz@jwz.org>
+ *
+ * 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.
+ */
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include <stdlib.h>
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#include <stdio.h>
+#include <sys/time.h>
+
+#include <X11/Xlib.h>
+#include <X11/Intrinsic.h>
+
+char *progname = 0;
+char *progclass = "XScreenSaver";
+
+#define ALL_POINTER_EVENTS \
+       (ButtonPressMask | ButtonReleaseMask | EnterWindowMask | \
+        LeaveWindowMask | PointerMotionMask | PointerMotionHintMask | \
+        Button1MotionMask | Button2MotionMask | Button3MotionMask | \
+        Button4MotionMask | Button5MotionMask | ButtonMotionMask)
+
+int
+main (int argc, char **argv)
+{
+  XtAppContext app;
+  int kstatus, mstatus;
+  Cursor cursor = 0;
+  int delay = 60 * 15;
+  Widget toplevel_shell = XtAppInitialize (&app, progclass, 0, 0,
+                                          &argc, argv, 0, 0, 0);
+  Display *dpy = XtDisplay (toplevel_shell);
+  Window w = RootWindow (dpy, DefaultScreen(dpy));
+  XtGetApplicationNameAndClass (dpy, &progname, &progclass);
+
+  kstatus = XGrabKeyboard (dpy, w, True,
+                           GrabModeSync, GrabModeAsync,
+                           CurrentTime);
+  fprintf (stderr, "%s: grabbing keyboard on 0x%x... %s.\n",
+           progname, (unsigned long) w,
+           (kstatus == GrabSuccess ? "GrabSuccess" :
+            kstatus == AlreadyGrabbed ? "AlreadyGrabbed" :
+            kstatus == GrabInvalidTime ? "GrabInvalidTime" :
+            kstatus == GrabNotViewable ? "GrabNotViewable" :
+            kstatus == GrabFrozen ? "GrabFrozen" :
+            "???"));
+
+  mstatus = XGrabPointer (dpy, w, True, ALL_POINTER_EVENTS,
+                          GrabModeAsync, GrabModeAsync, None,
+                          cursor, CurrentTime);
+  fprintf (stderr, "%s: grabbing mouse on 0x%x... %s.\n",
+           progname, (unsigned long) w,
+           (mstatus == GrabSuccess ? "GrabSuccess" :
+            mstatus == AlreadyGrabbed ? "AlreadyGrabbed" :
+            mstatus == GrabInvalidTime ? "GrabInvalidTime" :
+            mstatus == GrabNotViewable ? "GrabNotViewable" :
+            mstatus == GrabFrozen ? "GrabFrozen" :
+            "???"));
+
+  XSync(dpy, False);
+
+  if (kstatus == GrabSuccess || mstatus == GrabSuccess)
+    {
+      fprintf (stderr, "%s: sleeping for %d:%02d:%02d...\n",
+               progname,
+               delay / (60 * 60),
+               (delay % (60 * 60)) / 60,
+               delay % 60);
+      fflush(stderr);
+      sleep (delay);
+      XSync(dpy, False);
+    }
+
+  exit (0);
+}
index 79b9f0c5b90ca303f580be24c79455f8e11fb000..79a0dfdf0d67830508b427bad7a73a44cee984d6 100644 (file)
 #endif
 
 #include <stdlib.h>
-#include <unistd.h>
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
 #include <stdio.h>
 #include <sys/time.h>
 
index 982b073291687780549080a7bfe161b4bfee158a..5f1bd418fc3b82ec53c6925d71a73181a6b971f4 100644 (file)
@@ -118,7 +118,16 @@ notice_events (saver_info *si, Window window, Bool top_p)
 
   /* Select for SubstructureNotify on all windows.
      Select for KeyPress on all windows that already have it selected.
-     Do we need to select for ButtonRelease?  I don't think so.
+
+     Note that we can't select for ButtonPress, because of X braindamage:
+     only one client at a time may select for ButtonPress on a given
+     window, though any number can select for KeyPress.  Someone explain
+     *that* to me.
+
+     So, if the user spends a while clicking the mouse without ever moving
+     the mouse or touching the keyboard, we won't know that they've been
+     active, and the screensaver will come on.  That sucks, but I don't
+     know how to get around it.
    */
   XSelectInput (si->dpy, window, SubstructureNotifyMask | events);
 
index e5231fb03270d7ab31c839929d9ef41046d406fe..909abe513d4817d4c351b8ffdcc81483ed98d26b 100644 (file)
@@ -93,31 +93,6 @@ static void store_activate_time (saver_info *si, Bool use_last_p);
         Button4MotionMask | Button5MotionMask | ButtonMotionMask)
 
 
-static int
-grab_kbd(saver_info *si, Window w)
-{
-  saver_preferences *p = &si->prefs;
-  int status = XGrabKeyboard (si->dpy, w, True,
-                             /* I don't really understand Sync vs Async,
-                                but these seem to work... */
-                             GrabModeSync, GrabModeAsync,
-                             CurrentTime);
-  if (status == GrabSuccess)
-    si->keyboard_grab_window = w;
-
-  if (p->verbose_p)
-    fprintf(stderr, "%s: grabbing keyboard on 0x%x... %s.\n",
-           blurb(), (unsigned long) w,
-           (status == GrabSuccess ? "GrabSuccess" :
-            status == AlreadyGrabbed ? "AlreadyGrabbed" :
-            status == GrabInvalidTime ? "GrabInvalidTime" :
-            status == GrabNotViewable ? "GrabNotViewable" :
-            status == GrabFrozen ? "GrabFrozen" :
-            "???"));
-
-  return status;
-}
-
 static const char *
 grab_string(int status)
 {
@@ -137,6 +112,24 @@ grab_string(int status)
     }
 }
 
+static int
+grab_kbd(saver_info *si, Window w)
+{
+  saver_preferences *p = &si->prefs;
+  int status = XGrabKeyboard (si->dpy, w, True,
+                             /* I don't really understand Sync vs Async,
+                                but these seem to work... */
+                             GrabModeSync, GrabModeAsync,
+                             CurrentTime);
+  if (status == GrabSuccess)
+    si->keyboard_grab_window = w;
+
+  if (p->verbose_p)
+    fprintf(stderr, "%s: grabbing keyboard on 0x%x... %s.\n",
+           blurb(), (unsigned long) w, grab_string(status));
+  return status;
+}
+
 
 static int
 grab_mouse (saver_info *si, Window w, Cursor cursor)
@@ -179,7 +172,7 @@ ungrab_mouse(saver_info *si)
 }
 
 
-Bool
+static Bool
 grab_keyboard_and_mouse (saver_info *si, Window window, Cursor cursor)
 {
   Status mstatus, kstatus;
@@ -209,7 +202,7 @@ grab_keyboard_and_mouse (saver_info *si, Window window, Cursor cursor)
          mstatus == GrabSuccess);
 }
 
-void
+static void
 ungrab_keyboard_and_mouse (saver_info *si)
 {
   ungrab_mouse (si);
@@ -1069,21 +1062,33 @@ raise_window (saver_info *si,
     }
 }
 
-void
+Bool
 blank_screen (saver_info *si)
 {
   int i;
+  Bool ok;
 
   /* Note: we do our grabs on the root window, not on the screensaver window.
      If we grabbed on the saver window, then the demo mode and lock dialog
      boxes wouldn't get any events.
    */
-  grab_keyboard_and_mouse (si,
-                          /*si->screens[0].screensaver_window,*/
-                          RootWindowOfScreen(si->screens[0].screen),
-                          (si->demoing_p
-                           ? 0
-                           : si->screens[0].cursor));
+  ok = grab_keyboard_and_mouse (si,
+                                /*si->screens[0].screensaver_window,*/
+                                RootWindowOfScreen(si->screens[0].screen),
+                                (si->demoing_p
+                                 ? 0
+                                 : si->screens[0].cursor));
+
+
+  if (si->using_mit_saver_extension || si->using_sgi_saver_extension)
+    /* If we're using a server extension, then failure to get a grab is
+       not a big deal -- even without the grab, we will still be able
+       to un-blank when there is user activity, since the server will
+       tell us. */
+    ok = True;
+
+  if (!ok)
+    return False;
 
   for (i = 0; i < si->nscreens; i++)
     {
@@ -1111,6 +1116,8 @@ blank_screen (saver_info *si)
 #endif
 
   si->screen_blanked_p = True;
+
+  return True;
 }
 
 void
index 979e9d4bae1dd647433fda5355ca3d4bd2384014..fb31471061251cfb5a91684d0c87e99bc4edeab5 100644 (file)
@@ -11,7 +11,7 @@
 .if n .sp 1
 .if t .sp .5
 ..
-.TH XScreenSaver 1 "15-Mar-99 (3.08)" "X Version 11"
+.TH XScreenSaver 1 "11-Apr-99 (3.09)" "X Version 11"
 .SH NAME
 xscreensaver-command - control a running xscreensaver process
 .SH SYNOPSIS
index c35e3daf487d25bcad28350ef8f5ea5b57d2d5e9..86a470aa12f9dd15b53f82fae1a7c25e61d7c06b 100644 (file)
@@ -11,7 +11,7 @@
 .if n .sp 1
 .if t .sp .5
 ..
-.TH XScreenSaver 1 "15-Mar-99 (3.08)" "X Version 11"
+.TH XScreenSaver 1 "11-Apr-99 (3.09)" "X Version 11"
 .SH NAME
 xscreensaver-demo - interactively control the background xscreensaver daemon
 .SH SYNOPSIS
index 7b16c898aaab4d95f22aa643084ed3842b2cd772..dda587a12f81c2da057bdff4c884b2760224a66e 100644 (file)
@@ -879,7 +879,25 @@ main_loop (saver_info *si)
 
       maybe_reload_init_file (si);
 
-      blank_screen (si);
+      if (! blank_screen (si))
+        {
+          /* We were unable to grab either the keyboard or mouse.
+             This means we did not (and must not) blank the screen.
+             If we were to blank the screen while some other program
+             is holding both the mouse and keyboard grabbed, then
+             we would never be able to un-blank it!  We would never
+             see any events, and the display would be wedged.
+
+             So, just go around the loop again and wait for the
+             next bout of idleness.
+          */
+
+          fprintf (stderr,
+                  "%s: unable to grab keyboard or mouse!  Blanking aborted.\n",
+                   blurb(), timestring ());
+          continue;
+        }
+
       kill_screenhack (si);
       spawn_screenhack (si, True);
 
index 9f128721043583db89f009aecb5470a2f81e3e20..7860dfe4f41f8f15484d28e4901ebfc3ce20e352 100644 (file)
@@ -270,10 +270,8 @@ extern void initialize_screensaver_window (saver_info *si);
 extern void raise_window (saver_info *si,
                            Bool inhibit_fade, Bool between_hacks_p,
                            Bool dont_clear);
-extern void blank_screen (saver_info *si);
+extern Bool blank_screen (saver_info *si);
 extern void unblank_screen (saver_info *si);
-extern Bool grab_keyboard_and_mouse (saver_info *si, Window, Cursor);
-extern void ungrab_keyboard_and_mouse (saver_info *si);
 
 /* =======================================================================
    locking
index 63b0d32586b2fa084a6eb57e8a98b2633e9fd9dc..445075874bb1e4ecbb52c70c55f4ebdb9219b51b 100644 (file)
@@ -11,7 +11,7 @@
 .if n .sp 1
 .if t .sp .5
 ..
-.TH XScreenSaver 1 "15-Mar-99 (3.08)" "X Version 11"
+.TH XScreenSaver 1 "11-Apr-99 (3.09)" "X Version 11"
 .SH NAME
 xscreensaver - graphics hack and screen locker, launched when the user is idle
 .SH SYNOPSIS
@@ -442,6 +442,8 @@ The drawback to doing this is that perhaps you \fIreally do\fP want idleness
 on the X console to cause the X display to lock, even if there is activity
 on other virtual consoles.  If you want that, then set this option to False.
 (Or just lock the X console manually.)
+
+The default value for this resource is True, on systems where it works.
 .TP 8
 .B overlayStderr\fP (class \fBBoolean\fP)
 If \fBcaptureStderr\fP is True, and your server supports ``overlay'' visuals,
@@ -1180,6 +1182,14 @@ If you find that GL programs only work properly when run as root, and not
 as normal users, then the problem is that your \fI/dev/3dfx\fP file is not
 configured properly.  Check the Linux 3Dfx FAQ.
 .TP 8
+.B Keyboard LEDs
+If \fIprocInterrupts\fP is on (which is the default on Linux systems) and
+you're using some program that toggles the state of your keyboard LEDs,
+xscreensaver won't work right: turning those LEDs on or off causes a 
+keyboard interrupt, which xscreensaver will interpret as user activity.
+So if you're using such a program, set the \fIprocInterrupts\fP resource
+to False.
+.TP 8
 .B Extensions
 If you are not making use of one of the server extensions (\fBXIDLE\fP,
 \fBSGI SCREEN_SAVER\fP, or \fBMIT-SCREEN-SAVER\fP), then it is possible, in 
index 7f758c6688fdd5f7c162009c2c6b144bed109e7f..e9ce414e314cf6ec7671c61146e29c856f8fcc7d 100644 (file)
@@ -59,14 +59,14 @@ UTIL_SRCS   = $(UTILS_SRC)/alpha.c $(UTILS_SRC)/colors.c \
                  $(UTILS_SRC)/usleep.c $(UTILS_SRC)/visual.c \
                  $(UTILS_SRC)/xroger.c $(UTILS_SRC)/yarandom.c \
                  $(UTILS_SRC)/erase.c $(UTILS_SRC)/sgivideo.c \
-                 $(UTILS_SRC)/xshm.c
+                 $(UTILS_SRC)/xshm.c $(UTILS_SRC)/xdbe.c
 UTIL_OBJS      = $(UTILS_BIN)/alpha.o $(UTILS_BIN)/colors.o \
                  $(UTILS_BIN)/grabscreen.o $(UTILS_BIN)/hsv.o \
                  $(UTILS_BIN)/resources.o $(UTILS_BIN)/spline.o \
                  $(UTILS_BIN)/usleep.o $(UTILS_BIN)/visual.o \
                  $(UTILS_BIN)/xroger.o $(UTILS_BIN)/yarandom.o \
                  $(UTILS_BIN)/erase.o $(UTILS_BIN)/sgivideo.o \
-                 $(UTILS_SRC)/xshm.o
+                 $(UTILS_SRC)/xshm.o $(UTILS_SRC)/xdbe.o
 
 SRCS           = attraction.c blitspin.c bouboule.c braid.c bubbles.c \
                  bubbles-default.c decayscreen.c deco.c drift.c flag.c \
@@ -81,7 +81,8 @@ SRCS          = attraction.c blitspin.c bouboule.c braid.c bubbles.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 distort.c kumppa.c \
-                 sonar.c demon.c loop.c t3d.c penetrate.c deluxe.c
+                 sonar.c demon.c loop.c t3d.c penetrate.c deluxe.c compass.c \
+                 squiral.c xflame.c wander.c spotlight.c critical.c
 
 OBJS           = attraction.o blitspin.o bouboule.o braid.o bubbles.o \
                  bubbles-default.o decayscreen.o deco.o drift.o flag.o \
@@ -96,7 +97,8 @@ OBJS          = attraction.o blitspin.o bouboule.o braid.o bubbles.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 distort.o kumppa.o \
-                 sonar.o demon.o loop.o t3d.o penetrate.o deluxe.o
+                 sonar.o demon.o loop.o t3d.o penetrate.o deluxe.o compass.o \
+                 squiral.o xflame.o wander.o spotlight.o critical.o
 
 EXES           = attraction blitspin bouboule braid bubbles decayscreen deco \
                  drift flag flame forest vines galaxy grav greynetic halo \
@@ -107,7 +109,8 @@ EXES                = attraction blitspin bouboule braid bubbles decayscreen deco \
                  fadeplot rd-bomb coral mountain triangle lissie worm rotor \
                  ant xjack xlyap jigsaw cynosure moire2 flow epicycle \
                  interference truchet bsod crystal discrete distort kumppa \
-                 sonar demon loop t3d penetrate deluxe
+                 sonar demon loop t3d penetrate deluxe compass squiral \
+                 xflame wander spotlight critical
 
 HACK_OBJS_1    = $(UTILS_BIN)/resources.o $(UTILS_BIN)/visual.o \
                  $(UTILS_BIN)/usleep.o $(UTILS_BIN)/yarandom.o @XMU_OBJS@
@@ -117,6 +120,7 @@ COLOR_OBJS  = $(UTILS_BIN)/hsv.o $(UTILS_BIN)/colors.o
 GRAB_OBJS_1    = $(UTILS_BIN)/grabscreen.o $(SGI_VIDEO_OBJS)
 GRAB_OBJS      = $(GRAB_OBJS_1) $(COLOR_OBJS)
 XSHM_OBJS      = $(UTILS_BIN)/xshm.o
+XDBE_OBJS      = $(UTILS_BIN)/xdbe.o
 GRAB_LIBS      = $(SGI_VIDEO_LIBS)
 
 HDRS           = bubbles.h screenhack.h xlockmore.h xlockmoreI.h automata.h
@@ -131,7 +135,7 @@ MEN         = attraction.man blitspin.man bouboule.man braid.man \
                  slip.man sphere.man spiral.man strange.man swirl.man \
                  xroger.man goop.man starfish.man munch.man rd-bomb.man \
                  xjack.man xlyap.man jigsaw.man epicycle.man bsod.man \
-                 sonar.man t3d.man
+                 sonar.man t3d.man squiral.man spotlight.man critical.man
 STAR           = *
 EXTRAS         = README Makefile.in xlock_23.h .gdbinit \
                  vidwhacker \
@@ -300,6 +304,7 @@ $(UTILS_BIN)/xroger.o:              $(UTILS_SRC)/xroger.c
 $(UTILS_BIN)/yarandom.o:       $(UTILS_SRC)/yarandom.c
 $(UTILS_BIN)/erase.o:          $(UTILS_SRC)/erase.c
 $(UTILS_BIN)/xshm.o:           $(UTILS_SRC)/xshm.c
+$(UTILS_BIN)/xdbe.o:           $(UTILS_SRC)/xdbe.c
 
 $(UTIL_OBJS):
        cd $(UTILS_BIN) ; \
@@ -325,6 +330,7 @@ GRAB                = $(GRAB_OBJS)
 ERASE          = $(UTILS_BIN)/erase.o
 COL            = $(COLOR_OBJS)
 SHM            = $(XSHM_OBJS)
+DBE            = $(XDBE_OBJS)
 
 CC_HACK                = $(CC) $(LDFLAGS)
 
@@ -384,8 +390,8 @@ maze:               maze.o          $(HACK_OBJS) $(ERASE) $(XROG)
 moire:         moire.o         $(HACK_OBJS) $(COL) $(SHM)
        $(CC_HACK) -o $@ $@.o   $(HACK_OBJS) $(COL) $(SHM) $(HACK_LIBS)
 
-moire2:                moire2.o        $(HACK_OBJS) $(COL)
-       $(CC_HACK) -o $@ $@.o   $(HACK_OBJS) $(COL) $(HACK_LIBS)
+moire2:                moire2.o        $(HACK_OBJS) $(COL) $(DBE)
+       $(CC_HACK) -o $@ $@.o   $(HACK_OBJS) $(COL) $(DBE) $(HACK_LIBS)
 
 noseguy:       noseguy.o       $(HACK_OBJS)
        $(CC_HACK) -o $@ $@.o   $(HACK_OBJS) $(XPM_LIBS)
@@ -441,8 +447,8 @@ cynosure:   cynosure.o      $(HACK_OBJS) $(COL)
 epicycle:      epicycle.o      $(HACK_OBJS) $(COL) $(ERASE)
        $(CC_HACK) -o $@ $@.o   $(HACK_OBJS) $(COL) $(ERASE) $(HACK_LIBS)
 
-interference:  interference.o  $(HACK_OBJS) $(COL) $(SHM)
-       $(CC_HACK) -o $@ $@.o   $(HACK_OBJS) $(COL) $(SHM) $(HACK_LIBS)
+interference:  interference.o  $(HACK_OBJS) $(COL) $(SHM) $(DBE)
+       $(CC_HACK) -o $@ $@.o   $(HACK_OBJS) $(COL) $(SHM) $(DBE) $(HACK_LIBS)
 
 truchet:        truchet.o      $(HACK_OBJS) $(COL)
        $(CC_HACK) -o $@ $@.o   $(HACK_OBJS) $(COL) $(HACK_LIBS)
@@ -453,8 +459,8 @@ bsod:               bsod.o          $(HACK_OBJS) $(COL)
 distort:       distort.o       $(HACK_OBJS) $(GRAB) $(SHM)
        $(CC_HACK) -o $@ $@.o   $(HACK_OBJS) $(GRAB) $(SHM) $(HACK_LIBS) $(GRAB_LIBS)
 
-kumppa:                kumppa.o        $(HACK_OBJS)
-       $(CC_HACK) -o $@ $@.o   $(HACK_OBJS) $(HACK_LIBS)
+kumppa:                kumppa.o        $(HACK_OBJS) $(DBE)
+       $(CC_HACK) -o $@ $@.o   $(HACK_OBJS) $(DBE) $(HACK_LIBS)
 
 sonar:         sonar.o         $(HACK_OBJS) $(COL)
        $(CC_HACK) -o $@ $@.o   $(HACK_OBJS) $(COL) $(HACK_LIBS)
@@ -465,9 +471,27 @@ t3d:               t3d.o           $(HACK_OBJS) $(COL)
 penetrate:     penetrate.o     $(HACK_OBJS) $(COL)
        $(CC_HACK) -o $@ $@.o   $(HACK_OBJS) $(COL) $(HACK_LIBS)
 
-deluxe:                deluxe.o        $(HACK_OBJS) $(COL)
+deluxe:                deluxe.o        $(HACK_OBJS) $(COL) $(DBE)
+       $(CC_HACK) -o $@ $@.o   $(HACK_OBJS) $(COL) $(DBE) $(HACK_LIBS)
+
+compass:       compass.o       $(HACK_OBJS) $(DBE)
+       $(CC_HACK) -o $@ $@.o   $(HACK_OBJS) $(DBE) $(HACK_LIBS)
+
+squiral:       squiral.o       $(HACK_OBJS) $(COL)
        $(CC_HACK) -o $@ $@.o   $(HACK_OBJS) $(COL) $(HACK_LIBS)
 
+xflame:                xflame.o        $(HACK_OBJS) $(SHM)
+       $(CC_HACK) -o $@ $@.o   $(HACK_OBJS) $(SHM) $(HACK_LIBS) $(XPM_LIBS)
+
+wander:                wander.o        $(HACK_OBJS) $(COL) $(ERASE)
+       $(CC_HACK) -o $@ $@.o   $(HACK_OBJS) $(COL) $(ERASE) $(HACK_LIBS)
+
+spotlight:     spotlight.o     $(HACK_OBJS) $(GRAB)
+       $(CC_HACK) -o $@ $@.o   $(HACK_OBJS) $(GRAB) $(HACK_LIBS) $(GRAB_LIBS)
+
+critical:      critical.o      $(HACK_OBJS) $(COL) $(ERASE)
+       $(CC_HACK) -o $@ $@.o   $(HACK_OBJS) $(COL) $(ERASE) $(HACK_LIBS)
+
 
 # The rules for those hacks which follow the `xlockmore' API.
 #
@@ -1348,6 +1372,7 @@ moire2.o: $(UTILS_SRC)/hsv.h
 moire2.o: $(UTILS_SRC)/colors.h
 moire2.o: $(UTILS_SRC)/grabscreen.h
 moire2.o: $(UTILS_SRC)/visual.h
+moire2.o: $(UTILS_SRC)/xdbe.h
 flow.o: $(srcdir)/xlockmore.h
 flow.o: ../config.h
 flow.o: $(srcdir)/xlockmoreI.h
@@ -1380,6 +1405,7 @@ interference.o: $(UTILS_SRC)/hsv.h
 interference.o: $(UTILS_SRC)/colors.h
 interference.o: $(UTILS_SRC)/grabscreen.h
 interference.o: $(UTILS_SRC)/visual.h
+interference.o: $(UTILS_SRC)/xdbe.h
 truchet.o: $(srcdir)/screenhack.h
 truchet.o: ../config.h
 truchet.o: $(UTILS_SRC)/yarandom.h
@@ -1445,6 +1471,7 @@ kumppa.o: $(UTILS_SRC)/hsv.h
 kumppa.o: $(UTILS_SRC)/colors.h
 kumppa.o: $(UTILS_SRC)/grabscreen.h
 kumppa.o: $(UTILS_SRC)/visual.h
+kumppa.o: $(UTILS_SRC)/xdbe.h
 sonar.o: $(srcdir)/screenhack.h
 sonar.o: ../config.h
 sonar.o: $(UTILS_SRC)/yarandom.h
@@ -1507,4 +1534,64 @@ deluxe.o: $(UTILS_SRC)/hsv.h
 deluxe.o: $(UTILS_SRC)/colors.h
 deluxe.o: $(UTILS_SRC)/grabscreen.h
 deluxe.o: $(UTILS_SRC)/visual.h
+deluxe.o: $(UTILS_SRC)/xdbe.h
+compass.o: $(srcdir)/screenhack.h
+compass.o: ../config.h
+compass.o: $(UTILS_SRC)/yarandom.h
+compass.o: $(UTILS_SRC)/usleep.h
+compass.o: $(UTILS_SRC)/resources.h
+compass.o: $(UTILS_SRC)/hsv.h
+compass.o: $(UTILS_SRC)/colors.h
+compass.o: $(UTILS_SRC)/grabscreen.h
+compass.o: $(UTILS_SRC)/visual.h
+compass.o: $(UTILS_SRC)/xdbe.h
+squiral.o: $(srcdir)/screenhack.h
+squiral.o: ../config.h
+squiral.o: $(UTILS_SRC)/yarandom.h
+squiral.o: $(UTILS_SRC)/usleep.h
+squiral.o: $(UTILS_SRC)/resources.h
+squiral.o: $(UTILS_SRC)/hsv.h
+squiral.o: $(UTILS_SRC)/colors.h
+squiral.o: $(UTILS_SRC)/grabscreen.h
+squiral.o: $(UTILS_SRC)/visual.h
+squiral.o: $(UTILS_SRC)/erase.h
+xflame.o: $(srcdir)/screenhack.h
+xflame.o: ../config.h
+xflame.o: $(UTILS_SRC)/yarandom.h
+xflame.o: $(UTILS_SRC)/usleep.h
+xflame.o: $(UTILS_SRC)/resources.h
+xflame.o: $(UTILS_SRC)/hsv.h
+xflame.o: $(UTILS_SRC)/colors.h
+xflame.o: $(UTILS_SRC)/grabscreen.h
+xflame.o: $(UTILS_SRC)/visual.h
+xflame.o: $(UTILS_SRC)/xshm.h
+wander.o: $(srcdir)/screenhack.h
+wander.o: ../config.h
+wander.o: $(UTILS_SRC)/yarandom.h
+wander.o: $(UTILS_SRC)/usleep.h
+wander.o: $(UTILS_SRC)/resources.h
+wander.o: $(UTILS_SRC)/hsv.h
+wander.o: $(UTILS_SRC)/colors.h
+wander.o: $(UTILS_SRC)/grabscreen.h
+wander.o: $(UTILS_SRC)/visual.h
+wander.o: $(UTILS_SRC)/erase.h
+spotlight.o: $(srcdir)/screenhack.h
+spotlight.o: ../config.h
+spotlight.o: $(UTILS_SRC)/yarandom.h
+spotlight.o: $(UTILS_SRC)/usleep.h
+spotlight.o: $(UTILS_SRC)/resources.h
+spotlight.o: $(UTILS_SRC)/hsv.h
+spotlight.o: $(UTILS_SRC)/colors.h
+spotlight.o: $(UTILS_SRC)/grabscreen.h
+spotlight.o: $(UTILS_SRC)/visual.h
+critical.o: $(srcdir)/screenhack.h
+critical.o: ../config.h
+critical.o: $(UTILS_SRC)/yarandom.h
+critical.o: $(UTILS_SRC)/usleep.h
+critical.o: $(UTILS_SRC)/resources.h
+critical.o: $(UTILS_SRC)/hsv.h
+critical.o: $(UTILS_SRC)/colors.h
+critical.o: $(UTILS_SRC)/grabscreen.h
+critical.o: $(UTILS_SRC)/visual.h
+critical.o: $(UTILS_SRC)/erase.h
 
index 2fd27c0eee092c20a18ca61111ad93103a716fe4..bbbc2ca29b011d4ac3b1fb2b22d88822b6e9d8c7 100644 (file)
@@ -158,6 +158,11 @@ static Bool
 bsod_sleep(Display *dpy, int seconds)
 {
   int q = seconds * 4;
+  int quantum = 250000;
+
+  if (seconds == -1)
+    q = 1, quantum = 100000;
+
   do
     {
       XSync(dpy, False);
@@ -165,6 +170,8 @@ bsod_sleep(Display *dpy, int seconds)
         {
           XEvent event;
           XNextEvent (dpy, &event);
+          if (event.xany.type == ButtonPress)
+            return True;
           if (event.xany.type == KeyPress)
             {
               KeySym keysym;
@@ -179,7 +186,7 @@ bsod_sleep(Display *dpy, int seconds)
       if (q > 0)
        {
          q--;
-         usleep(250000);
+         usleep(quantum);
        }
     }
   while (q > 0);
@@ -317,10 +324,10 @@ sco (Display *dpy, Window window, int delay)
   const char *def_font = "fixed";
   XFontStruct *font;
   GC gc;
-  int lines = 1;
+  int lines_1 = 0, lines_2 = 0, lines_3 = 0, lines_4 = 0;
   const char *s;
 
-  const char *sco_panic =
+  const char *sco_panic_1 =
     ("Unexpected trap in kernel mode:\n"
      "\n"
      "cr0 0x80010013     cr2  0x00000014     cr3 0x00000000  tlb  0x00000000\n"
@@ -332,11 +339,17 @@ sco (Display *dpy, Window window, int delay)
      "\n"
      "PANIC: k_trap - kernel mode trap type 0x0000000E\n"
      "Trying to dump 5023 pages to dumpdev hd (1/41), 63 pages per '.'\n"
-     "...............................................................................\n"
-     "5023 pages dumped\n"
+    );
+  const char *sco_panic_2 =
+   ("...............................................................................\n"
+    );
+  const char *sco_panic_3 =
+    ("5023 pages dumped\n"
      "\n"
      "\n"
-     "**   Safe to Power Off   **\n"
+     );
+  const char *sco_panic_4 =
+    ("**   Safe to Power Off   **\n"
      "           - or -\n"
      "** Press Any Key to Reboot **\n"
     );
@@ -344,7 +357,10 @@ sco (Display *dpy, Window window, int delay)
   if (!get_boolean_resource("doSCO", "DoSCO"))
     return False;
 
-  for (s = sco_panic; *s; s++) if (*s == '\n') lines++;
+  for (s = sco_panic_1; *s; s++) if (*s == '\n') lines_1++;
+  for (s = sco_panic_2; *s; s++) if (*s == '\n') lines_2++;
+  for (s = sco_panic_3; *s; s++) if (*s == '\n') lines_3++;
+  for (s = sco_panic_4; *s; s++) if (*s == '\n') lines_4++;
 
   XGetWindowAttributes (dpy, window, &xgwa);
 
@@ -372,13 +388,45 @@ sco (Display *dpy, Window window, int delay)
   gc = XCreateGC(dpy, window, GCFont|GCForeground|GCBackground, &gcv);
 
   draw_string(dpy, window, gc, &gcv, font,
-             10, xgwa.height - (lines * (font->ascent + font->descent + 1)),
+             10, xgwa.height - ((lines_1 + lines_2 + lines_3 + lines_4 + 1) *
+                                 (font->ascent + font->descent + 1)),
              10, 10,
-             sco_panic, 0);
-  XFreeGC(dpy, gc);
+             sco_panic_1, 0);
+  XSync(dpy, False);
+  for (s = sco_panic_2; *s; s++)
+    {
+      char *ss = strdup(sco_panic_2);
+      ss[s - sco_panic_2] = 0;
+      draw_string(dpy, window, gc, &gcv, font,
+                  10, xgwa.height - ((lines_2 + lines_3 + lines_4 + 1) *
+                                     (font->ascent + font->descent + 1)),
+                  10, 10,
+                  ss, 0);
+      XSync(dpy, False);
+      free(ss);
+      if (bsod_sleep (dpy, -1))
+        goto DONE;
+    }
+
+  draw_string(dpy, window, gc, &gcv, font,
+             10, xgwa.height - ((lines_3 + lines_4 + 1) *
+                                 (font->ascent + font->descent + 1)),
+             10, 10,
+             sco_panic_3, 0);
   XSync(dpy, False);
+  if (bsod_sleep(dpy, 1))
+    goto DONE;
+  draw_string(dpy, window, gc, &gcv, font,
+             10, xgwa.height - ((lines_4 + 1) *
+                                 (font->ascent + font->descent + 1)),
+             10, 10,
+             sco_panic_4, 0);
+  XSync(dpy, False);
+
   bsod_sleep(dpy, delay);
+ DONE:
   XClearWindow(dpy, window);
+  XFreeGC(dpy, gc);
   XFreeFont(dpy, font);
   return True;
 }
@@ -661,15 +709,17 @@ atari (Display *dpy, Window window, int delay)
   }  
   
   for (i=7 ; i<10 ; i++) {
-    bsod_sleep(dpy, 1);
+    if (bsod_sleep(dpy, 1))
+      goto DONE;
     XCopyArea(dpy, pixmap, window, gc, 0, 0, pix_w, pix_h,
              (x + (i*offset)), y);
   }
 
+  bsod_sleep(dpy, delay);
+ DONE:
   XFreePixmap(dpy, pixmap);
   XFreeGC(dpy, gc);
   XSync(dpy, False);
-  bsod_sleep(dpy, delay);
   XClearWindow(dpy, window);
   XFreeFont(dpy, font);
   return True;
diff --git a/hacks/compass.c b/hacks/compass.c
new file mode 100644 (file)
index 0000000..56a1b0a
--- /dev/null
@@ -0,0 +1,935 @@
+/* xscreensaver, Copyright (c) 1999 Jamie Zawinski <jwz@jwz.org>
+ *
+ * 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.
+ */
+
+#include <math.h>
+#include "screenhack.h"
+
+#ifdef HAVE_DOUBLE_BUFFER_EXTENSION
+# include "xdbe.h"
+#endif /* HAVE_DOUBLE_BUFFER_EXTENSION */
+
+#define countof(x) (sizeof(x)/sizeof(*(x)))
+#define ABS(x) ((x)<0?-(x):(x))
+#define MAX(x,y) ((x)<(y)?(y):(x))
+#define MIN(x,y) ((x)>(y)?(y):(x))
+#define RAND(n) ((long) ((random() & 0x7fffffff) % ((long) (n))))
+#define RANDSIGN() ((random() & 1) ? 1 : -1)
+
+struct disc {
+  int theta;           /* 0 - 360*64 */
+  int velocity;
+  int acceleration;
+  int limit;
+  GC gc;
+  void (*draw) (Display *, Drawable, struct disc *,
+                int x, int y, int radius);
+};
+
+
+static void
+draw_letters (Display *dpy, Drawable d, struct disc *disc,
+              int x, int y, int radius)
+{
+  XPoint points[50];
+  double th2 = 2 * M_PI * (disc->theta / ((double) 360*64));
+  double th;
+
+  /* W */
+
+  th = th2;
+
+  points[0].x = x + radius * 0.8 * cos(th - 0.07);
+  points[0].y = y + radius * 0.8 * sin(th - 0.07);
+
+  points[1].x = x + radius * 0.7 * cos(th - 0.05);
+  points[1].y = y + radius * 0.7 * sin(th - 0.05);
+
+  points[2].x = x + radius * 0.78 * cos(th);
+  points[2].y = y + radius * 0.78 * sin(th);
+
+  points[3].x = x + radius * 0.7 * cos(th + 0.05);
+  points[3].y = y + radius * 0.7 * sin(th + 0.05);
+
+  points[4].x = x + radius * 0.8 * cos(th + 0.07);
+  points[4].y = y + radius * 0.8 * sin(th + 0.07);
+
+  XDrawLines (dpy, d, disc->gc, points, 5, CoordModeOrigin);
+
+  /* 30 (1) */
+
+  th = th2 + (2 * M_PI * 0.08333);
+
+  points[0].x = x + radius * 0.78 * cos(th - 0.13);
+  points[0].y = y + radius * 0.78 * sin(th - 0.13);
+
+  points[1].x = x + radius * 0.8  * cos(th - 0.08);
+  points[1].y = y + radius * 0.8  * sin(th - 0.08);
+
+  points[2].x = x + radius * 0.78 * cos(th - 0.03);
+  points[2].y = y + radius * 0.78 * sin(th - 0.03);
+
+  points[3].x = x + radius * 0.76 * cos(th - 0.03);
+  points[3].y = y + radius * 0.76 * sin(th - 0.03);
+
+  points[4].x = x + radius * 0.75 * cos(th - 0.08);
+  points[4].y = y + radius * 0.75 * sin(th - 0.08);
+
+  points[5].x = x + radius * 0.74 * cos(th - 0.03);
+  points[5].y = y + radius * 0.74 * sin(th - 0.03);
+
+  points[6].x = x + radius * 0.72 * cos(th - 0.03);
+  points[6].y = y + radius * 0.72 * sin(th - 0.03);
+
+  points[7].x = x + radius * 0.7  * cos(th - 0.08);
+  points[7].y = y + radius * 0.7  * sin(th - 0.08);
+
+  points[8].x = x + radius * 0.72  * cos(th - 0.13);
+  points[8].y = y + radius * 0.72  * sin(th - 0.13);
+
+  XDrawLines (dpy, d, disc->gc, points, 9, CoordModeOrigin);
+
+  /* 30 (2) */
+
+  points[0].x = x + radius * 0.78 * cos(th + 0.03);
+  points[0].y = y + radius * 0.78 * sin(th + 0.03);
+
+  points[1].x = x + radius * 0.8  * cos(th + 0.08);
+  points[1].y = y + radius * 0.8  * sin(th + 0.08);
+
+  points[2].x = x + radius * 0.78 * cos(th + 0.13);
+  points[2].y = y + radius * 0.78 * sin(th + 0.13);
+
+  points[3].x = x + radius * 0.72 * cos(th + 0.13);
+  points[3].y = y + radius * 0.72 * sin(th + 0.13);
+
+  points[4].x = x + radius * 0.7  * cos(th + 0.08);
+  points[4].y = y + radius * 0.7  * sin(th + 0.08);
+
+  points[5].x = x + radius * 0.72  * cos(th + 0.03);
+  points[5].y = y + radius * 0.72  * sin(th + 0.03);
+
+  points[6] = points[0];
+
+  XDrawLines (dpy, d, disc->gc, points, 7, CoordModeOrigin);
+
+  /* 33 (1) */
+
+  th = th2 + (2 * M_PI * 0.16666);
+
+  points[0].x = x + radius * 0.78 * cos(th - 0.13);
+  points[0].y = y + radius * 0.78 * sin(th - 0.13);
+
+  points[1].x = x + radius * 0.8  * cos(th - 0.08);
+  points[1].y = y + radius * 0.8  * sin(th - 0.08);
+
+  points[2].x = x + radius * 0.78 * cos(th - 0.03);
+  points[2].y = y + radius * 0.78 * sin(th - 0.03);
+
+  points[3].x = x + radius * 0.76 * cos(th - 0.03);
+  points[3].y = y + radius * 0.76 * sin(th - 0.03);
+
+  points[4].x = x + radius * 0.75 * cos(th - 0.08);
+  points[4].y = y + radius * 0.75 * sin(th - 0.08);
+
+  points[5].x = x + radius * 0.74 * cos(th - 0.03);
+  points[5].y = y + radius * 0.74 * sin(th - 0.03);
+
+  points[6].x = x + radius * 0.72 * cos(th - 0.03);
+  points[6].y = y + radius * 0.72 * sin(th - 0.03);
+
+  points[7].x = x + radius * 0.7  * cos(th - 0.08);
+  points[7].y = y + radius * 0.7  * sin(th - 0.08);
+
+  points[8].x = x + radius * 0.72  * cos(th - 0.13);
+  points[8].y = y + radius * 0.72  * sin(th - 0.13);
+
+  XDrawLines (dpy, d, disc->gc, points, 9, CoordModeOrigin);
+
+  /* 33 (2) */
+
+  points[0].x = x + radius * 0.78 * cos(th + 0.03);
+  points[0].y = y + radius * 0.78 * sin(th + 0.03);
+
+  points[1].x = x + radius * 0.8  * cos(th + 0.08);
+  points[1].y = y + radius * 0.8  * sin(th + 0.08);
+
+  points[2].x = x + radius * 0.78 * cos(th + 0.13);
+  points[2].y = y + radius * 0.78 * sin(th + 0.13);
+
+  points[3].x = x + radius * 0.76 * cos(th + 0.13);
+  points[3].y = y + radius * 0.76 * sin(th + 0.13);
+
+  points[4].x = x + radius * 0.75 * cos(th + 0.08);
+  points[4].y = y + radius * 0.75 * sin(th + 0.08);
+
+  points[5].x = x + radius * 0.74 * cos(th + 0.13);
+  points[5].y = y + radius * 0.74 * sin(th + 0.13);
+
+  points[6].x = x + radius * 0.72 * cos(th + 0.13);
+  points[6].y = y + radius * 0.72 * sin(th + 0.13);
+
+  points[7].x = x + radius * 0.7  * cos(th + 0.08);
+  points[7].y = y + radius * 0.7  * sin(th + 0.08);
+
+  points[8].x = x + radius * 0.72  * cos(th + 0.03);
+  points[8].y = y + radius * 0.72  * sin(th + 0.03);
+
+  XDrawLines (dpy, d, disc->gc, points, 9, CoordModeOrigin);
+
+  /* N */
+
+  th = th2 + (2 * M_PI * 0.25);
+
+  points[0].x = x + radius * 0.7 * cos(th - 0.05);
+  points[0].y = y + radius * 0.7 * sin(th - 0.05);
+
+  points[1].x = x + radius * 0.8 * cos(th - 0.05);
+  points[1].y = y + radius * 0.8 * sin(th - 0.05);
+
+  points[2].x = x + radius * 0.7 * cos(th + 0.05);
+  points[2].y = y + radius * 0.7 * sin(th + 0.05);
+
+  points[3].x = x + radius * 0.8 * cos(th + 0.05);
+  points[3].y = y + radius * 0.8 * sin(th + 0.05);
+
+  XDrawLines (dpy, d, disc->gc, points, 4, CoordModeOrigin);
+
+  /* 3 */
+
+  th = th2 + (2 * M_PI * 0.33333);
+
+  points[0].x = x + radius * 0.78 * cos(th - 0.05);
+  points[0].y = y + radius * 0.78 * sin(th - 0.05);
+
+  points[1].x = x + radius * 0.8  * cos(th);
+  points[1].y = y + radius * 0.8  * sin(th);
+
+  points[2].x = x + radius * 0.78 * cos(th + 0.05);
+  points[2].y = y + radius * 0.78 * sin(th + 0.05);
+
+  points[3].x = x + radius * 0.76 * cos(th + 0.05);
+  points[3].y = y + radius * 0.76 * sin(th + 0.05);
+
+  points[4].x = x + radius * 0.75 * cos(th);
+  points[4].y = y + radius * 0.75 * sin(th);
+
+  points[5].x = x + radius * 0.74 * cos(th + 0.05);
+  points[5].y = y + radius * 0.74 * sin(th + 0.05);
+
+  points[6].x = x + radius * 0.72 * cos(th + 0.05);
+  points[6].y = y + radius * 0.72 * sin(th + 0.05);
+
+  points[7].x = x + radius * 0.7  * cos(th);
+  points[7].y = y + radius * 0.7  * sin(th);
+
+  points[8].x = x + radius * 0.72  * cos(th - 0.05);
+  points[8].y = y + radius * 0.72  * sin(th - 0.05);
+
+  XDrawLines (dpy, d, disc->gc, points, 9, CoordModeOrigin);
+
+  /* 6 */
+
+  th = th2 + (2 * M_PI * 0.41666);
+
+  points[0].x = x + radius * 0.78 * cos(th + 0.05);
+  points[0].y = y + radius * 0.78 * sin(th + 0.05);
+
+  points[1].x = x + radius * 0.8  * cos(th);
+  points[1].y = y + radius * 0.8  * sin(th);
+
+  points[2].x = x + radius * 0.78 * cos(th - 0.05);
+  points[2].y = y + radius * 0.78 * sin(th - 0.05);
+
+  points[3].x = x + radius * 0.72 * cos(th - 0.05);
+  points[3].y = y + radius * 0.72 * sin(th - 0.05);
+
+  points[4].x = x + radius * 0.7  * cos(th);
+  points[4].y = y + radius * 0.7  * sin(th);
+
+  points[5].x = x + radius * 0.72 * cos(th + 0.05);
+  points[5].y = y + radius * 0.72 * sin(th + 0.05);
+
+  points[6].x = x + radius * 0.74 * cos(th + 0.05);
+  points[6].y = y + radius * 0.74 * sin(th + 0.05);
+
+  points[7].x = x + radius * 0.76 * cos(th);
+  points[7].y = y + radius * 0.76 * sin(th);
+
+  points[8].x = x + radius * 0.74 * cos(th - 0.05);
+  points[8].y = y + radius * 0.74 * sin(th - 0.05);
+
+  XDrawLines (dpy, d, disc->gc, points, 9, CoordModeOrigin);
+
+
+  /* E */
+
+  th = th2 + (2 * M_PI * 0.5);
+
+  points[0].x = x + radius * 0.8 * cos(th + 0.05);
+  points[0].y = y + radius * 0.8 * sin(th + 0.05);
+
+  points[1].x = x + radius * 0.8 * cos(th - 0.05);
+  points[1].y = y + radius * 0.8 * sin(th - 0.05);
+
+  points[2].x = x + radius * 0.75 * cos(th - 0.05);
+  points[2].y = y + radius * 0.75 * sin(th - 0.05);
+
+  points[3].x = x + radius * 0.75 * cos(th + 0.025);
+  points[3].y = y + radius * 0.75 * sin(th + 0.025);
+
+  points[4].x = x + radius * 0.75 * cos(th - 0.05);
+  points[4].y = y + radius * 0.75 * sin(th - 0.05);
+
+  points[5].x = x + radius * 0.7 * cos(th - 0.05);
+  points[5].y = y + radius * 0.7 * sin(th - 0.05);
+
+  points[6].x = x + radius * 0.7 * cos(th + 0.05);
+  points[6].y = y + radius * 0.7 * sin(th + 0.05);
+
+  XDrawLines (dpy, d, disc->gc, points, 7, CoordModeOrigin);
+
+  /* 12 (1) */
+
+  th = th2 + (2 * M_PI * 0.58333);
+
+  points[0].x = x + radius * 0.77 * cos(th - 0.06);
+  points[0].y = y + radius * 0.77 * sin(th - 0.06);
+
+  points[1].x = x + radius * 0.8  * cos(th - 0.03);
+  points[1].y = y + radius * 0.8  * sin(th - 0.03);
+
+  points[2].x = x + radius * 0.7  * cos(th - 0.03);
+  points[2].y = y + radius * 0.7  * sin(th - 0.03);
+
+  XDrawLines (dpy, d, disc->gc, points, 3, CoordModeOrigin);
+
+  /* 12 (2) */
+
+  points[0].x = x + radius * 0.78 * cos(th + 0.02);
+  points[0].y = y + radius * 0.78 * sin(th + 0.02);
+
+  points[1].x = x + radius * 0.8  * cos(th + 0.07);
+  points[1].y = y + radius * 0.8  * sin(th + 0.07);
+
+  points[2].x = x + radius * 0.78 * cos(th + 0.11);
+  points[2].y = y + radius * 0.78 * sin(th + 0.11);
+
+  points[3].x = x + radius * 0.76 * cos(th + 0.11);
+  points[3].y = y + radius * 0.76 * sin(th + 0.11);
+
+  points[4].x = x + radius * 0.74 * cos(th + 0.02);
+  points[4].y = y + radius * 0.74 * sin(th + 0.02);
+
+  points[5].x = x + radius * 0.71 * cos(th + 0.03);
+  points[5].y = y + radius * 0.71 * sin(th + 0.03);
+
+  points[6].x = x + radius * 0.7  * cos(th + 0.03);
+  points[6].y = y + radius * 0.7  * sin(th + 0.03);
+
+  points[7].x = x + radius * 0.7  * cos(th + 0.13);
+  points[7].y = y + radius * 0.7  * sin(th + 0.13);
+
+  XDrawLines (dpy, d, disc->gc, points, 8, CoordModeOrigin);
+
+  /* 15 (1) */
+
+  th = th2 + (2 * M_PI * 0.66666);
+
+  points[0].x = x + radius * 0.77 * cos(th - 0.06);
+  points[0].y = y + radius * 0.77 * sin(th - 0.06);
+
+  points[1].x = x + radius * 0.8  * cos(th - 0.03);
+  points[1].y = y + radius * 0.8  * sin(th - 0.03);
+
+  points[2].x = x + radius * 0.7  * cos(th - 0.03);
+  points[2].y = y + radius * 0.7  * sin(th - 0.03);
+
+  XDrawLines (dpy, d, disc->gc, points, 3, CoordModeOrigin);
+
+  /* 15 (2) */
+
+  points[0].x = x + radius * 0.8  * cos(th + 0.11);
+  points[0].y = y + radius * 0.8  * sin(th + 0.11);
+
+  points[1].x = x + radius * 0.8  * cos(th + 0.02);
+  points[1].y = y + radius * 0.8  * sin(th + 0.02);
+
+  points[2].x = x + radius * 0.76 * cos(th + 0.02);
+  points[2].y = y + radius * 0.76 * sin(th + 0.02);
+
+  points[3].x = x + radius * 0.77 * cos(th + 0.06);
+  points[3].y = y + radius * 0.77 * sin(th + 0.06);
+
+  points[4].x = x + radius * 0.76 * cos(th + 0.10);
+  points[4].y = y + radius * 0.76 * sin(th + 0.10);
+
+  points[5].x = x + radius * 0.73 * cos(th + 0.11);
+  points[5].y = y + radius * 0.73 * sin(th + 0.11);
+
+  points[6].x = x + radius * 0.72 * cos(th + 0.10);
+  points[6].y = y + radius * 0.72 * sin(th + 0.10);
+
+  points[7].x = x + radius * 0.7  * cos(th + 0.06);
+  points[7].y = y + radius * 0.7  * sin(th + 0.06);
+
+  points[8].x = x + radius * 0.72 * cos(th + 0.02);
+  points[8].y = y + radius * 0.72 * sin(th + 0.02);
+
+  XDrawLines (dpy, d, disc->gc, points, 9, CoordModeOrigin);
+
+  /* S */
+
+  th = th2 + (2 * M_PI * 0.75);
+
+  points[0].x = x + radius * 0.78 * cos(th + 0.05);
+  points[0].y = y + radius * 0.78 * sin(th + 0.05);
+
+  points[1].x = x + radius * 0.8  * cos(th);
+  points[1].y = y + radius * 0.8  * sin(th);
+
+  points[2].x = x + radius * 0.78 * cos(th - 0.05);
+  points[2].y = y + radius * 0.78 * sin(th - 0.05);
+
+  points[3].x = x + radius * 0.76 * cos(th - 0.05);
+  points[3].y = y + radius * 0.76 * sin(th - 0.05);
+
+  points[4].x = x + radius * 0.74 * cos(th + 0.05);
+  points[4].y = y + radius * 0.74 * sin(th + 0.05);
+
+  points[5].x = x + radius * 0.72 * cos(th + 0.05);
+  points[5].y = y + radius * 0.72 * sin(th + 0.05);
+
+  points[6].x = x + radius * 0.7  * cos(th);
+  points[6].y = y + radius * 0.7  * sin(th);
+
+  points[7].x = x + radius * 0.72  * cos(th - 0.05);
+  points[7].y = y + radius * 0.72  * sin(th - 0.05);
+
+  XDrawLines (dpy, d, disc->gc, points, 8, CoordModeOrigin);
+
+  /* 21 (1) */
+
+  th = th2 + (2 * M_PI * 0.83333);
+
+  points[0].x = x + radius * 0.78 * cos(th - 0.13);
+  points[0].y = y + radius * 0.78 * sin(th - 0.13);
+
+  points[1].x = x + radius * 0.8  * cos(th - 0.08);
+  points[1].y = y + radius * 0.8  * sin(th - 0.08);
+
+  points[2].x = x + radius * 0.78 * cos(th - 0.03);
+  points[2].y = y + radius * 0.78 * sin(th - 0.03);
+
+  points[3].x = x + radius * 0.76 * cos(th - 0.03);
+  points[3].y = y + radius * 0.76 * sin(th - 0.03);
+
+  points[4].x = x + radius * 0.74 * cos(th - 0.12);
+  points[4].y = y + radius * 0.74 * sin(th - 0.12);
+
+  points[5].x = x + radius * 0.71 * cos(th - 0.13);
+  points[5].y = y + radius * 0.71 * sin(th - 0.13);
+
+  points[6].x = x + radius * 0.7  * cos(th - 0.13);
+  points[6].y = y + radius * 0.7  * sin(th - 0.13);
+
+  points[7].x = x + radius * 0.7  * cos(th - 0.02);
+  points[7].y = y + radius * 0.7  * sin(th - 0.02);
+
+  XDrawLines (dpy, d, disc->gc, points, 8, CoordModeOrigin);
+
+  /* 21 (2) */
+
+  points[0].x = x + radius * 0.77 * cos(th + 0.03);
+  points[0].y = y + radius * 0.77 * sin(th + 0.03);
+
+  points[1].x = x + radius * 0.8  * cos(th + 0.06);
+  points[1].y = y + radius * 0.8  * sin(th + 0.06);
+
+  points[2].x = x + radius * 0.7  * cos(th + 0.06);
+  points[2].y = y + radius * 0.7  * sin(th + 0.06);
+
+  XDrawLines (dpy, d, disc->gc, points, 3, CoordModeOrigin);
+
+  /* 24 (1) */
+
+  th = th2 + (2 * M_PI * 0.91666);
+
+  points[0].x = x + radius * 0.78 * cos(th - 0.13);
+  points[0].y = y + radius * 0.78 * sin(th - 0.13);
+
+  points[1].x = x + radius * 0.8  * cos(th - 0.08);
+  points[1].y = y + radius * 0.8  * sin(th - 0.08);
+
+  points[2].x = x + radius * 0.78 * cos(th - 0.03);
+  points[2].y = y + radius * 0.78 * sin(th - 0.03);
+
+  points[3].x = x + radius * 0.76 * cos(th - 0.03);
+  points[3].y = y + radius * 0.76 * sin(th - 0.03);
+
+  points[4].x = x + radius * 0.74 * cos(th - 0.12);
+  points[4].y = y + radius * 0.74 * sin(th - 0.12);
+
+  points[5].x = x + radius * 0.71 * cos(th - 0.13);
+  points[5].y = y + radius * 0.71 * sin(th - 0.13);
+
+  points[6].x = x + radius * 0.7  * cos(th - 0.13);
+  points[6].y = y + radius * 0.7  * sin(th - 0.13);
+
+  points[7].x = x + radius * 0.7  * cos(th - 0.02);
+  points[7].y = y + radius * 0.7  * sin(th - 0.02);
+
+  XDrawLines (dpy, d, disc->gc, points, 8, CoordModeOrigin);
+
+  /* 24 (2) */
+
+  points[0].x = x + radius * 0.69 * cos(th + 0.09);
+  points[0].y = y + radius * 0.69 * sin(th + 0.09);
+
+  points[1].x = x + radius * 0.8  * cos(th + 0.09);
+  points[1].y = y + radius * 0.8  * sin(th + 0.09);
+
+  points[2].x = x + radius * 0.72 * cos(th + 0.01);
+  points[2].y = y + radius * 0.72 * sin(th + 0.01);
+
+  points[3].x = x + radius * 0.72 * cos(th + 0.13);
+  points[3].y = y + radius * 0.72 * sin(th + 0.13);
+
+  XDrawLines (dpy, d, disc->gc, points, 4, CoordModeOrigin);
+}
+
+
+static void
+draw_ticks (Display *dpy, Drawable d, struct disc *disc,
+            int x, int y, int radius)
+{
+  XSegment segs[72];
+  int i;
+  double tick = (M_PI * 2) / 72;
+
+  for (i = 0; i < 72; i++)
+    {
+      int radius2 = radius;
+      double th = (i * tick) + (2 * M_PI * (disc->theta / ((double) 360*64)));
+
+      if (i % 6)
+        radius2 -= radius / 16;
+      else
+        radius2 -= radius / 8;
+
+      segs[i].x1 = x + radius  * cos(th);
+      segs[i].y1 = y + radius  * sin(th);
+      segs[i].x2 = x + radius2 * cos(th);
+      segs[i].y2 = y + radius2 * sin(th);
+    }
+  XDrawSegments (dpy, d, disc->gc, segs, countof(segs));
+
+  draw_letters (dpy, d, disc, x, y, radius);
+}
+
+
+static void
+draw_thin_arrow (Display *dpy, Drawable d, struct disc *disc,
+                 int x, int y, int radius)
+{
+  XPoint points[3];
+  double th;
+  int radius2;
+  double tick = ((M_PI * 2) / 72) * 2;
+
+  radius *= 0.9;
+  radius2 = radius - (radius / 8) * 3;
+
+  th = 2 * M_PI * (disc->theta / ((double) 360*64));
+
+  points[0].x = x + radius * cos(th);          /* tip */
+  points[0].y = y + radius * sin(th);
+
+  points[1].x = x + radius2 * cos(th - tick);  /* tip left */
+  points[1].y = y + radius2 * sin(th - tick);
+
+  points[2].x = x + radius2 * cos(th + tick);  /* tip right */
+  points[2].y = y + radius2 * sin(th + tick);
+
+  XDrawLine (dpy, d, disc->gc,
+             (int) (x + radius2 * cos(th)),
+             (int) (y + radius2 * sin(th)),
+             (int) (x + -radius * cos(th)),
+             (int) (y + -radius * sin(th)));
+
+  XFillPolygon (dpy, d, disc->gc, points, 3, Convex, CoordModeOrigin);
+}
+
+
+static void
+draw_thick_arrow (Display *dpy, Drawable d, struct disc *disc,
+                  int x, int y, int radius)
+{
+  XPoint points[10];
+  double th;
+  int radius2, radius3;
+  double tick = ((M_PI * 2) / 72) * 2;
+
+  radius *= 0.9;
+  radius2 = radius - (radius / 8) * 3;
+  radius3 = radius - (radius / 8) * 2;
+  th = 2 * M_PI * (disc->theta / ((double) 360*64));
+
+  points[0].x = x + radius * cos(th);          /* tip */
+  points[0].y = y + radius * sin(th);
+
+  points[1].x = x + radius2 * cos(th - tick);  /* tip left */
+  points[1].y = y + radius2 * sin(th - tick);
+
+  points[2].x = x + radius2 * cos(th + tick);  /* tip right */
+  points[2].y = y + radius2 * sin(th + tick);
+
+  points[3] = points[0];
+
+  XDrawLines (dpy, d, disc->gc, points, 4, CoordModeOrigin);
+
+  points[0].x = x + radius2 * cos(th - tick/2);         /* top left */
+  points[0].y = y + radius2 * sin(th - tick/2);
+
+  points[1].x = x + -radius2 * cos(th + tick/2); /* bottom left */
+  points[1].y = y + -radius2 * sin(th + tick/2);
+
+  points[2].x = x + -radius3 * cos(th);                 /* bottom */
+  points[2].y = y + -radius3 * sin(th);
+
+  points[3].x = x + -radius * cos(th);          /* bottom spike */
+  points[3].y = y + -radius * sin(th);
+
+  points[4] = points[2];                        /* return */
+
+  points[5].x = x + -radius2 * cos(th - tick/2); /* bottom right */
+  points[5].y = y + -radius2 * sin(th - tick/2);
+
+  points[6].x = x + radius2 * cos(th + tick/2);  /* top right */
+  points[6].y = y + radius2 * sin(th + tick/2);
+
+  XDrawLines (dpy, d, disc->gc, points, 7, CoordModeOrigin);
+}
+
+
+
+static void
+roll_disc (struct disc *disc)
+{
+  double th = disc->theta;
+  if (th < 0)
+    th = -(th + disc->velocity);
+  else
+    th = (th + disc->velocity);
+
+  if (th > (360*64))
+    th -= (360*64);
+  else if (th < 0)
+    th += (360*64);
+
+  disc->theta = (disc->theta > 0 ? th : -th);
+
+  disc->velocity += disc->acceleration;
+
+  if (disc->velocity > disc->limit || 
+      disc->velocity < -disc->limit)
+    disc->acceleration = -disc->acceleration;
+
+  /* Alter direction of rotational acceleration randomly. */
+  if (! (random() % 120))
+    disc->acceleration = -disc->acceleration;
+
+  /* Change acceleration very occasionally. */
+  if (! (random() % 200))
+    {
+      if (random() & 1)
+       disc->acceleration *= 1.2;
+      else
+       disc->acceleration *= 0.8;
+    }
+}
+
+
+static void
+init_spin (struct disc *disc)
+{
+  disc->limit = 5*64;
+  disc->theta = RAND(360*64);
+  disc->velocity = RAND(16) * RANDSIGN();
+  disc->acceleration = RAND(16) * RANDSIGN();
+}
+
+
+static void
+draw_compass (Display *dpy, Drawable d, struct disc **discs,
+              int x, int y, int radius)
+{
+  int i = 0;
+  while (discs[i])
+    {
+      discs[i]->draw (dpy, d, discs[i], x, y, radius);
+      roll_disc (discs[i]);
+      i++;
+    }
+}
+
+static void
+draw_pointer (Display *dpy, Drawable d, GC ptr_gc, GC dot_gc,
+              int x, int y, int radius)
+{
+  XPoint points[3];
+  int size = radius * 0.1;
+
+  /* top */
+
+  points[0].x = x - size;
+  points[0].y = y - radius - size;
+
+  points[1].x = x + size;
+  points[1].y = y - radius - size;
+
+  points[2].x = x;
+  points[2].y = y - radius;
+  
+  XFillPolygon (dpy, d, ptr_gc, points, 3, Convex, CoordModeOrigin);
+
+  /* top right */
+
+  points[0].x = x - (radius * 0.85);
+  points[0].y = y - (radius * 0.8);
+
+  points[1].x = x - (radius * 1.1);
+  points[1].y = y - (radius * 0.55);
+
+  points[2].x = x - (radius * 0.6);
+  points[2].y = y - (radius * 0.65);
+  
+  XFillPolygon (dpy, d, ptr_gc, points, 3, Convex, CoordModeOrigin);
+
+  /* left */
+
+  points[0].x = x - (radius * 1.05);
+  points[0].y = y;
+
+  points[1].x = x - (radius * 1.1);
+  points[1].y = y - (radius * 0.025);
+
+  points[2].x = x - (radius * 1.1);
+  points[2].y = y + (radius * 0.025);
+  
+  XFillPolygon (dpy, d, dot_gc, points, 3, Convex, CoordModeOrigin);
+
+  /* right */
+
+  points[0].x = x + (radius * 1.05);
+  points[0].y = y;
+
+  points[1].x = x + (radius * 1.1);
+  points[1].y = y - (radius * 0.025);
+
+  points[2].x = x + (radius * 1.1);
+  points[2].y = y + (radius * 0.025);
+  
+  XFillPolygon (dpy, d, dot_gc, points, 3, Convex, CoordModeOrigin);
+
+  /* bottom */
+
+  points[0].x = x;
+  points[0].y = y + (radius * 1.05);
+
+  points[1].x = x - (radius * 0.025);
+  points[1].y = y + (radius * 1.1);
+
+  points[2].x = x + (radius * 0.025);
+  points[2].y = y + (radius * 1.1);
+  
+  XFillPolygon (dpy, d, dot_gc, points, 3, Convex, CoordModeOrigin);
+
+  /* bottom left */
+
+  points[0].x = x + (radius * 0.74);
+  points[0].y = y + (radius * 0.74);
+
+  points[1].x = x + (radius * 0.78);
+  points[1].y = y + (radius * 0.75);
+
+  points[2].x = x + (radius * 0.75);
+  points[2].y = y + (radius * 0.78);
+  
+  XFillPolygon (dpy, d, dot_gc, points, 3, Convex, CoordModeOrigin);
+
+  /* top left */
+
+  points[0].x = x + (radius * 0.74);
+  points[0].y = y - (radius * 0.74);
+
+  points[1].x = x + (radius * 0.78);
+  points[1].y = y - (radius * 0.75);
+
+  points[2].x = x + (radius * 0.75);
+  points[2].y = y - (radius * 0.78);
+  
+  XFillPolygon (dpy, d, dot_gc, points, 3, Convex, CoordModeOrigin);
+
+  /* bottom right */
+
+  points[0].x = x - (radius * 0.74);
+  points[0].y = y + (radius * 0.74);
+
+  points[1].x = x - (radius * 0.78);
+  points[1].y = y + (radius * 0.75);
+
+  points[2].x = x - (radius * 0.75);
+  points[2].y = y + (radius * 0.78);
+  
+  XFillPolygon (dpy, d, dot_gc, points, 3, Convex, CoordModeOrigin);
+}
+
+\f
+char *progclass = "Compass";
+
+char *defaults [] = {
+  ".background:                #000000",
+  ".foreground:                #DDFFFF",
+  "*arrow1Foreground:  #FFF66A",
+  "*arrow2Foreground:  #F7D64A",
+  "*pointerForeground: #FF0000",
+  "*delay:             10000",
+  "*doubleBuffer:      True",
+#ifdef HAVE_DOUBLE_BUFFER_EXTENSION
+  "*useDBE:            True",
+#endif /* HAVE_DOUBLE_BUFFER_EXTENSION */
+  0
+};
+
+XrmOptionDescRec options [] = {
+  { "-delay",          ".delay",       XrmoptionSepArg, 0 },
+  { "-db",             ".doubleBuffer", XrmoptionNoArg,  "True" },
+  { "-no-db",          ".doubleBuffer", XrmoptionNoArg,  "False" },
+  { 0, 0, 0, 0 }
+};
+
+void
+screenhack (Display *dpy, Window window)
+{
+  XGCValues gcv;
+  int delay = get_integer_resource ("delay", "Integer");
+  Bool dbuf = get_boolean_resource ("doubleBuffer", "Boolean");
+  struct disc *discs[4];
+  int x, y, size, size2;
+  GC ptr_gc;
+  GC erase_gc = 0;
+  XWindowAttributes xgwa;
+  Pixmap b=0, ba=0, bb=0;      /* double-buffer to reduce flicker */
+#ifdef HAVE_DOUBLE_BUFFER_EXTENSION
+  XdbeBackBuffer backb = 0;
+#endif /* HAVE_DOUBLE_BUFFER_EXTENSION */
+
+  XGetWindowAttributes (dpy, window, &xgwa);
+  size2 = MIN(xgwa.width, xgwa.height);
+
+  if (size2 > 600) size2 = 600;
+
+  size = (size2 / 2) * 0.8;
+
+  x = xgwa.width/2;
+  y = xgwa.height/2;
+
+  if (dbuf)
+    {
+#ifdef HAVE_DOUBLE_BUFFER_EXTENSION
+      b = backb = xdbe_get_backbuffer (dpy, window, XdbeUndefined);
+#endif /* HAVE_DOUBLE_BUFFER_EXTENSION */
+
+      if (!b)
+        {
+          x = size2/2;
+          y = size2/2;
+          ba = XCreatePixmap (dpy, window, size2, size2, xgwa.depth);
+          bb = XCreatePixmap (dpy, window, size2, size2, xgwa.depth);
+          b = ba;
+        }
+    }
+  else
+    {
+      b = window;
+    }
+
+  discs[0] = (struct disc *) calloc (1, sizeof (struct disc));
+  discs[1] = (struct disc *) calloc (1, sizeof (struct disc));
+  discs[2] = (struct disc *) calloc (1, sizeof (struct disc));
+  discs[3] = 0;
+
+  gcv.foreground = get_pixel_resource ("foreground", "Foreground",
+                                       dpy, xgwa.colormap);
+  gcv.line_width = MAX(2, (size/60));
+  gcv.join_style = JoinBevel;
+  discs[0]->draw = draw_ticks;
+  discs[0]->gc = XCreateGC (dpy, b, GCForeground|GCLineWidth|GCJoinStyle,
+                            &gcv);
+  init_spin (discs[0]);
+
+  gcv.foreground = get_pixel_resource ("arrow2Foreground", "Foreground",
+                                       dpy, xgwa.colormap);
+  gcv.line_width = MAX(4, (size / 30));
+  discs[1]->draw = draw_thick_arrow;
+  discs[1]->gc = XCreateGC (dpy, b, GCForeground|GCLineWidth, &gcv);
+  init_spin (discs[1]);
+
+  gcv.foreground = get_pixel_resource ("arrow1Foreground", "Foreground",
+                                       dpy, xgwa.colormap);
+  gcv.line_width = MAX(4, (size / 30));
+  discs[2]->draw = draw_thin_arrow;
+  discs[2]->gc = XCreateGC (dpy, b, GCForeground|GCLineWidth, &gcv);
+  init_spin (discs[2]);
+
+  gcv.foreground = get_pixel_resource ("pointerForeground", "Foreground",
+                                       dpy, xgwa.colormap);
+  ptr_gc = XCreateGC (dpy, b, GCForeground|GCLineWidth, &gcv);
+
+  gcv.foreground = get_pixel_resource ("background", "Background",
+                                       dpy, xgwa.colormap);
+  erase_gc = XCreateGC (dpy, b, GCForeground, &gcv);
+
+  if (ba) XFillRectangle (dpy, ba, erase_gc, 0, 0, size2, size2);
+  if (bb) XFillRectangle (dpy, bb, erase_gc, 0, 0, size2, size2);
+
+  while (1)
+    {
+      XFillRectangle (dpy, b, erase_gc, 0, 0, xgwa.width, xgwa.height);
+
+      draw_compass (dpy, b, discs, x, y, size);
+      draw_pointer (dpy, b, ptr_gc, discs[0]->gc, x, y, size);
+
+#ifdef HAVE_DOUBLE_BUFFER_EXTENSION
+      if (backb)
+        {
+          XdbeSwapInfo info[1];
+          info[0].swap_window = window;
+          info[0].swap_action = XdbeUndefined;
+          XdbeSwapBuffers (dpy, info, 1);
+        }
+      else
+#endif /* HAVE_DOUBLE_BUFFER_EXTENSION */
+      if (dbuf)
+        {
+          XCopyArea (dpy, b, window, erase_gc, 0, 0,
+                     size2, size2,
+                     xgwa.width/2 - x,
+                     xgwa.height/2 - y);
+          b = (b == ba ? bb : ba);
+        }
+
+      XSync (dpy, False);
+      screenhack_handle_events (dpy);
+      if (delay)
+        usleep (delay);
+    }
+}
index 573ee3d43ac555d8ff7108e9171edd91af3bcc05..676d5e25e30478c9b45b9a7ffab065365e379758 100644 (file)
@@ -6,7 +6,9 @@ $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) BSOD.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) BUBBLES-DEFAULT.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) BUBBLES.C
+$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) COMPASS.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) CORAL.C
+$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) CRITICAL.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) CRYSTAL.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) CYNOSURE.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) DECAYSCREEN.C
@@ -65,6 +67,8 @@ $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) SONAR.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) SPHERE.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) SPIRAL.C
+$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) SPOTLIGHT.C
+$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) SQUIRAL.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) STARFISH.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) STRANGE.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) SWIRL.C
@@ -72,7 +76,9 @@ $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) TRIANGLE.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) TRUCHET.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) VINES.C
+$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) WANDER.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) WORM.C
+$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) XFLAME.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) XJACK.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) XLOCKMORE.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) XLYAP.C
index 573ee3d43ac555d8ff7108e9171edd91af3bcc05..676d5e25e30478c9b45b9a7ffab065365e379758 100644 (file)
@@ -6,7 +6,9 @@ $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) BSOD.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) BUBBLES-DEFAULT.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) BUBBLES.C
+$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) COMPASS.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) CORAL.C
+$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) CRITICAL.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) CRYSTAL.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) CYNOSURE.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) DECAYSCREEN.C
@@ -65,6 +67,8 @@ $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) SONAR.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) SPHERE.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) SPIRAL.C
+$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) SPOTLIGHT.C
+$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) SQUIRAL.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) STARFISH.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) STRANGE.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) SWIRL.C
@@ -72,7 +76,9 @@ $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) TRIANGLE.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) TRUCHET.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) VINES.C
+$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) WANDER.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) WORM.C
+$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) XFLAME.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) XJACK.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) XLOCKMORE.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) XLYAP.C
diff --git a/hacks/critical.c b/hacks/critical.c
new file mode 100644 (file)
index 0000000..ae3df0b
--- /dev/null
@@ -0,0 +1,330 @@
+/* critical -- Self-organizing-criticality display hack for XScreenSaver
+ * Copyright (C) 1998, 1999 Martin Pool <mbp@humbug.org.au>
+ *
+ * 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.
+ *
+ * See `critical.man' for more information.
+ *
+ * Revision history:
+ * 13 Nov 1998: Initial version, Martin Pool <mbp@humbug.org.au>
+ */
+
+#include "screenhack.h"
+#include "erase.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+
+char *progclass = "Critical";
+
+
+typedef struct {
+  int width, height;           /* in cells */
+  unsigned short *cells;
+} CriticalModel;
+
+
+CriticalModel * model_allocate (int w, int h);
+void model_initialize (CriticalModel *model);
+static void model_step (CriticalModel *model, int *top_x, int *top_y);
+
+
+/* Options this module understands.  */
+XrmOptionDescRec options[] = {
+  { "-ncolors",                ".ncolors",     XrmoptionSepArg, 0 },
+  { "-delay",          ".delay",       XrmoptionSepArg, 0 },
+  { "-colorscheme",    ".colorscheme", XrmoptionSepArg, 0 },
+  { "-restart",                ".restart",     XrmoptionSepArg, 0 },
+  { "-cellsize",       ".cellsize",    XrmoptionSepArg, 0 },
+  { "-batchcount",     ".batchcount",  XrmoptionSepArg, 0 },
+  { 0, 0, 0, 0 }               /* end */
+};
+
+
+/* Default xrm resources. */
+char *defaults[] = {
+  ".background:                        black",
+  "*colorscheme:               smooth",
+  "*delay:                     10000", 
+  "*ncolors:                   64",
+  "*restart:                   8",
+  "*cellsize:                  9",
+  "*batchcount:                        1500",
+  0                            /* end */
+};
+
+
+/* Allocate an return a new simulation model datastructure.
+ */
+
+CriticalModel *
+model_allocate (int model_w, int model_h)
+{
+  CriticalModel                *model;
+
+  model = malloc (sizeof (CriticalModel));
+  if (!model)
+    return 0;
+
+  model->width = model_w;
+  model->height = model_h;
+
+  model->cells = malloc (sizeof (int) * model_w * model_h);
+  if (!model->cells)
+    return 0;
+
+  return model;
+}
+
+
+
+/* Initialize the data model underlying the hack.
+
+   For the self-organizing criticality hack, this consists of a 2d
+   array full of random integers.
+
+   I've considered storing the data as (say) a binary tree within a 2d
+   array, to make finding the highest value faster at the expense of
+   storage space: searching the whole array on each iteration seems a
+   little inefficient.  However, the screensaver doesn't seem to take
+   up many cycles as it is: presumably the search is pretty quick
+   compared to the sleeps.  The current version uses less than 1% of
+   the CPU time of an AMD K6-233.  Many machines running X11 at this
+   point in time seem to be memory-limited, not CPU-limited.
+
+   The root of all evil, and all that.
+*/
+
+
+void
+model_initialize (CriticalModel *model)
+{
+  int i;
+  
+  for (i = model->width * model->height; i >= 0; i--)
+    {
+      model->cells[i] = (unsigned short) random ();
+    }
+}
+
+
+/* Move one step forward in the criticality simulation.
+
+   This function locates and returns in (TOP_X, TOP_Y) the location of
+   the highest-valued cell in the model.  It also replaces that cell
+   and it's eight nearest neighbours with new random values.
+   Neighbours that fall off the edge of the model are simply
+   ignored. */
+static void
+model_step (CriticalModel *model, int *top_x, int *top_y)
+{
+  int                  x, y, i;
+  int                  dx, dy;
+  unsigned short       top_value;
+
+  /* Find the top cell */
+  top_value = 0;
+  i = 0;
+  for (y = 0; y < model->height; y++)
+    for (x = 0; x < model->width; x++)
+      {
+       if (model->cells[i] >= top_value)
+         {
+           top_value = model->cells[i];
+           *top_x = x;
+           *top_y = y;
+         }
+       i++;
+      }
+
+  /* Replace it and its neighbours with new random values */
+  for (dy = -1; dy <= 1; dy++)
+    {
+      int y = *top_y + dy;
+      if (y < 0  ||  y >= model->height)
+       continue;
+      
+      for (dx = -1; dx <= 1; dx++)
+       {
+         int x = *top_x + dx;
+         if (x < 0  ||  x >= model->width)
+           continue;
+         
+         model->cells[y * model->width + x] = (unsigned short) random();
+       }
+    }
+}
+
+
+/* Construct and return in COLORS and N_COLORS a new set of colors,
+   depending on the resource settings.  */
+void
+setup_colormap (Display *dpy, XWindowAttributes *wattr,
+               XColor **colors,
+               int *n_colors)
+{
+  Bool                 writable;
+  char const *         color_scheme;
+
+  /* Make a colormap */
+  *n_colors = get_integer_resource ("ncolors", "Integer");
+  if (*n_colors < 2)
+    *n_colors = 2;
+  
+  *colors = (XColor *) calloc (sizeof(XColor), *n_colors);
+  if (!*colors)
+    {
+      fprintf (stderr, "%s:%d: can't allocate memory for colors\n",
+              __FILE__, __LINE__);
+      return;
+    }
+
+  writable = False;
+  color_scheme = get_string_resource ("colorscheme", "ColorScheme");
+  
+  if (!strcmp (color_scheme, "random"))
+    {
+      make_random_colormap (dpy, wattr->visual,
+                           wattr->colormap,
+                           *colors, n_colors,
+                           True, True, &writable, True);
+    }
+  else if (!strcmp (color_scheme, "smooth"))
+    {
+      make_smooth_colormap (dpy, wattr->visual,
+                           wattr->colormap,
+                           *colors, n_colors,
+                           True, &writable, True);
+    }
+  else 
+    {
+      make_uniform_colormap (dpy, wattr->visual,
+                            wattr->colormap,
+                            *colors, n_colors, True,
+                            &writable, True);
+    }
+}
+
+
+
+/* Display a self-organizing criticality screen hack.  The program
+   runs indefinately on the root window. */
+void
+screenhack (Display *dpy, Window window)
+{
+  GC                   fgc, bgc;
+  XGCValues            gcv;
+  XWindowAttributes    wattr;
+  int                  n_colors;
+  XColor               *colors;
+  int                  model_w, model_h;
+  CriticalModel                *model;
+  int                  lines_per_color = 10;
+  int                  i_color = 0;
+  int                  x1, y1, x2, y2;
+  long                 delay_usecs;
+  int                  cell_size;
+  int                  batchcount;
+
+  /* Number of screens that should be drawn before reinitializing the
+     model, and count of the number of screens done so far. */
+  int                  n_restart, i_restart;
+
+  /* Find window attributes */
+  XGetWindowAttributes (dpy, window, &wattr);
+
+  /* Construct the initial model state. */
+  cell_size = get_integer_resource ("cellsize", "Integer");
+  if (cell_size < 1)
+    cell_size = 1;
+  if (cell_size >= 100)
+    cell_size = 99;
+
+  batchcount = get_integer_resource ("batchcount", "Integer");
+  if (batchcount < 5)
+    batchcount = 5;
+  
+  model_w = wattr.width / cell_size;
+  model_h = wattr.height  / cell_size;
+  
+  model = model_allocate (model_w, model_h);
+  if (!model)
+    {
+      fprintf (stderr, "critical: error preparing the model\n");
+      return;
+    }
+  
+  /* make a black gc for the background */
+  gcv.foreground = get_pixel_resource ("background", "Background",
+                                      dpy, wattr.colormap);
+  bgc = XCreateGC (dpy, window, GCForeground, &gcv);
+
+  fgc = XCreateGC (dpy, window, 0, &gcv);
+
+  x2 = rand() % model_w;
+  y2 = rand() % model_h;
+
+  delay_usecs = get_integer_resource ("delay", "Integer");
+  n_restart = get_integer_resource ("restart", "Integer");
+    
+  /* xscreensaver will kill or stop us when the user does something
+   * that deserves attention. */
+  i_restart = 0;
+  
+  while (1) {
+    int i_batch;
+
+    if (!i_restart)
+      {
+       setup_colormap (dpy, &wattr, &colors, &n_colors);
+       model_initialize (model);
+      }
+    
+    for (i_batch = batchcount; i_batch; i_batch--)
+      {
+       /* Set color */
+       if ((i_batch % lines_per_color) == 0)
+         {
+           i_color = (i_color + 1) % n_colors;
+           gcv.foreground = colors[i_color].pixel;
+           XChangeGC (dpy, fgc, GCForeground, &gcv);
+         }
+       
+      /* draw a line */
+      x1 = x2;
+      y1 = y2;
+
+      model_step (model, &x2, &y2);
+
+      XDrawLine (dpy, window, fgc,
+                x1 * cell_size + cell_size/2,
+                y1 * cell_size + cell_size/2,
+                x2 * cell_size + cell_size/2,
+                y2 * cell_size + cell_size/2);
+
+      /* Flush changes to display, and discard any pending input --
+        we'll never look at it anyhow, and it saves it filling up
+        memory. */
+      XSync (dpy, True); 
+
+      usleep (delay_usecs);
+    }
+
+    i_restart = (i_restart + 1) % n_restart;
+    erase_full_window (dpy, window);
+  }
+}
+
+
+/*
+ * Local variables:
+ * c-indent-mode: gnu
+ * compile-command "make critical && ./critical"
+ * End:
+ */
diff --git a/hacks/critical.man b/hacks/critical.man
new file mode 100644 (file)
index 0000000..21eec6a
--- /dev/null
@@ -0,0 +1,87 @@
+.TH XScreenSaver 1 "13-Nov-98" "X Version 11"
+.SH NAME
+critical - Draw a system showing self-organizing criticality
+.SH SYNOPSIS
+.B critical
+[\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] [\-background \fIcolor\fP] [\-window] [\-root] [\-mono] [\-install] [\-visual \fIvisual\fP] [\-delay \fIseconds\fP] [\-random \fIboolean\fP] [\-ncolors \fIint\fP] [\-offset \fIint\fP] 
+.SH DESCRIPTION
+The \fIcritical\fP program displays a self-organizing critical system
+that gradually emerges from chaos.
+
+\fIcritical\fP performs a simulation on a two-dimensional array of
+integers.  The array is initialized to random values.  On each
+iteration, it draws a line to the array position with the greatest
+value.  It then replaces that location and the eight neighboring
+locations with randomly-selected values.
+
+The lines are initially random, but over time a chaotic
+self-organizing system evolves: areas of the screen which happen to
+have lower values are less likely to be updated to new values, and so
+the line tends to avoid those areas.  Eventually, the histogram of
+changes approaches the power-law curve typical of such systems.
+
+The simplest documented self-organizing system is the one-dimensional
+equivalent of \fIcritical\fP.
+
+I heard about this algorithm second-hand: apparently there was an
+article in \fIScientific American\fP describing it sometime in 1997.
+.SH OPTIONS
+.I critical
+accepts the following options:
+.TP 8
+.B \-window
+Draw on a newly-created window.  This is the default.
+.TP 8
+.B \-root
+Draw on the root window.
+.TP 8
+.B \-mono 
+If on a color display, pretend we're on a monochrome display.
+.TP 8
+.B \-install
+Install a private colormap for the window.
+.TP 8
+.B \-visual \fIvisual\fP
+Specify which visual to use.  Legal values are the name of a visual class,
+or the id number (decimal or hex) of a specific visual.
+.TP 8
+.B \-delay \fIusecs\fP
+Number of microseconds to wait after drawing each line.
+.TP 8
+.B \-random \fIboolean\fP
+Whether to use randomly selected colours rather than a cycle around
+the colour wheel.
+.TP 8
+.B \-offset \fIinteger\fP
+The maximum random radius increment to use.
+.TP 8
+.B \-ncolors \fIinteger\fP
+How many colors should be allocated in the color ramp (note that this
+value interacts with \fIoffset\fP.)
+.SH ENVIRONMENT
+.PP
+.TP 8
+.B DISPLAY
+to get the default host and display number.
+.TP 8
+.B XENVIRONMENT
+to get the name of a resource file that overrides the global resources
+stored in the RESOURCE_MANAGER property.
+.SH SEE ALSO
+.BR X (1),
+.BR xscreensaver (1)
+.BR xscreensaver-command (1)
+.BR xscreensaver-demo (1)
+.SH COPYRIGHT
+Copyright \(co 1998 by Martin Pool.
+
+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.
+.SH AUTHOR
+Martin Pool <mbp@humbug.org.au>, 13-Nov-1998.  Based in part on the
+XScreenSaver code by Jamie Zawinski <jwz@jwz.org>.
index da6a5fef770826f6f955aa050f7a2642bf6850b8..64a846c0f33a46876086c947b9bd177e41c0d3cb 100644 (file)
  *  5-AUG-1993
  *
  *  Hacked by jwz, 28-Nov-97 (sped up and added new motion directions)
+ *  R. Schultz
+ *  Added "melt" & "stretch" modes 28-Mar-1999
+ *
  */
 
 #include "screenhack.h"
@@ -38,6 +42,7 @@ static int sizex, sizey;
 static int delay;
 static GC gc;
 static int mode;
+static int iterations=100;
 
 #define SHUFFLE 0
 #define UP 1
@@ -50,7 +55,8 @@ static int mode;
 #define DOWNRIGHT 8
 #define IN 9
 #define OUT 10
-
+#define MELT 11
+#define STRETCH 12
 
 static void
 init_decay (Display *dpy, Window window)
@@ -58,6 +64,7 @@ init_decay (Display *dpy, Window window)
   XGCValues gcv;
   XWindowAttributes xgwa;
   long gcflags;
+  unsigned long bg;
 
   char *s = get_string_resource("mode", "Mode");
   if      (s && !strcmp(s, "shuffle")) mode = SHUFFLE;
@@ -71,10 +78,12 @@ init_decay (Display *dpy, Window window)
   else if (s && !strcmp(s, "downright")) mode = DOWNRIGHT;
   else if (s && !strcmp(s, "in")) mode = IN;
   else if (s && !strcmp(s, "out")) mode = OUT;
+  else if (s && !strcmp(s, "melt")) mode = MELT;
+  else if (s && !strcmp(s, "stretch")) mode = STRETCH;
   else {
     if (s && *s && !!strcmp(s, "random"))
       fprintf(stderr, "%s: unknown mode %s\n", progname, s);
-    mode = random() % (OUT+1);
+    mode = random() % (STRETCH+1);
   }
 
   delay = get_integer_resource ("delay", "Integer");
@@ -85,6 +94,12 @@ init_decay (Display *dpy, Window window)
 
   gcv.function = GXcopy;
   gcv.subwindow_mode = IncludeInferiors;
+
+  if (mode == MELT || mode == STRETCH) {
+    bg = get_pixel_resource ("background", "Background", dpy, xgwa.colormap);
+    gcv.foreground = bg;
+  }
+
   gcflags = GCForeground |GCFunction;
   if (use_subwindow_mode_p(xgwa.screen, window)) /* see grabscreen.c */
     gcflags |= GCSubwindowMode;
@@ -94,6 +109,15 @@ init_decay (Display *dpy, Window window)
   sizey = xgwa.height;
 
   grab_screen_image (xgwa.screen, window);
+  
+  if (mode == MELT || mode == STRETCH) {
+    /* make sure screen eventually turns background color */
+    XDrawLine(dpy, window, gc, 0, 0, sizex, 0); 
+
+    /* slow down for smoother melting*/
+    iterations = 1;
+  }
+
 }
 
 
@@ -133,47 +157,65 @@ decay1 (Display *dpy, Window window)
       case DOWNRIGHT:  bias = downright_bias; break;
       case IN:         bias = no_bias; break;
       case OUT:                bias = no_bias; break;
-      default: abort();
+      case MELT:       bias = no_bias; break;
+      case STRETCH:    bias = no_bias; break;
+     default: abort();
     }
 
 #define nrnd(x) (random() % (x))
 
-    left = nrnd(sizex - 1);
-    top = nrnd(sizey);
-    width = nrnd(sizex - left);
-    height = nrnd(sizey - top);
-
-    toleft = left;
-    totop = top;
-
-    if (mode == IN || mode == OUT) {
-      int x = left+(width/2);
-      int y = top+(height/2);
-      int cx = sizex/2;
-      int cy = sizey/2;
-      if (mode == IN) {
-       if      (x > cx && y > cy)   bias = upleft_bias;
-       else if (x < cx && y > cy)   bias = upright_bias;
-       else if (x < cx && y < cy)   bias = downright_bias;
-       else /* (x > cx && y < cy)*/ bias = downleft_bias;
-      } else {
-       if      (x > cx && y > cy)   bias = downright_bias;
-       else if (x < cx && y > cy)   bias = downleft_bias;
-       else if (x < cx && y < cy)   bias = upleft_bias;
-       else /* (x > cx && y < cy)*/ bias = upright_bias;
+    if (mode == MELT || mode == STRETCH) {
+      left = nrnd(sizex/2);
+      top = nrnd(sizey);
+      width = nrnd( sizex/2 ) + sizex/2 - left;
+      height = nrnd(sizey - top);
+      toleft = left;
+      totop = top+1;
+
+    } else {
+
+      left = nrnd(sizex - 1);
+      top = nrnd(sizey);
+      width = nrnd(sizex - left);
+      height = nrnd(sizey - top);
+      
+      toleft = left;
+      totop = top;
+      if (mode == IN || mode == OUT) {
+       int x = left+(width/2);
+       int y = top+(height/2);
+       int cx = sizex/2;
+       int cy = sizey/2;
+       if (mode == IN) {
+         if      (x > cx && y > cy)   bias = upleft_bias;
+         else if (x < cx && y > cy)   bias = upright_bias;
+         else if (x < cx && y < cy)   bias = downright_bias;
+         else /* (x > cx && y < cy)*/ bias = downleft_bias;
+       } else {
+         if      (x > cx && y > cy)   bias = downright_bias;
+         else if (x < cx && y > cy)   bias = downleft_bias;
+         else if (x < cx && y < cy)   bias = upleft_bias;
+         else /* (x > cx && y < cy)*/ bias = upright_bias;
+       }
       }
-    }
-
-    switch (bias[random() % (sizeof(no_bias)/sizeof(*no_bias))]) {
+      
+      switch (bias[random() % (sizeof(no_bias)/sizeof(*no_bias))]) {
       case L: toleft = left-1; break;
       case R: toleft = left+1; break;
       case U: totop = top-1; break;
       case D: totop = top+1; break;
       default: abort(); break;
+      }
+    }
+    
+    if (mode == STRETCH) {
+      XCopyArea (dpy, window, window, gc, 0, sizey-top-2, sizex, top+1, 
+                0, sizey-top-1); 
+    } else {
+      XCopyArea (dpy, window, window, gc, left, top, width, height,
+                toleft, totop);
     }
 
-    XCopyArea (dpy, window, window, gc, left, top, width, height,
-              toleft, totop);
 #undef nrnd
 }
 
@@ -204,7 +246,7 @@ screenhack (Display *dpy, Window window)
     init_decay (dpy, window);
     while (1) {
       int i;
-      for (i = 0; i < 100; i++)
+      for (i = 0; i < iterations; i++)
        decay1 (dpy, window);
       XSync(dpy, False);
       screenhack_handle_events (dpy);
index b5493c7b1c86b63b5f59acd23a3de268ad5010de..8dc0a0e7aaee8e820e64f4c005049b644fe643c8 100644 (file)
@@ -1,4 +1,4 @@
-.TH XScreenSaver 1 "24-Nov-97" "X Version 11"
+.TH XScreenSaver 1 "05-Apr-1999" "X Version 11"
 .SH NAME
 decayscreen - make a screen meltdown.
 .SH SYNOPSIS
@@ -35,8 +35,9 @@ The direction in which the image should tend to slide.  Legal values are
 \fIrandom\fP (meaning pick one), \fIup\fP, \fIleft\fP, \fIright\fP, 
 \fIdown\fP, \fIupleft\fP, \fIdownleft\fP, \fIupright\fP, \fIdownright\fP, 
 \fIshuffle\fP (meaning perfer no particular direction), \fIin\fP (meaning
-move things toward the center), and \fIout\fP (meaing move things away
-from the center).
+move things toward the center), \fIout\fP (meaning move things away
+from the center), \fImelt\fP (meaning melt straight downward), and \fIstretch\fP 
+(meaning stretch the screen downward).
 .SH RESOURCES
 On some systems (currently, only SGIs), this program can, instead of grabbing
 a desktop image, grab a frame of video from an external camera and manipulate
@@ -83,4 +84,5 @@ of this software for any purpose.  It is provided "as is" without express or
 implied warranty.
 .SH AUTHOR
 Vivek Khera <khera@cs.duke.edu>, 05-Aug-93; based on code by David Wald, 1988.
-Modified by jwz, 28-Nov-97.
+Modified by jwz, 28-Nov-97.  Modified by Rick Schultz <rick@skapunx.net> 05-Apr-1999.
+
index aced3efc966f335bec2f363a95b713cb0e7c92ad..739536e7f741683d0cb2892827d96150936ea5e5 100644 (file)
 #include <math.h>
 #include "screenhack.h"
 
+#ifdef HAVE_DOUBLE_BUFFER_EXTENSION
+# include "xdbe.h"
+#endif /* HAVE_DOUBLE_BUFFER_EXTENSION */
+
 #define countof(x) (sizeof(x)/sizeof(*(x)))
 #define ABS(x) ((x)<0?-(x):(x))
 
@@ -198,6 +202,9 @@ char *defaults [] = {
   "*speed:             15",
   "*ncolors:           20",
   "*doubleBuffer:      True",
+#ifdef HAVE_DOUBLE_BUFFER_EXTENSION
+  "*useDBE:            True",
+#endif /* HAVE_DOUBLE_BUFFER_EXTENSION */
   0
 };
 
@@ -207,6 +214,8 @@ XrmOptionDescRec options [] = {
   { "-count",          ".count",       XrmoptionSepArg, 0 },
   { "-ncolors",                ".ncolors",     XrmoptionSepArg, 0 },
   { "-speed",          ".speed",       XrmoptionSepArg, 0 },
+  { "-db",             ".doubleBuffer", XrmoptionNoArg,  "True" },
+  { "-no-db",          ".doubleBuffer", XrmoptionNoArg,  "False" },
   { 0, 0, 0, 0 }
 };
 
@@ -224,16 +233,39 @@ screenhack (Display *dpy, Window window)
   struct throbber **throbbers;
   XWindowAttributes xgwa;
   Pixmap b=0, ba=0, bb=0;      /* double-buffer to reduce flicker */
+#ifdef HAVE_DOUBLE_BUFFER_EXTENSION
+  XdbeBackBuffer backb = 0;
+#endif /* HAVE_DOUBLE_BUFFER_EXTENSION */
 
   XGetWindowAttributes (dpy, window, &xgwa);
-  make_random_colormap (dpy, xgwa.visual, xgwa.colormap,
-                        colors, &ncolors, True, True, 0, True);
+
+  if (get_boolean_resource("mono", "Boolean"))
+    {
+    MONO:
+      ncolors = 1;
+      colors[0].pixel = get_pixel_resource("foreground", "Foreground",
+                                           dpy, xgwa.colormap);
+    }
+  else
+    {
+      make_random_colormap (dpy, xgwa.visual, xgwa.colormap,
+                            colors, &ncolors, True, True, 0, True);
+      if (ncolors < 2)
+        goto MONO;
+    }
 
   if (dbuf)
     {
-      ba = XCreatePixmap (dpy, window, xgwa.width, xgwa.height, xgwa.depth);
-      bb = XCreatePixmap (dpy, window, xgwa.width, xgwa.height, xgwa.depth);
-      b = ba;
+#ifdef HAVE_DOUBLE_BUFFER_EXTENSION
+      b = backb = xdbe_get_backbuffer (dpy, window, XdbeUndefined);
+#endif /* HAVE_DOUBLE_BUFFER_EXTENSION */
+
+      if (!b)
+        {
+          ba = XCreatePixmap (dpy, window, xgwa.width, xgwa.height,xgwa.depth);
+          bb = XCreatePixmap (dpy, window, xgwa.width, xgwa.height,xgwa.depth);
+          b = ba;
+        }
     }
   else
     {
@@ -245,26 +277,32 @@ screenhack (Display *dpy, Window window)
     throbbers[i] = make_throbber (dpy, b, xgwa.width, xgwa.height,
                                   colors[random() % ncolors].pixel);
 
-  if (dbuf)
-    {
-      gcv.foreground = get_pixel_resource ("background", "Background",
-                                           dpy, xgwa.colormap);
-      erase_gc = XCreateGC (dpy, b, GCForeground, &gcv);
-      XFillRectangle (dpy, ba, erase_gc, 0, 0, xgwa.width, xgwa.height);
-      XFillRectangle (dpy, bb, erase_gc, 0, 0, xgwa.width, xgwa.height);
-    }
+  gcv.foreground = get_pixel_resource ("background", "Background",
+                                       dpy, xgwa.colormap);
+  erase_gc = XCreateGC (dpy, b, GCForeground, &gcv);
+
+  if (ba) XFillRectangle (dpy, ba, erase_gc, 0, 0, xgwa.width, xgwa.height);
+  if (bb) XFillRectangle (dpy, bb, erase_gc, 0, 0, xgwa.width, xgwa.height);
 
   while (1)
     {
-      if (dbuf)
-        XFillRectangle (dpy, b, erase_gc, 0, 0, xgwa.width, xgwa.height);
-      else
-        XClearWindow (dpy, b);
+      XFillRectangle (dpy, b, erase_gc, 0, 0, xgwa.width, xgwa.height);
 
       for (i = 0; i < count; i++)
         if (throb (dpy, b, throbbers[i]) < 0)
           throbbers[i] = make_throbber (dpy, b, xgwa.width, xgwa.height,
                                         colors[random() % ncolors].pixel);
+
+#ifdef HAVE_DOUBLE_BUFFER_EXTENSION
+      if (backb)
+        {
+          XdbeSwapInfo info[1];
+          info[0].swap_window = window;
+          info[0].swap_action = XdbeUndefined;
+          XdbeSwapBuffers (dpy, info, 1);
+        }
+      else
+#endif /* HAVE_DOUBLE_BUFFER_EXTENSION */
       if (dbuf)
         {
           XCopyArea (dpy, b, window, erase_gc, 0, 0,
index ffadb67a601ff5f02cfcc50ebd69709383ff9964..9d3543c1482db113964cd2b02353064800c75e50 100644 (file)
@@ -372,9 +372,12 @@ flame (Display *dpy, Window window)
 }
 
 
-#ifdef __hpux
+#if defined(__hpux) && defined(PLOSS)
 /* I don't understand why this is necessary, but I'm told that this program
    does nothing at all on HP-sUX without it.
+
+   I'm further told that HPUX 11.0 doesn't define PLOSS, and works ok without
+   this section.  Go figure.
  */
 #undef random
 #undef srandom
index d856f30eb5213945c4bee39cb9aac8f168315f8c..a7a9195634235fa735ef61f66bf45d96cee6b8c2 100644 (file)
 
 /* I thought it would be faster this way, but it turns out not to be... -jwz */
 #undef USE_XIMAGE
-#undef HAVE_XSHM_EXTENSION
-#undef HAVE_XDBE
+
+#ifndef USE_XIMAGE
+# undef HAVE_XSHM_EXTENSION  /* only applicable when using XImages */
+#endif /* USE_XIMAGE */
 
 
-#ifdef HAVE_XDBE
-# include <X11/extensions/Xdbe.h>
-#endif /* HAVE_XDBE */
+#ifdef HAVE_DOUBLE_BUFFER_EXTENSION
+# include "xdbe.h"
+#endif /* HAVE_DOUBLE_BUFFER_EXTENSION */
 
 #ifdef HAVE_XSHM_EXTENSION
 # include "xshm.h"
@@ -78,9 +80,10 @@ char *defaults [] = {
   "*gray:        false", /* color or grayscale */
   "*mono:        false", /* monochrome, not very much fun */
 
-#ifdef HAVE_XDBE
+  "*doubleBuffer: True",
+#ifdef HAVE_DOUBLE_BUFFER_EXTENSION
   "*useDBE:      True", /* use double buffering extension */
-#endif /* HAVE_XDBE */
+#endif /* HAVE_DOUBLE_BUFFER_EXTENSION */
 
 #ifdef HAVE_XSHM_EXTENSION
   "*useSHM:      True", /* use shared memory extension */
@@ -98,10 +101,8 @@ XrmOptionDescRec options [] = {
   { "-radius",      ".radius",      XrmoptionSepArg, 0 },
   { "-gray",        ".gray",        XrmoptionNoArg,  "True" },
   { "-mono",        ".mono",        XrmoptionNoArg,  "True" },
-#ifdef HAVE_XDBE
-  { "-db",          ".useDBE",      XrmoptionNoArg,  "True" },
-  { "-no-db",       ".useDBE",      XrmoptionNoArg,  "False" },
-#endif /* HAVE_XDBE */
+  { "-db",         ".doubleBuffer", XrmoptionNoArg,  "True" },
+  { "-no-db",      ".doubleBuffer", XrmoptionNoArg,  "False" },
 #ifdef HAVE_XSHM_EXTENSION
   { "-shm",    ".useSHM",      XrmoptionNoArg, "True" },
   { "-no-shm", ".useSHM",      XrmoptionNoArg, "False" },
@@ -125,16 +126,16 @@ struct inter_context {
   Display* dpy;
   Window   win;
 
-  Pixmap   dbuf;
+#ifdef HAVE_DOUBLE_BUFFER_EXTENSION
+  XdbeBackBuffer back_buf;
+#endif /* HAVE_DOUBLE_BUFFER_EXTENSION */
+  Pixmap   pix_buf;
+
   GC       copy_gc;
 #ifdef USE_XIMAGE
   XImage  *ximage;
 #endif /* USE_XIMAGE */
 
-#ifdef HAVE_XDBE
-  Status   has_dbe;
-#endif /* HAVE_XDBE */
-
 #ifdef HAVE_XSHM_EXTENSION
   Bool use_shm;
   XShmSegmentInfo shm_info;
@@ -158,9 +159,6 @@ struct inter_context {
   int h;
   Colormap cmap;
   XColor* pal;
-#ifdef HAVE_XDBE
-  XdbeBackBuffer buf;
-#endif /* HAVE_XDBE */
   GC* gcs;
 
   /*
@@ -174,11 +172,12 @@ struct inter_context {
   struct inter_source* source;
 };
 
-#ifdef HAVE_XDBE
-# define TARGET(c) ((c)->has_dbe ? (c)->buf : (c)->dbuf)
-#else  /* HAVE_XDBE */
-# define TARGET(c) ((c)->dbuf)
-#endif /* !HAVE_XDBE */
+#ifdef HAVE_DOUBLE_BUFFER_EXTENSION
+# define TARGET(c) ((c)->back_buf ? (c)->back_buf : \
+                    (c)->pix_buf ? (c)->pix_buf : (c)->win)
+#else  /* HAVE_DOUBLE_BUFFER_EXTENSION */
+# define TARGET(c) ((c)->pix_buf ? (c)->pix_buf : (c)->win)
+#endif /* !HAVE_DOUBLE_BUFFER_EXTENSION */
 
 void inter_init(Display* dpy, Window win, struct inter_context* c) 
 {
@@ -187,13 +186,11 @@ void inter_init(Display* dpy, Window win, struct inter_context* c)
   int i;
   int mono;
   int gray;
-#ifdef HAVE_XDBE
-  int major, minor;
-  int use_dbe;
-#endif /* HAVE_XDBE */
-
   XGCValues val;
   unsigned long valmask = 0;
+  Bool dbuf = get_boolean_resource ("doubleBuffer", "Boolean");
+
+  memset (c, 0, sizeof(*c));
 
   c->dpy = dpy;
   c->win = win;
@@ -203,28 +200,25 @@ void inter_init(Display* dpy, Window win, struct inter_context* c)
   c->h = xgwa.height;
   c->cmap = xgwa.colormap;
 
-#ifdef HAVE_XDBE
-  use_dbe = get_boolean_resource("useDBE", "Boolean");
-  if(!use_dbe) {
-    c->has_dbe = False;
-  } else {
-    c->has_dbe = XdbeQueryExtension(dpy, &major, &minor);
-  }
-#endif /* HAVE_XDBE */
-
 #ifdef HAVE_XSHM_EXTENSION
   c->use_shm = get_boolean_resource("useSHM", "Boolean");
 #endif /*  HAVE_XSHM_EXTENSION */
 
-#ifdef HAVE_XDBE
-  if (!c->has_dbe)
-#endif /* HAVE_XDBE */
+  if (dbuf)
     {
-      c->dbuf = XCreatePixmap(dpy, win, xgwa.width, xgwa.height, xgwa.depth);
-      val.function = GXcopy;
+#ifdef HAVE_DOUBLE_BUFFER_EXTENSION
+      c->back_buf = xdbe_get_backbuffer (c->dpy, c->win, XdbeUndefined);
+#endif /* HAVE_DOUBLE_BUFFER_EXTENSION */
+
+#ifdef HAVE_DOUBLE_BUFFER_EXTENSION
+      if (!c->back_buf)
+#endif /* HAVE_DOUBLE_BUFFER_EXTENSION */
+        c->pix_buf = XCreatePixmap (dpy, win, xgwa.width, xgwa.height,
+                                    xgwa.depth);
     }
 
-  c->copy_gc = XCreateGC(c->dpy, c->dbuf, GCFunction, &val);
+  val.function = GXcopy;
+  c->copy_gc = XCreateGC(c->dpy, TARGET(c), GCFunction, &val);
 
   c->count = get_integer_resource("count", "Integer");
   if(c->count < 1)
@@ -282,7 +276,7 @@ void inter_init(Display* dpy, Window win, struct inter_context* c)
 
     gray = get_boolean_resource("gray", "Boolean");
     if(!gray) {
-      H[0] = drand48()*360.0
+      H[0] = frand(360.0)
       H[1] = H[0] + c->shift < 360.0 ? H[0]+c->shift : H[0] + c->shift-360.0; 
       H[2] = H[1] + c->shift < 360.0 ? H[1]+c->shift : H[1] + c->shift-360.0; 
       S[0] = S[1] = S[2] = 1.0;
@@ -312,11 +306,6 @@ void inter_init(Display* dpy, Window win, struct inter_context* c)
     c->pal[1].pixel = WhitePixel(c->dpy, DefaultScreen(c->dpy));
   }    
 
-#ifdef HAVE_XDBE
-  if(c->has_dbe)
-    c->buf = XdbeAllocateBackBufferName(c->dpy, c->win, XdbeUndefined);
-#endif /* HAVE_XDBE */
-
   valmask = GCForeground;
   c->gcs = calloc(c->colors, sizeof(GC));
   for(i = 0; i < c->colors; i++) {
@@ -337,8 +326,8 @@ void inter_init(Display* dpy, Window win, struct inter_context* c)
 
   c->source = calloc(c->count, sizeof(struct inter_source));
   for(i = 0; i < c->count; i++) {
-    c->source[i].x_theta = drand48()*2.0*3.14159;
-    c->source[i].y_theta = drand48()*2.0*3.14159;
+    c->source[i].x_theta = frand(2.0)*3.14159;
+    c->source[i].y_theta = frand(2.0)*3.14159;
   }
 
 }
@@ -360,9 +349,6 @@ void do_inter(struct inter_context* c)
   int i, j, k;
   int result;
   int dist;
-#ifdef HAVE_XDBE
-  XdbeSwapInfo info[1];
-#endif /* HAVE_XDBE */
   int g;
 
   int dx, dy;
@@ -424,19 +410,22 @@ void do_inter(struct inter_context* c)
 #endif /* USE_XIMAGE */
   }
 
-#ifdef HAVE_XDBE
-  if(c->has_dbe)
+#ifdef HAVE_DOUBLE_BUFFER_EXTENSION
+  if (c->back_buf)
     {
+      XdbeSwapInfo info[1];
       info[0].swap_window = c->win;
       info[0].swap_action = XdbeUndefined;
       XdbeSwapBuffers(c->dpy, info, 1);
     }
   else
-#endif /* HAVE_XDBE */
-    {
-      XCopyArea (c->dpy, c->dbuf, c->win, c->copy_gc,
-                0, 0, c->w, c->h, 0, 0);
-    }
+#endif /* HAVE_DOUBLE_BUFFER_EXTENSION */
+    if (c->pix_buf)
+      {
+        XCopyArea (c->dpy, c->pix_buf, c->win, c->copy_gc,
+                   0, 0, c->w, c->h, 0, 0);
+      }
+
   XSync(c->dpy, False);
 }
 
index bcc137af3d10110c6923a3f50495b84df6dd73e6..7e8839265c602c46ed0ffe957c49f8ed30b13c27 100644 (file)
@@ -41,9 +41,9 @@ from the X Consortium.
 #include <math.h>
 #include "screenhack.h"
 
-#ifdef HAVE_XDBE_EXTENSION
-# include <X11/extensions/Xdbe.h>
-#endif /* HAVE_XDBE_EXTENSION */
+#ifdef HAVE_DOUBLE_BUFFER_EXTENSION
+# include "xdbe.h"
+#endif /* HAVE_DOUBLE_BUFFER_EXTENSION */
 
 char *progclass="Kumppa";
 
@@ -51,6 +51,10 @@ char *defaults [] ={
        ".background:           black",
        "*speed:                0.1",
        "*delay:                0",
+#ifdef HAVE_DOUBLE_BUFFER_EXTENSION
+        /* leave this off by default, since it slows things down.  -- jwz. */
+        "*useDBE:              False",
+#endif /* HAVE_DOUBLE_BUFFER_EXTENSION */
        0
 };
 
@@ -58,9 +62,9 @@ XrmOptionDescRec options [] = {
        {"-delay",".delay",XrmoptionSepArg,0},
        {"-speed",".speed",XrmoptionSepArg,0},
        {"-random",".random",XrmoptionIsArg,0},
-#ifdef HAVE_XDBE_EXTENSION
+#ifdef HAVE_DOUBLE_BUFFER_EXTENSION
        {"-dbuf",".dbuf",XrmoptionIsArg,0},
-#endif /* HAVE_XDBE_EXTENSION */
+#endif /* HAVE_DOUBLE_BUFFER_EXTENSION */
        {0,0,0,0}
 };
 
@@ -88,9 +92,9 @@ static int sizx,sizy;
 static int midx,midy;
 static unsigned long delay;
 static Bool cosilines=True;
-#ifdef HAVE_XDBE_EXTENSION
+#ifdef HAVE_DOUBLE_BUFFER_EXTENSION
 static Bool usedouble=False;
-#endif /* HAVE_XDBE_EXTENSION */
+#endif /* HAVE_DOUBLE_BUFFER_EXTENSION */
 
 static int *Xrotations;
 static int *Yrotations;
@@ -334,23 +338,6 @@ return (True);
 }
 
 
-#ifdef HAVE_XDBE_EXTENSION
-static XErrorHandler old_handler = 0;
-static Bool got_BadMatch = False;
-static int
-BadMatch_ehandler (Display *dpy, XErrorEvent *error)
-{
-  if (error->error_code == BadMatch) {
-    got_BadMatch = True;
-    return 0;
-  } else if (old_handler)
-    return old_handler(dpy, error);
-  else
-    exit(1);
-}
-#endif /* HAVE_XDBE_EXTENSION */
-
-
 Bool InitializeAll(void)
 {
 XGCValues xgcv;
@@ -394,56 +381,15 @@ 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)
-  {
-    /* We need to trap an X error when calling XdbeAllocateBackBufferName,
-       because there is no way to know beforehand whether the call will
-       succeed!  This is a totally fucked design, but the man page says:
-
-       ERRORS
-         BadMatch
-              The specified window is not an InputOutput window or
-              its visual does not support DBE.
-
-       With SGI's O2 X server, some visuals support double-buffering (the
-       12-bit pseudocolor visuals) and others yield a BadMatch error, as
-       documented.
-
-       However, it doesn't matter, because using the DBUF extension seems
-       to make it run *slower* instead of faster anyway.
-
-                                                        -- jwz, 1-Jul-98
-     */
-    XSync(dpy, False);
-    old_handler = XSetErrorHandler (BadMatch_ehandler);
-    got_BadMatch = False;
-    win[1] = 0;
-    win[1] = XdbeAllocateBackBufferName(dpy,win[0],XdbeUndefined);
-    XSync(dpy, False);
-    XSetErrorHandler (old_handler);
-    old_handler = 0;
-    XSync(dpy, False);
-    if (got_BadMatch || !win[1])
-      {
-       fprintf(stderr, "%s: visual 0x%x does not support double-buffering.\n",
-               progname, XVisualIDFromVisual(xgwa.visual));
-       usedouble = False;
-       win[1] = win[0];
-       got_BadMatch = False;
-      }
-  }
-#endif /* HAVE_XDBE_EXTENSION */
+#ifdef HAVE_DOUBLE_BUFFER_EXTENSION
+ usedouble = True;
+ win[1] = xdbe_get_backbuffer (dpy, win[0], XdbeUndefined);
+ if (!win[1])
+   {
+     usedouble = False;
+     win[1] = win[0];
+   }
+#endif /* HAVE_DOUBLE_BUFFER_EXTENSION */
 
 delay=get_integer_resource("delay","Integer");
 rspeed=get_float_resource("speed","Float");
@@ -471,9 +417,9 @@ return True;
 
 void screenhack(Display *d, Window w)
 {
-#ifdef HAVE_XDBE_EXTENSION
+#ifdef HAVE_DOUBLE_BUFFER_EXTENSION
 XdbeSwapInfo xdswp;
-#endif /* HAVE_XDBE_EXTENSION */
+#endif /* HAVE_DOUBLE_BUFFER_EXTENSION */
 int a,b,c=0,e;
 float f;
 
@@ -481,14 +427,14 @@ dpy=d;
 win[0]=w;
 if (!InitializeAll()) return;
 
-#ifdef HAVE_XDBE_EXTENSION
+#ifdef HAVE_DOUBLE_BUFFER_EXTENSION
 if (usedouble)
        {
        xdswp.swap_action=XdbeUndefined;
        xdswp.swap_window=win[0];
        }
  else
-#endif /* HAVE_XDBE_EXTENSION */
+#endif /* HAVE_DOUBLE_BUFFER_EXTENSION */
    win[1]=win[0];
 
 while (0==0)
@@ -526,9 +472,9 @@ while (0==0)
                }
        XFillRectangle(dpy,win[0],fgc[32],midx-2,midy-2,4,4);
        rotate();
-#ifdef HAVE_XDBE_EXTENSION
+#ifdef HAVE_DOUBLE_BUFFER_EXTENSION
        if (usedouble) XdbeSwapBuffers(dpy,&xdswp,1);
-#endif /* HAVE_XDBE_EXTENSION */
+#endif /* HAVE_DOUBLE_BUFFER_EXTENSION */
        XSync(dpy, False);
         screenhack_handle_events (dpy);
        if (delay) usleep (delay);
index 96bfd9ac0e4a1c87b8801f8144c9c5f87d9085c1..67199aadf96850e2120a1adcb6678f6e84015713 100644 (file)
 
 #include "screenhack.h"
 #include <X11/Xutil.h>
-#include <stdio.h>
+
+#ifdef HAVE_DOUBLE_BUFFER_EXTENSION
+# include "xdbe.h"
+#endif /* HAVE_DOUBLE_BUFFER_EXTENSION */
 
 static int ncolors;
 static XColor *colors = 0;
@@ -23,6 +26,9 @@ static int x1, x2, y1, y2, x3, y3;
 static int dx1, dx2, dx3, dy1, dy2, dy3;
 static int othickness, thickness;
 static Bool do_three;
+#ifdef HAVE_DOUBLE_BUFFER_EXTENSION
+XdbeBackBuffer back_buf = 0;
+#endif /* HAVE_DOUBLE_BUFFER_EXTENSION */
 
 static void
 init_moire2 (Display *dpy, Window window)
@@ -54,6 +60,10 @@ init_moire2 (Display *dpy, Window window)
                                xgwa.colormap);
   fg_pixel = get_pixel_resource("foreground", "Foreground", dpy,
                                xgwa.colormap);
+
+#ifdef HAVE_DOUBLE_BUFFER_EXTENSION
+  back_buf = xdbe_get_backbuffer (dpy, window, XdbeUndefined);
+#endif /* HAVE_DOUBLE_BUFFER_EXTENSION */
 }
 
 
@@ -187,8 +197,19 @@ moire2 (Display *dpy, Window window)
   if (do_three)
     XCopyArea(dpy, p3, p0, copy_gc, x3, y3, width, height, 0, 0);
 
-  XSync(dpy, False);
-  XCopyPlane(dpy, p0, window, window_gc, 0, 0, width, height, 0, 0, 1L);
+#ifdef HAVE_DOUBLE_BUFFER_EXTENSION
+  if (back_buf)
+    {
+      XdbeSwapInfo info[1];
+      info[0].swap_window = window;
+      info[0].swap_action = XdbeUndefined;
+      XCopyPlane (dpy, p0, back_buf, window_gc, 0, 0, width, height, 0, 0, 1L);
+      XdbeSwapBuffers (dpy, info, 1);
+    }
+  else
+#endif /* HAVE_DOUBLE_BUFFER_EXTENSION */
+    XCopyPlane (dpy, p0, window, window_gc, 0, 0, width, height, 0, 0, 1L);
+
   XSync(dpy, False);
 
 #if 0
@@ -213,6 +234,16 @@ char *defaults [] = {
   "*thickness:         0",
   "*colors:            150",
   "*colorShift:                5",
+
+#ifdef HAVE_DOUBLE_BUFFER_EXTENSION
+  /* Off by default, since it slows it down a lot, and the flicker isn't really
+     all that bad without it... Or rather, it flickers just as badly with it.
+     The XFree86 implementation of the XDBE extension totally blows!  There is
+     just *no* excuse for the "swap buffers" operation to flicker like it does.
+   */
+  "*useDBE:            False",
+#endif /* HAVE_DOUBLE_BUFFER_EXTENSION */
+
   0
 };
 
index 2b104dc90c61b8adc65f673f686e6f3057f1c0c3..3e41af80e0461a6a257ca1e54b8697719e7de4b4 100644 (file)
@@ -708,7 +708,8 @@ static void NewLevel(Display *dpy, Window window, Colormap cmap, int xlim, int y
         width = XTextWidth(font, buf, strlen(buf));
         XDrawString(dpy, window, level_gc, xlim / 2 - width / 2, ylim / 2 - font_height(font) / 2,
                                         buf, strlen(buf));
-        XSync(dpy, True);
+        XSync(dpy, False);
+         screenhack_handle_events(dpy);
         sleep(1);
   }
 
@@ -733,14 +734,17 @@ static void NewLevel(Display *dpy, Window window, Colormap cmap, int xlim, int y
                         city[i].alive = 1;
                         AddScore(dpy, window, cmap, xlim, ylim, 100 * level);
                         DrawCities(dpy, window, cmap, xlim, ylim);
-                        XSync(dpy, True);
+                        XSync(dpy, False);
+                         screenhack_handle_events(dpy);
                         usleep(kCityPause);
                  }
                }
         }
         else {
                /* we're dead */
+                screenhack_handle_events(dpy);
                sleep(3);
+                screenhack_handle_events(dpy);
                /* start new */
                gamez++;
                Improve();
@@ -766,7 +770,8 @@ static void NewLevel(Display *dpy, Window window, Colormap cmap, int xlim, int y
         width = XTextWidth(font, buf, strlen(buf));
         XDrawString(dpy, window, level_gc, xlim / 2 - width / 2, ylim / 4, buf, strlen(buf));
         DrawCities(dpy, window, cmap, xlim, ylim);
-        XSync(dpy, True);
+        XSync(dpy, False);
+         screenhack_handle_events(dpy);
         sleep(1);
   }
 
@@ -794,7 +799,8 @@ static void NewLevel(Display *dpy, Window window, Colormap cmap, int xlim, int y
                sprintf(buf, "Bonus Round");
                width = XTextWidth(font, buf, strlen(buf));
                XDrawString(dpy, window, level_gc, xlim / 2 - width / 2, ylim / 2 - font_height(font) / 2, buf, strlen(buf));
-               XSync(dpy, True);
+               XSync(dpy, False);
+                screenhack_handle_events(dpy);
                sleep(1);
                XFillRectangle(dpy, window, erase_gc,
                                                        0, 0, xlim, ylim - 100);
@@ -851,6 +857,7 @@ static void penetrate(Display *dpy, Window window, Colormap cmap)
                if (laser[i].alive)
                  goto END_CHECK;
         /* okay, nothing's alive, start end of level countdown */
+         screenhack_handle_events(dpy);
         sleep(kLevelPause);
         NewLevel(dpy, window, cmap, xlim, ylim);
         return;
@@ -866,7 +873,8 @@ static void penetrate(Display *dpy, Window window, Colormap cmap)
                lastLaser = loop;
   }
 
-  XSync(dpy, True);
+  XSync(dpy, False);
+  screenhack_handle_events(dpy);
   if (kSleepTime)
         usleep(kSleepTime);
 
index 3641282f700da31ff161edca61acde5155653987..e380c2711ff35fb3ad3afef57221e707019b006c 100644 (file)
@@ -448,6 +448,15 @@ screenhack (Display *dpy, Window win)
      depth 24 directly (or even better, arbitrary depths, but that
      would mean going through the XImage routines instead of messing
      with the XImage->data directly.)
+
+     jwz, 18-Mar-99: well, the X servers I have access to these days do
+     support 32-deep images on deep visuals, so I no longer have the
+     ability to test this code -- but it was causing problems on the
+     visuals that I do have, and I think that's because I mistakenly
+     wrote `pfv[i].depth' when I meant to write `pfv[i].bits_per_pixel'.
+     The symptom I was seeing was that the grid was 64x64, but the
+     images were being drawn 32x32 -- so there was a black stripe on
+     every other row.  Wow, this code sucks so much.
    */
   if (pdepth == 32)
     {
@@ -455,7 +464,7 @@ screenhack (Display *dpy, Window win)
       Bool ok = False;
       XPixmapFormatValues *pfv = XListPixmapFormats (dpy, &pfvc);
       for (i = 0; i < pfvc; i++)
-        if (pfv[i].depth == pdepth)
+        if (pfv[i].bits_per_pixel == pdepth)
           ok = True;
       if (!ok)
         pdepth = 16;
index 0e1c678e1039dc5451afec54ab5eca1ec7d14140..7c14734664f522227911b8c2f8d06ca788286f7d 100644 (file)
@@ -38,6 +38,7 @@
 #include <X11/Shell.h>
 #include <X11/StringDefs.h>
 #include <X11/Xutil.h>
+#include <X11/keysym.h>
 
 #ifdef __sgi
 # include <X11/SGIScheme.h>    /* for SgiUseSchemes() */
@@ -188,7 +189,10 @@ screenhack_handle_event (Display *dpy, XEvent *event)
             c == 3 ||  /* ^C */
             c == 27)   /* ESC */
           exit (0);
+        else if (! (keysym >= XK_Shift_L && keysym <= XK_Hyper_R))
+          XBell (dpy, 0);  /* beep for non-chord keys */
       }
+      break;
     case ButtonPress:
       XBell (dpy, 0);
       break;
diff --git a/hacks/spotlight.c b/hacks/spotlight.c
new file mode 100644 (file)
index 0000000..8eb5d0c
--- /dev/null
@@ -0,0 +1,240 @@
+/*
+ * spotlight - an xscreensaver module
+ * Copyright (c) 1999 Rick Schultz <rick@skapunx.net>
+ *
+ * loosely based on the BackSpace module "StefView" by Darcy Brockbank
+ */
+
+/* modified from a module from the xscreensaver distribution */
+
+/*
+ * xscreensaver, Copyright (c) 1992, 1993, 1994, 1996, 1997, 1998
+ * Jamie Zawinski <jwz@jwz.org>
+ *
+ * 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.
+ */
+
+/* #define DEBUG */
+#include <math.h>
+#include "screenhack.h"
+#include <X11/Xutil.h>
+#include <sys/time.h>
+
+#define MINX 0.0
+#define MINY 0.0
+#define X_PERIOD 15000.0
+#define Y_PERIOD 12000.0
+
+static int sizex, sizey; /* screen size */
+static int delay;        /* in case it's too fast... */
+static GC gc;
+#ifdef DEBUG
+static GC white_gc;
+#endif
+static GC buffer_gc;     /* draw in buffer, then flush to screen
+                           to avoid flicker */
+static int radius;       /* radius of spotlight in pixels */
+static XGCValues gcv;
+
+static Pixmap pm;        /* pixmap grabbed from screen */
+static Pixmap clip_pm;   /* pixmap for clipping (spotlight shape) */
+static Pixmap buffer;    /* pixmap for the buffer */
+
+static GC clip_gc;       /* GC for the clip pixmap */
+
+int x, y, s;             /* x & y coords of buffer (upper left corner) */
+                         /* s is the width of the buffer */
+
+int oldx, oldy, max_x_speed, max_y_speed;
+                         /* used to keep the new buffer position
+                           over the old spotlight image to make sure 
+                           the old image is completely erased */
+
+/* The path the spotlight follows around the screen is sinusoidal.
+   This function is fed to sin() to get the x & y coords */
+static long
+currentTimeInMs(void)
+{
+  struct timeval curTime;
+#ifdef GETTIMEOFDAY_TWO_ARGS
+  struct timezone tz = {0,0};
+  gettimeofday(&curTime, &tz);
+#else
+  gettimeofday(&curTime);
+#endif
+  return curTime.tv_sec*1000 + curTime.tv_usec/1000.0;
+}
+
+
+static void
+init_hack (Display *dpy, Window window)
+{
+  XWindowAttributes xgwa;
+  long gcflags;
+  Colormap cmap;
+  unsigned long fg, bg;
+
+  XGetWindowAttributes (dpy, window, &xgwa);
+  sizex = xgwa.width;
+  sizey = xgwa.height;
+  cmap = xgwa.colormap;
+  fg = get_pixel_resource ("foreground", "Foreground", dpy, cmap);
+  bg = get_pixel_resource ("background", "Background", dpy, cmap);
+
+  /* read parameters, keep em sane */
+  delay = get_integer_resource ("delay", "Integer");
+  if (delay < 1) delay = 1;
+  radius = get_integer_resource ("radius", "Integer");
+  if (radius < 0) radius = 125;
+
+  /* do the dance */
+  gcv.function = GXcopy;
+  gcv.subwindow_mode = IncludeInferiors;
+  gcflags = GCForeground | GCFunction;
+  gcv.foreground = bg;
+  gcv.background = fg;
+
+#ifdef NOPE
+  if (use_subwindow_mode_p(xgwa.screen, window)) /* see grabscreen.c */
+    gcflags |= GCSubwindowMode;
+#endif
+  gc = XCreateGC (dpy, window, gcflags, &gcv);
+
+
+  /* grab screen to window */
+  grab_screen_image (xgwa.screen, window);
+
+  /* save screen to pixmap for copying later */
+  pm = XCreatePixmap(dpy, window, sizex, sizey, xgwa.depth);
+  XCopyArea(dpy, window, pm, gc, 0, 0, sizex, sizey, 0, 0);
+
+
+  /* create buffer to reduce flicker */
+  buffer = XCreatePixmap(dpy, window, sizex, sizey, xgwa.depth);
+  buffer_gc = XCreateGC (dpy, buffer, gcflags, &gcv);
+
+  /* blank out screen */
+  XFillRectangle(dpy,window,gc,0,0,sizex,sizey);
+
+  /* create clip mask (so it's a circle, not a square) */
+  clip_pm = XCreatePixmap(dpy, window, radius*4, radius*4, 1);
+  gcv.foreground=bg;
+  gcv.background=bg;
+  clip_gc = XCreateGC(dpy, clip_pm, gcflags, &gcv);
+  XFillRectangle(dpy,clip_pm,clip_gc,0,0,radius*4, radius*4);
+  XSetForeground(dpy,clip_gc,fg);
+  XFillArc(dpy, clip_pm, clip_gc, radius , radius,
+          radius*2, radius*2, 0, 360*64);
+  /* set buffer's clip mask to the one we just made */
+  XSetClipMask(dpy, buffer_gc, clip_pm);
+  /* free everything */
+  XFreeGC(dpy, clip_gc);
+  XFreePixmap(dpy, clip_pm);
+
+  /* avoid remants */
+  max_x_speed = max_y_speed = radius;
+
+#ifdef DEBUG
+  /* create GC with white fg */
+  gcv.foreground = fg;
+  white_gc = XCreateGC (dpy, window, gcflags, &gcv);
+#endif
+  
+  /* initialize x and y to avoid initial `jump' across screen */
+  x = ((1 + sin(((float)currentTimeInMs()) / X_PERIOD * 2. * M_PI))/2.0) 
+    * (sizex - s/2) -s/4  + MINX;
+  y = ((1 + sin(((float)currentTimeInMs()) / Y_PERIOD * 2. * M_PI))/2.0) 
+    * (sizey - s/2) -s/4  + MINY;
+
+}
+
+
+/*
+ * perform one iteration
+ */
+static void
+onestep (Display *dpy, Window window)
+{
+    long now;
+
+    /* clear buffer */
+    XFillRectangle(dpy, buffer, buffer_gc, x, y, s, s);
+
+    
+#define nrnd(x) (random() % (x))
+
+    oldx = x;
+    oldy = y;
+
+    s = radius *4 ;   /* s = width of buffer */
+
+    now = currentTimeInMs();
+
+    /* find new x,y */
+    x = ((1 + sin(((float)now) / X_PERIOD * 2. * M_PI))/2.0) 
+      * (sizex - s/2) -s/4  + MINX;
+    y = ((1 + sin(((float)now) / Y_PERIOD * 2. * M_PI))/2.0) 
+      * (sizey - s/2) -s/4  + MINY;
+    
+    /* limit change in x and y to buffer width */
+    if ( x < (oldx - max_x_speed) ) x = oldx - max_x_speed;
+    if ( x > (oldx + max_x_speed) ) x = oldx + max_x_speed;
+    if ( y < (oldy - max_y_speed) ) y = oldy - max_y_speed;
+    if ( y > (oldy + max_y_speed) ) y = oldy + max_y_speed;
+
+    /* copy area of screen image (pm) to buffer
+       Clip to a circle */
+    XSetClipOrigin(dpy, buffer_gc, x,y);
+    XCopyArea(dpy, pm, buffer, buffer_gc, x, y, s, s, x, y);
+    /* copy buffer to screen (window) */
+    XCopyArea(dpy, buffer, window, gc, x , y, s, s, x, y);
+
+#ifdef DEBUG
+    /* draw a box around the buffer */
+    XDrawLine(dpy, window, white_gc, x, y, x+s, y);
+    XDrawLine(dpy, window, white_gc, x, y, x, y+s);
+    XDrawLine(dpy, window, white_gc, x+s, y, x+s, y+s);
+    XDrawLine(dpy, window, white_gc, x, y+s, x+s, y+s);
+#endif
+
+}
+
+\f
+char *progclass = "Spotlight";
+
+char *defaults [] = {
+  "*dontClearRoot:             True",
+
+#ifdef __sgi   /* really, HAVE_READ_DISPLAY_EXTENSION */
+  "*visualID:                  Best",
+#endif
+
+  "*delay:                     10000",
+  "*radius:                    125",
+  0
+};
+
+XrmOptionDescRec options [] = {
+  { "-delay",          ".delay",               XrmoptionSepArg, 0 },
+  { "-radius",         ".radius",              XrmoptionSepArg, 0 },
+  { 0, 0, 0, 0 }
+};
+
+void
+screenhack (Display *dpy, Window window)
+{
+  init_hack (dpy, window);
+  while (1) {
+    onestep(dpy, window);
+    XSync(dpy, False);
+    if (delay) usleep (delay);
+    screenhack_handle_events (dpy);
+  }
+}
+  
diff --git a/hacks/spotlight.man b/hacks/spotlight.man
new file mode 100644 (file)
index 0000000..31e9f71
--- /dev/null
@@ -0,0 +1,57 @@
+.TH XScreenSaver 1 "05-Apr-1999" "X Version 11"
+.SH NAME
+spotlight - move spotlight around desktop
+.SH SYNOPSIS
+.B spotlight
+[\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] [\-background \fIcolor\fP] [\-window] [\-root] [\-mono] [\-install] [\-visual \fIvisual\fP] [\-delay \fIusecs\fP] [\-radius \fIpixels\fP]
+.SH DESCRIPTION
+The \fIspotlight\fP program draws random rectangles.
+.SH OPTIONS
+.I spotlight
+accepts the following options:
+.TP 8
+.B \-window
+Draw on a newly-created window.  This is the default.
+.TP 8
+.B \-root
+Draw on the root window.
+.TP 8
+.B \-mono 
+If on a color display, pretend we're on a monochrome display.
+.TP 8
+.B \-install
+Install a private colormap for the window.
+.TP 8
+.B \-visual \fIvisual\fP
+Specify which visual to use.  Legal values are the name of a visual class,
+or the id number (decimal or hex) of a specific visual.
+.TP 8
+.B \-delay \fImicroseconds\fP
+Slow it down.
+.TP 8
+.B \-radius \fIpixels\fP
+Radius of the spotlight in pixels.
+.SH ENVIRONMENT
+.PP
+.TP 8
+.B DISPLAY
+to get the default host and display number.
+.TP 8
+.B XENVIRONMENT
+to get the name of a resource file that overrides the global resources
+stored in the RESOURCE_MANAGER property.
+.SH SEE ALSO
+.BR X (1),
+.BR xscreensaver (1)
+.SH COPYRIGHT
+Copyright \(co 1999 by Rick Schultz.  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.
+.SH CREDITS
+Hacked together by Rick Schultz <rick@skapunx.net>, based on StefView for
+BackSpace by Darcy Brockbank and on several other xscreensaver hacks.
+
diff --git a/hacks/squiral.c b/hacks/squiral.c
new file mode 100644 (file)
index 0000000..57feea0
--- /dev/null
@@ -0,0 +1,222 @@
+/* squiral, by "Jeff Epler" <jepler@inetnebr.com>, 18-mar-1999.
+ *
+ * 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.
+ */
+
+#include "screenhack.h"
+#include "colors.h"
+#include "erase.h"
+#include "yarandom.h"
+
+#define R(x)  (abs(random())%x)
+#define PROB(x) (abs(random())<(x*(double)RAND_MAX))
+
+#define NCOLORSMAX 255
+static int width, height, count, cycle;
+static double frac, disorder, handedness;
+static int ncolors=0;
+static GC draw_gc, erase_gc;
+static XColor colors[NCOLORSMAX];
+#define STATES 8
+
+/* 0- 3 left-winding  */
+/* 4- 7 right-winding */
+
+#define CLEAR1(x,y) (!fill[((y)%height)*width+(x)%width])
+#define MOVE1(x,y) (fill[((y)%height)*width+(x)%width]=1, XDrawPoint(dpy, window, draw_gc, (x)%width,(y)%height), cov++)
+
+static int cov;
+static int dirh[4];
+static int dirv[4];
+
+static int *fill;
+
+#define CLEARDXY(x,y,dx,dy) CLEAR1(x+dx, y+dy) && CLEAR1(x+dx+dx, y+dy+dy)
+#define MOVEDXY(x,y,dx,dy)  MOVE1 (x+dx, y+dy), MOVE1 (x+dx+dx, y+dy+dy)
+
+#define CLEAR(d) CLEARDXY(w->h,w->v, dirh[d],dirv[d])
+#define MOVE(d) (XSetForeground(dpy, draw_gc, colors[w->c].pixel), \
+                  MOVEDXY(w->h,w->v, dirh[d],dirv[d]), \
+                 w->h=w->h+dirh[d]*2, \
+                 w->v=w->v+dirv[d]*2, dir=d)
+
+#define RANDOM (void) (w->h = R(width), w->v = R(height), w->c = R(ncolors), \
+                 type=R(2), dir=R(4), (cycle && (w->cc=R(3)+ncolors)))
+
+struct worm {
+    int h;
+    int v;
+    int s;
+    int c;
+    int cc;
+} *worms;
+
+#define SUCC(x) ((x+1)%4)
+#define PRED(x) ((x+3)%4)
+#define CCW     PRED(dir)
+#define CW      SUCC(dir)
+#define REV     ((dir+2)%4)
+#define STR     (dir)
+#define TRY(x)  if (CLEAR(x)) { MOVE(x); break; }
+
+static void
+do_worm(Display *dpy, Window window, struct worm *w)
+{
+    int type = w->s / 4;
+    int dir = w->s % 4;
+
+    w->c = (w->c+w->cc) % ncolors;
+
+    if (PROB(disorder)) type=PROB(handedness);
+    switch(type) {
+    case 0: /* CCW */
+       TRY(CCW)
+       TRY(STR)
+       TRY(CW)
+       RANDOM;
+       break;
+    case 1: /* CW */
+       TRY(CW)
+       TRY(STR)
+       TRY(CCW)
+       RANDOM;
+       break;
+    }
+    w->s = type*4+dir;
+    w->h = w->h % width;
+    w->v = w->v % height;
+}
+
+static void
+init_squiral(Display *dpy, Window window)
+{
+    XGCValues gcv;
+    Colormap cmap;
+    XWindowAttributes xgwa;
+    Bool writeable = False;
+    int i;
+
+    XClearWindow(dpy, window);
+    XGetWindowAttributes(dpy, window, &xgwa);
+    width  = xgwa.width;
+    height = xgwa.height;
+
+    cmap = xgwa.colormap;
+    gcv.foreground = get_pixel_resource("foreground",
+       "Foreground", dpy, cmap);
+    draw_gc = XCreateGC(dpy, window, GCForeground, &gcv);
+    gcv.foreground = get_pixel_resource ("background", "Background",dpy, cmap);
+    erase_gc = XCreateGC (dpy, window, GCForeground, &gcv);
+    cmap = xgwa.colormap;
+    if( ncolors ) {
+        free_colors(dpy, cmap, colors, ncolors);
+        ncolors = 0;
+    }
+    if( mono_p ) {
+      ncolors=1;
+      colors[0].pixel=get_pixel_resource("foreground","Foreground", dpy, cmap);
+    } else {
+      ncolors = get_integer_resource("ncolors", "Integer");
+      if (ncolors < 0 || ncolors > NCOLORSMAX)
+        ncolors = NCOLORSMAX;
+      make_uniform_colormap(dpy, xgwa.visual, cmap, colors, &ncolors, True,
+         &writeable, False);
+      if (ncolors <= 0) {
+        ncolors = 1;
+        colors[0].pixel=get_pixel_resource("foreground","Foreground",dpy, cmap);
+      }
+    }
+    count= get_integer_resource("count", "Integer");
+    frac = get_integer_resource("fill",  "Integer")*0.01;
+    cycle= get_boolean_resource("cycle", "Cycle");
+    disorder=get_float_resource("disorder", "Float");
+    handedness=get_float_resource("handedness", "Float");
+
+    if(frac<0.01) frac=0.01;
+    if(frac>0.99) frac=0.99;
+    if(count==0) count=width/32;
+    if(count<1) count=1;
+    if(count>1000) count=1000;
+
+    if(worms) free(worms);
+    if(fill)  free(fill);
+
+    worms=calloc(count, sizeof(struct worm));
+    fill=calloc(width*height, sizeof(int));
+
+    dirh[0]=0; dirh[1]=1; dirh[2]=0; dirh[3]=width-1;
+    dirv[0]=height-1; dirv[1]=0; dirv[2]=1; dirv[3]=0;
+    for(i=0;i<count;i++) {
+       worms[i].h=R(width);
+       worms[i].v=R(height);
+       worms[i].s=R(4)+4*PROB(handedness);
+       worms[i].c=R(ncolors);
+       if(cycle) { worms[i].cc=R(3)+ncolors; }
+       else worms[i].cc=0;
+    }
+}
+
+void
+screenhack(Display *dpy, Window window)
+{
+   int inclear, i;
+   int delay= get_integer_resource("delay", "Integer");
+   init_squiral(dpy, window);
+   cov=0; inclear=height;
+   while(1) {
+       if(inclear<height) {
+           XDrawLine(dpy, window, erase_gc, 0, inclear, width-1, inclear);
+           memset(&fill[inclear*width], 0, sizeof(int)*width);
+           XDrawLine(dpy, window, erase_gc, 0, height-inclear-1, width-1,
+                   height-inclear-1);
+           memset(&fill[(height-inclear-1)*width], 0, sizeof(int)*width);
+           inclear++;
+           XDrawLine(dpy, window, erase_gc, 0, inclear, width-1, inclear);
+           memset(&fill[inclear*width], 0, sizeof(int)*width);
+           XDrawLine(dpy, window, erase_gc, 0, height-inclear-1, width-1,
+                   height-inclear-1);
+           memset(&fill[(height-inclear-1)*width], 0, sizeof(int)*width);
+           inclear++;
+           if(inclear>height/2) inclear=height;
+       }
+       else if(cov>(frac*width*height)) {
+           inclear=0;
+           cov=0;
+       }
+       for(i=0;i<count;i++) do_worm(dpy, window, &worms[i]);
+       screenhack_handle_events(dpy);
+       usleep(delay);
+    }  
+}
+
+char *progclass="Squiral";
+
+char *defaults[] = {
+  ".background: black",
+  ".foreground: white",
+  "*fill:       75",
+  "*count:      0",
+  "*ncolors:    100",
+  "*delay:      1000",
+  "*disorder:   0.005",
+  "*cycle:      False",
+  "*handedness: .5",
+  0
+};
+
+XrmOptionDescRec options[] = {
+    {"-fill", ".fill", XrmoptionSepArg, 0},
+    {"-count", ".count", XrmoptionSepArg, 0},
+    {"-delay", ".delay", XrmoptionSepArg, 0},
+    {"-disorder", ".disorder", XrmoptionSepArg, 0},
+    {"-handedness", ".handedness", XrmoptionSepArg, 0},
+    {"-ncolors", ".ncolors", XrmoptionSepArg, 0},
+    {"-cycle", ".cycle", XrmoptionNoArg, "True"},
+    {"-no-cycle", ".cycle", XrmoptionNoArg, "False"},
+};
diff --git a/hacks/squiral.man b/hacks/squiral.man
new file mode 100644 (file)
index 0000000..9e3ce5f
--- /dev/null
@@ -0,0 +1,76 @@
+.TH XScreenSaver 1 "18-mar-1999" "X Version 11"
+.SH NAME
+squiral - square spirals screensaver
+.SH SYNOPSIS
+.B squiral
+[\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP]
+[\-background \fIcolor\fP] [\-window] [\-root] [\-mono] [\-install]
+[\-noinstall] [\-visual \fIvisual\fP] [\-fill \fIpercent\fP] [-count
+\fInumber\fP] [-delay \fIusec\fP] [-disorder \fIfraction\fP] [-handedness
+\fIfraction\fP] [-cycle]
+.SH DESCRIPTION
+The \fIsquiral\fP program displays interacting, spiral-producing automata
+
+.SH OPTIONS
+.I squiral
+accepts the following options:
+.TP 8
+.B \-window
+Draw on a newly-created window.  This is the default.
+.TP 8
+.B \-root
+Draw on the root window.
+.TP 8
+.B \-mono 
+If on a color display, pretend we're on a monochrome display.
+.TP 8
+.B \-install
+Install a private colormap for the window.
+.TP 8
+.B \-visual \fIvisual\fP
+Specify which visual to use.  Legal values are the name of a visual class,
+or the id number (decimal or hex) of a specific visual.
+.TP 8
+.B \-fill \fIpercent\fP
+Specify the percent (0-100) of the screen which must be filled before
+the screen is cleared.  60-80 percent are good values.
+.TP 8
+.B \-count \fInumber\fP
+The number of squiralies.  By default, the screen width divided by 32.
+.TP 8
+.B \-delay \fIusec\fP
+The wait between steps.  The default is 1000.
+.TP 8
+.B \-disorder \fIfraction\fP
+The fraction of the time a squiraly will choose a new direction.
+The default is 0.005.
+.TP 8
+.B \-handedness \fIfraction\fP
+The fraction of the time a squiraly will choose to enter lefthanded
+mode.  0.0 means exclusively right-handed behavior, 0.5 (the default) is
+a balance between the two, and 1.0 is exclusively left-handed behaviour.
+.SH ENVIRONMENT
+.PP
+.TP 8
+.B DISPLAY
+to get the default host and display number.
+.TP 8
+.B XENVIRONMENT
+to get the name of a resource file that overrides the global resources
+stored in the RESOURCE_MANAGER property.
+.SH BUGS
+None known
+.SH SEE ALSO
+.BR X (1),
+.BR xscreensaver (1)
+.SH COPYRIGHT
+Copyright \(co 1999, by Jeff Epler.  Permission to use, copy, modify, 
+distribute, and sell this software and its documentation for any purpose is 
+hereby granted without fee, provided fnord 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 fnord this software for any purpose.  It is provided "as
+is" without express or fnord implied warranty.
+.SH AUTHOR
+Jeff Epler <jepler@inetnebr.com>, 18-mar-1999
+
index 4652aab4d48f7852f399280255f455687d237288..12192209fa5ef8d56acd64631b5e94ea2e8bbee6 100755 (executable)
@@ -95,6 +95,18 @@ grab() {
 
     qcam > $tmp_ppm1
 
+    # Friedrich Delgado Friedrichs says the following works with a
+    # Brooktree 848 or 878 tuner card:
+    #
+    #   bttvgrab -Q -d q -l 1 -F /dev/null -o gif -f ${tmp}.gif -N PAL
+    #   giftopnm ${tmp}.gif > $tmp_ppm1
+    #   rm ${tmp}.gif
+    #
+    # He notes that you might need to run a TV application (e.g., xawtv)
+    # before the first time you run vidwhacker in order to initialize the
+    # tuner card and kernel modules.
+
+
   else
     echo "$0: don't know how to grab video on this OS." >&2
     clean2
diff --git a/hacks/wander.c b/hacks/wander.c
new file mode 100644 (file)
index 0000000..2540fd9
--- /dev/null
@@ -0,0 +1,213 @@
+/* wander, by Rick Campbell <rick@campbellcentral.org>, 19 December 1998.
+ *
+ * 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.
+ */
+
+#include <stdio.h>
+
+#include "screenhack.h"
+#include "colors.h"
+#include "erase.h"
+
+#define MAXIMUM_COLOR_COUNT (256)
+
+static unsigned int advance     = 0;
+static Bool         circles     = 0;
+static Colormap     color_map   = (Colormap)NULL;
+static int          color_count = 0;
+static int          color_index = 0;
+static XColor       colors      [MAXIMUM_COLOR_COUNT];
+static GC           context     = (GC)NULL;
+static unsigned int density     = 0;
+static int          depth       = 0;
+static int          height      = 0;
+static unsigned int length     = 0;
+static unsigned int reset      = 0;
+static unsigned int size       = 0;
+static int          width       = 0;
+
+static void
+init_wander (Display *display, Window window)
+{
+    XGCValues values;
+    XWindowAttributes attributes;
+
+    XClearWindow (display, window);
+    XGetWindowAttributes (display, window, &attributes);
+    width = attributes.width;
+    height = attributes.height;
+    depth = attributes.depth;
+    color_map = attributes.colormap;
+    if (color_count)
+    {
+        free_colors (display, color_map, colors, color_count);
+        color_count = 0;
+    }
+    context = XCreateGC (display, window, GCForeground, &values);
+    color_count = MAXIMUM_COLOR_COUNT;
+    make_color_loop (display, color_map,
+                    0,   1, 1,
+                    120, 1, 1,
+                    240, 1, 1,
+                    colors, &color_count, True, False);
+    if (color_count <= 0)
+    {
+        color_count = 2;
+        colors [0].red = colors [0].green = colors [0].blue = 0;
+        colors [1].red = colors [1].green = colors [1].blue = 0xFFFF;
+        XAllocColor (display, color_map, &colors [0]);
+        XAllocColor (display, color_map, &colors [1]);
+    }
+    color_index = random () % color_count;
+    
+    advance = get_integer_resource ("advance", "Integer");
+    density = get_integer_resource ("density", "Integer");
+    if (density < 1) density = 1;
+    reset = get_integer_resource ("reset", "Integer");
+    if (reset < 100) reset = 100;
+    circles = get_boolean_resource ("circles", "Boolean");
+    size = get_integer_resource ("size", "Integer");
+    if (size < 1) size = 1;
+    width = width / size;
+    height = height / size;
+    length = get_integer_resource ("length", "Integer");
+    if (length < 1) length = 1;
+    XSetForeground (display, context, colors [color_index].pixel);
+}
+
+
+static void
+wander (Display *display, Window window)
+{
+    int x = random () % width;
+    int y = random () % height;
+    int last_x = x;
+    int last_y = y;
+    int width_1 = width - 1;
+    int height_1 = height - 1;
+    int length_limit = length;
+    int reset_limit = reset;
+    int color_index = random () % color_count;
+    unsigned long color = colors [random () % color_count].pixel;
+    Pixmap pixmap = XCreatePixmap (display, DefaultRootWindow (display), size,
+                                  size, depth);
+    XSetForeground (display, context,
+                   BlackPixel (display, DefaultScreen (display)));
+    XFillRectangle (display, pixmap, context, 0, 0,
+                   width * size, height * size);
+    XSetForeground (display, context, color);
+    XFillArc (display, pixmap, context, 0, 0, size, size, 0, 360*64);
+
+    while (1)
+    {
+        if (random () % density)
+        {
+            x = last_x;
+            y = last_y;
+        }
+        else
+        {
+            last_x = x;
+            last_y = y;
+            x = (x + width_1  + (random () % 3)) % width;
+            y = (y + height_1 + (random () % 3)) % height;
+        }
+        if ((random () % length_limit) == 0)
+        {
+            if (advance == 0)
+            {
+                color_index = random () % color_count;
+            }
+            else
+            {
+                color_index = (color_index + advance) % color_count;
+            }
+            color = colors [color_index].pixel;
+            XSetForeground (display, context, color);
+            if (circles)
+            {
+                XFillArc (display, pixmap, context,
+                         0, 0, size, size, 0, 360 * 64);
+            }
+        }
+        if ((random () % reset_limit) == 0)
+        {
+            erase_full_window (display, window);
+            color = colors [random () % color_count].pixel;
+            x = random () % width;
+            y = random () % height;
+            last_x = x;
+            last_y = y;
+            if (circles)
+            {
+                XFillArc (display, pixmap, context, 0, 0, size, size, 0, 360*64);
+            }
+        }
+        if (size == 1)
+        {
+            XDrawPoint (display, window, context, x, y);
+        }
+        else
+        {
+            if (circles)
+            {
+                XCopyArea (display, pixmap, window, context, 0, 0, size, size,
+                           x * size, y * size);
+            }
+            else
+            {
+                XFillRectangle (display, window, context, x * size, y * size,
+                               size, size);
+            }
+        }
+        screenhack_handle_events (display);
+    }
+}
+
+char *progclass = "Wander";
+
+char *defaults [] =
+{
+    ".advance:    1",
+    ".density:    2",
+    ".length:     25000",
+    ".delay:      1",
+    ".reset:      2500000",
+    ".circles:    False",
+    ".size:       1",
+    0
+};
+
+XrmOptionDescRec options [] =
+{
+    { "-advance", ".advance", XrmoptionSepArg, 0 },
+    { "-circles", ".circles", XrmoptionSepArg, 0 },
+    { "-density", ".density", XrmoptionSepArg, 0 },
+    { "-length",  ".length",  XrmoptionSepArg, 0 },
+    { "-delay",   ".delay",   XrmoptionSepArg, 0 },
+    { "-reset",   ".reset",   XrmoptionSepArg, 0 },
+    { "-size",    ".size",    XrmoptionSepArg, 0 },
+    { 0, 0, 0, 0 }
+};
+
+void
+screenhack (display, window)
+    Display *display;
+    Window window;
+{
+    int delay = get_integer_resource ("delay", "Integer");
+    while (1)
+    {
+        init_wander (display, window);
+        wander (display, window);
+        screenhack_handle_events (display);
+        if (delay) sleep (delay);
+        erase_full_window (display, window);
+    }
+}
diff --git a/hacks/xflame.c b/hacks/xflame.c
new file mode 100755 (executable)
index 0000000..360ef37
--- /dev/null
@@ -0,0 +1,718 @@
+/* xflame, Copyright (c) 1996-1999 Carsten Haitzler <raster@redhat.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.
+ */
+
+/* Version history as near as I (jwz) can piece together:
+
+   * Carsten Haitzler <raster@redhat.com> wrote the first version in 1996.
+
+   * Rahul Jain <rahul@rice.edu> added support for TrueColor displays.
+
+   * Someone did a rough port of it to use the xscreensaver utility routines
+     instead of creating its own window by hand.
+
+   * Someone (probably Raster) came up with a subsequent version that had
+     a Red Hat logo hardcoded into it.
+
+   * Daniel Zahn <stumpy@religions.com> found that version in 1998, and 
+     hacked it to be able to load a different logo from a PGM (P5) file, 
+     with a single hardcoded pathname.
+
+   * Jamie Zawinski <jwz@jwz.org> found several versions of xflame in
+     March 1999, and pieced them together.  Changes:
+
+       - Correct and fault-tolerant use of the Shared Memory extension;
+         previous versions of xflame did not work when $DISPLAY was remote.
+
+       - Replaced PGM-reading code with code that can read arbitrary XBM
+         and XPM files (color ones will be converted to grayscale.)
+
+       - Command-line options all around -- no hardcoded pathnames or
+         behavioral constants.
+
+       - General cleanup and portability tweaks.
+ */
+
+
+/* portions by Daniel Zahn <stumpy@religions.com> */
+
+
+#include "screenhack.h"
+#include <X11/Xutil.h>
+#include <limits.h>
+
+#ifdef HAVE_XSHM_EXTENSION
+# include "xshm.h"
+#endif /* HAVE_XSHM_EXTENSION */
+
+#ifdef HAVE_XPM
+# include <X11/xpm.h>
+# ifndef PIXEL_ALREADY_TYPEDEFED
+#  define PIXEL_ALREADY_TYPEDEFED /* Sigh, Xmu/Drawing.h needs this... */
+# endif
+#endif
+
+#ifdef HAVE_XMU
+# ifndef VMS
+#  include <X11/Xmu/Drawing.h>
+# else  /* VMS */
+#  include <Xmu/Drawing.h>
+# endif /* VMS */
+#endif /* HAVE_XMU */
+
+#define MAX             255
+
+static Display         *display;
+static Window          window;
+static int             depth;
+static int             width;
+static int             height;
+static Colormap        colormap;
+static Visual          *visual;
+static Bool            shared;
+static XImage          *xim;
+#ifdef HAVE_XSHM_EXTENSION
+static XShmSegmentInfo shminfo;
+#endif /* HAVE_XSHM_EXTENSION */
+static GC              gc;
+static int             ctab[256];
+
+static unsigned char  *flame;
+static unsigned char  *theim;
+static int             fwidth;
+static int             fheight;
+static int             top;
+static int             hspread;
+static int             vspread;
+static int             residual;
+
+static int ihspread;
+static int ivspread;
+static int iresidual;
+static int variance;
+static int vartrend;
+
+static void
+GetXInfo(Display *disp, Window win)
+{
+  XWindowAttributes xwa;
+   
+  XGetWindowAttributes(disp,win,&xwa);
+
+  window   = win;
+  display  = disp;
+  colormap = xwa.colormap;
+  depth    = xwa.depth;
+  visual   = xwa.visual;
+  width    = xwa.width;
+  height   = xwa.height;
+
+  if (width%2)
+    width++;
+  if (height%2)
+    height++;
+}
+
+static void
+MakeImage(void)
+{
+  XGCValues gcv;
+
+  shared = True;
+  xim = create_xshm_image (display, visual, depth, ZPixmap, NULL,
+                           &shminfo, width, height);
+  if (!xim)
+    {
+      shared = False;
+      xim = XCreateImage (display, visual, depth, ZPixmap, 0, NULL,
+                          width, height, 32, 0);
+      if (xim)
+        xim->data = (char *) calloc(xim->height, xim->bytes_per_line);
+      if (!xim || !xim->data)
+        {
+          fprintf(stderr,"%s: out of memory.\n", progname);
+          exit(1);
+        }
+    }
+
+  gc = XCreateGC(display,window,0,&gcv);
+  if (!gc) exit (1);
+}
+
+
+static void
+InitColors(void)
+{
+  int i = 0, j = 0;
+  for (i = 0; i < 256 * 2; i += 2)
+    {
+      XColor xcl;
+      int r = (i -   0) * 3;
+      int g = (i -  80) * 3;
+      int b = (i - 160) * 3;
+    
+      if (r < 0)   r = 0;
+      if (r > 255) r = 255;
+      if (g < 0)   g = 0;
+      if (g > 255) g = 255;
+      if (b < 0)   b = 0;
+      if (b > 255) b = 255;
+
+      xcl.red   = (unsigned short)((r << 8) | r);
+      xcl.green = (unsigned short)((g << 8) | g);
+      xcl.blue  = (unsigned short)((b << 8) | b);
+      xcl.flags = DoRed | DoGreen | DoBlue;
+
+      XAllocColor(display,colormap,&xcl);
+
+      ctab[j++] = (int)xcl.pixel;
+    }
+}
+
+
+static void
+DisplayImage(void)
+{
+  if (shared)
+    XShmPutImage(display, window, gc, xim, 0,(top - 1) << 1, 0,
+                 (top - 1) << 1, width, height - ((top - 1) << 1), False);
+  else
+    XPutImage(display, window, gc, xim, 0, (top - 1) << 1, 0,
+              (top - 1) << 1, width, height - ((top - 1) << 1));
+}
+
+
+static void
+InitFlame(void)
+{
+  fwidth  = width / 2;
+  fheight = height / 2;
+  flame   = (unsigned char *) malloc((fwidth + 2) * (fheight + 2)
+                                     * sizeof(unsigned char));
+
+  if (!flame)
+    {
+      fprintf(stderr,"%s: out of memory\n", progname);
+      exit(1);
+    }
+
+  top      = 1;
+  ihspread  = get_integer_resource("hspread", "Integer");
+  ivspread  = get_integer_resource("vspread", "Integer");
+  iresidual = get_integer_resource("residual", "Integer");
+  variance  = get_integer_resource("variance", "Integer");
+  vartrend  = get_integer_resource("vartrend", "Integer");
+
+# define THROTTLE(VAR,NAME) \
+  if (VAR < 0 || VAR > 255) { \
+    fprintf(stderr, "%s: %s must be in the range 0-255 (not %d).\n", \
+            progname, NAME, VAR); \
+    exit(1); }
+  THROTTLE (ihspread, "hspread");
+  THROTTLE (ivspread, "vspread");
+  THROTTLE (iresidual,"residual");
+  THROTTLE (variance, "variance");
+  THROTTLE (vartrend, "vartrend");
+# undef THROTTLE
+
+
+
+  hspread = ihspread;
+  vspread = ivspread;
+  residual = iresidual;
+}
+
+
+static void
+Flame2Image16(void)
+{
+  int x,y;
+  unsigned short *ptr;
+  unsigned char *ptr1;
+  int v1,v2,v3,v4;
+
+  ptr  = (unsigned short *)xim->data;
+  ptr += (top << 1) * width;
+  ptr1 = flame + 1 + (top * (fwidth + 2));
+
+  for(y = top; y < fheight; y++)
+    {
+      for( x = 0; x < fwidth; x++)
+        {
+          v1 = (int)*ptr1;
+          v2 = (int)*(ptr1 + 1);
+          v3 = (int)*(ptr1 + fwidth + 2);
+          v4 = (int)*(ptr1 + fwidth + 2 + 1);
+          ptr1++;
+          *ptr++ = (unsigned short)ctab[v1];
+          *ptr   = (unsigned short)ctab[(v1 + v2) >> 1];
+          ptr   += width - 1;
+          *ptr++ = (unsigned short)ctab[(v1 + v3) >> 1];
+          *ptr   = (unsigned short)ctab[(v1 + v4) >> 1];
+          ptr   -= width - 1;
+        }
+      ptr  += width;
+      ptr1 += 2;
+    }
+}
+
+static void
+Flame2Image32(void)
+{
+  int x,y;
+  unsigned int *ptr;
+  unsigned char *ptr1;
+  int v1,v2,v3,v4;
+
+  ptr  = (unsigned int *)xim->data;
+  ptr += (top << 1) * width;
+  ptr1 = flame + 1 + (top * (fwidth + 2));
+
+  for( y = top; y < fheight; y++)
+    {
+      for( x = 0; x < fwidth; x++)
+        {
+          v1 = (int)*ptr1;
+          v2 = (int)*(ptr1 + 1);
+          v3 = (int)*(ptr1 + fwidth + 2);
+          v4 = (int)*(ptr1 + fwidth + 2 + 1);
+          ptr1++;
+          *ptr++ = (unsigned int)ctab[v1];
+          *ptr   = (unsigned int)ctab[(v1 + v2) >> 1];
+          ptr   += width - 1;
+          *ptr++ = (unsigned int)ctab[(v1 + v3) >> 1];
+          *ptr   = (unsigned int)ctab[(v1 + v4) >> 1];
+          ptr   -= width - 1;
+        }
+      ptr  += width;
+      ptr1 += 2;
+    }
+}
+
+static void
+Flame2Image8(void)
+{
+  int x,y;
+  unsigned char *ptr;
+  unsigned char *ptr1;
+  int v1,v2,v3,v4;
+
+  ptr  = (unsigned char *)xim->data;
+  ptr += (top << 1) * width;
+  ptr1 = flame + 1 + (top * (fwidth + 2));
+
+  for(y=top;y<fheight;y++)
+    {
+      for(x=0;x<fwidth;x++)
+        {
+          v1 = (int)*ptr1;
+          v2 = (int)*(ptr1 + 1);
+          v3 = (int)*(ptr1 + fwidth + 2);
+          v4 = (int)*(ptr1 + fwidth + 2 + 1);
+          ptr1++;
+          *ptr++ = (unsigned char)ctab[v1];
+          *ptr   = (unsigned char)ctab[(v1 + v2) >> 1];
+          ptr   += width - 1;
+          *ptr++ = (unsigned char)ctab[(v1 + v3) >> 1];
+          *ptr   = (unsigned char)ctab[(v1 + v4) >> 1];
+          ptr   -= width - 1;
+        }
+      ptr  += width;
+      ptr1 += 2;
+    }
+}
+
+static void
+Flame2Image1234567(void)
+{
+  int x,y;
+  unsigned char *ptr1;
+  int v1,v2,v3,v4;
+
+  ptr1 = flame + 1 + (top * (fwidth + 2));
+
+  for( y = top; y < fheight; y++)
+    {
+      for( x = 0; x < fwidth; x++)
+        {
+          v1 = (int)*ptr1;
+          v2 = (int)*(ptr1 + 1);
+          v3 = (int)*(ptr1 + fwidth + 2);
+          v4 = (int)*(ptr1 + fwidth + 2 + 1);
+          ptr1++;
+          XPutPixel(xim,(x << 1),    (y << 1),    ctab[v1]);
+          XPutPixel(xim,(x << 1) + 1,(y << 1),    ctab[(v1 + v2) >> 1]);
+          XPutPixel(xim,(x << 1),    (y << 1) + 1,ctab[(v1 + v3) >> 1]);
+          XPutPixel(xim,(x << 1) + 1,(y << 1) + 1,ctab[(v1 + v4) >> 1]);
+        }
+    }
+}
+
+static void
+Flame2Image(void)
+{
+  if (depth >= 24)      Flame2Image32();
+  else if (depth == 16) Flame2Image16();
+  else if (depth == 8)  Flame2Image8();
+  else if (depth == 15) Flame2Image16(); 
+  else if (depth <  8)  Flame2Image1234567();
+  else if (depth == 12) Flame2Image16();
+}
+
+static void
+FlameActive(void)
+{
+  int x,v1;
+  unsigned char *ptr1;
+   
+  ptr1 = flame + ((fheight + 1) * (fwidth + 2));
+
+  for (x = 0; x < fwidth + 2; x++)
+    {
+      v1      = *ptr1;
+      v1     += ((random() % variance) - vartrend);
+      *ptr1++ = v1 % 255;
+    }
+
+  v1= (random() % 100);
+  if (v1 == 10)
+    residual += (random()%10);
+  else if (v1 == 20)
+    hspread += (random()%15);
+  else if (v1 == 30)
+    vspread += (random()%20);
+
+  residual = ((iresidual* 10) + (residual *90)) / 100;
+  hspread  = ((ihspread * 10) + (hspread  *90)) / 100;
+  vspread  = ((ivspread * 10) + (vspread  *90)) / 100;
+}
+
+
+static void
+FlameAdvance(void)
+{
+  int x,y;
+  unsigned char *ptr2;
+  int newtop = top;
+
+  for (y = fheight + 1; y >= top; y--)
+    {
+      int used = 0;
+      unsigned char *ptr1 = flame + 1 + (y * (fwidth + 2));
+      for (x = 0; x < fwidth; x++)
+        {
+          int v1 = (int)*ptr1;
+          int v2, v3;
+          if (v1 > 0)
+            {
+              used = 1;
+              ptr2 = ptr1 - fwidth - 2;
+              v3   = (v1 * vspread) >> 8;
+              v2   = (int)*(ptr2);
+              v2  += v3;
+              if (v2 > MAX) 
+                v2 = MAX;
+
+              *(ptr2) = (unsigned char)v2;
+              v3  = (v1 * hspread) >> 8;
+              v2  = (int)*(ptr2 + 1);
+              v2 += v3;
+              if (v2 > MAX) 
+                v2 = MAX;
+          
+              *(ptr2 + 1) = (unsigned char)v2;
+              v2          = (int)*(ptr2 - 1);
+              v2         += v3;
+              if (v2 > MAX) 
+                v2 = MAX;
+          
+              *(ptr2 - 1) = (unsigned char)v2;
+        
+              if (y < fheight + 1)
+                {
+                  v1    = (v1 * residual) >> 8;
+                  *ptr1 = (unsigned char)v1;
+                }
+            }
+          ptr1++;
+          if (used) 
+            newtop = y - 1;
+        }
+    }
+
+  top = newtop - 1;
+
+  if (top < 1)
+    top = 1;
+}
+
+
+static void
+FlameFill(int val)
+{
+  int x, y;
+  for (y = 0; y < fheight + 1; y++)
+    {
+      unsigned char *ptr1 = flame + 1 + (y * (fwidth + 2));
+      for (x = 0; x < fwidth; x++)
+        {
+          *ptr1 = val;
+          ptr1++;
+        }
+    }
+}
+
+
+static void
+FlamePasteData(unsigned char *d, int xx, int yy, int w, int h)
+{
+  unsigned char *ptr1,*ptr2;
+  ptr2 = d;
+
+  if (xx < 0) xx = 0;
+  if (yy < 0) yy = 0;
+
+  if ((xx >= 0) &&
+      (yy >= 0) &&
+      (xx + w <= fwidth) &&
+      (yy + h <= fheight))
+    {
+      int x, y;
+      for (y = 0; y < h; y++)
+        {
+          ptr1 = flame + 1 + xx + ((yy + y) * (fwidth + 2));
+          for (x = 0; x < w; x++)
+            {
+              if (*ptr2 / 24)
+                *ptr1 += random() % (*ptr2 / 24);
+
+              ptr1++;
+              ptr2++;
+            }
+        }
+    }
+  else
+    {
+      static Bool warned = False;
+      if (!warned)
+        {
+          fprintf (stderr, "%s: window is %dx%d; image must be "
+                   "smaller than %dx%d (not %dx%d).\n",
+                   progname, width, height, fwidth, fheight, w, h);
+          warned = True;
+        }
+    }
+}
+
+
+static unsigned char *
+loadBitmap(int *w, int *h)
+{
+  char *bitmap_name = get_string_resource ("bitmap", "Bitmap");
+
+  if (bitmap_name &&
+      *bitmap_name &&
+      !!strcmp(bitmap_name, "none"))
+    {
+      XpmInfo xpm_info = { 0, };
+      XpmImage xpm_image = { 0, };
+
+      int result = XpmReadFileToXpmImage (bitmap_name, &xpm_image, &xpm_info);
+      if (result == XpmSuccess)
+        {
+          int x, y;
+          unsigned char *result, *o;
+          unsigned char *grays;
+          XWindowAttributes xgwa;
+
+          *w = xpm_image.width;
+          *h = xpm_image.height;
+          result = (unsigned char *) malloc ((*w) * (*h));
+          if (!result)
+            {
+              fprintf(stderr, "%s: out of memory loading %s\n",
+                      progname, bitmap_name);
+              exit (1);
+            }
+
+          XGetWindowAttributes (display, window, &xgwa);
+
+          grays = (unsigned char *) calloc (xpm_image.ncolors+1, 1);
+          for (x = 0; x < xpm_image.ncolors; x++)
+            {
+              XColor xc;
+              XpmColor *xpmc = &xpm_image.colorTable[x];
+              char *cstring = 0;
+              if (xpmc->g_color && *xpmc->g_color)
+                cstring = xpmc->g_color;
+              else if (xpmc->g4_color && *xpmc->g4_color)
+                cstring = xpmc->g4_color;
+              else if (xpmc->c_color && *xpmc->c_color)
+                cstring = xpmc->c_color;
+              else
+                cstring = xpmc->m_color;
+
+              memset (&xc, 0, sizeof(xc));
+              if (!cstring ||
+                  !*cstring ||
+                  !XParseColor (display, xgwa.colormap, cstring, &xc))
+                grays[x] = 0;
+              else
+                grays[x] = (int) (((xc.red   * 0.299) +
+                                   (xc.green * 0.587) +
+                                   (xc.blue  * 0.114))
+                                  / 255);
+            }
+
+          o = result;
+          for (y = 0; y < *h; y++)
+            for (x = 0; x < *w; x++)
+              {
+                int color = xpm_image.data[(y * (*w)) + x];
+                if (color < 0 || color > xpm_image.ncolors) abort();
+                *o++ = grays[color];
+              }
+          return result;
+        }
+      else      /* failed to read XPM -- fall through and try XBM */
+        {
+#ifdef HAVE_XMU
+          XImage *ximage = 0;
+          int width, height, xh, yh;
+          int x, y;
+          unsigned char *result, *o;
+          Pixmap bitmap =
+            XmuLocateBitmapFile (DefaultScreenOfDisplay (display),
+                                 bitmap_name, 0, 0, &width, &height, &xh, &yh);
+          if (!bitmap)
+            {
+              fprintf(stderr, "%s: unable to load bitmap file %s\n",
+                      progname, bitmap_name);
+              exit (1);
+            }
+          ximage = XGetImage (display, bitmap, 0, 0, width, height,
+                              1L, XYPixmap);
+          XFreePixmap (display, bitmap);
+
+          if (ximage->depth != 1) abort();
+
+          *w = ximage->width;
+          *h = ximage->height;
+          result = (unsigned char *) malloc ((*w) * (*h));
+          if (!result)
+            {
+              fprintf(stderr, "%s: out of memory loading %s\n",
+                      progname, bitmap_name);
+              exit (1);
+            }
+
+          o = result;
+          for (y = 0; y < *h; y++)
+            for (x = 0; x < *w; x++)
+              *o++ = (XGetPixel(ximage, x, y) ? 255 : 0);
+
+          return result;
+
+#else  /* !XMU */
+          fprintf (stderr,
+                   "%s: your vendor doesn't ship the standard Xmu library.\n",
+                   progname);
+          fprintf (stderr, "\tWe can't load XBM files without it.\n");
+          exit (1);
+#endif /* !XMU */
+        }
+    }
+
+  *w = 0;
+  *h = 0;
+  return 0;
+
+}
+
+
+\f
+char *progclass = "XFlame";
+
+char *defaults [] = {
+  ".background:     black",
+  ".foreground:     red",
+  "*bitmap:         none",
+  "*bitmapBaseline: 20",
+  "*delay:          10000",
+  "*hspread:        30",
+  "*vspread:        97",
+  "*residual:       99",
+  "*variance:       50",
+  "*vartrend:       20",
+
+#ifdef HAVE_XSHM_EXTENSION
+  "*useSHM: False",   /* xshm turns out not to help. */
+#endif /* HAVE_XSHM_EXTENSION */
+   0
+};
+
+XrmOptionDescRec options [] = {
+  { "-delay",     ".delay",          XrmoptionSepArg, 0 },
+  { "-bitmap",    ".bitmap",         XrmoptionSepArg, 0 },
+  { "-baseline",  ".bitmapBaseline", XrmoptionSepArg, 0 },
+  { "-hspread",   ".hspread",        XrmoptionSepArg, 0 },
+  { "-vspread",   ".vspread",        XrmoptionSepArg, 0 },
+  { "-residual",  ".residual",       XrmoptionSepArg, 0 },
+  { "-variance",  ".variance",       XrmoptionSepArg, 0 },
+  { "-vartrend",  ".vartrend",       XrmoptionSepArg, 0 },
+#ifdef HAVE_XSHM_EXTENSION
+  { "-shm",       ".useSHM",         XrmoptionNoArg, "True" },
+  { "-no-shm",    ".useSHM",         XrmoptionNoArg, "False" },
+#endif /* HAVE_XSHM_EXTENSION */
+  { 0, 0, 0, 0 }
+};
+
+void
+screenhack (Display *disp, Window win)
+{
+  int theimx = 0, theimy = 0;
+  int baseline = get_integer_resource ("bitmapBaseline", "Integer");
+  int delay = get_integer_resource ("delay", "Integer");
+  xim      = NULL;
+  top      = 1;
+  flame    = NULL;
+
+  GetXInfo(disp,win);
+  InitColors();
+  theim = loadBitmap(&theimx, &theimy);
+
+  /* utils/xshm.c doesn't provide a way to free the shared-memory image, which
+     makes it hard for us to react to window resizing.  So, punt for now.  The
+     size of the window at startup is the size it will stay.
+  */
+  GetXInfo(disp,win);
+
+  MakeImage();
+  InitFlame();
+  FlameFill(0);
+
+  while (1)
+    {
+      FlameActive();
+
+      if (theim)
+        FlamePasteData(theim, (fwidth - theimx) / 2,
+                       fheight - theimy - baseline, theimx, theimy);
+
+      FlameAdvance();
+      Flame2Image();
+      DisplayImage();
+
+      XSync(display,False);
+      screenhack_handle_events(display);
+      if (delay)
+        usleep (delay);
+    }
+}
index d0c09e827dd3baef2f5ff2d9e19bd46db1b107c5..a3a9a840c9c968f572eedf21c772f17ab298967c 100644 (file)
--- a/setup.com
+++ b/setup.com
@@ -10,7 +10,9 @@ $ bouboule    :== $'mydir'bouboule
 $ braid                :== $'mydir'braid
 $ bsod         :== $'mydir'bsod
 $ bubbles      :== $'mydir'bubbles
+$ compass      :== $'mydir'compass
 $ coral                :== $'mydir'coral
+$ critical     :== $'mydir'critical
 $ crystal      :== $'mydir'crystal
 $ cynosure     :== $'mydir'cynosure
 $ decayscreen  :== $'mydir'decayscreen
@@ -68,6 +70,8 @@ $ slip                :== $'mydir'slip
 $ sonar                :== $'mydir'sonar
 $ sphere       :== $'mydir'sphere
 $ spiral       :== $'mydir'spiral
+$ spotlight    :== $'mydir'spotlight
+$ squiral      :== $'mydir'squiral
 $ starfish     :== $'mydir'starfish
 $ strange      :== $'mydir'strange
 $ swirl                :== $'mydir'swirl
@@ -75,7 +79,9 @@ $ t3d         :== $'mydir't3d
 $ triangle     :== $'mydir'triangle
 $ truchet      :== $'mydir'truchet
 $ vines                :== $'mydir'vines
+$ wander       :== $'mydir'wander
 $ worm         :== $'mydir'worm
+$ xflame       :== $'mydir'xflame
 $ xjack                :== $'mydir'xjack
 $ xlyap                :== $'mydir'xlyap
 $ xroger       :== $'mydir'xroger
index 178bf87c687ccfc7dbe18c5ec6ba3834ea4221a0..826cfedeaf8dfbb328c53774121c79321fc16d26 100644 (file)
@@ -102,13 +102,13 @@ INCLUDES  = -I$(srcdir) -I.. @INCLUDES@
 
 SRCS           = alpha.c colors.c fade.c grabscreen.c hsv.c overlay.c \
                  resources.c spline.c usleep.c visual.c xmu.c xroger.c \
-                 yarandom.c erase.c sgivideo.c xshm.c
+                 yarandom.c erase.c sgivideo.c xshm.c xdbe.c
 OBJS           = alpha.o colors.o fade.o grabscreen.o hsv.o overlay.o \
                  resources.o spline.o usleep.o visual.o xmu.o xroger.o \
-                 yarandom.o erase.o sgivideo.o xshm.o
+                 yarandom.o erase.o sgivideo.o xshm.o xdbe.o
 HDRS           = alpha.h colors.h fade.h grabscreen.h hsv.h resources.h \
                  spline.h usleep.h utils.h version.h visual.h vroot.h xmu.h \
-                 yarandom.h erase.h sgivideo.h xshm.h
+                 yarandom.h erase.h sgivideo.h xshm.h xdbe.h
 EXTRAS         = README Makefile.in ad2c
 VMSFILES       = compile_axp.com compile_decc.com vms-gtod.c vms-gtod.h \
                  vms-strdup.c
@@ -268,4 +268,8 @@ xshm.o: $(srcdir)/utils.h
 xshm.o: ../config.h
 xshm.o: $(srcdir)/xshm.h
 xshm.o: $(srcdir)/resources.h
+xdbe.o: $(srcdir)/utils.h
+xdbe.o: ../config.h
+xdbe.o: $(srcdir)/xdbe.h
+xdbe.o: $(srcdir)/resources.h
 
index 357e75e56b2ddd14fe35012872759124b737fa80..1ca686b69700116e5c147088fe5d348d5ddcf57c 100644 (file)
@@ -12,6 +12,7 @@ $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCL=([],[-]) USLEEP.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCL=([],[-]) VISUAL.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCL=([],[-]) VMS-GTOD.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCL=([],[-]) VMS-STRDUP.C
+$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCL=([],[-]) XDBE.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCL=([],[-]) XMU.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCL=([],[-]) XROGER.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCL=([],[-]) XSHM.C
index 0924953123fdf274060ed5245bda3ea4c20fc014..f2b6c2c919c265c24dd3aaa489e3f4ebdc128a1d 100644 (file)
@@ -12,6 +12,7 @@ $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCL=([],[-]) USLEEP.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCL=([],[-]) VISUAL.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCL=([],[-]) VMS-GTOD.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCL=([],[-]) VMS-STRDUP.C
+$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCL=([],[-]) XDBE.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCL=([],[-]) XMU.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCL=([],[-]) XROGER.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCL=([],[-]) XSHM.C
index 9b58fa9a040f80713942754a628fb4ca1d7488cd..c2c8de7b9da1520d9deed5873a910697cd02843f 100644 (file)
@@ -372,6 +372,68 @@ fizzle (Display *dpy, Window window, GC gc,
 }
 
 
+/* from Rick Campbell <rick@campbellcentral.org> */
+static void
+spiral (Display *display, Window window, GC context,
+        int width, int height, int delay, int granularity)
+{
+# define SPIRAL_ERASE_PI_2 (M_PI + M_PI)
+# define SPIRAL_ERASE_LOOP_COUNT (10)
+# define SPIRAL_ERASE_ARC_COUNT (360.0)
+# define SPIRAL_ERASE_ANGLE_INCREMENT (SPIRAL_ERASE_PI_2 /     \
+SPIRAL_ERASE_ARC_COUNT)
+# define SPIRAL_ERASE_DELAY (0)
+
+  double angle;
+  int arc_limit;
+  int arc_max_limit;
+  int length_step;
+  XPoint points [3];
+
+  angle = 0.0;
+  arc_limit = 1;
+  arc_max_limit = (int) (ceil (sqrt ((width * width) + (height * height)))
+                         / 2.0);
+  length_step = ((arc_max_limit + SPIRAL_ERASE_LOOP_COUNT - 1) /
+                 SPIRAL_ERASE_LOOP_COUNT);
+  arc_max_limit += length_step;
+  points [0].x = width / 2;
+  points [0].y = height / 2;
+  points [1].x = points [0].x + length_step;
+  points [1].y = points [0].y;
+  points [2].x = points [1].x;
+  points [2].y = points [1].y;
+
+  for (arc_limit = length_step;
+       arc_limit < arc_max_limit;
+       arc_limit += length_step)
+    {
+      int arc_length = length_step;
+      int length_base = arc_limit;
+      for (angle = 0.0; angle < SPIRAL_ERASE_PI_2;
+           angle += SPIRAL_ERASE_ANGLE_INCREMENT)
+        {
+          arc_length = length_base + ((length_step * angle) /
+                                      SPIRAL_ERASE_PI_2);
+          points [1].x = points [2].x;
+          points [1].y = points [2].y;
+          points [2].x = points [0].x + (int)(cos (angle) * arc_length);
+          points [2].y = points [0].y + (int)(sin (angle) * arc_length);
+          XFillPolygon (display, window, context, points, 3, Convex,
+                        CoordModeOrigin);
+# if (SPIRAL_ERASE_DELAY != 0)
+          usleep (SPIRAL_ERASE_DELAY);
+# endif /* (SPIRAL_ERASE_DELAY != 0) */
+        }
+    }
+# undef SPIRAL_ERASE_DELAY
+# undef SPIRAL_ERASE_ANGLE_INCREMENT
+# undef SPIRAL_ERASE_ARC_COUNT
+# undef SPIRAL_ERASE_LOOP_COUNT
+# undef SPIRAL_ERASE_PI_2
+}
+
+
 #undef MAX
 #undef MIN
 #define MAX(a,b) ((a)>(b)?(a):(b))
@@ -425,6 +487,7 @@ static Eraser erasers[] = {
   squaretate,
   fizzle,
   random_squares,
+  spiral,
 };
 
 
index b15110c9c23a9eaad920871d63abd1a92612ba37..6e82718df27444a602399a1fd6375a8e443bbba1 100644 (file)
@@ -1,2 +1,2 @@
 static const char screensaver_id[] =
-       "@(#)xscreensaver 3.08 (15-Mar-99), by Jamie Zawinski (jwz@jwz.org)";
+       "@(#)xscreensaver 3.09 (11-Apr-99), by Jamie Zawinski (jwz@jwz.org)";
diff --git a/utils/xdbe.c b/utils/xdbe.c
new file mode 100644 (file)
index 0000000..af0ba3a
--- /dev/null
@@ -0,0 +1,74 @@
+/* xscreensaver, Copyright (c) 1998, 1999 by Jamie Zawinski <jwz@jwz.org>
+ *
+ * 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.
+ */
+
+/* The XDBE (Double Buffering) extension is pretty tricky to use, since you
+   can get X errors at inconvenient times during initialization.  This file
+   contains a utility routine to make it easier to deal with.
+ */
+
+#include "utils.h"
+#include "xdbe.h"
+#include "resources.h"         /* for get_string_resource() */
+
+/* #define DEBUG */
+
+#ifdef DEBUG
+# include <X11/Xmu/Error.h>
+#endif
+
+extern char *progname;
+
+#ifdef HAVE_DOUBLE_BUFFER_EXTENSION    /* whole file */
+
+static Bool xdbe_got_x_error = False;
+static int
+xdbe_ehandler (Display *dpy, XErrorEvent *error)
+{
+  xdbe_got_x_error = True;
+
+#ifdef DEBUG
+  fprintf (stderr, "\n%s: ignoring X error from DOUBLE-BUFFER:\n", progname);
+  XmuPrintDefaultErrorMessage (dpy, error, stderr);
+  fprintf (stderr, "\n");
+#endif
+
+  return 0;
+}
+
+
+XdbeBackBuffer 
+xdbe_get_backbuffer (Display *dpy, Window window,
+                     XdbeSwapAction action)
+{
+  XdbeBackBuffer b;
+  XErrorHandler old_handler;
+  int maj, min;
+
+  if (!get_boolean_resource("useDBE", "Boolean"))
+    return 0;
+
+  if (!XdbeQueryExtension (dpy, &maj, &min))
+    return 0;
+
+  XSync (dpy, False);
+  xdbe_got_x_error = False;
+  old_handler = XSetErrorHandler (xdbe_ehandler);
+  b = XdbeAllocateBackBufferName(dpy, window, XdbeUndefined);
+  XSync (dpy, False);
+  XSetErrorHandler (old_handler);
+
+  if (xdbe_got_x_error)
+    return 0;
+
+  return b;
+}
+
+#endif /* HAVE_DOUBLE_BUFFER_EXTENSION */
diff --git a/utils/xdbe.h b/utils/xdbe.h
new file mode 100644 (file)
index 0000000..26f2de8
--- /dev/null
@@ -0,0 +1,27 @@
+/* xscreensaver, Copyright (c) 1998, 1999 by Jamie Zawinski <jwz@jwz.org>
+ *
+ * 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.
+ */
+
+/* The XDBE (Double Buffering) extension is pretty tricky to use, since you
+   can get X errors at inconvenient times during initialization.  This file
+   contains a utility routine to make it easier to deal with.
+ */
+
+#ifndef __XSCREENSAVER_XDBE_H__
+
+#ifdef HAVE_DOUBLE_BUFFER_EXTENSION
+
+# include <X11/extensions/Xdbe.h>
+
+extern XdbeBackBuffer xdbe_get_backbuffer (Display *, Window, XdbeSwapAction);
+
+#endif /* HAVE_DOUBLE_BUFFER_EXTENSION */
+
+#endif /* __XSCREENSAVER_XDBE_H__ */
index 69790bdd216baf072a0f79ee12726039f5c79b50..dfe67b66de41a4541458799d8d2455ba15299b17 100644 (file)
@@ -1,25 +1,25 @@
 Begin3
 Title:          xscreensaver
-Version:        3.08
-Entered-date:   15MAR99
+Version:        3.09
+Entered-date:   11APR99
 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.
-                Comes with more than 80 display modes.
+                Comes with more than 90 display modes.
 Keywords:       screen saver, screen lock, lock, xlock, X11
 Author:         jwz@jwz.org (Jamie Zawinski)
 Maintained-by:  jwz@jwz.org (Jamie Zawinski)
 Primary-site:   http://www.jwz.org/xscreensaver/
-                1025K xscreensaver-3.08.tar.gz
-                28K  xscreensaver.README
+                1047K xscreensaver-3.09.tar.gz
+                29K  xscreensaver.README
                 1K   xscreensaver.lsm
 Alternate-site: sunsite.unc.edu /pub/Linux/X11/screensavers/
-                1025K xscreensaver-3.08.tar.gz
-                28K  xscreensaver.README
+                1047K xscreensaver-3.09.tar.gz
+                29K  xscreensaver.README
                 1K   xscreensaver.lsm
 Alternate-site: ftp.x.org /contrib/applications/
-                1025K xscreensaver-3.08.tar.gz
-                28K  xscreensaver.README
+                1047K xscreensaver-3.09.tar.gz
+                29K  xscreensaver.README
                 1K   xscreensaver.lsm
 Platforms:      Linux, Irix, SunOS, Solaris, HPUX, AIX, FreeBSD, NetBSD,
                 BSDI, SCO, OSF1, Ultrix, VMS.
index d5a0d3d15ef601aad9863b11082c9c4c9f5a724f..fbba335f323a7d87d6b875c29ebf970b01a53ac2 100755 (executable)
@@ -28,7 +28,7 @@ Entered-date:   $DATE
 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.
-                Comes with more than 80 display modes.
+                Comes with more than 90 display modes.
 Keywords:       screen saver, screen lock, lock, xlock, X11
 Author:         jwz@jwz.org (Jamie Zawinski)
 Maintained-by:  jwz@jwz.org (Jamie Zawinski)
index 0542d3fdd3bc8a68fd56207c609e4057420d9b2f..bab9a8fc19ea6c3692af125bb806d08ec7a8da90 100644 (file)
@@ -1,7 +1,7 @@
 Name: xscreensaver
 Summary: X screen saver and locker
 Vendor: Jamie Zawinski <jwz@jwz.org>
-Version: 3.08
+Version: 3.09
 Release: 1
 URL: http://www.jwz.org/xscreensaver/
 Source: xscreensaver-%{version}.tar.gz
@@ -13,7 +13,7 @@ Buildroot: /var/tmp/xscreensaver-root
 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.
-More than 80 display modes are included in this package.
+More than 90 display modes are included in this package.
 
 %prep