http://packetstormsecurity.org/UNIX/admin/xscreensaver-3.29.tar.gz
authorZygo Blaxell <zblaxell@hungrycats.org>
Mon, 2 Mar 2009 05:42:45 +0000 (00:42 -0500)
committerZygo Blaxell <zblaxell@faye.furryterror.org>
Fri, 8 Feb 2013 17:53:40 +0000 (12:53 -0500)
-rw-r--r-- 1 zblaxell zblaxell 1521590 Feb 14  2001 xscreensaver-3.29.tar.gz
26d620417ab0630370a7d66ceda6f7f9c719c506  xscreensaver-3.29.tar.gz

61 files changed:
README
configure
configure.in
driver/Makefile.in
driver/XScreenSaver.ad.in
driver/XScreenSaver_ad.h
driver/demo-Gtk.c
driver/lock.c
driver/splash.c
driver/xscreensaver-command.man
driver/xscreensaver-demo.man
driver/xscreensaver.h
driver/xscreensaver.man
hacks/flag.c
hacks/glx/Makefile.in
hacks/glx/atlantis.c
hacks/glx/b_lockglue.c
hacks/glx/cage.c
hacks/glx/extrusion.c
hacks/glx/gears.c
hacks/glx/gflux.c
hacks/glx/gflux.man
hacks/glx/glplanet.c
hacks/glx/gltext.c [new file with mode: 0644]
hacks/glx/gltext.man [new file with mode: 0644]
hacks/glx/lament.c
hacks/glx/lament.man
hacks/glx/moebius.c
hacks/glx/morph3d.c
hacks/glx/pipes.c
hacks/glx/pulsar.c
hacks/glx/rubik.c
hacks/glx/sierpinski3d.c
hacks/glx/sproingies.c
hacks/glx/sproingiewrap.c
hacks/glx/stairs.c
hacks/glx/starwars.c
hacks/glx/starwars.man
hacks/glx/stonerview-view.c
hacks/glx/superquadrics.c
hacks/glx/xlock-gl.c
hacks/maze.c
hacks/nerverot.c
hacks/sonar.c
hacks/xlockmore.c
hacks/xlockmore.h
hacks/xlockmoreI.h
utils/Makefile.in
utils/colors.c
utils/logo-180.gif [new file with mode: 0644]
utils/logo-180.xpm [new file with mode: 0644]
utils/logo-50.gif [new file with mode: 0644]
utils/logo-50.xpm [new file with mode: 0644]
utils/logo-big.gif [new file with mode: 0644]
utils/logo.c
utils/logo.gif [deleted file]
utils/logo.xpm [deleted file]
utils/resources.h
utils/version.h
xscreensaver.lsm
xscreensaver.spec

diff --git a/README b/README
index b81c5d33f46b9d260562bd841edb82e47dde61ac..97da26dc4aca646fc24448ecaca2fcb64232c399 100644 (file)
--- a/README
+++ b/README
@@ -74,6 +74,22 @@ http://www.jwz.org/xscreensaver/.
 
                               ============
 
+Changes since 3.28:   * Better rendering of the new logo.
+                      * New hack, `gltext'.
+                      * Added `-planetary' option to `gears', to draw a
+                        different kind of gear system.
+                      * Made motion and rotation be smoother in `gears',
+                        `glplanet', `moebius', `rubik', and `sierpinski3d'.
+                      * Improved coloration in `sierpinski3d'.
+                      * Made the GL hacks react to window size changes.
+                      * Made most of the GL hacks take a -fps option (like
+                        `pulsar' did), so you can use them to benchmark your
+                        3D hardware.
+                      * Fixed the previous fix to `sonar'.
+                      * Minor fix to `nerverot'.
+                        Made sonar able to ping hosts on DEC OSF1.
+                      * Eliminated a bogus "didn't get enough colors" warning
+                        in some of the hacks.
 Changes since 3.27:   * New logo for xscreensaver!
                       * New hacks, `starwars' and `stonerview'.
                       * Made the motion of the bouncing ball in `stairs' be a
index 44721d4aa43f887888fcdee71c5f0ba95cb3d9c3..c53913c8e5b455daa4a7aa881f55d98a21d88732 100755 (executable)
--- a/configure
+++ b/configure
@@ -1142,14 +1142,24 @@ echo "$ac_t""$ac_cv_gcc_accepts_std" 1>&6
   fi
 
    echo "$ac_t""Disabling C++ comments in ANSI C code." 1>&6
+   #
+   # The reason that // comments are banned from xscreensaver is that gcc is
+   # basically the only compiler in the world that supports them in C code.
+   # All other vendors support them only in their C++ compilers, not in their
+   # ANSI C compilers.  This means that it's a portability problem: every time
+   # these comments have snuck into the xscreensaver source code, I've gotten
+   # complaints about it the next day.  So we turn off support for them in gcc
+   # as well to prevent them from accidentially slipping in.
+   #
    if test "$ac_gcc_accepts_std" = yes ; then
      #
      # -std=c89 defines __STRICT_ANSI__, which we don't want.
      # (That appears to be the only additional preprocessor symbol
      # it defines, in addition to the syntax changes it makes.)
      #
-     # -std=gnu89 is no good, because // comments were a GNU
-     # extension before they were in the ANSI C 99 spec...
+     # -std=gnu89 is no good, because // comments were a GNU extension
+     # before they were in the ANSI C 99 spec...  (gcc 2.96 permits //
+     # with -std=gnu89 but not with -std=c89.)
      #
      CC="$CC -std=c89 -U__STRICT_ANSI__"
    else
@@ -1159,7 +1169,7 @@ echo "$ac_t""$ac_cv_gcc_accepts_std" 1>&6
   fi
 
 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:1174: checking how to run the C preprocessor" >&5
+echo "configure:1184: checking how to run the C preprocessor" >&5
 # On Suns, sometimes $CPP names a directory.
 if test -n "$CPP" && test -d "$CPP"; then
   CPP=
@@ -1174,13 +1184,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 1189 "configure"
+#line 1199 "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:1195: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1205: \"$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
   :
@@ -1191,13 +1201,13 @@ else
   rm -rf conftest*
   CPP="${CC-cc} -E -traditional-cpp"
   cat > conftest.$ac_ext <<EOF
-#line 1206 "configure"
+#line 1216 "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:1212: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1222: \"$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
   :
@@ -1208,13 +1218,13 @@ else
   rm -rf conftest*
   CPP="${CC-cc} -nologo -E"
   cat > conftest.$ac_ext <<EOF
-#line 1223 "configure"
+#line 1233 "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:1229: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1239: \"$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
   :
@@ -1239,12 +1249,12 @@ fi
 echo "$ac_t""$CPP" 1>&6
 
 echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:1254: checking for working const" >&5
+echo "configure:1264: 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 1259 "configure"
+#line 1269 "configure"
 #include "confdefs.h"
 
 int main() {
@@ -1293,7 +1303,7 @@ ccp = (char const *const *) p;
 
 ; return 0; }
 EOF
-if { (eval echo configure:1308: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1318: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_const=yes
 else
@@ -1314,21 +1324,21 @@ EOF
 fi
 
 echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:1329: checking for inline" >&5
+echo "configure:1339: 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 1336 "configure"
+#line 1346 "configure"
 #include "confdefs.h"
 
 int main() {
 } $ac_kw foo() {
 ; return 0; }
 EOF
-if { (eval echo configure:1343: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1353: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_inline=$ac_kw; break
 else
@@ -1355,7 +1365,7 @@ esac
 
 ac_bc_result=`echo 6+9 | bc 2>/dev/null`
   echo $ac_n "checking for bc""... $ac_c" 1>&6
-echo "configure:1370: checking for bc" >&5
+echo "configure:1380: checking for bc" >&5
   if test "$ac_bc_result" = "15" ; then
     echo "$ac_t""yes" 1>&6
   else
@@ -1380,7 +1390,7 @@ echo "configure:1370: checking for bc" >&5
 # 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:1395: checking for a BSD compatible install" >&5
+echo "configure:1405: 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
@@ -1433,7 +1443,7 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
 
 echo $ac_n "checking whether \"\${INSTALL} -d\" creates intermediate directories""... $ac_c" 1>&6
-echo "configure:1448: checking whether \"\${INSTALL} -d\" creates intermediate directories" >&5
+echo "configure:1458: checking whether \"\${INSTALL} -d\" creates intermediate directories" >&5
 if eval "test \"`echo '$''{'ac_cv_install_d_creates_dirs'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1455,7 +1465,7 @@ echo "$ac_t""$ac_cv_install_d_creates_dirs" 1>&6
 
   if test "$ac_cv_install_d_creates_dirs" = no ; then
     echo $ac_n "checking whether \"mkdir -p\" creates intermediate directories""... $ac_c" 1>&6
-echo "configure:1470: checking whether \"mkdir -p\" creates intermediate directories" >&5
+echo "configure:1480: checking whether \"mkdir -p\" creates intermediate directories" >&5
 if eval "test \"`echo '$''{'ac_cv_mkdir_p_creates_dirs'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1486,7 +1496,7 @@ echo "$ac_t""$ac_cv_mkdir_p_creates_dirs" 1>&6
   fi
 
 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:1501: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "configure:1511: 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
@@ -1515,12 +1525,12 @@ fi
 
 # random libc stuff
 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:1530: checking for ANSI C header files" >&5
+echo "configure:1540: 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 1535 "configure"
+#line 1545 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 #include <stdarg.h>
@@ -1528,7 +1538,7 @@ else
 #include <float.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1543: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1553: \"$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*
@@ -1545,7 +1555,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 1560 "configure"
+#line 1570 "configure"
 #include "confdefs.h"
 #include <string.h>
 EOF
@@ -1563,7 +1573,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 1578 "configure"
+#line 1588 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 EOF
@@ -1584,7 +1594,7 @@ if test "$cross_compiling" = yes; then
   :
 else
   cat > conftest.$ac_ext <<EOF
-#line 1599 "configure"
+#line 1609 "configure"
 #include "confdefs.h"
 #include <ctype.h>
 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -1595,7 +1605,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
 exit (0); }
 
 EOF
-if { (eval echo configure:1610: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1620: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   :
 else
@@ -1622,17 +1632,17 @@ for ac_hdr in unistd.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1637: checking for $ac_hdr" >&5
+echo "configure:1647: 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 1642 "configure"
+#line 1652 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1647: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1657: \"$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*
@@ -1659,12 +1669,12 @@ fi
 done
 
 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
-echo "configure:1674: checking for mode_t" >&5
+echo "configure:1684: 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 1679 "configure"
+#line 1689 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -1692,12 +1702,12 @@ EOF
 fi
 
 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
-echo "configure:1707: checking for pid_t" >&5
+echo "configure:1717: 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 1712 "configure"
+#line 1722 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -1725,12 +1735,12 @@ EOF
 fi
 
 echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:1740: checking for size_t" >&5
+echo "configure:1750: 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 1745 "configure"
+#line 1755 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -1758,12 +1768,12 @@ EOF
 fi
 
 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
-echo "configure:1773: checking return type of signal handlers" >&5
+echo "configure:1783: 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 1778 "configure"
+#line 1788 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <signal.h>
@@ -1780,7 +1790,7 @@ int main() {
 int i;
 ; return 0; }
 EOF
-if { (eval echo configure:1795: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1805: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_type_signal=void
 else
@@ -1799,12 +1809,12 @@ EOF
 
 
 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
-echo "configure:1814: checking whether time.h and sys/time.h may both be included" >&5
+echo "configure:1824: 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 1819 "configure"
+#line 1829 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/time.h>
@@ -1813,7 +1823,7 @@ int main() {
 struct tm *tp;
 ; return 0; }
 EOF
-if { (eval echo configure:1828: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1838: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_header_time=yes
 else
@@ -1834,12 +1844,12 @@ EOF
 fi
 
 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
-echo "configure:1849: checking for sys/wait.h that is POSIX.1 compatible" >&5
+echo "configure:1859: 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 1854 "configure"
+#line 1864 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/wait.h>
@@ -1855,7 +1865,7 @@ wait (&s);
 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
 ; return 0; }
 EOF
-if { (eval echo configure:1870: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1880: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_header_sys_wait_h=yes
 else
@@ -1880,12 +1890,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:1895: checking for $ac_hdr that defines DIR" >&5
+echo "configure:1905: 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 1900 "configure"
+#line 1910 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <$ac_hdr>
@@ -1893,7 +1903,7 @@ int main() {
 DIR *dirp = 0;
 ; return 0; }
 EOF
-if { (eval echo configure:1908: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1918: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   eval "ac_cv_header_dirent_$ac_safe=yes"
 else
@@ -1918,7 +1928,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:1933: checking for opendir in -ldir" >&5
+echo "configure:1943: 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
@@ -1926,7 +1936,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-ldir  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1941 "configure"
+#line 1951 "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
@@ -1937,7 +1947,7 @@ int main() {
 opendir()
 ; return 0; }
 EOF
-if { (eval echo configure:1952: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1962: \"$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
@@ -1959,7 +1969,7 @@ fi
 
 else
 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
-echo "configure:1974: checking for opendir in -lx" >&5
+echo "configure:1984: 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
@@ -1967,7 +1977,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lx  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1982 "configure"
+#line 1992 "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
@@ -1978,7 +1988,7 @@ int main() {
 opendir()
 ; return 0; }
 EOF
-if { (eval echo configure:1993: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2003: \"$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
@@ -2001,12 +2011,12 @@ fi
 fi
 
 echo $ac_n "checking how to call gettimeofday""... $ac_c" 1>&6
-echo "configure:2016: checking how to call gettimeofday" >&5
+echo "configure:2026: 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 2021 "configure"
+#line 2031 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
                     #include <sys/time.h>
@@ -2015,7 +2025,7 @@ struct timeval tv; struct timezone tzp;
                     gettimeofday(&tv, &tzp);
 ; return 0; }
 EOF
-if { (eval echo configure:2030: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2040: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_gettimeofday_args=2
 else
@@ -2023,7 +2033,7 @@ else
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   cat > conftest.$ac_ext <<EOF
-#line 2038 "configure"
+#line 2048 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
                                     #include <sys/time.h>
@@ -2031,7 +2041,7 @@ int main() {
 struct timeval tv; gettimeofday(&tv);
 ; return 0; }
 EOF
-if { (eval echo configure:2046: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2056: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_gettimeofday_args=1
 else
@@ -2070,12 +2080,12 @@ EOF
 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:2085: checking for $ac_func" >&5
+echo "configure:2095: 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 2090 "configure"
+#line 2100 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -2098,7 +2108,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:2113: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2123: \"$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
@@ -2126,12 +2136,12 @@ done
 for ac_func in sigaction syslog realpath
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2141: checking for $ac_func" >&5
+echo "configure:2151: 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 2146 "configure"
+#line 2156 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -2154,7 +2164,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:2169: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2179: \"$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
@@ -2179,12 +2189,12 @@ fi
 done
 
 echo $ac_n "checking for struct icmp""... $ac_c" 1>&6
-echo "configure:2194: checking for struct icmp" >&5
+echo "configure:2204: checking for struct icmp" >&5
 if eval "test \"`echo '$''{'ac_cv_have_icmp'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2199 "configure"
+#line 2209 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
                    #include <stdio.h>
@@ -2216,10 +2226,15 @@ struct icmp i;
                    i.icmp_id = 0;
                    i.icmp_seq = 0;
                    si.sin_family = AF_INET;
+                   #if defined(__DECC) || defined(_IP_VHL)
+                   ip.ip_vhl = 0;
+                   #else
                    ip.ip_hl = 0;
+                   #endif
+                   
 ; return 0; }
 EOF
-if { (eval echo configure:2234: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2249: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_have_icmp=yes
 else
@@ -2239,12 +2254,12 @@ EOF
 
  fi
 echo $ac_n "checking for struct icmphdr""... $ac_c" 1>&6
-echo "configure:2254: checking for struct icmphdr" >&5
+echo "configure:2269: checking for struct icmphdr" >&5
 if eval "test \"`echo '$''{'ac_cv_have_icmphdr'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2259 "configure"
+#line 2274 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
                    #include <stdio.h>
@@ -2279,7 +2294,7 @@ struct icmphdr i;
                    ip.ip_hl = 0;
 ; return 0; }
 EOF
-if { (eval echo configure:2294: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2309: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_have_icmphdr=yes
 else
@@ -2302,17 +2317,17 @@ for ac_hdr in 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:2317: checking for $ac_hdr" >&5
+echo "configure:2332: 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 2322 "configure"
+#line 2337 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2327: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2342: \"$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*
@@ -2343,7 +2358,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:2358: checking for $ac_word" >&5
+echo "configure:2373: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2382,7 +2397,7 @@ done
     PERL_VERSION=0
   else
     echo $ac_n "checking perl version""... $ac_c" 1>&6
-echo "configure:2397: checking perl version" >&5
+echo "configure:2412: checking perl version" >&5
 if eval "test \"`echo '$''{'ac_cv_perl_version'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2404,7 +2419,7 @@ fi
 # Uses ac_ vars as temps to allow command line to override cache and checks.
 # --without-x overrides everything else, but does not touch the cache.
 echo $ac_n "checking for X""... $ac_c" 1>&6
-echo "configure:2419: checking for X" >&5
+echo "configure:2434: checking for X" >&5
 
 # Check whether --with-x or --without-x was given.
 if test "${with_x+set}" = set; then
@@ -2466,12 +2481,12 @@ if test "$ac_x_includes" = NO; then
 
   # First, try using that file with no special directory specified.
 cat > conftest.$ac_ext <<EOF
-#line 2481 "configure"
+#line 2496 "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:2486: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2501: \"$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*
@@ -2540,14 +2555,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 2555 "configure"
+#line 2570 "configure"
 #include "confdefs.h"
 
 int main() {
 ${x_direct_test_function}()
 ; return 0; }
 EOF
-if { (eval echo configure:2562: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2577: \"$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.
@@ -2653,17 +2668,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:2668: checking whether -R must be followed by a space" >&5
+echo "configure:2683: 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 2671 "configure"
+#line 2686 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:2678: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2693: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_R_nospace=yes
 else
@@ -2679,14 +2694,14 @@ rm -f conftest*
       else
        LIBS="$ac_xsave_LIBS -R $x_libraries"
        cat > conftest.$ac_ext <<EOF
-#line 2694 "configure"
+#line 2709 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:2701: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_R_space=yes
 else
@@ -2718,7 +2733,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:2733: checking for dnet_ntoa in -ldnet" >&5
+echo "configure:2748: 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
@@ -2726,7 +2741,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-ldnet  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2741 "configure"
+#line 2756 "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
@@ -2737,7 +2752,7 @@ int main() {
 dnet_ntoa()
 ; return 0; }
 EOF
-if { (eval echo configure:2752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2767: \"$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
@@ -2759,7 +2774,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:2774: checking for dnet_ntoa in -ldnet_stub" >&5
+echo "configure:2789: 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
@@ -2767,7 +2782,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-ldnet_stub  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2782 "configure"
+#line 2797 "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
@@ -2778,7 +2793,7 @@ int main() {
 dnet_ntoa()
 ; return 0; }
 EOF
-if { (eval echo configure:2793: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2808: \"$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
@@ -2807,12 +2822,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:2822: checking for gethostbyname" >&5
+echo "configure:2837: 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 2827 "configure"
+#line 2842 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char gethostbyname(); below.  */
@@ -2835,7 +2850,7 @@ gethostbyname();
 
 ; return 0; }
 EOF
-if { (eval echo configure:2850: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2865: \"$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
@@ -2856,7 +2871,7 @@ fi
 
     if test $ac_cv_func_gethostbyname = no; then
       echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
-echo "configure:2871: checking for gethostbyname in -lnsl" >&5
+echo "configure:2886: 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
@@ -2864,7 +2879,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lnsl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2879 "configure"
+#line 2894 "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
@@ -2875,7 +2890,7 @@ int main() {
 gethostbyname()
 ; return 0; }
 EOF
-if { (eval echo configure:2890: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2905: \"$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
@@ -2905,12 +2920,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:2920: checking for connect" >&5
+echo "configure:2935: 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 2925 "configure"
+#line 2940 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char connect(); below.  */
@@ -2933,7 +2948,7 @@ connect();
 
 ; return 0; }
 EOF
-if { (eval echo configure:2948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2963: \"$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
@@ -2954,7 +2969,7 @@ fi
 
     if test $ac_cv_func_connect = no; then
       echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
-echo "configure:2969: checking for connect in -lsocket" >&5
+echo "configure:2984: 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
@@ -2962,7 +2977,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2977 "configure"
+#line 2992 "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
@@ -2973,7 +2988,7 @@ int main() {
 connect()
 ; return 0; }
 EOF
-if { (eval echo configure:2988: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3003: \"$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
@@ -2997,12 +3012,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:3012: checking for remove" >&5
+echo "configure:3027: 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 3017 "configure"
+#line 3032 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char remove(); below.  */
@@ -3025,7 +3040,7 @@ remove();
 
 ; return 0; }
 EOF
-if { (eval echo configure:3040: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3055: \"$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
@@ -3046,7 +3061,7 @@ fi
 
     if test $ac_cv_func_remove = no; then
       echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
-echo "configure:3061: checking for remove in -lposix" >&5
+echo "configure:3076: 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
@@ -3054,7 +3069,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lposix  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3069 "configure"
+#line 3084 "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
@@ -3065,7 +3080,7 @@ int main() {
 remove()
 ; return 0; }
 EOF
-if { (eval echo configure:3080: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3095: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3089,12 +3104,12 @@ fi
 
     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
     echo $ac_n "checking for shmat""... $ac_c" 1>&6
-echo "configure:3104: checking for shmat" >&5
+echo "configure:3119: 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 3109 "configure"
+#line 3124 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char shmat(); below.  */
@@ -3117,7 +3132,7 @@ shmat();
 
 ; return 0; }
 EOF
-if { (eval echo configure:3132: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3147: \"$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
@@ -3138,7 +3153,7 @@ fi
 
     if test $ac_cv_func_shmat = no; then
       echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
-echo "configure:3153: checking for shmat in -lipc" >&5
+echo "configure:3168: 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
@@ -3146,7 +3161,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lipc  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3161 "configure"
+#line 3176 "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
@@ -3157,7 +3172,7 @@ int main() {
 shmat()
 ; return 0; }
 EOF
-if { (eval echo configure:3172: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3187: \"$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
@@ -3190,7 +3205,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:3205: checking for IceConnectionNumber in -lICE" >&5
+echo "configure:3220: 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
@@ -3198,7 +3213,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3213 "configure"
+#line 3228 "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
@@ -3209,7 +3224,7 @@ int main() {
 IceConnectionNumber()
 ; return 0; }
 EOF
-if { (eval echo configure:3224: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3239: \"$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
@@ -3240,7 +3255,7 @@ fi
 
 
     echo $ac_n "checking for X app-defaults directory""... $ac_c" 1>&6
-echo "configure:3255: checking for X app-defaults directory" >&5
+echo "configure:3270: 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
@@ -3439,7 +3454,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:3454: checking for regcmp in -lgen" >&5
+echo "configure:3469: 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
@@ -3447,7 +3462,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lgen  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3462 "configure"
+#line 3477 "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
@@ -3458,7 +3473,7 @@ int main() {
 regcmp()
 ; return 0; }
 EOF
-if { (eval echo configure:3473: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3488: \"$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
@@ -3482,7 +3497,7 @@ fi
     ;;
   esac
 echo $ac_n "checking for XPointer""... $ac_c" 1>&6
-echo "configure:3497: checking for XPointer" >&5
+echo "configure:3512: checking for XPointer" >&5
 if eval "test \"`echo '$''{'ac_cv_xpointer'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3493,14 +3508,14 @@ else
   fi
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   cat > conftest.$ac_ext <<EOF
-#line 3508 "configure"
+#line 3523 "configure"
 #include "confdefs.h"
 #include <X11/Xlib.h>
 int main() {
 XPointer foo = (XPointer) 0;
 ; return 0; }
 EOF
-if { (eval echo configure:3515: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3530: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_xpointer=yes
 else
@@ -3538,17 +3553,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:3553: checking for X11/Xmu/Error.h" >&5
+echo "configure:3568: 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 3558 "configure"
+#line 3573 "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:3563: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3578: \"$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*
@@ -3599,7 +3614,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:3614: checking for the SunOS 4.1.x _get_wmShellWidgetClass bug" >&5
+echo "configure:3629: 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
@@ -3612,14 +3627,14 @@ else
                     # with X libraries because we know it's SunOS.
                     LDFLAGS="$LDFLAGS -lXmu -lXt -lX11 -lXext -lm"
                     cat > conftest.$ac_ext <<EOF
-#line 3627 "configure"
+#line 3642 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:3634: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3649: \"$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
@@ -3635,21 +3650,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:3650: checking whether the compiler understands -static" >&5
+echo "configure:3665: 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 3657 "configure"
+#line 3672 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:3664: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3679: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_cv_ld_static=yes
 else
@@ -3732,7 +3747,7 @@ fi
 
     /*)
      echo $ac_n "checking for SGI SCREEN_SAVER headers""... $ac_c" 1>&6
-echo "configure:3747: checking for SGI SCREEN_SAVER headers" >&5
+echo "configure:3762: checking for SGI SCREEN_SAVER headers" >&5
      d=$with_sgi/include
      if test -d $d; then
        X_CFLAGS="-I$d $X_CFLAGS"
@@ -3742,7 +3757,7 @@ echo "configure:3747: checking for SGI SCREEN_SAVER headers" >&5
      fi
 
      echo $ac_n "checking for SGI SCREEN_SAVER libs""... $ac_c" 1>&6
-echo "configure:3757: checking for SGI SCREEN_SAVER libs" >&5
+echo "configure:3772: checking for SGI SCREEN_SAVER libs" >&5
      d=$with_sgi/lib
      if test -d $d; then
        X_LIBS="-L$d $X_LIBS"
@@ -3775,17 +3790,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:3790: checking for X11/extensions/XScreenSaver.h" >&5
+echo "configure:3805: 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 3795 "configure"
+#line 3810 "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:3800: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3815: \"$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*
@@ -3842,7 +3857,7 @@ fi
 
     /*)
      echo $ac_n "checking for MIT-SCREEN-SAVER headers""... $ac_c" 1>&6
-echo "configure:3857: checking for MIT-SCREEN-SAVER headers" >&5
+echo "configure:3872: checking for MIT-SCREEN-SAVER headers" >&5
      d=$with_mit/include
      if test -d $d; then
        X_CFLAGS="-I$d $X_CFLAGS"
@@ -3852,7 +3867,7 @@ echo "configure:3857: checking for MIT-SCREEN-SAVER headers" >&5
      fi
 
      echo $ac_n "checking for MIT-SCREEN-SAVER libs""... $ac_c" 1>&6
-echo "configure:3867: checking for MIT-SCREEN-SAVER libs" >&5
+echo "configure:3882: checking for MIT-SCREEN-SAVER libs" >&5
      d=$with_mit/lib
      if test -d $d; then
        X_LIBS="-L$d $X_LIBS"
@@ -3885,17 +3900,17 @@ if test "$with_mit" = 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:3900: checking for X11/extensions/scrnsaver.h" >&5
+echo "configure:3915: 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 3905 "configure"
+#line 3920 "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:3910: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3925: \"$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*
@@ -3940,7 +3955,7 @@ fi
   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
 
   echo $ac_n "checking for XScreenSaverRegister in -lXext""... $ac_c" 1>&6
-echo "configure:3955: checking for XScreenSaverRegister in -lXext" >&5
+echo "configure:3970: 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
@@ -3948,7 +3963,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lXext -lm $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3963 "configure"
+#line 3978 "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
@@ -3959,7 +3974,7 @@ int main() {
 XScreenSaverRegister()
 ; return 0; }
 EOF
-if { (eval echo configure:3974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3989: \"$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
@@ -4006,7 +4021,7 @@ fi
   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
 
   echo $ac_n "checking for XScreenSaverRegister in -lXExExt""... $ac_c" 1>&6
-echo "configure:4021: checking for XScreenSaverRegister in -lXExExt" >&5
+echo "configure:4036: 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
@@ -4014,7 +4029,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lXExExt -lX11 -lXext -lm $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4029 "configure"
+#line 4044 "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
@@ -4025,7 +4040,7 @@ int main() {
 XScreenSaverRegister()
 ; return 0; }
 EOF
-if { (eval echo configure:4040: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4055: \"$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
@@ -4075,7 +4090,7 @@ fi
   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
 
   echo $ac_n "checking for XScreenSaverRegister in -lXss""... $ac_c" 1>&6
-echo "configure:4090: checking for XScreenSaverRegister in -lXss" >&5
+echo "configure:4105: 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
@@ -4083,7 +4098,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lXss -lX11 -lXext -lm $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4098 "configure"
+#line 4113 "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
@@ -4094,7 +4109,7 @@ int main() {
 XScreenSaverRegister()
 ; return 0; }
 EOF
-if { (eval echo configure:4109: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4124: \"$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
@@ -4160,7 +4175,7 @@ fi
 
     /*)
      echo $ac_n "checking for XIDLE headers""... $ac_c" 1>&6
-echo "configure:4175: checking for XIDLE headers" >&5
+echo "configure:4190: checking for XIDLE headers" >&5
      d=$with_xidle/include
      if test -d $d; then
        X_CFLAGS="-I$d $X_CFLAGS"
@@ -4170,7 +4185,7 @@ echo "configure:4175: checking for XIDLE headers" >&5
      fi
 
      echo $ac_n "checking for XIDLE libs""... $ac_c" 1>&6
-echo "configure:4185: checking for XIDLE libs" >&5
+echo "configure:4200: checking for XIDLE libs" >&5
      d=$with_xidle/lib
      if test -d $d; then
        X_LIBS="-L$d $X_LIBS"
@@ -4203,17 +4218,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:4218: checking for X11/extensions/xidle.h" >&5
+echo "configure:4233: 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 4223 "configure"
+#line 4238 "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:4228: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4243: \"$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*
@@ -4269,7 +4284,7 @@ fi
 
     /*)
      echo $ac_n "checking for SGI-VIDEO-CONTROL headers""... $ac_c" 1>&6
-echo "configure:4284: checking for SGI-VIDEO-CONTROL headers" >&5
+echo "configure:4299: checking for SGI-VIDEO-CONTROL headers" >&5
      d=$with_sgivc/include
      if test -d $d; then
        X_CFLAGS="-I$d $X_CFLAGS"
@@ -4279,7 +4294,7 @@ echo "configure:4284: checking for SGI-VIDEO-CONTROL headers" >&5
      fi
 
      echo $ac_n "checking for SGI-VIDEO-CONTROL libs""... $ac_c" 1>&6
-echo "configure:4294: checking for SGI-VIDEO-CONTROL libs" >&5
+echo "configure:4309: checking for SGI-VIDEO-CONTROL libs" >&5
      d=$with_sgivc/lib
      if test -d $d; then
        X_LIBS="-L$d $X_LIBS"
@@ -4314,17 +4329,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:4329: checking for X11/extensions/XSGIvc.h" >&5
+echo "configure:4344: 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 4334 "configure"
+#line 4349 "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:4339: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4354: \"$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*
@@ -4368,7 +4383,7 @@ fi
   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
 
   echo $ac_n "checking for XSGIvcQueryGammaMap in -lXsgivc""... $ac_c" 1>&6
-echo "configure:4383: checking for XSGIvcQueryGammaMap in -lXsgivc" >&5
+echo "configure:4398: 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
@@ -4376,7 +4391,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lXsgivc -lXext -lX11 $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4391 "configure"
+#line 4406 "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
@@ -4387,7 +4402,7 @@ int main() {
 XSGIvcQueryGammaMap()
 ; return 0; }
 EOF
-if { (eval echo configure:4402: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4417: \"$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
@@ -4452,7 +4467,7 @@ fi
 
     /*)
      echo $ac_n "checking for DPMS headers""... $ac_c" 1>&6
-echo "configure:4467: checking for DPMS headers" >&5
+echo "configure:4482: checking for DPMS headers" >&5
      d=$with_dpms/include
      if test -d $d; then
        X_CFLAGS="-I$d $X_CFLAGS"
@@ -4462,7 +4477,7 @@ echo "configure:4467: checking for DPMS headers" >&5
      fi
 
      echo $ac_n "checking for DPMS libs""... $ac_c" 1>&6
-echo "configure:4477: checking for DPMS libs" >&5
+echo "configure:4492: checking for DPMS libs" >&5
      d=$with_dpms/lib
      if test -d $d; then
        X_LIBS="-L$d $X_LIBS"
@@ -4497,17 +4512,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:4512: checking for X11/extensions/dpms.h" >&5
+echo "configure:4527: 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 4517 "configure"
+#line 4532 "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:4522: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4537: \"$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*
@@ -4553,7 +4568,7 @@ fi
   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
 
   echo $ac_n "checking for DPMSInfo in -lXext""... $ac_c" 1>&6
-echo "configure:4568: checking for DPMSInfo in -lXext" >&5
+echo "configure:4583: checking for DPMSInfo in -lXext" >&5
 ac_lib_var=`echo Xext'_'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
@@ -4561,7 +4576,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lXext -lXext -lX11 $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4576 "configure"
+#line 4591 "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
@@ -4572,7 +4587,7 @@ int main() {
 DPMSInfo()
 ; return 0; }
 EOF
-if { (eval echo configure:4587: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4602: \"$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
@@ -4618,7 +4633,7 @@ fi
   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
 
   echo $ac_n "checking for DPMSInfo in -lXdpms""... $ac_c" 1>&6
-echo "configure:4633: checking for DPMSInfo in -lXdpms" >&5
+echo "configure:4648: 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
@@ -4626,7 +4641,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lXdpms -lXext -lX11 $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4641 "configure"
+#line 4656 "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
@@ -4637,7 +4652,7 @@ int main() {
 DPMSInfo()
 ; return 0; }
 EOF
-if { (eval echo configure:4652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4667: \"$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
@@ -4704,7 +4719,7 @@ fi
 
     /*)
      echo $ac_n "checking for xf86vmode headers""... $ac_c" 1>&6
-echo "configure:4719: checking for xf86vmode headers" >&5
+echo "configure:4734: checking for xf86vmode headers" >&5
      d=$with_xf86vmode/include
      if test -d $d; then
        X_CFLAGS="-I$d $X_CFLAGS"
@@ -4714,7 +4729,7 @@ echo "configure:4719: checking for xf86vmode headers" >&5
      fi
 
      echo $ac_n "checking for xf86vmode libs""... $ac_c" 1>&6
-echo "configure:4729: checking for xf86vmode libs" >&5
+echo "configure:4744: checking for xf86vmode libs" >&5
      d=$with_xf86vmode/lib
      if test -d $d; then
        X_LIBS="-L$d $X_LIBS"
@@ -4749,17 +4764,17 @@ if test "$with_xf86vmode" = yes; then
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   ac_safe=`echo "X11/extensions/xf86vmode.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for X11/extensions/xf86vmode.h""... $ac_c" 1>&6
-echo "configure:4764: checking for X11/extensions/xf86vmode.h" >&5
+echo "configure:4779: checking for X11/extensions/xf86vmode.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 4769 "configure"
+#line 4784 "configure"
 #include "confdefs.h"
 #include <X11/extensions/xf86vmode.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4774: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4789: \"$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*
@@ -4803,7 +4818,7 @@ fi
   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
 
   echo $ac_n "checking for XF86VidModeGetViewPort in -lXxf86vm""... $ac_c" 1>&6
-echo "configure:4818: checking for XF86VidModeGetViewPort in -lXxf86vm" >&5
+echo "configure:4833: checking for XF86VidModeGetViewPort in -lXxf86vm" >&5
 ac_lib_var=`echo Xxf86vm'_'XF86VidModeGetViewPort | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -4811,7 +4826,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4826 "configure"
+#line 4841 "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
@@ -4822,7 +4837,7 @@ int main() {
 XF86VidModeGetViewPort()
 ; return 0; }
 EOF
-if { (eval echo configure:4837: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4852: \"$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
@@ -4876,7 +4891,7 @@ fi
   fi
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   cat > conftest.$ac_ext <<EOF
-#line 4891 "configure"
+#line 4906 "configure"
 #include "confdefs.h"
 #include <X11/XHPlib.h>
 EOF
@@ -4914,7 +4929,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:4929: checking whether /proc/interrupts contains keyboard data" >&5
+echo "configure:4944: 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
@@ -5047,7 +5062,7 @@ fi
 
     /*)
      echo $ac_n "checking for PAM headers""... $ac_c" 1>&6
-echo "configure:5062: checking for PAM headers" >&5
+echo "configure:5077: checking for PAM headers" >&5
      d=$with_pam/include
      if test -d $d; then
        X_CFLAGS="-I$d $X_CFLAGS"
@@ -5057,7 +5072,7 @@ echo "configure:5062: checking for PAM headers" >&5
      fi
 
      echo $ac_n "checking for PAM libs""... $ac_c" 1>&6
-echo "configure:5072: checking for PAM libs" >&5
+echo "configure:5087: checking for PAM libs" >&5
      d=$with_pam/lib
      if test -d $d; then
        X_LIBS="-L$d $X_LIBS"
@@ -5083,7 +5098,7 @@ echo "configure:5072: checking for PAM libs" >&5
 
 if test "$enable_locking" = yes -a "$with_pam" = yes; then
   echo $ac_n "checking for PAM""... $ac_c" 1>&6
-echo "configure:5098: checking for PAM" >&5
+echo "configure:5113: checking for PAM" >&5
 if eval "test \"`echo '$''{'ac_cv_pam'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -5094,14 +5109,14 @@ else
   fi
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   cat > conftest.$ac_ext <<EOF
-#line 5109 "configure"
+#line 5124 "configure"
 #include "confdefs.h"
 #include <security/pam_appl.h>
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:5116: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5131: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_pam=yes
 else
@@ -5126,7 +5141,7 @@ EOF
     # libpam typically requires dlopen and dlsym.  On FreeBSD,
     # those are in libc.  On Linux and Solaris, they're in libdl.
     echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "configure:5141: checking for dlopen in -ldl" >&5
+echo "configure:5156: checking for dlopen in -ldl" >&5
 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -5134,7 +5149,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-ldl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 5149 "configure"
+#line 5164 "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
@@ -5145,7 +5160,7 @@ int main() {
 dlopen()
 ; return 0; }
 EOF
-if { (eval echo configure:5160: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5175: \"$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
@@ -5167,12 +5182,12 @@ fi
 
 
     echo $ac_n "checking how to call pam_strerror""... $ac_c" 1>&6
-echo "configure:5182: checking how to call pam_strerror" >&5
+echo "configure:5197: checking how to call pam_strerror" >&5
     if eval "test \"`echo '$''{'ac_cv_pam_strerror_args'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5187 "configure"
+#line 5202 "configure"
 #include "confdefs.h"
 #include <stdio.h>
                       #include <stdlib.h>
@@ -5182,7 +5197,7 @@ pam_handle_t *pamh = 0;
                       char *s = pam_strerror(pamh, PAM_SUCCESS);
 ; return 0; }
 EOF
-if { (eval echo configure:5197: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5212: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_pam_strerror_args=2
 else
@@ -5190,7 +5205,7 @@ else
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   cat > conftest.$ac_ext <<EOF
-#line 5205 "configure"
+#line 5220 "configure"
 #include "confdefs.h"
 #include <stdio.h>
                                       #include <stdlib.h>
@@ -5200,7 +5215,7 @@ char *s =
                                        pam_strerror(PAM_SUCCESS);
 ; return 0; }
 EOF
-if { (eval echo configure:5215: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5230: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_pam_strerror_args=1
 else
@@ -5257,7 +5272,7 @@ fi
 
     /*)
      echo $ac_n "checking for Kerberos headers""... $ac_c" 1>&6
-echo "configure:5272: checking for Kerberos headers" >&5
+echo "configure:5287: checking for Kerberos headers" >&5
      d=$with_kerberos/include
      if test -d $d; then
        X_CFLAGS="-I$d $X_CFLAGS"
@@ -5267,7 +5282,7 @@ echo "configure:5272: checking for Kerberos headers" >&5
      fi
 
      echo $ac_n "checking for Kerberos libs""... $ac_c" 1>&6
-echo "configure:5282: checking for Kerberos libs" >&5
+echo "configure:5297: checking for Kerberos libs" >&5
      d=$with_kerberos/lib
      if test -d $d; then
        X_LIBS="-L$d $X_LIBS"
@@ -5293,7 +5308,7 @@ echo "configure:5282: checking for Kerberos libs" >&5
 
 if test "$enable_locking" = yes -a "$with_kerberos" = yes; then
   echo $ac_n "checking for Kerberos 4""... $ac_c" 1>&6
-echo "configure:5308: checking for Kerberos 4" >&5
+echo "configure:5323: checking for Kerberos 4" >&5
 if eval "test \"`echo '$''{'ac_cv_kerberos'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -5304,14 +5319,14 @@ else
   fi
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   cat > conftest.$ac_ext <<EOF
-#line 5319 "configure"
+#line 5334 "configure"
 #include "confdefs.h"
 #include <krb.h>
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:5326: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5341: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_kerberos=yes
 else
@@ -5326,7 +5341,7 @@ fi
 
 echo "$ac_t""$ac_cv_kerberos" 1>&6
   echo $ac_n "checking for Kerberos 5""... $ac_c" 1>&6
-echo "configure:5341: checking for Kerberos 5" >&5
+echo "configure:5356: checking for Kerberos 5" >&5
 if eval "test \"`echo '$''{'ac_cv_kerberos5'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -5337,14 +5352,14 @@ else
   fi
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   cat > conftest.$ac_ext <<EOF
-#line 5352 "configure"
+#line 5367 "configure"
 #include "confdefs.h"
 #include <kerberosIV/krb.h>
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:5359: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5374: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_kerberos5=yes
 else
@@ -5391,12 +5406,12 @@ EOF
 
   if test "$have_kerberos" = yes ; then
     echo $ac_n "checking for res_search""... $ac_c" 1>&6
-echo "configure:5406: checking for res_search" >&5
+echo "configure:5421: 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 5411 "configure"
+#line 5426 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char res_search(); below.  */
@@ -5419,7 +5434,7 @@ res_search();
 
 ; return 0; }
 EOF
-if { (eval echo configure:5434: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5449: \"$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
@@ -5437,7 +5452,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:5452: checking for res_search in -lresolv" >&5
+echo "configure:5467: 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
@@ -5445,7 +5460,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lresolv  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 5460 "configure"
+#line 5475 "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
@@ -5456,7 +5471,7 @@ int main() {
 res_search()
 ; return 0; }
 EOF
-if { (eval echo configure:5471: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5486: \"$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
@@ -5511,7 +5526,7 @@ fi
 
     /*)
      echo $ac_n "checking for shadow password headers""... $ac_c" 1>&6
-echo "configure:5526: checking for shadow password headers" >&5
+echo "configure:5541: checking for shadow password headers" >&5
      d=$with_shadow/include
      if test -d $d; then
        X_CFLAGS="-I$d $X_CFLAGS"
@@ -5521,7 +5536,7 @@ echo "configure:5526: checking for shadow password headers" >&5
      fi
 
      echo $ac_n "checking for shadow password libs""... $ac_c" 1>&6
-echo "configure:5536: checking for shadow password libs" >&5
+echo "configure:5551: checking for shadow password libs" >&5
      d=$with_shadow/lib
      if test -d $d; then
        X_LIBS="-L$d $X_LIBS"
@@ -5559,7 +5574,7 @@ fi
 
 if test "$with_shadow" = yes ; then
   echo $ac_n "checking for Sun-style shadow passwords""... $ac_c" 1>&6
-echo "configure:5574: checking for Sun-style shadow passwords" >&5
+echo "configure:5589: 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
@@ -5570,7 +5585,7 @@ else
   fi
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   cat > conftest.$ac_ext <<EOF
-#line 5585 "configure"
+#line 5600 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
                                     #include <unistd.h>
@@ -5583,7 +5598,7 @@ struct passwd_adjunct *p = getpwanam("nobody");
                        const char *pw = p->pwa_passwd;
 ; return 0; }
 EOF
-if { (eval echo configure:5598: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5613: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_sun_adjunct=yes
 else
@@ -5613,7 +5628,7 @@ fi
 
 if test "$with_shadow" = yes ; then
   echo $ac_n "checking for DEC-style shadow passwords""... $ac_c" 1>&6
-echo "configure:5628: checking for DEC-style shadow passwords" >&5
+echo "configure:5643: 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
@@ -5624,7 +5639,7 @@ else
   fi
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   cat > conftest.$ac_ext <<EOF
-#line 5639 "configure"
+#line 5654 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
                                     #include <unistd.h>
@@ -5641,7 +5656,7 @@ struct pr_passwd *p;
                        pw = p->ufld.fd_encrypt;
 ; return 0; }
 EOF
-if { (eval echo configure:5656: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5671: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_enhanced_passwd=yes
 else
@@ -5665,7 +5680,7 @@ echo "$ac_t""$ac_cv_enhanced_passwd" 1>&6
     # But on DEC, it's in -lsecurity.
     #
     echo $ac_n "checking for getprpwnam in -lprot""... $ac_c" 1>&6
-echo "configure:5680: checking for getprpwnam in -lprot" >&5
+echo "configure:5695: 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
@@ -5673,7 +5688,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lprot -lx $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 5688 "configure"
+#line 5703 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -5684,7 +5699,7 @@ int main() {
 getprpwnam()
 ; return 0; }
 EOF
-if { (eval echo configure:5699: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5714: \"$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
@@ -5703,7 +5718,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 else
   echo "$ac_t""no" 1>&6
 echo $ac_n "checking for getprpwnam in -lsecurity""... $ac_c" 1>&6
-echo "configure:5718: checking for getprpwnam in -lsecurity" >&5
+echo "configure:5733: 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
@@ -5711,7 +5726,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lsecurity  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 5726 "configure"
+#line 5741 "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
@@ -5722,7 +5737,7 @@ int main() {
 getprpwnam()
 ; return 0; }
 EOF
-if { (eval echo configure:5737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5752: \"$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
@@ -5755,7 +5770,7 @@ fi
 
 if test "$with_shadow" = yes ; then
   echo $ac_n "checking for HP-style shadow passwords""... $ac_c" 1>&6
-echo "configure:5770: checking for HP-style shadow passwords" >&5
+echo "configure:5785: 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
@@ -5766,7 +5781,7 @@ else
   fi
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   cat > conftest.$ac_ext <<EOF
-#line 5781 "configure"
+#line 5796 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
                                     #include <unistd.h>
@@ -5779,7 +5794,7 @@ struct s_passwd *p = getspwnam("nobody");
                        const char *pw = p->pw_passwd;
 ; return 0; }
 EOF
-if { (eval echo configure:5794: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5809: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_hpux_passwd=yes
 else
@@ -5800,7 +5815,7 @@ echo "$ac_t""$ac_cv_hpux_passwd" 1>&6
 
     # on HPUX, bigcrypt is in -lsec
     echo $ac_n "checking for bigcrypt in -lsec""... $ac_c" 1>&6
-echo "configure:5815: checking for bigcrypt in -lsec" >&5
+echo "configure:5830: 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
@@ -5808,7 +5823,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lsec  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 5823 "configure"
+#line 5838 "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
@@ -5819,7 +5834,7 @@ int main() {
 bigcrypt()
 ; return 0; }
 EOF
-if { (eval echo configure:5834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5849: \"$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
@@ -5857,7 +5872,7 @@ fi
 
 if test "$with_shadow" = yes ; then
   echo $ac_n "checking for FreeBSD-style shadow passwords""... $ac_c" 1>&6
-echo "configure:5872: checking for FreeBSD-style shadow passwords" >&5
+echo "configure:5887: 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
@@ -5883,7 +5898,7 @@ fi
 
 if test "$with_shadow" = yes ; then
   echo $ac_n "checking for generic shadow passwords""... $ac_c" 1>&6
-echo "configure:5898: checking for generic shadow passwords" >&5
+echo "configure:5913: 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
@@ -5894,7 +5909,7 @@ else
   fi
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   cat > conftest.$ac_ext <<EOF
-#line 5909 "configure"
+#line 5924 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
                                     #include <unistd.h>
@@ -5906,7 +5921,7 @@ struct spwd *p = getspnam("nobody");
                        const char *pw = p->sp_pwdp;
 ; return 0; }
 EOF
-if { (eval echo configure:5921: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5936: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_shadow=yes
 else
@@ -5927,7 +5942,7 @@ echo "$ac_t""$ac_cv_shadow" 1>&6
     # 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:5942: checking for getspnam in -lc" >&5
+echo "configure:5957: 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
@@ -5935,7 +5950,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lc  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 5950 "configure"
+#line 5965 "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
@@ -5946,7 +5961,7 @@ int main() {
 getspnam()
 ; return 0; }
 EOF
-if { (eval echo configure:5961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5976: \"$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
@@ -5968,7 +5983,7 @@ fi
 
     if test "$have_getspnam" = no ; then
       echo $ac_n "checking for getspnam in -lgen""... $ac_c" 1>&6
-echo "configure:5983: checking for getspnam in -lgen" >&5
+echo "configure:5998: 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
@@ -5976,7 +5991,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lgen  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 5991 "configure"
+#line 6006 "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
@@ -5987,7 +6002,7 @@ int main() {
 getspnam()
 ; return 0; }
 EOF
-if { (eval echo configure:6002: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6017: \"$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
@@ -6023,7 +6038,7 @@ if test "$enable_locking" = yes ; then
   # 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:6038: checking for crypt in -lc" >&5
+echo "configure:6053: 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
@@ -6031,7 +6046,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lc  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 6046 "configure"
+#line 6061 "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
@@ -6042,7 +6057,7 @@ int main() {
 crypt()
 ; return 0; }
 EOF
-if { (eval echo configure:6057: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6072: \"$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
@@ -6064,7 +6079,7 @@ fi
 
   if test "$have_crypt" = no ; then
     echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
-echo "configure:6079: checking for crypt in -lcrypt" >&5
+echo "configure:6094: 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
@@ -6072,7 +6087,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lcrypt  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 6087 "configure"
+#line 6102 "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
@@ -6083,7 +6098,7 @@ int main() {
 crypt()
 ; return 0; }
 EOF
-if { (eval echo configure:6098: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6113: \"$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
@@ -6167,7 +6182,7 @@ fi
 
     /*)
      echo $ac_n "checking for Motif headers""... $ac_c" 1>&6
-echo "configure:6182: checking for Motif headers" >&5
+echo "configure:6197: checking for Motif headers" >&5
      d=$with_motif/include
      if test -d $d; then
        X_CFLAGS="-I$d $X_CFLAGS"
@@ -6177,7 +6192,7 @@ echo "configure:6182: checking for Motif headers" >&5
      fi
 
      echo $ac_n "checking for Motif libs""... $ac_c" 1>&6
-echo "configure:6192: checking for Motif libs" >&5
+echo "configure:6207: checking for Motif libs" >&5
      d=$with_motif/lib
      if test -d $d; then
        X_LIBS="-L$d $X_LIBS"
@@ -6216,17 +6231,17 @@ if test "$with_motif" = yes; then
   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:6231: checking for Xm/Xm.h" >&5
+echo "configure:6246: 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 6236 "configure"
+#line 6251 "configure"
 #include "confdefs.h"
 #include <Xm/Xm.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6241: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6256: \"$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*
@@ -6265,17 +6280,17 @@ if test "$have_motif" = yes; then
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   ac_safe=`echo "Xm/ComboBox.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for Xm/ComboBox.h""... $ac_c" 1>&6
-echo "configure:6280: checking for Xm/ComboBox.h" >&5
+echo "configure:6295: checking for Xm/ComboBox.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 6285 "configure"
+#line 6300 "configure"
 #include "confdefs.h"
 #include <Xm/ComboBox.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6290: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6305: \"$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*
@@ -6338,7 +6353,7 @@ esac
 
     /*)
      echo $ac_n "checking for Gtk headers""... $ac_c" 1>&6
-echo "configure:6353: checking for Gtk headers" >&5
+echo "configure:6368: checking for Gtk headers" >&5
      d=$with_gtk/include
      if test -d $d; then
        X_CFLAGS="-I$d $X_CFLAGS"
@@ -6348,7 +6363,7 @@ echo "configure:6353: checking for Gtk headers" >&5
      fi
 
      echo $ac_n "checking for Gtk libs""... $ac_c" 1>&6
-echo "configure:6363: checking for Gtk libs" >&5
+echo "configure:6378: checking for Gtk libs" >&5
      d=$with_gtk/lib
      if test -d $d; then
        X_LIBS="-L$d $X_LIBS"
@@ -6406,7 +6421,7 @@ esac
 
     /*)
      echo $ac_n "checking for Gnome headers""... $ac_c" 1>&6
-echo "configure:6421: checking for Gnome headers" >&5
+echo "configure:6436: checking for Gnome headers" >&5
      d=$with_gnome/include
      if test -d $d; then
        X_CFLAGS="-I$d $X_CFLAGS"
@@ -6416,7 +6431,7 @@ echo "configure:6421: checking for Gnome headers" >&5
      fi
 
      echo $ac_n "checking for Gnome libs""... $ac_c" 1>&6
-echo "configure:6431: checking for Gnome libs" >&5
+echo "configure:6446: checking for Gnome libs" >&5
      d=$with_gnome/lib
      if test -d $d; then
        X_LIBS="-L$d $X_LIBS"
@@ -6472,7 +6487,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:6487: checking for $ac_word" >&5
+echo "configure:6502: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_glib_config'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -6512,7 +6527,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:6527: checking for $ac_word" >&5
+echo "configure:6542: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_gtk_config'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -6554,7 +6569,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:6569: checking for $ac_word" >&5
+echo "configure:6584: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_gnome_config'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -6600,7 +6615,7 @@ done
 
   if test "$have_gtk" = yes; then
     echo $ac_n "checking Gtk version number""... $ac_c" 1>&6
-echo "configure:6615: checking Gtk version number" >&5
+echo "configure:6630: checking Gtk version number" >&5
 if eval "test \"`echo '$''{'ac_cv_gtk_version_string'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -6629,7 +6644,7 @@ echo "$ac_t""$ac_cv_gtk_version_string" 1>&6
 
   if test "$have_gtk" = yes; then
     echo $ac_n "checking for Gtk includes""... $ac_c" 1>&6
-echo "configure:6644: checking for Gtk includes" >&5
+echo "configure:6659: checking for Gtk includes" >&5
 if eval "test \"`echo '$''{'ac_cv_gtk_config_cflags'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -6638,7 +6653,7 @@ fi
 
 echo "$ac_t""$ac_cv_gtk_config_cflags" 1>&6
     echo $ac_n "checking for Gtk libs""... $ac_c" 1>&6
-echo "configure:6653: checking for Gtk libs" >&5
+echo "configure:6668: checking for Gtk libs" >&5
 if eval "test \"`echo '$''{'ac_cv_gtk_config_libs'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -6655,7 +6670,7 @@ echo "$ac_t""$ac_cv_gtk_config_libs" 1>&6
   if test "$have_gnome" = yes -a "$have_gtk" = yes; then
     gnome_config_libs="capplet gnomeui"
     echo $ac_n "checking for Gnome capplet includes""... $ac_c" 1>&6
-echo "configure:6670: checking for Gnome capplet includes" >&5
+echo "configure:6685: checking for Gnome capplet includes" >&5
     if eval "test \"`echo '$''{'ac_cv_gnome_config_cflags'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -6678,7 +6693,7 @@ fi
 
   if test "$have_gnome" = yes -a "$have_gtk" = yes; then
     echo $ac_n "checking for Gnome capplet libs""... $ac_c" 1>&6
-echo "configure:6693: checking for Gnome capplet libs" >&5
+echo "configure:6708: checking for Gnome capplet libs" >&5
     if eval "test \"`echo '$''{'ac_cv_gnome_config_libs'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -6739,7 +6754,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:6754: checking whether Motif is really LessTif" >&5
+echo "configure:6769: 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
@@ -6750,14 +6765,14 @@ else
   fi
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   cat > conftest.$ac_ext <<EOF
-#line 6765 "configure"
+#line 6780 "configure"
 #include "confdefs.h"
 #include <Xm/Xm.h>
 int main() {
 long vers = LesstifVersion;
 ; return 0; }
 EOF
-if { (eval echo configure:6772: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6787: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_have_lesstif=yes
 else
@@ -6782,7 +6797,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:6797: checking LessTif version number" >&5
+echo "configure:6812: 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
@@ -6797,7 +6812,7 @@ else
                      ac_cv_lesstif_version_string=unknown
 else
   cat > conftest.$ac_ext <<EOF
-#line 6812 "configure"
+#line 6827 "configure"
 #include "confdefs.h"
 #include <stdio.h>
                      #include <Xm/Xm.h>
@@ -6810,7 +6825,7 @@ else
                        exit(0);
                      }
 EOF
-if { (eval echo configure:6825: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:6840: \"$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/ .*//'`
@@ -6840,7 +6855,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:6855: checking Motif version number" >&5
+echo "configure:6870: 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
@@ -6855,7 +6870,7 @@ else
                      ac_cv_motif_version_string=unknown
 else
   cat > conftest.$ac_ext <<EOF
-#line 6870 "configure"
+#line 6885 "configure"
 #include "confdefs.h"
 #include <stdio.h>
                      #include <Xm/Xm.h>
@@ -6868,7 +6883,7 @@ else
                        exit(0);
                      }
 EOF
-if { (eval echo configure:6883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:6898: \"$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/ .*//'`
@@ -6912,7 +6927,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:6927: checking whether Motif requires XPM" >&5
+echo "configure:6942: checking whether Motif requires XPM" >&5
    if test "$motif_version" = "unknown" || test "$motif_version" -ge 2000
    then
      motif_requires_xpm=yes
@@ -6954,7 +6969,7 @@ if test "$have_motif" = yes ; then
   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
 
   echo $ac_n "checking for XpQueryExtension in -lXp""... $ac_c" 1>&6
-echo "configure:6969: checking for XpQueryExtension in -lXp" >&5
+echo "configure:6984: 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
@@ -6962,7 +6977,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lXp -lX11 -lXext -lm $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 6977 "configure"
+#line 6992 "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
@@ -6973,7 +6988,7 @@ int main() {
 XpQueryExtension()
 ; return 0; }
 EOF
-if { (eval echo configure:6988: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7003: \"$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
@@ -7027,7 +7042,7 @@ if test "$have_motif" = yes ; then
   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
 
   echo $ac_n "checking for _Xsetlocale in -lXintl""... $ac_c" 1>&6
-echo "configure:7042: checking for _Xsetlocale in -lXintl" >&5
+echo "configure:7057: 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
@@ -7035,7 +7050,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lXintl -lX11 -lXext -lm $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 7050 "configure"
+#line 7065 "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
@@ -7046,7 +7061,7 @@ int main() {
 _Xsetlocale()
 ; return 0; }
 EOF
-if { (eval echo configure:7061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7076: \"$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
@@ -7103,7 +7118,7 @@ fi
 
     /*)
      echo $ac_n "checking for GL headers""... $ac_c" 1>&6
-echo "configure:7118: checking for GL headers" >&5
+echo "configure:7133: checking for GL headers" >&5
      d=$with_gl/include
      if test -d $d; then
        X_CFLAGS="-I$d $X_CFLAGS"
@@ -7113,7 +7128,7 @@ echo "configure:7118: checking for GL headers" >&5
      fi
 
      echo $ac_n "checking for GL libs""... $ac_c" 1>&6
-echo "configure:7128: checking for GL libs" >&5
+echo "configure:7143: checking for GL libs" >&5
      d=$with_gl/lib
      if test -d $d; then
        X_LIBS="-L$d $X_LIBS"
@@ -7149,17 +7164,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:7164: checking for GL/gl.h" >&5
+echo "configure:7179: 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 7169 "configure"
+#line 7184 "configure"
 #include "confdefs.h"
 #include <GL/gl.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7174: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7189: \"$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*
@@ -7190,17 +7205,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:7205: checking for GL/glx.h" >&5
+echo "configure:7220: 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 7210 "configure"
+#line 7225 "configure"
 #include "confdefs.h"
 #include <GL/glx.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7215: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7230: \"$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*
@@ -7232,7 +7247,7 @@ fi
     # to link against.
     #
     echo $ac_n "checking whether GL is really MesaGL""... $ac_c" 1>&6
-echo "configure:7247: checking whether GL is really MesaGL" >&5
+echo "configure:7262: 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
@@ -7244,7 +7259,7 @@ else
   fi
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   cat > conftest.$ac_ext <<EOF
-#line 7259 "configure"
+#line 7274 "configure"
 #include "confdefs.h"
 #include <GL/glx.h>
 EOF
@@ -7273,7 +7288,7 @@ echo "$ac_t""$ac_cv_have_mesa_gl" 1>&6
     #
     if test "$ac_have_mesa_gl" = yes; then
       echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
-echo "configure:7288: checking for pthread_create in -lpthread" >&5
+echo "configure:7303: 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
@@ -7281,7 +7296,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lpthread  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 7296 "configure"
+#line 7311 "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
@@ -7292,7 +7307,7 @@ int main() {
 pthread_create()
 ; return 0; }
 EOF
-if { (eval echo configure:7307: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7322: \"$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
@@ -7339,7 +7354,7 @@ fi
   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
 
   echo $ac_n "checking for glXCreateContext in -lMesaGL""... $ac_c" 1>&6
-echo "configure:7354: checking for glXCreateContext in -lMesaGL" >&5
+echo "configure:7369: checking for glXCreateContext in -lMesaGL" >&5
 ac_lib_var=`echo MesaGL'_'glXCreateContext | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -7347,7 +7362,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lMesaGL -lMesaGLU $GL_LIBS -lX11 -lXext -lm $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 7362 "configure"
+#line 7377 "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
@@ -7358,7 +7373,7 @@ int main() {
 glXCreateContext()
 ; return 0; }
 EOF
-if { (eval echo configure:7373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7388: \"$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
@@ -7404,7 +7419,7 @@ fi
   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
 
   echo $ac_n "checking for glXCreateContext in -lGL""... $ac_c" 1>&6
-echo "configure:7419: checking for glXCreateContext in -lGL" >&5
+echo "configure:7434: checking for glXCreateContext in -lGL" >&5
 ac_lib_var=`echo GL'_'glXCreateContext | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -7412,7 +7427,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lGL -lGLU $GL_LIBS -lX11 -lXext -lm $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 7427 "configure"
+#line 7442 "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
@@ -7423,7 +7438,7 @@ int main() {
 glXCreateContext()
 ; return 0; }
 EOF
-if { (eval echo configure:7438: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7453: \"$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
@@ -7481,12 +7496,12 @@ EOF
     if test "$ac_have_mesa_gl" = yes; then
 
       echo $ac_n "checking MesaGL version number""... $ac_c" 1>&6
-echo "configure:7496: checking MesaGL version number" >&5
+echo "configure:7511: 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 7501 "configure"
+#line 7516 "configure"
 #include "confdefs.h"
 #include <GL/gl.h>
 #ifndef MESA_MAJOR_VERSION
@@ -7557,7 +7572,7 @@ echo "$ac_t""$ac_cv_mesagl_version_string" 1>&6
   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
 
   echo $ac_n "checking for glBindTexture in -l$gl_lib_1""... $ac_c" 1>&6
-echo "configure:7572: checking for glBindTexture in -l$gl_lib_1" >&5
+echo "configure:7587: 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
@@ -7565,7 +7580,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-l$gl_lib_1 $GL_LIBS -lX11 -lXext -lm $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 7580 "configure"
+#line 7595 "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
@@ -7576,7 +7591,7 @@ int main() {
 glBindTexture()
 ; return 0; }
 EOF
-if { (eval echo configure:7591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7606: \"$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
@@ -7637,7 +7652,7 @@ fi
 
     /*)
      echo $ac_n "checking for GLE headers""... $ac_c" 1>&6
-echo "configure:7652: checking for GLE headers" >&5
+echo "configure:7667: checking for GLE headers" >&5
      d=$with_gle/include
      if test -d $d; then
        X_CFLAGS="-I$d $X_CFLAGS"
@@ -7647,7 +7662,7 @@ echo "configure:7652: checking for GLE headers" >&5
      fi
 
      echo $ac_n "checking for GLE libs""... $ac_c" 1>&6
-echo "configure:7662: checking for GLE libs" >&5
+echo "configure:7677: checking for GLE libs" >&5
      d=$with_gle/lib
      if test -d $d; then
        X_LIBS="-L$d $X_LIBS"
@@ -7683,17 +7698,17 @@ if test "$with_gle" = yes; then
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   ac_safe=`echo "GL/gle.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for GL/gle.h""... $ac_c" 1>&6
-echo "configure:7698: checking for GL/gle.h" >&5
+echo "configure:7713: checking for GL/gle.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 7703 "configure"
+#line 7718 "configure"
 #include "confdefs.h"
 #include <GL/gle.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7708: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7723: \"$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*
@@ -7726,17 +7741,17 @@ fi
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   ac_safe=`echo "GL/gutil.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for GL/gutil.h""... $ac_c" 1>&6
-echo "configure:7741: checking for GL/gutil.h" >&5
+echo "configure:7756: checking for GL/gutil.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 7746 "configure"
+#line 7761 "configure"
 #include "confdefs.h"
 #include <GL/gutil.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7751: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7766: \"$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*
@@ -7767,17 +7782,17 @@ fi
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   ac_safe=`echo "GL/tube.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for GL/tube.h""... $ac_c" 1>&6
-echo "configure:7782: checking for GL/tube.h" >&5
+echo "configure:7797: checking for GL/tube.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 7787 "configure"
+#line 7802 "configure"
 #include "confdefs.h"
 #include <GL/tube.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7792: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7807: \"$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*
@@ -7823,7 +7838,7 @@ fi
   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
 
   echo $ac_n "checking for gleCreateGC in -lgle""... $ac_c" 1>&6
-echo "configure:7838: checking for gleCreateGC in -lgle" >&5
+echo "configure:7853: checking for gleCreateGC in -lgle" >&5
 ac_lib_var=`echo gle'_'gleCreateGC | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -7831,7 +7846,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lgle $GL_LIBS -lX11 -lXext -lm $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 7846 "configure"
+#line 7861 "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
@@ -7842,7 +7857,7 @@ int main() {
 gleCreateGC()
 ; return 0; }
 EOF
-if { (eval echo configure:7857: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7872: \"$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
@@ -7902,7 +7917,7 @@ fi
   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
 
   echo $ac_n "checking for uview_direction in -lgle""... $ac_c" 1>&6
-echo "configure:7917: checking for uview_direction in -lgle" >&5
+echo "configure:7932: checking for uview_direction in -lgle" >&5
 ac_lib_var=`echo gle'_'uview_direction | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -7910,7 +7925,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lgle $GL_LIBS -lX11 -lXext -lm $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 7925 "configure"
+#line 7940 "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
@@ -7921,7 +7936,7 @@ int main() {
 uview_direction()
 ; return 0; }
 EOF
-if { (eval echo configure:7936: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7951: \"$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
@@ -7966,7 +7981,7 @@ fi
   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
 
   echo $ac_n "checking for uview_direction_d in -lmatrix""... $ac_c" 1>&6
-echo "configure:7981: checking for uview_direction_d in -lmatrix" >&5
+echo "configure:7996: checking for uview_direction_d in -lmatrix" >&5
 ac_lib_var=`echo matrix'_'uview_direction_d | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -7974,7 +7989,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lmatrix $GL_LIBS -lX11 -lXext -lm $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 7989 "configure"
+#line 8004 "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
@@ -7985,7 +8000,7 @@ int main() {
 uview_direction_d()
 ; return 0; }
 EOF
-if { (eval echo configure:8000: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8015: \"$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
@@ -8058,7 +8073,7 @@ fi
 
     /*)
      echo $ac_n "checking for XPM headers""... $ac_c" 1>&6
-echo "configure:8073: checking for XPM headers" >&5
+echo "configure:8088: checking for XPM headers" >&5
      d=$with_xpm/include
      if test -d $d; then
        X_CFLAGS="-I$d $X_CFLAGS"
@@ -8068,7 +8083,7 @@ echo "configure:8073: checking for XPM headers" >&5
      fi
 
      echo $ac_n "checking for XPM libs""... $ac_c" 1>&6
-echo "configure:8083: checking for XPM libs" >&5
+echo "configure:8098: checking for XPM libs" >&5
      d=$with_xpm/lib
      if test -d $d; then
        X_LIBS="-L$d $X_LIBS"
@@ -8101,17 +8116,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:8116: checking for X11/xpm.h" >&5
+echo "configure:8131: 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 8121 "configure"
+#line 8136 "configure"
 #include "confdefs.h"
 #include <X11/xpm.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8126: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8141: \"$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*
@@ -8177,7 +8192,7 @@ fi
 
     /*)
      echo $ac_n "checking for XSHM headers""... $ac_c" 1>&6
-echo "configure:8192: checking for XSHM headers" >&5
+echo "configure:8207: checking for XSHM headers" >&5
      d=$with_xshm/include
      if test -d $d; then
        X_CFLAGS="-I$d $X_CFLAGS"
@@ -8187,7 +8202,7 @@ echo "configure:8192: checking for XSHM headers" >&5
      fi
 
      echo $ac_n "checking for XSHM libs""... $ac_c" 1>&6
-echo "configure:8202: checking for XSHM libs" >&5
+echo "configure:8217: checking for XSHM libs" >&5
      d=$with_xshm/lib
      if test -d $d; then
        X_LIBS="-L$d $X_LIBS"
@@ -8222,17 +8237,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:8237: checking for X11/extensions/XShm.h" >&5
+echo "configure:8252: 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 8242 "configure"
+#line 8257 "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:8247: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8262: \"$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*
@@ -8266,17 +8281,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:8281: checking for sys/ipc.h" >&5
+echo "configure:8296: 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 8286 "configure"
+#line 8301 "configure"
 #include "confdefs.h"
 #include <sys/ipc.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8291: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8306: \"$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*
@@ -8311,17 +8326,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:8326: checking for sys/shm.h" >&5
+echo "configure:8341: 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 8331 "configure"
+#line 8346 "configure"
 #include "confdefs.h"
 #include <sys/shm.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8336: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8351: \"$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*
@@ -8373,7 +8388,7 @@ fi
   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
 
   echo $ac_n "checking for XShmQueryExtension in -lXextSam""... $ac_c" 1>&6
-echo "configure:8388: checking for XShmQueryExtension in -lXextSam" >&5
+echo "configure:8403: 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
@@ -8381,7 +8396,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lXextSam -lX11 -lXext -lm $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 8396 "configure"
+#line 8411 "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
@@ -8392,7 +8407,7 @@ int main() {
 XShmQueryExtension()
 ; return 0; }
 EOF
-if { (eval echo configure:8407: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8422: \"$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
@@ -8459,7 +8474,7 @@ fi
 
     /*)
      echo $ac_n "checking for DOUBLE-BUFFER headers""... $ac_c" 1>&6
-echo "configure:8474: checking for DOUBLE-BUFFER headers" >&5
+echo "configure:8489: checking for DOUBLE-BUFFER headers" >&5
      d=$with_xdbe/include
      if test -d $d; then
        X_CFLAGS="-I$d $X_CFLAGS"
@@ -8469,7 +8484,7 @@ echo "configure:8474: checking for DOUBLE-BUFFER headers" >&5
      fi
 
      echo $ac_n "checking for DOUBLE-BUFFER libs""... $ac_c" 1>&6
-echo "configure:8484: checking for DOUBLE-BUFFER libs" >&5
+echo "configure:8499: checking for DOUBLE-BUFFER libs" >&5
      d=$with_xdbe/lib
      if test -d $d; then
        X_LIBS="-L$d $X_LIBS"
@@ -8503,17 +8518,17 @@ if test "$with_xdbe" = yes; then
   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:8518: checking for X11/extensions/Xdbe.h" >&5
+echo "configure:8533: 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 8523 "configure"
+#line 8538 "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:8528: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8543: \"$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*
@@ -8576,7 +8591,7 @@ fi
 
     /*)
      echo $ac_n "checking for XReadDisplay headers""... $ac_c" 1>&6
-echo "configure:8591: checking for XReadDisplay headers" >&5
+echo "configure:8606: checking for XReadDisplay headers" >&5
      d=$with_readdisplay/include
      if test -d $d; then
        X_CFLAGS="-I$d $X_CFLAGS"
@@ -8586,7 +8601,7 @@ echo "configure:8591: checking for XReadDisplay headers" >&5
      fi
 
      echo $ac_n "checking for XReadDisplay libs""... $ac_c" 1>&6
-echo "configure:8601: checking for XReadDisplay libs" >&5
+echo "configure:8616: checking for XReadDisplay libs" >&5
      d=$with_readdisplay/lib
      if test -d $d; then
        X_LIBS="-L$d $X_LIBS"
@@ -8619,17 +8634,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:8634: checking for X11/extensions/readdisplay.h" >&5
+echo "configure:8649: 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 8639 "configure"
+#line 8654 "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:8644: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8659: \"$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*
@@ -8684,7 +8699,7 @@ fi
 
     /*)
      echo $ac_n "checking for Iris Video headers""... $ac_c" 1>&6
-echo "configure:8699: checking for Iris Video headers" >&5
+echo "configure:8714: checking for Iris Video headers" >&5
      d=$with_sgivideo/include
      if test -d $d; then
        X_CFLAGS="-I$d $X_CFLAGS"
@@ -8694,7 +8709,7 @@ echo "configure:8699: checking for Iris Video headers" >&5
      fi
 
      echo $ac_n "checking for Iris Video libs""... $ac_c" 1>&6
-echo "configure:8709: checking for Iris Video libs" >&5
+echo "configure:8724: checking for Iris Video libs" >&5
      d=$with_sgivideo/lib
      if test -d $d; then
        X_LIBS="-L$d $X_LIBS"
@@ -8727,17 +8742,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:8742: checking for dmedia/vl.h" >&5
+echo "configure:8757: 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 8747 "configure"
+#line 8762 "configure"
 #include "confdefs.h"
 #include <dmedia/vl.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8752: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8767: \"$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*
@@ -8762,7 +8777,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:8777: checking for vlOpenVideo in -lvl" >&5
+echo "configure:8792: 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
@@ -8770,7 +8785,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lvl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 8785 "configure"
+#line 8800 "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
@@ -8781,7 +8796,7 @@ int main() {
 vlOpenVideo()
 ; return 0; }
 EOF
-if { (eval echo configure:8796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8811: \"$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
@@ -8852,7 +8867,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:8867: checking for $with_zippy_req" >&5
+echo "configure:8882: checking for $with_zippy_req" >&5
       if test -x "$with_zippy_req" ; then
         echo "$ac_t""yes" 1>&6
       else
@@ -8866,7 +8881,7 @@ echo "configure:8867: 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:8881: checking for $ac_word" >&5
+echo "configure:8896: 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
@@ -8916,7 +8931,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:8931: checking for $ac_word" >&5
+echo "configure:8946: 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
@@ -8950,7 +8965,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:8965: checking for $ac_word" >&5
+echo "configure:8980: 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
@@ -8985,7 +9000,7 @@ done
 
   if test -n "$emacs_exe" ; then
     echo $ac_n "checking for emacs yow""... $ac_c" 1>&6
-echo "configure:9000: checking for emacs yow" >&5
+echo "configure:9015: checking for emacs yow" >&5
     #
     # get emacs to tell us where the libexec directory is.
     #
@@ -9007,7 +9022,7 @@ echo "configure:9000: 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:9022: checking for xemacs yow" >&5
+echo "configure:9037: checking for xemacs yow" >&5
     if test -n "$xemacs_exe" ; then
       #
       # get xemacs to tell us where the libexec directory is.
@@ -9066,7 +9081,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:9081: checking for $ac_word" >&5
+echo "configure:9096: 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
@@ -9102,7 +9117,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:9117: checking for $ac_word" >&5
+echo "configure:9132: 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
index 8dae53f587149f56cf2d4f86ca746c7bb564b881..5e95dd60ec3c8faae440e967128eb3806a74e24d 100644 (file)
@@ -112,14 +112,24 @@ AC_DEFUN(AC_NO_CPLUSPLUS_COMMENTS_IN_C_CODE,
  [if test -n "$GCC"; then
    AC_GCC_ACCEPTS_STD
    AC_MSG_RESULT(Disabling C++ comments in ANSI C code.)
+   #
+   # The reason that // comments are banned from xscreensaver is that gcc is
+   # basically the only compiler in the world that supports them in C code.
+   # All other vendors support them only in their C++ compilers, not in their
+   # ANSI C compilers.  This means that it's a portability problem: every time
+   # these comments have snuck into the xscreensaver source code, I've gotten
+   # complaints about it the next day.  So we turn off support for them in gcc
+   # as well to prevent them from accidentially slipping in.
+   #
    if test "$ac_gcc_accepts_std" = yes ; then
      #
      # -std=c89 defines __STRICT_ANSI__, which we don't want.
      # (That appears to be the only additional preprocessor symbol
      # it defines, in addition to the syntax changes it makes.)
      #
-     # -std=gnu89 is no good, because // comments were a GNU
-     # extension before they were in the ANSI C 99 spec...
+     # -std=gnu89 is no good, because // comments were a GNU extension
+     # before they were in the ANSI C 99 spec...  (gcc 2.96 permits //
+     # with -std=gnu89 but not with -std=c89.)
      #
      CC="$CC -std=c89 -U__STRICT_ANSI__"
    else
@@ -295,7 +305,12 @@ AC_DEFUN(AC_CHECK_ICMP,
                    i.icmp_id = 0;
                    i.icmp_seq = 0;
                    si.sin_family = AF_INET;
-                   ip.ip_hl = 0;],
+                   #if defined(__DECC) || defined(_IP_VHL)
+                   ip.ip_vhl = 0;
+                   #else
+                   ip.ip_hl = 0;
+                   #endif
+                   ],
                   [ac_cv_have_icmp=yes],
                   [ac_cv_have_icmp=no])])
  if test "$ac_cv_have_icmp" = yes ; then
index dee86900b69456efad9b80ba9264ec93f05844b7..cfcb366c6dba755412d5ef6fc532608792bf4f9d 100644 (file)
@@ -114,7 +114,7 @@ GL_SRCS             = @SAVER_GL_SRCS@
 GL_OBJS                = @SAVER_GL_OBJS@
 GL_LIBS                = @SAVER_GL_LIBS@
 
-LOGO           = $(UTILS_SRC)/logo.xpm
+LOGO           = $(UTILS_SRC)/logo-50.xpm
 DEMO_UTIL_SRCS = $(UTILS_SRC)/resources.c $(UTILS_SRC)/usleep.c \
                  $(UTILS_SRC)/visual.c
 DEMO_UTIL_OBJS = $(UTILS_BIN)/resources.o $(UTILS_BIN)/usleep.o \
@@ -747,8 +747,9 @@ demo-Gtk.o: $(UTILS_SRC)/resources.h
 demo-Gtk.o: $(UTILS_SRC)/visual.h
 demo-Gtk.o: $(srcdir)/remote.h
 demo-Gtk.o: $(UTILS_SRC)/usleep.h
+demo-Gtk.o: $(UTILS_SRC)/logo-50.xpm
+demo-Gtk.o: $(UTILS_SRC)/logo-180.xpm
 demo-Gtk.o: $(srcdir)/demo-Gtk-widgets.h
-demo-Gtk.o: $(UTILS_SRC)/logo.xpm
 demo-Gtk.o: XScreenSaver_ad.h
 demo-Gtk-widgets.o: ../config.h
 demo-Gtk-widgets.o: $(srcdir)/demo-Gtk-stubs.h
index 13e579499505d2a20d4337219aef60616e2c163e..b735da39fd0949d51cf9dc21c600481dc7eab2e6 100644 (file)
@@ -4,8 +4,8 @@
 !            a screen saver and locker for the X window system
 !                            by Jamie Zawinski
 !
-!                              version 3.28
-!                              02-Feb-2001
+!                              version 3.29
+!                              13-Feb-2001
 !
 ! See "man xscreensaver" for more info.  The latest version is always
 ! available at http://www.jwz.org/xscreensaver/
 - default-n:                   vidwhacker -root                            \n\
                                                                              \
 @GL_KLUDGE@ GL:                        gears -root                                 \n\
+@GL_KLUDGE@ GL:        "Gears (planetary)" gears -root -planetary                  \n\
 @GL_KLUDGE@ GL:                        superquadrics -root                         \n\
 @GL_KLUDGE@ GL:                        morph3d -root                               \n\
 @GL_KLUDGE@ GL:                        cage -root                                  \n\
 @GL_KLUDGE@ GL:                        gflux -root                                 \n\
 @GL_KLUDGE@ GL:                        stonerview -root                            \n\
 @GL_KLUDGE@ GL:                        starwars -root                              \n\
+@GL_KLUDGE@ GL:                        gltext -root                                \n\
                                                                              \
 -                              xdaliclock -root -builtin3 -cycle           \n\
 - default-n:                   xearth -nofork -nostars -ncolors 50           \
@@ -381,12 +383,12 @@ XScreenSaver.bourneShell:         /bin/sh
 *Dialog.Button.background:     #D0D0D0
 *Dialog.text.foreground:       #000000
 *Dialog.text.background:       #FFFFFF
-*Dialog.logo.foreground:       #FF0000
-*Dialog.logo.background:       #FFFFFF
+*passwd.thermometer.foreground:        #FF0000
+*passwd.thermometer.background:        #FFFFFF
 *Dialog.topShadowColor:                #E7E7E7
 *Dialog.bottomShadowColor:     #737373
-*Dialog.logo.width:            200
-*Dialog.logo.height:           200
+*Dialog.logo.width:            210
+*Dialog.logo.height:           210
 *Dialog.internalBorderWidth:   30
 *Dialog.borderWidth:           1
 *Dialog.shadowThickness:       4
@@ -1087,7 +1089,8 @@ By Rohit Singh.
 
 *hacks.nerverot.name: NerveRot
 *hacks.nerverot.documentation:                                          \
-Draws a rolling tube, composed of nervously vibrating squiggles.       \
+Draws different shapes composed of nervously vibrating squiggles,       \
+as if seen through a camera operated by a monkey on crack.              \
 By Dan Bornstein.
 
 *hacks.webcollage.name: WebCollage
@@ -1129,9 +1132,9 @@ they combine to form larger bubbles, which eventually pop.  Written       \
 by James Macnicol.
 
 *hacks.gears.documentation:                                            \
-This draws a set of turning, interlocking gears, rotating in three     \
-dimensions.  Another GL hack, by Danny Sung, Brian Paul, and Ed                \
-Mackey.
+This draws sets of turning, interlocking gears, rotating in three      \
+dimensions.  Another GL hack, by Danny Sung, Brian Paul, Ed Mackey,    \
+and Jamie Zawinski.
 
 *hacks.superquadrics.documentation:                                    \
 Ed Mackey reports that he wrote the first version of this program in   \
@@ -1248,6 +1251,11 @@ Draws a stream of text slowly scrolling into the distance at an      \
 angle, over a star field, like at the beginning of the movie of the  \
 same name.  Written by Jamie Zawinski and Claudio Matauoka.
 
+*hacks.gltext.name: GLText
+*hacks.gltext.documentation:                                         \
+Displays a few lines of text spinning around in a solid 3D font.     \
+Written by Jamie Zawinski.
+
 
 !=============================================================================
 !
index a793aed04645b9523271ed4a65273e9e52b6b828..6b69aade0c9915bf38fd4c7f29e0ab6a78a6b5df 100644 (file)
 - default-n:                   vidwhacker -root                            \\n\
                                                                              \
           GL:                  gears -root                                 \\n\
+          GL:  \"Gears (planetary)\" gears -root -planetary                \\n\
           GL:                  superquadrics -root                         \\n\
           GL:                  morph3d -root                               \\n\
           GL:                  cage -root                                  \\n\
           GL:                  gflux -root                                 \\n\
           GL:                  stonerview -root                            \\n\
           GL:                  starwars -root                              \\n\
+          GL:                  gltext -root                                \\n\
                                                                              \
 -                              xdaliclock -root -builtin3 -cycle           \\n\
 - default-n:                   xearth -nofork -nostars -ncolors 50           \
 "*Dialog.Button.background:    #D0D0D0",
 "*Dialog.text.foreground:      #000000",
 "*Dialog.text.background:      #FFFFFF",
-"*Dialog.logo.foreground:      #FF0000",
-"*Dialog.logo.background:      #FFFFFF",
+"*passwd.thermometer.foreground:       #FF0000",
+"*passwd.thermometer.background:       #FFFFFF",
 "*Dialog.topShadowColor:               #E7E7E7",
 "*Dialog.bottomShadowColor:    #737373",
-"*Dialog.logo.width:           200",
-"*Dialog.logo.height:          200",
+"*Dialog.logo.width:           210",
+"*Dialog.logo.height:          210",
 "*Dialog.internalBorderWidth:  30",
 "*Dialog.borderWidth:          1",
 "*Dialog.shadowThickness:      4",
@@ -802,7 +804,8 @@ Simulates that pen-in-nested-plastic-gears toy from your childhood.     \
 By Rohit Singh.",
 "*hacks.nerverot.name: NerveRot",
 "*hacks.nerverot.documentation:                                          \
-Draws a rolling tube, composed of nervously vibrating squiggles.       \
+Draws different shapes composed of nervously vibrating squiggles,       \
+as if seen through a camera operated by a monkey on crack.              \
 By Dan Bornstein.",
 "*hacks.webcollage.name: WebCollage",
 "*hacks.webcollage.documentation:                                      \
@@ -839,9 +842,9 @@ boils:small bubbles appear, and as they get closer to each other,   \
 they combine to form larger bubbles, which eventually pop.  Written    \
 by James Macnicol.",
 "*hacks.gears.documentation:                                           \
-This draws a set of turning, interlocking gears, rotating in three     \
-dimensions.  Another GL hack, by Danny Sung, Brian Paul, and Ed                \
-Mackey.",
+This draws sets of turning, interlocking gears, rotating in three      \
+dimensions.  Another GL hack, by Danny Sung, Brian Paul, Ed Mackey,    \
+and Jamie Zawinski.",
 "*hacks.superquadrics.documentation:                                   \
 Ed Mackey reports that he wrote the first version of this program in   \
 BASIC on a Commodore 64 in 1987, as a 320x200 black and white          \
@@ -935,6 +938,10 @@ screensaver.",
 Draws a stream of text slowly scrolling into the distance at an      \
 angle, over a star field, like at the beginning of the movie of the  \
 same name.  Written by Jamie Zawinski and Claudio Matauoka.",
+"*hacks.gltext.name: GLText",
+"*hacks.gltext.documentation:                                         \
+Displays a few lines of text spinning around in a solid 3D font.     \
+Written by Jamie Zawinski.",
 "*hacks.xdaliclock.name: XDaliClock",
 "*hacks.xdaliclock.documentation:                                      \
 XDaliClock draws a large digital clock, the numbers of which change by \
index 02995e08abb0da5910e95ff36eae9a92aad799d3..a94ff1bd06658fb851bb8cac4c10a6c26322d832 100644 (file)
@@ -70,6 +70,9 @@ extern Display *gdk_display;
 #include "remote.h"            /* for xscreensaver_command() */
 #include "usleep.h"
 
+#include "logo-50.xpm"
+#include "logo-180.xpm"
+
 #include "demo-Gtk-widgets.h"
 
 #include <stdio.h>
@@ -258,16 +261,19 @@ warning_dialog (GtkWidget *parent, const char *message,
       sprintf (name, "label%d", i++);
 
       {
-#if 0
-        char buf[255];
-#endif
         label = gtk_label_new (head);
-#if 0
-        sprintf (buf, "warning_dialog.%s.font", name);
-        GTK_WIDGET (label)->style = gtk_style_copy (GTK_WIDGET (label)->style);
-        GTK_WIDGET (label)->style->font =
-          gdk_font_load (get_string_resource (buf, "Dialog.Label.Font"));
-#endif
+
+        if (i == 1)
+          {
+            GTK_WIDGET (label)->style =
+              gtk_style_copy (GTK_WIDGET (label)->style);
+            GTK_WIDGET (label)->style->font =
+              gdk_font_load (get_string_resource("warning_dialog.headingFont",
+                                                 "Dialog.Font"));
+            gtk_widget_set_style (GTK_WIDGET (label),
+                                  GTK_WIDGET (label)->style);
+          }
+
         if (center <= 0)
           gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
         gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox),
@@ -425,20 +431,110 @@ paste_menu_cb (GtkMenuItem *menuitem, gpointer user_data)
 void
 about_menu_cb (GtkMenuItem *menuitem, gpointer user_data)
 {
-  char buf [2048];
-  char *s = strdup (screensaver_id + 4);
-  char *s2;
+  char msg [2048];
+  char *vers = strdup (screensaver_id + 4);
+  char *s;
+  char copy[1024];
+  char *desc = "For updates, check http://www.jwz.org/xscreensaver/";
+
+  s = strchr (vers, ',');
+  *s = 0;
+  s += 2;
+
+  sprintf(copy, "Copyright \251 1991-2001 %s", s);
 
-  s2 = strchr (s, ',');
-  *s2 = 0;
-  s2 += 2;
+  sprintf (msg, "%s\n\n%s", copy, desc);
 
-  sprintf (buf, "%s\n%s\n\n"
-           "For updates, check http://www.jwz.org/xscreensaver/",
-           s, s2);
-  free (s);
+  /* I can't make gnome_about_new() work here -- it starts dying in
+     gdk_imlib_get_visual() under gnome_about_new().  If this worked,
+     then this might be the thing to do:
 
-  warning_dialog (GTK_WIDGET (menuitem), buf, False, 100);
+     #ifdef HAVE_CRAPPLET
+     {
+       const gchar *auth[] = { 0 };
+       GtkWidget *about = gnome_about_new (progclass, vers, "", auth, desc,
+                                           "xscreensaver.xpm");
+       gtk_widget_show (about);
+     }
+     #else / * GTK but not GNOME * /
+      ...
+   */
+  {
+    GdkColormap *colormap;
+    GdkPixmap *gdkpixmap;
+    GdkBitmap *mask;
+
+    GtkWidget *dialog = gtk_dialog_new ();
+    GtkWidget *hbox, *icon, *vbox, *label1, *label2, *hb, *ok;
+    GtkWidget *parent = GTK_WIDGET (menuitem);
+    while (parent->parent)
+      parent = parent->parent;
+
+    hbox = gtk_hbox_new (FALSE, 20);
+    gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox),
+                        hbox, TRUE, TRUE, 0);
+
+    colormap = gtk_widget_get_colormap (parent);
+    gdkpixmap =
+      gdk_pixmap_colormap_create_from_xpm_d (NULL, colormap, &mask, NULL,
+                                             (gchar **) logo_180_xpm);
+    icon = gtk_pixmap_new (gdkpixmap, mask);
+    gtk_misc_set_padding (GTK_MISC (icon), 10, 10);
+
+    gtk_box_pack_start (GTK_BOX (hbox), icon, FALSE, FALSE, 0);
+
+    vbox = gtk_vbox_new (FALSE, 0);
+    gtk_box_pack_start (GTK_BOX (hbox), vbox, TRUE, TRUE, 0);
+
+    label1 = gtk_label_new (vers);
+    gtk_box_pack_start (GTK_BOX (vbox), label1, TRUE, TRUE, 0);
+    gtk_label_set_justify (GTK_LABEL (label1), GTK_JUSTIFY_LEFT);
+    gtk_misc_set_alignment (GTK_MISC (label1), 0.0, 0.75);
+
+    GTK_WIDGET (label1)->style = gtk_style_copy (GTK_WIDGET (label1)->style);
+    GTK_WIDGET (label1)->style->font =
+      gdk_font_load (get_string_resource ("about.headingFont","Dialog.Font"));
+    gtk_widget_set_style (GTK_WIDGET (label1), GTK_WIDGET (label1)->style);
+
+    label2 = gtk_label_new (msg);
+    gtk_box_pack_start (GTK_BOX (vbox), label2, TRUE, TRUE, 0);
+    gtk_label_set_justify (GTK_LABEL (label2), GTK_JUSTIFY_LEFT);
+    gtk_misc_set_alignment (GTK_MISC (label2), 0.0, 0.25);
+
+    GTK_WIDGET (label2)->style = gtk_style_copy (GTK_WIDGET (label2)->style);
+    GTK_WIDGET (label2)->style->font =
+      gdk_font_load (get_string_resource ("about.bodyFont","Dialog.Font"));
+    gtk_widget_set_style (GTK_WIDGET (label2), GTK_WIDGET (label2)->style);
+
+    hb = gtk_hbutton_box_new ();
+
+    gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->action_area),
+                        hb, TRUE, TRUE, 0);
+
+    ok = gtk_button_new_with_label ("OK");
+    gtk_container_add (GTK_CONTAINER (hb), ok);
+
+    gtk_window_set_position (GTK_WINDOW (dialog), GTK_WIN_POS_CENTER);
+    gtk_container_set_border_width (GTK_CONTAINER (dialog), 10);
+    gtk_window_set_title (GTK_WINDOW (dialog), progclass);
+
+    gtk_widget_show (hbox);
+    gtk_widget_show (icon);
+    gtk_widget_show (vbox);
+    gtk_widget_show (label1);
+    gtk_widget_show (label2);
+    gtk_widget_show (hb);
+    gtk_widget_show (ok);
+    gtk_widget_show (dialog);
+
+    gtk_signal_connect_object (GTK_OBJECT (ok), "clicked",
+                               GTK_SIGNAL_FUNC (warning_dialog_dismiss_cb),
+                               (gpointer) dialog);
+    gdk_window_set_transient_for (GTK_WIDGET (dialog)->window,
+                                  GTK_WIDGET (parent)->window);
+    gdk_window_show (GTK_WIDGET (dialog)->window);
+    gdk_window_raise (GTK_WIDGET (dialog)->window);
+  }
 }
 
 
@@ -1778,15 +1874,14 @@ maybe_reload_init_file (GtkWidget *widget, prefs_pair *pair)
 /* Setting window manager icon
  */
 
-#include "logo.xpm"
-
 static void
 init_icon (GdkWindow *window)
 {
   GdkBitmap *mask = 0;
   GdkColor transp;
   GdkPixmap *pixmap =
-    gdk_pixmap_create_from_xpm_d (window, &mask, &transp, logo_xpm);
+    gdk_pixmap_create_from_xpm_d (window, &mask, &transp,
+                                  (gchar **) logo_50_xpm);
   if (pixmap)
     gdk_window_set_icon (window, 0, pixmap, mask);
 }
index 2c766b55ed3291c8d3edd1e24c48cbf4f66ba590..d47c99a0d1d159ab0a0868f54abbf8f97c3d2399 100644 (file)
@@ -104,8 +104,8 @@ struct passwd_dialog_data {
   Pixel background;
   Pixel passwd_foreground;
   Pixel passwd_background;
-  Pixel logo_foreground;
-  Pixel logo_background;
+  Pixel thermo_foreground;
+  Pixel thermo_background;
   Pixel shadow_top;
   Pixel shadow_bottom;
 
@@ -121,6 +121,10 @@ struct passwd_dialog_data {
   Dimension thermo_field_x, thermo_field_y;
   Dimension thermo_field_height;
 
+  Pixmap logo_pixmap;
+  int logo_npixels;
+  unsigned long *logo_pixels;
+
   Pixmap save_under;
 };
 
@@ -218,12 +222,12 @@ make_passwd_window (saver_info *si)
   pw->passwd_background = get_pixel_resource ("passwd.text.background",
                                              "Dialog.Text.Background",
                                              si->dpy, cmap);
-  pw->logo_foreground = get_pixel_resource ("passwd.logo.foreground",
-                                           "Dialog.Logo.Foreground",
-                                           si->dpy, cmap);
-  pw->logo_background = get_pixel_resource ("passwd.logo.background",
-                                           "Dialog.Logo.Background",
-                                           si->dpy, cmap);
+  pw->thermo_foreground = get_pixel_resource ("passwd.thermometer.foreground",
+                                             "Dialog.Thermometer.Foreground",
+                                             si->dpy, cmap);
+  pw->thermo_background = get_pixel_resource ("passwd.thermometer.background",
+                                             "Dialog.Thermometer.Background",
+                                             si->dpy, cmap);
   pw->shadow_top = get_pixel_resource ("passwd.topShadowColor",
                                       "Dialog.Foreground",
                                       si->dpy, cmap);
@@ -353,6 +357,10 @@ make_passwd_window (saver_info *si)
                   attrmask, &attrs);
   XSetWindowBackground (si->dpy, si->passwd_dialog, pw->background);
 
+  pw->logo_pixmap = xscreensaver_logo (si->dpy, si->passwd_dialog, cmap,
+                                       pw->background, 
+                                       &pw->logo_pixels, &pw->logo_npixels,
+                                       True);
 
   /* Before mapping the window, save the bits that are underneath the
      rectangle the window will occlude.  When we lower the window, we
@@ -536,17 +544,39 @@ draw_passwd_window (saver_info *si)
   }
 
 
-  /* the logo
+  /* The logo
    */
   x1 = pw->shadow_width * 3;
   y1 = pw->shadow_width * 3;
   x2 = pw->logo_width - (pw->shadow_width * 6);
   y2 = pw->logo_height - (pw->shadow_width * 6);
 
-  draw_logo (si, si->passwd_dialog, x1, y1, x2, y2, True);
+  if (pw->logo_pixmap)
+    {
+      Window root;
+      int x, y;
+      unsigned int w, h, bw, d;
+      XGetGeometry (si->dpy, pw->logo_pixmap, &root, &x, &y, &w, &h, &bw, &d);
+      XSetForeground (si->dpy, gc1, pw->foreground);
+      XSetBackground (si->dpy, gc1, pw->background);
+      if (d == 1)
+        XCopyPlane (si->dpy, pw->logo_pixmap, si->passwd_dialog, gc1,
+                    0, 0, w, h,
+                    x1 + ((x2 - (int)w) / 2),
+                    y1 + ((y2 - (int)h) / 2),
+                    1);
+      else
+        XCopyArea (si->dpy, pw->logo_pixmap, si->passwd_dialog, gc1,
+                   0, 0, w, h,
+                   x1 + ((x2 - (int)w) / 2),
+                   y1 + ((y2 - (int)h) / 2));
+    }
 
   /* The thermometer
    */
+  XSetForeground (si->dpy, gc1, pw->thermo_foreground);
+  XSetForeground (si->dpy, gc2, pw->thermo_background);
+
   pw->thermo_field_x = pw->logo_width + pw->shadow_width;
   pw->thermo_field_y = pw->shadow_width * 3;
   pw->thermo_field_height = pw->height - (pw->shadow_width * 6);
@@ -666,7 +696,7 @@ update_passwd_window (saver_info *si, const char *printed_passwd, float ratio)
                      pw->thermo_field_y + 1,
                      pw->thermo_width-2,
                      y);
-      XSetForeground (si->dpy, gc1, pw->logo_foreground);
+      XSetForeground (si->dpy, gc1, pw->thermo_foreground);
       XFillRectangle (si->dpy, si->passwd_dialog, gc1,
                      pw->thermo_field_x + 1,
                      pw->thermo_field_y + 1 + y,
@@ -674,18 +704,6 @@ update_passwd_window (saver_info *si, const char *printed_passwd, float ratio)
                      MAX (0, pw->thermo_field_height - y - 2));
     }
 
-  /* the logo
-   */
-  {
-    int x1, y1, x2, y2;
-    x1 = pw->shadow_width * 3;
-    y1 = pw->shadow_width * 3;
-    x2 = pw->logo_width - (pw->shadow_width * 6);
-    y2 = pw->logo_height - (pw->shadow_width * 6);
-
-    draw_logo (si, si->passwd_dialog, x1, y1, x2, y2, False);
-  }
-
   XFreeGC (si->dpy, gc1);
   XFreeGC (si->dpy, gc2);
   XSync (si->dpy, False);
@@ -749,15 +767,22 @@ destroy_passwd_window (saver_info *si)
     XFreeColors (si->dpy, cmap, &pw->passwd_foreground, 1, 0L);
   if (pw->passwd_background != black && pw->passwd_background != white)
     XFreeColors (si->dpy, cmap, &pw->passwd_background, 1, 0L);
-  if (pw->logo_foreground != black && pw->logo_foreground != white)
-    XFreeColors (si->dpy, cmap, &pw->logo_foreground, 1, 0L);
-  if (pw->logo_background != black && pw->logo_background != white)
-    XFreeColors (si->dpy, cmap, &pw->logo_background, 1, 0L);
+  if (pw->thermo_foreground != black && pw->thermo_foreground != white)
+    XFreeColors (si->dpy, cmap, &pw->thermo_foreground, 1, 0L);
+  if (pw->thermo_background != black && pw->thermo_background != white)
+    XFreeColors (si->dpy, cmap, &pw->thermo_background, 1, 0L);
   if (pw->shadow_top != black && pw->shadow_top != white)
     XFreeColors (si->dpy, cmap, &pw->shadow_top, 1, 0L);
   if (pw->shadow_bottom != black && pw->shadow_bottom != white)
     XFreeColors (si->dpy, cmap, &pw->shadow_bottom, 1, 0L);
 
+  if (pw->logo_pixmap)
+    XFreePixmap (si->dpy, pw->logo_pixmap);
+  if (pw->logo_npixels && pw->logo_pixels)
+    XFreeColors (si->dpy, cmap, pw->logo_pixels, pw->logo_npixels, 0L);
+  if (pw->logo_pixels)
+    free (pw->logo_pixels);
+
   memset (pw, 0, sizeof(*pw));
   free (pw);
 
index b4dcf20c6efe0c9ad57319eb9f2d438f7231bbdb..d1daf2cd5259404ca6167fca280e6e302105b7b5 100644 (file)
@@ -125,8 +125,6 @@ struct splash_dialog_data {
   Pixel background;
   Pixel button_foreground;
   Pixel button_background;
-  Pixel logo_foreground;
-  Pixel logo_background;
   Pixel shadow_top;
   Pixel shadow_bottom;
 
@@ -140,6 +138,10 @@ struct splash_dialog_data {
   Dimension prefs_button_x, prefs_button_y;
   Dimension help_button_x, help_button_y;
 
+  Pixmap logo_pixmap;
+  int logo_npixels;
+  unsigned long *logo_pixels;
+
   int pressed;
 };
 
@@ -229,12 +231,6 @@ make_splash_dialog (saver_info *si)
   sp->button_background = get_pixel_resource ("splash.Button.background",
                                              "Dialog.Button.Background",
                                              si->dpy, cmap);
-  sp->logo_foreground = get_pixel_resource ("splash.logo.foreground",
-                                           "Dialog.Logo.Foreground",
-                                           si->dpy, cmap);
-  sp->logo_background = get_pixel_resource ("splash.logo.background",
-                                           "Dialog.Logo.Background",
-                                           si->dpy, cmap);
   sp->shadow_top = get_pixel_resource ("splash.topShadowColor",
                                       "Dialog.Foreground",
                                       si->dpy, cmap);
@@ -364,6 +360,11 @@ make_splash_dialog (saver_info *si)
                   attrmask, &attrs);
   XSetWindowBackground (si->dpy, si->splash_dialog, sp->background);
 
+  sp->logo_pixmap = xscreensaver_logo (si->dpy, si->splash_dialog, cmap,
+                                       sp->background, 
+                                       &sp->logo_pixels, &sp->logo_npixels,
+                                       True);
+
   XMapRaised (si->dpy, si->splash_dialog);
   XSync (si->dpy, False);
 
@@ -376,21 +377,6 @@ make_splash_dialog (saver_info *si)
   XSync (si->dpy, False);
 }
 
-void
-draw_logo (saver_info *si, Window win, int x, int y, int w, int h,
-           Bool first_time_p)
-{
-  Colormap cmap = DefaultColormapOfScreen (si->default_screen->screen);
-  Pixmap logo_map = XCreatePixmap (si->dpy, win, w, h, 
-                                   si->default_screen->current_depth);
-  XGCValues gcv;
-  GC gc = XCreateGC (si->dpy, win, 0, &gcv);
-  xscreensaver_logo (si->dpy, logo_map, cmap, !first_time_p);
-  XCopyArea (si->dpy, logo_map, win, gc, 0, 0, w, h, x, y);
-  XFreeGC (si->dpy, gc);
-  XFreePixmap (si->dpy, logo_map);
-}
-
 
 static void
 draw_splash_window (saver_info *si)
@@ -495,18 +481,37 @@ draw_splash_window (saver_info *si)
   sp->help_button_y = y1;
 
 
-  /* the logo
+  /* The logo
    */
-  XSetForeground (si->dpy, gc1, sp->logo_foreground);
-  XSetForeground (si->dpy, gc2, sp->logo_background);
-
   x1 = sp->shadow_width * 3;
   y1 = sp->shadow_width * 3;
   x2 = sp->logo_width - (sp->shadow_width * 6);
   y2 = sp->logo_height - (sp->shadow_width * 6);
 
-  draw_logo (si, si->splash_dialog, x1, y1, x2, y2, True);
+  if (sp->logo_pixmap)
+    {
+      Window root;
+      int x, y;
+      unsigned int w, h, bw, d;
+      XGetGeometry (si->dpy, sp->logo_pixmap, &root, &x, &y, &w, &h, &bw, &d);
+      XSetForeground (si->dpy, gc1, sp->foreground);
+      XSetBackground (si->dpy, gc1, sp->background);
+      if (d == 1)
+        XCopyPlane (si->dpy, sp->logo_pixmap, si->splash_dialog, gc1,
+                    0, 0, w, h,
+                    x1 + ((x2 - (int)w) / 2),
+                    y1 + ((y2 - (int)h) / 2),
+                    1);
+      else
+        XCopyArea (si->dpy, sp->logo_pixmap, si->splash_dialog, gc1,
+                   0, 0, w, h,
+                   x1 + ((x2 - (int)w) / 2),
+                   y1 + ((y2 - (int)h) / 2));
+    }
 
+  /* Solid border inside the logo box. */
+  XSetForeground (si->dpy, gc1, sp->foreground);
+  XDrawRectangle (si->dpy, si->splash_dialog, gc1, x1, y1, x2-1, y2-1);
 
   /* The shadow around the logo
    */
@@ -594,15 +599,18 @@ destroy_splash_window (saver_info *si)
     XFreeColors (si->dpy, cmap, &sp->button_foreground, 1, 0L);
   if (sp->button_background != black && sp->button_background != white)
     XFreeColors (si->dpy, cmap, &sp->button_background, 1, 0L);
-  if (sp->logo_foreground != black && sp->logo_foreground != white)
-    XFreeColors (si->dpy, cmap, &sp->logo_foreground, 1, 0L);
-  if (sp->logo_background != black && sp->logo_background != white)
-    XFreeColors (si->dpy, cmap, &sp->logo_background, 1, 0L);
   if (sp->shadow_top != black && sp->shadow_top != white)
     XFreeColors (si->dpy, cmap, &sp->shadow_top, 1, 0L);
   if (sp->shadow_bottom != black && sp->shadow_bottom != white)
     XFreeColors (si->dpy, cmap, &sp->shadow_bottom, 1, 0L);
 
+  if (sp->logo_pixmap)
+    XFreePixmap (si->dpy, sp->logo_pixmap);
+  if (sp->logo_npixels && sp->logo_pixels)
+    XFreeColors (si->dpy, cmap, sp->logo_pixels, sp->logo_npixels, 0L);
+  if (sp->logo_pixels)
+    free (sp->logo_pixels);
+
   memset (sp, 0, sizeof(*sp));
   free (sp);
 
index 514ebc0a022221071d6cc626b5005bf938603f62..2bf8599c8def3fb56244eb40fe418874917d12a1 100644 (file)
@@ -11,7 +11,7 @@
 .if n .sp 1
 .if t .sp .5
 ..
-.TH XScreenSaver 1 "02-Feb-2001 (3.28)" "X Version 11"
+.TH XScreenSaver 1 "13-Feb-2001 (3.29)" "X Version 11"
 .SH NAME
 xscreensaver-command - control a running xscreensaver process
 .SH SYNOPSIS
index 6355e385f3532011906eefc45f55d616f3a798db..c7fe54f56869d344ed72a1ed8a41bc3b82d57b9b 100644 (file)
@@ -11,7 +11,7 @@
 .if n .sp 1
 .if t .sp .5
 ..
-.TH XScreenSaver 1 "02-Feb-2001 (3.28)" "X Version 11"
+.TH XScreenSaver 1 "13-Feb-2001 (3.29)" "X Version 11"
 .SH NAME
 xscreensaver-demo - interactively control the background xscreensaver daemon
 .SH SYNOPSIS
index 0c190f55d52de255c46630b84b2cb488b7abd7e6..b6e27974160d3c92c86efa402f4e5308a7151b58 100644 (file)
@@ -342,9 +342,6 @@ extern int string_width (XFontStruct *font, char *s);
 
 extern void make_splash_dialog (saver_info *si);
 extern void handle_splash_event (saver_info *si, XEvent *e);
-extern void xscreensaver_logo (Display *,Drawable,Colormap, Bool next_frame_p);
-extern void draw_logo (saver_info *si, Window, int x, int y, int w, int h,
-                       Bool first_time_p);
 
 
 /* =======================================================================
index f53afb7dbd2ea59d7a3eeb87ba8e8d4986315ef0..c08ed63b26b783c2b9e22271973e4200f07e4ba9 100644 (file)
@@ -11,7 +11,7 @@
 .if n .sp 1
 .if t .sp .5
 ..
-.TH XScreenSaver 1 "02-Feb-2001 (3.28)" "X Version 11"
+.TH XScreenSaver 1 "13-Feb-2001 (3.29)" "X Version 11"
 .SH NAME
 xscreensaver - graphics hack and screen locker, launched when the user is idle
 .SH SYNOPSIS
index 354daf08419e9f066e6323863ce685051684ae13..2ed9296e5aa50fed2872c54a5dd9b6b965b8e2c4 100644 (file)
@@ -71,10 +71,6 @@ static const char sccsid[] = "@(#)flag.c     4.02 97/04/01 xlockmore";
 #endif /* !STANDALONE */
 
 
-#if defined(VMS) && !defined(HAVE_UNAME) && (__VMS_VER >= 70000000)
-# define HAVE_UNAME 1
-#endif
-
 #ifdef HAVE_UNAME
 # include <sys/utsname.h>
 #endif /* HAVE_UNAME */
index 82a8834b928c149b4cd7b71a478f943e0562809c..ed78d3ebb581464a4951868f07b16be751420052 100644 (file)
@@ -75,7 +75,8 @@ SRCS          = xscreensaver-gl-helper.c \
                  extrusion-helix4.c extrusion-joinoffset.c extrusion-screw.c \
                  extrusion-taper.c extrusion-twistoid.c sierpinski3d.c \
                  gflux.c stonerview.c stonerview-move.c stonerview-osc.c \
-                 stonerview-view.c starwars.c glut_stroke.c glut_swidth.c
+                 stonerview-view.c starwars.c glut_stroke.c glut_swidth.c \
+                 gltext.c
 
 OBJS           = xscreensaver-gl-helper.o \
                  atlantis.o b_draw.o b_lockglue.o b_sphere.o bubble3d.o \
@@ -88,11 +89,12 @@ OBJS                = xscreensaver-gl-helper.o \
                  extrusion-helix4.o extrusion-joinoffset.o extrusion-screw.o \
                  extrusion-taper.o extrusion-twistoid.o sierpinski3d.o \
                  gflux.o stonerview.o stonerview-move.o stonerview-osc.o \
-                 stonerview-view.o starwars.o glut_stroke.o glut_swidth.o
+                 stonerview-view.o starwars.o glut_stroke.o glut_swidth.o \
+                 gltext.o
 
 GL_EXES_1      = cage gears moebius pipes sproingies stairs superquadrics \
                  morph3d rubik atlantis lament bubble3d glplanet pulsar \
-                 sierpinski3d gflux stonerview starwars
+                 sierpinski3d gflux stonerview starwars gltext
 UTIL_EXES      = xscreensaver-gl-helper
 GL_EXES                = $(UTIL_EXES) $(GL_EXES_1)
 GLE_EXES       = extrusion
@@ -107,7 +109,8 @@ HACK_OBJS   = screenhack-gl.o xlock-gl.o $(HACK_BIN)/xlockmore.o \
 
 HDRS           = atlantis.h bubble3d.h buildlwo.h e_textures.h xpm-ximage.h \
                  stonerview-move.h stonerview-osc.h glutstroke.h glut_roman.h
-GL_MEN         = gflux.man lament.man starwars.man xscreensaver-gl-helper.man
+GL_MEN         = gflux.man lament.man starwars.man gltext.man \
+                 xscreensaver-gl-helper.man
 MEN            = @GL_MEN@
 EXTRAS         = README Makefile.in
 
@@ -339,6 +342,9 @@ SW_OBJS=starwars.o glut_stroke.o glut_swidth.o
 starwars:      $(SW_OBJS) $(HACK_OBJS)
        $(CC_HACK) -o $@ $(SW_OBJS) $(HACK_OBJS) $(HACK_LIBS)
 
+GLT_OBJS=gltext.o glut_stroke.o glut_swidth.o
+gltext:        $(GLT_OBJS) $(HACK_OBJS)
+       $(CC_HACK) -o $@ $(GLT_OBJS) $(HACK_OBJS) $(HACK_LIBS)
 
 # This one works differently (it's not xlock-like.)
 #
@@ -695,4 +701,18 @@ glut_stroke.o: ../../config.h
 glut_stroke.o: $(srcdir)/glutstroke.h
 glut_swidth.o: ../../config.h
 glut_swidth.o: $(srcdir)/glutstroke.h
+gltext.o: $(HACK_SRC)/xlockmore.h
+gltext.o: ../../config.h
+gltext.o: $(HACK_SRC)/xlockmoreI.h
+gltext.o: $(HACK_SRC)/screenhack.h
+gltext.o: $(UTILS_SRC)/yarandom.h
+gltext.o: $(UTILS_SRC)/usleep.h
+gltext.o: $(UTILS_SRC)/resources.h
+gltext.o: $(UTILS_SRC)/hsv.h
+gltext.o: $(UTILS_SRC)/colors.h
+gltext.o: $(UTILS_SRC)/grabscreen.h
+gltext.o: $(UTILS_SRC)/visual.h
+gltext.o: $(UTILS_SRC)/xshm.h
+gltext.o: $(srcdir)/glutstroke.h
+gltext.o: $(srcdir)/glut_roman.h
 
index 590d3f2172b4933b8999cf4ba0d119c8598fb0c1..00853dc6a09b81b86192bb1b9a39493795b58630 100644 (file)
@@ -102,9 +102,11 @@ static const char sccsid[] = "@(#)atlantis.c       1.3 98/06/18 xlockmore";
 # define PROGCLASS     "Atlantis"
 # define HACK_INIT     init_atlantis
 # define HACK_DRAW     draw_atlantis
+# define HACK_RESHAPE  reshape_atlantis
 # define atlantis_opts xlockmore_opts
 # define DEFAULTS      "*delay:       40000 \n" \
                         "*count:          4 \n" \
+                        "*showFPS:    False \n" \
                         "*cycles:       100 \n" \
                         "*size:        6000 \n" \
                         "*whalespeed:   250 \n"
@@ -238,8 +240,8 @@ Init(atlantisstruct * ap)
        glClearColor(0.0, fgreen, fblue, 0.0);
 }
 
-static void
-Reshape(ModeInfo * mi, int width, int height)
+void
+reshape_atlantis(ModeInfo * mi, int width, int height)
 {
        atlantisstruct *ap = &atlantis[MI_SCREEN(mi)];
 
@@ -357,7 +359,7 @@ init_atlantis(ModeInfo * mi)
        }
        if ((ap->glx_context = init_GL(mi)) != NULL) {
 
-               Reshape(mi, MI_WIDTH(mi), MI_HEIGHT(mi));
+               reshape_atlantis(mi, MI_WIDTH(mi), MI_HEIGHT(mi));
                glDrawBuffer(GL_BACK);
                Init(ap);
                AllDisplay(ap);
@@ -397,6 +399,7 @@ draw_atlantis(ModeInfo * mi)
 
         glPopMatrix();
 
+        if (mi->fps_p) do_fps (mi);
        glXSwapBuffers(display, window);
 }
 
index 7af0d628dd325bc4528ea6d02f5abba529a73f1a..fba029e441725c2f7c1adb326b8bf695cda43944 100644 (file)
@@ -49,9 +49,13 @@ struct glb_config glb_config =
 #ifdef STANDALONE
 #define PROGCLASS "Bubble3D"
 #define HACK_INIT init_bubble3d
+#define HACK_RESHAPE reshape_bubble3d
 #define HACK_DRAW draw_bubble3d
 #define bubble3d_opts xlockmore_opts
-# define DEFAULTS ""
+
+# define DEFAULTS      "*delay:        10000   \n"     \
+                       "*showFPS:      False   \n"
+
 #include "xlockmore.h"
 #else
 #include "xlock.h"
@@ -95,8 +99,8 @@ init(struct context *c)
        c->draw_context = glb_draw_init();
 }
 
-static void
-reshape(int w, int h)
+void
+reshape_bubble3d(ModeInfo *mi, int w, int h)
 {
        glViewport(0, 0, (GLsizei) w, (GLsizei) h);
        glMatrixMode(GL_PROJECTION);
@@ -131,7 +135,7 @@ init_bubble3d(ModeInfo * mi)
        c->glx_context = init_GL(mi);
        if (c->glx_context != 0) {
                init(c);
-               reshape(MI_WIDTH(mi), MI_HEIGHT(mi));
+               reshape_bubble3d(mi, MI_WIDTH(mi), MI_HEIGHT(mi));
                do_display(c);
                glFinish();
                glXSwapBuffers(display, window);
@@ -155,6 +159,7 @@ draw_bubble3d(ModeInfo * mi)
 
        do_display(c);
 
+        if (mi->fps_p) do_fps (mi);
        glFinish();
        glXSwapBuffers(display, window);
 }
index 27ea8030d65ff176af9e86268d9b56ab123c98ca..16bcfcf0c5aa7f80715a4fc2e07f526ebe5c0cdd 100644 (file)
@@ -82,9 +82,11 @@ static const char sccsid[] = "@(#)cage.c     4.07 98/01/04 xlockmore";
 # define PROGCLASS                     "Cage"
 # define HACK_INIT                     init_cage
 # define HACK_DRAW                     draw_cage
+# define HACK_RESHAPE                  reshape_cage
 # define cage_opts                     xlockmore_opts
 # define DEFAULTS                      "*cycles:               1       \n"                     \
                                                        "*delay:                20000   \n"                     \
+                                                       "*showFPS:      False   \n"                     \
                                                        "*wireframe:    False   \n"
 # include "xlockmore.h"                /* from the xscreensaver distribution */
 #else /* !STANDALONE */
@@ -292,8 +294,8 @@ draw_impossiblecage(cagestruct * cp)
        glPopMatrix();
 }
 
-static void
-reshape(ModeInfo * mi, int width, int height)
+void
+reshape_cage(ModeInfo * mi, int width, int height)
 {
        cagestruct *cp = &cage[MI_SCREEN(mi)];
 
@@ -372,7 +374,7 @@ init_cage(ModeInfo * mi)
 
        if ((cp->glx_context = init_GL(mi)) != NULL) {
 
-               reshape(mi, MI_WIDTH(mi), MI_HEIGHT(mi));
+               reshape_cage(mi, MI_WIDTH(mi), MI_HEIGHT(mi));
                glDrawBuffer(GL_BACK);
                if (!glIsList(objects))
                        objects = glGenLists(1);
@@ -417,6 +419,7 @@ draw_cage(ModeInfo * mi)
 
        glPopMatrix();
 
+    if (mi->fps_p) do_fps (mi);
        glFlush();
 
        glXSwapBuffers(display, window);
index 8537da38858e763d90a4996ca485faacebac7ab7..d1c8dbbb825e0838f56e219496615e3c53006f61 100644 (file)
 # define PROGCLASS                                             "Screensaver"
 # define HACK_INIT                                             init_screensaver
 # define HACK_DRAW                                             draw_screensaver
+# define HACK_RESHAPE                                  reshape_screensaver
 # define screensaver_opts                              xlockmore_opts
-#define        DEFAULTS                        "*light:                        True    \n" \
+#define        DEFAULTS                        "*delay:                        10000   \n" \
+                                                                               "*showFPS:              False   \n" \
+                                                                               "*light:                        True    \n" \
                                         "*wire:                                False   \n" \
                                         "*texture:                     False   \n" \
                                                                                "*image:                        BUILTIN \n" \
@@ -666,6 +669,7 @@ void draw_screensaver(ModeInfo * mi)
       dd_lasty *= scale;
     }
 
+  if (mi->fps_p) do_fps (mi);
   glXSwapBuffers(display, window);
 }
 
@@ -697,8 +701,8 @@ void resetProjection(void) {
 }
 
 /* Standard reshape function */
-static void
-reshape(int width, int height)
+void
+reshape_screensaver(ModeInfo *mi, int width, int height)
 {
   global_width=width;
   global_height=height;
@@ -736,12 +740,13 @@ void chooseScreensaverExample(void) {
 }
 
 /* main OpenGL initialization routine */
-void initializeGL(GLsizei width, GLsizei height) 
+void
+initializeGL(ModeInfo *mi, GLsizei width, GLsizei height) 
 {
   int style;
   int mode;
 
-  reshape(width, height);
+  reshape_screensaver(mi, width, height);
   glViewport( 0, 0, width, height ); 
 
   glEnable(GL_DEPTH_TEST);
@@ -791,8 +796,8 @@ void init_screensaver(ModeInfo * mi)
 
   gp->window = MI_WINDOW(mi);
   if ((gp->glx_context = init_GL(mi)) != NULL) {
-       reshape(MI_WIDTH(mi), MI_HEIGHT(mi));
-       initializeGL(MI_WIDTH(mi), MI_HEIGHT(mi));
+       reshape_screensaver(mi, MI_WIDTH(mi), MI_HEIGHT(mi));
+       initializeGL(mi, MI_WIDTH(mi), MI_HEIGHT(mi));
        chooseScreensaverExample();
   } else {
        MI_CLEARWINDOW(mi);
index 11403ac73de28339d8027ace469beec4b90b6de3..f97232bf4c624df34332a53ef32e3aa6a21a3890 100644 (file)
@@ -20,6 +20,7 @@ static const char sccsid[] = "@(#)gears.c     4.07 97/11/24 xlockmore";
  * other special, indirect and consequential damages.
  *
  * Revision History:
+ * 09-Feb-01: "Planetary" gear system added by jwz@jwz.org.
  * 10-May-97: Compatible with xscreensaver
  * 22-Mar-97: Added support for -mono mode, and monochrome X servers.
  *              Ed Mackey, emackey@netaxs.com
@@ -45,10 +46,13 @@ static const char sccsid[] = "@(#)gears.c   4.07 97/11/24 xlockmore";
 # define PROGCLASS                                     "Gears"
 # define HACK_INIT                                     init_gears
 # define HACK_DRAW                                     draw_gears
+# define HACK_RESHAPE                          reshape_gears
 # define gears_opts                                    xlockmore_opts
 # define DEFAULTS      "*count:                1       \n"                     \
                                        "*cycles:               2       \n"                     \
                                        "*delay:                20000   \n"                     \
+                                       "*planetary:    False   \n"                     \
+                                       "*showFPS:      False   \n"                     \
                                        "*wireframe:    False   \n"
 # include "xlockmore.h"                                /* from the xscreensaver distribution */
 #else  /* !STANDALONE */
@@ -57,8 +61,23 @@ static const char sccsid[] = "@(#)gears.c    4.07 97/11/24 xlockmore";
 
 #ifdef USE_GL
 
-ModeSpecOpt gears_opts =
-{0, NULL, 0, NULL, NULL};
+#undef countof
+#define countof(x) (sizeof((x))/sizeof((*x)))
+
+#define DEF_PLANETARY "False"
+
+static int planetary;
+
+static XrmOptionDescRec opts[] = {
+  {"-planetary", ".gears.planetary", XrmoptionNoArg, (caddr_t) "true" },
+  {"+planetary", ".gears.planetary", XrmoptionNoArg, (caddr_t) "false" },
+};
+
+static argtype vars[] = {
+  {(caddr_t *) &planetary, "planetary", "Planetary", DEF_PLANETARY, t_Bool},
+};
+
+ModeSpecOpt gears_opts = {countof(opts), opts, countof(vars), vars, NULL};
 
 #ifdef USE_MODULES
 ModStruct   gears_description =
@@ -70,14 +89,18 @@ ModStruct   gears_description =
 #endif
 
 typedef struct {
-       GLfloat     view_rotx, view_roty, view_rotz;
-       GLuint      gear1, gear2, gear3;
-       GLfloat     angle;
-       GLXContext *glx_context;
-       Window      window;
-#if 0
-       Window      win;
-#endif
+
+  GLfloat rotx, roty, rotz;       /* current object rotation */
+  GLfloat dx, dy, dz;             /* current rotational velocity */
+  GLfloat ddx, ddy, ddz;          /* current rotational acceleration */
+  GLfloat d_max;                          /* max velocity */
+
+  GLuint      gear1, gear2, gear3;
+  GLuint      gear_inner, gear_outer;
+  GLuint      armature;
+  GLfloat     angle;
+  GLXContext *glx_context;
+  Window      window;
 } gearsstruct;
 
 static gearsstruct *gears = NULL;
@@ -95,16 +118,27 @@ static gearsstruct *gears = NULL;
  */
 static void
 gear(GLfloat inner_radius, GLfloat outer_radius, GLfloat width,
-     GLint teeth, GLfloat tooth_depth, Bool wire)
+     GLint teeth, GLfloat tooth_depth, Bool wire, Bool invert)
 {
        GLint       i;
        GLfloat     r0, r1, r2;
        GLfloat     angle, da;
        GLfloat     u, v, len;
 
-       r0 = inner_radius;
-       r1 = outer_radius - tooth_depth / 2.0;
-       r2 = outer_radius + tooth_depth / 2.0;
+    if (!invert)
+      {
+        r0 = inner_radius;
+        r1 = outer_radius - tooth_depth / 2.0;
+        r2 = outer_radius + tooth_depth / 2.0;
+        glFrontFace(GL_CCW);
+      }
+    else
+      {
+        r0 = outer_radius;
+        r2 = inner_radius + tooth_depth / 2.0;
+        r1 = outer_radius - tooth_depth / 2.0;
+        glFrontFace(GL_CW);
+      }
 
        da = 2.0 * M_PI / teeth / 4.0;
 
@@ -211,30 +245,56 @@ gear(GLfloat inner_radius, GLfloat outer_radius, GLfloat width,
        /* draw outward faces of teeth */
        if (!wire)
                glBegin(GL_QUAD_STRIP);
-       for (i = 0; i < teeth; i++) {
+       for (i = 0; i <= teeth; i++) {
                angle = i * 2.0 * M_PI / teeth;
 
-               if (wire)
-                       glBegin(GL_LINES);
-               glVertex3f(r1 * cos(angle), r1 * sin(angle), width * 0.5);
-               glVertex3f(r1 * cos(angle), r1 * sin(angle), -width * 0.5);
-               u = r2 * cos(angle + da) - r1 * cos(angle);
-               v = r2 * sin(angle + da) - r1 * sin(angle);
+        if(!invert) {
+          u = r2 * cos(angle + da) - r1 * cos(angle);
+          v = r2 * sin(angle + da) - r1 * sin(angle);
+        } else {
+          u = r2 * cos(angle + da + M_PI/2) - r1 * cos(angle + M_PI/2);
+          v = r2 * sin(angle + da + M_PI/2) - r1 * sin(angle + M_PI/2);
+        }
+
                len = sqrt(u * u + v * v);
                u /= len;
                v /= len;
                glNormal3f(v, -u, 0.0);
+
+               if (wire)
+                       glBegin(GL_LINES);
+               glVertex3f(r1 * cos(angle), r1 * sin(angle), width * 0.5);
+               glVertex3f(r1 * cos(angle), r1 * sin(angle), -width * 0.5);
+
                glVertex3f(r2 * cos(angle + da), r2 * sin(angle + da), width * 0.5);
                glVertex3f(r2 * cos(angle + da), r2 * sin(angle + da), -width * 0.5);
-               glNormal3f(cos(angle), sin(angle), 0.0);
+
+        if(!invert)
+          glNormal3f(cos(angle), sin(angle), 0.0);
+        else
+          glNormal3f(cos(angle + M_PI/2), sin(angle + M_PI/2), 0.0);
+
                glVertex3f(r2 * cos(angle + 2 * da), r2 * sin(angle + 2 * da), width * 0.5);
                glVertex3f(r2 * cos(angle + 2 * da), r2 * sin(angle + 2 * da), -width * 0.5);
-               u = r1 * cos(angle + 3 * da) - r2 * cos(angle + 2 * da);
-               v = r1 * sin(angle + 3 * da) - r2 * sin(angle + 2 * da);
+
+        if(!invert) {
+          u = r1 * cos(angle + 3 * da) - r2 * cos(angle + 2 * da);
+          v = r1 * sin(angle + 3 * da) - r2 * sin(angle + 2 * da);
+        } else {
+          u = r1 * cos(angle + 3 * da + M_PI/2) - r2 * cos(angle + 2 * da + M_PI/2);
+          v = r1 * sin(angle + 3 * da + M_PI/2) - r2 * sin(angle + 2 * da + M_PI/2);
+        }
+
                glNormal3f(v, -u, 0.0);
+
                glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), width * 0.5);
                glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), -width * 0.5);
-               glNormal3f(cos(angle), sin(angle), 0.0);
+
+        if (!invert)
+          glNormal3f(cos(angle), sin(angle), 0.0);
+        else
+          glNormal3f(cos(angle + M_PI/2), sin(angle + M_PI/2), 0.0);
+
                if (wire)
                        glEnd();
        }
@@ -254,7 +314,12 @@ gear(GLfloat inner_radius, GLfloat outer_radius, GLfloat width,
                angle = i * 2.0 * M_PI / teeth;
                if (wire)
                        glBegin(GL_LINES);
-               glNormal3f(-cos(angle), -sin(angle), 0.0);
+
+        if (!invert)
+          glNormal3f(-cos(angle), -sin(angle), 0.0);
+        else
+          glNormal3f(cos(angle), sin(angle), 0.0);
+
                glVertex3f(r0 * cos(angle), r0 * sin(angle), -width * 0.5);
                glVertex3f(r0 * cos(angle), r0 * sin(angle), width * 0.5);
                if (wire) {
@@ -270,6 +335,155 @@ gear(GLfloat inner_radius, GLfloat outer_radius, GLfloat width,
 
 }
 
+
+
+static void
+tube(GLfloat radius, GLfloat width, GLint facets, Bool wire)
+{
+  GLint i;
+  GLfloat da = 2.0 * M_PI / facets / 4.0;
+
+  glFrontFace(GL_CCW);
+
+  /* draw bottom of tube */
+
+  glShadeModel(GL_FLAT);
+  glNormal3f(0, 0, 1);
+  if (!wire)
+    {
+      glBegin(GL_TRIANGLE_FAN);
+      glVertex3f(0, 0, width * 0.5);
+      for (i = 0; i <= facets; i++) {
+        GLfloat angle = i * 2.0 * M_PI / facets;
+        glVertex3f(radius * cos(angle), radius * sin(angle), width * 0.5);
+      }
+      glEnd();
+    }
+
+  /* draw top of tube */
+
+  glShadeModel(GL_FLAT);
+  glNormal3f(0, 0, -1);
+  glFrontFace(GL_CW);
+  if (!wire)
+    {
+      glBegin(GL_TRIANGLE_FAN);
+      glVertex3f(0, 0, -width * 0.5);
+      for (i = 0; i <= facets; i++) {
+        GLfloat angle = i * 2.0 * M_PI / facets;
+        glVertex3f(radius * cos(angle), radius * sin(angle), -width * 0.5);
+      }
+      glEnd();
+    }
+
+  /* draw side of tube */
+  glFrontFace(GL_CW);
+  glShadeModel(GL_SMOOTH);
+
+  if (!wire)
+    glBegin(GL_QUAD_STRIP);
+
+  for (i = 0; i <= facets; i++) {
+    GLfloat angle = i * 2.0 * M_PI / facets;
+    
+    if (wire)
+      glBegin(GL_LINES);
+
+    glNormal3f(cos(angle), sin(angle), 0.0);
+
+    glVertex3f(radius * cos(angle), radius * sin(angle), -width * 0.5);
+    glVertex3f(radius * cos(angle), radius * sin(angle), width * 0.5);
+
+    if (wire) {
+      glVertex3f(radius * cos(angle), radius * sin(angle), -width * 0.5);
+      glVertex3f(radius * cos(angle + 4 * da), radius * sin(angle + 4 * da), -width * 0.5);
+      glVertex3f(radius * cos(angle), radius * sin(angle), width * 0.5);
+      glVertex3f(radius * cos(angle + 4 * da), radius * sin(angle + 4 * da), width * 0.5);
+      glEnd();
+    }
+  }
+
+  if (!wire)
+    glEnd();
+
+  glFrontFace(GL_CCW);
+}
+
+
+static void
+arm(GLfloat length,
+    GLfloat width1, GLfloat height1,
+    GLfloat width2, GLfloat height2,
+    Bool wire)
+{
+  glShadeModel(GL_FLAT);
+
+#if 0  /* don't need these - they're embedded in other objects */
+  /* draw end 1 */
+  glFrontFace(GL_CW);
+  glNormal3f(-1, 0, 0);
+  glBegin(wire ? GL_LINE_LOOP : GL_QUADS);
+  glVertex3f(-length/2, -width1/2, -height1/2);
+  glVertex3f(-length/2,  width1/2, -height1/2);
+  glVertex3f(-length/2,  width1/2,  height1/2);
+  glVertex3f(-length/2, -width1/2,  height1/2);
+  glEnd();
+
+  /* draw end 2 */
+  glFrontFace(GL_CCW);
+  glNormal3f(1, 0, 0);
+  glBegin(wire ? GL_LINE_LOOP : GL_QUADS);
+  glVertex3f(length/2, -width2/2, -height2/2);
+  glVertex3f(length/2,  width2/2, -height2/2);
+  glVertex3f(length/2,  width2/2,  height2/2);
+  glVertex3f(length/2, -width2/2,  height2/2);
+  glEnd();
+#endif
+
+  /* draw top */
+  glFrontFace(GL_CCW);
+  glNormal3f(0, 0, -1);
+  glBegin(wire ? GL_LINE_LOOP : GL_QUADS);
+  glVertex3f(-length/2, -width1/2, -height1/2);
+  glVertex3f(-length/2,  width1/2, -height1/2);
+  glVertex3f( length/2,  width2/2, -height2/2);
+  glVertex3f( length/2, -width2/2, -height2/2);
+  glEnd();
+
+  /* draw bottom */
+  glFrontFace(GL_CW);
+  glNormal3f(0, 0, 1);
+  glBegin(wire ? GL_LINE_LOOP : GL_QUADS);
+  glVertex3f(-length/2, -width1/2, height1/2);
+  glVertex3f(-length/2,  width1/2, height1/2);
+  glVertex3f( length/2,  width2/2, height2/2);
+  glVertex3f( length/2, -width2/2, height2/2);
+  glEnd();
+
+  /* draw left */
+  glFrontFace(GL_CW);
+  glNormal3f(0, -1, 0);
+  glBegin(wire ? GL_LINE_LOOP : GL_QUADS);
+  glVertex3f(-length/2, -width1/2, -height1/2);
+  glVertex3f(-length/2, -width1/2,  height1/2);
+  glVertex3f( length/2, -width2/2,  height2/2);
+  glVertex3f( length/2, -width2/2, -height2/2);
+  glEnd();
+
+  /* draw right */
+  glFrontFace(GL_CCW);
+  glNormal3f(0, 1, 0);
+  glBegin(wire ? GL_LINE_LOOP : GL_QUADS);
+  glVertex3f(-length/2,  width1/2, -height1/2);
+  glVertex3f(-length/2,  width1/2,  height1/2);
+  glVertex3f( length/2,  width2/2,  height2/2);
+  glVertex3f( length/2,  width2/2, -height2/2);
+  glEnd();
+
+  glFrontFace(GL_CCW);
+}
+
+
 static void
 draw(ModeInfo * mi)
 {
@@ -283,29 +497,81 @@ draw(ModeInfo * mi)
        }
 
        glPushMatrix();
-       glRotatef(gp->view_rotx, 1.0, 0.0, 0.0);
-       glRotatef(gp->view_roty, 0.0, 1.0, 0.0);
-       glRotatef(gp->view_rotz, 0.0, 0.0, 1.0);
 
-       glPushMatrix();
-       glTranslatef(-3.0, -2.0, 0.0);
-       glRotatef(gp->angle, 0.0, 0.0, 1.0);
+    {
+      GLfloat x = gp->rotx;
+      GLfloat y = gp->roty;
+      GLfloat z = gp->rotz;
+      if (x < 0) x = 1 - (x + 1);
+      if (y < 0) y = 1 - (y + 1);
+      if (z < 0) z = 1 - (z + 1);
+      glRotatef(x * 360, 1.0, 0.0, 0.0);
+      glRotatef(y * 360, 0.0, 1.0, 0.0);
+      glRotatef(z * 360, 0.0, 0.0, 1.0);
+    }
+
+    if (!planetary) {
+      glPushMatrix();
+      glTranslatef(-3.0, -2.0, 0.0);
+      glRotatef(gp->angle, 0.0, 0.0, 1.0);
 /* PURIFY 4.0.1 reports an unitialized memory read on the next line when using
    * MesaGL 2.2 and -mono.  This has been fixed in MesaGL 2.3 and later. */
-       glCallList(gp->gear1);
-       glPopMatrix();
-
-       glPushMatrix();
-       glTranslatef(3.1, -2.0, 0.0);
-       glRotatef(-2.0 * gp->angle - 9.0, 0.0, 0.0, 1.0);
-       glCallList(gp->gear2);
-       glPopMatrix();
-
-       glPushMatrix();
-       glTranslatef(-3.1, 4.2, 0.0);
-       glRotatef(-2.0 * gp->angle - 25.0, 0.0, 0.0, 1.0);
-       glCallList(gp->gear3);
-       glPopMatrix();
+      glCallList(gp->gear1);
+      glPopMatrix();
+
+      glPushMatrix();
+      glTranslatef(3.1, -2.0, 0.0);
+      glRotatef(-2.0 * gp->angle - 9.0, 0.0, 0.0, 1.0);
+      glCallList(gp->gear2);
+      glPopMatrix();
+
+      glPushMatrix();
+      glTranslatef(-3.1, 4.2, 0.0);
+      glRotatef(-2.0 * gp->angle - 25.0, 0.0, 0.0, 1.0);
+      glCallList(gp->gear3);
+      glPopMatrix();
+
+    } else { /* planetary */
+
+      glScalef(0.8, 0.8, 0.8);
+
+      glPushMatrix();
+      glTranslatef(0.0, 4.2, 0.0);
+      glRotatef(gp->angle - 7.0, 0.0, 0.0, 1.0);
+      glCallList(gp->gear1);
+      glPopMatrix();
+
+      glPushMatrix();
+      glRotatef(120, 0.0, 0.0, 1.0);
+      glTranslatef(0.0, 4.2, 0.0);
+      glRotatef(gp->angle - 7.0, 0.0, 0.0, 1.0);
+      glCallList(gp->gear2);
+      glPopMatrix();
+
+      glPushMatrix();
+      glRotatef(240, 0.0, 0.0, 1.0);
+      glTranslatef(0.0, 4.2, 0.0);
+      glRotatef(gp->angle - 7.0, 0.0, 0.0, 1.0);
+      glCallList(gp->gear3);
+      glPopMatrix();
+
+      glPushMatrix();
+      glTranslatef(0.0, 0.0, 0.0);
+      glRotatef(-gp->angle, 0.0, 0.0, 1.0);
+      glCallList(gp->gear_inner);
+      glPopMatrix();
+
+      glPushMatrix();
+      glTranslatef(0.0, 0.0, 0.0);
+      glRotatef((gp->angle / 3.0) - 7.5, 0.0, 0.0, 1.0);
+      glCallList(gp->gear_outer);
+      glPopMatrix();
+
+      glPushMatrix();
+      glTranslatef(0.0, 0.0, 0.0);
+      glCallList(gp->armature);
+      glPopMatrix();
+    }
 
        glPopMatrix();
 }
@@ -313,8 +579,8 @@ draw(ModeInfo * mi)
 
 
 /* new window size or exposure */
-static void
-reshape(int width, int height)
+void
+reshape_gears(ModeInfo *mi, int width, int height)
 {
        GLfloat     h = (GLfloat) height / (GLfloat) width;
 
@@ -374,57 +640,316 @@ pinit(ModeInfo * mi)
 #endif
 
        /* make the gears */
-       gp->gear1 = glGenLists(1);
-       glNewList(gp->gear1, GL_COMPILE);
-       if (wire) {
+
+    if (! planetary) {
+
+      gp->gear1 = glGenLists(1);
+      glNewList(gp->gear1, GL_COMPILE);
+      if (wire) {
                if (mono)
-                       glColor4fv(white);
+          glColor4fv(white);
                else
-                       glColor4fv(red);
-       } else {
+          glColor4fv(red);
+      } else {
                if (mono)
-                       glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, gray);
+          glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, gray);
                else
-                       glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, red);
-       }
-       gear(1.0, 4.0, 1.0, 20, 0.7, wire);
-       glEndList();
+          glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, red);
+      }
+
+      gear(1.0, 4.0, 1.0, 20, 0.7, wire, False);
+      glEndList();
 
-       gp->gear2 = glGenLists(1);
-       glNewList(gp->gear2, GL_COMPILE);
-       if (wire) {
+      gp->gear2 = glGenLists(1);
+      glNewList(gp->gear2, GL_COMPILE);
+      if (wire) {
                if (mono)
-                       glColor4fv(white);
+          glColor4fv(white);
                else
-                       glColor4fv(green);
-       } else {
+          glColor4fv(green);
+      } else {
                if (mono)
-                       glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, gray);
+          glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, gray);
                else
-                       glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, green);
-       }
-       gear(0.5, 2.0, 2.0, 10, 0.7, wire);
-       glEndList();
+          glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, green);
+      }
+      gear(0.5, 2.0, 2.0, 10, 0.7, wire, False);
+      glEndList();
+
+      gp->gear3 = glGenLists(1);
+      glNewList(gp->gear3, GL_COMPILE);
+      if (wire) {
+               if (mono)
+          glColor4fv(white);
+               else
+          glColor4fv(blue);
+      } else {
+               if (mono)
+          glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, gray);
+               else
+          glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, blue);
+      }
+      gear(1.3, 2.0, 0.5, 10, 0.7, wire, False);
+      glEndList();
+      if (!wire)
+               glEnable(GL_NORMALIZE);
 
-       gp->gear3 = glGenLists(1);
-       glNewList(gp->gear3, GL_COMPILE);
-       if (wire) {
+    } else { /* planetary */
+
+      gp->gear1 = glGenLists(1);
+      glNewList(gp->gear1, GL_COMPILE);
+      if (wire) {
                if (mono)
-                       glColor4fv(white);
+          glColor4fv(white);
                else
-                       glColor4fv(blue);
-       } else {
+          glColor4fv(red);
+      } else {
                if (mono)
-                       glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, gray);
+          glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, gray);
                else
-                       glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, blue);
-       }
-       gear(1.3, 2.0, 0.5, 10, 0.7, wire);
-       glEndList();
-       if (!wire)
+          glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, red);
+      }
+      gear(1.3, 2.0, 2.0, 12, 0.7, wire, False);
+      glEndList();
+
+      gp->gear2 = glGenLists(1);
+      glNewList(gp->gear2, GL_COMPILE);
+      if (wire) {
+               if (mono)
+          glColor4fv(white);
+               else
+          glColor4fv(green);
+      } else {
+               if (mono)
+          glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, gray);
+               else
+          glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, red);
+      }
+      gear(1.3, 2.0, 2.0, 12, 0.7, wire, False);
+      glEndList();
+
+      gp->gear3 = glGenLists(1);
+      glNewList(gp->gear3, GL_COMPILE);
+      if (wire) {
+               if (mono)
+          glColor4fv(white);
+               else
+          glColor4fv(blue);
+      } else {
+               if (mono)
+          glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, gray);
+               else
+          glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, red);
+      }
+      gear(1.3, 2.0, 2.0, 12, 0.7, wire, False);
+      glEndList();
+      if (!wire)
+               glEnable(GL_NORMALIZE);
+
+
+      gp->gear_inner = glGenLists(1);
+      glNewList(gp->gear_inner, GL_COMPILE);
+      if (wire) {
+               if (mono)
+          glColor4fv(white);
+               else
+          glColor4fv(blue);
+      } else {
+               if (mono)
+          glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, gray);
+               else
+          glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, blue);
+      }
+      gear(1.0, 2.0, 2.0, 12, 0.7, wire, False);
+      glEndList();
+      if (!wire)
+               glEnable(GL_NORMALIZE);
+
+
+      gp->gear_outer = glGenLists(1);
+      glNewList(gp->gear_outer, GL_COMPILE);
+      if (wire) {
+               if (mono)
+          glColor4fv(white);
+               else
+          glColor4fv(blue);
+      } else {
+               if (mono)
+          glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, gray);
+               else
+          glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, green);
+      }
+      gear(5.7, 7.0, 2.0, 36, 0.7, wire, True);
+
+      /* put some nubs on the outer ring, so we can tell how it's moving */
+      glPushMatrix();
+      glTranslatef(7.0, 0, 0);
+      glRotatef(90, 0, 1, 0);
+      tube(0.5, 0.5, 10, wire);   /* nub 1 */
+      glPopMatrix();
+
+      glPushMatrix();
+      glRotatef(120, 0, 0, 1);
+      glTranslatef(7.0, 0, 0);
+      glRotatef(90, 0, 1, 0);
+      tube(0.5, 0.5, 10, wire);   /* nub 2 */
+      glPopMatrix();
+
+      glPushMatrix();
+      glRotatef(240, 0, 0, 1);
+      glTranslatef(7.0, 0, 0);
+      glRotatef(90, 0, 1, 0);
+      tube(0.5, 0.5, 10, wire);   /* nub 3 */
+      glPopMatrix();
+
+
+      glEndList();
+      if (!wire)
                glEnable(GL_NORMALIZE);
+
+      gp->armature = glGenLists(1);
+      glNewList(gp->armature, GL_COMPILE);
+      if (wire) {
+        if (mono)
+          glColor4fv(white);
+        else
+          glColor4fv(blue);
+      } else {
+        if (mono)
+          glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, gray);
+        else
+          glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, gray);
+      }
+
+      glTranslatef(0, 0, 1.5);
+
+      tube(0.5, 10, 15, wire);       /* center axle */
+
+      glPushMatrix();
+      glTranslatef(0.0, 4.2, -1);
+      tube(0.5, 3, 15, wire);       /* axle 1 */
+      glTranslatef(0, 0, 1.8);
+      tube(0.7, 0.7, 15, wire);
+      glPopMatrix();
+
+      glPushMatrix();
+      glRotatef(120, 0.0, 0.0, 1.0);
+      glTranslatef(0.0, 4.2, -1);
+      tube(0.5, 3, 15, wire);       /* axle 2 */
+      glTranslatef(0, 0, 1.8);
+      tube(0.7, 0.7, 15, wire);
+      glPopMatrix();
+
+      glPushMatrix();
+      glRotatef(240, 0.0, 0.0, 1.0);
+      glTranslatef(0.0, 4.2, -1);
+      tube(0.5, 3, 15, wire);       /* axle 3 */
+      glTranslatef(0, 0, 1.8);
+      tube(0.7, 0.7, 15, wire);
+      glPopMatrix();
+
+      glTranslatef(0, 0, 1.5);      /* center disk */
+      tube(1.5, 2, 20, wire);
+
+      glPushMatrix();
+      glRotatef(270, 0, 0, 1);
+      glRotatef(-10, 0, 1, 0);
+      glTranslatef(-2.2, 0, 0);
+      arm(4.0, 1.0, 0.5, 2.0, 1.0, wire);              /* arm 1 */
+      glPopMatrix();
+
+      glPushMatrix();
+      glRotatef(30, 0, 0, 1);
+      glRotatef(-10, 0, 1, 0);
+      glTranslatef(-2.2, 0, 0);
+      arm(4.0, 1.0, 0.5, 2.0, 1.0, wire);              /* arm 2 */
+      glPopMatrix();
+
+      glPushMatrix();
+      glRotatef(150, 0, 0, 1);
+      glRotatef(-10, 0, 1, 0);
+      glTranslatef(-2.2, 0, 0);
+      arm(4.0, 1.0, 0.5, 2.0, 1.0, wire);              /* arm 3 */
+      glPopMatrix();
+
+      glEndList();
+      if (!wire)
+        glEnable(GL_NORMALIZE);
+    }
 }
 
+
+/* lifted from lament.c */
+#define RAND(n) ((long) ((random() & 0x7fffffff) % ((long) (n))))
+#define RANDSIGN() ((random() & 1) ? 1 : -1)
+
+static void
+rotate(GLfloat *pos, GLfloat *v, GLfloat *dv, GLfloat max_v)
+{
+  double ppos = *pos;
+
+  /* tick position */
+  if (ppos < 0)
+    ppos = -(ppos + *v);
+  else
+    ppos += *v;
+
+  if (ppos > 1.0)
+    ppos -= 1.0;
+  else if (ppos < 0)
+    ppos += 1.0;
+
+  if (ppos < 0) abort();
+  if (ppos > 1.0) abort();
+  *pos = (*pos > 0 ? ppos : -ppos);
+
+  /* accelerate */
+  *v += *dv;
+
+  /* clamp velocity */
+  if (*v > max_v || *v < -max_v)
+    {
+      *dv = -*dv;
+    }
+  /* If it stops, start it going in the other direction. */
+  else if (*v < 0)
+    {
+      if (random() % 4)
+       {
+         *v = 0;
+
+         /* keep going in the same direction */
+         if (random() % 2)
+           *dv = 0;
+         else if (*dv < 0)
+           *dv = -*dv;
+       }
+      else
+       {
+         /* reverse gears */
+         *v = -*v;
+         *dv = -*dv;
+         *pos = -*pos;
+       }
+    }
+
+  /* Alter direction of rotational acceleration randomly. */
+  if (! (random() % 120))
+    *dv = -*dv;
+
+  /* Change acceleration very occasionally. */
+  if (! (random() % 200))
+    {
+      if (*dv == 0)
+       *dv = 0.00001;
+      else if (random() & 1)
+       *dv *= 1.2;
+      else
+       *dv *= 0.8;
+    }
+}
+
+
 void
 init_gears(ModeInfo * mi)
 {
@@ -442,13 +967,28 @@ init_gears(ModeInfo * mi)
        gp = &gears[screen];
 
        gp->window = MI_WINDOW(mi);
-       gp->view_rotx = NRAND(360);
-       gp->view_roty = NRAND(360);
-       gp->view_rotz = NRAND(360);
-       gp->angle = NRAND(360);
+
+    gp->rotx = frand(1.0) * RANDSIGN();
+    gp->roty = frand(1.0) * RANDSIGN();
+    gp->rotz = frand(1.0) * RANDSIGN();
+
+    /* bell curve from 0-1.5 degrees, avg 0.75 */
+    gp->dx = (frand(1) + frand(1) + frand(1)) / (360*2);
+    gp->dy = (frand(1) + frand(1) + frand(1)) / (360*2);
+    gp->dz = (frand(1) + frand(1) + frand(1)) / (360*2);
+
+    gp->d_max = gp->dx * 2;
+
+    gp->ddx = 0.00006 + frand(0.00003);
+    gp->ddy = 0.00006 + frand(0.00003);
+    gp->ddz = 0.00006 + frand(0.00003);
+
+    gp->ddx = 0.00001;
+    gp->ddy = 0.00001;
+    gp->ddz = 0.00001;
 
        if ((gp->glx_context = init_GL(mi)) != NULL) {
-               reshape(MI_WIDTH(mi), MI_HEIGHT(mi));
+               reshape_gears(mi, MI_WIDTH(mi), MI_HEIGHT(mi));
                pinit(mi);
        } else {
                MI_CLEARWINDOW(mi);
@@ -462,7 +1002,9 @@ draw_gears(ModeInfo * mi)
        Display    *display = MI_DISPLAY(mi);
        Window      window = MI_WINDOW(mi);
        int         angle_incr = MI_CYCLES(mi) ? MI_CYCLES(mi) : 2;
-       int         rot_incr = MI_COUNT(mi) ? MI_COUNT(mi) : 1;
+
+    if (planetary)
+      angle_incr *= 3;
 
        if (!gp->glx_context)
                return;
@@ -474,10 +1016,12 @@ draw_gears(ModeInfo * mi)
 
        /* let's do something so we don't get bored */
        gp->angle = (int) (gp->angle + angle_incr) % 360;
-       gp->view_rotx = (int) (gp->view_rotx + rot_incr) % 360;
-       gp->view_roty = (int) (gp->view_roty + rot_incr) % 360;
-       gp->view_rotz = (int) (gp->view_rotz + rot_incr) % 360;
 
+    rotate(&gp->rotx, &gp->dx, &gp->ddx, gp->d_max);
+    rotate(&gp->roty, &gp->dy, &gp->ddy, gp->d_max);
+    rotate(&gp->rotz, &gp->dz, &gp->ddz, gp->d_max);
+
+    if (mi->fps_p) do_fps (mi);
        glFinish();
        glXSwapBuffers(display, window);
 }
@@ -501,6 +1045,10 @@ release_gears(ModeInfo * mi)
                                        glDeleteLists(gp->gear2, 1);
                                if (glIsList(gp->gear3))
                                        glDeleteLists(gp->gear3, 1);
+                               if (glIsList(gp->gear_inner))
+                                       glDeleteLists(gp->gear_inner, 1);
+                               if (glIsList(gp->gear_outer))
+                                       glDeleteLists(gp->gear_outer, 1);
 
                        }
                }
index 2286200242d4c14ea11cdafbe7e883aabd97e305..23fce87c78301571bcdde8ecfbd8311e377ffeca 100644 (file)
 # define PROGCLASS                                             "gflux"
 # define HACK_INIT                                             init_gflux
 # define HACK_DRAW                                             draw_gflux
-# define gflux_opts                            xlockmore_opts
-#define DEFAULTS                        "*squares:      19      \n" \
-                                        "*resolution:   0       \n" \
+# define HACK_RESHAPE                                  reshape_gflux
+# define gflux_opts                                            xlockmore_opts
+#define DEFAULTS                        "*delay:               20000   \n" \
+                                                                               "*showFPS:      False   \n" \
+                                        "*squares:      19      \n" \
+                                                                               "*resolution:   0       \n" \
                                         "*draw:         0       \n" \
                                         "*flat:         0       \n" \
                                         "*speed:        0.05    \n" \
@@ -194,7 +197,7 @@ typedef struct {
     int imageWidth;
     int imageHeight;
     GLubyte *image;
-    GLint texName;
+    GLuint texName;
     void (*drawFunc)(void);
 } gfluxstruct;
 static gfluxstruct *gflux = NULL;
@@ -237,6 +240,7 @@ void draw_gflux(ModeInfo * mi)
 
     calcGrid();
     gflux->drawFunc();
+    if (mi->fps_p) do_fps (mi);
     glXSwapBuffers(display, window);
 }
 
@@ -252,8 +256,8 @@ void resetProjection(void) {
 }
 
 /* Standard reshape function */
-static void
-reshape(int width, int height)
+void
+reshape_gflux(ModeInfo *mi, int width, int height)
 {
     glViewport( 0, 0, width, height );
     resetProjection();
@@ -261,9 +265,9 @@ reshape(int width, int height)
 
 
 /* main OpenGL initialization routine */
-void initializeGL(GLsizei width, GLsizei height) 
+void initializeGL(ModeInfo *mi, GLsizei width, GLsizei height) 
 {
-  reshape(width, height);
+  reshape_gflux(mi, width, height);
   glViewport( 0, 0, width, height ); 
   switch(_draw) {
     case solid :
@@ -317,8 +321,8 @@ void init_gflux(ModeInfo * mi)
 
     gp->window = MI_WINDOW(mi);
     if ((gp->glx_context = init_GL(mi)) != NULL) {
-        reshape(MI_WIDTH(mi), MI_HEIGHT(mi));
-        initializeGL(MI_WIDTH(mi), MI_HEIGHT(mi));
+        reshape_gflux(mi, MI_WIDTH(mi), MI_HEIGHT(mi));
+        initializeGL(mi, MI_WIDTH(mi), MI_HEIGHT(mi));
     } else {
         MI_CLEARWINDOW(mi);
     }
index 33911478d6b043d5999f2d09b72479af84120eb2..db68a528393ee0569161ee6c734581fae716c1cf 100644 (file)
@@ -3,7 +3,13 @@
 gflux \- rippling surface graphics hack
 .SH SYNOPSIS
 .B gflux
-[\-display \fIhost:display.screen\fP] [\-window] [\-root] [\-install] [\-visual \fIvisual\fP] [\-squares \fInum\fP] [\-resolution \fInum\fP] [\-draw \fInum\fP] [\-flat \fInum\fP] [\-speed \fInum\fP] [\-rotationx \fInum\fP] [\-rotationy \fInum\fP] [\-rotationz \fInum\fP]  [\-waves \fInum\fP] [\-waveChange \fInum\fP] [\-waveHeight \fInum\fP] [\-waveFreq \fInum\fP] [\-zoom \fInum\fP]
+[\-display \fIhost:display.screen\fP] [\-window] [\-root] [\-install]
+[\-visual \fIvisual\fP] [\-delay \fImicroseconds\fP] [\-fps]
+[\-squares \fInum\fP] [\-resolution \fInum\fP] [\-draw \fInum\fP]
+[\-flat \fInum\fP] [\-speed \fInum\fP]
+[\-rotationx \fInum\fP] [\-rotationy \fInum\fP] [\-rotationz \fInum\fP]
+[\-waves \fInum\fP] [\-waveChange \fInum\fP] [\-waveHeight \fInum\fP]
+[\-waveFreq \fInum\fP] [\-zoom \fInum\fP]
 .SH DESCRIPTION
 The \fIgflux\fP program draws a colourfull animated rippling square rotating in 3D space.
 .SH OPTIONS
@@ -55,6 +61,14 @@ Specifies the maximum frequency of ripples. default 3.0
 .TP 8
 .B \-zoom \fInum\fP\fP
 Specifies the size of the viewport. Smaller values fill the screen with rippling surface. default 1.0
+.TP 8
+.B \-delay \fImicroseconds\fP
+How long to pause between frames.  Default is 20000, or 0.02 second.
+.TP 8
+.B \-fps
+Display a running tally of how many frames per second are being rendered.
+In conjunction with \fB\-delay 0\fP, this can be a useful benchmark of 
+your GL performance.
 .SH ENVIRONMENT
 .PP
 .TP 8
index ad26b3d667f7f4b44ed5814de1af04617c209540..58807895bf4c740b9cb2e36d707fda41d1c460e2 100644 (file)
@@ -58,8 +58,10 @@ static const char sccsid[] = "@(#)plate.c    4.07 97/11/24 xlockmore";
 # define PROGCLASS                                             "Planet"
 # define HACK_INIT                                             init_planet
 # define HACK_DRAW                                             draw_planet
+# define HACK_RESHAPE                                  reshape_planet
 # define planet_opts                                   xlockmore_opts
 #define DEFAULTS       "*delay:                        15000   \n"     \
+                                       "*showFPS:                      False   \n" \
                     "*rotate:           True    \n" \
                     "*roll:             True    \n" \
                     "*bounce:           True    \n" \
@@ -161,8 +163,8 @@ ModStruct   planet_description =
  */
 
 #define NUM_STARS 1000
-#define SLICES 15
-#define STACKS 15
+#define SLICES 32
+#define STACKS 32
 
 /* radius of the sphere- fairly arbitrary */
 #define RADIUS 4
@@ -618,33 +620,20 @@ rotate_and_move (ModeInfo * mi)
 
   if (do_bounce)
        {
-         /* Move in the direction we had been moving in. */
-         gp->xpos += gp->dx;
-         gp->ypos += gp->dy;
-         gp->zpos += gp->dz;
-
-         /* Bounce. */
-         if (gp->xpos > gp->box_depth)
-               gp->xpos = gp->box_depth, gp->dx = -gp->dx;
-         else if (gp->xpos < 0)
-               gp->xpos = 0, gp->dx = -gp->dx;
-
-         if (gp->ypos > gp->box_width/2)
-               gp->ypos = gp->box_width/2, gp->dy = -gp->dy;
-         else if (gp->ypos < -gp->box_width/2)
-               gp->ypos = -gp->box_width/2, gp->dy = -gp->dy;
-
-         if (gp->zpos > gp->box_height/2)
-               gp->zpos = gp->box_height/2, gp->dz = -gp->dz;
-         else if (gp->zpos < -gp->box_height/2)
-               gp->zpos = -gp->box_height/2, gp->dz = -gp->dz;
+      static int frame = 0;
+#     define SINOID(SCALE,SIZE) \
+        ((((1 + sin((frame * (SCALE)) / 2 * M_PI)) / 2.0) * (SIZE)) - (SIZE)/2)
+      gp->xpos = SINOID(0.031, gp->box_width);
+      gp->ypos = SINOID(0.023, gp->box_height);
+      gp->zpos = SINOID(0.017, gp->box_depth);
+      frame++;
        }
 }
 
 
 /* Standard reshape function */
-static void
-reshape(int width, int height)
+void
+reshape_planet(ModeInfo *mi, int width, int height)
 {
   GLfloat light[4];
   GLfloat h = (GLfloat) height / (GLfloat) width;
@@ -715,7 +704,7 @@ init_planet(ModeInfo * mi)
 
   gp->window = MI_WINDOW(mi);
   if ((gp->glx_context = init_GL(mi)) != NULL) {
-       reshape(MI_WIDTH(mi), MI_HEIGHT(mi));
+       reshape_planet(mi, MI_WIDTH(mi), MI_HEIGHT(mi));
        pinit(mi);
   } else {
        MI_CLEARWINDOW(mi);
@@ -772,6 +761,7 @@ draw_planet(ModeInfo * mi)
 
 
 
+  if (mi->fps_p) do_fps (mi);
   glFinish();
   glXSwapBuffers(display, window);
 
diff --git a/hacks/glx/gltext.c b/hacks/glx/gltext.c
new file mode 100644 (file)
index 0000000..07608ee
--- /dev/null
@@ -0,0 +1,565 @@
+/* gltext, Copyright (c) 2001 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 <X11/Intrinsic.h>
+
+extern XtAppContext app;
+
+#define PROGCLASS      "GLText"
+#define HACK_INIT      init_text
+#define HACK_DRAW      draw_text
+#define HACK_RESHAPE   reshape_text
+#define sws_opts       xlockmore_opts
+
+#define DEF_TEXT        "(default)"
+
+#define DEFAULTS       "*delay:        10000     \n" \
+                       "*showFPS:      False     \n" \
+                       "*wireframe:    False     \n" \
+                       "*text:       " DEF_TEXT "\n"
+
+#undef countof
+#define countof(x) (sizeof((x))/sizeof((*x)))
+
+#include "xlockmore.h"
+#include "colors.h"
+
+#ifdef USE_GL /* whole file */
+
+#ifdef HAVE_UNAME
+# include <sys/utsname.h>
+#endif /* HAVE_UNAME */
+
+
+#include <GL/glu.h>
+#include "glutstroke.h"
+#include "glut_roman.h"
+#define GLUT_FONT (&glutStrokeRoman)
+
+
+typedef struct {
+  GLXContext *glx_context;
+
+  GLfloat rotx, roty, rotz;       /* current object rotation */
+  GLfloat dx, dy, dz;             /* current rotational velocity */
+  GLfloat ddx, ddy, ddz;          /* current rotational acceleration */
+  GLfloat d_max;                  /* max velocity */
+
+  GLuint text_list;
+
+  int ncolors;
+  XColor *colors;
+  int ccolor;
+
+} text_configuration;
+
+static text_configuration *tps = NULL;
+
+static char *text;
+
+static XrmOptionDescRec opts[] = {
+  { "-text",   ".text",   XrmoptionSepArg, 0 }
+};
+
+static argtype vars[] = {
+  {(caddr_t *) &text, "text", "Text", DEF_TEXT, t_String},
+};
+
+ModeSpecOpt sws_opts = {countof(opts), opts, countof(vars), vars, NULL};
+
+
+/* Window management, etc
+ */
+void
+reshape_text (ModeInfo *mi, int width, int height)
+{
+  GLfloat h = (GLfloat) height / (GLfloat) width;
+
+  glViewport (0, 0, (GLint) width, (GLint) height);
+
+  glMatrixMode(GL_PROJECTION);
+  glLoadIdentity();
+
+  gluPerspective( 30.0, 1/h, 1.0, 100.0 );
+  gluLookAt( 0.0, 0.0, 15.0,
+             0.0, 0.0, 0.0,
+             0.0, 1.0, 0.0);
+  glMatrixMode(GL_MODELVIEW);
+  glLoadIdentity();
+  glTranslatef(0.0, 0.0, -15.0);
+
+  glClear(GL_COLOR_BUFFER_BIT);
+}
+
+
+static void
+gl_init (ModeInfo *mi)
+{
+  text_configuration *tp = &tps[MI_SCREEN(mi)];
+  int wire = MI_IS_WIREFRAME(mi);
+
+  static GLfloat pos[4] = {5.0, 5.0, 10.0, 1.0};
+
+  if (!wire)
+    {
+      glLightfv(GL_LIGHT0, GL_POSITION, pos);
+      glEnable(GL_CULL_FACE);
+      glEnable(GL_LIGHTING);
+      glEnable(GL_LIGHT0);
+      glEnable(GL_DEPTH_TEST);
+    }
+
+  tp->text_list = glGenLists (1);
+  glNewList (tp->text_list, GL_COMPILE);
+  glEndList ();
+}
+
+
+/* lifted from lament.c */
+#define RAND(n) ((long) ((random() & 0x7fffffff) % ((long) (n))))
+#define RANDSIGN() ((random() & 1) ? 1 : -1)
+
+static void
+rotate(GLfloat *pos, GLfloat *v, GLfloat *dv, GLfloat max_v)
+{
+  double ppos = *pos;
+
+  /* tick position */
+  if (ppos < 0)
+    ppos = -(ppos + *v);
+  else
+    ppos += *v;
+
+  if (ppos > 1.0)
+    ppos -= 1.0;
+  else if (ppos < 0)
+    ppos += 1.0;
+
+  if (ppos < 0) abort();
+  if (ppos > 1.0) abort();
+  *pos = (*pos > 0 ? ppos : -ppos);
+
+  /* accelerate */
+  *v += *dv;
+
+  /* clamp velocity */
+  if (*v > max_v || *v < -max_v)
+    {
+      *dv = -*dv;
+    }
+  /* If it stops, start it going in the other direction. */
+  else if (*v < 0)
+    {
+      if (random() % 4)
+       {
+         *v = 0;
+
+         /* keep going in the same direction */
+         if (random() % 2)
+           *dv = 0;
+         else if (*dv < 0)
+           *dv = -*dv;
+       }
+      else
+       {
+         /* reverse gears */
+         *v = -*v;
+         *dv = -*dv;
+         *pos = -*pos;
+       }
+    }
+
+  /* Alter direction of rotational acceleration randomly. */
+  if (! (random() % 120))
+    *dv = -*dv;
+
+  /* Change acceleration very occasionally. */
+  if (! (random() % 200))
+    {
+      if (*dv == 0)
+       *dv = 0.00001;
+      else if (random() & 1)
+       *dv *= 1.2;
+      else
+       *dv *= 0.8;
+    }
+}
+
+
+void 
+init_text (ModeInfo *mi)
+{
+  text_configuration *tp;
+
+  if (!tps) {
+    tps = (text_configuration *)
+      calloc (MI_NUM_SCREENS(mi), sizeof (text_configuration));
+    if (!tps) {
+      fprintf(stderr, "%s: out of memory\n", progname);
+      exit(1);
+    }
+
+    tp = &tps[MI_SCREEN(mi)];
+  }
+
+  tp = &tps[MI_SCREEN(mi)];
+
+  if ((tp->glx_context = init_GL(mi)) != NULL) {
+    gl_init(mi);
+    reshape_text (mi, MI_WIDTH(mi), MI_HEIGHT(mi));
+  }
+
+  tp->rotx = frand(1.0) * RANDSIGN();
+  tp->roty = frand(1.0) * RANDSIGN();
+  tp->rotz = frand(1.0) * RANDSIGN();
+
+  /* bell curve from 0-6 degrees, avg 3 */
+  tp->dx = (frand(1) + frand(1) + frand(1)) / (360/2);
+  tp->dy = (frand(1) + frand(1) + frand(1)) / (360/2);
+  tp->dz = (frand(1) + frand(1) + frand(1)) / (360/2);
+
+  tp->d_max = tp->dx * 2;
+
+  tp->ddx = 0.00006 + frand(0.00003);
+  tp->ddy = 0.00006 + frand(0.00003);
+  tp->ddz = 0.00006 + frand(0.00003);
+
+  tp->ddx = 0.00001;
+  tp->ddy = 0.00001;
+  tp->ddz = 0.00001;
+
+  if (!text || !*text || !strcmp(text, "(default)"))
+    {
+# ifdef HAVE_UNAME
+      struct utsname uts;
+
+      if (uname (&uts) < 0)
+        {
+          text = strdup("uname() failed");
+        }
+      else
+        {
+          char *s;
+          if ((s = strchr(uts.nodename, '.')))
+            *s = 0;
+          text = (char *) malloc(strlen(uts.nodename) +
+                                 strlen(uts.sysname) +
+                                 strlen(uts.version) +
+                                 strlen(uts.release) + 10);
+#  ifdef _AIX
+          sprintf(text, "%s\n%s %s.%s",
+                  uts.nodename, uts.sysname, uts.version, uts.release);
+#  else  /* !_AIX */
+          sprintf(text, "%s\n%s %s",
+                  uts.nodename, uts.sysname, uts.release);
+#  endif /* !_AIX */
+        }
+# else /* !HAVE_UNAME */
+#  ifdef VMS
+      text = strdup(getenv("SYS$NODE"));
+#  else
+      text = strdup("*  *\n*  *  *\nxscreensaver\n*  *  *\n*  *");
+#  endif
+# endif        /* !HAVE_UNAME */
+    }
+
+
+  tp->ncolors = 255;
+  tp->colors = (XColor *) calloc(tp->ncolors, sizeof(XColor));
+  make_smooth_colormap (0, 0, 0,
+                        tp->colors, &tp->ncolors,
+                        False, 0, False);
+}
+
+
+static void
+unit_tube (Bool wire)
+{
+  int i;
+  GLfloat d3 = 0.2075;
+
+  glPushMatrix();
+
+  if (!wire)
+    glShadeModel(GL_SMOOTH);
+
+  glFrontFace(GL_CCW);
+
+  for (i = 0; i < 8; i++)
+    {
+      glNormal3f(1, 0, 0);
+      glBegin(wire ? GL_LINE_LOOP : GL_QUADS);
+      glVertex3f(0.5, 0.0, -d3); glVertex3f(0.5, 1.0, -d3);
+      glVertex3f(0.5, 1.0,  d3); glVertex3f(0.5, 0.0,  d3);
+      glEnd();
+      glRotatef(45, 0, 1, 0);
+    }
+
+  if (! wire)
+    {
+      glNormal3f(0, -1, 0);
+      glBegin(GL_TRIANGLE_FAN);
+      glVertex3f(0, 0, 0);
+      glVertex3f(-d3,  0, -0.5); glVertex3f( d3,  0, -0.5);
+      glVertex3f( 0.5, 0, -d3);  glVertex3f( 0.5, 0,  d3);
+      glVertex3f( d3,  0,  0.5); glVertex3f(-d3,  0,  0.5);
+      glVertex3f(-0.5, 0,  d3);  glVertex3f(-0.5, 0, -d3);
+      glVertex3f(-d3,  0, -0.5); glVertex3f( d3,  0, -0.5);
+
+      glEnd();
+
+      glTranslatef(0, 1, 0);
+
+      glNormal3f(0, 1, 0);
+      glBegin(GL_TRIANGLE_FAN);
+      glVertex3f(0, 0, 0);
+      glVertex3f(-0.5, 0, -d3);  glVertex3f(-0.5, 0,  d3); 
+      glVertex3f(-d3,  0,  0.5); glVertex3f( d3,  0,  0.5); 
+      glVertex3f( 0.5, 0,  d3);  glVertex3f( 0.5, 0, -d3); 
+      glVertex3f( d3,  0, -0.5); glVertex3f(-d3,  0, -0.5); 
+      glVertex3f(-0.5, 0, -d3);  glVertex3f(-0.5, 0,  d3); 
+      glEnd();
+    }
+
+  glPopMatrix();
+}
+
+
+static void
+tube (GLfloat x1, GLfloat y1, 
+      GLfloat x2, GLfloat y2,
+      GLfloat z,
+      GLfloat diameter,
+      Bool wire)
+{
+  GLfloat length, rot;
+
+  if (y1 == y2) y2 += 0.01;  /* waah... */
+
+  length = sqrt(((x2-x1)*(x2-x1)) +
+                ((y2-y1)*(y2-y1)));
+
+  rot = (acos((x2-x1)/length)
+         / (M_PI / 180));
+
+  if (rot < 0 || rot > 180) abort();
+  if (y1 <= y2) rot = -rot;
+
+  rot = 180-rot;
+
+  if (diameter < 0) abort();
+  if (length < 0) abort();
+
+  glPushMatrix();
+
+  glTranslatef(x1, y1, z);
+  glRotatef(rot+90, 0, 0, 1);
+  glTranslatef(0, -diameter/8, 0);
+  glScalef (diameter, length+diameter/4, diameter);
+  unit_tube (wire);
+  glPopMatrix();
+  
+}
+
+
+
+static int
+fill_character (GLUTstrokeFont font, int c, Bool wire)
+{
+  int tube_width = 20;
+
+  const StrokeCharRec *ch;
+  const StrokeRec *stroke;
+  const CoordRec *coord;
+  StrokeFontPtr fontinfo;
+  int i, j;
+
+  fontinfo = (StrokeFontPtr) font;
+
+  if (c < 0 || c >= fontinfo->num_chars)
+    return 0;
+  ch = &(fontinfo->ch[c]);
+  if (ch)
+    {
+      GLfloat lx, ly;
+      for (i = ch->num_strokes, stroke = ch->stroke;
+           i > 0; i--, stroke++) {
+        for (j = stroke->num_coords, coord = stroke->coord;
+             j > 0; j--, coord++)
+          {
+            if (j != stroke->num_coords)
+              tube (lx, ly, coord->x, coord->y, 0, tube_width, wire);
+            lx = coord->x;
+            ly = coord->y;
+          }
+      }
+      return (int) (ch->right + tube_width/2);
+    }
+  return 0;
+}
+
+
+static int
+text_extents (const char *string, int *wP, int *hP)
+{
+  const char *s, *start;
+  int line_height = GLUT_FONT->top - GLUT_FONT->bottom;
+  int lines = 0;
+  *wP = 0;
+  *hP = 0;
+  start = string;
+  s = start;
+  while (1)
+    if (*s == '\n' || *s == 0)
+      {
+        int w = 0;
+        while (start < s)
+          {
+            w += glutStrokeWidth(GLUT_FONT, *start);
+            start++;
+          }
+        start = s+1;
+
+        if (w > *wP) *wP = w;
+        *hP += line_height;
+        s++;
+        lines++;
+        if (*s == 0) break;
+      }
+    else
+      s++;
+
+  return lines;
+}
+
+
+static void
+fill_string (const char *string, Bool wire)
+{
+  const char *s, *start;
+  int line_height = GLUT_FONT->top - GLUT_FONT->bottom;
+  int off;
+  GLfloat x = 0, y = 0;
+  int lines;
+
+  int ow, oh;
+  lines = text_extents (string, &ow, &oh);
+
+  y = oh / 2 - line_height;
+
+  start = string;
+  s = start;
+  while (1)
+    if (*s == '\n' || *s == 0)
+      {
+        int line_w = 0;
+        const char *s2;
+
+        for (s2 = start; s2 < s; s2++)
+          line_w += glutStrokeWidth (GLUT_FONT, *s2);
+
+        x = (-ow/2) + ((ow-line_w)/2);
+        while (start < s)
+          {
+            glPushMatrix();
+            glTranslatef(x, y, 0);
+            off = fill_character (GLUT_FONT, *start, wire);
+            x += off;
+            glPopMatrix();
+            start++;
+          }
+        start = s+1;
+
+        y -= line_height;
+        s++;
+        if (*s == 0) break;
+      }
+    else
+      s++;
+}
+
+
+void
+draw_text (ModeInfo *mi)
+{
+  text_configuration *tp = &tps[MI_SCREEN(mi)];
+  Display *dpy = MI_DISPLAY(mi);
+  Window window = MI_WINDOW(mi);
+  int wire = MI_IS_WIREFRAME(mi);
+
+  static GLfloat color[4] = {0.0, 0.0, 0.0, 1.0};
+  static GLfloat white[4] = {1.0, 1.0, 1.0, 1.0};
+
+  if (!tp->glx_context)
+    return;
+
+  glShadeModel(GL_SMOOTH);
+
+  glEnable(GL_DEPTH_TEST);
+  glEnable(GL_NORMALIZE);
+  glEnable(GL_CULL_FACE);
+
+  glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
+
+  glPushMatrix ();
+
+  glScalef(1.1, 1.1, 1.1);
+
+  {
+    static int frame = 0;
+    GLfloat x, y, z;
+
+#   define SINOID(SCALE,SIZE) \
+      ((((1 + sin((frame * (SCALE)) / 2 * M_PI)) / 2.0) * (SIZE)) - (SIZE)/2)
+    x = SINOID(0.031, 9.0);
+    y = SINOID(0.023, 9.0);
+    z = SINOID(0.017, 9.0);
+    frame++;
+    glTranslatef(x, y, z);
+
+    x = tp->rotx;
+    y = tp->roty;
+    z = tp->rotz;
+    if (x < 0) x = 1 - (x + 1);
+    if (y < 0) y = 1 - (y + 1);
+    if (z < 0) z = 1 - (z + 1);
+
+    glRotatef(x * 360, 1.0, 0.0, 0.0);
+    glRotatef(y * 360, 0.0, 1.0, 0.0);
+    glRotatef(z * 360, 0.0, 0.0, 1.0);
+
+    rotate(&tp->rotx, &tp->dx, &tp->ddx, tp->d_max);
+    rotate(&tp->roty, &tp->dy, &tp->ddy, tp->d_max);
+    rotate(&tp->rotz, &tp->dz, &tp->ddz, tp->d_max);
+  }
+
+  glColor4fv (white);
+
+  color[0] = tp->colors[tp->ccolor].red   / 65536.0;
+  color[1] = tp->colors[tp->ccolor].green / 65536.0;
+  color[2] = tp->colors[tp->ccolor].blue  / 65536.0;
+  tp->ccolor++;
+  if (tp->ccolor >= tp->ncolors) tp->ccolor = 0;
+
+  glMaterialfv (GL_FRONT, GL_AMBIENT_AND_DIFFUSE, color);
+
+  glScalef(0.01, 0.01, 0.01);
+  fill_string(text, wire);
+
+  glPopMatrix ();
+
+  if (mi->fps_p) do_fps (mi);
+  glFinish();
+
+  glXSwapBuffers(dpy, window);
+}
+
+#endif /* USE_GL */
diff --git a/hacks/glx/gltext.man b/hacks/glx/gltext.man
new file mode 100644 (file)
index 0000000..3e4e2a6
--- /dev/null
@@ -0,0 +1,59 @@
+.TH XScreenSaver 1 "25-Jul-98" "X Version 11"
+.SH NAME
+gltext - draws text spinning around in 3D
+.SH SYNOPSIS
+.B gltext
+[\-display \fIhost:display.screen\fP] [\-window] [\-root]
+[\-visual \fIvisual\fP] [\-delay \fImicroseconds\fP] [\-fps]
+[\-text \fIstring\fP]
+.SH DESCRIPTION
+The \fIgltext\fP program draws some text spinning around in 3D, using
+a font that appears to be made of solid tubes.  
+.SH OPTIONS
+.I gltext
+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 \-install
+Install a private colormap for the window.
+.TP 8
+.B \-visual \fIvisual\fP\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 \-text \fIstring\fP
+The text to display.  This may contain newlines, but it shouldn't be
+very long.  The default is to display the machine name and OS version.
+.TP 8
+.B \-fps
+Display a running tally of how many frames per second are being rendered.
+In conjunction with \fB\-delay 0\fP, this can be a useful benchmark of 
+your GL performance.
+.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 2001 by Jamie Zawinski.
+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
+Jamie Zawinski <jwz@jwz.org>
index 83103a61494cbc4bac56272f2ae0297724e6ed7d..67d0a7dfd70eb96412d80c338519d1bc5d6b9d8b 100644 (file)
 #define PROGCLASS      "Lament"
 #define HACK_INIT      init_lament
 #define HACK_DRAW      draw_lament
+#define HACK_RESHAPE   reshape_lament
 #define lament_opts    xlockmore_opts
 #define DEFAULTS       "*delay:        10000   \n"     \
+                       "*showFPS:      False   \n"     \
                        "*wireframe:    False   \n"     \
                        "*texture:      True    \n"
 #include "xlockmore.h"
@@ -1871,8 +1873,8 @@ rotate(GLfloat *pos, GLfloat *v, GLfloat *dv, GLfloat max_v)
 /* Window management, etc
  */
 
-static void
-reshape(int width, int height)
+void
+reshape_lament(ModeInfo *mi, int width, int height)
 {
   int target_size = 180;
   int win_size = (width > height ? height : width);
@@ -2109,7 +2111,7 @@ init_lament(ModeInfo *mi)
 
   if ((lc->glx_context = init_GL(mi)) != NULL)
     {
-      reshape(MI_WIDTH(mi), MI_HEIGHT(mi));
+      reshape_lament(mi, MI_WIDTH(mi), MI_HEIGHT(mi));
       gl_init(mi);
     }
 
@@ -2122,7 +2124,6 @@ init_lament(ModeInfo *mi)
 void
 draw_lament(ModeInfo *mi)
 {
-  static int tick = 0;
   lament_configuration *lc = &lcs[MI_SCREEN(mi)];
   Display *dpy = MI_DISPLAY(mi);
   Window window = MI_WINDOW(mi);
@@ -2134,6 +2135,8 @@ draw_lament(ModeInfo *mi)
 
   glXMakeCurrent(dpy, window, *(lc->glx_context));
   draw(mi);
+  if (mi->fps_p) do_fps (mi);
+
   glFinish();
   glXSwapBuffers(dpy, window);
 
@@ -2148,12 +2151,6 @@ draw_lament(ModeInfo *mi)
     lc->anim_pause--;
   else
     animate(mi);
-
-  if (++tick > 500)
-    {
-      tick = 0;
-      reshape(MI_WIDTH(mi), MI_HEIGHT(mi));
-    }
 }
 
 #endif /* USE_GL */
index 52cb6b48935d27805d9db81b50c2a317da9d5527..e3cedacdfd88adada3b6c61aa32e6185f4e03612 100644 (file)
@@ -3,7 +3,9 @@
 lament - animates the Lament Configuration
 .SH SYNOPSIS
 .B lament
-[\-display \fIhost:display.screen\fP] [\-window] [\-root] [\-install] [\-visual \fIvisual\fP] [\-texture] [\-no\-texture] [\-wireframe]
+[\-display \fIhost:display.screen\fP] [\-window] [\-root] [\-install]
+[\-visual \fIvisual\fP] [\-delay \fImicroseconds\fP] [\-fps]
+[\-texture] [\-no\-texture] [\-wireframe]
 .SH DESCRIPTION
 The \fIlament\fP program draws an animation of a particular puzzle box
 repeatedly solving itself.
@@ -32,6 +34,14 @@ Do not use texture maps.  This is boring and wrong.
 .TP 8
 .B \-wireframe
 Only draw outlines.
+.TP 8
+.B \-delay \fImicroseconds\fP
+How long to pause between frames.  Default is 10000, or 0.01 second.
+.TP 8
+.B \-fps
+Display a running tally of how many frames per second are being rendered.
+In conjunction with \fB\-delay 0\fP, this can be a useful benchmark of 
+your GL performance.
 .SH ENVIRONMENT
 .PP
 .TP 8
index b388a116d0b8eec7340611f2367a734bf428e81d..bb08482006fd548d15f9a43d34f3ed300f1f8f61 100644 (file)
@@ -82,9 +82,11 @@ static const char sccsid[] = "@(#)moebius.c  4.08 97/01/04 xlockmore";
 # define PROGCLASS                     "Moebius"
 # define HACK_INIT                     init_moebius
 # define HACK_DRAW                     draw_moebius
-# define moebius_opts                  xlockmore_opts
+# define HACK_RESHAPE          reshape_moebius
+# define moebius_opts          xlockmore_opts
 # define DEFAULTS                      "*cycles:               1       \n"                     \
                                                        "*delay:                20000   \n"                     \
+                                                       "*showFPS:      False   \n"                     \
                                                        "*wireframe:    False   \n"
 # include "xlockmore.h"                /* from the xscreensaver distribution */
 #else /* !STANDALONE */
@@ -151,6 +153,12 @@ typedef struct {
        GLfloat     ant_position;
        int         AreObjectsDefined[2];
        GLXContext *glx_context;
+
+  GLfloat rotx, roty, rotz;       /* current object rotation */
+  GLfloat dx, dy, dz;             /* current rotational velocity */
+  GLfloat ddx, ddy, ddz;          /* current rotational acceleration */
+  GLfloat d_max;                          /* max velocity */
+
 } moebiusstruct;
 
 static float front_shininess[] =
@@ -550,8 +558,8 @@ draw_moebius_strip(ModeInfo * mi)
 #undef MoebiusDivisions
 #undef MoebiusTransversals
 
-static void
-reshape(ModeInfo * mi, int width, int height)
+void
+reshape_moebius(ModeInfo * mi, int width, int height)
 {
        moebiusstruct *mp = &moebius[MI_SCREEN(mi)];
 
@@ -614,6 +622,79 @@ pinit(void)
        glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, front_specular);
 }
 
+
+
+/* lifted from lament.c */
+#define RAND(n) ((long) ((random() & 0x7fffffff) % ((long) (n))))
+#define RANDSIGN() ((random() & 1) ? 1 : -1)
+
+static void
+rotate(GLfloat *pos, GLfloat *v, GLfloat *dv, GLfloat max_v)
+{
+  double ppos = *pos;
+
+  /* tick position */
+  if (ppos < 0)
+    ppos = -(ppos + *v);
+  else
+    ppos += *v;
+
+  if (ppos > 1.0)
+    ppos -= 1.0;
+  else if (ppos < 0)
+    ppos += 1.0;
+
+  if (ppos < 0) abort();
+  if (ppos > 1.0) abort();
+  *pos = (*pos > 0 ? ppos : -ppos);
+
+  /* accelerate */
+  *v += *dv;
+
+  /* clamp velocity */
+  if (*v > max_v || *v < -max_v)
+    {
+      *dv = -*dv;
+    }
+  /* If it stops, start it going in the other direction. */
+  else if (*v < 0)
+    {
+      if (random() % 4)
+       {
+         *v = 0;
+
+         /* keep going in the same direction */
+         if (random() % 2)
+           *dv = 0;
+         else if (*dv < 0)
+           *dv = -*dv;
+       }
+      else
+       {
+         /* reverse gears */
+         *v = -*v;
+         *dv = -*dv;
+         *pos = -*pos;
+       }
+    }
+
+  /* Alter direction of rotational acceleration randomly. */
+  if (! (random() % 120))
+    *dv = -*dv;
+
+  /* Change acceleration very occasionally. */
+  if (! (random() % 200))
+    {
+      if (*dv == 0)
+       *dv = 0.00001;
+      else if (random() & 1)
+       *dv *= 1.2;
+      else
+       *dv *= 0.8;
+    }
+}
+
+
 void
 init_moebius(ModeInfo * mi)
 {
@@ -629,9 +710,28 @@ init_moebius(ModeInfo * mi)
        mp->step = NRAND(90);
        mp->ant_position = NRAND(90);
 
+    mp->rotx = frand(1.0) * RANDSIGN();
+    mp->roty = frand(1.0) * RANDSIGN();
+    mp->rotz = frand(1.0) * RANDSIGN();
+
+    /* bell curve from 0-1.5 degrees, avg 0.75 */
+    mp->dx = (frand(1) + frand(1) + frand(1)) / (360*2);
+    mp->dy = (frand(1) + frand(1) + frand(1)) / (360*2);
+    mp->dz = (frand(1) + frand(1) + frand(1)) / (360*2);
+
+    mp->d_max = mp->dx * 2;
+
+    mp->ddx = 0.00006 + frand(0.00003);
+    mp->ddy = 0.00006 + frand(0.00003);
+    mp->ddz = 0.00006 + frand(0.00003);
+
+    mp->ddx = 0.00001;
+    mp->ddy = 0.00001;
+    mp->ddz = 0.00001;
+
        if ((mp->glx_context = init_GL(mi)) != NULL) {
 
-               reshape(mi, MI_WIDTH(mi), MI_HEIGHT(mi));
+               reshape_moebius(mi, MI_WIDTH(mi), MI_HEIGHT(mi));
                glDrawBuffer(GL_BACK);
                if (!glIsList(objects))
                        objects = glGenLists(3);
@@ -666,14 +766,28 @@ draw_moebius(ModeInfo * mi)
                glScalef(Scale4Iconic * mp->WindH / mp->WindW, Scale4Iconic, Scale4Iconic);
        }
 
+    {
+      GLfloat x = mp->rotx;
+      GLfloat y = mp->roty;
+      GLfloat z = mp->rotz;
+      if (x < 0) x = 1 - (x + 1);
+      if (y < 0) y = 1 - (y + 1);
+      if (z < 0) z = 1 - (z + 1);
+      glRotatef(x * 360, 1.0, 0.0, 0.0);
+      glRotatef(y * 360, 0.0, 1.0, 0.0);
+      glRotatef(z * 360, 0.0, 0.0, 1.0);
+    }
+
        /* moebius */
-       glRotatef(mp->step * 100, 1, 0, 0);
-       glRotatef(mp->step * 95, 0, 1, 0);
-       glRotatef(mp->step * 90, 0, 0, 1);
        draw_moebius_strip(mi);
 
        glPopMatrix();
 
+    rotate(&mp->rotx, &mp->dx, &mp->ddx, mp->d_max);
+    rotate(&mp->roty, &mp->dy, &mp->ddy, mp->d_max);
+    rotate(&mp->rotz, &mp->dz, &mp->ddz, mp->d_max);
+
+    if (mi->fps_p) do_fps (mi);
        glFlush();
 
        glXSwapBuffers(display, window);
index 432186a6b292ec2d5faced807ec79b31668473fd..a2a383ab387ff21732278d16c231715339d736da 100644 (file)
@@ -67,9 +67,11 @@ static const char sccsid[] = "@(#)morph3d.c  4.07 97/11/24 xlockmore";
 # define PROGCLASS             "Morph3d"
 # define HACK_INIT             init_morph3d
 # define HACK_DRAW             draw_morph3d
-# define morph3d_opts          xlockmore_opts
-# define DEFAULTS              "*delay: 40000 \n" \
-                               "*count: 0 \n"
+# define HACK_RESHAPE  reshape_morph3d
+# define morph3d_opts  xlockmore_opts
+# define DEFAULTS              "*delay:                40000   \n"             \
+                                               "*showFPS:      False   \n"             \
+                                               "*count:                0               \n"
 # include "xlockmore.h"                /* from the xscreensaver distribution */
 #else /* !STANDALONE */
 # include "xlock.h"            /* from the xlockmore distribution */
@@ -650,8 +652,8 @@ draw_icosa(ModeInfo * mi)
        glDeleteLists(list, 1);
 }
 
-static void
-reshape(ModeInfo * mi, int width, int height)
+void
+reshape_morph3d(ModeInfo * mi, int width, int height)
 {
        morph3dstruct *mp = &morph3d[MI_SCREEN(mi)];
 
@@ -791,7 +793,7 @@ init_morph3d(ModeInfo * mi)
 
        if ((mp->glx_context = init_GL(mi)) != NULL) {
 
-               reshape(mi, MI_WIDTH(mi), MI_HEIGHT(mi));
+               reshape_morph3d(mi, MI_WIDTH(mi), MI_HEIGHT(mi));
                mp->object = MI_COUNT(mi);
                if (mp->object <= 0 || mp->object > 5)
                        mp->object = NRAND(5) + 1;
@@ -856,6 +858,8 @@ draw_morph3d(ModeInfo * mi)
 
        glPopMatrix();
 
+    if (mi->fps_p) do_fps (mi);
+
        glFlush();
 
        glXSwapBuffers(display, window);
index 926b7e332e4c769d6584bd559d3e0426479ee670..6a001d1831ba8088aaef127e411cf483294bb59e 100644 (file)
@@ -54,6 +54,7 @@ static const char sccsid[] = "@(#)pipes.c     4.07 97/11/24 xlockmore";
 # define PROGCLASS                                     "Pipes"
 # define HACK_INIT                                     init_pipes
 # define HACK_DRAW                                     draw_pipes
+# define HACK_RESHAPE                          reshape_pipes
 # define pipes_opts                                    xlockmore_opts
 # define DEFAULTS      "*delay:                100     \n"                     \
                                        "*count:                2       \n"                     \
@@ -490,8 +491,8 @@ MakeShape(ModeInfo * mi, int newdir)
        }
 }
 
-static void
-reshape(ModeInfo * mi, int width, int height)
+void
+reshape_pipes(ModeInfo * mi, int width, int height)
 {
        pipesstruct *pp = &pipes[MI_SCREEN(mi)];
 
@@ -635,7 +636,7 @@ init_pipes(ModeInfo * mi)
        pp->window = MI_WINDOW(mi);
        if ((pp->glx_context = init_GL(mi)) != NULL) {
 
-               reshape(mi, MI_WIDTH(mi), MI_HEIGHT(mi));
+               reshape_pipes(mi, MI_WIDTH(mi), MI_HEIGHT(mi));
                if (rotatepipes)
                  pp->initial_rotation = NRAND(180); /* jwz */
                else
index a6125c8154ed3a3e6b02feb0a01761ee19fbed3d..7c67b83537991a979bb68885711e3f631ace43f6 100644 (file)
 # define PROGCLASS                                             "Screensaver"
 # define HACK_INIT                                             init_screensaver
 # define HACK_DRAW                                             draw_screensaver
+# define HACK_RESHAPE                                  reshape_screensaver
 # define screensaver_opts                              xlockmore_opts
-#define        DEFAULTS                        "*light:                        False   \n" \
+#define        DEFAULTS                        "*delay:                        10000   \n" \
+                                                                               "*showFPS:          False   \n" \
+                                                                               "*light:                        False   \n" \
                                         "*wire:                                False   \n" \
                                         "*quads:                       5       \n" \
                                         "*blend:                       True    \n" \
@@ -61,7 +64,6 @@
                                         "*texture:                     False   \n" \
                                         "*texture_quality:     False   \n" \
                                         "*mipmap:                      False   \n" \
-                                        "*fps:                         False   \n" \
                                         "*doDepth:                     False   \n" \
                                                                                "*image:                        BUILTIN \n"
 
 /* Functions for handling the frames per second timer */
 #include "GL/glx.h"
 
-#ifndef SAMPLE_FRAMES
-#define SAMPLE_FRAMES 10
-#endif
-
 #undef countof
 #define countof(x) (sizeof((x))/sizeof((*x)))
 
 #define DEF_TEXTURE    "False"
 #define DEF_TEXTURE_QUALITY   "False"
 #define DEF_MIPMAP     "False"
-#define DEF_FPS                "False"
 #define DEF_DO_DEPTH   "False"
 #define DEF_IMAGE      "BUILTIN"
 
@@ -136,7 +133,6 @@ static int do_antialias;
 static int do_texture;
 static int do_texture_quality;
 static int do_mipmap;
-static int do_fps;
 static int do_depth;
 static char *which_image;
 
@@ -159,8 +155,6 @@ static XrmOptionDescRec opts[] = {
   {"+texture_quality",   ".pulsar.texture_quality",   XrmoptionNoArg, (caddr_t) "false" },
   {"-mipmap",   ".pulsar.mipmap",   XrmoptionNoArg, (caddr_t) "true" },
   {"+mipmap",   ".pulsar.mipmap",   XrmoptionNoArg, (caddr_t) "false" },
-  {"-fps",   ".pulsar.fps",   XrmoptionNoArg, (caddr_t) "true" },
-  {"+fps",   ".pulsar.fps",   XrmoptionNoArg, (caddr_t) "false" },
   {"-do_depth",   ".pulsar.doDepth",   XrmoptionNoArg, (caddr_t) "true" },
   {"+do_depth",   ".pulsar.doDepth",   XrmoptionNoArg, (caddr_t) "false" },
   {"-image",   ".pulsar.image",  XrmoptionSepArg, (caddr_t) NULL },
@@ -177,7 +171,6 @@ static argtype vars[] = {
   {(caddr_t *) &do_texture,    "texture",   "Texture",   DEF_TEXTURE,   t_Bool},
   {(caddr_t *) &do_texture_quality,    "texture_quality",   "Texture_quality",   DEF_TEXTURE_QUALITY,   t_Bool},
   {(caddr_t *) &do_mipmap,    "mipmap",   "Mipmap",   DEF_MIPMAP,   t_Bool},
-  {(caddr_t *) &do_fps,    "fps",   "fps",   DEF_FPS,   t_Bool},
   {(caddr_t *) &do_depth,    "doDepth",   "DoDepth",   DEF_DO_DEPTH,   t_Bool},
   {(caddr_t *) &which_image, "image",   "Image",   DEF_IMAGE,   t_String},
 };
@@ -194,7 +187,6 @@ static OptionStruct desc[] =
        {"-/+ texture", "whether to do enable texturing (much slower)"},
        {"-/+ texture_quality", "whether to do enable linear/mipmap filtering (much much slower)"},
        {"-/+ mipmap", "whether to do enable mipmaps (much slower)"},
-       {"-/+ fps", "whether to do enable frames per second meter (?)"},
        {"-/+ depth", "whether to do enable depth buffer checking (slower)"},
        {"-image <filename>", "texture image to load (PPM, PPM4, TIFF(?), XPM(?))"},
 };
@@ -230,128 +222,14 @@ struct quad
 
 };
 
-int global_width=WIDTH, global_height=HEIGHT;
-
 
-static GLint base;
-static int FrameCounter = 0;
-static double oldtime=-1., newtime=-1.;
-static char FPSstring[1024]="FPS: NONE"; 
-
-static float x_pos=0, y_pos=0;
-
-#define FONT "-*-courier-medium-r-normal-*-240-*"
 GLint quad_list;
 
 static float scale_x=1, scale_y=1, scale_z=1;
 static int frame = 0;
 
-static GLenum errCode;
-static const GLubyte *errString;
-
 struct quad *quads;
 
-int checkError(int line, char *file)
-{
-  if((errCode = glGetError()) != GL_NO_ERROR) {
-    errString = (GLubyte *)gluErrorString(errCode);
-    fprintf(stderr, "OpenGL error: %s detected at line %d in file %s\n", errString, line, file);
-    exit(1);
-  }
-  return 0;
-}
-
-
-void FPS_Setup(void)
-{
-  Display *Dpy;
-  XFontStruct *fontInfo;
-  Font id;
-  int first=0, last=255;
-
-  Dpy = XOpenDisplay(NULL);
-  fontInfo = XLoadQueryFont(Dpy, FONT);
-  if (fontInfo == NULL)
-    {
-      fprintf(stderr, "Failed to load font %s\n", FONT);
-      exit(1);
-    }
-
-  id = fontInfo->fid;
-  first = fontInfo->min_char_or_byte2;
-  last = fontInfo->max_char_or_byte2;
-  
-  base = glGenLists((GLuint) last+1);
-  if (base == 0) {
-    fprintf (stderr, "out of display lists\n");
-    exit(1);
-  }
-  glXUseXFont(id, first, last-first+1, base+first);
-
-}
-
-void PrintString(float x, float y, char *string)
-{
-  int len, i;
-
-  /* save the current state */
-  /* note: could be expensive! */
-  glPushAttrib(GL_ALL_ATTRIB_BITS);
-  glMatrixMode(GL_PROJECTION);
-  glLoadIdentity();
-  gluOrtho2D(0, global_width, 0, global_height);
-  glMatrixMode(GL_MODELVIEW);
-  glLoadIdentity();
-
-  /* disable lighting and texturing when drawing bitmaps! */
-  glDisable(GL_TEXTURE_2D);
-  glDisable(GL_LIGHTING);
-  glDisable(GL_BLEND);
-
-  /* draw a black background */
-
-  /* draw the text */
-  glColor3f(1,1,1);
-  glRasterPos2f( x, y);
-  len = (int) strlen(string);
-  for (i = 0; i < len; i++) {
-       if (glIsList(base+string[i]))
-         glCallList(base+string[i]);
-       else
-         fprintf(stderr, "%d+string[%d] is not a display list!\n", base, i);
-  }
-
-  /* clean up after our state changes */
-  glPopAttrib();
-}
-
-double gettime(void)
-{
-  struct timeval now;
-#ifdef GETTIMEOFDAY_TWO_ARGS
-  struct timezone tzp;
-  gettimeofday(&now, &tzp);
-#else
-  gettimeofday(&now);
-#endif
-  return (double) (now.tv_sec + (((double) now.tv_usec) * 0.000001));
-}
-
-void DoFPS(void)
-{
-  /* every SAMPLE_FRAMES frames, get the time and use it to get the 
-     frames per second */
-  if (!(FrameCounter % SAMPLE_FRAMES)) {
-    oldtime = newtime;
-    newtime = gettime();
-    sprintf(FPSstring, "FPS: %.02f", SAMPLE_FRAMES/(newtime-oldtime));
-  }
-
-  PrintString(x_pos,y_pos,FPSstring);
-
-  FrameCounter++;
-}
-
 GLubyte *Generate_Image(int *width, int *height, int *format)
 {
   GLubyte *result;
@@ -668,18 +546,12 @@ void initializeGL(GLsizei width, GLsizei height)
 {
   GLfloat fogColor[4] = { 0.1, 0.1, 0.1, 0.1 };
 
-  global_width=width;
-  global_height=height;
-
   glViewport( 0, 0, width, height ); 
   resetProjection();
 
   if (do_depth)
        glEnable(GL_DEPTH_TEST);
 
-  if (do_fps)
-       FPS_Setup();
-
   if (do_antialias) {
        do_blend = 1;
        glEnable(GL_LINE_SMOOTH);
@@ -739,10 +611,9 @@ void drawQuads(void) {
     }
 }
 
-GLvoid drawScene(void
+GLvoid drawScene(ModeInfo * mi
 {
-
-  checkError(__LINE__, __FILE__);
+  check_gl_error ("drawScene");
   glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
 
   /* we have to do this here because the FPS meter turns these 3 features off!! */
@@ -776,9 +647,7 @@ GLvoid drawScene(void)
   /* increment frame-counter */
   frame++;
 
-  if (do_fps)
-       DoFPS();
-  checkError(__LINE__, __FILE__);
+  check_gl_error ("drawScene");
 }
 
 
@@ -792,15 +661,16 @@ void draw_screensaver(ModeInfo * mi)
        return;
 
   glXMakeCurrent(display, window, *(gp->glx_context));
-  drawScene();
+  drawScene(mi);
+  if (mi->fps_p) do_fps (mi);
   glXSwapBuffers(display, window);
 }
 
 /* Standard reshape function */
-static void
-reshape(int width, int height)
+void
+reshape_screensaver(ModeInfo *mi, int width, int height)
 {
-  glViewport( 0, 0, global_width, global_height );
+  glViewport( 0, 0, MI_WIDTH(mi), MI_HEIGHT(mi) );
   resetProjection();
 }
 
@@ -819,7 +689,7 @@ init_screensaver(ModeInfo * mi)
 
   gp->window = MI_WINDOW(mi);
   if ((gp->glx_context = init_GL(mi)) != NULL) {
-       reshape(MI_WIDTH(mi), MI_HEIGHT(mi));
+       reshape_screensaver(mi, MI_WIDTH(mi), MI_HEIGHT(mi));
        initializeGL(MI_WIDTH(mi), MI_HEIGHT(mi));
   } else {
        MI_CLEARWINDOW(mi);
@@ -842,4 +712,3 @@ void release_screensaver(ModeInfo * mi)
   FreeAllGL(mi);
 }
 #endif
-
index 3c651a629c8e1b730e2b466213ee518009079e75..b6603daa19409f0fb64502f0f4290783e35097fb 100644 (file)
@@ -126,9 +126,11 @@ static const char sccsid[] = "@(#)rubik.c  4.07 97/11/24 xlockmore";
 # define PROGCLASS     "Rubik"
 # define HACK_INIT     init_rubik
 # define HACK_DRAW     draw_rubik
+# define HACK_RESHAPE reshape_rubik
 # define rubik_opts    xlockmore_opts
 # define DEFAULTS      "*delay: 40000 \n"              \
                                        "*count: -30 \n"                \
+                                       "*showFPS: False \n"    \
                                        "*cycles: 5 \n"                 \
                                        "*size:  -6 \n"
 # include "xlockmore.h"                                /* from the xscreensaver distribution */
@@ -383,7 +385,6 @@ typedef struct {
        RubikLoc   *rowLoc[MAXORIENT];
        RubikMove   movement;
        GLfloat     rotatestep;
-       GLfloat     PX, PY, VX, VY;
        GLXContext *glx_context;
        int         AreObjectsDefined[1];
 } rubikstruct;
@@ -1611,12 +1612,7 @@ shuffle(ModeInfo * mi)
                        evalmovement(mi, move);
                rp->moves[i] = move;
        }
-       rp->VX = 0.05;
-       if (NRAND(100) < 50)
-               rp->VX *= -1;
-       rp->VY = 0.05;
-       if (NRAND(100) < 50)
-               rp->VY *= -1;
+
        rp->movement.face = NO_FACE;
        rp->rotatestep = 0;
        rp->action = hideshuffling ? ACTION_SOLVE : ACTION_SHUFFLE;
@@ -1624,8 +1620,8 @@ shuffle(ModeInfo * mi)
        rp->done = 0;
 }
 
-static void
-reshape(ModeInfo * mi, int width, int height)
+void
+reshape_rubik(ModeInfo * mi, int width, int height)
 {
        rubikstruct *rp = &rubik[MI_SCREEN(mi)];
 
@@ -1681,12 +1677,9 @@ init_rubik(ModeInfo * mi)
        rp = &rubik[screen];
        rp->step = NRAND(90);
 
-       rp->PX = ((float) LRAND() / (float) RAND_MAX) * 2 - 1;
-       rp->PY = ((float) LRAND() / (float) RAND_MAX) * 2 - 1;
-
        if ((rp->glx_context = init_GL(mi)) != NULL) {
 
-               reshape(mi, MI_WIDTH(mi), MI_HEIGHT(mi));
+               reshape_rubik(mi, MI_WIDTH(mi), MI_HEIGHT(mi));
                objects = glGenLists(1);
                pinit(mi);
        } else {
@@ -1697,8 +1690,6 @@ init_rubik(ModeInfo * mi)
 void
 draw_rubik(ModeInfo * mi)
 {
-       int         bounced = 0;
-
        rubikstruct *rp = &rubik[MI_SCREEN(mi)];
        Display    *display = MI_DISPLAY(mi);
        Window      window = MI_WINDOW(mi);
@@ -1717,43 +1708,19 @@ draw_rubik(ModeInfo * mi)
 
        glTranslatef(0.0, 0.0, -10.0);
 
-       rp->PX += rp->VX;
-       rp->PY += rp->VY;
+    {
+      static int frame = 0;
+      GLfloat x, y, z;
+#     define SINOID(SCALE,SIZE) \
+        ((((1 + sin((frame * (SCALE)) / 2 * M_PI)) / 2.0) * (SIZE)) - (SIZE)/2)
+      x = SINOID(0.0071, 2.0);
+      y = SINOID(0.0053, 2.0);
+      z = SINOID(0.0037, 4.0);
+      frame++;
+      glTranslatef(x, y, z);
+    }
 
-       if (rp->PY < -1) {
-               rp->PY += (-1) - (rp->PY);
-               rp->VY = -rp->VY;
-               bounced = 1;
-       }
-       if (rp->PY > 1) {
-               rp->PY -= (rp->PY) - 1;
-               rp->VY = -rp->VY;
-               bounced = 1;
-       }
-       if (rp->PX < -1) {
-               rp->PX += (-1) - (rp->PX);
-               rp->VX = -rp->VX;
-               bounced = 1;
-       }
-       if (rp->PX > 1) {
-               rp->PX -= (rp->PX) - 1;
-               rp->VX = -rp->VX;
-               bounced = 1;
-       }
-       if (bounced) {
-               rp->VX += ((float) LRAND() / (float) RAND_MAX) * 0.02 - 0.01;
-               rp->VX += ((float) LRAND() / (float) RAND_MAX) * 0.02 - 0.01;
-               if (rp->VX > 0.06)
-                       rp->VX = 0.06;
-               if (rp->VY > 0.06)
-                       rp->VY = 0.06;
-               if (rp->VX < -0.06)
-                       rp->VX = -0.06;
-               if (rp->VY < -0.06)
-                       rp->VY = -0.06;
-       }
        if (!MI_IS_ICONIC(mi)) {
-               glTranslatef(rp->PX, rp->PY, 0);
                glScalef(Scale4Window * rp->WindH / rp->WindW, Scale4Window, Scale4Window);
        } else {
                glScalef(Scale4Iconic * rp->WindH / rp->WindW, Scale4Iconic, Scale4Iconic);
@@ -1764,6 +1731,7 @@ draw_rubik(ModeInfo * mi)
        glRotatef(rp->step * 90, 0, 0, 1);
 
        draw_cube(mi);
+    if (mi->fps_p) do_fps (mi);
        glXSwapBuffers(display, window);
 
        if (rp->action == ACTION_SHUFFLE) {
index 3a753a998a45121bf9ed26bcf91d39e659bb4f82..8e946659b9a8f6dc6f51290290b991c88818c1a0 100644 (file)
@@ -38,13 +38,15 @@ static const char sccsid[] = "@(#)sierpinski3D.c    00.01 99/11/04 xlockmore";
 # define PROGCLASS                                     "Sierpinski3D"
 # define HACK_INIT                                     init_gasket
 # define HACK_DRAW                                     draw_gasket
+# define HACK_RESHAPE                          reshape_gasket
 # define gasket_opts                           xlockmore_opts
-# define DEFAULTS      "*count:                1       \n"                     \
-                       "*cycles:               9999    \n"                     \
-                       "*delay:                20000   \n"                     \
-                       "*maxDepth:             5       \n"                     \
-                       "*speed:                150     \n"                     \
-                       "*wireframe:    False   \n"
+# define DEFAULTS                                      "*count:                1       \n"                     \
+                                                                       "*cycles:               9999    \n"                     \
+                                                                       "*delay:                20000   \n"                     \
+                                                                       "*maxDepth:             5       \n"                     \
+                                                                       "*speed:                150     \n"                     \
+                                                                       "*showFPS:      False   \n"                     \
+                                                                       "*wireframe:    False   \n"
 # include "xlockmore.h"                /* from the xscreensaver distribution */
 #else  /* !STANDALONE */
 # include "xlock.h"                    /* from the xlockmore distribution */
@@ -86,10 +88,11 @@ typedef struct{
 } GL_VECTOR;
 
 typedef struct {
-  GLfloat     view_rotx, view_roty, view_rotz;
-  GLfloat     light_colour[4];/* = {6.0, 6.0, 6.0, 1.0}; */
-  GLfloat     pos[3];/* = {0.0, 0.0, 0.0}; */
-  GLfloat     xinc,yinc,zinc;
+  GLfloat rotx, roty, rotz;       /* current object rotation */
+  GLfloat dx, dy, dz;             /* current rotational velocity */
+  GLfloat ddx, ddy, ddz;          /* current rotational acceleration */
+  GLfloat d_max;                          /* max velocity */
+
   GLfloat     angle;
   GLuint      gasket1;
   GLXContext *glx_context;
@@ -97,6 +100,10 @@ typedef struct {
 
   int current_depth;
 
+  int ncolors;
+  XColor *colors;
+  int ccolor;
+
 } gasketstruct;
 
 static gasketstruct *gasket = NULL;
@@ -335,40 +342,67 @@ compile_gasket(ModeInfo *mi)
 static void
 draw(ModeInfo *mi)
 {
+  Bool wireframe_p = MI_IS_WIREFRAME(mi);
   gasketstruct *gp = &gasket[MI_SCREEN(mi)];
   static int tick = 0;
   
-  static float position0[] = {-0.5,  1.2, 0.5, 0.0};
-  static float ambient0[]  = {0.4, 0.6, 0.4, 1.0};
-  static float spec[]      = {0.7, 0.7, 0.7, 1.0};
+  static GLfloat pos[4] = {-4.0, 3.0, 10.0, 1.0};
+  static float white[]  = {1.0, 1.0, 1.0, 1.0};
+  static float color[]  = {0.0, 0.0, 0.0, 1.0};
+
+  glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
+
+  if (!wireframe_p)
+    {
+      glColor4fv (white);
 
-  glLightfv(GL_LIGHT0, GL_POSITION,  position0);
-  glLightfv(GL_LIGHT0, GL_AMBIENT,   ambient0);
-  glLightfv(GL_LIGHT0, GL_SPECULAR,  spec);
-  glLightfv(GL_LIGHT0, GL_DIFFUSE,   gp->light_colour);
+      glLightfv(GL_LIGHT0, GL_POSITION,  pos);
 
-  glShadeModel(GL_SMOOTH);
+      color[0] = gp->colors[gp->ccolor].red   / 65536.0;
+      color[1] = gp->colors[gp->ccolor].green / 65536.0;
+      color[2] = gp->colors[gp->ccolor].blue  / 65536.0;
+      gp->ccolor++;
+      if (gp->ccolor >= gp->ncolors) gp->ccolor = 0;
 
-  glEnable(GL_LIGHTING);
-  glEnable(GL_LIGHT0);
+      glMaterialfv (GL_FRONT, GL_AMBIENT_AND_DIFFUSE, color);
+
+      glShadeModel(GL_SMOOTH);
+
+      glEnable(GL_LIGHTING);
+      glEnable(GL_LIGHT0);
+    }
 
   glEnable(GL_DEPTH_TEST);
   glEnable(GL_NORMALIZE);
   glEnable(GL_CULL_FACE);
 
-  glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
-
   glPushMatrix();
-  glTranslatef( gp->pos[0], gp->pos[1], gp->pos[2] );  
 
-  glPushMatrix();
-  glRotatef(2*gp->angle, 1.0, 0.0, 0.0);
-  glRotatef(3*gp->angle, 0.0, 1.0, 0.0);
-  glRotatef(  gp->angle, 0.0, 0.0, 1.0);
+  {
+    static int frame = 0;
+    GLfloat x, y, z;
+
+#   define SINOID(SCALE,SIZE) \
+      ((((1 + sin((frame * (SCALE)) / 2 * M_PI)) / 2.0) * (SIZE)) - (SIZE)/2)
+    x = SINOID(0.0071, 8.0);
+    y = SINOID(0.0053, 6.0);
+    z = SINOID(0.0037, 15.0);
+    frame++;
+    glTranslatef(x, y, z);
+
+    x = gp->rotx;
+    y = gp->roty;
+    z = gp->rotz;
+    if (x < 0) x = 1 - (x + 1);
+    if (y < 0) y = 1 - (y + 1);
+    if (z < 0) z = 1 - (z + 1);
+    glRotatef(x * 360, 1.0, 0.0, 0.0);
+    glRotatef(y * 360, 0.0, 1.0, 0.0);
+    glRotatef(z * 360, 0.0, 0.0, 1.0);
+  }
+
   glScalef( 8.0, 8.0, 8.0 );
   glCallList(gp->gasket1);
-  
-  glPopMatrix();
 
   glPopMatrix();
 
@@ -385,17 +419,13 @@ draw(ModeInfo *mi)
       compile_gasket (mi);
       glEndList();
 
-      /* do the colour change */
-      gp->light_colour[0] = 3.0*SINF(gp->angle/20.0) + 4.0;
-      gp->light_colour[1] = 3.0*SINF(gp->angle/30.0) + 4.0;
-      gp->light_colour[2] = 3.0*SINF(gp->angle/60.0) + 4.0;
     }
 }
 
 
 /* new window size or exposure */
-static void
-reshape(int width, int height)
+void
+reshape_gasket(ModeInfo *mi, int width, int height)
 {
   GLfloat h = (GLfloat) height / (GLfloat) width;
 
@@ -411,9 +441,6 @@ reshape(int width, int height)
   glLoadIdentity();
   glTranslatef(0.0, 0.0, -15.0);
   
-  /* The depth buffer will be cleared, if needed, before the
-  * next frame.  Right now we just want to black the screen.
-  */
   glClear(GL_COLOR_BUFFER_BIT);
 }
 
@@ -422,16 +449,6 @@ pinit(ModeInfo *mi)
 {
   gasketstruct *gp = &gasket[MI_SCREEN(mi)];
 
-  gp->xinc = 0.1*(1.0*random()/RAND_MAX);
-  gp->yinc = 0.1*(1.0*random()/RAND_MAX);
-  gp->zinc = 0.1*(1.0*random()/RAND_MAX);
-  gp->light_colour[0] = 6.0;
-  gp->light_colour[1] = 6.0;
-  gp->light_colour[2] = 6.0;
-  gp->light_colour[3] = 1.0;
-  gp->pos[0] = 0.0;     
-  gp->pos[1] = 0.0;
-  gp->pos[2] = 0.0;    
   /* draw the gasket */
   gp->gasket1 = glGenLists(1);
   gp->current_depth = 1;       /* start out at level 1, not 0 */
@@ -440,9 +457,83 @@ pinit(ModeInfo *mi)
   glEndList();
 }
 
+
+
+/* lifted from lament.c */
+#define RAND(n) ((long) ((random() & 0x7fffffff) % ((long) (n))))
+#define RANDSIGN() ((random() & 1) ? 1 : -1)
+
+static void
+rotate(GLfloat *pos, GLfloat *v, GLfloat *dv, GLfloat max_v)
+{
+  double ppos = *pos;
+
+  /* tick position */
+  if (ppos < 0)
+    ppos = -(ppos + *v);
+  else
+    ppos += *v;
+
+  if (ppos > 1.0)
+    ppos -= 1.0;
+  else if (ppos < 0)
+    ppos += 1.0;
+
+  if (ppos < 0) abort();
+  if (ppos > 1.0) abort();
+  *pos = (*pos > 0 ? ppos : -ppos);
+
+  /* accelerate */
+  *v += *dv;
+
+  /* clamp velocity */
+  if (*v > max_v || *v < -max_v)
+    {
+      *dv = -*dv;
+    }
+  /* If it stops, start it going in the other direction. */
+  else if (*v < 0)
+    {
+      if (random() % 4)
+       {
+         *v = 0;
+
+         /* keep going in the same direction */
+         if (random() % 2)
+           *dv = 0;
+         else if (*dv < 0)
+           *dv = -*dv;
+       }
+      else
+       {
+         /* reverse gears */
+         *v = -*v;
+         *dv = -*dv;
+         *pos = -*pos;
+       }
+    }
+
+  /* Alter direction of rotational acceleration randomly. */
+  if (! (random() % 120))
+    *dv = -*dv;
+
+  /* Change acceleration very occasionally. */
+  if (! (random() % 200))
+    {
+      if (*dv == 0)
+       *dv = 0.00001;
+      else if (random() & 1)
+       *dv *= 1.2;
+      else
+       *dv *= 0.8;
+    }
+}
+
+
 void
 init_gasket(ModeInfo *mi)
 {
+  Bool wireframe_p = MI_IS_WIREFRAME(mi);
   int           screen = MI_SCREEN(mi);
   gasketstruct *gp;
 
@@ -455,14 +546,36 @@ init_gasket(ModeInfo *mi)
   gp = &gasket[screen];
 
   gp->window = MI_WINDOW(mi);
-  gp->view_rotx = NRAND(360);
-  gp->view_roty = NRAND(360);
-  gp->view_rotz = NRAND(360);
-  gp->angle = NRAND(360)/90.0;
+
+  gp->rotx = frand(1.0) * RANDSIGN();
+  gp->roty = frand(1.0) * RANDSIGN();
+  gp->rotz = frand(1.0) * RANDSIGN();
+
+  /* bell curve from 0-1.5 degrees, avg 0.75 */
+  gp->dx = (frand(1) + frand(1) + frand(1)) / (360*2);
+  gp->dy = (frand(1) + frand(1) + frand(1)) / (360*2);
+  gp->dz = (frand(1) + frand(1) + frand(1)) / (360*2);
+
+  gp->d_max = gp->dx * 2;
+
+  gp->ddx = 0.00006 + frand(0.00003);
+  gp->ddy = 0.00006 + frand(0.00003);
+  gp->ddz = 0.00006 + frand(0.00003);
+
+  gp->ddx = 0.00001;
+  gp->ddy = 0.00001;
+  gp->ddz = 0.00001;
+
+
+  gp->ncolors = 255;
+  gp->colors = (XColor *) calloc(gp->ncolors, sizeof(XColor));
+  make_smooth_colormap (0, 0, 0,
+                        gp->colors, &gp->ncolors,
+                        False, 0, False);
 
   if ((gp->glx_context = init_GL(mi)) != NULL)
   {
-    reshape(MI_WIDTH(mi), MI_HEIGHT(mi));
+    reshape_gasket(mi, MI_WIDTH(mi), MI_HEIGHT(mi));
     pinit(mi);
   }
   else
@@ -478,7 +591,6 @@ draw_gasket(ModeInfo * mi)
   Display      *display = MI_DISPLAY(mi);
   Window        window = MI_WINDOW(mi);
   int           angle_incr = 1;
-  int           rot_incr = 1;/*MI_COUNT(mi) ? MI_COUNT(mi) : 1;*/
 
   if (!gp->glx_context) return;
 
@@ -492,16 +604,12 @@ draw_gasket(ModeInfo * mi)
 
   /* rotate */
   gp->angle = (int) (gp->angle + angle_incr) % 360;
-  if ( FABSF( gp->pos[0] ) > 8.0 ) gp->xinc = -1.0 * gp->xinc;
-  if ( FABSF( gp->pos[1] ) > 6.0 ) gp->yinc = -1.0 * gp->yinc;
-  if ( FABSF( gp->pos[2] ) >15.0 ) gp->zinc = -1.0 * gp->zinc;
-  gp->pos[0] += gp->xinc;
-  gp->pos[1] += gp->yinc;
-  gp->pos[2] += gp->zinc;    
-  gp->view_rotx = (int) (gp->view_rotx + rot_incr) % 360;
-  gp->view_roty = (int) (gp->view_roty +(rot_incr/2.0)) % 360;
-  gp->view_rotz = (int) (gp->view_rotz +(rot_incr/3.0)) % 360;
 
+  rotate(&gp->rotx, &gp->dx, &gp->ddx, gp->d_max);
+  rotate(&gp->roty, &gp->dy, &gp->ddy, gp->d_max);
+  rotate(&gp->rotz, &gp->dz, &gp->ddz, gp->d_max);
+
+  if (mi->fps_p) do_fps (mi);
   glFinish();
   glXSwapBuffers(display, window);
 }
index 31852987bcd1239c538ee2fd50a5ec6bf23cc6ab..d79ffe579d10a660cc3858465d84f66c8f4e4563 100644 (file)
@@ -658,7 +658,6 @@ NextSproingieDisplay(int screen,int pause)
        DisplaySproingies(screen,pause);
 }
 
-#if 0
 void
 ReshapeSproingies(int w, int h)
 {
@@ -670,8 +669,6 @@ ReshapeSproingies(int w, int h)
        glLoadIdentity();
 }
 
-#endif
-
 void
 CleanupSproingies(int screen)
 {
index f27f14d14917a4f5af67e3a965388a562ef3b585..517c22da966b4c99e78e6d60efc8d241feba0b4f 100644 (file)
@@ -57,11 +57,14 @@ static const char sccsid[] = "@(#)sproingiewrap.c   4.07 97/11/24 xlockmore";
 # define PROGCLASS                                     "Sproingies"
 # define HACK_INIT                                     init_sproingies
 # define HACK_DRAW                                     draw_sproingies
+# define HACK_RESHAPE                          reshape_sproingies
 # define sproingies_opts                       xlockmore_opts
 # define DEFAULTS      "*delay:                20000   \n"                     \
                                        "*count:                5       \n"                     \
                                        "*cycles:               0       \n"                     \
                                        "*size:                 0       \n"                     \
+                                       "*showFPS:      False   \n"                     \
+                                       "*fpsTop:       True    \n"                     \
                                        "*wireframe:    False   \n"
 # include "xlockmore.h"                                /* from the xscreensaver distribution */
 #else  /* !STANDALONE */
@@ -90,11 +93,7 @@ ModStruct   sproingies_description =
 void        NextSproingie(int screen);
 void        NextSproingieDisplay(int screen,int pause);
 void        DisplaySproingies(int screen,int pause);
-
-#if 0
 void        ReshapeSproingies(int w, int h);
-
-#endif
 void        CleanupSproingies(int screen);
 void        InitSproingies(int wfmode, int grnd, int mspr, int screen, int numscreens, int mono);
 
@@ -114,9 +113,13 @@ static sproingiesstruct *sproingies = NULL;
 static Display *swap_display;
 static Window swap_window;
 
+static ModeInfo *global_mi_kludge;
+
 void
 SproingieSwap(void)
 {
+    ModeInfo *mi = global_mi_kludge;
+    if (mi->fps_p) do_fps (mi);
        glFinish();
        glXSwapBuffers(swap_display, swap_window);
 }
@@ -136,6 +139,8 @@ init_sproingies(ModeInfo * mi)
        sproingiesstruct *sp;
        int         wfmode = 0, grnd, mspr, w, h;
 
+    global_mi_kludge = mi;
+
        if (sproingies == NULL) {
                if ((sproingies = (sproingiesstruct *) calloc(MI_NUM_SCREENS(mi),
                                         sizeof (sproingiesstruct))) == NULL)
@@ -217,6 +222,13 @@ refresh_sproingies(ModeInfo * mi)
         */
 }
 
+void
+reshape_sproingies (ModeInfo *mi, int w, int h)
+{
+  ReshapeSproingies(w, h);
+}
+
+
 void
 release_sproingies(ModeInfo * mi)
 {
index 97808a0c86d14509c7688b6b89c3c2b696351faf..809325f3c410000ca6d509393cb2ec3ac2aa25be 100644 (file)
@@ -64,9 +64,11 @@ static const char sccsid[] = "@(#)stairs.c   4.07 97/11/24 xlockmore";
 # define PROGCLASS                     "Stairs"
 # define HACK_INIT                     init_stairs
 # define HACK_DRAW                     draw_stairs
+# define HACK_RESHAPE          reshape_stairs
 # define stairs_opts           xlockmore_opts
 # define DEFAULTS                      "*cycles:               1       \n"                     \
                                                        "*delay:                20000   \n"                     \
+                                                       "*showFPS:      False   \n"                     \
                                                        "*wireframe:    False   \n"
 # include "xlockmore.h"                /* from the xscreensaver distribution */
 #else /* !STANDALONE */
@@ -414,8 +416,8 @@ draw_stairs_internal(ModeInfo * mi)
                sp->sphere_position = 0;
 }
 
-static void
-reshape(ModeInfo * mi, int width, int height)
+void
+reshape_stairs(ModeInfo * mi, int width, int height)
 {
        stairsstruct *sp = &stairs[MI_SCREEN(mi)];
 
@@ -495,7 +497,7 @@ init_stairs(ModeInfo * mi)
 
        if ((sp->glx_context = init_GL(mi)) != NULL) {
 
-               reshape(mi, MI_WIDTH(mi), MI_HEIGHT(mi));
+               reshape_stairs(mi, MI_WIDTH(mi), MI_HEIGHT(mi));
                glDrawBuffer(GL_BACK);
                if (!glIsList(objects))
                        objects = glGenLists(1);
@@ -541,6 +543,7 @@ draw_stairs(ModeInfo * mi)
 
        glPopMatrix();
 
+    if (mi->fps_p) do_fps (mi);
        glFlush();
 
        glXSwapBuffers(display, window);
index afbefc8624912485fc0870c3d124ee61ff1b72ae..d29c37d8818f717784d69382cbc4a8c6227c5250 100644 (file)
@@ -38,6 +38,7 @@ extern XtAppContext app;
 #define PROGCLASS      "StarWars"
 #define HACK_INIT      init_sws
 #define HACK_DRAW      draw_sws
+#define HACK_RESHAPE   reshape_sws
 #define sws_opts       xlockmore_opts
 
 #define DEF_PROGRAM    ZIPPY_PROGRAM
@@ -56,6 +57,8 @@ extern XtAppContext app;
 
 
 #define DEFAULTS       "*delay:        40000 \n"                    \
+                       "*showFPS:      False \n"                    \
+                       "*fpsTop:       True \n"                     \
                        "*program:      " DEF_PROGRAM           "\n" \
                        "*lines:        " DEF_LINES             "\n" \
                        "*spin:         " DEF_SPIN              "\n" \
@@ -447,9 +450,10 @@ box (double width, double height, double depth)
 
 /* Window management, etc
  */
-static void
-reshape (sws_configuration *sc, int width, int height)
+void
+reshape_sws (ModeInfo *mi, int width, int height)
 {
+  sws_configuration *sc = &scs[MI_SCREEN(mi)];
   static Bool stars_done = False;
 
   glViewport (0, 0, (GLint) width, (GLint) height);
@@ -521,7 +525,7 @@ init_sws (ModeInfo *mi)
 
   if ((sc->glx_context = init_GL(mi)) != NULL) {
     gl_init(mi);
-    reshape(sc, MI_WIDTH(mi), MI_HEIGHT(mi));
+    reshape_sws (mi, MI_WIDTH(mi), MI_HEIGHT(mi));
   }
 
 
@@ -628,15 +632,6 @@ draw_sws (ModeInfo *mi)
 
   if (sc->intra_line_scroll >= sc->line_height)
     {
-      static time_t reshape_time = 0;
-      time_t now = time((time_t) 0);
-      if (reshape_time != now)  /* only poll for reshape once a second */
-        {
-          reshape_time = now;
-          XGetWindowAttributes (dpy, window, &mi->xgwa);
-          reshape(sc, MI_WIDTH(mi), MI_HEIGHT(mi));
-        }
-
       sc->intra_line_scroll = 0;
 
       /* Drop the oldest line off the end. */
@@ -695,6 +690,7 @@ draw_sws (ModeInfo *mi)
 
   glPopMatrix ();
 
+  if (mi->fps_p) do_fps (mi);
   glFinish();
   glXSwapBuffers(dpy, window);
 
index a83229633a1ed2f4d811e0b2142bf2541e636a22..8b52ae7d9476535ff2ab1e30d835f8ece29407a7 100644 (file)
@@ -17,7 +17,7 @@ starwars - draws a perspective text crawl, like at the beginning of the movie
 .SH SYNOPSIS
 .B starwars
 [\-display \fIhost:display.screen\fP] [\-window] [\-root]
-[\-visual \fIvisual\fP] 
+[\-visual \fIvisual\fP] [\-delay \fImicroseconds\fP] [\-fps]
 [\-program \fIcommand\fP]
 [\-size \fIinteger\fP ]
 [\-columns \fIinteger\fP]
@@ -112,6 +112,11 @@ If the animation looks jerky to you, increase this number.
 .TP 8
 .B \-delay \fIusecs\fP
 The delay between steps of the animation; default is 40000 (1/25th second.)
+.TP 8
+.B \-fps
+Display a running tally of how many frames per second are being rendered.
+In conjunction with \fB\-delay 0\fP, this can be a useful benchmark of 
+your GL performance.
 .SH ENVIRONMENT
 .PP
 .TP 8
index a72478123ca94141925b6f61379603dfb3ab3f6c..6964d07425e9b9b66865cee86c55ed85afade31c 100644 (file)
@@ -125,6 +125,8 @@ int init_view(int *argc, char *argv[])
   XSizeHints hints;
   GLXContext glx_context = 0;
 
+  progname = argv[0];
+
   memset (&hints, 0, sizeof(hints));
 
   for (ix=1; ix<*argc; ix++)
@@ -359,6 +361,7 @@ void win_draw(void)
 {
   int ix;
   static GLfloat white[] = { 1.0, 1.0, 1.0, 1.0 };
+  static GLfloat gray[] =  { 0.6, 0.6, 0.6, 1.0 };
 
   glDrawBuffer(GL_BACK);
 
@@ -370,29 +373,32 @@ void win_draw(void)
   glRotatef(view_roty, 0.0, 1.0, 0.0);
   glRotatef(view_rotz, 0.0, 0.0, 1.0);
 
+  glShadeModel(GL_FLAT);
+
   for (ix=0; ix<NUM_ELS; ix++) {
     elem_t *el = &elist[ix];
 
-    glPushMatrix();
-
-    glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE,
-                 (wireframe ? white : el->col));
-    glShadeModel(GL_FLAT);
-    glBegin(wireframe ? GL_LINE_LOOP : GL_QUADS);
-
     glNormal3f(0.0, 0.0, 1.0);
-    glVertex3f(el->pos[0] - el->vervec[0], el->pos[1] - el->vervec[1], 
-      el->pos[2]);
-    glVertex3f(el->pos[0] + el->vervec[1], el->pos[1] - el->vervec[0], 
-      el->pos[2]);
-    glVertex3f(el->pos[0] + el->vervec[0], el->pos[1] + el->vervec[1], 
-      el->pos[2]);
-    glVertex3f(el->pos[0] - el->vervec[1], el->pos[1] + el->vervec[0], 
-      el->pos[2]);
 
+    /* outline the square */
+    glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, (wireframe ? white : gray));
+    glBegin(GL_LINE_LOOP);
+    glVertex3f(el->pos[0]-el->vervec[0], el->pos[1]-el->vervec[1], el->pos[2]);
+    glVertex3f(el->pos[0]+el->vervec[1], el->pos[1]-el->vervec[0], el->pos[2]);
+    glVertex3f(el->pos[0]+el->vervec[0], el->pos[1]+el->vervec[1], el->pos[2]);
+    glVertex3f(el->pos[0]-el->vervec[1], el->pos[1]+el->vervec[0], el->pos[2]);
     glEnd();
 
-    glPopMatrix();
+    if (wireframe) continue;
+
+    /* fill the square */
+    glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, el->col);
+    glBegin(GL_QUADS);
+    glVertex3f(el->pos[0]-el->vervec[0], el->pos[1]-el->vervec[1], el->pos[2]);
+    glVertex3f(el->pos[0]+el->vervec[1], el->pos[1]-el->vervec[0], el->pos[2]);
+    glVertex3f(el->pos[0]+el->vervec[0], el->pos[1]+el->vervec[1], el->pos[2]);
+    glVertex3f(el->pos[0]-el->vervec[1], el->pos[1]+el->vervec[0], el->pos[2]);
+    glEnd();
   }
 
   glPopMatrix();
index 55d7122e99e9918effe42c1481c4ccd79334c69f..b711debd7a3812ddccabe8c43edebf26074bc5c3 100644 (file)
@@ -86,6 +86,7 @@ static const char sccsid[] = "@(#)superquadrics.c     4.07 97/11/24 xlockmore";
 # define DEFAULTS      "*delay:                40000   \n"                     \
                                        "*count:                25      \n"                     \
                                        "*cycles:               40      \n"                     \
+                                       "*showFPS:      False   \n"                     \
                                        "*wireframe:    False   \n"
 # include "xlockmore.h"                                /* from the xscreensaver distribution */
 #else  /* !STANDALONE */
@@ -752,6 +753,7 @@ draw_superquadrics(ModeInfo * mi)
 
        NextSuperquadricDisplay(sp);
 
+    if (mi->fps_p) do_fps (mi);
        glFinish();
        glXSwapBuffers(display, window);
 }
index 8250e79cd125eff60cf35daab9424d6357ba0e9b..553a2cdd30242214b7d6163ba715240185f3844a 100644 (file)
@@ -19,6 +19,7 @@
 #include "xlockmoreI.h"
 
 #include <GL/gl.h>
+#include <GL/glu.h>
 #include <GL/glx.h>
 
 /* Gag -- we use this to turn X errors from glXCreateContext() into
@@ -136,3 +137,162 @@ check_gl_error (const char *type)
   fprintf (stderr, "%s: %s error: %s\n", progname, type, e);
   exit (1);
 }
+
+
+\f
+
+/* Frames-per-second statistics */
+
+static int fps_text_x = 10;
+static int fps_text_y = 10;
+static int fps_sample_frames = 10;
+static GLuint font_dlist;
+
+static void
+fps_init (ModeInfo *mi)
+{
+  const char *font = get_string_resource ("fpsFont", "Font");
+  XFontStruct *f;
+  Font id;
+  int first, last;
+
+  if (!font) font = "-*-courier-bold-r-normal-*-180-*";
+  f = XLoadQueryFont(mi->dpy, font);
+  if (!f) f = XLoadQueryFont(mi->dpy, "fixed");
+
+  id = f->fid;
+  first = f->min_char_or_byte2;
+  last = f->max_char_or_byte2;
+  
+  clear_gl_error ();
+  font_dlist = glGenLists ((GLuint) last+1);
+  check_gl_error ("glGenLists");
+
+  if (get_boolean_resource ("fpsTop", "FPSTop"))
+    fps_text_y = - (f->ascent + 10);
+
+  glXUseXFont(id, first, last-first+1, font_dlist + first);
+  check_gl_error ("glXUseXFont");
+}
+
+
+static void
+fps_print_string (ModeInfo *mi, GLfloat x, GLfloat y, const char *string)
+{
+  int i;
+  /* save the current state */
+  /* note: could be expensive! */
+
+  if (y < 0)
+    y = mi->xgwa.height + y;
+
+  clear_gl_error ();
+  glPushAttrib(GL_ALL_ATTRIB_BITS);
+  {
+    check_gl_error ("glPushAttrib");
+
+    /* disable lighting and texturing when drawing bitmaps!
+       (glPopAttrib() restores these, I believe.)
+     */
+    glDisable(GL_TEXTURE_2D);
+    glDisable(GL_LIGHTING);
+    glDisable(GL_BLEND);
+
+    /* glPopAttrib() does not restore matrix changes, so we must
+       push/pop the matrix stacks to be non-intrusive there.
+     */
+    glMatrixMode(GL_PROJECTION);
+    glPushMatrix();
+    {
+      check_gl_error ("glPushMatrix");
+      glLoadIdentity();
+
+      /* Each matrix mode has its own stack, so we need to push/pop
+         them separately. */
+      glMatrixMode(GL_MODELVIEW);
+      glPushMatrix();
+      {
+        check_gl_error ("glPushMatrix");
+        glLoadIdentity();
+
+        gluOrtho2D(0, mi->xgwa.width, 0, mi->xgwa.height);
+        check_gl_error ("gluOrtho2D");
+
+        /* draw the text */
+        glColor3f (1, 1, 1);
+        glRasterPos2f (x, y);
+        for (i = 0; i < strlen(string); i++)
+          glCallList (font_dlist + (int)string[i]);
+
+        check_gl_error ("fps_print_string");
+      }
+      glPopMatrix();
+    }
+    glMatrixMode(GL_PROJECTION);
+    glPopMatrix();
+
+  }
+  /* clean up after our state changes */
+  glPopAttrib();
+  check_gl_error ("glPopAttrib");
+}
+
+
+void
+do_fps (ModeInfo *mi)
+{
+  /* every N frames, get the time and use it to get the frames per second */
+  static int frame_counter = -1;
+  static double oldtime = 0; /* time in usecs, as a double */
+  static double newtime = 0;
+
+  static char msg [1024] = { 0, };
+
+  if (frame_counter == -1)
+    {
+      fps_init (mi);
+      frame_counter = fps_sample_frames;
+    }
+
+  if (frame_counter++ == fps_sample_frames)
+    {
+      double fps;
+      struct timeval now;
+# ifdef GETTIMEOFDAY_TWO_ARGS
+      struct timezone tzp;
+      gettimeofday(&now, &tzp);
+# else
+      gettimeofday(&now);
+# endif
+
+      oldtime = newtime;
+      newtime = now.tv_sec + ((double) now.tv_usec * 0.000001);
+
+      fps = fps_sample_frames / (newtime - oldtime);
+
+      if (fps < 0.0001)
+        {
+          strcpy(msg, "FPS: (accumulating...)");
+        }
+      else
+        {
+          sprintf(msg, "FPS: %.02f", fps);
+
+          if (mi->pause != 0)
+            {
+              char buf[40];
+              sprintf(buf, "%f", mi->pause / 1000000.0); /* FTSO C */
+              while(*buf && buf[strlen(buf)-1] == '0')
+                buf[strlen(buf)-1] = 0;
+              if (buf[strlen(buf)-1] == '.')
+                buf[strlen(buf)-1] = 0;
+              sprintf(msg + strlen(msg), " (including %s sec/frame delay)",
+                      buf);
+            }
+        }
+
+      frame_counter = 0;
+    }
+
+  fps_print_string (mi, fps_text_x, fps_text_y, msg);
+}
index cfd212c4f9505a6bd601767be7c1898b2d48eb29..10a46f73cb24b24200aff39b83bd875e74367319 100644 (file)
@@ -134,8 +134,8 @@ static int solve_delay, pre_solve_delay, post_solve_delay;
 static int logo_x, logo_y;
 
 #ifdef XSCREENSAVER_LOGO
-# define logo_width  128
-# define logo_height 128
+# define logo_width  50
+# define logo_height 50
 #else
 # include  <X11/bitmaps/xlogo64>
 # define logo_width xlogo64_width
@@ -1128,17 +1128,23 @@ draw_maze_border (void)                         /* draw the maze outline */
       Window r;
       int x, y;
       unsigned int w, h, bw, d;
+
+      /* round up to grid size */
+      int ww = ((logo_width  / grid_width) + 1)  * grid_width;
+      int hh = ((logo_height / grid_height) + 1) * grid_height;
+
       XGetGeometry (dpy, logo_map, &r, &x, &y, &w, &h, &bw, &d);
       if (d == 1)
         XCopyPlane (dpy, logo_map, win, logo_gc,
                     0, 0, w, h,
-                    border_x + 3 + grid_width * logo_x,
-                    border_y + 3 + grid_height * logo_y, 1);
+                    border_x + 3 + grid_width  * logo_x + ((ww - w) / 2),
+                    border_y + 3 + grid_height * logo_y + ((hh - h) / 2),
+                    1);
       else
         XCopyArea (dpy, logo_map, win, logo_gc,
                    0, 0, w, h,
-                   border_x + 3 + grid_width * logo_x,
-                   border_y + 3 + grid_height * logo_y);
+                   border_x + 3 + grid_width  * logo_x + ((ww - w) / 2),
+                   border_y + 3 + grid_height * logo_y + ((hh - h) / 2));
     }
   draw_solid_square (start_x, start_y, WALL_TOP >> start_dir, tgc);
   draw_solid_square (end_x, end_y, WALL_TOP >> end_dir, tgc);
@@ -1605,10 +1611,6 @@ XrmOptionDescRec options[] = {
   { 0, 0, 0, 0 }
 };
 
-#ifdef XSCREENSAVER_LOGO
-extern void xscreensaver_logo (Display *,Drawable,Colormap, Bool next_frame_p);
-#endif
-
 void
 screenhack(Display *display, Window window)
 {
@@ -1690,12 +1692,11 @@ screenhack(Display *display, Window window)
   
 #ifdef XSCREENSAVER_LOGO
   {
-    int w, h;
-    /* round up to grid size */
-    w = ((logo_width  / grid_width) + 1)  * grid_width;
-    h = ((logo_height / grid_height) + 1) * grid_height;
-    logo_map = XCreatePixmap (dpy, win, w, h, xgwa.depth);
-    xscreensaver_logo (dpy, logo_map, xgwa.colormap, False);
+    unsigned long *pixels; /* ignored - unfreed */
+    int npixels;
+    logo_map = xscreensaver_logo (dpy, win, xgwa.colormap, bg,
+                                  &pixels, &npixels,
+                                  logo_width > 150);
   }
 #else
   if  (!(logo_map = XCreateBitmapFromData (dpy, win, logo_bits,
index 0695cf37252d480a6b566f15f78730f35c027f27..39f33479185112a346c428127d283773cede1d8c 100644 (file)
@@ -483,6 +483,7 @@ static void setupBlotsDuo (void)
     if (blotCount >= origRequest)
     {
        /* return immediately if this satisfies the original count request */
+       requestedBlotCount = origRequest;
        return;
     }
 
index 53f56aa925c2ae992f4a302bd7aae868b43b4f64..0fa608aa5b257fcd59edb3ce3dbd676a72061835 100644 (file)
@@ -38,7 +38,7 @@
  * software for any purpose.  It is provided "as is" without express or 
  * implied warranty.
  *
- * $Revision: 1.18 $
+ * $Revision: 1.19 $
  *
  * Version 1.0 April 27, 1998.
  * - Initial version
 # undef HAVE_PING
 #endif
 
+
+#ifdef HAVE_PING
+# if defined(__DECC) || defined(_IP_VHL)
+   /* This is how you do it on DEC C, and possibly some BSD systems. */
+#  define IP_HDRLEN(ip)   ((ip)->ip_vhl & 0x0F)
+# else
+   /* This is how you do it on everything else. */
+#  define IP_HDRLEN(ip)   ((ip)->ip_hl)
+# endif
+#endif /* HAVE_PING */
+
+
 /* Forward References */
 
 #ifdef HAVE_PING
@@ -1043,13 +1055,7 @@ getping(sonar_info *si, ping_info *pi)
 
        gettimeofday(&now, (struct timezone *) 0);
        ip = (struct ip *) packet;
-
-       iphdrlen = ip->ip_hl << 2;
-        /* On DEC OSF1 4.0, the preceeding line needs to be
-           iphdrlen = (ip->ip_vhl & 0x0F) << 2;
-           but I don't know how to do this portably.  -- jwz.
-         */
-
+        iphdrlen = IP_HDRLEN(ip) << 2;
        icmph = (struct ICMP *) &packet[iphdrlen];
 
        /* Was the packet a reply?? */
@@ -1645,7 +1651,7 @@ Sonar(sonar_info *si, Bogie *bl)
     /* Check for expired tagets and remove them from the visable list */
 
     prev = NULL;
-    for (bp = si->visable; bp != NULL; bp = bp->next) {
+    for (bp = si->visable; bp != NULL; bp = (bp ? bp->next : 0)) {
 
        /*
         * Remove it from the visable list if it's expired or we have
index 9927d6eee8c33c0449045bbe6dbf995bcae66734..6ca7164f6c79ea73ad7689f5a2c9dae8156c00d9 100644 (file)
@@ -1,5 +1,5 @@
 /* xlockmore.c --- xscreensaver compatibility layer for xlockmore modules.
- * xscreensaver, Copyright (c) 1997, 1998 Jamie Zawinski <jwz@jwz.org>
+ * xscreensaver, Copyright (c) 1997, 1998, 2001 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
@@ -63,7 +63,8 @@ pre_merge_options (void)
   /* Add extra args, if they're mentioned in the defaults... */
   {
     char *args[] = { "-count", "-cycles", "-delay", "-ncolors",
-                    "-size", "-wireframe", "-use3d", "-useSHM" };
+                    "-size", "-wireframe", "-use3d", "-useSHM",
+                     "-showFPS" };
     for (j = 0; j < countof(args); j++)
       if (strstr(app_defaults, args[j]+1))
        {
@@ -103,6 +104,17 @@ pre_merge_options (void)
              new->argKind = XrmoptionNoArg;
              new->value = "False";
            }
+         else if (!strcmp(new->option, "-showFPS"))
+           {
+             new->option = "-fps";
+             new->argKind = XrmoptionNoArg;
+             new->value = "True";
+             new = &options[i++];
+             new->option = "-no-fps";
+             new->specifier = options[i-2].specifier;
+             new->argKind = XrmoptionNoArg;
+             new->value = "False";
+           }
          else
            {
              new->argKind = XrmoptionSepArg;
@@ -197,6 +209,26 @@ xlockmore_read_resources (void)
 }
 
 
+static void
+xlockmore_handle_events (ModeInfo *mi, 
+                         void (*reshape) (ModeInfo *, int, int))
+{
+  while (XPending (mi->dpy))
+    {
+      XEvent event;
+      XNextEvent (mi->dpy, &event);
+      if (reshape && event.xany.type == ConfigureNotify)
+        {
+          XGetWindowAttributes (mi->dpy, mi->window, &mi->xgwa);
+          reshape (mi, mi->xgwa.width, mi->xgwa.height);
+        }
+      else
+        {
+          screenhack_handle_event (mi->dpy, &event);
+        }
+    }
+}
+
 
 void 
 xlockmore_screenhack (Display *dpy, Window window,
@@ -206,6 +238,7 @@ xlockmore_screenhack (Display *dpy, Window window,
                      Bool want_bright_colors,
                      void (*hack_init) (ModeInfo *),
                      void (*hack_draw) (ModeInfo *),
+                     void (*hack_reshape) (ModeInfo *, int, int),
                      void (*hack_free) (ModeInfo *))
 {
   ModeInfo mi;
@@ -309,6 +342,7 @@ xlockmore_screenhack (Display *dpy, Window window,
 
   mi.wireframe_p = get_boolean_resource ("wireframe", "Boolean");
   mi.root_p = (window == RootWindowOfScreen (mi.xgwa.screen));
+  mi.fps_p = get_boolean_resource ("showFPS", "Boolean");
 #ifdef HAVE_XSHM_EXTENSION
   mi.use_shm = get_boolean_resource ("useSHM", "Boolean");
 #endif /* !HAVE_XSHM_EXTENSION */
@@ -330,7 +364,7 @@ xlockmore_screenhack (Display *dpy, Window window,
   do {
     hack_draw (&mi);
     XSync(dpy, False);
-    screenhack_handle_events (dpy);
+    xlockmore_handle_events (&mi, hack_reshape);
     if (mi.pause)
       usleep(mi.pause);
     mi.pause = orig_pause;
index c3e44705225b4cd8efedbc96bc671c70c57c38ca..1b19041dcc30a65c77ed3721fd59e19128864fb5 100644 (file)
@@ -1,5 +1,5 @@
 /* xlockmore.h --- xscreensaver compatibility layer for xlockmore modules.
- * xscreensaver, Copyright (c) 1997, 1998 Jamie Zawinski <jwz@jwz.org>
+ * xscreensaver, Copyright (c) 1997, 1998, 2001 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
@@ -37,8 +37,9 @@ ERROR!  Sorry, xlockmore.h requires ANSI C (gcc, for example.)
   extern GLXContext *init_GL (ModeInfo *);
   extern void clear_gl_error (void);
   extern void check_gl_error (const char *type);
+  extern void do_fps (ModeInfo *);
 # define FreeAllGL(dpy) /* */
-#endif
+#endif /* !USE_GL */
 
 /* Accessor macros for the ModeInfo structure
  */
@@ -128,6 +129,12 @@ extern void HACK_DRAW(ModeInfo *);
 # define HACK_FREE 0
 #endif
 
+#ifdef HACK_RESHAPE
+  extern void HACK_RESHAPE(ModeInfo *, int width, int height);
+#else
+# define HACK_RESHAPE 0
+#endif
+
 
 /* Emit code for the entrypoint used by screenhack.c, and pass control
    down into xlockmore.c with the appropriate parameters.
@@ -165,6 +172,7 @@ void screenhack (Display *dpy, Window window)
 
                        HACK_INIT,
                        HACK_DRAW,
+                       HACK_RESHAPE,
                        HACK_FREE);
 }
 
index 2813c754a7c8b79587b157cae39a06ffcaf5c976..ef7b51d8a5d6d9d32ef639005bad0db3b67c2c47 100644 (file)
@@ -1,5 +1,5 @@
 /* xlockmore.h --- xscreensaver compatibility layer for xlockmore modules.
- * xscreensaver, Copyright (c) 1997, 1998 Jamie Zawinski <jwz@jwz.org>
+ * xscreensaver, Copyright (c) 1997, 1998, 2001 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
@@ -70,6 +70,8 @@ typedef struct ModeInfo {
   Bool wireframe_p;
   Bool is_drawn;
 
+  Bool fps_p;
+
 #ifdef HAVE_XSHM_EXTENSION
   Bool use_shm;
   XShmSegmentInfo shm_info;
@@ -107,6 +109,7 @@ extern void xlockmore_screenhack (Display *dpy, Window window,
                                  Bool want_bright_colors,
                                  void (*hack_init) (ModeInfo *),
                                  void (*hack_draw) (ModeInfo *),
+                                 void (*hack_reshape) (ModeInfo *, int, int),
                                  void (*hack_free) (ModeInfo *));
 
 #endif /* __XLOCKMORE_INTERNAL_H__ */
index c3702d0b3534b874efdb773826bdf9627d45a7dd..a8dae1383ec8ef3b5410050f3a9139fa42a833a0 100644 (file)
@@ -109,7 +109,8 @@ OBJS                = alpha.o colors.o fade.o grabscreen.o hsv.o overlay.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 xdbe.h
-LOGOS          = logo.gif logo.xpm logo.eps
+LOGOS          = logo-180.gif logo-180.xpm logo-50.gif logo-50.xpm \
+                 logo-big.gif logo.eps
 EXTRAS         = README Makefile.in ad2c
 VMSFILES       = compile_axp.com compile_decc.com vms-gtod.c vms-gtod.h \
                  vms-strdup.c
@@ -258,8 +259,8 @@ xmu.o: ../config.h
 logo.o: $(srcdir)/utils.h
 logo.o: ../config.h
 logo.o: $(srcdir)/resources.h
-logo.o: $(srcdir)/yarandom.h
-logo.o: $(srcdir)/spline.h
+logo.o: $(srcdir)/logo-50.xpm
+logo.o: $(srcdir)/logo-180.xpm
 yarandom.o: ../config.h
 yarandom.o: $(srcdir)/yarandom.h
 erase.o: $(srcdir)/utils.h
index 71e56daa7a036dc0d0dc1d23674259c121f5a2c4..94d6acbd9672d9efb3038c3f21dc73a07d6f583d 100644 (file)
@@ -77,16 +77,18 @@ static void
 complain (int wanted_colors, int got_colors,
          Bool wanted_writable, Bool got_writable)
 {
-  if (wanted_writable && !got_writable)
-    fprintf(stderr,
-           "%s: wanted %d writable colors; got %d read-only colors.\n",
-           progname, wanted_colors, got_colors);
-
-  else if (wanted_colors > (got_colors + 10))
+  if (got_colors > wanted_colors - 10)
     /* don't bother complaining if we're within ten pixels. */
-    fprintf(stderr, "%s: wanted %d%s colors; got %d.\n",
-           progname, wanted_colors, (got_writable ? " writable" : ""),
-           got_colors);
+    return;
+
+  if (wanted_writable && !got_writable)
+    fprintf (stderr,
+             "%s: wanted %d writable colors; got %d read-only colors.\n",
+             progname, wanted_colors, got_colors);
+  else
+    fprintf (stderr, "%s: wanted %d%s colors; got %d.\n",
+             progname, wanted_colors, (got_writable ? " writable" : ""),
+             got_colors);
 }
 
 
@@ -477,7 +479,7 @@ make_smooth_colormap (Display *dpy, Visual *visual, Colormap cmap,
   double v[MAXPOINTS];
   double total_s = 0;
   double total_v = 0;
-  Screen *screen = DefaultScreenOfDisplay(dpy); /* #### WRONG! */
+  Screen *screen = (dpy ? DefaultScreenOfDisplay(dpy) : 0); /* #### WRONG! */
 
   if (*ncolorsP <= 0) return;
 
@@ -560,7 +562,7 @@ make_uniform_colormap (Display *dpy, Visual *visual, Colormap cmap,
 {
   int ncolors = *ncolorsP;
   Bool wanted_writable = (allocate_p && writable_pP && *writable_pP);
-  Screen *screen = DefaultScreenOfDisplay(dpy); /* #### WRONG! */
+  Screen *screen = (dpy ? DefaultScreenOfDisplay(dpy) : 0); /* #### WRONG! */
 
   double S = ((double) (random() % 34) + 66) / 100.0;  /* range 66%-100% */
   double V = ((double) (random() % 34) + 66) / 100.0;  /* range 66%-100% */
@@ -606,7 +608,7 @@ make_random_colormap (Display *dpy, Visual *visual, Colormap cmap,
   Bool wanted_writable = (allocate_p && writable_pP && *writable_pP);
   int ncolors = *ncolorsP;
   int i;
-  Screen *screen = DefaultScreenOfDisplay(dpy); /* #### WRONG! */
+  Screen *screen = (dpy ? DefaultScreenOfDisplay(dpy) : 0); /* #### WRONG! */
 
   if (*ncolorsP <= 0) return;
 
diff --git a/utils/logo-180.gif b/utils/logo-180.gif
new file mode 100644 (file)
index 0000000..1355767
Binary files /dev/null and b/utils/logo-180.gif differ
diff --git a/utils/logo-180.xpm b/utils/logo-180.xpm
new file mode 100644 (file)
index 0000000..ab9c59b
--- /dev/null
@@ -0,0 +1,207 @@
+/* XPM */
+
+/* XScreenSaver Logo, designed by Angela Goodman <rzr_grl@yahoo.com>
+   Copyright (c) 2001 by Jamie Zawinski <jwz@jwz.org>
+   Unauthorized use or reproduction prohibited.
+
+   http://www.jwz.org/xscreensaver/
+ */
+
+static unsigned const char * const logo_180_xpm[] = {
+"180 180 16 1",
+"      c None    m None",
+".     c #020204 m #000000",
+"+     c #929291 m #000000",
+"@     c #A30204 m #000000",
+"#     c #604D28 m #000000",
+"$     c #600204 m #000000",
+"%     c #37332D m #000000",
+"&     c #2D0C05 m #000000",
+"*     c #A46E04 m #000000",
+"=     c #DBDBDA m #000000",
+"-     c #ED9E04 m #FFFFFF",
+";     c #797977 m #000000",
+">     c #B0B0AE m #000000",
+",     c #FEFEFC m #FFFFFF",
+"'     c #4F3504 m #000000",
+")     c #FD0204 m #FFFFFF",
+"                                                                                                                                                                                    ",
+"                                                                    .                                                                                                               ",
+"                                                                   ..                                                                                                               ",
+"                                                                   ...                                                                                                              ",
+"                                                                 . ...                                                                                                              ",
+"                                                                 .. ...                                                                                                             ",
+"                                                                 .&.....                                                                                                            ",
+"                                                                  &&....                                                                                                            ",
+"                                                                  .@&....                                                                                                           ",
+"                                                                   $).....                                                                                                          ",
+"                                                                   .)@....                                                                                                          ",
+"                                                                   .@)@....                                                                                                         ",
+"                                                                    &))$....                                                                                                        ",
+"                                                                    .)))&...                                                                                                        ",
+"                                                                    .@))@&...                                                                                                       ",
+"                                                                     $)))@....                                                                                                      ",
+"                                                                     &))))$....                                                                                                     ",
+"                                                                     .)))))&...                                                                                                     ",
+"                                                                      @))))@....                                                                                                    ",
+"                                                                      $)))))$&...                                                                                                   ",
+"                                                                      .)))))).&..                                                                                                   ",
+"                                                                      .))))))@....                     ..                                                                           ",
+"                                                                      .)))))))&'...                .. ...                                                                           ",
+"                                                                      .@)))))))%'..                .  ...                                                                           ",
+"                                                                       @)))))))$#&..              .. ...                                                                            ",
+"                                                                       $))))))))&#...            .& ....                                                                            ",
+"                                                                       &))))))))$*%..            &. ....                                                                            ",
+"                                                                       $))))))))@#*...          .$.....                                                                             ",
+"                                                                       &)))))))))&-'..         .@$.....                                                                             ",
+"                                                                       $)))))))))&-*..         &)......                                                                             ",
+"                                                                       &)))))))))@*-...       .@@.....                                                                              ",
+"                                                                       .)))))))))$*-&..       &)@.....                                                                              ",
+"                                                                       .)))))))))$**...      .@)$..&..                                                                              ",
+"                                                                       .)))))))))&-'..       &))$.&'..                                                                              ",
+"                                                                       $))))))))$'-...      .@))$.*'..                                                                              ",
+"                                                                       $)))))))).-'..       $)))&%-...                                                                              ",
+"                                                                       @)))))))$#-...      .))))&*-..                                                                               ",
+"                                                                      .@)))))))&-#..       &))))&-*..                                                                               ",
+"                                                                      .)))))))$*-...      .@))))&--...                                                                              ",
+"                  ....................................................$)))))))&-*.........&)))))&-*...............................................................                  ",
+"                 .....................................................@))))))$#-&.........$)))))&--.................................................................                ",
+"                .....................................................&)))))))&-*..........))))))$--..................................................................               ",
+"                .....................................................@))))))$*-'.........$))))))$*-..................................................................               ",
+"               .....+,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,+&))))))).--..;,,,,,,#@))))))@*-..;,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,=#....               ",
+"               ....%,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,=&)))))))@'-#..=,,,,,=&)))))))$*-..;,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,=....               ",
+"               ....;,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,%@)))))))&--&.%,,,,,,+$)))))))@#-..;,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,=....               ",
+"               ....+,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,%$)))))))@'-*..+,,,,,,%)))))))))&-%.#,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,=....               ",
+"               ....+,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,+$))))))))$*-'.&=,,,,,=&)))))))))&-'.&,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,=....               ",
+"               ....+,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,>.)))))))))&--..#,,,,,,;@)))))))))$-#..=,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,=....               ",
+"               ....+,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,=&@))))))))$*-*..>,,,,,,#@)))))))))$**..>,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,=....               ",
+"               ....+,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,=%@)))))))))&--'.&,,,,,,=&))))))))))@#-..+,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,=....               ",
+"               ....+,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,;$))))))))))%--..;,,,,,,>$)))))))))))%-&.#,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,=....               ",
+"               ....+,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,=&))))))))))@#--..+,,,,,,;@)))))))))))&-'.%,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,=....               ",
+"               ....+,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,>=,,,,,,,%@))))))))))$--#..=,,,,,,%))))))))))))$*#..=,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,=....               ",
+"               ....+,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,;.>,&&=,,+$)))))))))))&--'.%,,,,,,,&))))))))))))@'*..>,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,=....               ",
+"               ....+,,,,,,,,,,,,=>>>>>>+>>>>+>>>>+&$;#..;>>&)))))))))))@'--..%>>>>>>+&)))))))))))))&-&.%>>>>+>>>>+>>>>+>>>>+>>>>+>>>>+>>>>>>>>>>>>>>=,,,,,,,,,,,=....               ",
+"               ....+,,,,,,,,,,+...................@&.......$)))))))))))@#--..........$)))))))))))))$*#...............................................%>,,,,,,,,,=....               ",
+"               ....+,,,,,,,,,#...................&)........@)))))))))))@*-*..........@)))))))))))))@#*.................................................+,,,,,,,,=....               ",
+"               ....+,,,,,,,,+....................@@.......$))))))))))))$*-*..........@))))))))))))))&-&.................................................=,,,,,,,=....               ",
+"               ....+,,,,,,,=....................&)@.......)))))))))))))$--#..........@))))))))))))))$*#.................................................%,,,,,,,=....               ",
+"               ....+,,,,,,,>....................@)$......&)))))))))))))$*-*..........)))))))))))))))@'*..................................................,,,,,,,=....               ",
+"               ....+,,,,,,,+....................)).......$)))))))))))))@*-#..........))))))))))))))))&-..................................................>,,,,,,=....               ",
+"               ....+,,,,,,,+...................@)).......@)))))))))))))@#-*..........))))))))))))))))$#'.................................................>,,,,,,=....               ",
+"               ....+,,,,,,,+...................@)@......&)))))))))))))))%-*..........)))))))))))))))))&-.................................................>,,,,,,=....               ",
+"               ....+,,,,,,,+..................$))$......$)))))))))))))))&--..........)))))))))))))))))$*'................................................>,,,,,,=....               ",
+"               ....+,,,,,,,+..................@))&......$)))))))))))))))$*-&.........)))))))))))))))))@%-................................................>,,,,,,=....               ",
+"               ....+,,,,,,,+..................))).......@))))))))))))))))&-#.........))))))))))))))))))&*'...............................................>,,,,,,=....               ",
+"               ....+,,,,,,,+.................$))).......@))))))))))))))))$*-.........))))))))))))))))))@'*...............................................>,,,,,,=....               ",
+"               ....+,,,,,,,+.................@))@.......))))))))))))))))))&-&........)))))))))))))))))))$*'..............................................>,,,,,,=....               ",
+"               ....+,,,,,,,+.................)))@.%.....))))))))))))))))))$#*........@))))))))))))))))))@&-..............................................>,,,,,,=....               ",
+"               ....+,,,,,,,+................$)))$.*.....)))))))))))))))))))&*&.......$)))))))))))))))))))$*#.............................................>,,,,,,=....               ",
+"               ....+,,,,,,,+................@)))$'*.....@)))))))))))))))))))&*.......&))))))))))))))))))))&-&............................................>,,,,,,=....               ",
+"               ....+,,,,,,,+...............&))))$**..&%&@)))))))))))))))))))@%#...%&%.))))))))))))))))))))$#*...&%%&%%&%%&%%&%%&%%&%%....................>,,,,,,=....               ",
+"               ....+,,,,,,,+...............$))))$*-..+,;@))))))))))))))))))))$#%..+,,#@))))))))))))))))))))&-#..%,,,,,,,,,,,,,,,,,,,,=+..................>,,,,,,=....               ",
+"               ....+,,,,,,,+...............@))))$--..+,+@)))))))))))))))))))))&#...=,=&))))))))))))))))))))).-&..#,,,,,,,,,,,,,,,,,,,,,=.................>,,,,,,=....               ",
+"               ....+,,,,,,,+...............)))))$*-%.#,>$))))))))))))))))))))))&#...=,'@))))))))))))))))))))@%-%..;,,,,,,,,,,,,,,,,,,,,,#................>,,,,,,=....               ",
+"               ....+,,,,,,,+..............$)))))$--&.#,,&))))))))))))))))))))))@&'..%,>$)))))))))))))))))))))$#-...+,,,,,,,,,,,,,,,,,,,,>................>,,,,,,=....               ",
+"               ....+,,,,,,,+..............@)))))@*-#.%,,#@))))))))))))))))))))))@&'..%=%))))))))))))))))))))))&**...>,,,,,,,,,,,,,,,,,,,>................>,,,,,,=....               ",
+"               ....+,,,,,,,+..............@)))))@#-#..,,+$)))))))))))))))))))))))@&%..;+$)))))))))))))))))))))@&--..#,,,,,,,,,,,,,,,,,,,>................>,,,,,,=....               ",
+"               ....+,,,,,,,+.............&))))))@#-*..=,=&))))))))))))))))))))))))$'&..;%))))))))))))))))))))))@'-#..>,,,,,,,,,,,,,,,,,,>................>,,,,,,=....               ",
+"               ....+,,,,,,,+.............&)))))))&--..+,,'@))))))))))))))))))))))))&#...#$))))))))))))))))))))))&*-..#,,,,,,,,,,,,,,,,,,>................>,,,,,,=....               ",
+"               ....+,,,,,,,+.............@)))))))&--..#,,>$)))))))))))))))))))))))))&#....)))))))))))))))))))))))&-#..>,,,,,,,,,,,,,,,,,>................>,,,,,,=....               ",
+"               ....+,,,,,,,+.............@)))))))@#-#.&=,,&)))))))))))))))))))))))))@&#...$))))))))))))))))))))))$#-..#,,,,,,,,,,,,,,,,,>................>,,,,,,=....               ",
+"               ....+,,,,,,,+.............)))))))))#-*..>,,;@)))))))))))))))))))))))))@''...)))))))))))))))))))))))&-'..,,,,,,,,,,,,,,,,,>................>,,,,,,=....               ",
+"               ....+,,,,,,,+............&)))))))))&--&.#,,=&))))))))))))))))))))))))))&*&..&))))))))))))))))))))))@#*..>,,,,,,,,,,,,,,,,>................>,,,,,,=....               ",
+"               ....+,,,,,,,+............@)))))))))$*-'.&,,,#@))))))))))))))))))))))))))&*...@))))))))))))))))))))))&-..#,,,,,,,,,,,,,,,,>................>,,,,,,=....               ",
+"               ....+,,,,,,,+............@)))))))))@#-*..>,,=&))))))))))))))))))))))))))$##..$))))))))))))))))))))))@##..=,,,,,,,,,,,,,,,>................>,,,,,,=....               ",
+"               ....+,,,,,,,+............@))))))))))%--..#,,,%)))))))))))))))))))))))))))&-&..@))))))))))))))))))))))&*..+,,,,,,,,,,,,,,,>................>,,,,,,=....               ",
+"               ....+,,,,,,,+............)))))))))))$*-#..=,,>&))))))))))))))))))))))))))@#*..$))))))))))))))))))))))$*&.#,,,,,,,,,,,,,,,>................>,,,,,,=....               ",
+"               ....+,,,,,,,+............))))))))))))&--..#,,,%@))))))))))))))))))))))))))&-&..@)))))))))))))))))))))@''.%,,,,,,,,,,,,,,,>................>,,,,,,=....               ",
+"               ....+,,,,,,,+...........$))))))))))))&*-'..=,,+$))))))))))))))))))))))))))@#*..$))))))))))))))))))))))&#..=,,,,,,,,,,,,,,>................>,,,,,,=....               ",
+"               ....+,,,,,,,+...........$))))))))))))@'-*..;,,,&)))))))))))))))))))))))))))&-&..))))))))))))))))))))))$#..>,,,,,,,,,,,,,,>................>,,,,,,=....               ",
+"               ....+,,,,,,,+...........$)))))))))))))&*-'..=,,+$))))))))))))))))))))))))))$**..$))))))))))))))))))))))&..;,,,,,,,,,,,,,,>................>,,,,,,=....               ",
+"               ....+,,,,,,,+...........@)))))))))))))@'-*..;,,,.))))))))))))))))))))))))))@%-...))))))))))))))))))))))&%.%,,,,,,,,,,,,,,>................>,,,,,,=....               ",
+"               ....+,,,,,,,+...........@))))))))))))))$*-%..=,,;$))))))))))))))))))))))))))&-'..@)))))))))))))))))))))$&..,,,,,,,,,,,,,,>................>,,,,,,=....               ",
+"               ....+,,,,,,,+...........@)))))))))))))))&-*..%,,=&))))))))))))))))))))))))))@'-..$)))))))))))))))))))))@&..>,,,,,,,,,,,,,>................>,,,,,,=....               ",
+"               ....+,,,,,,,+...........@)))))))))))))))$#-#..>,,;@))))))))))))))))))))))))))&*&.&))))))))))))))))))))))...;,,,,,,,,,,,,,>................>,,,,,,=....               ",
+"               ....+,,,,,,,+...........@))))))))))))))))&*-&.&=,=.)))))))))))))))))))))))))))&&..))))))))))))))))))))))$..%,,,,,,,,,,,,,>................>,,,,,,=....               ",
+"               ....+,,,,,,,+...........@))))))))))))))))@&-#..+,,#@)))))))))))))))))))))))))))$.$))))))))))))))))))))))@...=,,,,,,,,,,,,>................>,,,,,,=....               ",
+"               ....+,,,,,,,+...........$)))))))))))))))))$#-%..=,>&)))))))))))))))))))))))))))))))))))))))))))))))))))))...>,,,,,,,,,,,,>................>,,,,,,=....               ",
+"               ....+,,,,,,,+...........$))))))))))))))))))$**..#,,#@))))))))))))))))))))))))))))))))))))))))))))))))))))...+,,,,,,,,,,,,>................>,,,,,,=....               ",
+"               ....+,,,,,,,+...........&))))))))))))))))))@&-'..>,>$))))))))))))))))))))))))))))))))))))))))))))))))))))$..#,,,,,,,,,,,,>................>,,,,,,=....               ",
+"               ....+,,,,,,,+............)))))))))))))))))))@%-..%,,&))))))))))))))))))))))))))))))))))))))))))))))))))))@..%,,,,,,,,,,,,>................>,,,,,,=....               ",
+"               ....+,,,,,,,+............@)))))))))))))))))))$##..;,#@)))))))))))))))))))))))))))))))))))))))))))))))))))@...,,,,,,,,,,,,>................>,,,,,,=....               ",
+"               ....+,,,,,,,+............$))))))))))))))))))))&*&.&=>$))))))))))))))))))))))))))))))))))))))))))))))))))))...=,,,,,,,,,,,>................>,,,,,,=....               ",
+"               ....+,,,,,,,+.............)))))))))))))))))))))%#..;,&))))))))))))))))))))))))))))))))))))))))))))))))))))&..>,,,,,,,,,,,>................>,,,,,,=....               ",
+"               ....+,,,,,,,+.............@))))))))))))))))))))$''..=#@)))))))))))))))))))))))))))))))))))))))))))))))))))$..;,,,,,,,,,,,>................>,,,,,,=....               ",
+"               ....+,,,,,,,+.............&)))))))))))))))))))))&#..#+$)))))))))))))))))))))))))))))))))))))))))))))))))))$..;,,,,,,,,,,,>................>,,,,,,=....               ",
+"               ....+,,,,,,,+..............@))))))))))))))))))))@&'..=$)))))))))))))))))))))))))))))))))))))))))))))))))))@..&,,,,,,,,,,,>................>,,,,,,=....               ",
+"               ....+,,,,,,,+..............$)))))))))))))))))))))$'..+&)))))))))))))))))))))))))))))))))))))))))))))))))))@...=,,,,,,,,,,>................>,,,,,,=....               ",
+"               ....+,,,,,,,+...............))))))))))))))))))))))...#%))))))))))))))))))))))))))))))))))))))))))))))))))))...=,,,,,,,,,,>................>,,,,,,=....               ",
+"               ....+,,,,,,,+...............$)))))))))))))))))))))$....))))))))))))))))))))))))))))))))))))))))))))))))))))...+,,,,,,,,,,>................>,,,,,,=....               ",
+"               ....+,,,,,,,+................))))))))))))))))))))))....))))))))))))))))))))))))))))))))))))))))))))))))))))...;,,,,,,,,,,>................>,,,,,,=....               ",
+"               ....+,,,,,,,+................$)))))))))))))))))))))$...@)))))))))))))))))))))))))))))))))))))))))))))))))))&&.#,,,,,,,,,,>................>,,,,,,=....               ",
+"               ....+,,,,,,,+.................))))))))))))))))))))))&..))))))))))))))))))))))))))))))))))))))))))))))))))))$%.%,,,,,,,,,,>................>,,,,,,=....               ",
+"               ....+,,,,,,,+.................$))))))))))))))))))))))&&))))))))))))))))))))))))))))))))))))))))))))))))))))$'..,,,,,,,,,,>................>,,,,,,=....               ",
+"               ....+,,,,,,,+.................&))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))$#..=,,,,,,,,,>................>,,,,,,=....               ",
+"               ....+,,,,,,,+.................+$)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))$*..>,,,,,,,,,>................>,,,,,,=....               ",
+"               ....+,,,,,,,+.................=%)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))$*..>,,,,,,,,,>................>,,,,,,=....               ",
+"               ....+,,,,,,,+.................,+&))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))&-..;,,,,,,,,,>................>,,,,,,=....               ",
+"               ....+,,,,,,,+.................,,#@)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))&-%.#,,,,,,,,,>................>,,,,,,=....               ",
+"               ....+,,,,,,,+.................,,=&)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))&-'.%,,,,,,,,,>................>,,,,,,=....               ",
+"               ....+,,,,,,,+.................,,,;$)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))@'-#.&,,,,,,,,,>................>,,,,,,=....               ",
+"               ....+,,,,,,,+.................,,,,&@))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))@*-*..=,,,,,,,,>................>,,,,,,=....               ",
+"               ....+,,,,,,,+.................,,,,>$))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))&--&..=,,,,,,,,>................>,,,,,,=....               ",
+"               ....+,,,,,,,+.................,,,,,#@)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))&-'..#,,,,,,,,,>................>,,,,,,=....               ",
+"               ....+,,,,,,,+.................,,,,,=&))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))$**..%,,,,,,,,,,>................>,,,,,,=....               ",
+"               ....+,,,,,,,+.................,,,,,,>&))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))).*..&=,,,,,,,,,,>................>,,,,,,=....               ",
+"               ....+,,,,,,,+.................,,,,,,,;$)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))$'...=,,,,,,,,,,,>................>,,,,,,=....               ",
+"               ....+,,,,,,,+.................,,,,,,,,%@)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))).&..;,,,,,,,,,,,,>................>,,,,,,=....               ",
+"               ....+,,,,,,,+.................=,,,,,,,=&)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))$...#,,,,,,,,,,,,,>................>,,,,,,=....               ",
+"               ....+,,,,,,,+.................>,,,,,,,,>&))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))...%,,,,,,,,,,,,,,+................>,,,,,,=....               ",
+"               ....+,,,,,,,+.................;,,,,,,,,,#$))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))&..&=,,,,,,,,,,,,,,%................>,,,,,,=....               ",
+"               ....+,,,,,,,+..................+,,,,,,,,,#$))))))))))))))))))))))))))))))))))))))))))))))))))))))))))@...=,,,,,,,,,,,,,,;.................>,,,,,,=....               ",
+"               ....+,,,,,,,+...................#+>>>>>>>>%@))))))))))))))))))))))))))))))))))))))))))))))))))))))))@...#>>>>>>>>>>>>>+#..................>,,,,,,=....               ",
+"               ....+,,,,,,,+...............................@)))))))))))))))))))))))))))))))))))))))))))))))))))))))&.....................................>,,,,,,=....               ",
+"               ....+,,,,,,,+................................@)))))))))))))))))))))))))))))))))))))))))))))))))))))&......................................>,,,,,,=....               ",
+"               ....+,,,,,,,+................................&@)))))))))))))))))))))))))))))))))))))))))))))))))))$.......................................>,,,,,,=....               ",
+"               ....+,,,,,,,+.................................&@)))))))))))))))))))))))))))))))))))))))))))))))))@........................................>,,,,,,=....               ",
+"               ....+,,,,,,,+..................................&@)))))))))))))))))))))))))))))))))))))))))))))))$.........................................>,,,,,,=....               ",
+"               ....+,,,,,,,+...................................&@)))))))))))))))))))))))))))))))))))))))))))))$..........................................>,,,,,,=....               ",
+"               ....+,,,,,,,+....................................&@)))))))))))))))))))))))))))))))))))))))))))$...........................................>,,,,,,=....               ",
+"               ....+,,,,,,,+......................................@)))))))))))))))))))))))))))))))))))))))))&............................................>,,,,,,=....               ",
+"               ....+,,,,,,,+.......................................$))))))))))))))))))))))))))))))))))))))@..............................................>,,,,,,=....               ",
+"               ....+,,,,,,,+.........................................@)))))))))))))))))))))))))))))))))))&...............................................>,,,,,,=....               ",
+"               ....+,,,,,,,+..........................................$))))))))))))))))))))))))))))))))@.................................................=,,,,,,=....               ",
+"               ....+,,,,,,,=............................................$))))))))))))))))))))))))))))$&.................................................&,,,,,,,=....               ",
+"               ....+,,,,,,,,%.............................................$@))))))))))))))))))))))@$&...................................................;,,,,,,,=....               ",
+"               ....+,,,,,,,,=................................................$@@))))))))))))))@@@&'#%..................................................%,,,,,,,,=....               ",
+"               ....+,,,,,,,,,=&...................................................$$@@@@@@@$$&''**'...................................................%=,,,,,,,,=....               ",
+"               ....+,,,,,,,,,,=+%%%#%%%%#%%%%#%%%%#%%%%#%%%%#%%%%#%%%%#%%..................#----'............%%%#%%%%#%%%%#%%%%#%%%%#%%%%#%%%%#%%%%##+,,,,,,,,,,=....               ",
+"               ....+,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,&..................&''..............=,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,=....               ",
+"               ....+,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,+....................................;,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,=....               ",
+"               ....+,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,&.....................................=,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,=....               ",
+"               ....+,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,#......................................%,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,=....               ",
+"               ....+,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,+........................................;,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,=....               ",
+"               ....+,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,>&.........................................>,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,=....               ",
+"               ....+,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,>............................................>,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,=....               ",
+"               ....+,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,>..............................................;,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,=....               ",
+"               ....+,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,#................................................#=,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,=....               ",
+"               ....+,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,>%..................................................&+,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,=....               ",
+"               ....+,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,>%......................................................%>,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,=....               ",
+"               ....+,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,=;%..........................................................&;=,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,=....               ",
+"               ....+,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,>................................................................+,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,=....               ",
+"               ....+,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,.................................................................%,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,=....               ",
+"               ....+,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,%................................................................#,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,=....               ",
+"               ....+,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,=;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+=,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,=....               ",
+"               ....+,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,=....               ",
+"               ....+,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,=....               ",
+"               ....+,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,=....               ",
+"               ....;,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,=....               ",
+"               ....&,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,>....               ",
+"                ....%;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>;.....               ",
+"                .....................................................................................................................................................               ",
+"                 ...................................................................................................................................................                ",
+"                 ..................................................................................................................................................                 ",
+"                   ...............................................................................................................................................                  ",
+"                                                                                                                                                                                    ",
+"                                                                                                                                                                                    ",
+"                                                                                                                                                                                    "};
diff --git a/utils/logo-50.gif b/utils/logo-50.gif
new file mode 100644 (file)
index 0000000..fcfcfd7
Binary files /dev/null and b/utils/logo-50.gif differ
diff --git a/utils/logo-50.xpm b/utils/logo-50.xpm
new file mode 100644 (file)
index 0000000..5ca5d63
--- /dev/null
@@ -0,0 +1,77 @@
+/* XPM */
+
+/* XScreenSaver Logo, designed by Angela Goodman <rzr_grl@yahoo.com>
+   Copyright (c) 2001 by Jamie Zawinski <jwz@jwz.org>
+   Unauthorized use or reproduction prohibited.
+
+   http://www.jwz.org/xscreensaver/
+ */
+
+static unsigned const char * const logo_50_xpm[] = {
+"50 50 16 1",
+"      c None    m None",
+".     c #050305 m #000000",
+"+     c #989798 m #000000",
+"@     c #A30805 m #000000",
+"#     c #5E4D34 m #000000",
+"$     c #A6531B m #000000",
+"%     c #620805 m #000000",
+"&     c #FA0204 m #FFFFFF",
+"*     c #A63013 m #000000",
+"=     c #CCCBCB m #000000",
+"-     c #B1B0AE m #000000",
+";     c #707070 m #000000",
+">     c #523410 m #000000",
+",     c #FCFCFA m #FFFFFF",
+"'     c #AC6C44 m #000000",
+")     c #24221C m #000000",
+"                                                  ",
+"                  ..                              ",
+"                  ..                              ",
+"                   @.                             ",
+"                   @@.                            ",
+"                   %&%                            ",
+"                    &&.     .                     ",
+"                    &&*.   ..                     ",
+"                    &&@>  %.                      ",
+"                    &&*.  @)                      ",
+"                   %&&#. @&#                      ",
+"     ..............@&*)..&&#.................     ",
+"    .+,,,,,,,,,,,,'&&$;,'&@#=,,,,,,,,,,,,,,,-.    ",
+"    .+,,,,,,,,,,,-&&*#=,@&&>-,,,,,,,,,,,,,,,-.    ",
+"    .+,,,,,,,,,,,@&&$#,=&&&*;,,,,,,,,,,,,,,,-.    ",
+"    .+,,=;;;;;>)*&&&'>;#&&&*>;;;;;;;;;;;;+,,-.    ",
+"    .+,=.....%..&&&&'..%&&&&>.............+,-.    ",
+"    .+,-.....@..&&&&$..%&&&&*.............;,-.    ",
+"    .+,+....%@.%&&&&$..%&&&&@)............;,-.    ",
+"    .+,-....@@.%&&&&&).%&&&&&*............;,-.    ",
+"    .+,-....&*>$&&&&&@);&&&&&@>#==-==;....;,-.    ",
+"    .+,-....&*>-&&&&&&%#*&&&&&*>-,,,,,....;,-.    ",
+"    .+,+...%&@#=&&&&&&&%)&&&&&&*#,,,,,....;,-.    ",
+"    .+,-...@&&$;'&&&&&&&)@&&&&&@>=,,,,....;,-.    ",
+"    .+,-...&&&$>=&&&&&&&@)&&&&&&*;,,,,....;,-.    ",
+"    .+,-...&&&&#-$&&&&&&&>@&&&&&@#,,,,....;,-.    ",
+"    .+,+...&&&&$>-&&&&&&&*%&&&&&&),,,,....;,-.    ",
+"    .+,-...&&&&&#+*&&&&&&&@&&&&&&%=,,,....;,-.    ",
+"    .+,-...&&&&&@>+&&&&&&&&&&&&&&%+,,,....;,-.    ",
+"    .+,-...@&&&&&%#&&&&&&&&&&&&&&@;,,,....;,-.    ",
+"    .+,+....&&&&&&)@&&&&&&&&&&&&&&>,,,....;,-.    ",
+"    .+,-....@&&&&&%%&&&&&&&&&&&&&&),,,....;,-.    ",
+"    .+,-....%&&&&&&&&&&&&&&&&&&&&&),,,....;,-.    ",
+"    .+,-....;*&&&&&&&&&&&&&&&&&&&&>=,,....;,-.    ",
+"    .+,+....;=&&&&&&&&&&&&&&&&&&&@#-,,....;,-.    ",
+"    .+,-....;,'&&&&&&&&&&&&&&&&&&*#,,,....;,-.    ",
+"    .+,-....;,,*&&&&&&&&&&&&&&&&@),,,,....;,-.    ",
+"    .+,-.....#;#@&&&&&&&&&&&&&&&.#;;;)....;,-.    ",
+"    .+,+.........@&&&&&&&&&&&&&%..........;,-.    ",
+"    .+,-..........@&&&&&&&&&&&............;,-.    ",
+"    .+,-...........%&&&&&&&&@.............;,-.    ",
+"    .+,,#)))))))))))..%@@@*)...))))))))))>,,-.    ",
+"    .+,,,,,,,,,,,,,,).........;,,,,,,,,,,,,,-.    ",
+"    .+,,,,,,,,,,,,,#...........-,,,,,,,,,,,,-.    ",
+"    .+,,,,,,,,,,,=#.............+,,,,,,,,,,,-.    ",
+"    .+,,,,,,,,,,#.................-,,,,,,,,,-.    ",
+"    .+,,,,,,,,,,==-=-=-=-=-=-=-=-=,,,,,,,,,,-.    ",
+"    .;++++++++++++++++++++++++++++++++++++++;.    ",
+"     ........................................     ",
+"                                                  "};
diff --git a/utils/logo-big.gif b/utils/logo-big.gif
new file mode 100644 (file)
index 0000000..5ea3da2
Binary files /dev/null and b/utils/logo-big.gif differ
index fcc12ff3c256b1f2b73a6b73491bd1fc9fe6ea46..f8d8e5d86cb62bd9ccdb93540f41ce68d9afbe19 100644 (file)
  * implied warranty.
  */
 
-/* This draws the XScreenSaver logo.
-   Logo designed by Angela Goodman <rzr_grl@yahoo.com>
+/* XScreenSaver Logo designed by Angela Goodman <rzr_grl@yahoo.com>
+ */
+
+/* I basically implemented libXPM here, because I don't want the
+   xscreensaver daemon to depend on libXPM for two reasons: first,
+   because I want the logo to show up even if libXPM is not installed
+   on the system; and second, I don't want to have to security-audit
+   libXPM.  The fewer libraries that are linked into the xscreensaver
+   daemon, the more likely to be secure it is.
+ */
 
-   The reason this C looks a lot like PostScript is that the logo was
-   designed in Illustrator, and then I (jwz) translated the EPS to C
-   by hand.
+/* If you are looking in here because you're trying to figure out how to
+   change the logo that xscreensaver displays on the splash screen and
+   password dialog, please don't.  The logo is xscreensaver's identity.
+   You wouldn't alter the name or copyright notice on a program that
+   you didn't write; please don't alter its logo either.
  */
 
 #include "utils.h"
 #include "resources.h"
-#include "yarandom.h"
-#include "spline.h"
-
-extern const char *progname;
-
-typedef struct {
-  Display *dpy;
-  Drawable drawable;
-  GC gc;
-
-  double x_scale;
-  double y_scale;
-  double translate_x;
-  double translate_y;
-  double current_x;
-  double current_y;
-  double path_x;
-  double path_y;
-
-  int y_origin;
-
-  unsigned long logo_bg_pixel;
-  unsigned long logo_fg_pixel;
-  unsigned long monitor_fg_pixel;
-  unsigned long monitor_bg_pixel;
-  unsigned long flame1_fg_pixel;
-  unsigned long flame1_bg_pixel;
-  unsigned long flame2_fg_pixel;
-  unsigned long flame2_bg_pixel;
-
-  XPoint points[1024];
-  int npoints;
-
-} logo_state;
-
-
-#undef UNDEF
-#define UNDEF -65535
-
-static void
-reset (logo_state *state)
-{
-  state->x_scale = 1;
-  state->y_scale = 1;
-  state->translate_x = 0;
-  state->translate_y = 0;
-  state->current_x = UNDEF;
-  state->current_y = UNDEF;
-  state->path_x = UNDEF;
-  state->path_y = UNDEF;
-  state->npoints = 0;
-}
-
-static void
-scale (logo_state *state, double x, double y)
-{
-  state->x_scale *= x;
-  state->y_scale *= y;
-}
-
-static void
-translate (logo_state *state, double x, double y)
-{
-  state->translate_x += x;
-  state->translate_y += y;
-}
-
-static void
-newpath (logo_state *state)
-{
-  state->current_x = UNDEF;
-  state->current_y = UNDEF;
-  state->path_x = UNDEF;
-  state->path_y = UNDEF;
-
-  state->npoints = 0;
-}
 
-static void
-moveto (logo_state *state, double x, double y)
-{
-  x += state->translate_x;
-  y += state->translate_y;
-  if (state->path_x == UNDEF)
+#include <stdio.h>
+#include <X11/Xutil.h>
+
+#include "logo-50.xpm"
+#include "logo-180.xpm"
+
+static const char hex[128] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+                              0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+                              0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+                              0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 0, 0, 0, 0, 0,
+                              0, 10,11,12,13,14,15,0, 0, 0, 0, 0, 0, 0, 0, 0,
+                              0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+                              0, 10,11,12,13,14,15,0, 0, 0, 0, 0, 0, 0, 0, 0,
+                              0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
+
+static XImage *
+parse_xpm_data (Display *dpy, Visual *visual, Colormap colormap, int depth,
+                unsigned long transparent_color,
+                unsigned const char * const * data,
+                int *width_ret, int *height_ret,
+                unsigned long **pixels_ret, int *npixels_ret)
+{
+  int w, h, ncolors, nbytes;
+  char c;
+  int i;
+  struct {
+    char byte;
+    int cr; int cg; int cb;
+    int mr; int mg; int mb;
+  } cmap[256];
+  unsigned char rmap[256];
+
+  unsigned long *pixels;
+  XImage *ximage = 0;
+
+  if (4 != sscanf (*data, "%d %d %d %d %c", &w, &h, &ncolors, &nbytes, &c))
+    abort();
+  if (ncolors < 1 || ncolors > 255)
+    abort();
+  if (nbytes != 1)
+    abort();
+  data++;
+  for (i = 0; i < ncolors; i++)
     {
-      state->path_x = x;
-      state->path_y = y;
+      const unsigned char *line = *data;
+      cmap[i].byte = *line++;
+      while (*line)
+        {
+          int r, g, b;
+          char which;
+          while (*line == ' ' || *line == '\t')
+            line++;
+          which = *line++;
+          if (which != 'c' && which != 'm')
+            abort();
+          while (*line == ' ' || *line == '\t')
+            line++;
+          if (!strncasecmp(line, "None", 4))
+            {
+              r = g = b = -1;
+              line += 4;
+            }
+          else
+            {
+              if (*line == '#')
+                line++;
+              r = (hex[(int) line[0]] << 4) | hex[(int) line[1]]; line += 2;
+              g = (hex[(int) line[0]] << 4) | hex[(int) line[1]]; line += 2;
+              b = (hex[(int) line[0]] << 4) | hex[(int) line[1]]; line += 2;
+            }
+
+          if (which == 'c')
+            {
+              cmap[i].cr = r;
+              cmap[i].cg = g;
+              cmap[i].cb = b;
+            }
+          else
+            {
+              cmap[i].mr = r;
+              cmap[i].mg = g;
+              cmap[i].mb = b;
+            }
+        }
+
+      data++;
     }
-  state->current_x = x;
-  state->current_y = y;
-}
 
-static void
-lineto (logo_state *state, double x, double y)
-{
-  int x1 =                   (int) (state->x_scale * state->current_x);
-  int y1 = state->y_origin - (int) (state->y_scale * state->current_y);
-  int x2 =                   (int) (state->x_scale * (x + state->translate_x));
-  int y2 = state->y_origin - (int) (state->y_scale * (y + state->translate_y));
+  if (depth == 1) transparent_color = 1;
 
-  if (state->current_x == UNDEF) abort();
-
-  if (state->npoints == 0 ||
-      state->points[state->npoints-1].x != x1 ||
-      state->points[state->npoints-1].y != y1)
+  pixels = (unsigned long *) calloc (ncolors+1, sizeof(*pixels));
+  for (i = 0; i < ncolors; i++)
     {
-      state->points[state->npoints].x = x1;
-      state->points[state->npoints].y = y1;
-      state->npoints++;
+      if (cmap[i].cr == -1) /* transparent */
+        {
+          rmap[(int) cmap[i].byte] = 255;
+        }
+      else
+        {
+          XColor color;
+          color.flags = DoRed|DoGreen|DoBlue;
+          color.red   = (cmap[i].cr << 8) | cmap[i].cr;
+          color.green = (cmap[i].cg << 8) | cmap[i].cg;
+          color.blue  = (cmap[i].cb << 8) | cmap[i].cb;
+          if (depth == 1 ||
+              !XAllocColor (dpy, colormap, &color))
+            {
+              color.pixel = (cmap[i].mr ? 1 : 0);
+            }
+          pixels[i] = color.pixel;
+          rmap[(int) cmap[i].byte] = i;
+        }
     }
-  state->points[state->npoints].x = x2;
-  state->points[state->npoints].y = y2;
-  state->npoints++;
-
-  moveto(state, x, y);
-}
-
-static void
-curveto (logo_state *state,
-         double x1, double y1,
-         double x2, double y2,
-         double x3, double y3)
-{
-  spline s;
-  double sx[4], sy[4];
-  int i;
-
-  if (state->current_x == UNDEF) abort();
-
-  sx[0] =                    state->x_scale * state->current_x;
-  sy[0] = state->y_origin - (state->y_scale * state->current_y);
-  sx[1] =                    state->x_scale * (x1 + state->translate_x);
-  sy[1] = state->y_origin - (state->y_scale * (y1 + state->translate_y));
-  sx[2] =                    state->x_scale * (x2 + state->translate_x);
-  sy[2] = state->y_origin - (state->y_scale * (y2 + state->translate_y));
-  sx[3] =                    state->x_scale * (x3 + state->translate_x);
-  sy[3] = state->y_origin - (state->y_scale * (y3 + state->translate_y));
-
-  memset(&s, 0, sizeof(s));
-  s.control_x = sx;
-  s.control_y = sy;
-  s.n_controls = 4;
 
-  s.allocated_points = 50;  /* just the initial buffer size */
-  s.points = (XPoint *) calloc (s.allocated_points, sizeof (*s.points));
-  compute_spline(&s);
-
-  for (i = 0; i < s.n_points; i++)
+  ximage = XCreateImage (dpy, visual, depth,
+                         (depth == 1 ? XYBitmap : ZPixmap),
+                         0, 0, w, h, 8, 0);
+  if (ximage)
     {
-      state->points[state->npoints].x = s.points[i].x;
-      state->points[state->npoints].y = s.points[i].y;
-      state->npoints++;
+      int x, y;
+      ximage->data = (char *)
+        calloc ( ximage->height, ximage->bytes_per_line);
+      for (y = 0; y < h; y++)
+        {
+          const unsigned char *line = *data++;
+          for (x = 0; x < w; x++)
+            {
+              int p = rmap[*line++];
+              XPutPixel (ximage, x, y,
+                         (p == 255 ? transparent_color : pixels[p]));
+            }
+        }
     }
-
-  state->current_x = (state->points[state->npoints-1].x
-                      / state->x_scale);
-  state->current_y = ((state->y_origin - state->points[state->npoints-1].y)
-                      / state->y_scale);
-  free (s.points);
-}
-
-
-static void
-closepath (logo_state *state)
-{
-  if (state->current_x != UNDEF)
-    lineto (state,
-            state->path_x - state->translate_x,
-            state->path_y - state->translate_y);
-}
-
-static void
-stroke (logo_state *state)
-{
-  XDrawLines (state->dpy, state->drawable, state->gc,
-              state->points, state->npoints,
-              CoordModeOrigin);
-}
-
-static void
-fill (logo_state *state)
-{
-  XFillPolygon (state->dpy, state->drawable, state->gc,
-                state->points, state->npoints,
-                Complex, CoordModeOrigin);
+  
+  *width_ret = w;
+  *height_ret = h;
+  *pixels_ret = pixels;
+  *npixels_ret = ncolors;
+  return ximage;
 }
 
-static void
-setlinewidth (logo_state *state, double w)
-{
-  XSetLineAttributes (state->dpy, state->gc,
-                      (int) (w * state->x_scale),
-                      LineSolid, CapRound, JoinRound);
-}
-
-static void
-setcolor (logo_state *state, unsigned long pixel)
-{
-  XSetForeground (state->dpy, state->gc, pixel);
-}
-
-
-static void
-border (logo_state *state)
-{
-  setlinewidth(state, 4);
-
-  newpath (state);
-  moveto (state, 390.7588, 335.9102);
-  lineto (state, 390.7588, 333.4834);
-  lineto (state, 388.5283, 331.5156);
-  lineto (state, 385.7754, 331.5156);
-  lineto (state, 220.2090, 331.5156);
-  lineto (state, 217.4570, 331.5156);
-  lineto (state, 215.2256, 333.4834);
-  lineto (state, 215.2256, 335.9102);
-  lineto (state, 215.2256, 481.3916);
-  lineto (state, 215.2256, 483.8184);
-  lineto (state, 217.4570, 485.7856);
-  lineto (state, 220.2090, 485.7856);
-  lineto (state, 385.7754, 485.7856);
-  lineto (state, 388.5283, 485.7856);
-  lineto (state, 390.7588, 483.8184);
-  lineto (state, 390.7588, 481.3916);
-  lineto (state, 390.7588, 335.9102);
-  closepath (state);
-
-  setcolor (state, state->logo_bg_pixel);
-  fill (state);
-
-  setcolor (state, state->logo_fg_pixel);
-  stroke (state);
-}
-
-static void
-monitor (logo_state *state)
-{
-  setlinewidth (state, 0);
-
-  setcolor (state, state->monitor_fg_pixel);
-
-  newpath (state);
-  moveto (state, 377.3408, 366.4893);
-  lineto (state, 377.3408, 363.1758);
-  lineto (state, 374.6543, 360.4893);
-  lineto (state, 371.3408, 360.4893);
-  lineto (state, 234.6743, 360.4893);
-  lineto (state, 231.3608, 360.4893);
-  lineto (state, 228.6743, 363.1758);
-  lineto (state, 228.6743, 366.4893);
-  lineto (state, 228.6743, 461.1563);
-  lineto (state, 228.6743, 464.4697);
-  lineto (state, 231.3608, 467.1563);
-  lineto (state, 234.6743, 467.1563);
-  lineto (state, 371.3408, 467.1563);
-  lineto (state, 374.6543, 467.1563);
-  lineto (state, 377.3408, 464.4697);
-  lineto (state, 377.3408, 461.1563);
-  lineto (state, 377.3408, 366.4893);
-  closepath (state);
-  fill (state);
-
-  newpath (state);
-  moveto (state, 325.7354, 369.5391);
-  lineto (state, 322.2354, 375.0391);
-  lineto (state, 318.2354, 351.5391);
-  lineto (state, 342.2354, 344.5391);
-  lineto (state, 265.4619, 344.5391);
-  lineto (state, 289.4619, 351.5391);
-  lineto (state, 285.4619, 375.0391);
-  lineto (state, 281.9619, 369.5391);
-  lineto (state, 325.7354, 369.5391);
-  closepath (state);
-  fill (state);
-
-  newpath (state);
-  moveto (state, 342.9453, 343.0273);
-  lineto (state, 342.9453, 342.1924);
-  lineto (state, 342.2539, 341.5156);
-  lineto (state, 341.4043, 341.5156);
-  lineto (state, 266.0039, 341.5156);
-  lineto (state, 265.1523, 341.5156);
-  lineto (state, 264.4639, 342.1924);
-  lineto (state, 264.4639, 343.0273);
-  lineto (state, 264.4639, 343.0273);
-  lineto (state, 264.4639, 343.8623);
-  lineto (state, 265.1523, 344.5391);
-  lineto (state, 266.0039, 344.5391);
-  lineto (state, 341.4043, 344.5391);
-  lineto (state, 342.2539, 344.5391);
-  lineto (state, 342.9453, 343.8623);
-  lineto (state, 342.9453, 343.0273);
-  lineto (state, 342.9453, 343.0273);
-  closepath (state);
-  stroke (state);
-  fill (state);
-
-  newpath (state);
-  moveto (state, 360.3711, 382.1641);
-  lineto (state, 360.3711, 378.8506);
-  lineto (state, 357.6846, 376.1641);
-  lineto (state, 354.3711, 376.1641);
-  lineto (state, 253.0381, 376.1641);
-  lineto (state, 249.7246, 376.1641);
-  lineto (state, 247.0381, 378.8506);
-  lineto (state, 247.0381, 382.1641);
-  lineto (state, 247.0381, 444.1641);
-  lineto (state, 247.0381, 447.4775);
-  lineto (state, 249.7246, 450.1641);
-  lineto (state, 253.0381, 450.1641);
-  lineto (state, 354.3711, 450.1641);
-  lineto (state, 357.6846, 450.1641);
-  lineto (state, 360.3711, 447.4775);
-  lineto (state, 360.3711, 444.1641);
-  lineto (state, 360.3711, 382.1641);
-  closepath (state);
-
-  setcolor (state, state->monitor_bg_pixel);
-  fill (state);
-}
-
-
-static void
-flames_0a (logo_state *state)
-{
-  setlinewidth (state, 2);
-
-  newpath (state);
-  moveto (state, 268.1118, 375.1055);
-  lineto (state, 278.0723, 371.9902);
-  lineto (state, 285.0166, 362.1172);
-  lineto (state, 307.6953, 356.7012);
-  lineto (state, 328.5361, 364.6758);
-  lineto (state, 339.9619, 383.5098);
-  lineto (state, 345.8936, 389.6660);
-  lineto (state, 343.8018, 403.9888);
-  lineto (state, 340.0576, 432.1499);
-  lineto (state, 332.6553, 443.0522);
-  lineto (state, 319.5771, 453.9092);
-  lineto (state, 308.0566, 485.2700);
-  lineto (state, 318.7891, 505.4521);
-  lineto (state, 325.9775, 515.9902);
-  lineto (state, 288.2168, 468.6289);
-  lineto (state, 304.2290, 442.3589);
-  lineto (state, 318.9365, 416.1494);
-  lineto (state, 313.5049, 417.6880);
-  lineto (state, 311.5088, 418.7856);
-  lineto (state, 306.4565, 424.1489);
-  lineto (state, 308.7578, 428.8916);
-  lineto (state, 297.6426, 440.9727);
-  lineto (state, 282.4565, 457.4297);
-  lineto (state, 280.1528, 461.7734);
-  lineto (state, 296.6025, 495.0522);
-  lineto (state, 301.0166, 499.0298);
-  lineto (state, 277.2920, 523.6685);
-  lineto (state, 275.7539, 530.4106);
-  lineto (state, 277.2920, 523.6685);
-  lineto (state, 293.3374, 492.3101);
-  lineto (state, 277.8828, 480.4922);
-  lineto (state, 265.1763, 462.8696);
-  lineto (state, 265.9390, 450.7354);
-  lineto (state, 264.7095, 445.1323);
-  lineto (state, 268.3765, 438.5493);
-  lineto (state, 275.4170, 425.7495);
-  lineto (state, 278.5762, 413.9326);
-  lineto (state, 284.3765, 406.5493);
-  lineto (state, 284.7471, 391.6973);
-  lineto (state, 275.8027, 404.2261);
-  lineto (state, 273.8164, 414.5488);
-  lineto (state, 252.3760, 431.5088);
-  lineto (state, 257.4292, 460.0386);
-  lineto (state, 269.9766, 491.3496);
-  lineto (state, 240.8564, 433.4292);
-  lineto (state, 244.6030, 410.4658);
-  lineto (state, 256.2168, 392.4688);
-  lineto (state, 270.3921, 380.3086);
-  lineto (state, 268.1118, 375.1055);
-  closepath (state);
-
-  setcolor (state, state->flame1_bg_pixel);
-  fill (state);
-
-  setcolor (state, state->flame1_fg_pixel);
-  stroke (state);
-}
-
-
-static void
-flames_0b (logo_state *state)
-{
-  setlinewidth (state, 0.8);
-
-  newpath (state);
-  moveto (state, 263.0464, 378.707);
-  curveto (state, 271.0464, 370.0410, 280.3799, 358.7070, 303.0464, 360.0410);
-  curveto (state, 325.7129, 361.3730, 339.7129, 382.0410, 341.7129, 392.7070);
-  curveto (state, 343.7129, 403.3740, 337.7129, 432.7080, 327.0459, 444.0410);
-  curveto (state, 316.3799, 455.3740, 304.3794, 488.0410, 313.7129, 504.0410);
-  curveto (state, 323.0469, 520.0410, 283.7129, 470.7070, 299.7129, 443.3740);
-  curveto (state, 315.7129, 416.0410, 310.0547, 417.6440, 306.7129, 420.7075);
-  curveto (state, 302.7129, 424.3740, 305.1094, 429.3140, 293.3799, 442.0410);
-  curveto (state, 277.7129, 459.0410, 275.3135, 463.5659, 292.3799, 494.0410);
-
-  /* y = "2 copy curveto", e.g., curveto(x1, y1, x2, y2, x2, y2) */
-  curveto (state, 297.0464, 502.3740, 272.3330, 528.0396, 272.3330, 528.0396);
-  /* v = "currentpoint 6 2 roll curveto", e.g.,
-     curveto (current_x, current_y, x1, x2, y1, y2) */
-  curveto (state, 272.3330, 528.0396, 289.0469, 495.3745, 274.3799, 480.0410);
-  curveto (state, 259.7129, 464.7075, 260.5073, 452.0679, 261.7129, 446.0410);
-  curveto (state, 263.0464, 439.3740, 270.3799, 426.0410, 275.0464, 416.0410);
-  curveto (state, 279.7129, 406.0410, 280.0986, 390.5684, 272.3799, 406.7075);
-  curveto (state, 268.7129, 414.3740, 246.3794, 432.0405, 254.7129, 460.3740);
-  curveto (state, 264.7129, 494.3740, 234.3799, 434.0410, 242.3799, 412.7075);
-  curveto (state, 250.3799, 391.3730, 263.0464, 378.7070, 263.0464, 378.7070);
-  closepath (state);
-
-  setcolor (state, state->flame2_bg_pixel);
-  fill (state);
-
-  setcolor (state, state->flame2_fg_pixel);
-  stroke (state);
-}
-
-
-static void
-flames_1a (logo_state *state)
-{
-  setlinewidth (state, 2);
-
-  newpath (state);
-  moveto (state, 268.1118, 375.1055);
-  lineto (state, 278.0723, 371.9902);
-  lineto (state, 285.0166, 362.1172);
-  lineto (state, 307.6953, 356.7012);
-  lineto (state, 328.5361, 364.6758);
-  lineto (state, 339.9619, 383.5098);
-  lineto (state, 345.8936, 389.666);
-  lineto (state, 343.8018, 403.9888);
-  lineto (state, 340.0576, 432.1499);
-  lineto (state, 332.6553, 443.0522);
-  lineto (state, 319.5771, 453.9092);
-  lineto (state, 308.0566, 485.27);
-  lineto (state, 318.7891, 505.4521);
-  lineto (state, 325.9775, 515.9902);
-  lineto (state, 288.2168, 468.6289);
-  lineto (state, 304.229, 442.3589);
-  lineto (state, 318.9365, 416.1494);
-  lineto (state, 313.5049, 417.688);
-  lineto (state, 311.5088, 418.7856);
-  lineto (state, 306.4565, 424.1489);
-  lineto (state, 308.7578, 428.8916);
-  lineto (state, 297.6426, 440.9727);
-  lineto (state, 282.4565, 457.4297);
-  lineto (state, 280.1528, 461.7734);
-  lineto (state, 296.6025, 495.0522);
-  lineto (state, 301.0166, 499.0298);
-  lineto (state, 277.292, 523.6685);
-  lineto (state, 275.7539, 530.4106);
-  lineto (state, 277.292, 523.6685);
-  lineto (state, 293.3374, 492.3101);
-  lineto (state, 277.8828, 480.4922);
-  lineto (state, 265.1763, 462.8696);
-  lineto (state, 265.939, 450.7354);
-  lineto (state, 264.7095, 445.1323);
-  lineto (state, 268.3765, 438.5493);
-  lineto (state, 275.417, 425.7495);
-  lineto (state, 278.5762, 413.9326);
-  lineto (state, 284.3765, 406.5493);
-  lineto (state, 284.7471, 391.6973);
-  lineto (state, 275.8027, 404.2261);
-  lineto (state, 273.8164, 414.5488);
-  lineto (state, 252.376, 431.5088);
-  lineto (state, 257.4292, 460.0386);
-  lineto (state, 269.9766, 491.3496);
-  lineto (state, 240.8564, 433.4292);
-  lineto (state, 244.603, 410.4658);
-  lineto (state, 256.2168, 392.4688);
-  lineto (state, 270.3921, 380.3086);
-  lineto (state, 268.1118, 375.1055);
-  closepath (state);
-
-  setcolor (state, state->flame1_bg_pixel);
-  fill (state);
-
-  setcolor (state, state->flame1_fg_pixel);
-  stroke (state);
-}
-
-static void
-flames_1b (logo_state *state)
-{
-  setlinewidth (state, 0.8);
-
-  newpath (state);
-  moveto (state, 271.0469, 382.041);
-  curveto (state, 279.0469, 373.375, 288.3804, 362.041, 311.0469, 363.375);
-  curveto (state, 333.7129, 364.707, 347.7129, 385.375, 349.7129, 396.0405);
-  curveto (state, 351.7129, 406.707, 347.3818, 437.8853, 335.0469, 447.374);
-  curveto (state, 313.0, 464.3335, 312.3789, 491.374, 321.7129, 507.374);
-  curveto (state, 331.0469, 523.374, 291.7134, 474.04, 307.7129, 446.707);
-  curveto (state, 323.7129, 419.374, 318.0547, 420.9771, 314.7129, 424.0405);
-  curveto (state, 310.7129, 427.707, 313.1094, 432.647, 301.3804, 445.374);
-  curveto (state, 285.7134, 462.374, 283.314, 466.8989, 300.3804, 497.374);
-  curveto (state, 305.0474, 505.707, 277.667, 518.9995, 277.667, 518.9995);
-  curveto (state, 277.667, 518.9995, 297.0474, 498.7075, 282.3804, 483.374);
-  curveto (state, 267.7134, 468.0405, 268.5078, 455.4009, 269.7134, 449.374);
-  curveto (state, 271.0469, 442.707, 278.3804, 429.374, 283.0469, 419.374);
-  curveto (state, 287.7134, 409.374, 288.0991, 393.9023, 280.3804, 410.0405);
-  curveto (state, 276.7134, 417.707, 254.3799, 435.3735, 262.7134, 463.707);
-  curveto (state, 272.7134, 497.707, 246.3335, 428.3335, 254.3335, 407.0);
-  curveto (state, 262.3335, 385.666, 271.0469, 382.041, 271.0469, 382.041);
-  closepath (state);
-
-  setcolor (state, state->flame2_bg_pixel);
-  fill (state);
-
-  setcolor (state, state->flame2_fg_pixel);
-  stroke (state);
-}
-
-
-static void
-flames_2a (logo_state *state)
-{
-  setlinewidth (state, 2);
-
-  newpath (state);
-  moveto (state, 268.1118, 375.1055);
-  lineto (state, 278.0723, 371.9902);
-  lineto (state, 285.0166, 362.1172);
-  lineto (state, 307.6953, 356.7012);
-  lineto (state, 328.5361, 364.6758);
-  lineto (state, 335.0684, 383.8438);
-  lineto (state, 341.0, 390.0);
-  lineto (state, 338.9082, 404.3228);
-  lineto (state, 340.0576, 432.1499);
-  lineto (state, 332.6553, 443.0522);
-  lineto (state, 319.5771, 453.9092);
-  lineto (state, 312.6006, 479.4844);
-  lineto (state, 323.333, 499.6665);
-  lineto (state, 330.5215, 510.2046);
-  lineto (state, 288.2168, 468.6289);
-  lineto (state, 304.229, 442.3589);
-  lineto (state, 318.9365, 416.1494);
-  lineto (state, 313.5049, 417.688);
-  lineto (state, 311.5088, 418.7856);
-  lineto (state, 306.4565, 424.1489);
-  lineto (state, 308.7578, 428.8916);
-  lineto (state, 297.6426, 440.9727);
-  lineto (state, 282.4565, 457.4297);
-  lineto (state, 280.1528, 461.7734);
-  lineto (state, 296.6025, 495.0522);
-  lineto (state, 301.0166, 499.0298);
-  lineto (state, 277.292, 523.6685);
-  lineto (state, 275.7539, 530.4106);
-  lineto (state, 277.292, 523.6685);
-  lineto (state, 293.3374, 492.3101);
-  lineto (state, 277.8828, 480.4922);
-  lineto (state, 265.1763, 462.8696);
-  lineto (state, 265.939, 450.7354);
-  lineto (state, 264.7095, 445.1323);
-  lineto (state, 268.3765, 438.5493);
-  lineto (state, 275.417, 425.7495);
-  lineto (state, 278.5762, 413.9326);
-  lineto (state, 284.3765, 406.5493);
-  lineto (state, 284.7471, 391.6973);
-  lineto (state, 275.8027, 404.2261);
-  lineto (state, 273.8164, 414.5488);
-  lineto (state, 251.8291, 429.9214);
-  lineto (state, 255.3203, 464.5493);
-  lineto (state, 254.7437, 462.4072);
-  lineto (state, 247.2534, 427.2969);
-  lineto (state, 251.0, 404.3335);
-  lineto (state, 262.6138, 386.3359);
-  lineto (state, 270.3921, 380.3086);
-  lineto (state, 268.1118, 375.1055);
-  closepath (state);
-
-  setcolor (state, state->flame1_bg_pixel);
-  fill (state);
-
-  setcolor (state, state->flame1_fg_pixel);
-  stroke (state);
-}
-
-static void
-flames_2b (logo_state *state)
-{
-  setlinewidth (state, 0.8);
-
-  newpath (state);
-  moveto (state, 271.0469, 382.041);
-  curveto (state, 279.0469, 373.375, 288.3804, 362.041, 311.0469, 363.375);
-  curveto (state, 333.7129, 364.707, 336.333, 386.334, 338.333, 397.0);
-  curveto (state, 340.333, 407.6665, 347.3818, 437.8853, 335.0469, 447.374);
-  curveto (state, 313.0, 464.3335, 312.3789, 491.374, 321.7129, 507.374);
-  curveto (state, 331.0469, 523.374, 291.7134, 474.04, 307.7129, 446.707);
-  curveto (state, 323.7129, 419.374, 318.0547, 420.9771, 314.7129, 424.0405);
-  curveto (state, 310.7129, 427.707, 313.1094, 432.647, 301.3804, 445.374);
-  curveto (state, 285.7134, 462.374, 283.314, 466.8989, 300.3804, 497.374);
-  curveto (state, 305.0474, 505.707, 277.667, 518.9995, 277.667, 518.9995);
-  curveto (state, 277.667, 518.9995, 297.0474, 498.7075, 282.3804, 483.374);
-  curveto (state, 267.7134, 468.0405, 268.5078, 455.4009, 269.7134, 449.374);
-  curveto (state, 271.0469, 442.707, 278.3804, 429.374, 283.0469, 419.374);
-  curveto (state, 287.7134, 409.374, 288.0991, 393.9023, 280.3804, 410.0405);
-  curveto (state, 276.7134, 417.707, 254.3799, 435.3735, 262.7134, 463.707);
-  curveto (state, 272.7134, 497.707, 246.3335, 428.3335, 254.3335, 407.0);
-  curveto (state, 262.3335, 385.666, 271.0469, 382.041, 271.0469, 382.041);
-  closepath (state);
-
-  setcolor (state, state->flame2_bg_pixel);
-  fill (state);
-
-  setcolor (state, state->flame2_fg_pixel);
-  stroke (state);
-}
-
-
-static void
-flames_3a (logo_state *state)
-{
-  setlinewidth (state, 2);
-
-  newpath (state);
-  moveto (state, 268.1118, 375.1055);
-  lineto (state, 278.0723, 371.9902);
-  lineto (state, 285.0166, 362.1172);
-  lineto (state, 307.6953, 356.7012);
-  lineto (state, 328.5361, 364.6758);
-  lineto (state, 339.9619, 383.5098);
-  lineto (state, 345.8936, 389.666);
-  lineto (state, 343.8018, 403.9888);
-  lineto (state, 334.4023, 428.0977);
-  lineto (state, 327.0, 439.0);
-  lineto (state, 309.667, 469.6665);
-  lineto (state, 308.2676, 473.4844);
-  lineto (state, 319.0, 493.6665);
-  lineto (state, 307.667, 482.0);
-  lineto (state, 288.2168, 468.6289);
-  lineto (state, 304.229, 442.3589);
-  lineto (state, 318.9365, 416.1494);
-  lineto (state, 313.5049, 417.688);
-  lineto (state, 311.5088, 418.7856);
-  lineto (state, 306.4565, 424.1489);
-  lineto (state, 305.4487, 426.2524);
-  lineto (state, 294.3335, 438.3335);
-  lineto (state, 279.1475, 454.7905);
-  lineto (state, 280.1528, 461.7734);
-  lineto (state, 296.6025, 495.0522);
-  lineto (state, 301.0166, 499.0298);
-  lineto (state, 299.5381, 511.5913);
-  lineto (state, 298.0, 518.3335);
-  lineto (state, 299.5381, 511.5913);
-  lineto (state, 293.3374, 492.3101);
-  lineto (state, 277.8828, 480.4922);
-  lineto (state, 265.1763, 462.8696);
-  lineto (state, 265.939, 450.7354);
-  lineto (state, 264.7095, 445.1323);
-  lineto (state, 268.3765, 438.5493);
-  lineto (state, 275.417, 425.7495);
-  lineto (state, 278.5762, 413.9326);
-  lineto (state, 284.3765, 406.5493);
-  lineto (state, 284.7471, 391.6973);
-  lineto (state, 275.8027, 404.2261);
-  lineto (state, 273.8164, 414.5488);
-  lineto (state, 252.376, 431.5088);
-  lineto (state, 257.4292, 460.0386);
-  lineto (state, 269.9766, 491.3496);
-  lineto (state, 240.8564, 433.4292);
-  lineto (state, 244.603, 410.4658);
-  lineto (state, 256.2168, 392.4688);
-  lineto (state, 270.3921, 380.3086);
-  lineto (state, 268.1118, 375.1055);
-  closepath (state);
-
-  setcolor (state, state->flame1_bg_pixel);
-  fill (state);
-
-  setcolor (state, state->flame1_fg_pixel);
-  stroke (state);
-}
-
-static void
-flames_3b (logo_state *state)
-{
-  setlinewidth (state, 0.8);
-
-  newpath (state);
-  moveto (state, 263.0464, 378.707);
-  curveto (state, 271.0464, 370.041, 280.3799, 358.707, 303.0464, 360.041);
-  curveto (state, 325.7129, 361.373, 340.4473, 381.9297, 341.7129, 392.707);
-  curveto (state, 343.0, 403.6665, 331.667, 428.3335, 321.0, 439.6665);
-  curveto (state, 310.334, 450.9995, 308.584, 461.5942, 310.667, 480.0);
-  curveto (state, 312.667, 497.6665, 299.9536, 463.626, 304.6665, 438.3335);
-  lineto (state, 305.3335, 432.3335);
-  curveto (state, 309.0, 419.3335, 316.667, 408.3335, 288.0, 436.6665);
-  curveto (state, 271.5576, 452.9175, 275.3135, 463.5659, 292.3799, 494.041);
-  curveto (state, 297.0464, 502.374, 272.333, 528.0396, 272.333, 528.0396);
-  curveto (state, 272.333, 528.0396, 289.0469, 495.3745, 274.3799, 480.041);
-  curveto (state, 259.7129, 464.7075, 260.5073, 452.0679, 261.7129, 446.041);
-  curveto (state, 263.0464, 439.374, 270.3799, 426.041, 275.0464, 416.041);
-  curveto (state, 279.7129, 406.041, 283.3696, 392.5908, 272.3799, 406.7075);
-  curveto (state, 268.0, 412.3335, 246.3794, 432.0405, 254.7129, 460.374);
-  curveto (state, 264.7129, 494.374, 240.6665, 435.0, 248.6665, 413.6665);
-  curveto (state, 256.6665, 392.332, 263.0464, 378.707, 263.0464, 378.707);
-  closepath (state);
-
-  setcolor (state, state->flame2_bg_pixel);
-  fill (state);
-
-  setcolor (state, state->flame2_fg_pixel);
-  stroke (state);
-}
-
-
-static void
-flames_4a (logo_state *state)
-{
-  flames_3a (state);
-}
-
-static void
-flames_4b (logo_state *state)
-{
-  setlinewidth (state, 0.8);
-
-  newpath (state);
-  moveto (state, 263.0464, 378.707);
-  curveto (state, 271.0464, 370.041, 280.3799, 358.707, 303.0464, 360.041);
-  curveto (state, 325.7129, 361.373, 340.4473, 381.9297, 341.7129, 392.707);
-  curveto (state, 343.0, 403.6665, 331.667, 428.3335, 321.0, 439.6665);
-  curveto (state, 310.334, 450.9995, 306.5693, 463.2358, 319.667, 476.3335);
-  curveto (state, 320.667, 477.3335, 299.9536, 463.626, 304.6665, 438.3335);
-  lineto (state, 305.3335, 432.3335);
-  curveto (state, 309.0, 419.3335, 316.667, 408.3335, 288.0, 436.6665);
-  curveto (state, 271.5576, 452.9175, 275.3135, 463.5659, 292.3799, 494.041);
-  curveto (state, 297.0464, 502.374, 272.333, 528.0396, 272.333, 528.0396);
-  curveto (state, 272.333, 528.0396, 289.0469, 495.3745, 274.3799, 480.041);
-  curveto (state, 259.7129, 464.7075, 260.5073, 452.0679, 261.7129, 446.041);
-  curveto (state, 263.0464, 439.374, 270.3799, 426.041, 275.0464, 416.041);
-  curveto (state, 279.7129, 406.041, 313.667, 376.333, 272.3799, 406.7075);
-  curveto (state, 265.9966, 411.4038, 251.333, 417.0, 259.6665, 445.3335);
-  curveto (state, 269.6665, 479.3335, 247.6665, 417.0, 248.6665, 413.6665);
-  curveto (state, 255.2134, 391.8418, 263.0464, 378.707, 263.0464, 378.707);
-  closepath (state);
-
-  setcolor (state, state->flame2_bg_pixel);
-  fill (state);
-
-  setcolor (state, state->flame2_fg_pixel);
-  stroke (state);
-}
-
-
-static void flames_6a (logo_state *);
-static void flames_6b (logo_state *);
-
-static void
-flames_5a (logo_state *state)
-{
-  unsigned long a = state->flame1_bg_pixel;
-  unsigned long b = state->flame2_bg_pixel;
-  state->flame1_bg_pixel = b;
-  state->flame2_bg_pixel = a;
-  flames_6a (state);
-  state->flame1_bg_pixel = a;
-  state->flame2_bg_pixel = b;
-}
-
-static void
-flames_5b (logo_state *state)
-{
-  unsigned long a = state->flame1_bg_pixel;
-  unsigned long b = state->flame2_bg_pixel;
-  state->flame1_bg_pixel = b;
-  state->flame2_bg_pixel = a;
-  flames_6b (state);
-  state->flame1_bg_pixel = a;
-  state->flame2_bg_pixel = b;
-}
-
-
-static void
-flames_6a (logo_state *state)
-{
-  flames_3a (state);
-}
-
-static void
-flames_6b (logo_state *state)
-{
-  setlinewidth (state, 0.8);
-
-  newpath (state);
-  moveto (state, 263.0464, 378.707);
-  curveto (state, 271.0464, 370.041, 280.3799, 358.707, 303.0464, 360.041);
-  curveto (state, 325.7129, 361.373, 340.4473, 381.9297, 341.7129, 392.707);
-  curveto (state, 343.0, 403.6665, 331.667, 428.3335, 321.0, 439.6665);
-  curveto (state, 310.334, 450.9995, 306.5693, 463.2358, 319.667, 476.3335);
-  curveto (state, 320.667, 477.3335, 299.9536, 463.626, 304.6665, 438.3335);
-  lineto (state, 305.3335, 432.3335);
-  curveto (state, 309.0, 419.3335, 316.667, 408.3335, 288.0, 436.6665);
-  curveto (state, 271.5576, 452.9175, 275.3135, 463.5659, 292.3799, 494.041);
-  curveto (state, 297.0464, 502.374, 272.333, 528.0396, 272.333, 528.0396);
-  curveto (state, 272.333, 528.0396, 289.0469, 495.3745, 274.3799, 480.041);
-  curveto (state, 259.7129, 464.7075, 260.5073, 452.0679, 261.7129, 446.041);
-  curveto (state, 263.0464, 439.374, 270.3799, 426.041, 275.0464, 416.041);
-  curveto (state, 279.7129, 406.041, 313.667, 376.333, 272.3799, 406.7075);
-  curveto (state, 265.9966, 411.4038, 251.333, 417.0, 259.6665, 445.3335);
-  curveto (state, 269.6665, 479.3335, 247.6665, 417.0, 248.6665, 413.6665);
-  curveto (state, 255.2134, 391.8418, 263.0464, 378.707, 263.0464, 378.707);
-  closepath (state);
-
-  setcolor (state, state->flame2_bg_pixel);
-  fill (state);
-
-  setcolor (state, state->flame2_fg_pixel);
-  stroke (state);
-}
-
-static void
-flames_6c (logo_state *state)
-{
-  setlinewidth (state, 0.8);
-
-  newpath (state);
-  moveto (state, 293.7134, 370.5859);
-  curveto (state, 299.6665, 366.333, 303.9854, 362.6934, 317.7656, 359.4023);
-  curveto (state, 331.0, 361.667, 337.3711, 375.6924, 340.9766, 379.4326);
-  curveto (state, 339.7051, 388.1357, 333.9941, 402.7852, 329.4961, 409.4097);
-  curveto (state, 318.9629, 428.0435, 310.1455, 425.4028, 316.667, 437.6665);
-  curveto (state, 309.7803, 430.5771, 305.9297, 427.4131, 315.6602, 411.4507);
-  curveto (state, 324.5957, 395.5244, 321.2949, 396.46, 320.082, 397.127);
-  curveto (state, 317.0137, 400.3857, 316.4004, 401.6636, 309.6465, 409.0044);
-  curveto (state, 300.4189, 419.0044, 299.2461, 416.7344, 309.2402, 436.9556);
-  curveto (state, 310.2539, 440.3984, 315.3184, 446.2725, 314.1016, 457.4121);
-  curveto (state, 315.0371, 453.3154, 309.041, 441.8022, 299.6504, 434.6216);
-  curveto (state, 291.9297, 423.9136, 292.3931, 416.54, 291.646, 413.1357);
-  curveto (state, 293.874, 409.1357, 298.1523, 401.3579, 300.0718, 394.1777);
-  curveto (state, 303.5962, 389.6914, 289.9995, 396.4463, 289.9995, 396.4463);
-  curveto (state, 285.3413, 401.5103, 269.5962, 401.9976, 272.6665, 419.3335);
-  curveto (state, 269.3335, 402.0, 277.1523, 406.0244, 279.4287, 392.0713);
-  curveto (state, 286.4858, 381.1357, 291.6665, 375.0, 293.7134, 370.5859);
-  closepath (state);
-
-  setcolor (state, state->flame1_bg_pixel);
-  fill (state);
-
-  setcolor (state, state->flame1_fg_pixel);
-  stroke (state);
-}
-
-
-static void
-flames_7a (logo_state *state)
-{
-  setlinewidth (state, 2);
-
-  newpath (state);
-  moveto (state, 268.1118, 375.1055);
-  lineto (state, 278.0723, 371.9902);
-  lineto (state, 285.0166, 362.1172);
-  lineto (state, 307.6953, 356.7012);
-  lineto (state, 328.5361, 364.6758);
-  lineto (state, 339.9619, 383.5098);
-  lineto (state, 345.8936, 389.666);
-  lineto (state, 343.8018, 403.9888);
-  lineto (state, 340.0576, 432.1499);
-  lineto (state, 332.6553, 443.0522);
-  lineto (state, 319.5771, 453.9092);
-  lineto (state, 308.0566, 485.27);
-  lineto (state, 318.7891, 505.4521);
-  lineto (state, 325.9775, 515.9902);
-  lineto (state, 288.2168, 468.6289);
-  lineto (state, 304.229, 442.3589);
-  lineto (state, 318.9365, 416.1494);
-  lineto (state, 313.5049, 417.688);
-  lineto (state, 311.5088, 418.7856);
-  lineto (state, 306.4565, 424.1489);
-  lineto (state, 308.7578, 428.8916);
-  lineto (state, 297.6426, 440.9727);
-  lineto (state, 282.4565, 457.4297);
-  lineto (state, 280.1528, 461.7734);
-  lineto (state, 296.6025, 495.0522);
-  lineto (state, 301.0166, 499.0298);
-  lineto (state, 277.292, 523.6685);
-  lineto (state, 275.7539, 530.4106);
-  lineto (state, 277.292, 523.6685);
-  lineto (state, 293.3374, 492.3101);
-  lineto (state, 277.8828, 480.4922);
-  lineto (state, 265.1763, 462.8696);
-  lineto (state, 265.939, 450.7354);
-  lineto (state, 264.7095, 445.1323);
-  lineto (state, 268.3765, 438.5493);
-  lineto (state, 275.417, 425.7495);
-  lineto (state, 278.5762, 413.9326);
-  lineto (state, 284.3765, 406.5493);
-  lineto (state, 284.7471, 391.6973);
-  lineto (state, 275.8027, 404.2261);
-  lineto (state, 273.8164, 414.5488);
-  lineto (state, 252.376, 431.5088);
-  lineto (state, 257.4292, 460.0386);
-  lineto (state, 269.9766, 491.3496);
-  lineto (state, 240.8564, 433.4292);
-  lineto (state, 244.603, 410.4658);
-  lineto (state, 256.2168, 392.4688);
-  lineto (state, 270.3921, 380.3086);
-  lineto (state, 268.1118, 375.1055);
-  closepath (state);
-
-  setcolor (state, state->flame1_bg_pixel);
-  fill (state);
-
-  setcolor (state, state->flame1_fg_pixel);
-  stroke (state);
-}
-
-
-static void
-flames_7b (logo_state *state)
-{
-  setlinewidth (state, 0.8);
-
-  newpath (state);
-  moveto (state,  262.0464, 374.7109);
-  curveto (state, 270.0464, 366.9424, 279.3799, 356.7822, 302.0469, 357.9785);
-  curveto (state, 324.7129, 359.1719, 338.7129, 377.6992, 340.7129, 387.2607);
-  curveto (state, 342.7129, 396.8228, 336.7129, 423.1182, 326.0459, 433.2773);
-  curveto (state, 315.3799, 443.4365, 303.3789, 472.7197, 312.7129, 487.0625);
-  curveto (state, 322.0469, 501.4053, 282.7129, 457.1812, 298.7129, 432.6797);
-  curveto (state, 314.7129, 408.1777, 309.0547, 409.6147, 305.7129, 412.3608);
-  curveto (state, 301.7129, 415.6475, 304.1094, 420.0757, 292.3799, 431.4844);
-  curveto (state, 276.7129, 446.7236, 274.3135, 450.7798, 291.3799, 478.0981);
-  curveto (state, 296.0464, 485.5684, 271.333, 508.5752, 271.333, 508.5752);
-  curveto (state, 271.333, 508.5752, 288.0469, 479.2935, 273.3799, 465.5483);
-  curveto (state, 258.7129, 451.8032, 259.5073, 440.4727, 260.7129, 435.0703);
-  curveto (state, 262.0464, 429.0938, 269.3799, 417.1416, 274.0464, 408.1777);
-  curveto (state, 278.7129, 399.2134, 279.0986, 385.3438, 271.3799, 399.811);
-  curveto (state, 267.7129, 406.6831, 245.3794, 422.52, 253.7129, 447.9185);
-  curveto (state, 263.7129, 478.397, 233.3799, 424.313, 241.3799, 405.1895);
-  curveto (state, 249.3799, 386.0645, 262.0464, 374.7109, 262.0464, 374.7109);
-  closepath (state);
-
-  setcolor (state, state->flame2_bg_pixel);
-  fill (state);
-
-  setcolor (state, state->flame2_fg_pixel);
-  stroke (state);
-}
-
-
-static unsigned long
-alloccolor (Display *dpy, Colormap cmap, char *s)
-{
-  XColor color;
-  if (!XParseColor (dpy, cmap, s, &color))
-    {
-      fprintf (stderr, "%s: can't parse color %s\n", progname, s);
-      return -1;
-    }
-  if (! XAllocColor (dpy, cmap, &color))
-    {
-      fprintf (stderr, "%s: couldn't allocate color %s\n", progname, s);
-      return -1;
-    }
-  return color.pixel;
-}
 
 
 /* Draws the logo centered in the given Drawable (presumably a Pixmap.)
    next_frame_p means randomize the flame shape.
  */
-void
-xscreensaver_logo (Display *dpy, Drawable dest, Colormap cmap,
-                   Bool next_frame_p)
-{
-  XGCValues gcv;
-  logo_state S;
-  logo_state *state = &S;
-  int mono_p;
-
-  unsigned int w, h, depth;
-  unsigned long bg;
-
-  state->dpy = dpy;
-  state->drawable = dest;
-  state->gc = XCreateGC (dpy, dest, 0, &gcv);
-
-  {
-    Window root;
-    int x, y;
-    unsigned int bw;
-    XGetGeometry (dpy, dest, &root, &x, &y, &w, &h, &bw, &depth);
-    mono_p = (depth == 1);
-    state->y_origin = h;
-  }
-
-  if (mono_p)
-    {
-      unsigned long white = 1;
-      unsigned long black = 0;
-      bg = black;
-      state->logo_bg_pixel    = white;
-      state->logo_fg_pixel    = black;
-      state->monitor_bg_pixel = white;
-      state->monitor_fg_pixel = black;
-      state->flame1_bg_pixel  = white;
-      state->flame1_fg_pixel  = black;
-      state->flame2_bg_pixel  = white;
-      state->flame2_fg_pixel  = black;
-    }
-  else
-    {
-      bg = get_pixel_resource ("background", "Background", dpy, cmap);
-      state->logo_bg_pixel    = alloccolor (dpy, cmap, "#FFFFFF");
-      state->logo_fg_pixel    = alloccolor (dpy, cmap, "#000000");
-/*      state->monitor_bg_pixel = alloccolor (dpy, cmap, "#00AA00");*/
-      state->monitor_bg_pixel = alloccolor (dpy, cmap, "#FFFFFF");
-      state->monitor_fg_pixel = alloccolor (dpy, cmap, "#000000");
-      state->flame1_bg_pixel  = alloccolor (dpy, cmap, "#FFA500");
-      state->flame1_fg_pixel  = alloccolor (dpy, cmap, "#000000");
-      state->flame2_bg_pixel  = alloccolor (dpy, cmap, "#FF0000");
-      state->flame2_fg_pixel  = alloccolor (dpy, cmap, "#000000");
-    }
-
-  setcolor (state, bg);
-  XFillRectangle (dpy, dest, state->gc, 0, 0, w, h);
-
-  reset (state);
-  scale (state, w / 220.0, w / 220.0);
-  translate (state, -193, -315);
-
-  border (state);
-  monitor (state);
-
-  if (!next_frame_p)
+Pixmap
+xscreensaver_logo (Display *dpy, Window window, Colormap cmap,
+                   unsigned long background_color,
+                   unsigned long **pixels_ret, int *npixels_ret,
+                   Bool big_p)
+{
+  int npixels, iw, ih;
+  unsigned long *pixels;
+  XImage *image;
+  Pixmap p = 0;
+  XWindowAttributes xgwa;
+  XGetWindowAttributes (dpy, window, &xgwa);
+
+  image = parse_xpm_data (dpy, xgwa.visual, xgwa.colormap, xgwa.depth,
+                          background_color,
+                          (big_p ? logo_180_xpm : logo_50_xpm),
+                          &iw, &ih, &pixels, &npixels);
+  if (image)
     {
-      flames_0a (state);
-      flames_0b (state);
+      XGCValues gcv;
+      GC gc;
+      p = XCreatePixmap (dpy, window, iw, ih, xgwa.depth);
+      gc = XCreateGC (dpy, p, 0, &gcv);
+      XPutImage (dpy, p, gc, image, 0, 0, 0, 0, iw, ih);
+      XDestroyImage (image);
+      XFreeGC (dpy, gc);
     }
-  else
-    {
-      static int tick = 0;
-      static int tick2 = 0;
-      if (++tick2 > 3) tick2 = 0;
-      if (tick2 == 0)
-        if (++tick > 7) tick = 0;
-      switch (tick) {
-      case 0: flames_0a (state); flames_0b (state); break;
-      case 1: flames_1a (state); flames_1b (state); break;
-      case 2: flames_2a (state); flames_2b (state); break;
-      case 3: flames_3a (state); flames_3b (state); break;
-      case 4: flames_4a (state); flames_4b (state); break;
-      case 5: flames_5a (state); flames_5b (state); break;
-      case 6: flames_6a (state); flames_6b (state); flames_6c (state); break;
-      case 7: flames_7a (state); flames_7b (state); break;
-      default: abort(); break;
-      }
-    }
-
-  XFreeGC (dpy, state->gc);
+  return p;
 }
diff --git a/utils/logo.gif b/utils/logo.gif
deleted file mode 100644 (file)
index 0e11e8c..0000000
Binary files a/utils/logo.gif and /dev/null differ
diff --git a/utils/logo.xpm b/utils/logo.xpm
deleted file mode 100644 (file)
index 3870d33..0000000
+++ /dev/null
@@ -1,86 +0,0 @@
-/* XPM */
-static char * logo_xpm[] = {
-"50 50 33 1",
-"      c None",
-".     c #030204",
-"+     c #868586",
-"@     c #A20407",
-"#     c #4A494A",
-"$     c #530204",
-"%     c #AD4A31",
-"&     c #CF060F",
-"*     c #2C2C2B",
-"=     c #D0CECE",
-"-     c #4A3019",
-";     c #2B0505",
-">     c #8C2F04",
-",     c #FC020C",
-"'     c #6F0405",
-")     c #ADADAB",
-"!     c #B0160A",
-"~     c #EAEAE9",
-"{     c #676767",
-"]     c #A37274",
-"^     c #B99093",
-"/     c #AF3525",
-"(     c #703304",
-"_     c #575654",
-":     c #BDBDBB",
-"<     c #393839",
-"[     c #18181A",
-"}     c #939395",
-"|     c #FEFEFC",
-"1     c #777776",
-"2     c #501B07",
-"3     c #2E1707",
-"4     c #6E1E04",
-"                  ){                              ",
-"                  +.)                             ",
-"                  ~@[~                            ",
-"                   %@<                            ",
-"                   ^,$1                           ",
-"                   =&,;:   :+=                    ",
-"                   ~&,!<  =<[                     ",
-"                   ~&,&(= %;1                     ",
-"                   ~&,!-~:&[)                     ",
-"     =}}}}}}}}}}}}}1,,(<}/&({}}}}}}}}}}}}}}})     ",
-"    =[#############',!2#*&,(*###############*#    ",
-"    )*||||||||||||],,>{|],,()|||||||||||||||:[    ",
-"    )*|||||||||||),,!(=|!,,>1|||||||||||||||:[    ",
-"    )*||||||||===!,,/<~=,,,!#~||||||||||||||:[    ",
-"    )*||1.....$.$,,,%...,,,&3............*=|:[    ",
-"    )*||.....';.&,,,%..$,,,,4.............1|:[    ",
-"    )*||.....&..,,,,/..;,,,,!;............{|:[    ",
-"    )*||....;&.;,,,,&2.;,,,,,4............{|:[    ",
-"    )*||....@@(#,,,,,@.{&,,,,&3#1+++1#....{|:[    ",
-"    )*||....&&(),,,,,,'*/,,,,,!2:||||~....{|:[    ",
-"    )*||...;,&>}/,,,,,,'[&,,,,,><|||||[...{|:[    ",
-"    )*||...',,%_^,,,,,,,2$,,,,,&2:|||~[...{|:[    ",
-"    )*||...@,,!-=!,,,,,,&3&,,,,,@{|||~[...{|:[    ",
-"    )*||...@,,,>{^,,,,,,,4$,,,,,&*|||~[...{|:[    ",
-"    )*||...&,,,!-:!,,,,,,&;,,,,,,;=||~[...{|:[    ",
-"    )*||...@,,,,>-^,,,,,,,&,,,,,,')||~[...{|:[    ",
-"    )*||...',,,,,21&,,,,,,,,,,,,,@{||~[...{|:[    ",
-"    )*||...;,,,,,&[/,,,,,,,,,,,,,&#||~[...{|:[    ",
-"    )*||....@,,,,,'2,,,,,,,,,,,,,,[||~[...{|:[    ",
-"    )*||....;,,,,,&@,,,,,,,,,,,,,,;~|~[...{|:[    ",
-"    )*||....*/,,,,,,,,,,,,,,,,,,,,2=|~[...{|:[    ",
-"    )*||....<:&,,,,,,,,,,,,,,,,,,&()|~[...{|:[    ",
-"    )*||....<|],,,,,,,,,,,,,,,,,,@<~|~[...{|:[    ",
-"    )*||....*||%,,,,,,,,,,,,,,,,&[=||~....{|:[    ",
-"    )*||.....{1{',,,,,,,,,,,,,,,$<11+_....{|:[    ",
-"    )*||.........',,,,,,,,,,,,,$..........{|:[    ",
-"    )*||..........',,,,,,,,,,,$...........{|:[    ",
-"    )*||...........;@,,,,,,&@.............+|:[    ",
-"    )*||)#<<<<<<<<<<[.$$''>;..[<<<<<<<<<<{~|:[    ",
-"    )*|||||||||||||~*.........<|||||||||||||:[    ",
-"    )*|||||||||||||_...........{~|||||||||||:[    ",
-"    )*||||||||||~}[.............*}~|||||||||:[    ",
-"    )*||||||||||+*****************)|||||||||:[    ",
-"    )*||||||||||||||||||||||||||||||||||||||:[    ",
-"    =.{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{<#    ",
-"     :11111111111111111111111111111111111111+     ",
-"                                                  ",
-"                                                  ",
-"                                                  ",
-"                                                  "};
index 0d97d569852073b8010ff78769957ce7e47dd7f4..661475964a997b289ee790867250ee123f344aab 100644 (file)
@@ -1,4 +1,4 @@
-/* xscreensaver, Copyright (c) 1992, 1997 Jamie Zawinski <jwz@jwz.org>
+/* xscreensaver, Copyright (c) 1992, 1997, 2001 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
@@ -21,5 +21,10 @@ extern unsigned int get_minutes_resource (char*,char*);
 extern unsigned int get_seconds_resource (char*,char*);
 extern int parse_time (const char *string, Bool seconds_default_p,
                        Bool silent_p);
+extern Pixmap
+xscreensaver_logo (Display *dpy, Window window, Colormap cmap,
+                   unsigned long background_color,
+                   unsigned long **pixels_ret, int *npixels_ret,
+                   Bool big_p);
 
 #endif /* __XSCREENSAVER_RESOURCES_H__ */
index 7c6d3ec58be2cdf162d4768441a8a59206088c59..96da4785ce2de4e8a20490cecb23b4358c8fff02 100644 (file)
@@ -1,2 +1,2 @@
 static const char screensaver_id[] =
-       "@(#)xscreensaver 3.28 (23-Jan-2001), by Jamie Zawinski (jwz@jwz.org)";
+       "@(#)xscreensaver 3.29 (05-Feb-2001), by Jamie Zawinski (jwz@jwz.org)";
index ca5fe2bc7a2d51a2e7a4c48a366464e6e5afe5c5..177a6df064e19f52964b5bc7dee9f3e0262099a7 100644 (file)
@@ -1,7 +1,7 @@
 Begin3
 Title:          xscreensaver
-Version:        3.28
-Entered-date:   02FEB01
+Version:        3.29
+Entered-date:   13FEB01
 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.
@@ -10,16 +10,16 @@ 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/
-                1494K xscreensaver-3.28.tar.gz
-                45K  xscreensaver.README
+                1521K xscreensaver-3.29.tar.gz
+                46K  xscreensaver.README
                 1K   xscreensaver.lsm
 Alternate-site: sunsite.unc.edu /pub/Linux/X11/screensavers/
-                1494K xscreensaver-3.28.tar.gz
-                45K  xscreensaver.README
+                1521K xscreensaver-3.29.tar.gz
+                46K  xscreensaver.README
                 1K   xscreensaver.lsm
 Alternate-site: ftp.x.org /contrib/applications/
-                1494K xscreensaver-3.28.tar.gz
-                45K  xscreensaver.README
+                1521K xscreensaver-3.29.tar.gz
+                46K  xscreensaver.README
                 1K   xscreensaver.lsm
 Platforms:      Linux, Irix, SunOS, Solaris, HPUX, AIX, FreeBSD, NetBSD,
                 BSDI, SCO, OSF1, Ultrix, VMS.
index 91a55dbf8755187d94d91cb933ce011495758276..4cac483c84753800e051c5c9f1a9cca68a7a111b 100644 (file)
@@ -1,5 +1,5 @@
 %define        name    xscreensaver
-%define        version 3.28
+%define        version 3.29
 %define        release 1
 %define        serial  1
 %define        prefix  /usr/X11R6