http://ftp.x.org/contrib/applications/xscreensaver-3.21.tar.gz
authorZygo Blaxell <zblaxell@hungrycats.org>
Mon, 2 Mar 2009 05:42:39 +0000 (00:42 -0500)
committerZygo Blaxell <zblaxell@hungrycats.org>
Mon, 2 Mar 2009 05:42:39 +0000 (00:42 -0500)
-rw-r--r-- 1 zblaxell zblaxell 1262926 Nov 17  1999 xscreensaver-3.21.tar.gz
1c47eb3afcf40e676b766131e0686c14c46d86fd  xscreensaver-3.21.tar.gz

51 files changed:
Makefile.in
README
configure
configure.in
driver/Makefile.in
driver/XScreenSaver.ad.in
driver/XScreenSaver_ad.h
driver/demo-Gtk-stubs.h
driver/demo-Gtk-widgets.c
driver/demo-Gtk.c
driver/demo.c
driver/prefs.c
driver/prefs.h
driver/remote.c
driver/remote.h
driver/stderr.c
driver/subprocs.c
driver/test-passwd.c
driver/windows.c
driver/xdpyinfo.c
driver/xscreensaver-command.c
driver/xscreensaver-command.man
driver/xscreensaver-demo.glade
driver/xscreensaver-demo.man
driver/xscreensaver.c
driver/xscreensaver.h
driver/xscreensaver.man
hacks/Makefile.in
hacks/critical.c
hacks/deluxe.c
hacks/epicycle.c
hacks/glx/Makefile.in
hacks/glx/extrusion.c
hacks/glx/glplanet.c
hacks/glx/pulsar.c
hacks/glx/sierpinski3d.c
hacks/imsmap.c
hacks/interference.c
hacks/lmorph.c
hacks/petri.c
hacks/ripples.c
hacks/screenhack.c
hacks/webcollage
hacks/xlockmore.c
hacks/xsublim.c
utils/version.h
utils/visual.c
utils/yarandom.c
utils/yarandom.h
xscreensaver.lsm
xscreensaver.spec

index 00a5d99d389b004972cd77624be251c89281547b..f1a39486bbb1852b74b0a1e01b1fb0cbd996d014 100644 (file)
@@ -161,7 +161,7 @@ update_spec_version::
        V=`sed -n 's/.*\([0-9][0-9]*\.[0-9]*\).*/\1/p' < $$U` ;             \
        echo -n "Updating version number in $$S to \"$$V\"... " ;           \
        T=/tmp/xs.$$$$ ;                                                    \
        V=`sed -n 's/.*\([0-9][0-9]*\.[0-9]*\).*/\1/p' < $$U` ;             \
        echo -n "Updating version number in $$S to \"$$V\"... " ;           \
        T=/tmp/xs.$$$$ ;                                                    \
-       sed "s/^\(Version:[^0-9]*\)\(.*\)/\1$$V/"                           \
+       sed "s/^\(%define.version[^0-9]*\)\(.*\)/\1$$V/"                    \
          < $$S > $$T ;                                                     \
        if cmp -s $$S $$T ; then                                            \
          echo "unchanged." ;                                               \
          < $$S > $$T ;                                                     \
        if cmp -s $$S $$T ; then                                            \
          echo "unchanged." ;                                               \
@@ -172,17 +172,17 @@ update_spec_version::
        rm $$T
 
 rpm::
        rm $$T
 
 rpm::
-       @                                                                   \
-  VERS=`sed -n 's/[^0-9]*\([0-9]\.[0-9][0-9]*\).*/\1/p' utils/version.h` ;  \
-  DIR=/usr/src/redhat ;                                                            \
-  cp -p xscreensaver-$$VERS.tar.gz $$DIR/SOURCES/ ;                        \
-  rpm -ba xscreensaver.spec ;                                              \
-  rm -f $$DIR/xscreensaver-$$VERS.tar.gz ;                                 \
-  rm -rf $$DIR/BUILD/xscreensaver-$$VERS ;                                 \
-  mv $$DIR/RPMS/i386/xscreensaver-$$VERS-*.rpm . ;                         \
-  mv $$DIR/SRPMS/xscreensaver-$$VERS-*.rpm . ;                             \
-  echo '' ;                                                                \
-  ls -lFG xscreensaver-$$VERS-*.rpm
+       @                                                                  \
+  VERS=`sed -n 's/[^0-9]*\([0-9]\.[0-9][0-9]*\).*/\1/p' utils/version.h` ; \
+  DIR=/usr/src/redhat ;                                                           \
+  cp -p xscreensaver-$$VERS.tar.gz $$DIR/SOURCES/ ;                       \
+  rpm --define "USE_GL yes" -ba xscreensaver.spec ;                       \
+  rm -f $$DIR/xscreensaver-$$VERS.tar.gz ;                                \
+  rm -rf $$DIR/BUILD/xscreensaver-$$VERS ;                                \
+  mv $$DIR/SRPMS/xscreensaver*-$$VERS-*.rpm . ;                                   \
+  mv $$DIR/RPMS/i386/xscreensaver*-$$VERS-*.rpm . ;                       \
+  echo '' ;                                                               \
+  ls -lFG xscreensaver*-$$VERS-*.rpm
 
 test-tar::
        @                                                                   \
 
 test-tar::
        @                                                                   \
diff --git a/README b/README
index 374d7694a2864c3ebe80ae6c4ad47fd374278ffe..9beb90eccd95183995baaa0d95dc024ecfd7c3b0 100644 (file)
--- a/README
+++ b/README
@@ -77,7 +77,13 @@ http://www.jwz.org/xscreensaver/.
 
                               ============
 
 
                               ============
 
-Changes since 3.19:   * Added new hack `ripples' and `sierpinski3d'.
+Changes since 3.20:   * Tweaked the xscreensaver-demo UI (Gtk only.)
+                      * Fixed a few visual selection bugs.  I think the proper
+                        GL visual should be used with nVidia systems now.
+                      * Made the Makefiles obey $install_prefix.
+                      * Made the `xscreensaver.spec' file able to generate both
+                        GL and non-GL packages simultaniously.
+Changes since 3.19:   * Added new hacks `ripples' and `sierpinski3d'.
                       * Made `xscreensaver-command -exit' be silent when no
                         screen saver was running (instead of complaining.)
                       * Made `webcollage' and `vidwhacker' use `xloadimage'
                       * Made `xscreensaver-command -exit' be silent when no
                         screen saver was running (instead of complaining.)
                       * Made `webcollage' and `vidwhacker' use `xloadimage'
index b698405dbe0de732c20aae0586f0f97bab5f6a75..4d398d4afd5f5a1bd0bc7a2a140f10676d44b5a9 100755 (executable)
--- a/configure
+++ b/configure
@@ -6874,6 +6874,7 @@ fi
 have_gl=no
 ac_have_mesa_gl=no
 with_gl_req=unspecified
 have_gl=no
 ac_have_mesa_gl=no
 with_gl_req=unspecified
+gl_halfassed=no
 # Check whether --with-gl or --without-gl was given.
 if test "${with_gl+set}" = set; then
   withval="$with_gl"
 # Check whether --with-gl or --without-gl was given.
 if test "${with_gl+set}" = set; then
   withval="$with_gl"
@@ -6890,7 +6891,7 @@ fi
 
     /*)
      echo $ac_n "checking for GL headers""... $ac_c" 1>&6
 
     /*)
      echo $ac_n "checking for GL headers""... $ac_c" 1>&6
-echo "configure:6905: checking for GL headers" >&5
+echo "configure:6906: checking for GL headers" >&5
      d=$with_gl/include
      if test -d $d; then
        X_CFLAGS="-I$d $X_CFLAGS"
      d=$with_gl/include
      if test -d $d; then
        X_CFLAGS="-I$d $X_CFLAGS"
@@ -6900,7 +6901,7 @@ echo "configure:6905: checking for GL headers" >&5
      fi
 
      echo $ac_n "checking for GL libs""... $ac_c" 1>&6
      fi
 
      echo $ac_n "checking for GL libs""... $ac_c" 1>&6
-echo "configure:6915: checking for GL libs" >&5
+echo "configure:6916: checking for GL libs" >&5
      d=$with_gl/lib
      if test -d $d; then
        X_LIBS="-L$d $X_LIBS"
      d=$with_gl/lib
      if test -d $d; then
        X_LIBS="-L$d $X_LIBS"
@@ -6936,17 +6937,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
   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:6951: checking for GL/gl.h" >&5
+echo "configure:6952: 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
 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 6956 "configure"
+#line 6957 "configure"
 #include "confdefs.h"
 #include <GL/gl.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 #include "confdefs.h"
 #include <GL/gl.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6961: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6962: \"$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*
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -6977,17 +6978,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
   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:6992: checking for GL/glx.h" >&5
+echo "configure:6993: 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
 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 6997 "configure"
+#line 6998 "configure"
 #include "confdefs.h"
 #include <GL/glx.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 #include "confdefs.h"
 #include <GL/glx.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7002: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7003: \"$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*
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -7019,7 +7020,7 @@ fi
     # to link against.
     #
     echo $ac_n "checking whether GL is really MesaGL""... $ac_c" 1>&6
     # to link against.
     #
     echo $ac_n "checking whether GL is really MesaGL""... $ac_c" 1>&6
-echo "configure:7034: checking whether GL is really MesaGL" >&5
+echo "configure:7035: 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
 if eval "test \"`echo '$''{'ac_cv_have_mesa_gl'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -7031,7 +7032,7 @@ else
   fi
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   cat > conftest.$ac_ext <<EOF
   fi
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   cat > conftest.$ac_ext <<EOF
-#line 7046 "configure"
+#line 7047 "configure"
 #include "confdefs.h"
 #include <GL/glx.h>
 EOF
 #include "confdefs.h"
 #include <GL/glx.h>
 EOF
@@ -7060,7 +7061,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
     #
     if test "$ac_have_mesa_gl" = yes; then
       echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
-echo "configure:7075: checking for pthread_create in -lpthread" >&5
+echo "configure:7076: 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
 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
@@ -7068,7 +7069,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lpthread  $LIBS"
 cat > conftest.$ac_ext <<EOF
   ac_save_LIBS="$LIBS"
 LIBS="-lpthread  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 7083 "configure"
+#line 7084 "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
 #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
@@ -7079,7 +7080,7 @@ int main() {
 pthread_create()
 ; return 0; }
 EOF
 pthread_create()
 ; return 0; }
 EOF
-if { (eval echo configure:7094: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7095: \"$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
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -7126,7 +7127,7 @@ fi
   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
 
   echo $ac_n "checking for glXCreateContext in -lMesaGL""... $ac_c" 1>&6
   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
 
   echo $ac_n "checking for glXCreateContext in -lMesaGL""... $ac_c" 1>&6
-echo "configure:7141: checking for glXCreateContext in -lMesaGL" >&5
+echo "configure:7142: 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
 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
@@ -7134,7 +7135,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lMesaGL -lMesaGLU $GL_LIBS -lX11 -lXext -lm $LIBS"
 cat > conftest.$ac_ext <<EOF
   ac_save_LIBS="$LIBS"
 LIBS="-lMesaGL -lMesaGLU $GL_LIBS -lX11 -lXext -lm $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 7149 "configure"
+#line 7150 "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
 #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
@@ -7145,7 +7146,7 @@ int main() {
 glXCreateContext()
 ; return 0; }
 EOF
 glXCreateContext()
 ; return 0; }
 EOF
-if { (eval echo configure:7160: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7161: \"$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
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -7191,7 +7192,7 @@ fi
   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
 
   echo $ac_n "checking for glXCreateContext in -lGL""... $ac_c" 1>&6
   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
 
   echo $ac_n "checking for glXCreateContext in -lGL""... $ac_c" 1>&6
-echo "configure:7206: checking for glXCreateContext in -lGL" >&5
+echo "configure:7207: 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
 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
@@ -7199,7 +7200,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lGL -lGLU $GL_LIBS -lX11 -lXext -lm $LIBS"
 cat > conftest.$ac_ext <<EOF
   ac_save_LIBS="$LIBS"
 LIBS="-lGL -lGLU $GL_LIBS -lX11 -lXext -lm $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 7214 "configure"
+#line 7215 "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
 #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
@@ -7210,7 +7211,7 @@ int main() {
 glXCreateContext()
 ; return 0; }
 EOF
 glXCreateContext()
 ; return 0; }
 EOF
-if { (eval echo configure:7225: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7226: \"$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
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -7241,6 +7242,7 @@ fi
       # we have headers, but no libs -- bail.
       have_gl=no
       ac_have_mesa_gl=no
       # we have headers, but no libs -- bail.
       have_gl=no
       ac_have_mesa_gl=no
+      gl_halfassed=yes
     else
       # linking works -- we can build the GL hacks.
       cat >> confdefs.h <<\EOF
     else
       # linking works -- we can build the GL hacks.
       cat >> confdefs.h <<\EOF
@@ -7267,12 +7269,12 @@ EOF
     if test "$ac_have_mesa_gl" = yes; then
 
       echo $ac_n "checking MesaGL version number""... $ac_c" 1>&6
     if test "$ac_have_mesa_gl" = yes; then
 
       echo $ac_n "checking MesaGL version number""... $ac_c" 1>&6
-echo "configure:7282: checking MesaGL version number" >&5
+echo "configure:7284: 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
 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 7287 "configure"
+#line 7289 "configure"
 #include "confdefs.h"
 #include <GL/gl.h>
 configure: MESA_MAJOR_VERSION MESA_MINOR_VERSION
 #include "confdefs.h"
 #include <GL/gl.h>
 configure: MESA_MAJOR_VERSION MESA_MINOR_VERSION
@@ -7338,7 +7340,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
   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
 
   echo $ac_n "checking for glBindTexture in -l$gl_lib_1""... $ac_c" 1>&6
-echo "configure:7353: checking for glBindTexture in -l$gl_lib_1" >&5
+echo "configure:7355: 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
 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
@@ -7346,7 +7348,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-l$gl_lib_1 $GL_LIBS -lX11 -lXext -lm $LIBS"
 cat > conftest.$ac_ext <<EOF
   ac_save_LIBS="$LIBS"
 LIBS="-l$gl_lib_1 $GL_LIBS -lX11 -lXext -lm $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 7361 "configure"
+#line 7363 "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
 #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
@@ -7357,7 +7359,7 @@ int main() {
 glBindTexture()
 ; return 0; }
 EOF
 glBindTexture()
 ; return 0; }
 EOF
-if { (eval echo configure:7372: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7374: \"$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
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -7391,7 +7393,7 @@ fi
     # See comments in utils/visual-gl.c for why this is sometimes necessary.
     #
     echo $ac_n "checking whether drastic GL measures must be taken""... $ac_c" 1>&6
     # See comments in utils/visual-gl.c for why this is sometimes necessary.
     #
     echo $ac_n "checking whether drastic GL measures must be taken""... $ac_c" 1>&6
-echo "configure:7406: checking whether drastic GL measures must be taken" >&5
+echo "configure:7408: checking whether drastic GL measures must be taken" >&5
     case "$host" in
       *-sgi*)
         echo "$ac_t""yes -- hello, SGI." 1>&6
     case "$host" in
       *-sgi*)
         echo "$ac_t""yes -- hello, SGI." 1>&6
@@ -7427,6 +7429,7 @@ fi
 
 have_gle=no
 with_gle_req=unspecified
 
 have_gle=no
 with_gle_req=unspecified
+gle_halfassed=no
 # Check whether --with-gle or --without-gle was given.
 if test "${with_gle+set}" = set; then
   withval="$with_gle"
 # Check whether --with-gle or --without-gle was given.
 if test "${with_gle+set}" = set; then
   withval="$with_gle"
@@ -7443,7 +7446,7 @@ fi
 
     /*)
      echo $ac_n "checking for GLE headers""... $ac_c" 1>&6
 
     /*)
      echo $ac_n "checking for GLE headers""... $ac_c" 1>&6
-echo "configure:7458: checking for GLE headers" >&5
+echo "configure:7461: checking for GLE headers" >&5
      d=$with_gle/include
      if test -d $d; then
        X_CFLAGS="-I$d $X_CFLAGS"
      d=$with_gle/include
      if test -d $d; then
        X_CFLAGS="-I$d $X_CFLAGS"
@@ -7453,7 +7456,7 @@ echo "configure:7458: checking for GLE headers" >&5
      fi
 
      echo $ac_n "checking for GLE libs""... $ac_c" 1>&6
      fi
 
      echo $ac_n "checking for GLE libs""... $ac_c" 1>&6
-echo "configure:7468: checking for GLE libs" >&5
+echo "configure:7471: checking for GLE libs" >&5
      d=$with_gle/lib
      if test -d $d; then
        X_LIBS="-L$d $X_LIBS"
      d=$with_gle/lib
      if test -d $d; then
        X_LIBS="-L$d $X_LIBS"
@@ -7489,17 +7492,17 @@ if test "$with_gle" = yes; then
   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
   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:7504: checking for GL/gutil.h" >&5
+echo "configure:7507: 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
 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 7509 "configure"
+#line 7512 "configure"
 #include "confdefs.h"
 #include <GL/gutil.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 #include "confdefs.h"
 #include <GL/gutil.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7514: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7517: \"$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*
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -7530,17 +7533,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
   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:7545: checking for GL/tube.h" >&5
+echo "configure:7548: 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
 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 7550 "configure"
+#line 7553 "configure"
 #include "confdefs.h"
 #include <GL/tube.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 #include "confdefs.h"
 #include <GL/tube.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7555: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7558: \"$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*
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -7564,11 +7567,9 @@ fi
   CPPFLAGS="$ac_save_CPPFLAGS"
   fi
 
   CPPFLAGS="$ac_save_CPPFLAGS"
   fi
 
-#          /usr/local/lib/GL/libgle.a
-#          /usr/local/lib/GL/libmatrix.a
-
   if test "$have_gle" = yes ; then
     have_gle=no
   if test "$have_gle" = yes ; then
     have_gle=no
+    gle_halfassed=yes
     
   ac_save_CPPFLAGS="$CPPFLAGS"
   ac_save_LDFLAGS="$LDFLAGS"
     
   ac_save_CPPFLAGS="$CPPFLAGS"
   ac_save_LDFLAGS="$LDFLAGS"
@@ -7587,7 +7588,7 @@ fi
   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
 
   echo $ac_n "checking for gleCreateGC in -lgle""... $ac_c" 1>&6
   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
 
   echo $ac_n "checking for gleCreateGC in -lgle""... $ac_c" 1>&6
-echo "configure:7602: checking for gleCreateGC in -lgle" >&5
+echo "configure:7603: 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
 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
@@ -7595,7 +7596,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lgle $GL_LIBS -lX11 -lXext -lm $LIBS"
 cat > conftest.$ac_ext <<EOF
   ac_save_LIBS="$LIBS"
 LIBS="-lgle $GL_LIBS -lX11 -lXext -lm $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 7610 "configure"
+#line 7611 "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
 #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
@@ -7606,7 +7607,7 @@ int main() {
 gleCreateGC()
 ; return 0; }
 EOF
 gleCreateGC()
 ; return 0; }
 EOF
-if { (eval echo configure:7621: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7622: \"$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
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -7621,7 +7622,7 @@ LIBS="$ac_save_LIBS"
 fi
 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
   echo "$ac_t""yes" 1>&6
 fi
 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
   echo "$ac_t""yes" 1>&6
-  have_gle=yes; GLE_LIBS="-lgle"
+  have_gle=yes; gle_halfassed=no, GLE_LIBS="-lgle"
 else
   echo "$ac_t""no" 1>&6
 fi
 else
   echo "$ac_t""no" 1>&6
 fi
@@ -7633,6 +7634,7 @@ fi
   fi
   if test "$have_gle" = yes ; then
     have_gle=no
   fi
   if test "$have_gle" = yes ; then
     have_gle=no
+    gle_halfassed=yes
     
   ac_save_CPPFLAGS="$CPPFLAGS"
   ac_save_LDFLAGS="$LDFLAGS"
     
   ac_save_CPPFLAGS="$CPPFLAGS"
   ac_save_LDFLAGS="$LDFLAGS"
@@ -7651,7 +7653,7 @@ fi
   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
 
   echo $ac_n "checking for uview_direction_d in -lmatrix""... $ac_c" 1>&6
   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
 
   echo $ac_n "checking for uview_direction_d in -lmatrix""... $ac_c" 1>&6
-echo "configure:7666: checking for uview_direction_d in -lmatrix" >&5
+echo "configure:7668: 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
 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
@@ -7659,7 +7661,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lmatrix $GL_LIBS -lX11 -lXext -lm $LIBS"
 cat > conftest.$ac_ext <<EOF
   ac_save_LIBS="$LIBS"
 LIBS="-lmatrix $GL_LIBS -lX11 -lXext -lm $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 7674 "configure"
+#line 7676 "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
 #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
@@ -7670,7 +7672,7 @@ int main() {
 uview_direction_d()
 ; return 0; }
 EOF
 uview_direction_d()
 ; return 0; }
 EOF
-if { (eval echo configure:7685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7687: \"$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
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -7685,7 +7687,8 @@ LIBS="$ac_save_LIBS"
 fi
 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
   echo "$ac_t""yes" 1>&6
 fi
 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
   echo "$ac_t""yes" 1>&6
-  have_gle=yes; GLE_LIBS="$GLE_LIBS -lmatrix"
+  have_gle=yes; gle_halfassed=no, 
+                    GLE_LIBS="$GLE_LIBS -lmatrix"
 else
   echo "$ac_t""no" 1>&6
 fi
 else
   echo "$ac_t""no" 1>&6
 fi
@@ -7735,7 +7738,7 @@ fi
 
     /*)
      echo $ac_n "checking for XPM headers""... $ac_c" 1>&6
 
     /*)
      echo $ac_n "checking for XPM headers""... $ac_c" 1>&6
-echo "configure:7750: checking for XPM headers" >&5
+echo "configure:7753: checking for XPM headers" >&5
      d=$with_xpm/include
      if test -d $d; then
        X_CFLAGS="-I$d $X_CFLAGS"
      d=$with_xpm/include
      if test -d $d; then
        X_CFLAGS="-I$d $X_CFLAGS"
@@ -7745,7 +7748,7 @@ echo "configure:7750: checking for XPM headers" >&5
      fi
 
      echo $ac_n "checking for XPM libs""... $ac_c" 1>&6
      fi
 
      echo $ac_n "checking for XPM libs""... $ac_c" 1>&6
-echo "configure:7760: checking for XPM libs" >&5
+echo "configure:7763: checking for XPM libs" >&5
      d=$with_xpm/lib
      if test -d $d; then
        X_LIBS="-L$d $X_LIBS"
      d=$with_xpm/lib
      if test -d $d; then
        X_LIBS="-L$d $X_LIBS"
@@ -7778,17 +7781,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
   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:7793: checking for X11/xpm.h" >&5
+echo "configure:7796: 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
 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 7798 "configure"
+#line 7801 "configure"
 #include "confdefs.h"
 #include <X11/xpm.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 #include "confdefs.h"
 #include <X11/xpm.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7803: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7806: \"$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*
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -7854,7 +7857,7 @@ fi
 
     /*)
      echo $ac_n "checking for XSHM headers""... $ac_c" 1>&6
 
     /*)
      echo $ac_n "checking for XSHM headers""... $ac_c" 1>&6
-echo "configure:7869: checking for XSHM headers" >&5
+echo "configure:7872: checking for XSHM headers" >&5
      d=$with_xshm/include
      if test -d $d; then
        X_CFLAGS="-I$d $X_CFLAGS"
      d=$with_xshm/include
      if test -d $d; then
        X_CFLAGS="-I$d $X_CFLAGS"
@@ -7864,7 +7867,7 @@ echo "configure:7869: checking for XSHM headers" >&5
      fi
 
      echo $ac_n "checking for XSHM libs""... $ac_c" 1>&6
      fi
 
      echo $ac_n "checking for XSHM libs""... $ac_c" 1>&6
-echo "configure:7879: checking for XSHM libs" >&5
+echo "configure:7882: checking for XSHM libs" >&5
      d=$with_xshm/lib
      if test -d $d; then
        X_LIBS="-L$d $X_LIBS"
      d=$with_xshm/lib
      if test -d $d; then
        X_LIBS="-L$d $X_LIBS"
@@ -7899,17 +7902,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
   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:7914: checking for X11/extensions/XShm.h" >&5
+echo "configure:7917: 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
 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 7919 "configure"
+#line 7922 "configure"
 #include "confdefs.h"
 #include <X11/extensions/XShm.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 #include "confdefs.h"
 #include <X11/extensions/XShm.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7924: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7927: \"$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*
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -7943,17 +7946,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
   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:7958: checking for sys/ipc.h" >&5
+echo "configure:7961: 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
 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 7963 "configure"
+#line 7966 "configure"
 #include "confdefs.h"
 #include <sys/ipc.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 #include "confdefs.h"
 #include <sys/ipc.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7968: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7971: \"$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*
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -7988,17 +7991,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
   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:8003: checking for sys/shm.h" >&5
+echo "configure:8006: 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
 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 8008 "configure"
+#line 8011 "configure"
 #include "confdefs.h"
 #include <sys/shm.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 #include "confdefs.h"
 #include <sys/shm.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8013: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8016: \"$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*
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -8030,8 +8033,9 @@ fi
   #
   case "$host" in
     *-aix*)
   #
   case "$host" in
     *-aix*)
-      have_xshm=no
-      
+      if  `uname -v` -eq 3 ; then
+        have_xshm=no
+        
   ac_save_CPPFLAGS="$CPPFLAGS"
   ac_save_LDFLAGS="$LDFLAGS"
 #  ac_save_LIBS="$LIBS"
   ac_save_CPPFLAGS="$CPPFLAGS"
   ac_save_LDFLAGS="$LDFLAGS"
 #  ac_save_LIBS="$LIBS"
@@ -8049,7 +8053,7 @@ fi
   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
 
   echo $ac_n "checking for XShmQueryExtension in -lXextSam""... $ac_c" 1>&6
   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
 
   echo $ac_n "checking for XShmQueryExtension in -lXextSam""... $ac_c" 1>&6
-echo "configure:8064: checking for XShmQueryExtension in -lXextSam" >&5
+echo "configure:8068: 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
 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
@@ -8057,7 +8061,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lXextSam -lX11 -lXext -lm $LIBS"
 cat > conftest.$ac_ext <<EOF
   ac_save_LIBS="$LIBS"
 LIBS="-lXextSam -lX11 -lXext -lm $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 8072 "configure"
+#line 8076 "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
 #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
@@ -8068,7 +8072,7 @@ int main() {
 XShmQueryExtension()
 ; return 0; }
 EOF
 XShmQueryExtension()
 ; return 0; }
 EOF
-if { (eval echo configure:8083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8087: \"$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
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -8093,6 +8097,7 @@ fi
   LDFLAGS="$ac_save_LDFLAGS"
 #  LIBS="$ac_save_LIBS"
   
   LDFLAGS="$ac_save_LDFLAGS"
 #  LIBS="$ac_save_LIBS"
   
+      fi
     ;;
   esac
 
     ;;
   esac
 
@@ -8134,7 +8139,7 @@ fi
 
     /*)
      echo $ac_n "checking for DOUBLE-BUFFER headers""... $ac_c" 1>&6
 
     /*)
      echo $ac_n "checking for DOUBLE-BUFFER headers""... $ac_c" 1>&6
-echo "configure:8149: checking for DOUBLE-BUFFER headers" >&5
+echo "configure:8154: checking for DOUBLE-BUFFER headers" >&5
      d=$with_xdbe/include
      if test -d $d; then
        X_CFLAGS="-I$d $X_CFLAGS"
      d=$with_xdbe/include
      if test -d $d; then
        X_CFLAGS="-I$d $X_CFLAGS"
@@ -8144,7 +8149,7 @@ echo "configure:8149: checking for DOUBLE-BUFFER headers" >&5
      fi
 
      echo $ac_n "checking for DOUBLE-BUFFER libs""... $ac_c" 1>&6
      fi
 
      echo $ac_n "checking for DOUBLE-BUFFER libs""... $ac_c" 1>&6
-echo "configure:8159: checking for DOUBLE-BUFFER libs" >&5
+echo "configure:8164: checking for DOUBLE-BUFFER libs" >&5
      d=$with_xdbe/lib
      if test -d $d; then
        X_LIBS="-L$d $X_LIBS"
      d=$with_xdbe/lib
      if test -d $d; then
        X_LIBS="-L$d $X_LIBS"
@@ -8178,17 +8183,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
   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:8193: checking for X11/extensions/Xdbe.h" >&5
+echo "configure:8198: 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
 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 8198 "configure"
+#line 8203 "configure"
 #include "confdefs.h"
 #include <X11/extensions/Xdbe.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 #include "confdefs.h"
 #include <X11/extensions/Xdbe.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8203: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8208: \"$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*
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -8251,7 +8256,7 @@ fi
 
     /*)
      echo $ac_n "checking for XReadDisplay headers""... $ac_c" 1>&6
 
     /*)
      echo $ac_n "checking for XReadDisplay headers""... $ac_c" 1>&6
-echo "configure:8266: checking for XReadDisplay headers" >&5
+echo "configure:8271: checking for XReadDisplay headers" >&5
      d=$with_readdisplay/include
      if test -d $d; then
        X_CFLAGS="-I$d $X_CFLAGS"
      d=$with_readdisplay/include
      if test -d $d; then
        X_CFLAGS="-I$d $X_CFLAGS"
@@ -8261,7 +8266,7 @@ echo "configure:8266: checking for XReadDisplay headers" >&5
      fi
 
      echo $ac_n "checking for XReadDisplay libs""... $ac_c" 1>&6
      fi
 
      echo $ac_n "checking for XReadDisplay libs""... $ac_c" 1>&6
-echo "configure:8276: checking for XReadDisplay libs" >&5
+echo "configure:8281: checking for XReadDisplay libs" >&5
      d=$with_readdisplay/lib
      if test -d $d; then
        X_LIBS="-L$d $X_LIBS"
      d=$with_readdisplay/lib
      if test -d $d; then
        X_LIBS="-L$d $X_LIBS"
@@ -8294,17 +8299,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
   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:8309: checking for X11/extensions/readdisplay.h" >&5
+echo "configure:8314: 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
 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 8314 "configure"
+#line 8319 "configure"
 #include "confdefs.h"
 #include <X11/extensions/readdisplay.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 #include "confdefs.h"
 #include <X11/extensions/readdisplay.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8319: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8324: \"$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*
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -8359,7 +8364,7 @@ fi
 
     /*)
      echo $ac_n "checking for Iris Video headers""... $ac_c" 1>&6
 
     /*)
      echo $ac_n "checking for Iris Video headers""... $ac_c" 1>&6
-echo "configure:8374: checking for Iris Video headers" >&5
+echo "configure:8379: checking for Iris Video headers" >&5
      d=$with_sgivideo/include
      if test -d $d; then
        X_CFLAGS="-I$d $X_CFLAGS"
      d=$with_sgivideo/include
      if test -d $d; then
        X_CFLAGS="-I$d $X_CFLAGS"
@@ -8369,7 +8374,7 @@ echo "configure:8374: checking for Iris Video headers" >&5
      fi
 
      echo $ac_n "checking for Iris Video libs""... $ac_c" 1>&6
      fi
 
      echo $ac_n "checking for Iris Video libs""... $ac_c" 1>&6
-echo "configure:8384: checking for Iris Video libs" >&5
+echo "configure:8389: checking for Iris Video libs" >&5
      d=$with_sgivideo/lib
      if test -d $d; then
        X_LIBS="-L$d $X_LIBS"
      d=$with_sgivideo/lib
      if test -d $d; then
        X_LIBS="-L$d $X_LIBS"
@@ -8402,17 +8407,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
   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:8417: checking for dmedia/vl.h" >&5
+echo "configure:8422: 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
 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 8422 "configure"
+#line 8427 "configure"
 #include "confdefs.h"
 #include <dmedia/vl.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 #include "confdefs.h"
 #include <dmedia/vl.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8427: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8432: \"$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*
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -8437,7 +8442,7 @@ fi
   if test "$have_sgivideo" = yes; then
     have_sgivideo=no
     echo $ac_n "checking for vlOpenVideo in -lvl""... $ac_c" 1>&6
   if test "$have_sgivideo" = yes; then
     have_sgivideo=no
     echo $ac_n "checking for vlOpenVideo in -lvl""... $ac_c" 1>&6
-echo "configure:8452: checking for vlOpenVideo in -lvl" >&5
+echo "configure:8457: 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
 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
@@ -8445,7 +8450,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lvl  $LIBS"
 cat > conftest.$ac_ext <<EOF
   ac_save_LIBS="$LIBS"
 LIBS="-lvl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 8460 "configure"
+#line 8465 "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
 #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
@@ -8456,7 +8461,7 @@ int main() {
 vlOpenVideo()
 ; return 0; }
 EOF
 vlOpenVideo()
 ; return 0; }
 EOF
-if { (eval echo configure:8471: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8476: \"$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
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -8527,7 +8532,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
   case "$with_zippy_req" in
     /*)
       echo $ac_n "checking for $with_zippy_req""... $ac_c" 1>&6
-echo "configure:8542: checking for $with_zippy_req" >&5
+echo "configure:8547: checking for $with_zippy_req" >&5
       if test -x "$with_zippy_req" ; then
         echo "$ac_t""yes" 1>&6
       else
       if test -x "$with_zippy_req" ; then
         echo "$ac_t""yes" 1>&6
       else
@@ -8541,7 +8546,7 @@ echo "configure:8542: 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
       # 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:8556: checking for $ac_word" >&5
+echo "configure:8561: 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
 if eval "test \"`echo '$''{'ac_cv_path_zip2'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -8591,7 +8596,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
 # 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:8606: checking for $ac_word" >&5
+echo "configure:8611: 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
 if eval "test \"`echo '$''{'ac_cv_prog_emacs_exe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -8625,7 +8630,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
 # 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:8640: checking for $ac_word" >&5
+echo "configure:8645: 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
 if eval "test \"`echo '$''{'ac_cv_prog_xemacs_exe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -8660,7 +8665,7 @@ done
 
   if test -n "$emacs_exe" ; then
     echo $ac_n "checking for emacs yow""... $ac_c" 1>&6
 
   if test -n "$emacs_exe" ; then
     echo $ac_n "checking for emacs yow""... $ac_c" 1>&6
-echo "configure:8675: checking for emacs yow" >&5
+echo "configure:8680: checking for emacs yow" >&5
     #
     # get emacs to tell us where the libexec directory is.
     #
     #
     # get emacs to tell us where the libexec directory is.
     #
@@ -8682,7 +8687,7 @@ echo "configure:8675: checking for emacs yow" >&5
 
   if test -z "$ac_cv_zippy_program" ; then
     echo $ac_n "checking for xemacs yow""... $ac_c" 1>&6
 
   if test -z "$ac_cv_zippy_program" ; then
     echo $ac_n "checking for xemacs yow""... $ac_c" 1>&6
-echo "configure:8697: checking for xemacs yow" >&5
+echo "configure:8702: checking for xemacs yow" >&5
     if test -n "$xemacs_exe" ; then
       #
       # get xemacs to tell us where the libexec directory is.
     if test -n "$xemacs_exe" ; then
       #
       # get xemacs to tell us where the libexec directory is.
@@ -8741,7 +8746,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
 # 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:8756: checking for $ac_word" >&5
+echo "configure:8761: 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
 if eval "test \"`echo '$''{'ac_cv_prog_fortune'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -8777,7 +8782,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
 # 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:8792: checking for $ac_word" >&5
+echo "configure:8797: 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
 if eval "test \"`echo '$''{'ac_cv_path_fortune'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -9597,7 +9602,6 @@ if test "$have_gl" = yes -a "$ac_have_mesa_gl" = yes ; then
   fi
 fi
 
   fi
 fi
 
-
 if test "$have_gl" = no ; then
   if test "$with_gl_req" = yes ; then
     warnL 'Use of GL was requested, but it was not found.'
 if test "$have_gl" = no ; then
   if test "$with_gl_req" = yes ; then
     warnL 'Use of GL was requested, but it was not found.'
@@ -9607,6 +9611,14 @@ if test "$have_gl" = no ; then
     noteL 'The OpenGL 3D library was not found.'
   fi
 
     noteL 'The OpenGL 3D library was not found.'
   fi
 
+  if test "$gl_halfassed" = yes ; then
+    echo ''
+    warn2 'More specifically, we found the headers, but not the'
+    warn2 'libraries; so either GL is half-installed on this'
+    warn2 "system, or something else went wrong.  The \`config.log'"
+    warn2 'file might contain some clues.'
+  fi
+
   echo ''
   warn2 'Those demos which use 3D will not be built or installed.'
   warn2 'You might want to consider installing OpenGL and'
   echo ''
   warn2 'Those demos which use 3D will not be built or installed.'
   warn2 'You might want to consider installing OpenGL and'
@@ -9621,19 +9633,32 @@ fi
 
 if test "$have_gl" = yes -a "$have_gle" = no ; then
   if test "$with_gle_req" = yes ; then
 
 if test "$have_gl" = yes -a "$have_gle" = no ; then
   if test "$with_gle_req" = yes ; then
-    warnL 'Use of GLE was requested, but it was not found.'
+    noteL 'Use of the GLE (GL Extrusion) library was requested, but'
+    warn2 'it was not found (though the OpenGL library was found, and'
+    warn2 'is being used.)'
   elif test "$with_gle_req" = no ; then
   elif test "$with_gle_req" = no ; then
-    noteL 'The GLE (GL Extrusion) library is not being used.'
+    noteL 'The OpenGL Library is being used, but the GLE (GL Extrusion)'
+    warn2 'library is not.'
   else
   else
-    noteL 'The GLE (GL Extrusion) library was not found.'
+    noteL 'The OpenGL Library was found, but the GLE (GL Extrusion)'
+    warn2 'was not.'
+  fi
+
+  if test "$gle_halfassed" = yes ; then
+    echo ''
+    warn2 'More specifically, we found the headers, but not the'
+    warn2 'libraries; so either GLE is half-installed on this'
+    warn2 "system, or something else went wrong.  The \`config.log'"
+    warn2 'file might contain some clues.'
   fi
 
   echo ''
   fi
 
   echo ''
-  warn2 'Some of the OpenGL (3D) demos will not be built or installed.'
-  warn2 'You might want to consider installing GLE and re-running'
-  warn2 'configure.  (Remember to delete the config.cache file first.)'
-  warn2 'You can find the GLE library at <http://www.linas.org/gle/>.'
-  warn2 'For general OpenGL info, see <http://www.opengl.org/>.'
+  warn2 'Some of the OpenGL (3D) demos (those that depend on GLE)'
+  warn2 'will not be built or installed.  You might want to consider'
+  warn2 'installing GLE and re-running configure.  (Remember to delete'
+  warn2 'the config.cache file first.)  You can find the GLE library'
+  warn2 'at <http://www.linas.org/gle/>.  For general OpenGL info,'
+  warn2 'see <http://www.opengl.org/>.'
 
 fi
 
 
 fi
 
index 322862f6dd55af18720a4a99551ce9e7830be6d3..30fc7634ffe6982f9324cbf37db54b81d5e5db3b 100644 (file)
@@ -1789,6 +1789,7 @@ fi
 have_gl=no
 ac_have_mesa_gl=no
 with_gl_req=unspecified
 have_gl=no
 ac_have_mesa_gl=no
 with_gl_req=unspecified
+gl_halfassed=no
 AC_ARG_WITH(gl,[
 Graphics options:
 
 AC_ARG_WITH(gl,[
 Graphics options:
 
@@ -1856,6 +1857,7 @@ if test "$with_gl" = yes; then
       # we have headers, but no libs -- bail.
       have_gl=no
       ac_have_mesa_gl=no
       # we have headers, but no libs -- bail.
       have_gl=no
       ac_have_mesa_gl=no
+      gl_halfassed=yes
     else
       # linking works -- we can build the GL hacks.
       AC_DEFINE(HAVE_GL)
     else
       # linking works -- we can build the GL hacks.
       AC_DEFINE(HAVE_GL)
@@ -1962,6 +1964,7 @@ fi
 
 have_gle=no
 with_gle_req=unspecified
 
 have_gle=no
 with_gle_req=unspecified
+gle_halfassed=no
 AC_ARG_WITH(gle,
 [  --with-gle              Build those demos which depend on GLE
                           (the OpenGL "extrusion" library.)],
 AC_ARG_WITH(gle,
 [  --with-gle              Build those demos which depend on GLE
                           (the OpenGL "extrusion" library.)],
@@ -1978,19 +1981,19 @@ if test "$with_gle" = yes; then
     AC_CHECK_X_HEADER(GL/tube.h, have_gle=yes, have_gle=no)
   fi
 
     AC_CHECK_X_HEADER(GL/tube.h, have_gle=yes, have_gle=no)
   fi
 
-#          /usr/local/lib/GL/libgle.a
-#          /usr/local/lib/GL/libmatrix.a
-
   if test "$have_gle" = yes ; then
     have_gle=no
   if test "$have_gle" = yes ; then
     have_gle=no
+    gle_halfassed=yes
     AC_CHECK_X_LIB(gle, gleCreateGC, 
     AC_CHECK_X_LIB(gle, gleCreateGC, 
-                   [have_gle=yes; GLE_LIBS="-lgle"],
+                   [have_gle=yes; gle_halfassed=no, GLE_LIBS="-lgle"],
                    [], $GL_LIBS -lX11 -lXext -lm)
   fi
   if test "$have_gle" = yes ; then
     have_gle=no
                    [], $GL_LIBS -lX11 -lXext -lm)
   fi
   if test "$have_gle" = yes ; then
     have_gle=no
+    gle_halfassed=yes
     AC_CHECK_X_LIB(matrix, uview_direction_d, 
     AC_CHECK_X_LIB(matrix, uview_direction_d, 
-                   [have_gle=yes; GLE_LIBS="$GLE_LIBS -lmatrix"],
+                   [have_gle=yes; gle_halfassed=no, 
+                    GLE_LIBS="$GLE_LIBS -lmatrix"],
                    [], $GL_LIBS -lX11 -lXext -lm)
   fi
 
                    [], $GL_LIBS -lX11 -lXext -lm)
   fi
 
@@ -2079,10 +2082,12 @@ if test "$with_xshm" = yes; then
   #
   case "$host" in
     *-aix*)
   #
   case "$host" in
     *-aix*)
-      have_xshm=no
-      AC_CHECK_X_LIB(XextSam, XShmQueryExtension,
-                     [have_xshm=yes; X_EXTRA_LIBS="$X_EXTRA_LIBS -lXextSam"],
-                     [true], -lX11 -lXext -lm)
+      if [ `uname -v` -eq 3 ]; then
+        have_xshm=no
+        AC_CHECK_X_LIB(XextSam, XShmQueryExtension,
+                       [have_xshm=yes; X_EXTRA_LIBS="$X_EXTRA_LIBS -lXextSam"],
+                       [true], -lX11 -lXext -lm)
+      fi
     ;;
   esac
 
     ;;
   esac
 
@@ -2695,7 +2700,6 @@ if test "$have_gl" = yes -a "$ac_have_mesa_gl" = yes ; then
   fi
 fi
 
   fi
 fi
 
-
 if test "$have_gl" = no ; then
   if test "$with_gl_req" = yes ; then
     warnL 'Use of GL was requested, but it was not found.'
 if test "$have_gl" = no ; then
   if test "$with_gl_req" = yes ; then
     warnL 'Use of GL was requested, but it was not found.'
@@ -2705,6 +2709,14 @@ if test "$have_gl" = no ; then
     noteL 'The OpenGL 3D library was not found.'
   fi
 
     noteL 'The OpenGL 3D library was not found.'
   fi
 
+  if test "$gl_halfassed" = yes ; then
+    echo ''
+    warn2 'More specifically, we found the headers, but not the'
+    warn2 'libraries; so either GL is half-installed on this'
+    warn2 "system, or something else went wrong.  The \`config.log'"
+    warn2 'file might contain some clues.'
+  fi
+
   echo ''
   warn2 'Those demos which use 3D will not be built or installed.'
   warn2 'You might want to consider installing OpenGL and'
   echo ''
   warn2 'Those demos which use 3D will not be built or installed.'
   warn2 'You might want to consider installing OpenGL and'
@@ -2719,19 +2731,32 @@ fi
 
 if test "$have_gl" = yes -a "$have_gle" = no ; then
   if test "$with_gle_req" = yes ; then
 
 if test "$have_gl" = yes -a "$have_gle" = no ; then
   if test "$with_gle_req" = yes ; then
-    warnL 'Use of GLE was requested, but it was not found.'
+    noteL 'Use of the GLE (GL Extrusion) library was requested, but'
+    warn2 'it was not found (though the OpenGL library was found, and'
+    warn2 'is being used.)'
   elif test "$with_gle_req" = no ; then
   elif test "$with_gle_req" = no ; then
-    noteL 'The GLE (GL Extrusion) library is not being used.'
+    noteL 'The OpenGL Library is being used, but the GLE (GL Extrusion)'
+    warn2 'library is not.'
   else
   else
-    noteL 'The GLE (GL Extrusion) library was not found.'
+    noteL 'The OpenGL Library was found, but the GLE (GL Extrusion)'
+    warn2 'was not.'
+  fi
+
+  if test "$gle_halfassed" = yes ; then
+    echo ''
+    warn2 'More specifically, we found the headers, but not the'
+    warn2 'libraries; so either GLE is half-installed on this'
+    warn2 "system, or something else went wrong.  The \`config.log'"
+    warn2 'file might contain some clues.'
   fi
 
   echo ''
   fi
 
   echo ''
-  warn2 'Some of the OpenGL (3D) demos will not be built or installed.'
-  warn2 'You might want to consider installing GLE and re-running'
-  warn2 'configure.  (Remember to delete the config.cache file first.)'
-  warn2 'You can find the GLE library at <http://www.linas.org/gle/>.'
-  warn2 'For general OpenGL info, see <http://www.opengl.org/>.'
+  warn2 'Some of the OpenGL (3D) demos (those that depend on GLE)'
+  warn2 'will not be built or installed.  You might want to consider'
+  warn2 'installing GLE and re-running configure.  (Remember to delete'
+  warn2 'the config.cache file first.)  You can find the GLE library'
+  warn2 'at <http://www.linas.org/gle/>.  For general OpenGL info,'
+  warn2 'see <http://www.opengl.org/>.'
 
 fi
 
 
 fi
 
index 3e830096a376a438322dfcee6564dc98ea4b4121..36a50c02bd77d24abe883b41c34e4b391eaea233 100644 (file)
@@ -1,4 +1,4 @@
-# driver/Makefile.in --- xscreensaver, Copyright (c) 1997 Jamie Zawinski.
+# driver/Makefile.in --- xscreensaver, Copyright (c) 1997-1999 Jamie Zawinski.
 # the `../configure' script generates `driver/Makefile' from this file.
 
 @SET_MAKE@
 # the `../configure' script generates `driver/Makefile' from this file.
 
 @SET_MAKE@
@@ -182,7 +182,9 @@ install-strip:
                install
 
 install-program: $(EXES)
                install
 
 install-program: $(EXES)
-       @if [ ! -d $(bindir) ]; then $(INSTALL_DIRS) $(bindir) ; fi
+       @if [ ! -d $(install_prefix)$(bindir) ]; then                   \
+         $(INSTALL_DIRS) $(install_prefix)$(bindir) ;                  \
+        fi
        @inst="$(INSTALL_PROGRAM)" ;                                    \
        if [ @NEED_SETUID@ = yes ]; then                                \
           me=`PATH="$$PATH:/usr/ucb" whoami` ;                         \
        @inst="$(INSTALL_PROGRAM)" ;                                    \
        if [ @NEED_SETUID@ = yes ]; then                                \
           me=`PATH="$$PATH:/usr/ucb" whoami` ;                         \
@@ -202,24 +204,30 @@ install-program: $(EXES)
  $$e "           means that locking might not work.  (Try it and see.)"             ;\
  $$e "  ####################################################################";\
  $$e ""                                                                             ;\
  $$e "           means that locking might not work.  (Try it and see.)"             ;\
  $$e "  ####################################################################";\
  $$e ""                                                                             ;\
-          fi ;                                                         \
-       fi ;                                                            \
-       echo $$inst xscreensaver $(bindir)/xscreensaver ;               \
-       $$inst xscreensaver $(bindir)/xscreensaver
-       $(INSTALL_PROGRAM) xscreensaver-command $(bindir)/xscreensaver-command
-       $(INSTALL_PROGRAM) xscreensaver-demo $(bindir)/xscreensaver-demo
+          fi ;                                                               \
+       fi ;                                                                  \
+       echo $$inst xscreensaver $(install_prefix)$(bindir)/xscreensaver ;    \
+       $$inst xscreensaver $(install_prefix)$(bindir)/xscreensaver
+       $(INSTALL_PROGRAM) xscreensaver-command \
+         $(install_prefix)$(bindir)/xscreensaver-command
+       $(INSTALL_PROGRAM) xscreensaver-demo \
+         $(install_prefix)$(bindir)/xscreensaver-demo
 
 install-ad: XScreenSaver.ad
 
 install-ad: XScreenSaver.ad
-       @if [ ! -d $(AD_DIR) ]; then $(INSTALL_DIRS) $(AD_DIR) ; fi
-       @-echo $(INSTALL_DATA) XScreenSaver.ad $(AD_DIR)/XScreenSaver ;       \
-       if $(INSTALL_DATA) XScreenSaver.ad $(AD_DIR)/XScreenSaver ; then      \
+       @if [ ! -d $(install_prefix)$(AD_DIR) ]; then                         \
+         $(INSTALL_DIRS) $(install_prefix)$(AD_DIR) ;                        \
+        fi
+       @-echo $(INSTALL_DATA) XScreenSaver.ad                                \
+         $(install_prefix)$(AD_DIR)/XScreenSaver ;                           \
+       if $(INSTALL_DATA) XScreenSaver.ad                                    \
+         $(install_prefix)$(AD_DIR)/XScreenSaver ; then                      \
          true ;                                                              \
        else                                                                  \
          e=echo ;                                                            \
          true ;                                                              \
        else                                                                  \
          e=echo ;                                                            \
-         if [ -f $(AD_DIR)/XScreenSaver ]; then                              \
+         if [ -f $(install_prefix)$(AD_DIR)/XScreenSaver ]; then             \
  $$e ""                                                                             ;\
  $$e "  ####################################################################";\
  $$e ""                                                                             ;\
  $$e "  ####################################################################";\
- $$e "  Warning: unable to install $(AD_DIR)/XScreenSaver"                  ;\
+ $$e "  Warning: unable to install $(install_prefix)$(AD_DIR)/XScreenSaver"  ;\
  $$e "           That file exists, and is unwritable.  It is probably from"  ;\
  $$e "           an older version of xscreensaver, and could cause things"   ;\
  $$e "           to malfunction.  Please delete it!"                        ;\
  $$e "           That file exists, and is unwritable.  It is probably from"  ;\
  $$e "           an older version of xscreensaver, and could cause things"   ;\
  $$e "           to malfunction.  Please delete it!"                        ;\
@@ -229,7 +237,7 @@ install-ad: XScreenSaver.ad
          else                                                                \
  $$e ""                                                                             ;\
  $$e "  ####################################################################";\
          else                                                                \
  $$e ""                                                                             ;\
  $$e "  ####################################################################";\
- $$e "  Warning: unable to install $(AD_DIR)/XScreenSaver"                  ;\
+ $$e "  Warning: unable to install $(install_prefix)$(AD_DIR)/XScreenSaver"  ;\
  $$e "           The directory is unwritable.  This is probably ok;"        ;\
  $$e "           xscreensaver should work without that file."               ;\
  $$e "  ####################################################################";\
  $$e "           The directory is unwritable.  This is probably ok;"        ;\
  $$e "           xscreensaver should work without that file."               ;\
  $$e "  ####################################################################";\
@@ -240,36 +248,40 @@ install-ad: XScreenSaver.ad
 
 install-man: $(MEN)
        @men="$(MEN)" ;                                                 \
 
 install-man: $(MEN)
        @men="$(MEN)" ;                                                 \
-       if [ ! -d $(man1dir) ]; then $(INSTALL_DIRS) $(man1dir) ; fi ;  \
+       if [ ! -d $(install_prefix)$(man1dir) ]; then                   \
+         $(INSTALL_DIRS) $(install_prefix)$(man1dir) ;                 \
+        fi ;                                                           \
        for man in $$men; do                                            \
          instname=`echo $$man | sed 's/\.man$$/\.$(mansuffix)/'` ;     \
          instname=`echo $$instname | sed 's/-old//'` ;                 \
        for man in $$men; do                                            \
          instname=`echo $$man | sed 's/\.man$$/\.$(mansuffix)/'` ;     \
          instname=`echo $$instname | sed 's/-old//'` ;                 \
-         echo $(INSTALL_DATA) $(srcdir)/$$man $(man1dir)/$$instname ;  \
-         $(INSTALL_DATA) $(srcdir)/$$man $(man1dir)/$$instname ;       \
+         echo $(INSTALL_DATA) $(srcdir)/$$man                          \
+          $(install_prefix)$(man1dir)/$$instname ;                     \
+         $(INSTALL_DATA) $(srcdir)/$$man                               \
+           $(install_prefix)$(man1dir)/$$instname ;                    \
        done
 
 uninstall-program:
        @for program in $(EXES); do                                     \
        done
 
 uninstall-program:
        @for program in $(EXES); do                                     \
-         echo rm -f $(bindir)/$$program ;                              \
-         rm -f $(bindir)/$$program ;                                   \
+         echo rm -f $(install_prefix)$(bindir)/$$program ;             \
+         rm -f $(install_prefix)$(bindir)/$$program ;                  \
        done
 
 uninstall-ad:
        done
 
 uninstall-ad:
-       rm -f $(AD_DIR)/XScreenSaver
+       rm -f $(install_prefix)$(AD_DIR)/XScreenSaver
 
 uninstall-man:
        @men="$(MEN)" ;                                                 \
        for man in $$men; do                                            \
          instname=`echo $$man | sed 's/\.man$$/\.$(mansuffix)/'` ;     \
 
 uninstall-man:
        @men="$(MEN)" ;                                                 \
        for man in $$men; do                                            \
          instname=`echo $$man | sed 's/\.man$$/\.$(mansuffix)/'` ;     \
-         echo rm -f $(man1dir)/$$instname ;                            \
-         rm -f $(man1dir)/$$instname ;                                 \
+         echo rm -f $(install_prefix)$(man1dir)/$$instname ;           \
+         rm -f $(install_prefix)$(man1dir)/$$instname ;                \
        done
 
 install-pam:
        @src="$(srcdir)/xscreensaver.pam" ;                             \
        dest=`sed -n 's/.*PAM_SERVICE_NAME[     ]*"\([^"]*\)".*$$/\1/p' \
           < ../config.h` ;                                             \
        done
 
 install-pam:
        @src="$(srcdir)/xscreensaver.pam" ;                             \
        dest=`sed -n 's/.*PAM_SERVICE_NAME[     ]*"\([^"]*\)".*$$/\1/p' \
           < ../config.h` ;                                             \
-       dir="$(PAM_DIR)" ;                                              \
+       dir="$(install_prefix)$(PAM_DIR)" ;                             \
        conf="$(PAM_CONF)" ;                                            \
                                                                        \
        if [ -d $$dir ] ; then                                          \
        conf="$(PAM_CONF)" ;                                            \
                                                                        \
        if [ -d $$dir ] ; then                                          \
@@ -313,7 +325,7 @@ install-pam:
 install-kde:
        @src="$(srcdir)/xscreensaver.kss" ;                                   \
        if [ "$$KDEDIR" != "" ]; then                                         \
 install-kde:
        @src="$(srcdir)/xscreensaver.kss" ;                                   \
        if [ "$$KDEDIR" != "" ]; then                                         \
-         dir="$$KDEDIR/bin" ;                                                \
+         dir="$(install_prefix)$$KDEDIR/bin" ;                               \
          dest="$$dir/xscreensaver.kss" ;                                     \
          echo $(INSTALL_PROGRAM) $$src $$dest ;                              \
          if $(INSTALL_PROGRAM) $$src $$dest ; then                           \
          dest="$$dir/xscreensaver.kss" ;                                     \
          echo $(INSTALL_PROGRAM) $$src $$dest ;                              \
          if $(INSTALL_PROGRAM) $$src $$dest ; then                           \
@@ -323,10 +335,10 @@ install-kde:
  $$e ""                                                                             ;\
  $$e "  ####################################################################";\
  $$e "  Warning: unable to install $$dest"                                  ;\
  $$e ""                                                                             ;\
  $$e "  ####################################################################";\
  $$e "  Warning: unable to install $$dest"                                  ;\
-           if [ ! -d $$KDEDIR ]; then                                        \
- $$e "           $$KDEDIR (\$$KDEDIR) does not exist."                      ;\
-           elif [ ! -d $$KDEDIR/bin ]; then                                  \
- $$e "           $$KDEDIR/bin (\$$KDEDIR/bin) does not exist."              ;\
+           if [ ! -d $(install_prefix)$$KDEDIR ]; then                       \
+ $$e "           $(install_prefix)$$KDEDIR (\$$KDEDIR) does not exist."             ;\
+           elif [ ! -d $(install_prefix)$$KDEDIR/bin ]; then                 \
+ $$e "           $(install_prefix)$$KDEDIR/bin (\$$KDEDIR/bin) does not exist.";\
            elif [ -f $$dest ]; then                                          \
  $$e "           That file exists, and is unwritable."                      ;\
            else                                                              \
            elif [ -f $$dest ]; then                                          \
  $$e "           That file exists, and is unwritable."                      ;\
            else                                                              \
@@ -340,7 +352,7 @@ install-kde:
 
 uninstall-kde:
        @if [ "$$KDEDIR" != "" ]; then                                  \
 
 uninstall-kde:
        @if [ "$$KDEDIR" != "" ]; then                                  \
-         dest="$$KDEDIR/bin/xscreensaver.kss" ;                        \
+         dest="$(install_prefix)$$KDEDIR/bin/xscreensaver.kss" ;       \
          echo rm -f $$dest ;                                           \
          rm -f $$dest ;                                                \
        fi
          echo rm -f $$dest ;                                           \
          rm -f $$dest ;                                                \
        fi
index bc0f4031777c0e795e920c6a782602b302aa6861..825c4c724bd25e60b2558e86750a3b4a12049b07 100644 (file)
@@ -4,8 +4,8 @@
 !            a screen saver and locker for the X window system
 !                            by Jamie Zawinski
 !
 !            a screen saver and locker for the X window system
 !                            by Jamie Zawinski
 !
-!                              version 3.20
-!                                12-Nov-99
+!                              version 3.21
+!                                18-Nov-99
 !
 ! See "man xscreensaver" for more info.  The latest version is always
 ! available at http://www.jwz.org/xscreensaver/
 !
 ! See "man xscreensaver" for more info.  The latest version is always
 ! available at http://www.jwz.org/xscreensaver/
 ! The "helpURL" will be substituted for up to two occurrences of "%s".
 *loadURL: netscape -remote 'openURL(%s)' || netscape '%s'
 
 ! The "helpURL" will be substituted for up to two occurrences of "%s".
 *loadURL: netscape -remote 'openURL(%s)' || netscape '%s'
 
+! This is what the "Manual" button in xscreensaver-demo runs (/bin/sh syntax.)
+*manualCommand: xterm +sb -fg black -bg gray75 -T '%s manual' \
+        -e /bin/sh -c 'man "%s" || read'
+! Gnome folks might prefer this:
+!*manualCommand: gnome-help-browser 'man:%s'
+
 
 ! The format used for printing the date and time in the password dialog box
 ! (see the strftime(3) manual page for details.)
 
 ! The format used for printing the date and time in the password dialog box
 ! (see the strftime(3) manual page for details.)
           "Qix (transparent)"  qix -root -count 4 -solid -transparent      \n\
                "Qix (linear)"  qix -root -count 5 -solid -transparent        \
                                  -linear -segments 250 -size 100           \n\
           "Qix (transparent)"  qix -root -count 4 -solid -transparent      \n\
                "Qix (linear)"  qix -root -count 5 -solid -transparent        \
                                  -linear -segments 250 -size 100           \n\
+- mono:           "Qix (xor)"  qix -root -linear -count 5 -size 200          \
+                                 -spread 30 -segments 75 -solid -xor       \n\
+                                                                             \
          "Attraction (balls)"  attraction -root -mode balls                \n\
          "Attraction (lines)"  attraction -root -mode lines -points 3        \
                                  -segments 200                             \n\
          "Attraction (balls)"  attraction -root -mode balls                \n\
          "Attraction (lines)"  attraction -root -mode lines -points 3        \
                                  -segments 200                             \n\
+-         "Attraction (poly)"  attraction -root -mode polygons             \n\
        "Attraction (splines)"  attraction -root -mode splines -segments      \
                                  300                                       \n\
        "Attraction (orbital)"  attraction -root -mode lines -radius 300      \
                                  -orbit -vmult 0.5                         \n\
        "Attraction (splines)"  attraction -root -mode splines -segments      \
                                  300                                       \n\
        "Attraction (orbital)"  attraction -root -mode lines -radius 300      \
                                  -orbit -vmult 0.5                         \n\
+                                                                             \
                                pyro -root                                  \n\
                                pyro -root                                  \n\
+                               rocks -root                                 \n\
                                helix -root                                 \n\
                                pedal -root                                 \n\
                                rorschach -root -offset 7                   \n\
                                helix -root                                 \n\
                                pedal -root                                 \n\
                                rorschach -root -offset 7                   \n\
                                ccurve -root                                \n\
                                blaster -root                               \n\
                                bumps -root                                 \n\
                                ccurve -root                                \n\
                                blaster -root                               \n\
                                bumps -root                                 \n\
+  color:                       bubbles -root                               \n\
   default-n:                   webcollage -root                            \n\
   default-n:  "WebCollage (whacked)"                                         \
                                webcollage -root -filter                      \
                                  'vidwhacker -stdin -stdout'               \n\
 - default-n:                   vidwhacker -root                            \n\
                                                                              \
   default-n:                   webcollage -root                            \n\
   default-n:  "WebCollage (whacked)"                                         \
                                webcollage -root -filter                      \
                                  'vidwhacker -stdin -stdout'               \n\
 - default-n:                   vidwhacker -root                            \n\
                                                                              \
-- mono:        "Rocks (mono)"  rocks -root                                 \n\
-  color:       "Rocks (color)"         rocks -root -fg darksalmon                  \n\
-- mono:           "Qix (xor)"  qix -root -linear -count 5 -size 200          \
-                                 -spread 30 -segments 75 -solid -xor       \n\
-  color:   "Attraction (poly)"         attraction -root -mode polygons             \n\
-- color:  "Attraction (filled)"        attraction -root -mode filled-splines         \
-                                 -segments 0                               \n\
-- Color:  "Attraction (glow)"  attraction -root -glow -points 10           \n\
-  color:                       bubbles -root                               \n\
-                                                                             \
 @GL_KLUDGE@ GL:                        gears -root                                 \n\
 @GL_KLUDGE@ GL:                        superquadrics -root                         \n\
 @GL_KLUDGE@ GL:                        morph3d -root                               \n\
 @GL_KLUDGE@ GL:                        gears -root                                 \n\
 @GL_KLUDGE@ GL:                        superquadrics -root                         \n\
 @GL_KLUDGE@ GL:                        morph3d -root                               \n\
                                  -texture_quality -light -fog              \n\
 @GLE_KLUDGE@GL:                        extrusion -root                             \n\
 @GL_KLUDGE@ GL:                        sierpinski3d -root                          \n\
                                  -texture_quality -light -fog              \n\
 @GLE_KLUDGE@GL:                        extrusion -root                             \n\
 @GL_KLUDGE@ GL:                        sierpinski3d -root                          \n\
+                                                                             \
+-                              xdaliclock -root -builtin3 -cycle           \n\
+- default-n:                   xearth -nofork -nostars -ncolors 50           \
+                                 -night 3 -wait 0 -timewarp 400.0 -pos       \
+                                 sunrel/38/-30                             \n\
+-                              ssystem -fullscreen :32                     \n\
+-                              xmountains -b -M -Z 0 -r 1                  \n\
+-      "XMountains (top)"      xmountains -b -M -Z 0 -r 1 -m               \n\
+-                               xaos -root -autopilot -incoloring -1         \
+                                  -nogui -outcoloring -1                   \n\
+-                              xfishtank -d                                \n
+
 
 
-! Some other programs that you might want to track down (these work as
-! XScreenSaver helpers, but are not distributed with it):
-!
-!                              xdaliclock -root -builtin2                  \n\
-!                              xswarm -r 2>&-                              \n\
-!                              xwave -root                                 \n\
-!                              xbouncebits ...                             \n\
-!                              ico -r -faces -sleep 1 -obj ico             \n\
-!                              xsplinefun                                  \n\
-!                              xmountains -b -M                            \n\
-!      color:                  xfishtank -c black -d -r 2                  \n\
-!
-! xtacy is ok, but it only works on the default visual.  We can satisfy
-! that constraint like so:
-!
-!    default:  "Xtacy (funky)" xtacy -root -delay 100 -funky -number 3     \n\
-!    default:  "Xtacy (grav)"  xtacy -root -delay 100 -gravity             \n\
-!    default:  "Xtacy (mixer)" xtacy -root -delay 100 -mixer               \n\
-!    default:  "Xtacy (taffy)" xtacy -root -delay 100 -taffy -pal 4        \n\
-! 
 ! To display a randomized slideshow of images, you can do something like this:
 !
 !    default-n:  "Slideshow"   xv -root -rmode 5 -random -viewonly           \
 ! To display a randomized slideshow of images, you can do something like this:
 !
 !    default-n:  "Slideshow"   xv -root -rmode 5 -random -viewonly           \
 ! (meaning, "-visual default -install") but you probably won't ever need
 ! to use that.
 !
 ! (meaning, "-visual default -install") but you probably won't ever need
 ! to use that.
 !
-! XEarth is nice, too:
-!
-!     default-n: xearth -nostars -wait 0 -timewarp 400 -pos sunrel/38/-30
-!
 !
 ! Some of the GL demos that SGI ships work with XScreenSaver; most don't.
 ! XScreenSaver includes a program (not built or installed by default)
 !
 ! Some of the GL demos that SGI ships work with XScreenSaver; most don't.
 ! XScreenSaver includes a program (not built or installed by default)
 !
 ! You can also use the "ant" demo, but first you need to wrap a shell script
 ! around it that cds to its home directory, so that it can find its files;
 !
 ! You can also use the "ant" demo, but first you need to wrap a shell script
 ! around it that cds to its home directory, so that it can find its files;
-! and also pass it the -S argument, to prevent it from forking.
-!
-!
-! Also, since these actually end up mapping their own windows instead of
-! drawing on the XScreenSaver-provided root, when they are being run from
-! demo-mode, you can't pop up the demo-mode dialog just by clicking the
-! mouse: you must first type ESC to make the SGI programs exit.  This sucks.
-! Things should work properly when they are being run by xscreensaver in
-! non-demo-mode, however.
-!
+! and also pass it the -S argument, to prevent it from forking.  What a mess!
 ! Basically, the SGI demo writers went out of their way to make my life hell.
 
 
 ! Basically, the SGI demo writers went out of their way to make my life hell.
 
 
@@ -1234,20 +1215,41 @@ like something is dripping into it.  Written by Tom Hammersley.
 *hacks.xdaliclock.name: XDaliClock
 *hacks.xdaliclock.documentation:                                       \
 XDaliClock draws a large digital clock, the numbers of which change by \
 *hacks.xdaliclock.name: XDaliClock
 *hacks.xdaliclock.documentation:                                       \
 XDaliClock draws a large digital clock, the numbers of which change by \
-``melting'' into their new shapes.  Written by Jamie Zawinski.
+``melting'' into their new shapes.  Written by Jamie Zawinski.  This   \
+is not included with the XScreenSaver package, but if you don't have   \
+it already, you can find it at <http://www.jwz.org/xdaliclock/>.
 
 *hacks.xearth.documentation:                                           \
 XEarth draws an image of the Earth, as seen from your favorite vantage \
 point in space, correctly shaded for the current position of the Sun.  \
 
 *hacks.xearth.documentation:                                           \
 XEarth draws an image of the Earth, as seen from your favorite vantage \
 point in space, correctly shaded for the current position of the Sun.  \
-Written by Kirk Johnson.
+Written by Kirk Johnson.  This is not included with the XScreenSaver   \
+package, but if you don't have it already, you can find it at          \
+<http://www.cs.colorado.edu/~tuna/xearth/>.
 
 *hacks.ssystem.name: SSystem
 *hacks.ssystem.documentation:                                          \
 SSystem is a GL Solar System simulator.  It simulates flybys of Sun,   \
 the nine planets and a few major satellites, with four camera modes.   \
 
 *hacks.ssystem.name: SSystem
 *hacks.ssystem.documentation:                                          \
 SSystem is a GL Solar System simulator.  It simulates flybys of Sun,   \
 the nine planets and a few major satellites, with four camera modes.   \
-Written by Raul Alonso.
+Written by Raul Alonso.  This is not included with the XScreenSaver    \
+package, but if you don't have it already, you can find it at          \
+<http://www1.las.es/~amil/ssystem/>.
 
 *hacks.xmountains.documentation:                                       \
 XMountains generates realistic-looking fractal terrains of snow-capped \
 mountains near water, with either a top view or a side view.           \
 
 *hacks.xmountains.documentation:                                       \
 XMountains generates realistic-looking fractal terrains of snow-capped \
 mountains near water, with either a top view or a side view.           \
-Written by Stephen Booth.
+Written by Stephen Booth.  This is not included with the XScreenSaver  \
+package, but if you don't have it already, you can find it at          \
+<http://www.epcc.ed.ac.uk/~spb/xmountains/>.
+
+*hacks.xaos.name: XaoS
+*hacks.xaos.documentation:                                             \
+XaoS generates fast fly-through animations of the Mandelbrot and other \
+fractal sets.  Written by Thomas Marsh and Jan Hubicka.    This is not \
+included with the XScreenSaver package, but if you don't have it       \
+already, you can find it at <http://limax.paru.cas.cz/~hubicka/XaoS/>.
+
+*hacks.xfishtank.name: XFishTank
+*hacks.xfishtank.documentation:                                                \
+Fish!  This is not included with the XScreenSaver package, but if you  \
+don't have it already, you can find it at                               \
+<http://metalab.unc.edu/pub/Linux/X11/demos/>.
index 10bef5795ce3fc6ce26a760dd502e3c71a0fedca..0ec2056acb7e9ff6d3d12ce241b204499ed3c07b 100644 (file)
@@ -27,6 +27,8 @@
 "*prefsCommand: xscreensaver-demo -prefs",
 "*helpURL: http://www.jwz.org/xscreensaver/man.html",
 "*loadURL: netscape -remote 'openURL(%s)' || netscape '%s'",
 "*prefsCommand: xscreensaver-demo -prefs",
 "*helpURL: http://www.jwz.org/xscreensaver/man.html",
 "*loadURL: netscape -remote 'openURL(%s)' || netscape '%s'",
+"*manualCommand: xterm +sb -fg black -bg gray75 -T '%s manual' \
+        -e /bin/sh -c 'man \"%s\" || read'",
 "*dateFormat:          %d-%b-%y (%a); %I:%M %p",
 "*installColormap:     True",
 "*programs:                                                                  \
 "*dateFormat:          %d-%b-%y (%a); %I:%M %p",
 "*installColormap:     True",
 "*programs:                                                                  \
           \"Qix (transparent)\"        qix -root -count 4 -solid -transparent      \\n\
                \"Qix (linear)\"        qix -root -count 5 -solid -transparent        \
                                  -linear -segments 250 -size 100           \\n\
           \"Qix (transparent)\"        qix -root -count 4 -solid -transparent      \\n\
                \"Qix (linear)\"        qix -root -count 5 -solid -transparent        \
                                  -linear -segments 250 -size 100           \\n\
+- mono:           \"Qix (xor)\"        qix -root -linear -count 5 -size 200          \
+                                 -spread 30 -segments 75 -solid -xor       \\n\
+                                                                             \
          \"Attraction (balls)\"        attraction -root -mode balls                \\n\
          \"Attraction (lines)\"        attraction -root -mode lines -points 3        \
                                  -segments 200                             \\n\
          \"Attraction (balls)\"        attraction -root -mode balls                \\n\
          \"Attraction (lines)\"        attraction -root -mode lines -points 3        \
                                  -segments 200                             \\n\
+-         \"Attraction (poly)\"        attraction -root -mode polygons             \\n\
        \"Attraction (splines)\"        attraction -root -mode splines -segments      \
                                  300                                       \\n\
        \"Attraction (orbital)\"        attraction -root -mode lines -radius 300      \
                                  -orbit -vmult 0.5                         \\n\
        \"Attraction (splines)\"        attraction -root -mode splines -segments      \
                                  300                                       \\n\
        \"Attraction (orbital)\"        attraction -root -mode lines -radius 300      \
                                  -orbit -vmult 0.5                         \\n\
+                                                                             \
                                pyro -root                                  \\n\
                                pyro -root                                  \\n\
+                               rocks -root                                 \\n\
                                helix -root                                 \\n\
                                pedal -root                                 \\n\
                                rorschach -root -offset 7                   \\n\
                                helix -root                                 \\n\
                                pedal -root                                 \\n\
                                rorschach -root -offset 7                   \\n\
                                ccurve -root                                \\n\
                                blaster -root                               \\n\
                                bumps -root                                 \\n\
                                ccurve -root                                \\n\
                                blaster -root                               \\n\
                                bumps -root                                 \\n\
+  color:                       bubbles -root                               \\n\
   default-n:                   webcollage -root                            \\n\
   default-n:  \"WebCollage (whacked)\"                                       \
                                webcollage -root -filter                      \
                                  'vidwhacker -stdin -stdout'               \\n\
 - default-n:                   vidwhacker -root                            \\n\
                                                                              \
   default-n:                   webcollage -root                            \\n\
   default-n:  \"WebCollage (whacked)\"                                       \
                                webcollage -root -filter                      \
                                  'vidwhacker -stdin -stdout'               \\n\
 - default-n:                   vidwhacker -root                            \\n\
                                                                              \
-- mono:        \"Rocks (mono)\"        rocks -root                                 \\n\
-  color:       \"Rocks (color)\"       rocks -root -fg darksalmon                  \\n\
-- mono:           \"Qix (xor)\"        qix -root -linear -count 5 -size 200          \
-                                 -spread 30 -segments 75 -solid -xor       \\n\
-  color:   \"Attraction (poly)\"       attraction -root -mode polygons             \\n\
-- color:  \"Attraction (filled)\"      attraction -root -mode filled-splines         \
-                                 -segments 0                               \\n\
-- Color:  \"Attraction (glow)\"        attraction -root -glow -points 10           \\n\
-  color:                       bubbles -root                               \\n\
-                                                                             \
           GL:                  gears -root                                 \\n\
           GL:                  superquadrics -root                         \\n\
           GL:                  morph3d -root                               \\n\
           GL:                  gears -root                                 \\n\
           GL:                  superquadrics -root                         \\n\
           GL:                  morph3d -root                               \\n\
                                  -texture_quality -light -fog              \\n\
           GL:                  extrusion -root                             \\n\
           GL:                  sierpinski3d -root                          \\n\
                                  -texture_quality -light -fog              \\n\
           GL:                  extrusion -root                             \\n\
           GL:                  sierpinski3d -root                          \\n\
- ",
+                                                                             \
+-                              xdaliclock -root -builtin3 -cycle           \\n\
+- default-n:                   xearth -nofork -nostars -ncolors 50           \
+                                 -night 3 -wait 0 -timewarp 400.0 -pos       \
+                                 sunrel/38/-30                             \\n\
+-                              ssystem -fullscreen :32                     \\n\
+-                              xmountains -b -M -Z 0 -r 1                  \\n\
+-      \"XMountains (top)\"    xmountains -b -M -Z 0 -r 1 -m               \\n\
+-                               xaos -root -autopilot -incoloring -1         \
+                                  -nogui -outcoloring -1                   \\n\
+-                              xfishtank -d                                \\n",
 "XScreenSaver.pointerPollTime:         5",
 "XScreenSaver.initialDelay:            0",
 "XScreenSaver.windowCreationTimeout:   30",
 "XScreenSaver.pointerPollTime:         5",
 "XScreenSaver.initialDelay:            0",
 "XScreenSaver.windowCreationTimeout:   30",
@@ -885,17 +894,36 @@ like something is dripping into it.  Written by Tom Hammersley.",
 "*hacks.xdaliclock.name: XDaliClock",
 "*hacks.xdaliclock.documentation:                                      \
 XDaliClock draws a large digital clock, the numbers of which change by \
 "*hacks.xdaliclock.name: XDaliClock",
 "*hacks.xdaliclock.documentation:                                      \
 XDaliClock draws a large digital clock, the numbers of which change by \
-``melting'' into their new shapes.  Written by Jamie Zawinski.",
+``melting'' into their new shapes.  Written by Jamie Zawinski.  This   \
+is not included with the XScreenSaver package, but if you don't have   \
+it already, you can find it at <http://www.jwz.org/xdaliclock/>.",
 "*hacks.xearth.documentation:                                          \
 XEarth draws an image of the Earth, as seen from your favorite vantage \
 point in space, correctly shaded for the current position of the Sun.  \
 "*hacks.xearth.documentation:                                          \
 XEarth draws an image of the Earth, as seen from your favorite vantage \
 point in space, correctly shaded for the current position of the Sun.  \
-Written by Kirk Johnson.",
+Written by Kirk Johnson.  This is not included with the XScreenSaver   \
+package, but if you don't have it already, you can find it at          \
+<http://www.cs.colorado.edu/~tuna/xearth/>.",
 "*hacks.ssystem.name: SSystem",
 "*hacks.ssystem.documentation:                                         \
 SSystem is a GL Solar System simulator.  It simulates flybys of Sun,   \
 the nine planets and a few major satellites, with four camera modes.   \
 "*hacks.ssystem.name: SSystem",
 "*hacks.ssystem.documentation:                                         \
 SSystem is a GL Solar System simulator.  It simulates flybys of Sun,   \
 the nine planets and a few major satellites, with four camera modes.   \
-Written by Raul Alonso.",
+Written by Raul Alonso.  This is not included with the XScreenSaver    \
+package, but if you don't have it already, you can find it at          \
+<http://www1.las.es/~amil/ssystem/>.",
 "*hacks.xmountains.documentation:                                      \
 XMountains generates realistic-looking fractal terrains of snow-capped \
 mountains near water, with either a top view or a side view.           \
 "*hacks.xmountains.documentation:                                      \
 XMountains generates realistic-looking fractal terrains of snow-capped \
 mountains near water, with either a top view or a side view.           \
-Written by Stephen Booth.",
+Written by Stephen Booth.  This is not included with the XScreenSaver  \
+package, but if you don't have it already, you can find it at          \
+<http://www.epcc.ed.ac.uk/~spb/xmountains/>.",
+"*hacks.xaos.name: XaoS",
+"*hacks.xaos.documentation:                                            \
+XaoS generates fast fly-through animations of the Mandelbrot and other \
+fractal sets.  Written by Thomas Marsh and Jan Hubicka.    This is not \
+included with the XScreenSaver package, but if you don't have it       \
+already, you can find it at <http://limax.paru.cas.cz/~hubicka/XaoS/>.",
+"*hacks.xfishtank.name: XFishTank",
+"*hacks.xfishtank.documentation:                                               \
+Fish!  This is not included with the XScreenSaver package, but if you  \
+don't have it already, you can find it at                               \
+<http://metalab.unc.edu/pub/Linux/X11/demos/>.",
index cd86ee6b95cdd11beeb81c2f6c901aeacc67ff3d..8211d199e2f3288f0831942c651c937f1c4f11d2 100644 (file)
@@ -54,17 +54,17 @@ run_this_cb                            (GtkButton       *button,
                                         gpointer         user_data);
 
 void
                                         gpointer         user_data);
 
 void
-apply_this_cb                          (GtkButton       *button,
+apply_manual_cb                        (GtkButton       *button,
                                         gpointer         user_data);
 
 void
                                         gpointer         user_data);
 
 void
-cancel_this_cb                         (GtkButton       *button,
+prefs_ok_cb                            (GtkButton       *button,
                                         gpointer         user_data);
 
 void
                                         gpointer         user_data);
 
 void
-prefs_ok_cb                            (GtkButton       *button,
+prefs_cancel_cb                        (GtkButton       *button,
                                         gpointer         user_data);
 
 void
                                         gpointer         user_data);
 
 void
-prefs_cancel_cb                        (GtkButton       *button,
+manual_cb                              (GtkButton       *button,
                                         gpointer         user_data);
                                         gpointer         user_data);
index 0b133bc389aadd69959f833576604c0501c9cb65..510c9d632d6b9e4bfa5761165ce44593f8009161 100644 (file)
@@ -67,10 +67,9 @@ create_xscreensaver_demo ()
   GList *visual_combo_items = NULL;
   GtkWidget *combo_entry1;
   GtkWidget *demo_hline;
   GList *visual_combo_items = NULL;
   GtkWidget *combo_entry1;
   GtkWidget *demo_hline;
-  GtkWidget *demo_cancel_hbox;
+  GtkWidget *demo_manual_hbox;
   GtkWidget *demo;
   GtkWidget *demo;
-  GtkWidget *apply;
-  GtkWidget *cancel;
+  GtkWidget *manual;
   GtkWidget *demo_tab;
   GtkWidget *prefs_hbox;
   GtkWidget *prefs_frame;
   GtkWidget *demo_tab;
   GtkWidget *prefs_hbox;
   GtkWidget *prefs_frame;
@@ -535,13 +534,13 @@ create_xscreensaver_demo ()
   gtk_widget_show (demo_hline);
   gtk_box_pack_start (GTK_BOX (opts_vbox), demo_hline, FALSE, FALSE, 5);
 
   gtk_widget_show (demo_hline);
   gtk_box_pack_start (GTK_BOX (opts_vbox), demo_hline, FALSE, FALSE, 5);
 
-  demo_cancel_hbox = gtk_hbutton_box_new ();
-  gtk_widget_set_name (demo_cancel_hbox, "demo_cancel_hbox");
-  gtk_widget_ref (demo_cancel_hbox);
-  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "demo_cancel_hbox", demo_cancel_hbox,
+  demo_manual_hbox = gtk_hbutton_box_new ();
+  gtk_widget_set_name (demo_manual_hbox, "demo_manual_hbox");
+  gtk_widget_ref (demo_manual_hbox);
+  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "demo_manual_hbox", demo_manual_hbox,
                             (GtkDestroyNotify) gtk_widget_unref);
                             (GtkDestroyNotify) gtk_widget_unref);
-  gtk_widget_show (demo_cancel_hbox);
-  gtk_box_pack_start (GTK_BOX (opts_vbox), demo_cancel_hbox, FALSE, TRUE, 0);
+  gtk_widget_show (demo_manual_hbox);
+  gtk_box_pack_start (GTK_BOX (opts_vbox), demo_manual_hbox, FALSE, TRUE, 0);
 
   demo = gtk_button_new_with_label ("Demo");
   gtk_widget_set_name (demo, "demo");
 
   demo = gtk_button_new_with_label ("Demo");
   gtk_widget_set_name (demo, "demo");
@@ -549,29 +548,19 @@ create_xscreensaver_demo ()
   gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "demo", demo,
                             (GtkDestroyNotify) gtk_widget_unref);
   gtk_widget_show (demo);
   gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "demo", demo,
                             (GtkDestroyNotify) gtk_widget_unref);
   gtk_widget_show (demo);
-  gtk_container_add (GTK_CONTAINER (demo_cancel_hbox), demo);
+  gtk_container_add (GTK_CONTAINER (demo_manual_hbox), demo);
   GTK_WIDGET_SET_FLAGS (demo, GTK_CAN_DEFAULT);
   GTK_WIDGET_SET_FLAGS (demo, GTK_CAN_DEFAULT);
-  gtk_tooltips_set_tip (tooltips, demo, "Make any changes to this demo's parameters permanent, and run it in full-screen mode (click the mouse to return.)", NULL);
+  gtk_tooltips_set_tip (tooltips, demo, "Run this one in full-screen mode (click the mouse to return.)", NULL);
 
 
-  apply = gtk_button_new_with_label ("Apply");
-  gtk_widget_set_name (apply, "apply");
-  gtk_widget_ref (apply);
-  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "apply", apply,
+  manual = gtk_button_new_with_label ("Documentation...");
+  gtk_widget_set_name (manual, "manual");
+  gtk_widget_ref (manual);
+  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "manual", manual,
                             (GtkDestroyNotify) gtk_widget_unref);
                             (GtkDestroyNotify) gtk_widget_unref);
-  gtk_widget_show (apply);
-  gtk_container_add (GTK_CONTAINER (demo_cancel_hbox), apply);
-  GTK_WIDGET_SET_FLAGS (apply, GTK_CAN_DEFAULT);
-  gtk_tooltips_set_tip (tooltips, apply, "Make any changes to this demo's parameters permanent.", NULL);
-
-  cancel = gtk_button_new_with_label ("Cancel");
-  gtk_widget_set_name (cancel, "cancel");
-  gtk_widget_ref (cancel);
-  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "cancel", cancel,
-                            (GtkDestroyNotify) gtk_widget_unref);
-  gtk_widget_show (cancel);
-  gtk_container_add (GTK_CONTAINER (demo_cancel_hbox), cancel);
-  GTK_WIDGET_SET_FLAGS (cancel, GTK_CAN_DEFAULT);
-  gtk_tooltips_set_tip (tooltips, cancel, "Discard any changes you have made to this demo's parameters.", NULL);
+  gtk_widget_show (manual);
+  gtk_container_add (GTK_CONTAINER (demo_manual_hbox), manual);
+  GTK_WIDGET_SET_FLAGS (manual, GTK_CAN_DEFAULT);
+  gtk_tooltips_set_tip (tooltips, manual, "Click here to read the manual for this display mode, if it has one.", NULL);
 
   demo_tab = gtk_label_new ("Graphics Demos");
   gtk_widget_set_name (demo_tab, "demo_tab");
 
   demo_tab = gtk_label_new ("Graphics Demos");
   gtk_widget_set_name (demo_tab, "demo_tab");
@@ -871,11 +860,8 @@ create_xscreensaver_demo ()
   gtk_signal_connect (GTK_OBJECT (demo), "clicked",
                       GTK_SIGNAL_FUNC (run_this_cb),
                       NULL);
   gtk_signal_connect (GTK_OBJECT (demo), "clicked",
                       GTK_SIGNAL_FUNC (run_this_cb),
                       NULL);
-  gtk_signal_connect (GTK_OBJECT (apply), "clicked",
-                      GTK_SIGNAL_FUNC (apply_this_cb),
-                      NULL);
-  gtk_signal_connect (GTK_OBJECT (cancel), "clicked",
-                      GTK_SIGNAL_FUNC (cancel_this_cb),
+  gtk_signal_connect (GTK_OBJECT (manual), "clicked",
+                      GTK_SIGNAL_FUNC (manual_cb),
                       NULL);
   gtk_signal_connect (GTK_OBJECT (prefs_ok), "clicked",
                       GTK_SIGNAL_FUNC (prefs_ok_cb),
                       NULL);
   gtk_signal_connect (GTK_OBJECT (prefs_ok), "clicked",
                       GTK_SIGNAL_FUNC (prefs_ok_cb),
index f0e88246f66b09fe60f2a6e79562428c243b22cb..2b07ab0ce892fa2905e0b3c2b43d820d111b6e4b 100644 (file)
@@ -87,12 +87,8 @@ typedef struct {
 
 static void *global_prefs_pair;  /* I hate C so much... */
 
 
 static void *global_prefs_pair;  /* I hate C so much... */
 
-
-
 char *blurb (void) { return progname; }
 
 char *blurb (void) { return progname; }
 
-static void run_hack (int which);
-
 static char *short_version = 0;
 
 Atom XA_VROOT;
 static char *short_version = 0;
 
 Atom XA_VROOT;
@@ -101,10 +97,10 @@ Atom XA_SCREENSAVER_ID, XA_SCREENSAVER_STATUS, XA_SELECT, XA_DEMO;
 Atom XA_ACTIVATE, XA_BLANK, XA_LOCK, XA_RESTART, XA_EXIT;
 
 
 Atom XA_ACTIVATE, XA_BLANK, XA_LOCK, XA_RESTART, XA_EXIT;
 
 
-
 static void populate_demo_window (GtkWidget *toplevel,
                                   int which, prefs_pair *pair);
 static void populate_prefs_page (GtkWidget *top, prefs_pair *pair);
 static void populate_demo_window (GtkWidget *toplevel,
                                   int which, prefs_pair *pair);
 static void populate_prefs_page (GtkWidget *top, prefs_pair *pair);
+static int apply_changes_and_save (GtkWidget *widget);
 
 
 \f
 
 
 \f
@@ -310,20 +306,38 @@ warning_dialog (GtkWidget *parent, const char *message, int center)
 
 
 static void
 
 
 static void
-run_hack (int which)
+run_cmd (GtkWidget *widget, Atom command, int arg)
 {
 {
+  char *err = 0;
   int status;
   int status;
-  if (which < 0) return;
-  status = xscreensaver_command (gdk_display, XA_DEMO, which + 1, False);
+
+  apply_changes_and_save (widget);
+  status = xscreensaver_command (gdk_display, command, arg, False, &err);
   if (status < 0)
     {
       char buf [255];
   if (status < 0)
     {
       char buf [255];
-      sprintf (buf,
-               "Error:\n\n"
-               "The DEMO %d command failed (%d).\n", which + 1, status);
-#if 0
-      warning_dialog (GTK_WIDGET (menuitem), buf, 1);
-#endif
+      if (err)
+        sprintf (buf, "Error:\n\n%s", err);
+      else
+        strcpy (buf, "Unknown error!");
+      warning_dialog (widget, buf, 100);
+    }
+  if (err) free (err);
+}
+
+
+static void
+run_hack (GtkWidget *widget, int which, Bool report_errors_p)
+{
+  if (which < 0) return;
+  apply_changes_and_save (widget);
+  if (report_errors_p)
+    run_cmd (widget, XA_ACTIVATE, 0);
+  else
+    {
+      char *s = 0;
+      xscreensaver_command (gdk_display, XA_DEMO, which + 1, False, &s);
+      if (s) free (s);
     }
 }
 
     }
 }
 
@@ -335,13 +349,15 @@ run_hack (int which)
 void
 exit_menu_cb (GtkMenuItem *menuitem, gpointer user_data)
 {
 void
 exit_menu_cb (GtkMenuItem *menuitem, gpointer user_data)
 {
+  apply_changes_and_save (GTK_WIDGET (menuitem));
   gtk_main_quit ();
 }
 
 static void
 wm_close_cb (GtkWidget *widget, GdkEvent *event, gpointer data)
 {
   gtk_main_quit ();
 }
 
 static void
 wm_close_cb (GtkWidget *widget, GdkEvent *event, gpointer data)
 {
-  exit_menu_cb (NULL, NULL);
+  apply_changes_and_save (widget);
+  gtk_main_quit ();
 }
 
 
 }
 
 
@@ -426,45 +442,21 @@ doc_menu_cb (GtkMenuItem *menuitem, gpointer user_data)
 void
 activate_menu_cb (GtkMenuItem *menuitem, gpointer user_data)
 {
 void
 activate_menu_cb (GtkMenuItem *menuitem, gpointer user_data)
 {
-  int status = xscreensaver_command (gdk_display, XA_ACTIVATE, 0, False);
-  if (status < 0)
-    {
-      char buf [255];
-      sprintf (buf,
-               "Error:\n\n"
-               "The ACTIVATE command failed (%d).\n", status);
-      warning_dialog (GTK_WIDGET (menuitem), buf, 100);
-    }
+  run_cmd (GTK_WIDGET (menuitem), XA_ACTIVATE, 0);
 }
 
 
 void
 lock_menu_cb (GtkMenuItem *menuitem, gpointer user_data)
 {
 }
 
 
 void
 lock_menu_cb (GtkMenuItem *menuitem, gpointer user_data)
 {
-  int status = xscreensaver_command (gdk_display, XA_LOCK, 0, False);
-  if (status < 0)
-    {
-      char buf [255];
-      sprintf (buf,
-               "Error:\n\n"
-               "The LOCK command failed (%d).\n", status);
-      warning_dialog (GTK_WIDGET (menuitem), buf, 100);
-    }
+  run_cmd (GTK_WIDGET (menuitem), XA_LOCK, 0);
 }
 
 
 void
 kill_menu_cb (GtkMenuItem *menuitem, gpointer user_data)
 {
 }
 
 
 void
 kill_menu_cb (GtkMenuItem *menuitem, gpointer user_data)
 {
-  int status = xscreensaver_command (gdk_display, XA_EXIT, 0, False);
-  if (status < 0)
-    {
-      char buf [255];
-      sprintf (buf,
-               "Error:\n\n"
-               "The EXIT command failed (%d).\n", status);
-      warning_dialog (GTK_WIDGET (menuitem), buf, 100);
-    }
+  run_cmd (GTK_WIDGET (menuitem), XA_EXIT, 0);
 }
 
 
 }
 
 
@@ -472,26 +464,22 @@ void
 restart_menu_cb (GtkMenuItem *menuitem, gpointer user_data)
 {
 #if 0
 restart_menu_cb (GtkMenuItem *menuitem, gpointer user_data)
 {
 #if 0
-  int status = xscreensaver_command (gdk_display, XA_RESTART, 0, False);
-  if (status < 0)
-    {
-      char buf [255];
-      sprintf (buf,
-               "Error:\n\n"
-               "The RESTART command failed (%d).\n", status);
-      warning_dialog (GTK_WIDGET (menuitem), buf, 100);
-    }
+  run_cmd (GTK_WIDGET (menuitem), XA_RESTART, 0);
 #else
 #else
-  xscreensaver_command (gdk_display, XA_EXIT, 0, False);
+  apply_changes_and_save (GTK_WIDGET (menuitem));
+  xscreensaver_command (gdk_display, XA_EXIT, 0, False, NULL);
   sleep (1);
   system ("xscreensaver -nosplash &");
 #endif
 }
 
 
   sleep (1);
   system ("xscreensaver -nosplash &");
 #endif
 }
 
 
+static int _selected_hack_number = -1;
+
 static int
 selected_hack_number (GtkWidget *toplevel)
 {
 static int
 selected_hack_number (GtkWidget *toplevel)
 {
+#if 0
   GtkViewport *vp = GTK_VIEWPORT (name_to_widget (toplevel, "viewport"));
   GtkList *list_widget = GTK_LIST (GTK_BIN(vp)->child);
   GList *slist = list_widget->selection;
   GtkViewport *vp = GTK_VIEWPORT (name_to_widget (toplevel, "viewport"));
   GtkList *list_widget = GTK_LIST (GTK_BIN(vp)->child);
   GList *slist = list_widget->selection;
@@ -500,25 +488,50 @@ selected_hack_number (GtkWidget *toplevel)
                ? gtk_list_child_position (list_widget, GTK_WIDGET (selected))
                : -1);
   return which;
                ? gtk_list_child_position (list_widget, GTK_WIDGET (selected))
                : -1);
   return which;
+#else
+  return _selected_hack_number;
+#endif
 }
 
 
 }
 
 
-void
-apply_this_cb (GtkButton *button, gpointer user_data)
+static int
+demo_write_init_file (GtkWidget *widget, saver_preferences *p)
+{
+  if (!write_init_file (p, short_version, False))
+    return 0;
+  else
+    {
+      const char *f = init_file_name();
+      if (!f || !*f)
+        warning_dialog (widget,
+                        "Error:\n\nCouldn't determine init file name!\n",
+                        100);
+      else
+        {
+          char *b = (char *) malloc (strlen(f) + 1024);
+          sprintf (b, "Error:\n\nCouldn't write %s\n", f);
+          warning_dialog (widget, b, 100);
+          free (b);
+        }
+      return -1;
+    }
+}
+
+
+static int
+apply_changes_and_save (GtkWidget *widget)
 {
   /* prefs_pair *pair = (prefs_pair *) client_data; */
   prefs_pair *pair = global_prefs_pair;  /* I hate C so much... */
 {
   /* prefs_pair *pair = (prefs_pair *) client_data; */
   prefs_pair *pair = global_prefs_pair;  /* I hate C so much... */
-
   saver_preferences *p =  pair->a;
   GtkList *list_widget =
   saver_preferences *p =  pair->a;
   GtkList *list_widget =
-    GTK_LIST (name_to_widget (GTK_WIDGET (button), "list"));
-  int which = selected_hack_number (GTK_WIDGET (button));
+    GTK_LIST (name_to_widget (widget, "list"));
+  int which = selected_hack_number (widget);
 
 
-  GtkEntry *cmd = GTK_ENTRY (name_to_widget (GTK_WIDGET (button), "cmd_text"));
+  GtkEntry *cmd = GTK_ENTRY (name_to_widget (widget, "cmd_text"));
   GtkToggleButton *enabled =
   GtkToggleButton *enabled =
-    GTK_TOGGLE_BUTTON (name_to_widget (GTK_WIDGET (button), "enabled"));
-  GtkCombo *vis = GTK_COMBO (name_to_widget (GTK_WIDGET (button),
-                                             "visual_combo"));
+    GTK_TOGGLE_BUTTON (name_to_widget (widget, "enabled"));
+  GtkCombo *vis = GTK_COMBO (name_to_widget (widget, "visual_combo"));
 
   Bool enabled_p = gtk_toggle_button_get_active (enabled);
   const char *visual = gtk_entry_get_text (GTK_ENTRY (GTK_COMBO (vis)->entry));
 
   Bool enabled_p = gtk_toggle_button_get_active (enabled);
   const char *visual = gtk_entry_get_text (GTK_ENTRY (GTK_COMBO (vis)->entry));
@@ -527,12 +540,13 @@ apply_this_cb (GtkButton *button, gpointer user_data)
   char c;
   unsigned long id;
 
   char c;
   unsigned long id;
 
-  if (which < 0) return;
+  if (which < 0) return -1;
 
   /* Sanity-check and canonicalize whatever the user typed into the combo box.
    */
 
   /* Sanity-check and canonicalize whatever the user typed into the combo box.
    */
-  if      (!strcasecmp (visual, "any"))                visual = "";
-  if      (!strcasecmp (visual, "default"))            visual = "Default";
+  if      (!strcasecmp (visual, ""))                   visual = "";
+  else if (!strcasecmp (visual, "any"))                visual = "";
+  else if (!strcasecmp (visual, "default"))            visual = "Default";
   else if (!strcasecmp (visual, "default-n"))          visual = "Default-N";
   else if (!strcasecmp (visual, "default-i"))          visual = "Default-I";
   else if (!strcasecmp (visual, "best"))               visual = "Best";
   else if (!strcasecmp (visual, "default-n"))          visual = "Default-N";
   else if (!strcasecmp (visual, "default-i"))          visual = "Default-I";
   else if (!strcasecmp (visual, "best"))               visual = "Best";
@@ -558,41 +572,86 @@ apply_this_cb (GtkButton *button, gpointer user_data)
       gtk_entry_set_text (GTK_ENTRY (GTK_COMBO (vis)->entry), "Any");
     }
 
       gtk_entry_set_text (GTK_ENTRY (GTK_COMBO (vis)->entry), "Any");
     }
 
-  p->screenhacks[which]->enabled_p = enabled_p;
-  if (p->screenhacks[which]->visual)
-    free (p->screenhacks[which]->visual);
-  if (p->screenhacks[which]->command)
-    free (p->screenhacks[which]->command);
-  p->screenhacks[which]->visual = strdup (visual);
-  p->screenhacks[which]->command = strdup (command);
-
   ensure_selected_item_visible (GTK_WIDGET (list_widget));
 
   ensure_selected_item_visible (GTK_WIDGET (list_widget));
 
-  write_init_file (p, short_version);
-}
+  if (!p->screenhacks[which]->visual)
+    p->screenhacks[which]->visual = strdup ("");
+  if (!p->screenhacks[which]->command)
+    p->screenhacks[which]->command = strdup ("");
 
 
+  if (p->screenhacks[which]->enabled_p != enabled_p ||
+      !!strcasecmp (p->screenhacks[which]->visual, visual) ||
+      !!strcasecmp (p->screenhacks[which]->command, command))
+    {
+      /* Something was changed -- store results into the struct,
+         and write the file.
+       */
+      free (p->screenhacks[which]->visual);
+      free (p->screenhacks[which]->command);
+      p->screenhacks[which]->visual = strdup (visual);
+      p->screenhacks[which]->command = strdup (command);
+      p->screenhacks[which]->enabled_p = enabled_p;
+
+      return demo_write_init_file (widget, p);
+    }
+
+  /* No changes made */
+  return 0;
+}
 
 void
 run_this_cb (GtkButton *button, gpointer user_data)
 {
   int which = selected_hack_number (GTK_WIDGET (button));
   if (which < 0) return;
 
 void
 run_this_cb (GtkButton *button, gpointer user_data)
 {
   int which = selected_hack_number (GTK_WIDGET (button));
   if (which < 0) return;
-  apply_this_cb (button, user_data);
-  run_hack (which);
+  if (0 == apply_changes_and_save (GTK_WIDGET (button)))
+    run_hack (GTK_WIDGET (button), which, True);
 }
 
 
 void
 }
 
 
 void
-cancel_this_cb (GtkButton *button, gpointer user_data)
+manual_cb (GtkButton *button, gpointer user_data)
 {
   /* prefs_pair *pair = (prefs_pair *) client_data; */
   prefs_pair *pair = global_prefs_pair;  /* I hate C so much... */
 {
   /* prefs_pair *pair = (prefs_pair *) client_data; */
   prefs_pair *pair = global_prefs_pair;  /* I hate C so much... */
+  saver_preferences *p =  pair->a;
   GtkList *list_widget =
     GTK_LIST (name_to_widget (GTK_WIDGET (button), "list"));
   int which = selected_hack_number (GTK_WIDGET (button));
   GtkList *list_widget =
     GTK_LIST (name_to_widget (GTK_WIDGET (button), "list"));
   int which = selected_hack_number (GTK_WIDGET (button));
+  char *name, *name2, *cmd, *s;
   if (which < 0) return;
   if (which < 0) return;
+  apply_changes_and_save (GTK_WIDGET (button));
   ensure_selected_item_visible (GTK_WIDGET (list_widget));
   ensure_selected_item_visible (GTK_WIDGET (list_widget));
-  populate_demo_window (GTK_WIDGET (button), which, pair);
+
+  name = strdup (p->screenhacks[which]->command);
+  name2 = name;
+  while (isspace (*name2)) name2++;
+  s = name2;
+  while (*s && !isspace (*s)) s++;
+  *s = 0;
+  s = strrchr (name2, '/');
+  if (s) name = s+1;
+
+  cmd = get_string_resource ("manualCommand", "ManualCommand");
+  if (cmd)
+    {
+      char *cmd2 = (char *) malloc (strlen (cmd) + strlen (name2) + 100);
+      strcpy (cmd2, "( ");
+      sprintf (cmd2 + strlen (cmd2),
+               cmd,
+               name2, name2, name2, name2);
+      strcat (cmd2, " ) &");
+      system (cmd2);
+      free (cmd2);
+    }
+  else
+    {
+      warning_dialog (GTK_WIDGET (button),
+                      "Error:\n\nno `manualCommand' resource set.",
+                      100);
+    }
+
+  free (name);
 }
 
 
 }
 
 
@@ -615,10 +674,11 @@ run_next_cb (GtkButton *button, gpointer user_data)
   if (which >= p->screenhacks_count)
     which = 0;
 
   if (which >= p->screenhacks_count)
     which = 0;
 
+  apply_changes_and_save (GTK_WIDGET (button));
   gtk_list_select_item (GTK_LIST (list_widget), which);
   ensure_selected_item_visible (GTK_WIDGET (list_widget));
   populate_demo_window (GTK_WIDGET (button), which, pair);
   gtk_list_select_item (GTK_LIST (list_widget), which);
   ensure_selected_item_visible (GTK_WIDGET (list_widget));
   populate_demo_window (GTK_WIDGET (button), which, pair);
-  run_hack (which);
+  run_hack (GTK_WIDGET (button), which, False);
 }
 
 
 }
 
 
@@ -641,10 +701,11 @@ run_prev_cb (GtkButton *button, gpointer user_data)
   if (which < 0)
     which = p->screenhacks_count - 1;
 
   if (which < 0)
     which = p->screenhacks_count - 1;
 
+  apply_changes_and_save (GTK_WIDGET (button));
   gtk_list_select_item (GTK_LIST (list_widget), which);
   ensure_selected_item_visible (GTK_WIDGET (list_widget));
   populate_demo_window (GTK_WIDGET (button), which, pair);
   gtk_list_select_item (GTK_LIST (list_widget), which);
   ensure_selected_item_visible (GTK_WIDGET (list_widget));
   populate_demo_window (GTK_WIDGET (button), which, pair);
-  run_hack (which);
+  run_hack (GTK_WIDGET (button), which, False);
 }
 
 
 }
 
 
@@ -675,6 +736,7 @@ prefs_ok_cb (GtkButton *button, gpointer user_data)
 
   saver_preferences *p =  pair->a;
   saver_preferences *p2 = pair->b;
 
   saver_preferences *p =  pair->a;
   saver_preferences *p2 = pair->b;
+  Bool changed = False;
 
 # define SECONDS(field, name) \
   hack_time_text (gtk_entry_get_text (\
 
 # define SECONDS(field, name) \
   hack_time_text (gtk_entry_get_text (\
@@ -701,32 +763,48 @@ prefs_ok_cb (GtkButton *button, gpointer user_data)
      *(field) = value; \
   } while(0)
 
      *(field) = value; \
   } while(0)
 
+# define CHECKBOX(field, name) \
+  field = gtk_toggle_button_get_active (\
+             GTK_TOGGLE_BUTTON (name_to_widget (GTK_WIDGET(button), (name))))
+
   MINUTES (&p2->timeout,        "timeout_text");
   MINUTES (&p2->cycle,          "cycle_text");
   SECONDS (&p2->fade_seconds,   "fade_text");
   INTEGER (&p2->fade_ticks,     "ticks_text");
   MINUTES (&p2->lock_timeout,   "lock_text");
   SECONDS (&p2->passwd_timeout, "pass_text");
   MINUTES (&p2->timeout,        "timeout_text");
   MINUTES (&p2->cycle,          "cycle_text");
   SECONDS (&p2->fade_seconds,   "fade_text");
   INTEGER (&p2->fade_ticks,     "ticks_text");
   MINUTES (&p2->lock_timeout,   "lock_text");
   SECONDS (&p2->passwd_timeout, "pass_text");
-
-#undef SECONDS
-#undef MINUTES
-#undef INTEGER
-
-  p->timeout       = p2->timeout;
-  p->cycle         = p2->cycle;
-  p->lock_timeout   = p2->lock_timeout;
-  p->passwd_timeout = p2->passwd_timeout;
-  p->fade_seconds   = p2->fade_seconds;
-  p->fade_ticks            = p2->fade_ticks;
-  p->verbose_p     = p2->verbose_p;
-  p->install_cmap_p = p2->install_cmap_p;
-  p->fade_p        = p2->fade_p;
-  p->unfade_p      = p2->unfade_p;
-  p->lock_p        = p2->lock_p;
+  CHECKBOX (p2->verbose_p,      "verbose_button");
+  CHECKBOX (p2->install_cmap_p, "install_button");
+  CHECKBOX (p2->fade_p,         "fade_button");
+  CHECKBOX (p2->unfade_p,       "unfade_button");
+  CHECKBOX (p2->lock_p,         "lock_button");
+
+# undef SECONDS
+# undef MINUTES
+# undef INTEGER
+# undef CHECKBOX
+
+# define COPY(field) \
+  if (p->field != p2->field) changed = True; \
+  p->field = p2->field
+
+  COPY(timeout);
+  COPY(cycle);
+  COPY(lock_timeout);
+  COPY(passwd_timeout);
+  COPY(fade_seconds);
+  COPY(fade_ticks);
+  COPY(verbose_p);
+  COPY(install_cmap_p);
+  COPY(fade_p);
+  COPY(unfade_p);
+  COPY(lock_p);
+# undef COPY
 
   populate_prefs_page (GTK_WIDGET (button), pair);
 
 
   populate_prefs_page (GTK_WIDGET (button), pair);
 
-  write_init_file (p, short_version);
+  if (changed)
+    demo_write_init_file (GTK_WIDGET (button), p);
 }
 
 
 }
 
 
@@ -751,7 +829,7 @@ list_doubleclick_cb (GtkWidget *button, GdkEventButton *event,
       int which = gtk_list_child_position (list, GTK_WIDGET (button));
 
       if (which >= 0)
       int which = gtk_list_child_position (list, GTK_WIDGET (button));
 
       if (which >= 0)
-        run_hack (which);
+        run_hack (GTK_WIDGET (button), which, True);
     }
 
   return FALSE;
     }
 
   return FALSE;
@@ -765,6 +843,7 @@ list_select_cb (GtkList *list, GtkWidget *child)
   prefs_pair *pair = global_prefs_pair;  /* I hate C so much... */
 
   int which = gtk_list_child_position (list, GTK_WIDGET (child));
   prefs_pair *pair = global_prefs_pair;  /* I hate C so much... */
 
   int which = gtk_list_child_position (list, GTK_WIDGET (child));
+  apply_changes_and_save (GTK_WIDGET (list));
   populate_demo_window (GTK_WIDGET (list), which, pair);
 }
 
   populate_demo_window (GTK_WIDGET (list), which, pair);
 }
 
@@ -774,6 +853,7 @@ list_unselect_cb (GtkList *list, GtkWidget *child)
   /* prefs_pair *pair = (prefs_pair *) client_data; */
   prefs_pair *pair = global_prefs_pair;  /* I hate C so much... */
 
   /* prefs_pair *pair = (prefs_pair *) client_data; */
   prefs_pair *pair = global_prefs_pair;  /* I hate C so much... */
 
+  apply_changes_and_save (GTK_WIDGET (list));
   populate_demo_window (GTK_WIDGET (list), -1, pair);
 }
 
   populate_demo_window (GTK_WIDGET (list), -1, pair);
 }
 
@@ -876,6 +956,7 @@ scroll_to_current_hack (GtkWidget *toplevel, prefs_pair *pair)
     return;
 
   list = GTK_LIST (name_to_widget (toplevel, "list"));
     return;
 
   list = GTK_LIST (name_to_widget (toplevel, "list"));
+  apply_changes_and_save (toplevel);
   gtk_list_select_item (list, which);
   ensure_selected_item_visible (GTK_WIDGET (list));
   populate_demo_window (toplevel, which, pair);
   gtk_list_select_item (list, which);
   ensure_selected_item_visible (GTK_WIDGET (list));
   populate_demo_window (toplevel, which, pair);
@@ -1003,7 +1084,7 @@ sensitize_demo_widgets (GtkWidget *toplevel, Bool sensitive_p)
 {
   const char *names[] = { "cmd_label", "cmd_text", "enabled",
                           "visual", "visual_combo",
 {
   const char *names[] = { "cmd_label", "cmd_text", "enabled",
                           "visual", "visual_combo",
-                          "demo", "apply", "cancel" };
+                          "demo", "manual" };
   int i;
   for (i = 0; i < countof(names); i++)
     {
   int i;
   for (i = 0; i < countof(names); i++)
     {
@@ -1324,7 +1405,7 @@ populate_demo_window (GtkWidget *toplevel, int which, prefs_pair *pair)
   gtk_toggle_button_set_active (enabled, (hack ? hack->enabled_p : False));
   gtk_entry_set_text (GTK_ENTRY (GTK_COMBO (vis)->entry),
                       (hack
   gtk_toggle_button_set_active (enabled, (hack ? hack->enabled_p : False));
   gtk_entry_set_text (GTK_ENTRY (GTK_COMBO (vis)->entry),
                       (hack
-                       ? (hack->visual && hack->visual
+                       ? (hack->visual && *hack->visual
                           ? hack->visual
                           : "Any")
                        : ""));
                           ? hack->visual
                           : "Any")
                        : ""));
@@ -1335,6 +1416,8 @@ populate_demo_window (GtkWidget *toplevel, int which, prefs_pair *pair)
 
   if (pretty_name) free (pretty_name);
   if (doc_string) free (doc_string);
 
   if (pretty_name) free (pretty_name);
   if (doc_string) free (doc_string);
+
+  _selected_hack_number = which;
 }
 
 
 }
 
 
index bec72e0e8a4bf52185bc086063712cff504ae1e8..e73a1f5eff9edda994d7d83d3567bcafed76bba3 100644 (file)
@@ -461,7 +461,7 @@ text_cb (WIDGET text_widget, POINTER client_data, POINTER call_data)
 #endif /* HAVE_ATHENA */
 
       if (save)
 #endif /* HAVE_ATHENA */
 
       if (save)
-        write_init_file (p, short_version);
+        write_init_file (p, short_version, p->verbose_p);
 
       XSync (dpy, False);
       usleep (500000);         /* give the disk time to settle down */
 
       XSync (dpy, False);
       usleep (500000);         /* give the disk time to settle down */
@@ -661,7 +661,7 @@ quit_cb CB_ARGS(WIDGET button, POINTER client_data, POINTER ignored)
 static void
 restart_cb CB_ARGS(WIDGET button, POINTER client_data, POINTER ignored)
 {
 static void
 restart_cb CB_ARGS(WIDGET button, POINTER client_data, POINTER ignored)
 {
-  xscreensaver_command (widget_display (button), XA_RESTART, 0, False);
+  xscreensaver_command (widget_display (button), XA_RESTART, 0, False, NULL);
 }
 
 
 }
 
 
@@ -968,7 +968,7 @@ prefs_ok_cb CB_ARGS(WIDGET button, POINTER client_data, POINTER call_data)
   p->unfade_p      = p2->unfade_p;
   p->lock_p        = p2->lock_p;
 
   p->unfade_p      = p2->unfade_p;
   p->lock_p        = p2->lock_p;
 
-  write_init_file (p, short_version);
+  write_init_file (p, short_version, p->verbose_p);
 }
 
 
 }
 
 
@@ -1090,7 +1090,7 @@ static void
 run_hack (Display *dpy, int n)
 {
   if (n <= 0) abort();
 run_hack (Display *dpy, int n)
 {
   if (n <= 0) abort();
-  xscreensaver_command (dpy, XA_DEMO, n, False);
+  xscreensaver_command (dpy, XA_DEMO, n, False, NULL);
 }
 
 
 }
 
 
index 2b8be46d05b5a3a6b8dff8c7315beda2d2b08157..ae49086429ef5e09e9505d534d8e5838acd542c7 100644 (file)
@@ -533,9 +533,11 @@ write_entry (FILE *out, const char *key, const char *value)
   free(v);
 }
 
   free(v);
 }
 
-void
-write_init_file (saver_preferences *p, const char *version_string)
+int
+write_init_file (saver_preferences *p, const char *version_string,
+                 Bool verbose_p)
 {
 {
+  int status = -1;
   const char *name = init_file_name();
   const char *tmp_name = init_file_tmp_name();
   char *n2 = chase_symlinks (name);
   const char *name = init_file_name();
   const char *tmp_name = init_file_tmp_name();
   char *n2 = chase_symlinks (name);
@@ -555,7 +557,7 @@ write_init_file (saver_preferences *p, const char *version_string)
 
   if (n2) name = n2;
 
 
   if (n2) name = n2;
 
-  if (p->verbose_p)
+  if (verbose_p)
     fprintf (stderr, "%s: writing \"%s\".\n", blurb(), name);
 
   unlink (tmp_name);
     fprintf (stderr, "%s: writing \"%s\".\n", blurb(), name);
 
   unlink (tmp_name);
@@ -571,13 +573,19 @@ write_init_file (saver_preferences *p, const char *version_string)
 
   /* Give the new .xscreensaver file the same permissions as the old one;
      except ensure that it is readable and writable by owner, and not
 
   /* Give the new .xscreensaver file the same permissions as the old one;
      except ensure that it is readable and writable by owner, and not
-     executable.
+     executable.  Extra hack: if we're running as root, make the file
+     be world-readable (so that the daemon, running as "nobody", will
+     still be able to read it.)
    */
   if (stat(name, &st) == 0)
     {
       mode_t mode = st.st_mode;
    */
   if (stat(name, &st) == 0)
     {
       mode_t mode = st.st_mode;
-      mode |= S_IRUSR | S_IWUSR;
-      mode &= ~(S_IXUSR | S_IXGRP | S_IXOTH);
+      mode |= S_IRUSR | S_IWUSR;               /* read/write by user */
+      mode &= ~(S_IXUSR | S_IXGRP | S_IXOTH);  /* executable by none */
+
+      if (getuid() == (uid_t) 0)               /* read by group/other */
+        mode |= S_IRGRP | S_IROTH;
+
       if (fchmod (fileno(out), mode) != 0)
        {
          char *buf = (char *) malloc(1024 + strlen(name));
       if (fchmod (fileno(out), mode) != 0)
        {
          char *buf = (char *) malloc(1024 + strlen(name));
@@ -777,6 +785,8 @@ write_init_file (saver_preferences *p, const char *version_string)
          /* Since the .xscreensaver file is used for IPC, let's try and make
             sure that the bits actually land on the disk right away. */
          sync ();
          /* Since the .xscreensaver file is used for IPC, let's try and make
             sure that the bits actually land on the disk right away. */
          sync ();
+
+          status = 0;    /* wrote and renamed successfully! */
        }
     }
   else
        }
     }
   else
@@ -791,6 +801,7 @@ write_init_file (saver_preferences *p, const char *version_string)
 
  END:
   if (n2) free (n2);
 
  END:
   if (n2) free (n2);
+  return status;
 }
 
 \f
 }
 
 \f
index b5a528c9aa7108d7c478858c35c5f6e1c75057a1..8395f323f1f4ee51bd1c3d7a2265c60c11edb510 100644 (file)
@@ -83,7 +83,8 @@ struct saver_preferences {
 
 extern void load_init_file (saver_preferences *p);
 extern Bool init_file_changed_p (saver_preferences *p);
 
 extern void load_init_file (saver_preferences *p);
 extern Bool init_file_changed_p (saver_preferences *p);
-extern void write_init_file (saver_preferences *p, const char *version_string);
+extern int write_init_file (saver_preferences *p, const char *version_string,
+                            Bool verbose_p);
 const char *init_file_name (void);
 
 extern screenhack *parse_screenhack (const char *line);
 const char *init_file_name (void);
 
 extern screenhack *parse_screenhack (const char *line);
index e05c93e4d0ad478455d866d189dc79765e1449b8..b8ab8e15087fd79a5b594af177c80063bfedd975 100644 (file)
@@ -129,23 +129,32 @@ find_screensaver_window (Display *dpy, char **version)
 
 static int
 send_xscreensaver_command (Display *dpy, Atom command, long arg,
 
 static int
 send_xscreensaver_command (Display *dpy, Atom command, long arg,
-                          Window *window_ret)
+                          Window *window_ret, char **error_ret)
 {
   char *v = 0;
   Window window = find_screensaver_window (dpy, &v);
   XWindowAttributes xgwa;
 {
   char *v = 0;
   Window window = find_screensaver_window (dpy, &v);
   XWindowAttributes xgwa;
+  char err[2048];
 
   if (window_ret)
     *window_ret = window;
 
   if (!window)
     {
 
   if (window_ret)
     *window_ret = window;
 
   if (!window)
     {
+      sprintf (err, "no screensaver is running on display %s",
+               DisplayString (dpy));
+
+      if (error_ret)
+        {
+          *error_ret = strdup (err);
+          return -1;
+        }
+
       if (command == XA_EXIT)
       if (command == XA_EXIT)
+        /* Don't print an error if xscreensaver is already dead. */
         return 1;
 
         return 1;
 
-      /* Don't print this if xscreensaver is already dead. */
-      fprintf (stderr, "%s: no screensaver is running on display %s\n",
-               progname, DisplayString (dpy));
+      fprintf (stderr, "%s: %s\n", progname, err);
       return -1;
     }
 
       return -1;
     }
 
@@ -160,16 +169,24 @@ send_xscreensaver_command (Display *dpy, Atom command, long arg,
       memset (&hint, 0, sizeof(hint));
       if (!v || !*v)
        {
       memset (&hint, 0, sizeof(hint));
       if (!v || !*v)
        {
-         fprintf (stderr, "%s: version property not set on window 0x%x?\n",
-                  progname, (unsigned int) window);
+         sprintf (err, "version property not set on window 0x%x?",
+                  (unsigned int) window);
+          if (error_ret)
+            *error_ret = strdup (err);
+          else
+            fprintf (stderr, "%s: %s\n", progname, err);
          return -1;
        }
 
       XGetClassHint(dpy, window, &hint);
       if (!hint.res_class)
        {
          return -1;
        }
 
       XGetClassHint(dpy, window, &hint);
       if (!hint.res_class)
        {
-         fprintf (stderr, "%s: class hints not set on window 0x%x?\n",
-                  progname, (unsigned int) window);
+         sprintf (err, "class hints not set on window 0x%x?",
+                  (unsigned int) window);
+          if (error_ret)
+            *error_ret = strdup (err);
+          else
+            fprintf (stderr, "%s: %s\n", progname, err);
          return -1;
        }
 
          return -1;
        }
 
@@ -206,8 +223,7 @@ send_xscreensaver_command (Display *dpy, Atom command, long arg,
                   if (data) free (data);
                   fprintf (stdout, "\n");
                   fflush (stdout);
                   if (data) free (data);
                   fprintf (stdout, "\n");
                   fflush (stdout);
-                  fprintf (stderr, "%s: bad status format on root window.\n",
-                           progname);
+                  fprintf (stderr, "bad status format on root window.\n");
                   return -1;
                 }
                   
                   return -1;
                 }
                   
@@ -268,8 +284,7 @@ send_xscreensaver_command (Display *dpy, Atom command, long arg,
              if (data) free (data);
              fprintf (stdout, "\n");
              fflush (stdout);
              if (data) free (data);
              fprintf (stdout, "\n");
              fflush (stdout);
-             fprintf (stderr, "%s: no saver status on root window.\n",
-                      progname);
+             fprintf (stderr, "no saver status on root window.\n");
              return -1;
            }
        }
              return -1;
            }
        }
@@ -304,8 +319,12 @@ send_xscreensaver_command (Display *dpy, Atom command, long arg,
       event.xclient.data.l[2] = arg2;
       if (! XSendEvent (dpy, window, False, 0L, &event))
        {
       event.xclient.data.l[2] = arg2;
       if (! XSendEvent (dpy, window, False, 0L, &event))
        {
-         fprintf (stderr, "%s: XSendEvent(dpy, 0x%x ...) failed.\n",
-                  progname, (unsigned int) window);
+         sprintf (err, "XSendEvent(dpy, 0x%x ...) failed.\n",
+                  (unsigned int) window);
+          if (error_ret)
+            *error_ret = strdup (err);
+          else
+            fprintf (stderr, "%s: %s\n", progname, err);
          return -1;
        }
     }
          return -1;
        }
     }
@@ -316,13 +335,15 @@ send_xscreensaver_command (Display *dpy, Atom command, long arg,
 
 static int
 xscreensaver_command_response (Display *dpy, Window window,
 
 static int
 xscreensaver_command_response (Display *dpy, Window window,
-                               Bool verbose_p, Bool exiting_p)
+                               Bool verbose_p, Bool exiting_p,
+                               char **error_ret)
 {
   int fd = ConnectionNumber (dpy);
   int timeout = 10;
   int status;
   fd_set fds;
   struct timeval tv;
 {
   int fd = ConnectionNumber (dpy);
   int timeout = 10;
   int status;
   fd_set fds;
   struct timeval tv;
+  char err[2048];
 
   while (1)
     {
 
   while (1)
     {
@@ -335,13 +356,25 @@ xscreensaver_command_response (Display *dpy, Window window,
       if (status < 0)
        {
          char buf[1024];
       if (status < 0)
        {
          char buf[1024];
-         sprintf (buf, "%s: waiting for reply", progname);
-         perror (buf);
+          if (error_ret)
+            {
+              sprintf (buf, "error waiting for reply");
+              *error_ret = strdup (buf);
+            }
+          else
+            {
+              sprintf (buf, "%s: error waiting for reply", progname);
+              perror (buf);
+            }
          return status;
        }
       else if (status == 0)
        {
          return status;
        }
       else if (status == 0)
        {
-         fprintf (stderr, "%s: no response to command.\n", progname);
+         sprintf (err, "no response to command.");
+          if (error_ret)
+            *error_ret = strdup (err);
+          else
+            fprintf (stderr, "%s: %s\n", progname, err);
          return -1;
        }
       else
          return -1;
        }
       else
@@ -376,9 +409,13 @@ xscreensaver_command_response (Display *dpy, Window window,
                   if (exiting_p)
                     return 0;
 
                   if (exiting_p)
                     return 0;
 
-                  fprintf (stderr,
-                          "%s: xscreensaver window unexpectedly deleted.\n",
-                          progname);
+                  sprintf (err, "xscreensaver window unexpectedly deleted.");
+
+                  if (error_ret)
+                    *error_ret = strdup (err);
+                  else
+                    fprintf (stderr, "%s: %s\n", progname, err);
+
                  return -1;
                }
 
                  return -1;
                }
 
@@ -386,28 +423,38 @@ xscreensaver_command_response (Display *dpy, Window window,
                {
                  if (type != XA_STRING || format != 8)
                    {
                {
                  if (type != XA_STRING || format != 8)
                    {
-                     fprintf (stderr,
-                              "%s: unrecognized response property.\n",
-                              progname);
+                     sprintf (err, "unrecognized response property.");
+
+                      if (error_ret)
+                        *error_ret = strdup (err);
+                      else
+                        fprintf (stderr, "%s: %s\n", progname, err);
+
                      if (msg) XFree (msg);
                      return -1;
                    }
                  else if (!msg || (msg[0] != '+' && msg[0] != '-'))
                    {
                      if (msg) XFree (msg);
                      return -1;
                    }
                  else if (!msg || (msg[0] != '+' && msg[0] != '-'))
                    {
-                     fprintf (stderr,
-                              "%s: unrecognized response message.\n",
-                              progname);
+                     sprintf (err, "unrecognized response message.");
+
+                      if (error_ret)
+                        *error_ret = strdup (err);
+                      else  
+                        fprintf (stderr, "%s: %s\n", progname, err);
+
                      if (msg) XFree (msg);
                      return -1;
                    }
                  else
                    {
                      int ret = (msg[0] == '+' ? 0 : -1);
                      if (msg) XFree (msg);
                      return -1;
                    }
                  else
                    {
                      int ret = (msg[0] == '+' ? 0 : -1);
-                     if (verbose_p || ret != 0)
-                       fprintf ((ret < 0 ? stderr : stdout),
-                                "%s: %s\n",
-                                progname,
-                                msg+1);
+                      sprintf (err, "%s: %s\n", progname, msg+1);
+
+                      if (error_ret)
+                        *error_ret = strdup (err);
+                      else if (verbose_p || ret != 0)
+                       fprintf ((ret < 0 ? stderr : stdout), "%s\n", err);
+
                      XFree (msg);
                      return ret;
                    }
                      XFree (msg);
                      return ret;
                    }
@@ -419,13 +466,15 @@ xscreensaver_command_response (Display *dpy, Window window,
 
 
 int
 
 
 int
-xscreensaver_command (Display *dpy, Atom command, long arg, Bool verbose_p)
+xscreensaver_command (Display *dpy, Atom command, long arg, Bool verbose_p,
+                      char **error_ret)
 {
   Window w = 0;
 {
   Window w = 0;
-  int status = send_xscreensaver_command (dpy, command, arg, &w);
+  int status = send_xscreensaver_command (dpy, command, arg, &w, error_ret);
   if (status == 0)
     status = xscreensaver_command_response (dpy, w, verbose_p,
   if (status == 0)
     status = xscreensaver_command_response (dpy, w, verbose_p,
-                                            (command == XA_EXIT));
+                                            (command == XA_EXIT),
+                                            error_ret);
 
   fflush (stdout);
   fflush (stderr);
 
   fflush (stdout);
   fflush (stderr);
index d368e43c0d03b07e40c90fe7fe98d09eacec2ccb..e1db3517ba6c0e88ae460a344f3476e952eb29c5 100644 (file)
@@ -14,7 +14,7 @@
 #define _XSCREENSAVER_REMOTE_H_
 
 extern int xscreensaver_command (Display *dpy, Atom command, long arg,
 #define _XSCREENSAVER_REMOTE_H_
 
 extern int xscreensaver_command (Display *dpy, Atom command, long arg,
-                                Bool verbose_p);
+                                Bool verbose_p, char **error_ret);
 
 extern void server_xscreensaver_version (Display *dpy,
                                         char **version_ret,
 
 extern void server_xscreensaver_version (Display *dpy,
                                         char **version_ret,
index fafb1e5851906fc2538a4aa0f4b72773f47e39f6..d4361df8d5e3a4f72732e3f0282ad5b141faa3f4 100644 (file)
@@ -47,9 +47,14 @@ static char stderr_buffer [4096];
 static char *stderr_tail = 0;
 static time_t stderr_last_read = 0;
 
 static char *stderr_tail = 0;
 static time_t stderr_last_read = 0;
 
+static int stderr_stdout_read_fd = -1;
+
 static void make_stderr_overlay_window (saver_screen_info *);
 
 
 static void make_stderr_overlay_window (saver_screen_info *);
 
 
+/* Recreates the stderr window or GCs: do this when the xscreensaver window
+   on a screen has been re-created.
+ */
 void
 reset_stderr (saver_screen_info *ssi)
 {
 void
 reset_stderr (saver_screen_info *ssi)
 {
@@ -75,6 +80,10 @@ reset_stderr (saver_screen_info *ssi)
   ssi->stderr_cmap = 0;
 }
 
   ssi->stderr_cmap = 0;
 }
 
+/* Erases any stderr text overlaying the screen (if possible) and resets
+   the stderr output cursor to the upper left.  Do this when the xscreensaver
+   window is cleared.
+ */
 void
 clear_stderr (saver_screen_info *ssi)
 {
 void
 clear_stderr (saver_screen_info *ssi)
 {
@@ -86,6 +95,8 @@ clear_stderr (saver_screen_info *ssi)
 }
 
 
 }
 
 
+/* Draws the string on the screen's window.
+ */
 static void
 print_stderr_1 (saver_screen_info *ssi, char *string)
 {
 static void
 print_stderr_1 (saver_screen_info *ssi, char *string)
 {
@@ -235,6 +246,8 @@ make_stderr_overlay_window (saver_screen_info *ssi)
 }
 
 
 }
 
 
+/* Draws the string on each screen's window as error text.
+ */
 static void
 print_stderr (saver_info *si, char *string)
 {
 static void
 print_stderr (saver_info *si, char *string)
 {
@@ -250,6 +263,9 @@ print_stderr (saver_info *si, char *string)
 }
 
 
 }
 
 
+/* Polls the stderr buffer every few seconds and if it finds any text,
+   writes it on all screens.
+ */
 static void
 stderr_popup_timer_fn (XtPointer closure, XtIntervalId *id)
 {
 static void
 stderr_popup_timer_fn (XtPointer closure, XtIntervalId *id)
 {
@@ -272,6 +288,9 @@ stderr_popup_timer_fn (XtPointer closure, XtIntervalId *id)
 }
 
 
 }
 
 
+/* Called when data becomes available on the stderr pipe.  Copies it into
+   stderr_buffer where stderr_popup_timer_fn() can find it later.
+ */
 static void
 stderr_callback (XtPointer closure, int *fd, XtIntervalId *id)
 {
 static void
 stderr_callback (XtPointer closure, int *fd, XtIntervalId *id)
 {
@@ -281,6 +300,9 @@ stderr_callback (XtPointer closure, int *fd, XtIntervalId *id)
   int size;
   int read_this_time = 0;
 
   int size;
   int read_this_time = 0;
 
+  if (!fd || *fd < 0 || *fd != stderr_stdout_read_fd)
+    abort();
+
   if (stderr_tail == 0)
     stderr_tail = stderr_buffer;
 
   if (stderr_tail == 0)
     stderr_tail = stderr_buffer;
 
@@ -333,6 +355,10 @@ stderr_callback (XtPointer closure, int *fd, XtIntervalId *id)
     }
 }
 
     }
 }
 
+/* If stderr capturing is desired, this replaces `stdout' and `stderr'
+   with a pipe, so that any output written to them will show up on the
+   screen as well as on the original value of those streams.
+ */
 void
 initialize_stderr (saver_info *si)
 {
 void
 initialize_stderr (saver_info *si)
 {
@@ -439,6 +465,31 @@ initialize_stderr (saver_info *si)
        }
     }
 
        }
     }
 
+  stderr_stdout_read_fd = in;
   XtAppAddInput (si->app, in, (XtPointer) XtInputReadMask, stderr_callback,
                 (XtPointer) si);
 }
   XtAppAddInput (si->app, in, (XtPointer) XtInputReadMask, stderr_callback,
                 (XtPointer) si);
 }
+
+
+/* If there is anything in the stderr buffer, flush it to the real stderr.
+   This does no X operations.  Call this when exiting to make sure any
+   last words actually show up.
+ */
+void
+shutdown_stderr (saver_info *si)
+{
+  if (!real_stderr || stderr_stdout_read_fd < 0)
+    return;
+
+  stderr_callback ((XtPointer) si, &stderr_stdout_read_fd, 0);
+
+  if (stderr_buffer &&
+      stderr_tail &&
+      stderr_buffer < stderr_tail)
+    {
+      *stderr_tail = 0;
+      fprintf (real_stderr, "%s", stderr_buffer);
+      fflush (real_stderr);
+      stderr_tail = stderr_buffer;
+    }
+}
index c693d5b68a6cb6b0180d15dbd848bd3c469569b3..256934b891ce8d5dea5f1341cdc013f89e5c73b9 100644 (file)
@@ -395,12 +395,6 @@ make_job (pid_t pid, const char *cmd)
     }
 
   while (isspace(*in)) in++;           /* skip whitespace */
     }
 
   while (isspace(*in)) in++;           /* skip whitespace */
-  if (first && *in == ':')             /* token was a visual name; skip it. */
-    {
-      out = name;
-      first = 0;
-      goto AGAIN;
-    }
   *out = 0;
 
   job->name = strdup(name);
   *out = 0;
 
   job->name = strdup(name);
@@ -771,7 +765,7 @@ select_visual_of_hack (saver_screen_info *ssi, screenhack *hack)
   saver_preferences *p = &si->prefs;
   Bool selected;
 
   saver_preferences *p = &si->prefs;
   Bool selected;
 
-  if (hack->visual && *hack->visual == ':')
+  if (hack->visual && *hack->visual)
     selected = select_visual(ssi, hack->visual);
   else
     selected = select_visual(ssi, 0);
     selected = select_visual(ssi, hack->visual);
   else
     selected = select_visual(ssi, 0);
index f4fef0d55c32fc7160b36eb1a07029d3c00ef0ac..f86f8069f83f13dde550525ced06689955b32124 100644 (file)
@@ -55,6 +55,7 @@ Bool handle_clientmessage (saver_info *si, XEvent *e, Bool u) { return False; }
 int BadWindow_ehandler (Display *dpy, XErrorEvent *error) { exit(1); }
 const char *signal_name(int signal) { return "???"; }
 void restore_real_vroot (saver_info *si) {}
 int BadWindow_ehandler (Display *dpy, XErrorEvent *error) { exit(1); }
 const char *signal_name(int signal) { return "???"; }
 void restore_real_vroot (saver_info *si) {}
+void store_saver_status (saver_info *si) {}
 void saver_exit (saver_info *si, int status, const char *core) { exit(status);}
 int move_mouse_grab (saver_info *si, Window to, Cursor cursor) { return 0; }
 
 void saver_exit (saver_info *si, int status, const char *core) { exit(status);}
 int move_mouse_grab (saver_info *si, Window to, Cursor cursor) { return 0; }
 
index 21eb6a39aac25a71b15d7aed591f5fdc2d2c78fd..a375e3068e541936937495817c9d66bb2ef244f5 100644 (file)
@@ -651,14 +651,10 @@ saver_exit (saver_info *si, int status, const char *dump_core_reason)
   
   vrs = restore_real_vroot_1 (si);
   emergency_kill_subproc (si);
   
   vrs = restore_real_vroot_1 (si);
   emergency_kill_subproc (si);
+  shutdown_stderr (si);
 
 
-  if (p->verbose_p)    /* nobody cares about this */
-    {
-      if (vrs)
-        fprintf (real_stderr, "%s: vroot restored, exiting.\n", blurb());
-      else if (p->verbose_p)
-        fprintf (real_stderr, "%s: no vroot to restore; exiting.\n", blurb());
-    }
+  if (p->verbose_p && vrs)
+    fprintf (real_stderr, "%s: old vroot restored.\n", blurb());
 
   fflush(real_stdout);
 
 
   fflush(real_stdout);
 
index acce04438bb99a7de70e8eb183e5674c3c740dbd..21e101648e021fee754c91bf87036ef39090b190 100644 (file)
@@ -23,10 +23,11 @@ used in advertising or otherwise to promote the sale, use or other dealings
 in this Software without prior written authorization from The Open Group.
  *
  * Author:  Jim Fulton, MIT X Consortium
 in this Software without prior written authorization from The Open Group.
  *
  * Author:  Jim Fulton, MIT X Consortium
+ *
  * GLX and Overlay support added by Jamie Zawinski <jwz@jwz.org>, 11-Nov-99
  *
  *      To compile:
  * GLX and Overlay support added by Jamie Zawinski <jwz@jwz.org>, 11-Nov-99
  *
  *      To compile:
- *         cc -DHAVE_GLX glxdpyinfo.c -o glxdpyinfo -lGL -lX11 -lXext -lm
+ *         cc -DHAVE_GLX xdpyinfo.c -o xdpyinfo -lGL -lX11 -lXext -lm
  *
  *      Other defines to consider:
  *         -DHAVE_XIE -DHAVE_XTEST -DHAVE_SYNC -DHAVE_XRECORD
  *
  *      Other defines to consider:
  *         -DHAVE_XIE -DHAVE_XTEST -DHAVE_SYNC -DHAVE_XRECORD
index cd2ea714b22639f63e45ad137098782b93eeb1e4..8c74bac4ad05ac578dbee8835588685cae294785 100644 (file)
@@ -295,7 +295,7 @@ main (int argc, char **argv)
        so if we're issuing an activation command, wait a second. */
     sleep (1);
 
        so if we're issuing an activation command, wait a second. */
     sleep (1);
 
-  i = xscreensaver_command (dpy, *cmd, arg, True);
+  i = xscreensaver_command (dpy, *cmd, arg, True, NULL);
   if (i < 0) exit (i);
   else exit (0);
 }
   if (i < 0) exit (i);
   else exit (0);
 }
index 3374a78c8e844fb269b46875dbec3e505a820f8c..dcc9d43af0ba26d399bad22ef80b508884e34a20 100644 (file)
@@ -11,7 +11,7 @@
 .if n .sp 1
 .if t .sp .5
 ..
 .if n .sp 1
 .if t .sp .5
 ..
-.TH XScreenSaver 1 "12-Nov-99 (3.20)" "X Version 11"
+.TH XScreenSaver 1 "18-Nov-99 (3.21)" "X Version 11"
 .SH NAME
 xscreensaver-command - control a running xscreensaver process
 .SH SYNOPSIS
 .SH NAME
 xscreensaver-command - control a running xscreensaver process
 .SH SYNOPSIS
@@ -182,7 +182,7 @@ right \fI.xscreensaver\fP file.
 .B \-watch
 Prints a line each time the screensaver changes state: when the screen
 blanks, locks, unblanks, or when the running hack is changed.  This option
 .B \-watch
 Prints a line each time the screensaver changes state: when the screen
 blanks, locks, unblanks, or when the running hack is changed.  This option
-never returns; it is intended for by shell scripts that want to react to
+never returns; it is intended for use by shell scripts that want to react to
 the screensaver in some way.  An example of its output would be:
 .EX
 BLANK Fri Nov  5 01:57:22 1999
 the screensaver in some way.  An example of its output would be:
 .EX
 BLANK Fri Nov  5 01:57:22 1999
@@ -224,7 +224,7 @@ while (<IN>) {
 .EE
 Note that LOCK might come either with or without a preceeding BLANK
 (depending on whether the lock-timeout is non-zero), so the above program
 .EE
 Note that LOCK might come either with or without a preceeding BLANK
 (depending on whether the lock-timeout is non-zero), so the above program
-is keeps track of both of them.
+keeps track of both of them.
 .SH DIAGNOSTICS
 If an error occurs while communicating with the \fIxscreensaver\fP daemon, or
 if the daemon reports an error, a diagnostic message will be printed to
 .SH DIAGNOSTICS
 If an error occurs while communicating with the \fIxscreensaver\fP daemon, or
 if the daemon reports an error, a diagnostic message will be printed to
index c1a6751b35bbd23c285f562acefabdf42d6699d8..659dc9138c552ae23849ccd7059e8331915a472f 100644 (file)
@@ -525,7 +525,7 @@ Mono
 
          <widget>
            <class>GtkHButtonBox</class>
 
          <widget>
            <class>GtkHButtonBox</class>
-           <name>demo_cancel_hbox</name>
+           <name>demo_manual_hbox</name>
            <layout_style>GTK_BUTTONBOX_DEFAULT_STYLE</layout_style>
            <spacing>30</spacing>
            <child_min_width>85</child_min_width>
            <layout_style>GTK_BUTTONBOX_DEFAULT_STYLE</layout_style>
            <spacing>30</spacing>
            <child_min_width>85</child_min_width>
@@ -541,7 +541,7 @@ Mono
            <widget>
              <class>GtkButton</class>
              <name>demo</name>
            <widget>
              <class>GtkButton</class>
              <name>demo</name>
-             <tooltip>Make any changes to this demo's parameters permanent, and run it in full-screen mode (click the mouse to return.)</tooltip>
+             <tooltip>Run this one in full-screen mode (click the mouse to return.)</tooltip>
              <can_default>True</can_default>
              <can_focus>True</can_focus>
              <signal>
              <can_default>True</can_default>
              <can_focus>True</can_focus>
              <signal>
@@ -554,30 +554,16 @@ Mono
 
            <widget>
              <class>GtkButton</class>
 
            <widget>
              <class>GtkButton</class>
-             <name>apply</name>
-             <tooltip>Make any changes to this demo's parameters permanent.</tooltip>
+             <name>manual</name>
+             <tooltip>Click here to read the manual for this display mode, if it has one.</tooltip>
              <can_default>True</can_default>
              <can_focus>True</can_focus>
              <signal>
                <name>clicked</name>
              <can_default>True</can_default>
              <can_focus>True</can_focus>
              <signal>
                <name>clicked</name>
-               <handler>apply_this_cb</handler>
-               <last_modification_time>Mon, 08 Nov 1999 04:46:59 GMT</last_modification_time>
+               <handler>manual_cb</handler>
+               <last_modification_time>Wed, 17 Nov 1999 09:43:37 GMT</last_modification_time>
              </signal>
              </signal>
-             <label>Apply</label>
-           </widget>
-
-           <widget>
-             <class>GtkButton</class>
-             <name>cancel</name>
-             <tooltip>Discard any changes you have made to this demo's parameters.</tooltip>
-             <can_default>True</can_default>
-             <can_focus>True</can_focus>
-             <signal>
-               <name>clicked</name>
-               <handler>cancel_this_cb</handler>
-               <last_modification_time>Mon, 08 Nov 1999 04:47:15 GMT</last_modification_time>
-             </signal>
-             <label>Cancel</label>
+             <label>Documentation...</label>
            </widget>
          </widget>
        </widget>
            </widget>
          </widget>
        </widget>
index e087b12c368bf2d1de5693f3cf99784d60c7a1f4..9012c7d55a6d48052144cd80e1d3125524ac2b74 100644 (file)
@@ -11,7 +11,7 @@
 .if n .sp 1
 .if t .sp .5
 ..
 .if n .sp 1
 .if t .sp .5
 ..
-.TH XScreenSaver 1 "12-Nov-99 (3.20)" "X Version 11"
+.TH XScreenSaver 1 "18-Nov-99 (3.21)" "X Version 11"
 .SH NAME
 xscreensaver-demo - interactively control the background xscreensaver daemon
 .SH SYNOPSIS
 .SH NAME
 xscreensaver-demo - interactively control the background xscreensaver daemon
 .SH SYNOPSIS
@@ -124,19 +124,13 @@ This is a combo-box, so you can either select an item from the popup menu,
 or type in a specific visual's hexadecimal ID.
 .TP 4
 .B Demo
 or type in a specific visual's hexadecimal ID.
 .TP 4
 .B Demo
-This button saves your changes and runs the demo in full-screen mode so
-that you can try it out.  Click the mouse to dismiss it.
+This button runs the demo in full-screen mode so that you can try it out.
+Click the mouse to dismiss it.
 .TP 4
 .TP 4
-.B Apply
-This button saves your changes to your \fI~/.xscreensaver\fP file,
-where the
-.BR xscreensaver (1)
-can see them.
-.TP 4
-.B Cancel
-This button discards any unsaved changes you have made, and reverts the
-settings for the selected demo back to what they were before.  Note that
-once you hit \fIDemo\fP or \fIApply\fP, that's it!
+.B Documentation
+Since each of the display modes is actually a separate program, they each
+may have their own manual.  This opens a window viewing the man page of
+this program, if it has one.
 .SH SCREENSAVER OPTIONS TAB
 This tab lets you change various settings used by the xscreensaver daemon
 itself, rather than its sub-programs.
 .SH SCREENSAVER OPTIONS TAB
 This tab lets you change various settings used by the xscreensaver daemon
 itself, rather than its sub-programs.
index fc8b89a47e4cd542f838f0e1636503b19b5abc54..a799ab3ad585f93c0e260a9780246703b8aa9973 100644 (file)
@@ -1056,7 +1056,8 @@ main (int argc, char **argv)
   memset(si, 0, sizeof(*si));
   global_si_kludge = si;       /* I hate C so much... */
 
   memset(si, 0, sizeof(*si));
   global_si_kludge = si;       /* I hate C so much... */
 
-  srandom ((int) time ((time_t *) 0));
+# undef ya_rand_init
+  ya_rand_init ((int) time ((time_t *) 0));
 
   save_argv (argc, argv);
   set_version_string (si, &argc, argv);
 
   save_argv (argc, argv);
   set_version_string (si, &argc, argv);
index cd797d47593ae07d3f2b57a4c9e309da5bf12c88..448fd37f149aa2c1c8d31b820eb52213de4612bb 100644 (file)
@@ -386,6 +386,7 @@ extern FILE *real_stdout;
 extern void initialize_stderr (saver_info *si);
 extern void reset_stderr (saver_screen_info *ssi);
 extern void clear_stderr (saver_screen_info *ssi);
 extern void initialize_stderr (saver_info *si);
 extern void reset_stderr (saver_screen_info *ssi);
 extern void clear_stderr (saver_screen_info *ssi);
+extern void shutdown_stderr (saver_info *si);
 
 
 /* =======================================================================
 
 
 /* =======================================================================
index 013aff223fc6364fabcaed62610b7e4d12aa0a6c..c25553da7c6e86f2bea1730cf49ab1db6bb89a10 100644 (file)
@@ -11,7 +11,7 @@
 .if n .sp 1
 .if t .sp .5
 ..
 .if n .sp 1
 .if t .sp .5
 ..
-.TH XScreenSaver 1 "12-Nov-99 (3.20)" "X Version 11"
+.TH XScreenSaver 1 "18-Nov-99 (3.21)" "X Version 11"
 .SH NAME
 xscreensaver - graphics hack and screen locker, launched when the user is idle
 .SH SYNOPSIS
 .SH NAME
 xscreensaver - graphics hack and screen locker, launched when the user is idle
 .SH SYNOPSIS
index 72b8b52b6aa463bacd332f0c367c12cfae4040cb..d51a7252a257871ad6af872ba3849a211c29ca62 100644 (file)
@@ -1,4 +1,4 @@
-# hacks/Makefile.in --- xscreensaver, Copyright (c) 1997 Jamie Zawinski.
+# hacks/Makefile.in --- xscreensaver, Copyright (c) 1997-1999 Jamie Zawinski.
 # the `../configure' script generates `hacks/Makefile' from this file.
 
 @SET_MAKE@
 # the `../configure' script generates `hacks/Makefile' from this file.
 
 @SET_MAKE@
@@ -172,10 +172,14 @@ install-strip:
        $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' install
 
 install-program: $(EXES)
        $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' install
 
 install-program: $(EXES)
-       @if [ ! -d $(HACKDIR) ]; then $(INSTALL_DIRS) $(HACKDIR) ; fi ; \
+       @if [ ! -d $(install_prefix)$(HACKDIR) ]; then                  \
+         $(INSTALL_DIRS) $(install_prefix)$(HACKDIR) ;                 \
+        fi ;                                                           \
        for program in $(EXES); do                                      \
        for program in $(EXES); do                                      \
-         echo $(INSTALL_PROGRAM) $$program $(HACKDIR)/$$program ;      \
-         $(INSTALL_PROGRAM) $$program $(HACKDIR)/$$program ;           \
+         echo $(INSTALL_PROGRAM) $$program                             \
+           $(install_prefix)$(HACKDIR)/$$program ;                     \
+         $(INSTALL_PROGRAM) $$program                                  \
+           $(install_prefix)$(HACKDIR)/$$program ;                     \
        done
 
 install-scripts: $(SCRIPTS) munge-scripts
        done
 
 install-scripts: $(SCRIPTS) munge-scripts
@@ -185,8 +189,10 @@ install-scripts: $(SCRIPTS) munge-scripts
          else                                                          \
            p=$(srcdir)/$$program ;                                     \
          fi ;                                                          \
          else                                                          \
            p=$(srcdir)/$$program ;                                     \
          fi ;                                                          \
-         echo $(INSTALL_PROGRAM) $$p $(HACKDIR)/$$program ;            \
-         $(INSTALL_PROGRAM) $$p $(HACKDIR)/$$program ;                 \
+         echo $(INSTALL_PROGRAM) $$p                                   \
+           $(install_prefix)$(HACKDIR)/$$program ;                     \
+         $(INSTALL_PROGRAM) $$p                                        \
+           $(install_prefix)$(HACKDIR)/$$program ;                     \
        done
 
 munge-scripts: $(SCRIPTS)
        done
 
 munge-scripts: $(SCRIPTS)
@@ -205,25 +211,29 @@ munge-scripts: $(SCRIPTS)
 
 install-man: $(MEN)
        @men="$(MEN)" ;                                                 \
 
 install-man: $(MEN)
        @men="$(MEN)" ;                                                 \
-       if [ ! -d $(man1dir) ]; then $(INSTALL_DIRS) $(man1dir) ; fi ;  \
+       if [ ! -d $(install_prefix)$(man1dir) ]; then                   \
+         $(INSTALL_DIRS) $(install_prefix)$(man1dir) ;                 \
+        fi ;                                                           \
        for man in $$men; do                                            \
          instname=`echo $$man | sed 's/\.man$$/\.$(mansuffix)/'` ;     \
        for man in $$men; do                                            \
          instname=`echo $$man | sed 's/\.man$$/\.$(mansuffix)/'` ;     \
-         echo $(INSTALL_DATA) $(srcdir)/$$man $(man1dir)/$$instname ;  \
-         $(INSTALL_DATA) $(srcdir)/$$man $(man1dir)/$$instname ;       \
+         echo $(INSTALL_DATA) $(srcdir)/$$man                          \
+          $(install_prefix)$(man1dir)/$$instname ;                     \
+         $(INSTALL_DATA) $(srcdir)/$$man                               \
+           $(install_prefix)$(man1dir)/$$instname ;                    \
        done
 
 uninstall-program:
        @for program in $(EXES) $(SCRIPTS); do                          \
        done
 
 uninstall-program:
        @for program in $(EXES) $(SCRIPTS); do                          \
-         echo rm -f $(HACKDIR)/$$program ;                             \
-         rm -f $(HACKDIR)/$$program ;                                  \
+         echo rm -f $(install_prefix)$(HACKDIR)/$$program ;            \
+         rm -f $(install_prefix)$(HACKDIR)/$$program ;                 \
        done
 
 uninstall-man:
        @men="$(MEN)" ;                                                 \
        for man in $$men; do                                            \
          instname=`echo $$man | sed 's/\.man$$/\.$(mansuffix)/'` ;     \
        done
 
 uninstall-man:
        @men="$(MEN)" ;                                                 \
        for man in $$men; do                                            \
          instname=`echo $$man | sed 's/\.man$$/\.$(mansuffix)/'` ;     \
-         echo rm -f $(man1dir)/$$instname ;                            \
-         rm -f $(man1dir)/$$instname ;                                 \
+         echo rm -f $(install_prefix)$(man1dir)/$$instname ;           \
+         rm -f $(install_prefix)$(man1dir)/$$instname ;                \
        done
 
 clean:
        done
 
 clean:
index 17abf8f4c398b9b6e95e7b3003bec4a0a77ed120..3f8f2763ab85dc812ca6fc16dd49fcc068fcd8e8 100644 (file)
@@ -267,8 +267,8 @@ screenhack (Display *dpy, Window window)
 
   fgc = XCreateGC (dpy, window, 0, &gcv);
 
 
   fgc = XCreateGC (dpy, window, 0, &gcv);
 
-  x2 = rand() % model_w;
-  y2 = rand() % model_h;
+  x2 = random() % model_w;
+  y2 = random() % model_h;
 
   delay_usecs = get_integer_resource ("delay", "Integer");
   n_restart = get_integer_resource ("restart", "Integer");
 
   delay_usecs = get_integer_resource ("delay", "Integer");
   n_restart = get_integer_resource ("restart", "Integer");
index 458d94ab4589458ae0ea9a18a84f5535b4f4b5aa..0bbc84862aa8f856180864f932389c71772aaada 100644 (file)
@@ -246,7 +246,7 @@ screenhack (Display *dpy, Window window)
   int delay = get_integer_resource ("delay", "Integer");
   int ncolors = get_integer_resource ("ncolors", "Integer");
   Bool dbuf = get_boolean_resource ("doubleBuffer", "Boolean");
   int delay = get_integer_resource ("delay", "Integer");
   int ncolors = get_integer_resource ("ncolors", "Integer");
   Bool dbuf = get_boolean_resource ("doubleBuffer", "Boolean");
-  XColor colors[255];
+  XColor *colors = 0;
   XGCValues gcv;
   GC erase_gc = 0;
   int i;
   XGCValues gcv;
   GC erase_gc = 0;
   int i;
@@ -261,6 +261,8 @@ screenhack (Display *dpy, Window window)
 
   transparent_p = get_boolean_resource("transparent", "Transparent");
 
 
   transparent_p = get_boolean_resource("transparent", "Transparent");
 
+  colors = (XColor *) calloc (sizeof(*colors), ncolors);
+
   if (get_boolean_resource("mono", "Boolean"))
     {
     MONO:
   if (get_boolean_resource("mono", "Boolean"))
     {
     MONO:
index b812e6ae38968adb6e036c9b8aed8d5e8e43c294..3732cb8e2ff49644b10223968880b67fa60f91d4 100644 (file)
@@ -266,7 +266,7 @@ new_circle_chain(void)
   
   /* There are between minCircles and maxCircles in each figure.
    */
   
   /* There are between minCircles and maxCircles in each figure.
    */
-  n = minCircles + rand() % (maxCircles - minCircles);
+  n = minCircles + random() % (maxCircles - minCircles);
   
   head = NULL;
   while (n--)
   
   head = NULL;
   while (n--)
index f50e987d174dec002e059b7871228469aaa58b41..626f2926899da542ca3da31bb78314a7db283b8f 100644 (file)
@@ -1,4 +1,4 @@
-# hacks/glx/Makefile.in --- xscreensaver, Copyright (c) 1997 Jamie Zawinski.
+# hacks/glx/Makefile.in --- xscreensaver, Copyright (c) 1999 Jamie Zawinski.
 # the `../../configure' script generates `hacks/glx/Makefile' from this file.
 
 @SET_MAKE@
 # the `../../configure' script generates `hacks/glx/Makefile' from this file.
 
 @SET_MAKE@
@@ -113,34 +113,43 @@ install-strip:
        $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' install
 
 install-program: $(EXES)
        $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' install
 
 install-program: $(EXES)
-       @exes="$(EXES)" ;                                               \
-       if [ ! -d $(HACKDIR) ]; then $(INSTALL_DIRS) $(HACKDIR) ; fi ;  \
+       @if [ ! -d $(install_prefix)$(HACKDIR) ]; then                  \
+         $(INSTALL_DIRS) $(install_prefix)$(HACKDIR) ;                 \
+        fi ;                                                           \
+       exes="$(EXES)" ;                                                \
        for program in $$exes; do                                       \
        for program in $$exes; do                                       \
-         echo $(INSTALL_PROGRAM) $$program $(HACKDIR)/$$program ;      \
-         $(INSTALL_PROGRAM) $$program $(HACKDIR)/$$program ;           \
+         echo $(INSTALL_PROGRAM) $$program                             \
+           $(install_prefix)$(HACKDIR)/$$program ;                     \
+         $(INSTALL_PROGRAM) $$program                                  \
+           $(install_prefix)$(HACKDIR)/$$program ;                     \
        done
 
 install-man: $(MEN)
        @men="$(MEN)" ;                                                 \
        done
 
 install-man: $(MEN)
        @men="$(MEN)" ;                                                 \
-       if [ ! -d $(man1dir) ]; then $(INSTALL_DIRS) $(man1dir) ; fi ;  \
+       if [ ! -d $(install_prefix)$(man1dir) ]; then                   \
+         $(INSTALL_DIRS) $(install_prefix)$(man1dir) ;                 \
+        fi ;                                                           \
        for man in $$men; do                                            \
          instname=`echo $$man | sed 's/\.man$$/\.$(mansuffix)/'` ;     \
        for man in $$men; do                                            \
          instname=`echo $$man | sed 's/\.man$$/\.$(mansuffix)/'` ;     \
-         echo $(INSTALL_DATA) $(srcdir)/$$man $(man1dir)/$$instname ;  \
-         $(INSTALL_DATA) $(srcdir)/$$man $(man1dir)/$$instname ;       \
+         echo $(INSTALL_DATA) $(srcdir)/$$man                          \
+          $(install_prefix)$(man1dir)/$$instname ;                     \
+         $(INSTALL_DATA) $(srcdir)/$$man                               \
+           $(install_prefix)$(man1dir)/$$instname ;                    \
        done
 
 uninstall-program:
        done
 
 uninstall-program:
-       @for program in $(EXES); do                                     \
-         echo rm -f $(HACKDIR)/$$program ;                             \
-         rm -f $(HACKDIR)/$$program ;                                  \
+       @exes="$(EXES)" ;                                               \
+       for program in $$exes; do                                       \
+         echo rm -f $(install_prefix)$(HACKDIR)/$$program ;            \
+         rm -f $(install_prefix)$(HACKDIR)/$$program ;                 \
        done
 
 uninstall-man:
        @men="$(MEN)" ;                                                 \
        for man in $$men; do                                            \
          instname=`echo $$man | sed 's/\.man$$/\.$(mansuffix)/'` ;     \
        done
 
 uninstall-man:
        @men="$(MEN)" ;                                                 \
        for man in $$men; do                                            \
          instname=`echo $$man | sed 's/\.man$$/\.$(mansuffix)/'` ;     \
-         echo rm -f $(man1dir)/$$instname ;                            \
-         rm -f $(man1dir)/$$instname ;                                 \
+         echo rm -f $(install_prefix)$(man1dir)/$$instname ;           \
+         rm -f $(install_prefix)$(man1dir)/$$instname ;                \
        done
 
 clean:
        done
 
 clean:
index 48e57aeb884659aaf881e6d4b594937db7e655a6..86facfb6f79dbaf98eb5b9f61789838ce75c3c29 100644 (file)
@@ -15,6 +15,7 @@
 
  * Revision History:
  * Tue Oct 19 22:24:47 PDT 1999    Initial creation by David Konerding
 
  * Revision History:
  * Tue Oct 19 22:24:47 PDT 1999    Initial creation by David Konerding
+ *                                 <dek@cgl.ucsf.edu>
  *                                                                 
  * Notes:
  * This screensaver requires the GLE ("OpenGL Tubing and Extrusion Library")
  *                                                                 
  * Notes:
  * This screensaver requires the GLE ("OpenGL Tubing and Extrusion Library")
index 39ae21bb05cb8e23f709b83e00250790afc6655a..d20bb409ca8eba6f251b3c4e5aa5f5a715ecb366 100644 (file)
@@ -424,8 +424,8 @@ void generate_stars(int width, int height)
        {
 /*       size = (drand48()+size_range[0]) * size_range[1]/2.; */
 /*    glPointSize(size); */
        {
 /*       size = (drand48()+size_range[0]) * size_range[1]/2.; */
 /*    glPointSize(size); */
-         x = drand48()*width;
-         y = drand48()*height;
+         x = random()*width;
+         y = random()*height;
          glVertex2f(x,y);
        }
   glEnd();
          glVertex2f(x,y);
        }
   glEnd();
index b34ad5dac1de8b60f76a0e6a7368faba0f0cc2f8..8d7260d52bacafe91b7014c7eeb5e52335d57b93 100644 (file)
@@ -654,8 +654,8 @@ void GenerateQuad(void)
       quads[i].ty = 0.;
       quads[i].tz = -10;
 
       quads[i].ty = 0.;
       quads[i].tz = -10;
 
-      quads[i].drx = drand48() * 5.;
-      quads[i].dry = drand48() * 5.;
+      quads[i].drx = random() * 5.;
+      quads[i].dry = random() * 5.;
       quads[i].drz = 0;
     }
 }
       quads[i].drz = 0;
     }
 }
index 0f8e4df585794a6f667d71153da554a3f59ba63a..9a783a04794600165780e6b80f64ef05f3fa6b53 100644 (file)
@@ -184,9 +184,9 @@ pinit(ModeInfo *mi)
 {
   gasketstruct *gp = &gasket[MI_SCREEN(mi)];
 
 {
   gasketstruct *gp = &gasket[MI_SCREEN(mi)];
 
-  gp->xinc = 0.1*(1.0*rand()/RAND_MAX);
-  gp->yinc = 0.1*(1.0*rand()/RAND_MAX);
-  gp->zinc = 0.1*(1.0*rand()/RAND_MAX);
+  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[0] = 6.0;
   gp->light_colour[1] = 6.0;
   gp->light_colour[2] = 6.0;
index f89f95fede33925458a1d8262c4fbab7171f33bb..cb88c10a6cc6ea8bc0420b1418c81dd4d742f885 100644 (file)
@@ -77,6 +77,7 @@ init_map (Display *dpy, Window window)
 
       if (ncolors <= 2) ncolors = 0;
       if (ncolors == 0) mono_p = True;
 
       if (ncolors <= 2) ncolors = 0;
       if (ncolors == 0) mono_p = True;
+      if (ncolors > 255) ncolors = 255;  /* too many look bad */
 
       fg_pixel = get_pixel_resource ("background", "Background", dpy, cmap);
       bg_pixel = get_pixel_resource ("foreground", "Foreground", dpy, cmap);
 
       fg_pixel = get_pixel_resource ("background", "Background", dpy, cmap);
       bg_pixel = get_pixel_resource ("foreground", "Foreground", dpy, cmap);
index a7a9195634235fa735ef61f66bf45d96cee6b8c2..7f66b01b0c99b01bafbce687878b79eb3cabd789 100644 (file)
@@ -272,8 +272,6 @@ void inter_init(Display* dpy, Window win, struct inter_context* c)
   if(!mono) {
     c->pal = calloc(c->colors, sizeof(XColor));
 
   if(!mono) {
     c->pal = calloc(c->colors, sizeof(XColor));
 
-    srand48(time(NULL));
-
     gray = get_boolean_resource("gray", "Boolean");
     if(!gray) {
       H[0] = frand(360.0); 
     gray = get_boolean_resource("gray", "Boolean");
     if(!gray) {
       H[0] = frand(360.0); 
index 1d6bee2b00bb8cf413a1d518dc764df3689b5c3e..76d56da16aa1fd3d09e0438da595b666581fda25 100644 (file)
@@ -378,7 +378,6 @@ initLMorph(void)
     gcClear = XCreateGC(dpy, window, GCForeground, &gcv);
     XClearWindow(dpy, window);
 
     gcClear = XCreateGC(dpy, window, GCForeground, &gcv);
     XClearWindow(dpy, window);
 
-    srandom(time(NULL));
     initPointArrays();
     aCurr = aWork[nWork = 0];
     aPrev = NULL;
     initPointArrays();
     aCurr = aWork[nWork = 0];
     aPrev = NULL;
index b4c748f65f36b7c572b2b9d64604ba0f6a7df905..78a9de7fc538e8ef72355c13ce8fdefdb34e65b0 100644 (file)
 
 typedef struct cell_s 
 {
 
 typedef struct cell_s 
 {
-    short x;                        /*  0    - */
-    short y;                        /*  2      */
-    unsigned char col;              /*  4      */
-    unsigned char isnext;           /*  5      */
-    unsigned char nextcol;          /*  6      */
-                                    /*  7      */
-    struct cell_s *next;            /*  8    - */
-    struct cell_s *prev;            /* 12      */
-    FLOAT speed;                    /* 16    - */
-    FLOAT growth;                   /* 20 24   */
-    FLOAT nextspeed;                /* 24 32 - */
-                                    /* 28 40   */
+    unsigned char col;              /*  0      */
+    unsigned char isnext;           /*  1      */
+    unsigned char nextcol;          /*  2      */
+                                    /*  3      */
+    struct cell_s *next;            /*  4      */
+    struct cell_s *prev;            /*  8    - */
+    FLOAT speed;                    /* 12      */
+    FLOAT growth;                   /* 16 20 - */
+    FLOAT nextspeed;                /* 20 28   */
+                                    /* 24 36 - */
 } cell;
 
 static int arr_width;
 } cell;
 
 static int arr_width;
@@ -116,6 +114,10 @@ static FLOAT mindeathspeed;
 static FLOAT maxdeathspeed;
 static Bool originalcolors;
 
 static FLOAT maxdeathspeed;
 static Bool originalcolors;
 
+#define cell_x(c) (((c) - arr) % arr_width)
+#define cell_y(c) (((c) - arr) / arr_width)
+
+
 static int random_life_value (void)
 {
     return (int) ((RAND_FLOAT * (maxlifespan - minlifespan)) + minlifespan);
 static int random_life_value (void)
 {
     return (int) ((RAND_FLOAT * (maxlifespan - minlifespan)) + minlifespan);
@@ -273,9 +275,16 @@ static void setup_display (void)
 
     count = get_integer_resource ("count", "Integer");
     if (count < 2) count = 2;
 
     count = get_integer_resource ("count", "Integer");
     if (count < 2) count = 2;
+
+    /* number of colors can't be greater than the half depth of the screen. */
     if (count > (1L << (xgwa.depth-1)))
       count = (1L << (xgwa.depth-1));
 
     if (count > (1L << (xgwa.depth-1)))
       count = (1L << (xgwa.depth-1));
 
+    /* Actually, since cell->col is of type char, this has to be small. */
+    if (count >= (1L << ((sizeof(arr[0].col) * 8) - 1)))
+      count = (1L << ((sizeof(arr[0].col) * 8) - 1));
+
+
     if (originalcolors && (count > 8))
     {
        count = 8;
     if (originalcolors && (count > 8))
     {
        count = 8;
@@ -480,8 +489,6 @@ static void setup_arr (void)
       int row = y * arr_width;
        for (x = 0; x < arr_width; x++) 
        {
       int row = y * arr_width;
        for (x = 0; x < arr_width; x++) 
        {
-           arr[row+x].x = x;
-           arr[row+x].y = y;
            arr[row+x].speed = 0.0;
            arr[row+x].growth = 0.0;
            arr[row+x].col = 0;
            arr[row+x].speed = 0.0;
            arr[row+x].growth = 0.0;
            arr[row+x].col = 0;
@@ -533,7 +540,7 @@ static void killcell (cell *c)
     c->next->prev = c->prev;
     c->prev = 0;
     c->speed = 0.0;
     c->next->prev = c->prev;
     c->prev = 0;
     c->speed = 0.0;
-    drawblock (c->x, c->y, c->col);
+    drawblock (cell_x(c), cell_y(c), c->col);
 }
 
 
 }
 
 
@@ -612,8 +619,8 @@ static void update (void)
         if (coords)
           for (i = 0; i < 4; i++)
             {
         if (coords)
           for (i = 0; i < 4; i++)
             {
-              int x = a->x + coords[i].x;
-              int y = a->y + coords[i].y;
+              int x = cell_x(a) + coords[i].x;
+              int y = cell_y(a) + coords[i].y;
 
               if (x < 0) x = arr_width - 1;
               else if (x >= arr_width) x = 0;
 
               if (x < 0) x = arr_width - 1;
               else if (x >= arr_width) x = 0;
@@ -638,7 +645,7 @@ static void update (void)
            a->speed = a->nextspeed;
            a->growth = 0.0;
            a->col = a->nextcol;
            a->speed = a->nextspeed;
            a->growth = 0.0;
            a->col = a->nextcol;
-           drawblock (a->x, a->y, a->col + count);
+           drawblock (cell_x(a), cell_y(a), a->col + count);
        }
     }
 }
        }
     }
 }
index f8996c4ed14aeebfc38214dd075dc624b6e5b10a..fd7e4fa79920f15eefc98f39b3afb7c2f6017090 100644 (file)
  * Options
  * -delay      usleep every iteration
  * -rate       Add one drop every "rate" iterations
  * Options
  * -delay      usleep every iteration
  * -rate       Add one drop every "rate" iterations
+ * -box         Add big square splash every "box" iters (not very good)
  * -water      Ripples on a grabbed background image
  * -foreground  Interpolate ripples between these two colors
  * -background
  * -oily       Psychedelic colours like man
  * -stir       Add a regular pattern of drops
  * -fluidity   Between 0 and 16. 16 = big drops
  * -water      Ripples on a grabbed background image
  * -foreground  Interpolate ripples between these two colors
  * -background
  * -oily       Psychedelic colours like man
  * -stir       Add a regular pattern of drops
  * -fluidity   Between 0 and 16. 16 = big drops
- * -light      Hack to add lighting effect (2 for 16bbp, 6 for 32bpp)
+ * -light      Hack to add lighting effect
  *
  * Code mainly hacked from xflame and decayscreen.
  */
 
 /* Version history:
  *
  * Code mainly hacked from xflame and decayscreen.
  */
 
 /* Version history:
- * Speeded up graphics with dirty buffer. Returned to using putpixel for
- * greater portability
- * Added a variety of methods for splashing screen.
+ * 13 Oct 1999: Initial hack
+ * 30 Oct 1999: Speeded up graphics with dirty buffer. Returned to using
+ *              putpixel for greater portability
+ *              Added a variety of methods for splashing screen.
+ * 31 Oct 1999: Added in lighting hack
+ * 13 Nov 1999: Speed up tweaks
+ *              Adjust "light" for different bits per colour (-water only)
+ *
  */
 
 
  */
 
 
@@ -70,14 +76,24 @@ static char *dirty_buffer;
 #define TABLE 256
 static double cos_tab[TABLE];
 
 #define TABLE 256
 static double cos_tab[TABLE];
 
-static double drop_dist[] = 
+/* Distribution of drops: many little ones and a few big ones. */
+static double drop_dist[] =
 {0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.2, 0.6};
 
 {0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.2, 0.6};
 
+static void (*draw_transparent)(short *src);
+
 /* How hard to hit the water */
 #define SPLASH 512
 #define MIN(x, y) ((x) < (y) ? (x) : (y))
 #define MAX(x, y) ((x) > (y) ? (x) : (y))
 /* How hard to hit the water */
 #define SPLASH 512
 #define MIN(x, y) ((x) < (y) ? (x) : (y))
 #define MAX(x, y) ((x) > (y) ? (x) : (y))
-#define DIRTY 2 /* 2 = dirty, 1 = restore original pixel, 0 = leave alone */
+#define DIRTY 3 /* dirty >= 2, 1 = restore original pixel, 0 = leave alone */
+
+/* From fortune(6) */
+/* -- really weird C code to count the number of bits in a word */
+#define BITCOUNT(x)    (((BX_(x)+(BX_(x)>>4)) & 0x0F0F0F0F) % 255)
+#define BX_(x)         ((x) - (((x)>>1)&0x77777777) \
+                             - (((x)>>2)&0x33333333) \
+                             - (((x)>>3)&0x11111111))
 
 
 /*      -------------------------------------------             */
 
 
 /*      -------------------------------------------             */
@@ -118,7 +134,6 @@ draw_ripple(short *src)
       if (*dirty > 0) {
         int dx;
         if (light > 0) {
       if (*dirty > 0) {
         int dx;
         if (light > 0) {
-          /* dx = ((v2 - v1) + (v4 - v3)) << light; */ /* light from left */
           dx = ((v3 - v1) + (v4 - v2)) << light; /* light from top */
         } else
           dx = 0;
           dx = ((v3 - v1) + (v4 - v2)) << light; /* light from top */
         } else
           dx = 0;
@@ -134,7 +149,68 @@ draw_ripple(short *src)
 /*      -------------------------------------------             */
 
 
 /*      -------------------------------------------             */
 
 
-static unsigned long (*bright)(int dx, unsigned long color);
+/* Uses the horizontal gradient as an offset to create a warp effect  */
+static void
+draw_transparent_vanilla(short *src)
+{
+  int across, down, pixel;
+  char *dirty = dirty_buffer;
+
+  pixel = 0;
+  for (down = 0; down < height - 2; down++, pixel += 2)
+    for (across = 0; across < width-2; across++, pixel++) {
+      int gradx, grady, gradx1, grady1;
+      int x0, x1, x2, y1, y2;
+
+      x0 = src[pixel];
+      x1 = src[pixel + 1];
+      x2 = src[pixel + 2];
+      y1 = src[pixel + width];
+      y2 = src[pixel + 2*width];
+
+      gradx = (x1 - x0);
+      grady = (y1 - x0);
+      gradx1= (x2 - x1);
+      grady1= (y2 - y1);
+      gradx1 = 1 + (gradx + gradx1) / 2;
+      grady1 = 1 + (grady + grady1) / 2;
+
+      if ((2*across+MIN(gradx,gradx1) < 0) ||
+          (2*across+MAX(gradx,gradx1) >= bigwidth)) {
+        gradx = 0;
+        gradx1= 1;
+      }
+      if ((2*down+MIN(grady,grady1) < 0) ||
+          (2*down+MAX(grady,grady1) >= bigheight)) {
+        grady = 0;
+        grady1 = 1;
+      }
+
+      if ((gradx == 0 && gradx1 == 1 && grady == 0 && grady1 == 1)) {
+        if (dirty[pixel] > 0)
+          dirty[pixel]--;
+      } else
+        dirty[pixel] = DIRTY;
+
+      if (dirty[pixel] > 0) {
+        XPutPixel(buffer_map, (across<<1),  (down<<1),
+                  XGetPixel(orig_map, (across<<1) + gradx, (down<<1) + grady));
+        XPutPixel(buffer_map, (across<<1)+1,(down<<1),
+                  XGetPixel(orig_map, (across<<1) + gradx1,(down<<1) + grady));
+        XPutPixel(buffer_map, (across<<1),  (down<<1)+1,
+                  XGetPixel(orig_map, (across<<1) + gradx, (down<<1) + grady1));
+        XPutPixel(buffer_map, (across<<1)+1,(down<<1)+1,
+                  XGetPixel(orig_map, (across<<1) + gradx1,(down<<1) + grady1));
+      }
+    }
+}
+
+
+/*      -------------------------------------------             */
+
+
+/* This builds on the above warp effect by adding in a lighting effect: */
+/* brighten pixels by an amount corresponding to the vertical gradient */
 static unsigned long rmask;
 static unsigned long gmask;
 static unsigned long bmask;
 static unsigned long rmask;
 static unsigned long gmask;
 static unsigned long bmask;
@@ -143,7 +219,7 @@ static int gshift;
 static int bshift;
 
 
 static int bshift;
 
 
-static void 
+static void
 set_mask(unsigned long color, unsigned long *mask, int *shift)
 {
   *shift = 0;
 set_mask(unsigned long color, unsigned long *mask, int *shift)
 {
   *shift = 0;
@@ -170,7 +246,7 @@ cadd(unsigned long color, int dx, unsigned long mask, int shift)
 
 
 static unsigned long
 
 
 static unsigned long
-dobright(int dx, unsigned long color)
+bright(int dx, unsigned long color)
 {
   return (cadd(color, dx, rmask, rshift) |
           cadd(color, dx, gmask, gshift) |
 {
   return (cadd(color, dx, rmask, rshift) |
           cadd(color, dx, gmask, gshift) |
@@ -178,15 +254,8 @@ dobright(int dx, unsigned long color)
 }
 
 
 }
 
 
-static unsigned long
-nobright(int dx, unsigned long color)
-{
-  return color;
-}
-
-
 static void
 static void
-draw_transparent(short *src)
+draw_transparent_light(short *src)
 {
   int across, down, pixel;
   char *dirty = dirty_buffer;
 {
   int across, down, pixel;
   char *dirty = dirty_buffer;
@@ -229,21 +298,33 @@ draw_transparent(short *src)
 
       if (dirty[pixel] > 0) {
         int dx;
 
       if (dirty[pixel] > 0) {
         int dx;
-        if (light > 0) {
-          if (4-light >= 0)
-            dx = (grady + (src[pixel+width+1]-x1)) >> (4-light); /* light from top */
-          else
-            dx = (grady + (src[pixel+width+1]-x1)) << (light-4); /* light from top */
-        } else
-          dx = 0;
-        XPutPixel(buffer_map, (across<<1),  (down<<1),
-                  bright(dx, XGetPixel(orig_map, (across<<1) + gradx, (down<<1) + grady)));
-        XPutPixel(buffer_map, (across<<1)+1,(down<<1),
-                  bright(dx, XGetPixel(orig_map, (across<<1) + gradx1,(down<<1) + grady)));
-        XPutPixel(buffer_map, (across<<1),  (down<<1)+1,
-                  bright(dx, XGetPixel(orig_map, (across<<1) + gradx, (down<<1) + grady1)));
-        XPutPixel(buffer_map, (across<<1)+1,(down<<1)+1,
-                  bright(dx, XGetPixel(orig_map, (across<<1) + gradx1,(down<<1) + grady1)));
+
+        /* light from top */
+        if (4-light >= 0)
+          dx = (grady + (src[pixel+width+1]-x1)) >> (4-light);
+        else
+          dx = (grady + (src[pixel+width+1]-x1)) << (light-4);
+
+        if (dx != 0) {
+          XPutPixel(buffer_map, (across<<1),  (down<<1),
+                    bright(dx, XGetPixel(orig_map, (across<<1) + gradx, (down<<1) + grady)));
+          XPutPixel(buffer_map, (across<<1)+1,(down<<1),
+                    bright(dx, XGetPixel(orig_map, (across<<1) + gradx1,(down<<1) + grady)));
+          XPutPixel(buffer_map, (across<<1),  (down<<1)+1,
+                    bright(dx, XGetPixel(orig_map, (across<<1) + gradx, (down<<1) + grady1)));
+          XPutPixel(buffer_map, (across<<1)+1,(down<<1)+1,
+                    bright(dx, XGetPixel(orig_map, (across<<1) + gradx1,(down<<1) + grady1)));
+        } else {
+          /* Could use XCopyArea, but XPutPixel is faster */
+          XPutPixel(buffer_map, (across<<1),  (down<<1),
+                    XGetPixel(orig_map, (across<<1) + gradx, (down<<1) + grady));
+          XPutPixel(buffer_map, (across<<1)+1,(down<<1),
+                    XGetPixel(orig_map, (across<<1) + gradx1,(down<<1) + grady));
+          XPutPixel(buffer_map, (across<<1),  (down<<1)+1,
+                    XGetPixel(orig_map, (across<<1) + gradx, (down<<1) + grady1));
+          XPutPixel(buffer_map, (across<<1)+1,(down<<1)+1,
+                    XGetPixel(orig_map, (across<<1) + gradx1,(down<<1) + grady1));
+        }
       }
     }
 }
       }
     }
 }
@@ -252,34 +333,86 @@ draw_transparent(short *src)
 /*      -------------------------------------------             */
 
 
 /*      -------------------------------------------             */
 
 
-/*
+#if 0
+/* Doesn't go any faster and doesn't work at all colour depths */
 static void
 static void
-draw_ripple16(short *src)
+draw_transparent16l(short *src)
 {
 {
-  int across, down;
-  unsigned short *dest;
+  int across, down, bigpix, pixel;
+  char *dirty = dirty_buffer;
+  unsigned short *buffer, *orig;
 
 
-  dest = (unsigned short *) buffer_map->data;
+  buffer = (unsigned short *) buffer_map->data;
+  orig = (unsigned short *) orig_map->data;
 
 
-  for (down = 0; down < height - 1; down++, src += 1, dest += bigwidth+2)
-    for (across = 0; across < width - 1; across++, src++) {
-      int v1, v2, v3, v4;
-      v1 = (int)*src;
-      v2 = (int)*(src + 1);
-      v3 = (int)*(src + width);
-      v4 = (int)*(src + width + 1);
-      if (!(v1 == 0 && v2 == 0 && v3 == 0 && v4 == 0)) {
-        *dest++ = map_color(v1);
-        *dest   = map_color((v1 + v2) >> 1);
-        dest   += bigwidth - 1;
-        *dest++ = map_color((v1 + v3) >> 1);
-        *dest   = map_color((v1 + v4) >> 1);
-        dest   -= bigwidth - 1;
+  for (pixel = bigpix = down = 0;
+       down < height - 2;
+       down++, pixel += 2, bigpix += bigwidth+4)
+    for (across = 0; across < width-2; across++, pixel++, bigpix+=2) {
+      int gradx, grady, gradx1, grady1;
+      int x0, x1, x2, y1, y2;
+
+      x0 = src[pixel];
+      x1 = src[pixel + 1];
+      x2 = src[pixel + 2];
+      y1 = src[pixel + width];
+      y2 = src[pixel + 2*width];
+
+      gradx = (x1 - x0);
+      grady = (y1 - x0);
+      gradx1= (x2 - x1);
+      grady1= (y2 - y1);
+      gradx1 = 1 + (gradx + gradx1) / 2;
+      grady1 = 1 + (grady + grady1) / 2;
+
+      if ((2*across+MIN(gradx,gradx1) < 0) ||
+          (2*across+MAX(gradx,gradx1) >= bigwidth)) {
+        gradx = 0;
+        gradx1= 1;
+      }
+      if ((2*down+MIN(grady,grady1) < 0) ||
+          (2*down+MAX(grady,grady1) >= bigheight)) {
+        grady = 0;
+        grady1 = 1;
+      }
+
+      if ((gradx == 0 && gradx1 == 1 && grady == 0 && grady1 == 1)) {
+        if (dirty[pixel] > 0)
+          dirty[pixel]--;
       } else
       } else
-        dest += 2;
+        dirty[pixel] = DIRTY;
+
+      if (dirty[pixel] > 0) {
+        unsigned short *dest = buffer + bigpix;
+        unsigned short *image = orig + bigpix;
+        int dx;
+
+        /* light from top */
+        if (4-light >= 0)
+          dx = (grady + (src[pixel+width+1]-x1)) >> (4-light);
+        else
+          dx = (grady + (src[pixel+width+1]-x1)) << (light-4);
+
+        grady *= bigwidth;
+        grady1*= bigwidth;
+
+        if (dx != 0) {
+          *dest++ = dobright(dx, *(image + gradx  + grady));
+          *dest   = dobright(dx, *(image + gradx1 + grady));
+          dest   += bigwidth - 1;
+          *dest++ = dobright(dx, *(image + gradx  + grady1));
+          *dest   = dobright(dx, *(image + gradx1 + grady1));
+        } else {
+          *dest++ = *(image + gradx  + grady);
+          *dest   = *(image + gradx1 + grady);
+          dest   += bigwidth - 1;
+          *dest++ = *(image + gradx  + grady1);
+          *dest   = *(image + gradx1 + grady1);
+        }
+      }
     }
 }
     }
 }
-*/
+#endif
 
 
 /*      -------------------------------------------             */
 
 
 /*      -------------------------------------------             */
@@ -319,6 +452,7 @@ setup_X(Display * disp, Window win)
     gcflags = GCForeground | GCFunction;
     if (use_subwindow_mode_p(xwa.screen, window))      /* see grabscreen.c */
       gcflags |= GCSubwindowMode;
     gcflags = GCForeground | GCFunction;
     if (use_subwindow_mode_p(xwa.screen, window))      /* see grabscreen.c */
       gcflags |= GCSubwindowMode;
+
     gc = XCreateGC(display, window, gcflags, &gcv);
 
     grab_screen_image(xwa.screen, window);
     gc = XCreateGC(display, window, gcflags, &gcv);
 
     grab_screen_image(xwa.screen, window);
@@ -329,14 +463,14 @@ setup_X(Display * disp, Window win)
     XGCValues gcv;
 
     gc = XCreateGC(display, window, 0, &gcv);
     XGCValues gcv;
 
     gc = XCreateGC(display, window, 0, &gcv);
-    if (!gc) {
-      fprintf(stderr, "XCreateGC failed\n");
-      exit(1);
-    }
-
     orig_map = 0;
   }
 
     orig_map = 0;
   }
 
+  if (!gc) {
+    fprintf(stderr, "XCreateGC failed\n");
+    exit(1);
+  }
+
   buffer_map = 0;
 
 #ifdef HAVE_XSHM_EXTENSION
   buffer_map = 0;
 
 #ifdef HAVE_XSHM_EXTENSION
@@ -371,6 +505,9 @@ DisplayImage(void)
 #endif /* HAVE_XSHM_EXTENSION */
     XPutImage(display, window, gc, buffer_map, 0, 0, 0, 0,
              bigwidth, bigheight);
 #endif /* HAVE_XSHM_EXTENSION */
     XPutImage(display, window, gc, buffer_map, 0, 0, 0, 0,
              bigwidth, bigheight);
+
+  XSync(display,False);
+  screenhack_handle_events(display);
 }
 
 
 }
 
 
@@ -480,11 +617,21 @@ init_oily_colors(void)
 /*      -------------------------------------------             */
 
 
 /*      -------------------------------------------             */
 
 
+static void
+init_cos_tab(void)
+{
+  int i;
+  for (i = 0; i < TABLE; i++)
+    cos_tab[i] = cos(i * M_PI/2 / TABLE);
+}
+
+
 /* Shape of drop to add */
 static double
 sinc(double x)
 {
 #if 1
 /* Shape of drop to add */
 static double
 sinc(double x)
 {
 #if 1
+  /* cosine hump */
   int i;
   i = (int)(x * TABLE + 0.5);
   if (i >= TABLE) i = (TABLE-1) - (i-(TABLE-1));
   int i;
   i = (int)(x * TABLE + 0.5);
   if (i >= TABLE) i = (TABLE-1) - (i-(TABLE-1));
@@ -526,7 +673,7 @@ add_drop(ripple_mode mode, int drop)
   int newx, newy, dheight;
   int radius = MIN(width, height) / 50;
   /* Don't put drops too near the edge of the screen or they get stuck */
   int newx, newy, dheight;
   int radius = MIN(width, height) / 50;
   /* Don't put drops too near the edge of the screen or they get stuck */
-  int border = 6;
+  int border = 8;
 
   switch (mode) {
   default:
 
   switch (mode) {
   default:
@@ -593,23 +740,15 @@ init_ripples(int ndrops, int splash)
   bufferB = (short *)calloc(width * height, sizeof(*bufferB));
   temp = (short *)calloc(width * height, sizeof(*temp));
 
   bufferB = (short *)calloc(width * height, sizeof(*bufferB));
   temp = (short *)calloc(width * height, sizeof(*temp));
 
-  dirty_buffer = (char *)malloc(width * height);
-  memset(dirty_buffer, DIRTY, width * height);
+  dirty_buffer = (char *)calloc(width * height, sizeof(*dirty_buffer));
 
   for (i = 0; i < ndrops; i++)
     add_drop(ripple_blob, splash);
 
   if (transparent) {
     /* There's got to be a better way of doing this  XCopyArea? */
 
   for (i = 0; i < ndrops; i++)
     add_drop(ripple_blob, splash);
 
   if (transparent) {
     /* There's got to be a better way of doing this  XCopyArea? */
-    int across, down;
-    for (down = 0; down < bigheight-4; down++)
-      for (across = bigwidth-4; across < bigwidth; across++)
-       XPutPixel(buffer_map, across, down,
-                 XGetPixel(orig_map, across, down));
-    for (down = bigheight-4; down < bigheight; down++)
-      for (across = 0; across < bigwidth; across++)
-       XPutPixel(buffer_map, across, down,
-                 XGetPixel(orig_map, across, down));
+    memcpy(buffer_map->data, orig_map->data,
+           bigheight * buffer_map->bytes_per_line);
   } else {
     int across, down, color;
 
   } else {
     int across, down, color;
 
@@ -635,7 +774,7 @@ init_ripples(int ndrops, int splash)
 
   [ u(t+1)-2u(t)+u(t-1) ] / dt = a [ u(x+1)+u(x-1)+u(y+1)+u(y-1)-4u ] / h
 
 
   [ u(t+1)-2u(t)+u(t-1) ] / dt = a [ u(x+1)+u(x-1)+u(y+1)+u(y-1)-4u ] / h
 
- where dt = time step squared, h= dx*dy = mesh resolution squared.
+ where dt = time step squared, h = dx*dy = mesh resolution squared.
 
  From where u(t+1) may be calculated as:
 
 
  From where u(t+1) may be calculated as:
 
@@ -677,8 +816,6 @@ ripple(int fluidity)
     toggle = 0;
   }
 
     toggle = 0;
   }
 
-#if 1
-  /* Traditional, squarer ripples */
   switch (count) {
   case 0: case 1:
     pixel = 1 * width + 1;
   switch (count) {
   case 0: case 1:
     pixel = 1 * width + 1;
@@ -693,13 +830,16 @@ ripple(int fluidity)
     pixel = 1 * width + 1;
     for (down = 1; down < height - 1; down++, pixel += 2 * 1)
       for (across = 1; across < width - 1; across++, pixel++) {
     pixel = 1 * width + 1;
     for (down = 1; down < height - 1; down++, pixel += 2 * 1)
       for (across = 1; across < width - 1; across++, pixel++) {
-        int damp =
-          (temp[pixel - 1] + temp[pixel + 1] +
-           temp[pixel - width] + temp[pixel + width] +
-           temp[pixel - width - 1] + temp[pixel - width + 1] +
-           temp[pixel + width - 1] + temp[pixel + width + 1] +
-           temp[pixel]) / 9;
-        dest[pixel] = damp - (damp >> fluidity);
+        if (temp[pixel] != 0) { /* Close enough for government work */
+          int damp =
+            (temp[pixel - 1] + temp[pixel + 1] +
+             temp[pixel - width] + temp[pixel + width] +
+             temp[pixel - width - 1] + temp[pixel - width + 1] +
+             temp[pixel + width - 1] + temp[pixel + width + 1] +
+             temp[pixel]) / 9;
+          dest[pixel] = damp - (damp >> fluidity);
+        } else
+          dest[pixel] = 0;
       }
     break;
   case 2: case 3:
       }
     break;
   case 2: case 3:
@@ -714,21 +854,6 @@ ripple(int fluidity)
     break;
   }
   if (++count > 3) count = 0;
     break;
   }
   if (++count > 3) count = 0;
-#else
-  /* Rounder ripples, but with strange cross effect in center */
-  pixel = 1 * width + 1;
-  for (down = 1; down < height - 1; down++, pixel += 2 * 1)
-    for (across = 1; across < width - 1; across++, pixel++) {
-      int grad;
-      grad =
-        (src[pixel - 1] + src[pixel + 1] +
-         src[pixel - width] + src[pixel + width] +
-         src[pixel - width - 1] + src[pixel - width + 1] +
-         src[pixel + width - 1] + src[pixel + width + 1]) / 2;
-      dest[pixel] = grad/2 - dest[pixel];
-      dest[pixel] -= (dest[pixel] >> fluidity);
-    }
-#endif
 
   if (transparent)
     draw_transparent(dest);
 
   if (transparent)
     draw_transparent(dest);
@@ -792,39 +917,48 @@ void screenhack(Display *disp, Window win)
   int stir = get_boolean_resource("stir", "Boolean");
   int fluidity = get_integer_resource("fluidity", "Integer");
   transparent = get_boolean_resource("water", "Boolean");
   int stir = get_boolean_resource("stir", "Boolean");
   int fluidity = get_integer_resource("fluidity", "Integer");
   transparent = get_boolean_resource("water", "Boolean");
+#ifdef HAVE_XSHM_EXTENSION
   use_shm = get_boolean_resource("useSHM", "Boolean");
   use_shm = get_boolean_resource("useSHM", "Boolean");
+#endif /* HAVE_XSHM_EXTENSION */
   light = get_integer_resource("light", "Integer");
 
   if (fluidity <= 1) fluidity = 1;
   if (fluidity > 16) fluidity = 16; /* 16 = sizeof(short) */
   if (light < 0) light = 0;
 
   light = get_integer_resource("light", "Integer");
 
   if (fluidity <= 1) fluidity = 1;
   if (fluidity > 16) fluidity = 16; /* 16 = sizeof(short) */
   if (light < 0) light = 0;
 
-  { int i;
-  for (i = 0; i < TABLE; i++)
-    cos_tab[i] = cos(i * M_PI/2 / TABLE);
-  }
-
+  init_cos_tab();
   setup_X(disp, win);
 
   ncolors = get_integer_resource ("colors", "Colors");
   if (0 == ncolors)            /* English spelling? */
     ncolors = get_integer_resource ("colours", "Colors");
   setup_X(disp, win);
 
   ncolors = get_integer_resource ("colors", "Colors");
   if (0 == ncolors)            /* English spelling? */
     ncolors = get_integer_resource ("colours", "Colors");
+
+  if (ncolors > sizeof(ctab)/sizeof(*ctab))
+    ncolors = sizeof(ctab)/sizeof(*ctab);
+
   if (oily)
     init_oily_colors();
   else
     init_linear_colors();
 
   if (transparent && light > 0) {
   if (oily)
     init_oily_colors();
   else
     init_linear_colors();
 
   if (transparent && light > 0) {
-    bright = dobright;
+    int maxbits;
+    draw_transparent = draw_transparent_light;
     set_mask(visual->red_mask,   &rmask, &rshift);
     set_mask(visual->green_mask, &gmask, &gshift);
     set_mask(visual->blue_mask,  &bmask, &bshift);
     set_mask(visual->red_mask,   &rmask, &rshift);
     set_mask(visual->green_mask, &gmask, &gshift);
     set_mask(visual->blue_mask,  &bmask, &bshift);
-    if (rmask == 0) bright = nobright;
+    if (rmask == 0) draw_transparent = draw_transparent_vanilla;
+
+    /* Adjust the shift value "light" when we don't have 8 bits per colour */
+    maxbits = MIN(MIN(BITCOUNT(rmask), BITCOUNT(gmask)), BITCOUNT(bmask));
+    light -= 8-maxbits;
+    if (light < 0) light = 0;
   } else
   } else
-    bright = nobright;
+    draw_transparent = draw_transparent_vanilla;
 
   init_ripples(0, -SPLASH); /* Start off without any drops */
 
 
   init_ripples(0, -SPLASH); /* Start off without any drops */
 
+  /* Main drawing loop */
   while (1) {
     if (rate > 0 && (iterations % rate) == 0)
       add_drop(ripple_blob, -SPLASH);
   while (1) {
     if (rate > 0 && (iterations % rate) == 0)
       add_drop(ripple_blob, -SPLASH);
@@ -836,8 +970,6 @@ void screenhack(Display *disp, Window win)
     ripple(fluidity);
     DisplayImage();
 
     ripple(fluidity);
     DisplayImage();
 
-    XSync(display,False);
-    screenhack_handle_events(display);
     if (delay)
       usleep(delay);
 
     if (delay)
       usleep(delay);
 
index 786d24b4cc5ddf95a3f02eb4186c5c5fecedb0e8..9664f803f7ff25d7fc58c4bad700e2c3bc6bd545 100644 (file)
@@ -301,7 +301,16 @@ visual_warning (Screen *screen, Window window, Visual *visual, Colormap cmap,
 
   if (visual_string && *visual_string)
     {
 
   if (visual_string && *visual_string)
     {
-      if (visual != desired_visual)
+      char *s;
+      for (s = visual_string; *s; s++)
+        if (isupper (*s)) *s = _tolower (*s);
+
+      if (!strcmp (visual_string, "default") ||
+          !strcmp (visual_string, "default") ||
+          !strcmp (visual_string, "best"))
+        /* don't warn about these, just silently DWIM. */
+        ;
+      else if (visual != desired_visual)
         {
           fprintf (stderr, "%s: ignoring `-visual %s' because of `%s'.\n",
                    progname, visual_string, why);
         {
           fprintf (stderr, "%s: ignoring `-visual %s' because of `%s'.\n",
                    progname, visual_string, why);
@@ -486,6 +495,7 @@ main (int argc, char **argv)
                                    XtNcolormap, cmap,
                                    XtNbackground, (Pixel) bg,
                                    XtNborderColor, (Pixel) bd,
                                    XtNcolormap, cmap,
                                    XtNbackground, (Pixel) bg,
                                    XtNborderColor, (Pixel) bd,
+                                   XtNinput, True,  /* for WM_HINTS */
                                    0);
          XtDestroyWidget (toplevel);
          toplevel = new;
                                    0);
          XtDestroyWidget (toplevel);
          toplevel = new;
@@ -494,7 +504,10 @@ main (int argc, char **argv)
        }
       else
        {
        }
       else
        {
-         XtVaSetValues (toplevel, XtNmappedWhenManaged, False, 0);
+         XtVaSetValues (toplevel,
+                         XtNmappedWhenManaged, False,
+                         XtNinput, True,  /* for WM_HINTS */
+                         0);
          XtRealizeWidget (toplevel);
          window = XtWindow (toplevel);
 
          XtRealizeWidget (toplevel);
          window = XtWindow (toplevel);
 
@@ -551,7 +564,13 @@ main (int argc, char **argv)
     XIfEvent (dpy, &event, MapNotify_event_p, (XPointer) window);
 
   XSync (dpy, False);
     XIfEvent (dpy, &event, MapNotify_event_p, (XPointer) window);
 
   XSync (dpy, False);
-  srandom ((int) time ((time_t *) 0));
+
+  /* This is the one and only place that the random-number generator is
+     seeded in any screenhack.  You do not need to seed the RNG again,
+     it is done for you before your code is invoked. */
+# undef ya_rand_init
+  ya_rand_init ((int) time ((time_t *) 0));
+
   screenhack (dpy, window); /* doesn't return */
   return 0;
 }
   screenhack (dpy, window); /* doesn't return */
   return 0;
 }
index 587bb41615233e1fe29f05b4657cd9ea2122f087..0092da3be667ac34ce09b0502d8fc84f7e1eb032 100755 (executable)
@@ -27,7 +27,7 @@ require POSIX;
 use Fcntl ':flock'; # import LOCK_* constants
 
 
 use Fcntl ':flock'; # import LOCK_* constants
 
 
-my $version = q{ $Revision: 1.41 $ }; $version =~ s/^[^0-9]+([0-9.]+).*$/$1/;
+my $version = q{ $Revision: 1.42 $ }; $version =~ s/^[^0-9]+([0-9.]+).*$/$1/;
 my $copyright = "WebCollage $version, Copyright (c) 1999" .
     " Jamie Zawinski <jwz\@jwz.org>\n" .
     "            http://www.jwz.org/xscreensaver/\n";
 my $copyright = "WebCollage $version, Copyright (c) 1999" .
     " Jamie Zawinski <jwz\@jwz.org>\n" .
     "            http://www.jwz.org/xscreensaver/\n";
@@ -163,6 +163,9 @@ sub get_document_1 {
     $paddr   = sockaddr_in($port2, $iaddr);
 
 
     $paddr   = sockaddr_in($port2, $iaddr);
 
 
+    my $head = "";
+    my $body = "";
+
     @_ =
     eval {
         local $SIG{ALRM}  = sub {
     @_ =
     eval {
         local $SIG{ALRM}  = sub {
@@ -200,8 +203,6 @@ sub get_document_1 {
                  "\n");
         my $http = <S>;
 
                  "\n");
         my $http = <S>;
 
-        my $head = "";
-        my $body = "";
         while (<S>) {
             $head .= $_;
             last if m@^[\r\n]@;
         while (<S>) {
             $head .= $_;
             last if m@^[\r\n]@;
@@ -221,6 +222,8 @@ sub get_document_1 {
     die if ($@ && $@ ne "alarm\n");       # propagate errors
     if ($@) {
         # timed out
     die if ($@ && $@ ne "alarm\n");       # propagate errors
     if ($@) {
         # timed out
+        $head = undef;
+        $body = undef;
         return ();
     } else {
         # didn't
         return ();
     } else {
         # didn't
@@ -287,11 +290,13 @@ sub get_document {
                    print STDERR "$progname: too many redirects " .
                         "($max_loop_count) from $orig_url\n";
                }
                    print STDERR "$progname: too many redirects " .
                         "($max_loop_count) from $orig_url\n";
                }
+                $body = undef;
                 return ();
             }
 
         } elsif ( $http =~ m@HTTP/[0-9.]+ [4-9][0-9][0-9]@ ) {
             # http errors -- return nothing.
                 return ();
             }
 
         } elsif ( $http =~ m@HTTP/[0-9.]+ [4-9][0-9][0-9]@ ) {
             # http errors -- return nothing.
+            $body = undef;
             return ();
 
        } else {
             return ();
 
        } else {
@@ -374,6 +379,8 @@ sub pick_image_from_body {
                 " \"$url\": rejecting.\n";
         }
         $rejected_urls{$url} = -1;
                 " \"$url\": rejecting.\n";
         }
         $rejected_urls{$url} = -1;
+        $body = undef;
+        $_ = undef;
         return ();
     }
 
         return ();
     }
 
@@ -396,6 +403,8 @@ sub pick_image_from_body {
                             " length $L in $url: rejecting.\n";
                     }
                     $rejected_urls{$url} = $L;
                             " length $L in $url: rejecting.\n";
                     }
                     $rejected_urls{$url} = $L;
+                    $body = undef;
+                    $_ = undef;
                     return ();
                 } elsif ( $verbose > 2 ) {
                     print STDERR "$progname: keywords of length $L" .
                     return ();
                 } elsif ( $verbose > 2 ) {
                     print STDERR "$progname: keywords of length $L" .
@@ -494,6 +503,9 @@ sub pick_image_from_body {
        }
     }
 
        }
     }
 
+    $_ = undef;
+    $body = undef;
+
     if ( $#urls == 0 ) {
        if ( $verbose > 2 ) {
            print STDERR "$progname: no images on $base\n";
     if ( $#urls == 0 ) {
        if ( $verbose > 2 ) {
            print STDERR "$progname: no images on $base\n";
@@ -528,8 +540,12 @@ sub pick_from_url_randomizer {
 
     my ( $base, $body ) = get_document ($random_redirector, undef, $timeout);
 
 
     my ( $base, $body ) = get_document ($random_redirector, undef, $timeout);
 
-    return if (!$base || !$body);
+    if (!$base || !$body) {
+        $body = undef;
+        return;
+    }
     my $img = pick_image_from_body ($base, $body);
     my $img = pick_image_from_body ($base, $body);
+    $body = undef;
 
     if ($img) {
         return ($base, $img, "yahoo");
 
     if ($img) {
         return ($base, $img, "yahoo");
@@ -607,7 +623,10 @@ sub pick_from_image_randomizer {
     my ( $base, $body ) = get_document ($search_url, undef, $timeout);
     if (defined ($timeout)) {
         $timeout -= (time - $start);
     my ( $base, $body ) = get_document ($search_url, undef, $timeout);
     if (defined ($timeout)) {
         $timeout -= (time - $start);
-        return () if ($timeout <= 0);
+        if ($timeout <= 0) {
+            $body = undef;
+            return ();
+        }
     }
 
     return () if (! $body);
     }
 
     return () if (! $body);
@@ -691,6 +710,8 @@ sub pick_from_image_randomizer {
             print STDERR "$progname: found nothing on $base " .
                 "($length bytes, $href_count links).\n";
         }
             print STDERR "$progname: found nothing on $base " .
                 "($length bytes, $href_count links).\n";
         }
+        $body = undef;
+        $_ = undef;
        return ();
     }
 
        return ();
     }
 
@@ -703,12 +724,18 @@ sub pick_from_image_randomizer {
     }
 
 
     }
 
 
+    $body = undef;
+    $_ = undef;
 
     my ( $base2, $body2 ) = get_document ($subpage, $base, $timeout);
 
 
     my ( $base2, $body2 ) = get_document ($subpage, $base, $timeout);
 
-    return () if (!$base2 || !$body2);
+    if (!$base2 || !$body2) {
+        $body2 = undef;
+        return ();
+    }
 
     my $img = pick_image_from_body ($base2, $body2);
 
     my $img = pick_image_from_body ($base2, $body2);
+    $body2 = undef;
 
     if ($img) {
         return ($base2, $img,
 
     if ($img) {
         return ($base2, $img,
@@ -1007,12 +1034,14 @@ sub image_to_pnm {
             }
             kill ('TERM', $pid) if ($pid);
             $timed_out = 1;
             }
             kill ('TERM', $pid) if ($pid);
             $timed_out = 1;
+            $body = undef;
         };
 
         if (($pid = open(PIPE, "| $cmd2 > $output"))) {
             $timed_out = 0;
             alarm $cvt_timeout;
             print PIPE $body;
         };
 
         if (($pid = open(PIPE, "| $cmd2 > $output"))) {
             $timed_out = 0;
             alarm $cvt_timeout;
             print PIPE $body;
+            $body = undef;
             close PIPE;
 
             if ($verbose > 3) { print STDERR "$progname: awaiting $pid\n"; }
             close PIPE;
 
             if ($verbose > 3) { print STDERR "$progname: awaiting $pid\n"; }
@@ -1041,10 +1070,12 @@ sub image_to_pnm {
     die if ($@ && $@ ne "alarm\n");       # propagate errors
     if ($@) {
         # timed out
     die if ($@ && $@ ne "alarm\n");       # propagate errors
     if ($@) {
         # timed out
+        $body = undef;
         return ();
     } else {
         # didn't
         alarm 0;
         return ();
     } else {
         # didn't
         alarm 0;
+        $body = undef;
         return @_;
     }
 }
         return @_;
     }
 }
@@ -1156,6 +1187,7 @@ sub x_output {
         $cmd .= "pnmpaste - $x $y $image_ppm > $image_tmp1";
         open (IMG, "| $cmd") || die ("running $cmd: $!\n");
         print IMG $body;
         $cmd .= "pnmpaste - $x $y $image_ppm > $image_tmp1";
         open (IMG, "| $cmd") || die ("running $cmd: $!\n");
         print IMG $body;
+        $body = undef;
         close (IMG);
         if ($verbose > 1) {
             print STDERR "$progname: subproc exited normally.\n";
         close (IMG);
         if ($verbose > 1) {
             print STDERR "$progname: subproc exited normally.\n";
@@ -1170,6 +1202,7 @@ sub x_output {
             my ($headers, $body) = get_document ($img, $base);
             if ($body) {
                 handle_image ($base, $img, $body, $source);
             my ($headers, $body) = get_document ($img, $base);
             if ($body) {
                 handle_image ($base, $img, $body, $source);
+                $body = undef;
             }
         }
         unlink $image_tmp1, $image_tmp2;
             }
         }
         unlink $image_tmp1, $image_tmp2;
@@ -1185,6 +1218,7 @@ sub handle_image {
     }
 
     my ($iw, $ih) = image_to_pnm ($img, $body, $image_tmp1);
     }
 
     my ($iw, $ih) = image_to_pnm ($img, $body, $image_tmp1);
+    $body = undef;
     return 0 unless ($iw && $ih);
 
     my $ow = $iw;  # used only for error messages
     return 0 unless ($iw && $ih);
 
     my $ow = $iw;  # used only for error messages
@@ -1493,7 +1527,7 @@ sub main {
 
     if (!$root_p && !$no_output_p) {
         die "$copyright" .
 
     if (!$root_p && !$no_output_p) {
         die "$copyright" .
-            "$progname: the -root argument is manditory (for now.)\n";
+            "$progname: the -root argument is mandatory (for now.)\n";
     }
 
     if (!$no_output_p && !$ENV{DISPLAY}) {
     }
 
     if (!$no_output_p && !$ENV{DISPLAY}) {
index 62c2dc79341ae86e56659006d35d591b95ac1400..9927d6eee8c33c0449045bbe6dbf995bcae66734 100644 (file)
@@ -24,6 +24,8 @@
 
 #define countof(x) (sizeof((x))/sizeof(*(x)))
 
 
 #define countof(x) (sizeof((x))/sizeof(*(x)))
 
+#define MAX_COLORS (1L<<13)
+
 extern ModeSpecOpt xlockmore_opts[];
 extern const char *app_defaults;
 
 extern ModeSpecOpt xlockmore_opts[];
 extern const char *app_defaults;
 
@@ -249,8 +251,8 @@ xlockmore_screenhack (Display *dpy, Window window,
       mi.npixels = get_integer_resource ("ncolors", "Integer");
       if (mi.npixels <= 0)
        mi.npixels = 64;
       mi.npixels = get_integer_resource ("ncolors", "Integer");
       if (mi.npixels <= 0)
        mi.npixels = 64;
-      else if (mi.npixels > 256)
-       mi.npixels = 256;
+      else if (mi.npixels > MAX_COLORS)
+       mi.npixels = MAX_COLORS;
 
       mi.colors = (XColor *) calloc (mi.npixels, sizeof (*mi.colors));
 
 
       mi.colors = (XColor *) calloc (mi.npixels, sizeof (*mi.colors));
 
index b4cd5ba212d42f2c984656e8e45fbda792b42d1c..9f93758a14ca6acba21aa1cea45ab325d3f7af1f 100644 (file)
@@ -458,8 +458,10 @@ int main(int argc,char* argv[])
                signal(sig_Number,xsublim_Sig_Catch);
        }
 
                signal(sig_Number,xsublim_Sig_Catch);
        }
 
-       /* Randomize */
-       srandom((int)time((time_t*)0));
+       /* Randomize -- only need to do this here because this program
+           doesn't use the `screenhack.h' or `lockmore.h' APIs. */
+# undef ya_rand_init
+        ya_rand_init ((int) time ((time_t *) 0));
 
        /* Handle all the X nonsense */
 #if defined(__sgi)
 
        /* Handle all the X nonsense */
 #if defined(__sgi)
index e061b98b97609ddc0f5cafcc9bfd0c76ba329a1d..b236ff42d73123b846628d115e86819b76b9e9eb 100644 (file)
@@ -1,2 +1,2 @@
 static const char screensaver_id[] =
 static const char screensaver_id[] =
-       "@(#)xscreensaver 3.20 (12-Nov-99), by Jamie Zawinski (jwz@jwz.org)";
+       "@(#)xscreensaver 3.21 (17-Nov-99), by Jamie Zawinski (jwz@jwz.org)";
index 1bf4942126cd264802fe8392e8f3f32ff92189a3..57b73151c53f6a4cd7a7c3611c08f389520bb573 100644 (file)
@@ -135,7 +135,7 @@ get_visual (Screen *screen, const char *string, Bool prefer_writable_cells,
       if (visual)
        result = visual;
       else if (verbose_p)
       if (visual)
        result = visual;
       else if (verbose_p)
-       fprintf (stderr, "%s: no visual suitable for GL.\n", progname, v);
+       fprintf (stderr, "%s: no visual suitable for GL.\n", progname);
     }
   else if (vclass == SPECIFIC_VISUAL)
     {
     }
   else if (vclass == SPECIFIC_VISUAL)
     {
@@ -326,7 +326,7 @@ pick_best_gl_visual (Screen *screen)
         result = vi_out[0].visual;
     }
 
         result = vi_out[0].visual;
     }
 
-  if (result)
+  if (!result)
     /* No half-depth TrueColor?  Ok, try for any TrueColor (the deepest.) */
     result = pick_best_visual_of_class (screen, TrueColor);
 
     /* No half-depth TrueColor?  Ok, try for any TrueColor (the deepest.) */
     result = pick_best_visual_of_class (screen, TrueColor);
 
index 63958e24700b35bdff62cda8af9a7f34d50cdb26..3d24943e0e9a3d960fa6264341999f6128712f3e 100644 (file)
@@ -51,6 +51,7 @@
 #include <sys/time.h> /* for gettimeofday() */
 
 #include "yarandom.h"
 #include <sys/time.h> /* for gettimeofday() */
 
 #include "yarandom.h"
+# undef ya_rand_init
 
 
 /* The following 'random' numbers are taken from CRC, 18th Edition, page 622.
 
 
 /* The following 'random' numbers are taken from CRC, 18th Edition, page 622.
index abea226dc4c3fb0c5d0d7ddb0ee8b337467bd509..0e1dfcfb7619112ea1d7d21b233062488800b1ce 100644 (file)
 # include "vms-gtod.h"
 #endif
 
 # include "vms-gtod.h"
 #endif
 
+extern unsigned int ya_random (void);
+extern void ya_rand_init (unsigned int);
+
 #define random()   ya_random()
 #define random()   ya_random()
-#define srandom(i) ya_rand_init(0)
 #define RAND_MAX   0x7FFFFFFF
 
 #define RAND_MAX   0x7FFFFFFF
 
-extern unsigned int ya_random (void);
-extern void ya_rand_init (unsigned int);
+/*#define srandom(i) ya_rand_init(0)*/
+
+/* Define these away to keep people from using the wrong APIs in xscreensaver.
+ */
+#define rand          __ERROR_use_random_not_rand_in_xscreensaver__
+#define drand48       __ERROR_use_random_not_drand48_in_xscreensaver__
+#define srandom       __ERROR_do_not_call_srandom_in_xscreensaver__
+#define srand         __ERROR_do_not_call_srand_in_xscreensaver__
+#define srand48       __ERROR_do_not_call_srand48_in_xscreensaver__
+#define ya_rand_init  __ERROR_do_not_call_ya_rand_init_in_xscreensaver__
 
 
 #if defined (__GNUC__) && (__GNUC__ >= 2)
 
 
 #if defined (__GNUC__) && (__GNUC__ >= 2)
index 89eb4b6ac6dc30bbd4f9491d3e8f2fbf623fc5ec..7b8c1172aba998d1febbb09ce68be05a38fdad65 100644 (file)
@@ -1,7 +1,7 @@
 Begin3
 Title:          xscreensaver
 Begin3
 Title:          xscreensaver
-Version:        3.20
-Entered-date:   12NOV99
+Version:        3.21
+Entered-date:   18NOV99
 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.
 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/
 Author:         jwz@jwz.org (Jamie Zawinski)
 Maintained-by:  jwz@jwz.org (Jamie Zawinski)
 Primary-site:   http://www.jwz.org/xscreensaver/
-                1257K xscreensaver-3.20.tar.gz
-                38K  xscreensaver.README
+                1261K xscreensaver-3.21.tar.gz
+                39K  xscreensaver.README
                 1K   xscreensaver.lsm
 Alternate-site: sunsite.unc.edu /pub/Linux/X11/screensavers/
                 1K   xscreensaver.lsm
 Alternate-site: sunsite.unc.edu /pub/Linux/X11/screensavers/
-                1257K xscreensaver-3.20.tar.gz
-                38K  xscreensaver.README
+                1261K xscreensaver-3.21.tar.gz
+                39K  xscreensaver.README
                 1K   xscreensaver.lsm
 Alternate-site: ftp.x.org /contrib/applications/
                 1K   xscreensaver.lsm
 Alternate-site: ftp.x.org /contrib/applications/
-                1257K xscreensaver-3.20.tar.gz
-                38K  xscreensaver.README
+                1261K xscreensaver-3.21.tar.gz
+                39K  xscreensaver.README
                 1K   xscreensaver.lsm
 Platforms:      Linux, Irix, SunOS, Solaris, HPUX, AIX, FreeBSD, NetBSD,
                 BSDI, SCO, OSF1, Ultrix, VMS.
                 1K   xscreensaver.lsm
 Platforms:      Linux, Irix, SunOS, Solaris, HPUX, AIX, FreeBSD, NetBSD,
                 BSDI, SCO, OSF1, Ultrix, VMS.
index 63a1ad84dc40a52477c2be47104772798e63a81a..82f719f0c933bca88d2b28f63c4f6b0459fc47c7 100644 (file)
-Name: xscreensaver
-Summary: X screen saver and locker
-Vendor: Jamie Zawinski <jwz@jwz.org>
-Version: 3.20
-Release: 1
-URL: http://www.jwz.org/xscreensaver/
-Source: xscreensaver-%{version}.tar.gz
-Copyright: BSD
-Group: X11/Utilities
-Buildroot: /var/tmp/xscreensaver-root
+%define        name    xscreensaver
+%define        version 3.21
+%define        release 1
+%define        serial  1
+%define        prefix  /usr/X11R6
+
+# By default, builds the basic, non-GL package.
+# To build both the basic and GL-add-on packages:
+#   rpm --define "USE_GL yes" ...
+
+Summary:       X screen saver and locker
+Name:          %{name}
+Version:       %{version}
+Release:       %{release}
+Serial:                %{serial}
+Group:         Amusements/Graphics
+Copyright:     BSD
+URL:           http://www.jwz.org/xscreensaver
+Vendor:                Jamie Zawinski <jwz@jwz.org>
+Source:                %{name}-%{version}.tar.gz
+Buildroot:     /var/tmp/%{name}-%{version}-root
 
 %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.
 More than 100 display modes are included in this package.
 
 %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.
 More than 100 display modes are included in this package.
+%{?USE_GL:See also the xscreensaver-gl package, which}
+%{?USE_GL:includes optional OpenGL display modes.}
+
+%{?USE_GL:%package gl}
+%{?USE_GL:Group:       Amusements/Graphics}
+%{?USE_GL:Requires:    xscreensaver = %{version}}
+%{?USE_GL:Summary:     A set of GL screensavers}
+%{?USE_GL:%description gl}
+%{?USE_GL:The xscreensaver-gl package contains even more screensavers for your}
+%{?USE_GL:mind-numbing, ambition-eroding, time-wasting, hypnotized viewing}
+%{?USE_GL:pleasure. These screensavers require OpenGL or Mesa support.}
+%{?USE_GL: }
+%{?USE_GL:Install the xscreensaver-gl package if you need more screensavers}
+%{?USE_GL:for use with the X Window System and you have OpenGL or Mesa}
+%{?USE_GL:installed.}
 
 %prep
 
 %prep
-
 %setup -q
 
 %build
 %setup -q
 
 %build
+RPMOPTS=""
+
+# Is this really needed?  If so, why?
+# %ifarch alpha
+#  RPMOPTS="$RPMOPTS --without-xshm-ext"
+# %endif
+
+# On Solaris, build without PAM and with Shadow.
+# On other systems, build with PAM and without Shadow.
+#
+%ifos solaris
+ RPMOPTS="$RPMOPTS --without-pam"
+%else
+ RPMOPTS="$RPMOPTS --with-pam --without-shadow"
+%endif
+
+%{?USE_GL:RPMOPTS="$RPMOPTS --with-gl"}
+%{!?USE_GL:RPMOPTS="$RPMOPTS --without-gl"}
 
 
-./configure --prefix=/usr/X11R6 \
-     --enable-subdir=/usr/X11R6/lib/xscreensaver
-make all
+CFLAGS="$RPM_OPT_FLAGS" \
+ ./configure --prefix=%{prefix} \
+             --enable-subdir=../lib/xscreensaver \
+             $RPMOPTS
+
+make
 
 %install
 
 
 %install
 
-# This is the only directory that "make install" won't make as needed
+# This is a directory that "make install" won't make as needed
 # (since Linux uses /etc/pam.d/* and Solaris uses /etc/pam.conf).
 #
 mkdir -p $RPM_BUILD_ROOT/etc/pam.d
 
 # (since Linux uses /etc/pam.d/* and Solaris uses /etc/pam.conf).
 #
 mkdir -p $RPM_BUILD_ROOT/etc/pam.d
 
-make  prefix=$RPM_BUILD_ROOT/usr/X11R6 \
-      AD_DIR=$RPM_BUILD_ROOT/usr/X11R6/lib/X11/app-defaults \
-     HACKDIR=$RPM_BUILD_ROOT/usr/X11R6/lib/xscreensaver \
-     PAM_DIR=$RPM_BUILD_ROOT/etc/pam.d \
-     install-strip
+# This is another (since "make install" doesn't try to install
+# the xscreensaver.kss file unless $KDEDIR is set.)
+#
+if [ -z "$KDEDIR" ]; then export KDEDIR=/usr; fi
+mkdir -p $RPM_BUILD_ROOT$KDEDIR/bin
+
+make  install_prefix=$RPM_BUILD_ROOT \
+      AD_DIR=%{prefix}/lib/X11/app-defaults \
+      install-strip
+
+# Make a pair of lists, of the GL and non-GL hacks.
+# Do this by parsing the output of a dummy run of "make install"
+# in the hacks/ and hacks/glx/ directories.
+#
+list_files() {
+  make -s install_prefix=$RPM_BUILD_ROOT INSTALL=true install   |
+    sed -n -e 's@.* /\([^ ]*\)$@/\1@p'                          |
+    sed    -e "s@^$RPM_BUILD_ROOT@@"                            \
+           -e "s@/bin/..@@"                                     |
+    sort
+}
+
+( cd hacks ; list_files > $RPM_BUILD_DIR/xscreensaver-%{version}/hacks-non-gl )
+( cd hacks/glx ; list_files > $RPM_BUILD_DIR/xscreensaver-%{version}/hacks-gl )
+
+
 
 # This line is redundant, except that it causes the "xscreensaver"
 # executable to be installed unstripped (while all others are stripped.)
 # You should install it this way so that jwz gets useful bug reports.
 #
 
 # This line is redundant, except that it causes the "xscreensaver"
 # executable to be installed unstripped (while all others are stripped.)
 # You should install it this way so that jwz gets useful bug reports.
 #
-install -m 4755 driver/xscreensaver $RPM_BUILD_ROOT/usr/X11R6/bin
+install -m 4755 driver/xscreensaver $RPM_BUILD_ROOT%{prefix}/bin
 
 # Even if we weren't compiled with PAM support, make sure to include
 # the PAM module file in the RPM anyway, just in case.
 #
 
 # Even if we weren't compiled with PAM support, make sure to include
 # the PAM module file in the RPM anyway, just in case.
 #
-( cd driver; make PAM_DIR=$RPM_BUILD_ROOT/etc/pam.d install-pam )
-
-# If we built multiple versions of xscreensaver-demo (because multiple
-# toolkits were available) then install them all.
-#
-( cd driver;
-  exes=`echo xscreensaver-demo-*`
-  count=`echo $exes | wc -w`
-  if [ $count -gt 1 ]; then
-    for exe in $exes; do
-      install -c -s $exe $RPM_BUILD_ROOT/usr/X11R6/bin
-    done
-    cd $RPM_BUILD_ROOT/usr/X11R6/bin
-    if [ -x xscreensaver-demo-Xaw   ]; then target=Xaw;   fi
-    if [ -x xscreensaver-demo-Xaw3d ]; then target=Xaw3d; fi
-    if [ -x xscreensaver-demo-Xm    ]; then target=Xm;    fi
-    if [ -x xscreensaver-demo-Gtk   ]; then target=Gtk;   fi
-    rm -f xscreensaver-demo
-    ln -s xscreensaver-demo-$target xscreensaver-demo
-  fi
- )
-
+( cd driver ;
+  make install_prefix=$RPM_BUILD_ROOT PAM_DIR=/etc/pam.d install-pam )
 
 # This is for wmconfig, a tool that generates init files for window managers.
 #
 
 # This is for wmconfig, a tool that generates init files for window managers.
 #
@@ -95,16 +142,24 @@ EOF
 chmod -R a+r,u+w,og-w $RPM_BUILD_ROOT
 
 %clean
 chmod -R a+r,u+w,og-w $RPM_BUILD_ROOT
 
 %clean
-rm -rf $RPM_BUILD_ROOT
+if [ -d $RPM_BUILD_ROOT    ]; then rm -r $RPM_BUILD_ROOT    ; fi
+if [ -d $RPM_BUILD_ROOT-gl ]; then rm -r $RPM_BUILD_ROOT-gl ; fi
 
 
-%files
+%files -f hacks-non-gl
 %defattr(-,root,root)
 
 %defattr(-,root,root)
 
+# Files for the "xscreensaver" package:
+#
 %doc                README README.debugging
 %doc                README README.debugging
-                    /usr/X11R6/bin/*
-                    /usr/X11R6/lib/xscreensaver/*
-%config             /usr/X11R6/lib/X11/app-defaults/*
-                    /usr/X11R6/man/man1/*
+                    %{prefix}/bin/*
+%dir                %{prefix}/lib/xscreensaver
+%config             %{prefix}/lib/X11/app-defaults/*
+                    %{prefix}/man/man1/xscreensaver*
                     /etc/pam.d/*
                     /etc/pam.d/*
+%config(missingok)  /usr/bin/*.kss
 %config(missingok)  /etc/X11/wmconfig/*
 %config(missingok)  "/usr/share/apps/Amusements/Screen Savers/*"
 %config(missingok)  /etc/X11/wmconfig/*
 %config(missingok)  "/usr/share/apps/Amusements/Screen Savers/*"
+
+# Files for the "xscreensaver-gl" package:
+#
+%{?USE_GL:%files -f hacks-gl gl}