ftp://ftp.uni-heidelberg.de/pub/X11/contrib/applications/xscreensaver-1.25.tar.Z
authorZygo Blaxell <zblaxell@hungrycats.org>
Mon, 2 Mar 2009 05:42:19 +0000 (00:42 -0500)
committerZygo Blaxell <zblaxell@hungrycats.org>
Mon, 2 Mar 2009 05:42:19 +0000 (00:42 -0500)
-rw-r--r-- 1 zblaxell zblaxell 235135 Feb 27 13:23 xscreensaver-1.25.tar.Z
c40dcc1d24e05e1cdab15d2c4142f43d471db7b9  xscreensaver-1.25.tar.Z

214 files changed:
Imakefile [new file with mode: 0644]
README [new file with mode: 0644]
aaa_vms.notes [deleted file]
config.h [new file with mode: 0644]
driver/.gdbinit [changed mode: 0755->0644]
driver/Imakefile [new file with mode: 0644]
driver/README [new file with mode: 0644]
driver/XScreenSaver.ad [new file with mode: 0644]
driver/ad2c [deleted file]
driver/axpobjs.zip [deleted file]
driver/compile.com [deleted file]
driver/compile_axp.com [deleted file]
driver/compile_decc.com [deleted file]
driver/config.h [deleted file]
driver/demo.c [changed mode: 0755->0644]
driver/dialogs.c [changed mode: 0755->0644]
driver/dialogs.xd [changed mode: 0755->0644]
driver/getpwnam.c [deleted file]
driver/hpwd.c [deleted file]
driver/imakefile [deleted file]
driver/link.com [deleted file]
driver/link_axp.com [deleted file]
driver/link_decc.com [deleted file]
driver/lock.c [changed mode: 0755->0644]
driver/pwd.h [deleted file]
driver/readme [deleted file]
driver/resource.h [deleted file]
driver/stderr.c [new file with mode: 0644]
driver/subprocs.c [changed mode: 0755->0644]
driver/timers.c [changed mode: 0755->0644]
driver/validate.c [deleted file]
driver/vaxdeccobjs.zip [deleted file]
driver/vaxobjs.zip [deleted file]
driver/version.h [deleted file]
driver/visual.c [deleted file]
driver/vms.opt [deleted file]
driver/vms_axp.opt [deleted file]
driver/vms_decc.opt [deleted file]
driver/wait.h [deleted file]
driver/windows.c [changed mode: 0755->0644]
driver/xscreensaver-command.c [changed mode: 0755->0644]
driver/xscreensaver-command.exe_axp [deleted file]
driver/xscreensaver-command.exe_vax [deleted file]
driver/xscreensaver-command.hlp [deleted file]
driver/xscreensaver-command.man [changed mode: 0755->0644]
driver/xscreensaver.ad [deleted file]
driver/xscreensaver.c [changed mode: 0755->0644]
driver/xscreensaver.dat [deleted file]
driver/xscreensaver.exe_axp [deleted file]
driver/xscreensaver.exe_vax [deleted file]
driver/xscreensaver.h [changed mode: 0755->0644]
driver/xscreensaver.hlp [deleted file]
driver/xscreensaver.man [changed mode: 0755->0644]
driver/xscreensaver_ad.h [deleted file]
hacks/.gdbinit [changed mode: 0755->0644]
hacks/Imakefile [new file with mode: 0644]
hacks/README [new file with mode: 0644]
hacks/aaa_vms.notes [deleted file]
hacks/attraction.c [changed mode: 0755->0644]
hacks/attraction.exe_axp [deleted file]
hacks/attraction.exe_vax [deleted file]
hacks/attraction.hlp [deleted file]
hacks/attraction.man [changed mode: 0755->0644]
hacks/axpobjs.zip [deleted file]
hacks/blitspin.c [changed mode: 0755->0644]
hacks/blitspin.exe_axp [deleted file]
hacks/blitspin.exe_vax [deleted file]
hacks/blitspin.hlp [deleted file]
hacks/blitspin.man [changed mode: 0755->0644]
hacks/compile.com [deleted file]
hacks/compile_axp.com [deleted file]
hacks/compile_decc.com [deleted file]
hacks/decayscreen.c [changed mode: 0755->0644]
hacks/decayscreen.exe_axp [deleted file]
hacks/decayscreen.exe_vax [deleted file]
hacks/decayscreen.hlp [deleted file]
hacks/decayscreen.man [changed mode: 0755->0644]
hacks/default.xbm [changed mode: 0755->0644]
hacks/flame.c [changed mode: 0755->0644]
hacks/flame.exe_axp [deleted file]
hacks/flame.exe_vax [deleted file]
hacks/flame.hlp [deleted file]
hacks/flame.man [changed mode: 0755->0644]
hacks/greynetic.c [changed mode: 0755->0644]
hacks/greynetic.exe_axp [deleted file]
hacks/greynetic.exe_vax [deleted file]
hacks/greynetic.hlp [deleted file]
hacks/greynetic.man [changed mode: 0755->0644]
hacks/halo.c [changed mode: 0755->0644]
hacks/halo.exe_axp [deleted file]
hacks/halo.exe_vax [deleted file]
hacks/halo.hlp [deleted file]
hacks/halo.man [changed mode: 0755->0644]
hacks/helix.c [changed mode: 0755->0644]
hacks/helix.exe_axp [deleted file]
hacks/helix.exe_vax [deleted file]
hacks/helix.hlp [deleted file]
hacks/helix.man [changed mode: 0755->0644]
hacks/hopalong.c [changed mode: 0755->0644]
hacks/hopalong.exe_axp [deleted file]
hacks/hopalong.exe_vax [deleted file]
hacks/hopalong.hlp [deleted file]
hacks/hopalong.man [changed mode: 0755->0644]
hacks/hypercube.c [changed mode: 0755->0644]
hacks/hypercube.exe_axp [deleted file]
hacks/hypercube.exe_vax [deleted file]
hacks/hypercube.hlp [deleted file]
hacks/hypercube.man [changed mode: 0755->0644]
hacks/imakefile [deleted file]
hacks/imsmap.c [changed mode: 0755->0644]
hacks/imsmap.exe_axp [deleted file]
hacks/imsmap.exe_vax [deleted file]
hacks/imsmap.hlp [deleted file]
hacks/imsmap.man [changed mode: 0755->0644]
hacks/link.com [deleted file]
hacks/link_axp.com [deleted file]
hacks/link_decc.com [deleted file]
hacks/maze.c [changed mode: 0755->0644]
hacks/maze.exe_axp [deleted file]
hacks/maze.exe_vax [deleted file]
hacks/maze.hlp [deleted file]
hacks/maze.man [changed mode: 0755->0644]
hacks/noseguy.c [changed mode: 0755->0644]
hacks/noseguy.exe_axp [deleted file]
hacks/noseguy.exe_vax [deleted file]
hacks/noseguy.hlp [deleted file]
hacks/noseguy.man [changed mode: 0755->0644]
hacks/noses/CVS/Entries [new file with mode: 0644]
hacks/noses/CVS/Repository [new file with mode: 0644]
hacks/noses/cvs/entries [deleted file]
hacks/noses/cvs/repository [deleted file]
hacks/noses/nose.0.left [new file with mode: 0644]
hacks/noses/nose.0.right [new file with mode: 0644]
hacks/noses/nose.0_left [deleted file]
hacks/noses/nose.0_right [deleted file]
hacks/noses/nose.1.left [new file with mode: 0644]
hacks/noses/nose.1.right [new file with mode: 0644]
hacks/noses/nose.1_left [deleted file]
hacks/noses/nose.1_right [deleted file]
hacks/noses/nose.down [changed mode: 0755->0644]
hacks/noses/nose.front [changed mode: 0755->0644]
hacks/noses/nose.left.front [new file with mode: 0644]
hacks/noses/nose.left_front [deleted file]
hacks/noses/nose.right.front [new file with mode: 0644]
hacks/noses/nose.right_front [deleted file]
hacks/pedal.c [new file with mode: 0644]
hacks/pedal.man [new file with mode: 0644]
hacks/pyro.c [changed mode: 0755->0644]
hacks/pyro.exe_axp [deleted file]
hacks/pyro.exe_vax [deleted file]
hacks/pyro.hlp [deleted file]
hacks/pyro.man [changed mode: 0755->0644]
hacks/qix.c [changed mode: 0755->0644]
hacks/qix.exe_axp [deleted file]
hacks/qix.exe_vax [deleted file]
hacks/qix.hlp [deleted file]
hacks/qix.man [changed mode: 0755->0644]
hacks/readme [deleted file]
hacks/rocks.c [changed mode: 0755->0644]
hacks/rocks.exe_axp [deleted file]
hacks/rocks.exe_vax [deleted file]
hacks/rocks.hlp [deleted file]
hacks/rocks.man [changed mode: 0755->0644]
hacks/rorschach.c [changed mode: 0755->0644]
hacks/rorschach.exe_axp [deleted file]
hacks/rorschach.exe_vax [deleted file]
hacks/rorschach.hlp [deleted file]
hacks/rorschach.man [changed mode: 0755->0644]
hacks/screenhack.c [changed mode: 0755->0644]
hacks/screenhack.h [changed mode: 0755->0644]
hacks/slidescreen.c [changed mode: 0755->0644]
hacks/slidescreen.exe_axp [deleted file]
hacks/slidescreen.exe_vax [deleted file]
hacks/slidescreen.hlp [deleted file]
hacks/slidescreen.man [changed mode: 0755->0644]
hacks/spline.h [deleted file]
hacks/vaxdeccobjs.zip [deleted file]
hacks/vaxobjs.zip [deleted file]
hacks/version.h [deleted file]
hacks/vms.opt [deleted file]
hacks/vms_axp.opt [deleted file]
hacks/vms_decc.opt [deleted file]
hacks/vroot.h [changed mode: 0755->0644]
hacks/xlock.h [changed mode: 0755->0644]
hacks/xroger-hack.c [changed mode: 0755->0644]
hacks/xroger.exe_axp [deleted file]
hacks/xroger.exe_vax [deleted file]
hacks/xroger.hlp [deleted file]
hacks/xroger.man [changed mode: 0755->0644]
imakefile [deleted file]
readme [deleted file]
screenblank.txt [changed mode: 0755->0644]
setup.com [deleted file]
utils/Imakefile [new file with mode: 0644]
utils/README [new file with mode: 0644]
utils/compile.com [deleted file]
utils/compile_axp.com [deleted file]
utils/compile_decc.com [deleted file]
utils/fade.c [changed mode: 0755->0644]
utils/grabscreen.c [changed mode: 0755->0644]
utils/hsv.c [changed mode: 0755->0644]
utils/imakefile [deleted file]
utils/readme [deleted file]
utils/resources.c [changed mode: 0755->0644]
utils/spline.c [changed mode: 0755->0644]
utils/spline.h [changed mode: 0755->0644]
utils/strings.c [deleted file]
utils/usleep.c [changed mode: 0755->0644]
utils/utils.olb [deleted file]
utils/utils.olb_axp [deleted file]
utils/utils.olb_decc [deleted file]
utils/version.h [changed mode: 0755->0644]
utils/visual.c [new file with mode: 0644]
utils/xroger.c [changed mode: 0755->0644]

diff --git a/Imakefile b/Imakefile
new file mode 100644 (file)
index 0000000..d7ec7c6
--- /dev/null
+++ b/Imakefile
@@ -0,0 +1,53 @@
+/*
+ * Imakefile file for xscreensaver, Copyright (c) 1991-1994 Jamie Zawinski.
+ *
+ * You should not need to edit this file; edit config.h instead.
+ *
+ */
+
+#include "config.h"
+
+       TARFILES = README Imakefile config.h screenblank.txt
+            TAR = tar
+       COMPRESS = compress
+   COMPRESS_EXT = Z
+/**/#      COMPRESS = gzip --verbose --best
+/**/#  COMPRESS_EXT = gz
+
+all:: utils/Makefile driver/Makefile hacks/Makefile
+       cd utils  ; $(MAKE) $@ CC="$(CC)" CCOPTIONS="$(CCOPTIONS)" CDEBUGFLAGS="$(CDEBUGFLAGS)"
+       cd driver ; $(MAKE) $@ CC="$(CC)" CCOPTIONS="$(CCOPTIONS)" CDEBUGFLAGS="$(CDEBUGFLAGS)"
+       cd hacks  ; $(MAKE) $@ CC="$(CC)" CCOPTIONS="$(CCOPTIONS)" CDEBUGFLAGS="$(CDEBUGFLAGS)"
+
+clean install install.man:: utils/Makefile driver/Makefile hacks/Makefile
+       cd utils  ; $(MAKE) $@ BINDIR=$(BINDIR) XAPPLOADDIR=$(XAPPLOADDIR)
+       cd driver ; $(MAKE) $@ BINDIR=$(BINDIR) XAPPLOADDIR=$(XAPPLOADDIR)
+       cd hacks  ; $(MAKE) $@ BINDIR=$(BINDIR) XAPPLOADDIR=$(XAPPLOADDIR)
+
+Makefiles:: utils/Makefile driver/Makefile hacks/Makefile
+
+utils/Makefile: utils/Imakefile config.h
+       cd utils  ; $(IMAKE_CMD) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT_DIR)/utils
+driver/Makefile: driver/Imakefile config.h
+       cd driver ; $(IMAKE_CMD) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT_DIR)/driver
+hacks/Makefile: hacks/Imakefile config.h
+       cd hacks  ; $(IMAKE_CMD) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT_DIR)/hacks
+
+/* This really makes me sick... */
+tar: utils/Makefile driver/Makefile hacks/Makefile
+       @NAME=`sed -n                                                       \
+  's/[^0-9]*\([0-9]\.[0-9][0-9]*\).*/xscreensaver-\1/p' utils/version.h` ;  \
+  rm -f $$NAME ; ln -s . $$NAME ;                                          \
+  FILES= ;                                                                 \
+  for subdir in driver utils hacks ; do                                            \
+    cd $$subdir ;                                                          \
+    FILES="$$FILES `make echo_tarfiles                                     \
+      | grep -v '^make\['                                                  \
+      | sed \"s|^|$$subdir/|g;s| | $$subdir/|g\"                           \
+      ` ";                                                                 \
+    cd .. ; done ;                                                         \
+  echo creating tar file $${NAME}.tar.$(COMPRESS_EXT)... ;                 \
+  $(TAR) -vchf -                                                           \
+    `echo $(TARFILES) $$FILES | sed "s|^|$$NAME/|g; s| | $$NAME/|g" `      \
+   | $(COMPRESS) > $${NAME}.tar.$(COMPRESS_EXT) ;                          \
+  rm $$NAME
diff --git a/README b/README
new file mode 100644 (file)
index 0000000..8470574
--- /dev/null
+++ b/README
@@ -0,0 +1,129 @@
+
+To build:
+
+  -  read the comments in `config.h' and edit it as appropriate
+  -  xmkmf ; make
+  -  make install install.man
+
+The xscreensaver program waits until the keyboard and mouse have been idle
+for a period, and then runs a graphics demo chosen at random.  It turns off
+as soon as there is any mouse or keyboard activity.
+
+The purpose of xscreensaver is to display pretty pictures on your screen 
+when it is not in use, in keeping with the philosophy that unattended 
+monitors should always be doing something interesting, just like they do 
+in the movies.
+
+However, xscreensaver can also be used as a screen locker, to prevent
+others from using your terminal while your are away.
+
+The benefit that this program has over the combination of the xlock and
+xautolock programs is the ease with which new graphics hacks can be
+installed: you don't need to recompile this program to add a new display
+mode, you just change some resource settings.  Any program which can be
+invoked in such a way that it draws on the root window of the screen can
+now be used as a screensaver without modification.  The programs that
+are being run as screensavers don't need to have any special knowledge
+about what it means to be a screensaver.
+
+The XIDLE or MIT-SCREEN-SAVER server extensions will be used if you have
+them (win win.)
+
+Unfortunately, locking doesn't work if you don't have Motif.
+
+Also included are several graphics hacks for use as screensavers.  There's
+nothing magic about these: they're just programs that draw on the root
+window, which are pointed at by the screensaver's default resource settings.
+
+   qix         - My own implementation of this, with many more options
+                 than you would have thought qix could have.
+   helix       - Generates spirally "stringart" patterns.
+   pedal       - Draws a different kind of spirally pattern.
+   rorschach   - Random inkblot patterns.
+   attraction  - A bouncing ball demo, or a qix-like demo, or a wild
+                 color-cycling thing, with some odd rules.
+   greynetic   - Random colored/stippled rectangles.
+   rocks       - Flying through an asteroid field.
+   blitspin    - Rotate a bitmap using bitblts.
+   imsmap      - Generates random maps or cloud formations.
+   hypercube   - 2d projection of a hypercube rotating on all four axes.
+   slidescreen - Divides the screen into a grid and plays a 16-puzzle on it.
+   decayscreen - A melting effect.
+   halo                - Random circular patterns.
+   pyro                - Fireworks.  Looks a lot like the version in xlock.
+   hopalong    - Fractals.  I snarfed this code from xlock.
+   flame       - Fractals.  Also from xlock.
+   noseguy     - A guy with a big nose wanders around the screen saying
+                 things.  I snarfed this code from xnlock.
+   maze                - This is the X maze demo modified to take a -root option
+                 so that it works with xscreensaver.
+
+All of these will pop up their own window unless given that -root option.
+See their man pages for more details.
+
+Other reasonable things to use as screensavers, if you have them, are
+
+  xdaliclock -root -builtin2   - melting digital clock
+  xswarm -r 2>&-               - swimming sperm
+  xwave -root                  - random 3d graphs
+  xbouncebits                  - bounce arbitrary bitmaps around
+  ico -r                       - it's dull, but it's there
+  xv -root file.gif -quit      - they don't all have to animate!
+  xsplinefun                   - bouncing splines
+  kaleid -root                 - qix-like kaleidescope patterns
+  xfishtank -c black -d -r 1   - fish (use version 2.0 or later)
+
+You can get all of these from the contrib directory on ftp.x.org.  If you
+know of (or write) any other interesting programs that can be used as
+screensavers, please let me know!
+
+This program should be updated to take advantage of the new R6 `screensaver'
+server extension instead of XIdle.  I didn't have time to do this before the
+deadline for the R6 contrib tape, but by the time you read this, maybe it's
+done - check a later release.
+
+The latest version of xscreensaver is on FTP.X.ORG.
+
+       -- Jamie Zawinski <jwz@mcom.com>
+
+\f
+Changes since 1.24:    Made it capture the stdout/stderr of its subprocesses
+                       and present them on the screensaver window itself.
+                       Made demo mode work correctly with non-default visuals
+                       and color maps, instead of always using the defaults.
+                       Added -visual argument to all included screenhacks.
+                       Support for the R6 MIT-SCREEN-SAVER server extension.
+                       Made the demo mode list scroll properly.
+                       Added `pedal' hack.
+Changes since 1.23:    Fixed some private-colormap oddities in slidescreen,
+                       decayscreen, and xroger.  Fixed apparent conservation-
+                       of-mass problem in pyro; made the shrapnel round.
+Changes since 1.22:    Minor tweaks for IRIX5; fixed locking race condition.
+Changes since 1.21:    Minor tweaks for X11R6.
+                       Fixes for non-default visuals.
+Changes since 1.20:    Fixed bug in color blitspin; added default image.
+                       Added diagnostics to noseguy.  Fixed off-by-one
+                       error in flame.  Added some missing casts.
+Changes since 1.18:    Added `flame' hack.
+                       Fixed a minor Motif dialog text field bug.
+                       Fixed yet another XPointer-not-defined-in-R4 bug.
+Changes since 1.17:    Added support for shadow password files.
+                       Fixed some Motif-related locking bugs.
+                       Added diagnostics when locking is disabled.
+                       Made blitspin able to use the XPM library.
+                       Added `decayscreen' hack.
+Changes since 1.16:    Added `halo' hack.
+Changes since 1.15:    Portability fixes.
+Changes since 1.14:    Broke the driver up into more source files.
+                       Moved the hacks into their own directory.
+                       Made all `time' parameters accept the 00:00:00 syntax,
+                       so that even the parameters which are normally read as
+                       `minutes' can be specified in seconds.
+                       Added colormap cycling to `imsmap'.
+                       Made hyper work with K&R compilers.
+Changes since 1.13:    Added `orbit' option to `attraction' hack.
+                       Added `lock-timeout' option.
+                       Cleaned up options of `maze' hack.
+Changes since 1.8:     Added demo mode, and locking.
+                       Added `maze' hack.
+                       Added `norotate' option to `rocks' hack.
diff --git a/aaa_vms.notes b/aaa_vms.notes
deleted file mode 100755 (executable)
index 3268e45..0000000
Binary files a/aaa_vms.notes and /dev/null differ
diff --git a/config.h b/config.h
new file mode 100644 (file)
index 0000000..02ca5f4
--- /dev/null
+++ b/config.h
@@ -0,0 +1,106 @@
+/*
+ * Config file for xscreensaver, Copyright (c) 1991-1995 Jamie Zawinski.
+ * This file is included by the various Imakefiles.
+ */
+
+/*  Uncomment the following line if you have the MIT-SCREEN-SAVER extension
+ *  installed.  This extension resides in .../contrib/extensions/screensaver/
+ *  on the X11R6 contrib tape.  (Turning on this flag lets XScreenSaver work
+ *  better with servers which support this extension; but it will still work
+ *  with servers which do not suport this extension, so it's a good idea to
+ *  compile in support for it if you can.)
+ */
+/* #define HAVE_SAVER_EXTENSION */
+
+/*  Uncomment the following line if you have the XIDLE extension installed.
+ *  This extension resides in .../contrib/extensions/xidle/ on the X11R5
+ *  contrib tape.  (Turning on this flag lets XScreenSaver work better with
+ *  servers which support this extension; but it will still work with servers
+ *  which do not suport this extension, so it's a good idea to compile in
+ *  support for it if you can.)
+ */
+/* #define HAVE_XIDLE_EXTENSION */
+
+/*  Uncomment the following line if you have the XPM library installed.
+ *  Some of the demos can make use of this if it is available.
+ */
+#define HAVE_XPM
+
+/*  Uncomment the following line if you don't have Motif.  If you don't have
+ *  Motif, then the screensaver won't have any dialog boxes, which means
+ *  that it won't be compiled with support for demo-mode or display-locking.
+ *  But other than that, it will work fine.
+ */
+/* #define NO_MOTIF */
+
+/*  Uncomment the following line if for some reason the locking code doesn't
+ *  work (for example, if you don't have the crypt() system call, or if you
+ *  don't use standard passwd files.)  If you need to do this, please let me
+ *  know.
+ */
+/* #define NO_LOCKING */
+
+/*  Uncomment the following line if your system doesn't have the select()
+ *  system call.  If you need to do this, please let me know.
+ */
+/* #define NO_SELECT */
+
+/*  Uncomment the following line if your system doesn't have the setuid(),
+ *  setregid(), and getpwnam() library routines.
+ *
+ *  WARNING: if you do this, it will be unsafe to run xscreensaver as root
+ *  (which probably means you can't have it be started by xdm.)  If you are
+ *  on such a system, please try to find the corresponding way to do this,
+ *  and then tell me what it is.
+ */
+/* #define NO_SETUID */
+
+/*  Uncomment the following line if your system uses `shadow' passwords,
+ *  that is, the passwords live in /etc/shadow instead of /etc/passwd,
+ *  and one reads them with getspnam() instead of getpwnam().
+ */
+/* #define HAVE_SHADOW */
+
+/*  You may need to edit these to correspond to where Motif is installed.
+ */
+#ifndef NO_MOTIF
+  MOTIFINCLUDES = -I/usr/local/include/
+ MOTIFLDOPTIONS = -L/usr/local/lib/
+      MOTIFLIBS = -lXm
+#endif
+
+/*  On some systems, only programs running as root can use the getpwent()
+    library routine.  This means that, in order for locking to work, the
+    screensaver must be installed as setuid to root.  Define this to make
+    that happen.  (You must run "make install" as root for it to work.)
+    (What systems other than HP and AIX need this?  Let me know.)
+ */
+#if defined(HPArchitecture) || defined(AIXArchitecture) || defined(HAVE_SHADOW)
+# define INSTALL_SETUID
+#endif
+
+#ifdef HPArchitecture
+      CCOPTIONS = -Aa -D_HPUX_SOURCE   /* eat me */
+# if (ProjectX <= 4)
+  MOTIFINCLUDES = -I/usr/include/Motif1.1
+ MOTIFLDOPTIONS = -L/usr/lib/Motif1.1
+# else /* R5 */
+  MOTIFINCLUDES = -I/usr/include/Motif1.2
+ MOTIFLDOPTIONS = -L/usr/lib/Motif1.2
+# endif /* R5 */
+#endif /* HPArchitecture */
+
+#ifdef MacIIArchitecture
+      CCOPTIONS = -D_POSIX_SOURCE
+#endif /* MacIIArchitecture */
+
+#if (ProjectX <= 4)
+# define R5ISMS -DXPointer="char*"
+#else /* r5 or better */
+# define R5ISMS
+#endif
+
+/* It seems that some versions of Sun's dynamic X libraries are broken; if
+   you get link errors about _get_wmShellWidgetClass being undefined, try
+   adding -Bstatic to the link command.
+ */
old mode 100755 (executable)
new mode 100644 (file)
index 6757459..e04c492
@@ -21,5 +21,5 @@
 #handle 15 pass nostop
 #handle 19 pass nostop
 b exit
-set args -verbose -idelay 0 -lock
+set args -verbose -idelay 0
 #b purify_stop_here
diff --git a/driver/Imakefile b/driver/Imakefile
new file mode 100644 (file)
index 0000000..0caccaf
--- /dev/null
@@ -0,0 +1,123 @@
+/*
+ * Imakefile file for xscreensaver, Copyright (c) 1993-1995 Jamie Zawinski.
+ *
+ * You should not need to edit this file; edit ../config.h instead.
+ *
+ */
+
+#include "../config.h"
+
+#if defined(NO_MOTIF) && !defined(NO_LOCKING)
+# define NO_LOCKING
+#endif
+
+#ifdef NO_LOCKING
+# undef INSTALL_SETUID
+#endif
+
+#ifdef HAVE_XIDLE_EXTENSION
+# define XIDLE_DEF -DHAVE_XIDLE_EXTENSION
+#else
+# define XIDLE_DEF
+#endif
+
+#ifdef HAVE_SAVER_EXTENSION
+# define SAVER_DEF -DHAVE_SAVER_EXTENSION
+#else
+# define SAVER_DEF
+#endif
+
+#ifdef NO_LOCKING
+# define LOCKING_DEF -DNO_LOCKING
+#else
+# define LOCKING_DEF
+#endif
+
+#ifdef NO_SETUID
+# define SETUID_DEF -DNO_SETUID
+#else
+# define SETUID_DEF
+#endif
+
+#ifdef HAVE_SHADOW
+# define SHADOW_DEF -DHAVE_SHADOW
+#else
+# define SHADOW_DEF
+#endif
+
+#ifdef NO_MOTIF
+# define MOTIF_DEF -DNO_MOTIF
+# define MOTIF_SRC
+# define MOTIF_OBJ
+# define MOTIF_LIB
+# define MOTIF_INC
+#else
+# define MOTIF_DEF
+# define MOTIF_SRC $(DBOX_SRCS) $(UTILS)/xroger.c
+# define MOTIF_OBJ $(DBOX_OBJS) $(UTILS)/xroger.o
+# define MOTIF_LIB $(MOTIFLDOPTIONS) $(MOTIFLIBS)
+# define MOTIF_INC $(MOTIFINCLUDES)
+#endif
+
+         UTILS = ../utils
+      INCLUDES = -I$(UTILS) MOTIF_INC
+       DEFINES = SETUID_DEF XIDLE_DEF SAVER_DEF MOTIF_DEF LOCKING_DEF SHADOW_DEF R5ISMS
+     SAVERLIBS = $(XMULIB) $(XTOOLLIB) $(EXTENSIONLIB) $(XLIB) -lm
+      COMMLIBS = $(XLIB) -lm
+     UTIL_SRCS = $(UTILS)/resources.c $(UTILS)/fade.c $(UTILS)/usleep.c $(UTILS)/visual.c
+     UTIL_OBJS = $(UTILS)/resources.o $(UTILS)/fade.o $(UTILS)/usleep.o $(UTILS)/visual.o
+     DBOX_SRCS = dialogs.c demo.c lock.c
+     DBOX_OBJS = dialogs.o demo.o lock.o
+     SAVERSRCS = xscreensaver.c timers.c subprocs.c windows.c stderr.c
+     SAVEROBJS = xscreensaver.o timers.o subprocs.o windows.o stderr.o
+         SRCS1 = $(SAVERSRCS) MOTIF_SRC $(UTIL_SRCS)
+         OBJS1 = $(SAVEROBJS) MOTIF_OBJ $(UTIL_OBJS)
+      COMMSRCS = xscreensaver-command.c
+      COMMOBJS = xscreensaver-command.o
+         SRCS2 = $(COMMSRCS)
+         OBJS2 = $(COMMOBJS)
+           MEN = xscreensaver.man xscreensaver-command.man
+      TARFILES = README Imakefile $(SAVERSRCS) $(DBOX_SRCS) $(COMMSRCS) \
+                 xscreensaver.h XScreenSaver.ad dialogs.xd $(MEN) .gdbinit
+
+#if defined(HPArchitecture) && !defined(NO_LOCKING)
+EXTRA_LIBRARIES = -lXhp11      /* for XHPDisableReset() */
+#endif
+
+all:: xscreensaver xscreensaver-command
+
+echo_tarfiles:
+       @echo $(TARFILES)
+
+PROGRAMS = xscreensaver xscreensaver-command
+
+#ifdef INSTALL_SETUID
+#undef  InstallProgram
+#define InstallProgram(p,d) InstallProgramWithFlags(p,d,$(INSTUIDFLAGS))
+#endif
+
+ComplexProgramTarget_1(xscreensaver,MOTIF_LIB $(SAVERLIBS),$(HP_NULL_STR))
+
+#ifdef INSTALL_SETUID
+#undef  InstallProgram
+#define InstallProgram(p,d) InstallProgramWithFlags(p,d,$(HP_NULL_STR))
+#endif
+
+ComplexProgramTarget_2(xscreensaver-command,$(COMMLIBS),$(HP_NULL_STR))
+
+InstallAppDefaults(XScreenSaver)
+
+xscreensaver.o: XScreenSaver.ad.h $(UTILS)/version.h
+xscreensaver-command.o: $(UTILS)/version.h
+
+demo.o: $(UTILS)/version.h
+lock.o: $(UTILS)/version.h
+
+/* build this before calling makedepend */
+depend:: XScreenSaver.ad.h
+
+XScreenSaver.ad.h: XScreenSaver.ad
+       $(UTILS)/ad2c XScreenSaver.ad > XScreenSaver.ad.h
+
+clean::
+       $(RM) XScreenSaver.ad.h
diff --git a/driver/README b/driver/README
new file mode 100644 (file)
index 0000000..df64793
--- /dev/null
@@ -0,0 +1,6 @@
+
+This directory contains the source for xscreensaver and xscreensaver-command,
+the screensaver driver, and the program for externally controlling it.  Some
+stuff from the ../utils/ directory is used here as well.
+
+If you have compilation problems, check the parameters in ../config.h.
diff --git a/driver/XScreenSaver.ad b/driver/XScreenSaver.ad
new file mode 100644 (file)
index 0000000..0c3656b
--- /dev/null
@@ -0,0 +1,159 @@
+! app-defaults file for XScreenSaver by Jamie Zawinski.
+
+*timeout:      10
+*cycle:                10
+*lockTimeout:  0
+*passwdTimeout:        30
+*nice:         10
+*lock:         False
+*verbose:      False
+*fade:         True
+*unfade:       False
+*fadeSeconds:  1
+*fadeTicks:    75
+
+*captureStderr:        True
+*captureStdout:        True
+*textForeground:       Yellow
+*textBackground:       Black
+*font:                 *-medium-r-*-140-*-m-*
+
+! Turning on "installColormap" interacts erratically with twm and tvtwm,
+! but seems to work fine with mwm and olwm.  Try it and see.
+!
+*installColormap: False
+
+! Programs on this list apply all the time.
+*programs:     qix -root                                               \n\
+               qix -root -solid -delay 0 -segments 100                 \n\
+               qix -root -linear -count 10 -size 100 -segments 200     \n\
+               attraction -root -mode balls                            \n\
+               attraction -root -mode lines -points 3 -segments 200    \n\
+               attraction -root -mode splines -segments 300            \n\
+               attraction -root -mode lines -radius 300                \
+                       -orbit -vmult 0.5                               \n\
+               pyro -root                                              \n\
+               helix -root                                             \n\
+               pedal -root                                             \n\
+               rorschach -root -offset 7                               \n\
+               hopalong -root                                          \n\
+               greynetic -root                                         \n\
+               xroger -root                                            \n\
+               imsmap -root                                            \n\
+               slidescreen -root                                       \n\
+               decayscreen -root                                       \n\
+               hypercube -root                                         \n\
+               halo -root                                              \n\
+               maze -root                                              \n\
+               flame -root                                             \n
+
+! Programs on this list are run only for monochrome screens.
+*monoPrograms: qix -root -linear -count 5 -size 200 -spread 30         \
+                       -segments 75 -solid -xor                        \n\
+               rocks -root                                             \n\
+               noseguy -root                                           \n
+
+! Programs on this list are run only for color (really, non-mono) screens.
+*colorPrograms:        qix -root -count 4 -solid -transparent                  \n\
+               qix -root -count 5 -solid -transparent -linear          \
+                       -segments 250 -size 100                         \n\
+               attraction -root -mode polygons                         \n\
+               attraction -root -mode filled-splines -segments 0       \n\
+               attraction -root -glow -points 10                       \n\
+               rocks -root -fg darksalmon                              \n\
+               noseguy -root -fg yellow -bg gray30                     \n
+
+
+! Some other screenhacks that you might want to track down:
+!
+!              xdaliclock -root -builtin2                              \n\
+!              xswarm -r 2>&-                                          \n\
+!              xwave -root                                             \n\
+!              xbouncebits ...                                         \n\
+!              ico -r                                                  \n\
+!              xsplinefun                                              \n\
+!              kaleid -root                                            \n\
+!              xfishtank -c black -d -r 2                              \n\
+
+
+! Resources for the dialog boxes:
+! 
+*fontList:                       *-helvetica-medium-r-*-*-*-120-*-*-*-iso8859-1
+*demoDialog*label1.fontList:     *-helvetica-medium-r-*-*-*-140-*-*-*-iso8859-1
+*passwdDialog*fontList:          *-helvetica-medium-r-*-*-*-140-*-*-*-iso8859-1
+*XmList.fontList:                  *-courier-medium-r-*-*-*-120-*-*-*-iso8859-1
+*XmTextField.fontList:             *-courier-medium-r-*-*-*-120-*-*-*-iso8859-1
+*passwdDialog.passwdText.fontList: *-courier-medium-r-*-*-*-120-*-*-*-iso8859-1
+
+*XmDialogShell*foreground:             black
+*XmDialogShell*background:             gray90
+*XmDialogShell*XmTextField.foreground: black
+*XmDialogShell*XmTextField.background: white
+*XmDialogShell*demoList.foreground:    black
+*XmDialogShell*demoList.background:    white
+*XmDialogShell*rogerLabel.foreground:  red3
+*XmDialogShell*rogerLabel.background:  white
+
+*XmDialogShell.title:          XScreenSaver
+*allowShellResize:             True
+*autoUnmanage:                 False
+
+! This doesn't work.  Motif ignores it if there is a scroll-list!
+*demoDialog.maxWidth:          600
+
+*label1.labelString:           XScreenSaver %s
+*label2.labelString: Copyright Â© 1991-1995 by Jamie Zawinski <jwz@mcom.com>
+*demoList.visibleItemCount:    10
+*demoList.automaticSelection:  True
+*next.labelString:             Run Next
+*prev.labelString:             Run Previous
+*edit.labelString:             Edit Parameters
+*done.labelString:             Exit Demo Mode
+*restart.labelString:          Reinitialize
+
+*resourcesLabel.labelString:   XScreenSaver Parameters
+
+! *timeoutLabel.labelString:   Timeout Minutes
+! *cycleLabel.labelString:     Cycle Seconds
+! *fadeSecondsLabel.labelString:Fade Seconds
+! *fadeTicksLabel.labelString: Fade Ticks
+! *lockLabel.labelString:      Lock Timeout
+! *passwdLabel.labelString:    Password Timeout
+! *resourcesForm*XmTextField.columns:  5
+
+*timeoutLabel.labelString:     Saver Timeout
+*cycleLabel.labelString:       Cycle Timeout
+*fadeSecondsLabel.labelString: Fade Duration
+*fadeTicksLabel.labelString:   Fade Ticks
+*lockLabel.labelString:                Lock Timeout
+*passwdLabel.labelString:      Password Timeout
+*resourcesForm*XmTextField.columns:    8
+
+*verboseToggle.labelString:    Verbose
+*cmapToggle.labelString:       Install Colormap
+*fadeToggle.labelString:       Fade Colormap
+*unfadeToggle.labelString:     Unfade Colormap
+*lockToggle.labelString:       Require Password
+*resourcesDone.labelString:    Done
+*resourcesCancel.labelString:  Cancel
+
+*passwdDialog.title:           Password
+*passwdLabel1.labelString:     XScreenSaver %s
+*passwdLabel2.labelString:     This display is locked.
+*passwdLabel3.labelString:     Please type %s's password to unlock it.
+*passwdDone.labelString:       Done
+*passwdCancel.labelString:     Cancel
+
+*passwdLabel1.alignment:       ALIGNMENT_BEGINNING
+*passwdLabel2.alignment:       ALIGNMENT_BEGINNING
+*passwdLabel3.alignment:       ALIGNMENT_BEGINNING
+*rogerLabel.width:             150
+
+! You probably won't need to change these.  They aren't consulted if the
+! XIdle extension is being used.
+!
+*pointerPollTime:      5
+*initialDelay:         30
+*windowCreationTimeout:        30
+
+*bourneShell:          /bin/sh
diff --git a/driver/ad2c b/driver/ad2c
deleted file mode 100755 (executable)
index 1435e55..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-#!/bin/sh
-#
-#      ad2c : Convert app-defaults file to C strings decls.
-#
-#      George Ferguson, ferguson@cs.rcohester.edu, 12 Nov 1990.
-#      19 Mar 1991 : gf
-#              Made it self-contained.
-#      6 Jan 1992 : mycroft@gnu.ai.mit.edu (Charles Hannum)
-#              Removed use of "-n" and ":read" label since Gnu and
-#              IBM sed print pattern space on "n" command. Still works
-#              with Sun sed, of course.
-#      7 Jan 1992: matthew@sunpix.East.Sun.COM (Matthew Stier)
-#              Escape quotes after escaping backslashes.
-#
-
-sed '
-/^!/d
-/^$/d
-s/\\/\\\\/g
-s/\\$//g
-s/"/\\"/g
-s/^/"/
-: test
-/\\$/b slash
-s/$/",/
-p
-d
-: slash
-n
-/^!/d
-/^$/d
-s/"/\\"/g
-s/\\\\/\\/g
-s/\\n/\\\\n/g
-s/\\t/\\\\t/g
-s/\\f/\\\\f/g
-s/\\b/\\\\b/g
-b test' "$@"
diff --git a/driver/axpobjs.zip b/driver/axpobjs.zip
deleted file mode 100755 (executable)
index a5feecf..0000000
Binary files a/driver/axpobjs.zip and /dev/null differ
diff --git a/driver/compile.com b/driver/compile.com
deleted file mode 100755 (executable)
index 8070a9b..0000000
Binary files a/driver/compile.com and /dev/null differ
diff --git a/driver/compile_axp.com b/driver/compile_axp.com
deleted file mode 100755 (executable)
index a8033fe..0000000
Binary files a/driver/compile_axp.com and /dev/null differ
diff --git a/driver/compile_decc.com b/driver/compile_decc.com
deleted file mode 100755 (executable)
index a8033fe..0000000
Binary files a/driver/compile_decc.com and /dev/null differ
diff --git a/driver/config.h b/driver/config.h
deleted file mode 100755 (executable)
index a6165c6..0000000
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * Config file for xscreensaver, Copyright (c) 1991-1994 Jamie Zawinski.
- * This file is included by the various Imakefiles.
- */
-
-/*  Uncomment the following line if you have the XIdle extension installed.
- *  XIdle comes on the X11r5 contrib tape, in .../contrib/extensions/xidle/
- *  (and maybe it will be on the r6 tape as well but I'm not sure where.)
- *  Installing it is the morally superior thing to do, but xscreensaver will
- *  work without it.
- *
- *  Actually it's likely that the R6 `screensaver' server extension will turn
- *  out to be the better thing to use, but I haven't had time to add support
- *  for it yet.  (See README to find the latest version of this program.)
- */
-/* #define HAVE_XIDLE */
-
-/*  Uncomment the following line if you have the XPM library installed.
- *  Some of the demos can make use of this.
- */
-#define HAVE_XPM
-
-/*  Uncomment the following line if you don't have Motif.  If you don't have
- *  Motif, then the screensaver won't have any dialog boxes, which means
- *  that it won't be compiled with support for demo-mode or display-locking.
- */
-/* #define NO_MOTIF */
-
-/* Uncomment the following line if for some reason the locking code doesn't
- * work (for example, if you don't have the crypt() system call, or if you
- * don't use standard passwd files.)
- */
-/* #define NO_LOCKING   */
-
-/*  Uncomment the following line if your system doesn't have the select()
- *  system call.
- */
-#define NO_SELECT
-
-/*  Uncomment the following line if your system doesn't have the setuid(),
- *  setregid(), and getpwnam() library routines.
- *
- *  WARNING: if you do this, it will be unsafe to run xscreensaver as root
- *  (which probably means you can't have it be started by xdm.)  If you are
- *  on such a system, please try to find the corresponding way to do this,
- *  and then tell me what it is.
- */
-#define NO_SETUID
-
-/*  Uncomment the following line if your system uses `shadow' passwords,
- *  that is, the passwords live in /etc/shadow instead of /etc/passwd,
- *  and one reads them with getspnam() instead of getpwnam().
- */
-/* #define HAVE_SHADOW */
-
-/*  You may need to edit these to correspond to where Motif is installed.
- */
-/*#ifndef NO_MOTIF                          */
-/*  MOTIFINCLUDES = -I/usr/local/include/   */
-/* MOTIFLDOPTIONS = -L/usr/local/lib/       */
-/*      MOTIFLIBS = -lXm                    */
-/*#endif                                    */
-
-/*  On some systems, only programs running as root can use the getpwent()
-    library routine.  This means that, in order for locking to work, the
-    screensaver must be installed as setuid to root.  Define this to make
-    that happen.  (You must run "make install" as root for it to work.)
-    (What systems other than HP and AIX need this?  Let me know.)
- */
-#if defined(HPArchitecture) || defined(AIXArchitecture) || defined(HAVE_SHADOW)
-# define INSTALL_SETUID
-#endif
-
-#ifdef HPArchitecture
-      CCOPTIONS = -Aa -D_HPUX_SOURCE   /* eat me */
-# if (ProjectX <= 4)
-  MOTIFINCLUDES = -I/usr/include/Motif1.1
- MOTIFLDOPTIONS = -L/usr/lib/Motif1.1
-# else /* R5 */
-  MOTIFINCLUDES = -I/usr/include/Motif1.2
- MOTIFLDOPTIONS = -L/usr/lib/Motif1.2
-# endif /* R5 */
-#endif /* HPArchitecture */
-
-#ifdef MacIIArchitecture
-      CCOPTIONS = -D_POSIX_SOURCE
-#endif /* MacIIArchitecture */
-
-#if (ProjectX <= 4)
-# define R5ISMS -DXPointer="char*"
-#else /* r5 or better */
-# define R5ISMS
-#endif
-
-/* It seems that some versions of Sun's dynamic X libraries are broken; if
-   you get link errors about _get_wmShellWidgetClass being undefined, try
-   adding -Bstatic to the link command.
- */
old mode 100755 (executable)
new mode 100644 (file)
index 3391622..64bd58b
@@ -1,4 +1,4 @@
-/* xscreensaver, Copyright (c) 1993 Jamie Zawinski <jwz@mcom.com>
+/* xscreensaver, Copyright (c) 1993-1995 Jamie Zawinski <jwz@mcom.com>
  *
  * Permission to use, copy, modify, distribute, and sell this software and its
  * documentation for any purpose is hereby granted without fee, provided that
 #include "xscreensaver.h"
 #include <stdio.h>
 
+#ifdef HAVE_SAVER_EXTENSION
+extern int saver_ext_event_number;
+extern Window server_saver_window;
+#endif /* HAVE_SAVER_EXTENSION */
+
 extern Time timeout, cycle, lock_timeout;
 #ifndef NO_LOCKING
 extern Time passwd_timeout;
@@ -105,6 +110,35 @@ select_cb (button, client_data, call_data)
   focus_fuckus (demo_dialog);
 }
 
+static void
+ensure_selected_item_visible (list)
+     Widget list;
+{
+  int *pos_list = 0;
+  int pos_count = 0;
+  if (XmListGetSelectedPos (list, &pos_list, &pos_count) && pos_count > 0)
+    {
+      int top = -2;
+      int visible = 0;
+      XtVaGetValues (list,
+                    XmNtopItemPosition, &top,
+                    XmNvisibleItemCount, &visible,
+                    0);
+      if (pos_list[0] >= top + visible)
+       {
+         int pos = pos_list[0] - visible + 1;
+         if (pos < 0) pos = 0;
+         XmListSetPos (list, pos);
+       }
+      else if (pos_list[0] < top)
+       {
+         XmListSetPos (list, pos_list[0]);
+       }
+    }
+  if (pos_list)
+    XtFree ((char *) pos_list);
+}
+
 static void
 next_cb (button, client_data, call_data)
      Widget button;
@@ -125,6 +159,7 @@ next_cb (button, client_data, call_data)
        XmListSelectPos (demo_list, 1, True);
       XtFree ((char *) pos_list);
     }
+  ensure_selected_item_visible (demo_list);
   text_cb (text_line, 0, 0);
 }
 
@@ -142,6 +177,7 @@ prev_cb (button, client_data, call_data)
       XmListSelectPos (demo_list, pos_list [0] - 1, True);
       XtFree ((char *) pos_list);
     }
+  ensure_selected_item_visible (demo_list);
   text_cb (text_line, 0, 0);
 }
 
@@ -524,13 +560,14 @@ Bool demo_mode_p = False;
 
 extern XtAppContext app;
 extern Widget toplevel_shell;
-extern Bool use_xidle;
+extern Bool use_xidle_extension;
+extern Bool use_saver_extension;
 extern Time notice_events_timeout;
 
 extern char **screenhacks;
 extern char *demo_hack;
 
-extern void notice_events_timer P((XtPointer closure, void *timer));
+extern void notice_events_timer P((XtPointer closure, XtIntervalId *timer));
 extern Bool handle_clientmessage P((/*XEvent *, Bool*/));
 
 void
@@ -554,11 +591,18 @@ demo_mode ()
          break;
 
        case CreateNotify:
-#ifdef HAVE_XIDLE
-         if (! use_xidle)
-#endif
-           XtAppAddTimeOut (app, notice_events_timeout, notice_events_timer,
-                            (XtPointer) event.xcreatewindow.window);
+         if (!use_xidle_extension && !use_saver_extension)
+           {
+             XtAppAddTimeOut (app, notice_events_timeout, notice_events_timer,
+                              (XtPointer) event.xcreatewindow.window);
+#ifdef DEBUG_TIMERS
+             if (verbose_p)
+               printf ("%s: starting notice_events_timer for 0x%X (%lu)\n",
+                       progname,
+                       (unsigned int) event.xcreatewindow.window,
+                       notice_events_timeout);
+#endif /* DEBUG_TIMERS */
+           }
          break;
 
        case ButtonPress:
@@ -568,6 +612,18 @@ demo_mode ()
          /* fall through */
 
        default:
+#ifdef HAVE_SAVER_EXTENSION
+         if (event.type == saver_ext_event_number)
+           {
+             /* Get the "real" server window out of the way as soon
+                as possible. */
+             if (server_saver_window &&
+                 window_exists_p (dpy, server_saver_window))
+               XUnmapWindow (dpy, server_saver_window);
+           }
+         else
+#endif /* HAVE_SAVER_EXTENSION */
+
          XtDispatchEvent (&event);
          break;
        }
old mode 100755 (executable)
new mode 100644 (file)
index a1184e1..b4612b5
 #include <Xm/TextF.h>
 #include <Xm/ToggleB.h>
 
+/* #### Hacked by hand, not generated by XDesigner */
+extern Visual *visual;
+extern int visual_depth;
+extern Colormap cmap;
+
 
 Widget passwd_dialog;
 Widget passwd_form;
@@ -84,6 +89,14 @@ Widget parent;
        Widget widget4;
        Widget widget7;
 
+
+       /* #### Hacked by hand, not generated by XDesigner */
+       ac = 0;
+       XtSetArg (al[ac], XmNvisual, visual); ac++;
+       XtSetArg (al[ac], XmNcolormap, cmap); ac++;
+       XtSetArg (al[ac], XmNdepth, visual_depth); ac++;
+
+
        passwd_dialog = XmCreateDialogShell ( parent, "passwdDialog", al, ac );
        passwd_form = XmCreateForm ( passwd_dialog, "passwdForm", al, ac );
        roger_label = XmCreateDrawnButton ( passwd_form, "rogerLabel", al, ac );
@@ -95,6 +108,10 @@ Widget parent;
        passwd_done = XmCreatePushButton ( passwd_form, "passwdDone", al, ac );
        passwd_cancel = XmCreatePushButton ( passwd_form, "passwdCancel", al, ac );
 
+       /* #### Hacked by hand, not generated by XDesigner */
+       ac = 0;
+
+
        XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++;
        XtSetArg(al[ac], XmNtopOffset, 4); ac++;
        XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_FORM); ac++;
@@ -222,8 +239,20 @@ Widget parent;
        Widget widget48;
        Widget widget29;
 
+
+       /* #### Hacked by hand, not generated by XDesigner */
+       ac = 0;
+       XtSetArg (al[ac], XmNvisual, visual); ac++;
+       XtSetArg (al[ac], XmNcolormap, cmap); ac++;
+       XtSetArg (al[ac], XmNdepth, visual_depth); ac++;
+
+
        resources_dialog = XmCreateDialogShell ( parent, "resourcesDialog", al, ac );
        resources_form = XmCreateForm ( resources_dialog, "resourcesForm", al, ac );
+
+       /* #### Hacked by hand, not generated by XDesigner */
+       ac = 0;
+
        widget12 = XmCreateLabel ( resources_form, "resourcesLabel", al, ac );
        widget13 = XmCreateSeparator ( resources_form, "widget13", al, ac );
        XtSetArg(al[ac], XmNalignment, XmALIGNMENT_END); ac++;
@@ -578,6 +607,14 @@ Widget parent;
        int list_item;        /* Index for list_items */
        XmString xmstrings[15];    /* temporary storage for XmStrings */
 
+
+       /* #### Hacked by hand, not generated by XDesigner */
+       ac = 0;
+       XtSetArg (al[ac], XmNvisual, visual); ac++;
+       XtSetArg (al[ac], XmNcolormap, cmap); ac++;
+       XtSetArg (al[ac], XmNdepth, visual_depth); ac++;
+
+
        demo_dialog = XmCreateDialogShell ( parent, "demoDialog", al, ac );
        demo_form = XmCreateForm ( demo_dialog, "demoForm", al, ac );
        label1 = XmCreateLabel ( demo_form, "label1", al, ac );
@@ -585,6 +622,10 @@ Widget parent;
        demo_list = XmCreateScrolledList ( demo_form, "demoList", al, ac );
        text_area = XtParent ( demo_list );
 
+       /* #### Hacked by hand, not generated by XDesigner */
+       ac = 0;
+
+
        text_line = XmCreateTextField ( demo_form, "textLine", al, ac );
        vline = XmCreateSeparator ( demo_form, "vline", al, ac );
        next = XmCreatePushButton ( demo_form, "next", al, ac );
old mode 100755 (executable)
new mode 100644 (file)
diff --git a/driver/getpwnam.c b/driver/getpwnam.c
deleted file mode 100755 (executable)
index 46cb9f1..0000000
Binary files a/driver/getpwnam.c and /dev/null differ
diff --git a/driver/hpwd.c b/driver/hpwd.c
deleted file mode 100755 (executable)
index 0795b62..0000000
Binary files a/driver/hpwd.c and /dev/null differ
diff --git a/driver/imakefile b/driver/imakefile
deleted file mode 100755 (executable)
index d0359e5..0000000
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- * Imakefile file for xscreensaver, Copyright (c) 1993 Jamie Zawinski.
- *
- * You should not need to edit this file; edit ../config.h instead.
- *
- */
-
-#include "../config.h"
-
-#if defined(NO_MOTIF) && !defined(NO_LOCKING)
-# define NO_LOCKING
-#endif
-
-#ifdef NO_LOCKING
-# undef INSTALL_SETUID
-#endif
-
-#ifdef HAVE_XIDLE
-# define XIDLE_DEF -DHAVE_XIDLE
-#else
-# define XIDLE_DEF
-#endif
-
-#ifdef NO_LOCKING
-# define LOCKING_DEF -DNO_LOCKING
-#else
-# define LOCKING_DEF
-#endif
-
-#ifdef NO_SETUID
-# define SETUID_DEF -DNO_SETUID
-#else
-# define SETUID_DEF
-#endif
-
-#ifdef HAVE_SHADOW
-# define SHADOW_DEF -DHAVE_SHADOW
-#else
-# define SHADOW_DEF
-#endif
-
-#ifdef NO_MOTIF
-# define MOTIF_DEF -DNO_MOTIF
-# define MOTIF_SRC
-# define MOTIF_OBJ
-# define MOTIF_LIB
-# define MOTIF_INC
-#else
-# define MOTIF_DEF
-# define MOTIF_SRC $(DBOX_SRCS) $(UTILS)/xroger.c
-# define MOTIF_OBJ $(DBOX_OBJS) $(UTILS)/xroger.o
-# define MOTIF_LIB $(MOTIFLDOPTIONS) $(MOTIFLIBS)
-# define MOTIF_INC $(MOTIFINCLUDES)
-#endif
-
-          UTILS = ../utils
-       INCLUDES = -I$(UTILS) MOTIF_INC
-        DEFINES = SETUID_DEF XIDLE_DEF MOTIF_DEF LOCKING_DEF SHADOW_DEF R5ISMS
-      SAVERLIBS = $(XMULIB) $(XTOOLLIB) $(EXTENSIONLIB) $(XLIB) -lm
-       COMMLIBS = $(XLIB) -lm
-      UTIL_SRCS = $(UTILS)/resources.c $(UTILS)/fade.c $(UTILS)/usleep.c
-      UTIL_OBJS = $(UTILS)/resources.o $(UTILS)/fade.o $(UTILS)/usleep.o
-      DBOX_SRCS = dialogs.c demo.c lock.c
-      DBOX_OBJS = dialogs.o demo.o lock.o
-      SAVERSRCS = xscreensaver.c visual.c timers.c subprocs.c windows.c
-      SAVEROBJS = xscreensaver.o visual.o timers.o subprocs.o windows.o
-          SRCS1 = $(SAVERSRCS) MOTIF_SRC $(UTIL_SRCS)
-          OBJS1 = $(SAVEROBJS) MOTIF_OBJ $(UTIL_OBJS)
-       COMMSRCS = xscreensaver-command.c
-       COMMOBJS = xscreensaver-command.o
-          SRCS2 = $(COMMSRCS)
-          OBJS2 = $(COMMOBJS)
-            MEN = xscreensaver.man xscreensaver-command.man
-       TARFILES = README Imakefile $(SAVERSRCS) $(DBOX_SRCS) $(COMMSRCS) \
-                  xscreensaver.h XScreenSaver.ad dialogs.xd $(MEN) .gdbinit
-
-#if defined(HPArchitecture) && !defined(NO_LOCKING)
-EXTRA_LIBRARIES = -lXhp11      /* for XHPDisableReset() */
-#endif
-
-all:: xscreensaver xscreensaver-command
-
-echo_tarfiles:
-       @echo $(TARFILES)
-
-PROGRAMS = xscreensaver xscreensaver-command
-
-#ifdef INSTALL_SETUID
-#undef  InstallProgram
-#define InstallProgram(p,d) InstallProgramWithFlags(p,d,$(INSTUIDFLAGS))
-#endif
-
-ComplexProgramTarget_1(xscreensaver,MOTIF_LIB $(SAVERLIBS),)
-
-#ifdef INSTALL_SETUID
-#undef  InstallProgram
-#define InstallProgram(p,d) InstallProgramWithFlags(p,d,)
-#endif
-
-ComplexProgramTarget_2(xscreensaver-command,$(COMMLIBS),)
-
-InstallAppDefaults(XScreenSaver)
-
-xscreensaver.o: XScreenSaver.ad.h $(UTILS)/version.h
-xscreensaver-command.o: $(UTILS)/version.h
-
-demo.o: $(UTILS)/version.h
-lock.o: $(UTILS)/version.h
-
-/* build this before calling makedepend */
-depend:: XScreenSaver.ad.h
-
-XScreenSaver.ad.h: XScreenSaver.ad
-       $(UTILS)/ad2c XScreenSaver.ad > XScreenSaver.ad.h
-
-clean::
-       $(RM) XScreenSaver.ad.h
diff --git a/driver/link.com b/driver/link.com
deleted file mode 100755 (executable)
index 8130c96..0000000
Binary files a/driver/link.com and /dev/null differ
diff --git a/driver/link_axp.com b/driver/link_axp.com
deleted file mode 100755 (executable)
index bc49b26..0000000
Binary files a/driver/link_axp.com and /dev/null differ
diff --git a/driver/link_decc.com b/driver/link_decc.com
deleted file mode 100755 (executable)
index 5f0e746..0000000
Binary files a/driver/link_decc.com and /dev/null differ
old mode 100755 (executable)
new mode 100644 (file)
index de8dd9f..244eb0b
@@ -1,4 +1,4 @@
-/*    xscreensaver, Copyright (c) 1993 Jamie Zawinski <jwz@mcom.com>
+/*    xscreensaver, Copyright (c) 1993-1995 Jamie Zawinski <jwz@mcom.com>
  *
  * Permission to use, copy, modify, distribute, and sell this software and its
  * documentation for any purpose is hereby granted without fee, provided that
@@ -19,6 +19,7 @@
 #include <shadow.h>
 #endif
 
+#include <pwd.h>
 #include <stdio.h>
 
 #include <X11/Intrinsic.h>
 # define _NO_PROTO
 #endif
 
-#include "xscreensaver.h"
-
-#ifndef NO_LOCKING
-
-#ifndef VMS
-#include <pwd.h>
-#else
-#include "pwd.h"
-extern char *getenv();
-#endif
-
 #include <Xm/Xm.h>
 #include <Xm/List.h>
 #include <Xm/TextF.h>
 
+#include "xscreensaver.h"
+
+#ifndef NO_LOCKING
+
 Time passwd_timeout;
 
 extern char *screensaver_version;
@@ -58,14 +52,14 @@ extern Widget passwd_text;
 extern Widget passwd_done;
 extern Widget passwd_cancel;
 
-extern create_passwd_dialog ();
+extern create_passwd_dialog P((Widget));
+extern void ungrab_keyboard_and_mouse P((void));
 
 static enum { pw_read, pw_ok, pw_fail, pw_cancel, pw_time } passwd_state;
 static char typed_passwd [1024];
 
 static char root_passwd [255];
 static char user_passwd [255];
-static char * user_vms;
 
 #ifdef HAVE_SHADOW
 # define PWTYPE struct spwd *
@@ -82,7 +76,6 @@ lock_init ()
 {
   Bool ok = True;
   char *u;
-#ifndef VMS
   PWTYPE p = GETPW ("root");
   if (p && p->PWSLOT && p->PWSLOT[0] != '*')
     strcpy (root_passwd, p->PWSLOT);
@@ -110,7 +103,6 @@ lock_init ()
 #endif
     }
 
-
   if (p && p->PWSLOT &&
       /* p->PWSLOT[0] != '*' */                /* sensible */
       (strlen (p->PWSLOT) > 4)         /* solaris */
@@ -123,10 +115,6 @@ lock_init ()
       ok = False;
     }
   return ok;
-#else
-  return ok;
-#endif /* VMS */
-
 }
 
 
@@ -148,9 +136,7 @@ passwd_done_cb (button, client_data, call_data)
      Widget button;
      XtPointer client_data, call_data;
 {
-
   if (passwd_state != pw_read) return; /* already done */
-#ifndef VMS
   if (!strcmp ((char *) crypt (typed_passwd, user_passwd), user_passwd))
     passwd_state = pw_ok;
   /* do not allow root to have empty passwd */
@@ -159,13 +145,6 @@ passwd_done_cb (button, client_data, call_data)
     passwd_state = pw_ok;
   else
     passwd_state = pw_fail;
-#else
-   user_vms = getenv("USER");
-   if (validate_user(user_vms,typed_passwd) == 1 ) 
-       passwd_state = pw_ok;
-  else 
-       passwd_state = pw_fail;
-#endif
 }
 
 #ifdef VERIFY_CALLBACK_WORKS
@@ -403,11 +382,7 @@ make_passwd_dialog (parent)
   /* Another random thing necessary in 1.2.1 but not 1.1.5... */
   XtVaSetValues (roger_label, XmNborderWidth, 2, 0);
 
-#ifndef VMS
   pw = getpwuid (getuid ());
-#else
-  pw->pw_name = getenv("USER");
-#endif
   format_into_label (passwd_label3, (pw->pw_name ? pw->pw_name : "???"));
   format_into_label (passwd_label1, screensaver_version);
 }
diff --git a/driver/pwd.h b/driver/pwd.h
deleted file mode 100755 (executable)
index 775b207..0000000
Binary files a/driver/pwd.h and /dev/null differ
diff --git a/driver/readme b/driver/readme
deleted file mode 100755 (executable)
index df64793..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-
-This directory contains the source for xscreensaver and xscreensaver-command,
-the screensaver driver, and the program for externally controlling it.  Some
-stuff from the ../utils/ directory is used here as well.
-
-If you have compilation problems, check the parameters in ../config.h.
diff --git a/driver/resource.h b/driver/resource.h
deleted file mode 100755 (executable)
index eb90029..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-#ifndef __sys_resource_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <sys/time.h>
-
-#define __sys_resource_h 1
-
-int getrusage(int, struct rusage*);
-int getrlimit (int resource, struct rlimit *rlp);
-#ifndef VMS
-int setrlimit _G_ARGS((int resource, const struct rlimit *rlp));
-#endif
-long      ulimit(int, long);
-int       getpriority(int, int);
-int       setpriority(int, int, int);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif 
diff --git a/driver/stderr.c b/driver/stderr.c
new file mode 100644 (file)
index 0000000..2d18248
--- /dev/null
@@ -0,0 +1,325 @@
+/* xscreensaver, Copyright (c) 1991-1995 Jamie Zawinski <jwz@mcom.com>
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation.  No representations are made about the suitability of this
+ * software for any purpose.  It is provided "as is" without express or 
+ * implied warranty.
+ */
+
+/* stderr hackery - Why Unix Sucks, reason number 32767.
+ */
+
+#if __STDC__
+#include <stdlib.h>
+#include <unistd.h>
+#endif
+
+#include <stdio.h>
+#include <fcntl.h>
+#include <time.h>
+
+#include <X11/Intrinsic.h>
+
+#include "xscreensaver.h"
+
+extern XtAppContext app;
+extern Colormap cmap;
+extern Window screensaver_window;
+
+extern char *get_string_resource P((char *, char *));
+extern Bool get_boolean_resource P((char *, char *));
+extern unsigned int get_pixel_resource P((char *, char *,
+                                         Display *, Colormap));
+
+static char stderr_buffer [1024];
+static char *stderr_tail = 0;
+static time_t stderr_last_read = 0;
+static XtIntervalId stderr_popup_timer = 0;
+
+FILE *real_stderr = 0;
+FILE *real_stdout = 0;
+
+static int text_x = 0;
+static int text_y = 0;
+
+void
+reset_stderr ()
+{
+  text_x = text_y = 0;
+}
+
+static void
+print_stderr (string)
+     char *string;
+{
+  int h_border = 20;
+  int v_border = 20;
+  static int line_height;
+  static XFontStruct *font = 0;
+  static GC gc = 0;
+  char *head = string;
+  char *tail;
+
+  /* In verbose mode, copy it to stderr as well. */
+  if (verbose_p)
+    fprintf (real_stderr, "%s", string);
+
+  if (! gc)
+    {
+      XGCValues gcv;
+      Pixel fg, bg;
+      char *font_name = get_string_resource ("font", "Font");
+      if (!font_name) font_name = "fixed";
+      font = XLoadQueryFont (dpy, font_name);
+      if (! font) font = XLoadQueryFont (dpy, "fixed");
+      line_height = font->ascent + font->descent;
+      fg = get_pixel_resource ("textForeground", "Foreground", dpy, cmap);
+      bg = get_pixel_resource ("textBackground", "Background", dpy, cmap);
+      gcv.font = font->fid;
+      gcv.foreground = fg;
+      gcv.background = bg;
+      gc = XCreateGC (dpy, screensaver_window,
+                     (GCFont | GCForeground | GCBackground), &gcv);
+    }
+
+  for (tail = string; *tail; tail++)
+    {
+      if (*tail == '\n' || *tail == '\r')
+       {
+         int maxy = HeightOfScreen (screen) - v_border - v_border;
+         if (tail != head)
+           XDrawImageString (dpy, screensaver_window, gc,
+                             text_x + h_border,
+                             text_y + v_border + font->ascent,
+                             head, tail - head);
+         text_x = 0;
+         text_y += line_height;
+         head = tail + 1;
+         if (*tail == '\r' && *head == '\n')
+           head++, tail++;
+
+         if (text_y > maxy - line_height)
+           {
+#if 0
+             text_y = 0;
+#else
+             int offset = line_height * 5;
+             XCopyArea (dpy, screensaver_window, screensaver_window, gc,
+                        0, v_border + offset,
+                        WidthOfScreen (screen),
+                        (HeightOfScreen (screen) - v_border - v_border
+                         - offset),
+                        0, v_border);
+             XClearArea (dpy, screensaver_window,
+                         0, HeightOfScreen (screen) - v_border - offset,
+                         WidthOfScreen (screen), offset, False);
+             text_y -= offset;
+#endif
+           }
+       }
+    }
+  if (tail != head)
+    {
+      int direction, ascent, descent;
+      XCharStruct overall;
+      XDrawImageString (dpy, screensaver_window, gc,
+                       text_x + h_border, text_y + v_border + font->ascent,
+                       head, tail - head);
+      XTextExtents (font, tail, tail - head,
+                   &direction, &ascent, &descent, &overall);
+      text_x += overall.width;
+    }
+}
+
+
+static void
+stderr_popup_timer_fn (closure, id)
+     XtPointer closure;
+     XtIntervalId *id;
+{
+  char *s = stderr_buffer;
+  if (*s)
+    {
+      /* If too much data was printed, then something has gone haywire,
+        so truncate it. */
+      char *trailer = "\n\n<< stderr diagnostics have been truncated >>\n\n";
+      int max = sizeof (stderr_buffer) - strlen (trailer) - 5;
+      if (strlen (s) > max)
+       strcpy (s + max, trailer);
+      /* Now show the user. */
+      print_stderr (s);
+    }
+
+  stderr_tail = stderr_buffer;
+  stderr_popup_timer = 0;
+}
+
+
+static void
+stderr_callback (XtPointer closure, int *fd, XtIntervalId *id)
+{
+  char *s;
+  int left;
+  int size;
+  int read_this_time = 0;
+
+  if (stderr_tail == 0)
+    stderr_tail = stderr_buffer;
+
+  left = ((sizeof (stderr_buffer) - 2) - (stderr_tail - stderr_buffer));
+
+  s = stderr_tail;
+  *s = 0;
+
+  /* Read as much data from the fd as we can, up to our buffer size. */
+  if (left > 0)
+    {
+      while ((size = read (*fd, (void *) s, left)) > 0)
+       {
+         left -= size;
+         s += size;
+         read_this_time += size;
+       }
+      *s = 0;
+    }
+  else
+    {
+      char buf2 [1024];
+      /* The buffer is full; flush the rest of it. */
+      while (read (*fd, (void *) buf2, sizeof (buf2)) > 0)
+       ;
+    }
+
+  stderr_tail = s;
+  stderr_last_read = time ((time_t *) 0);
+
+  /* Now we have read some data that we would like to put up in a dialog
+     box.  But more data may still be coming in - so don't pop up the
+     dialog right now, but instead, start a timer that will pop it up
+     a second from now.  Should more data come in in the meantime, we
+     will be called again, and will reset that timer again.  So the
+     dialog will only pop up when a second has elapsed with no new data
+     being written to stderr.
+
+     However, if the buffer is full (meaning lots of data has been written)
+     then we don't reset the timer.
+   */
+  if (read_this_time > 0)
+    {
+      if (stderr_popup_timer)
+       XtRemoveTimeOut (stderr_popup_timer);
+
+      stderr_popup_timer =
+       XtAppAddTimeOut (app, 1 * 1000, stderr_popup_timer_fn, 0);
+    }
+}
+
+void
+initialize_stderr ()
+{
+  static Boolean done = False;
+  int fds [2];
+  int in, out;
+  int new_stdout, new_stderr;
+  int stdout_fd = 1;
+  int stderr_fd = 2;
+  int flags;
+  Boolean stderr_dialog_p = get_boolean_resource ("captureStderr", "Boolean");
+  Boolean stdout_dialog_p = get_boolean_resource ("captureStdout", "Boolean");
+
+  real_stderr = stderr;
+  real_stdout = stdout;
+
+  if (!stderr_dialog_p && !stdout_dialog_p)
+    return;
+
+  if (done) return;
+  done = True;
+
+  if (pipe (fds))
+    {
+      perror ("error creating pipe:");
+      return;
+    }
+
+  in = fds [0];
+  out = fds [1];
+
+# ifdef O_NONBLOCK
+  flags = O_NONBLOCK;
+# else
+#  ifdef O_NDELAY
+  flags = O_NDELAY;
+#  else
+  ERROR!! neither O_NONBLOCK nor O_NDELAY are defined.
+#  endif
+# endif
+
+    /* Set both sides of the pipe to nonblocking - this is so that
+       our reads (in stderr_callback) will terminate, and so that
+       out writes (in the client programs) will silently fail when
+       the pipe is full, instead of hosing the program. */
+  if (fcntl (in, F_SETFL, flags) != 0)
+    {
+      perror ("fcntl:");
+      return;
+    }
+  if (fcntl (out, F_SETFL, flags) != 0)
+    {
+      perror ("fcntl:");
+      return;
+    }
+
+  if (stderr_dialog_p)
+    {
+      FILE *new_stderr_file;
+      new_stderr = dup (stderr_fd);
+      if (new_stderr < 0)
+       {
+         perror ("could not dup() a stderr:");
+         return;
+       }
+      if (! (new_stderr_file = fdopen (new_stderr, "w")))
+       {
+         perror ("could not fdopen() the new stderr:");
+         return;
+       }
+      real_stderr = new_stderr_file;
+
+      close (stderr_fd);
+      if (dup2 (out, stderr_fd) < 0)
+       {
+         perror ("could not dup() a new stderr:");
+         return;
+       }
+    }
+
+  if (stdout_dialog_p)
+    {
+      FILE *new_stdout_file;
+      new_stdout = dup (stdout_fd);
+      if (new_stdout < 0)
+       {
+         perror ("could not dup() a stdout:");
+         return;
+       }
+      if (! (new_stdout_file = fdopen (new_stdout, "w")))
+       {
+         perror ("could not fdopen() the new stdout:");
+         return;
+       }
+      real_stdout = new_stdout_file;
+
+      close (stdout_fd);
+      if (dup2 (out, stdout_fd) < 0)
+       {
+         perror ("could not dup() a new stdout:");
+         return;
+       }
+    }
+
+  XtAppAddInput (app, in, (XtPointer) XtInputReadMask, stderr_callback, 0);
+}
old mode 100755 (executable)
new mode 100644 (file)
index 494f846..ab969b1
 #endif
 
 #include <sys/time.h>          /* sys/resource.h needs this for timeval */
-#ifndef VMS
 #include <sys/resource.h>      /* for setpriority() and PRIO_PROCESS */
 #include <sys/wait.h>          /* for waitpid() and associated macros */
-#else
-#include "resource.h"
-#include "wait.h"
-#include <processes.h>
-#define pid_t int
-#define waitpid  wait
-#define fork vfork
-#define random rand
-#endif
 #include <signal.h>            /* for the signal names */
 
 extern char **environ;         /* why isn't this in some header file? */
@@ -158,26 +148,21 @@ exec_screenhack (command)
      what I've seen in Emacs, dealing with process groups isn't especially
      portable.)
    */
-#ifndef VMS
   tmp = command;
   command = (char *) malloc (strlen (tmp) + 6);
   memcpy (command, "exec ", 5);
   memcpy (command + 5, tmp, strlen (tmp) + 1);
-#endif
 
   /* Invoke the shell as "/bin/sh -c 'exec prog -arg -arg ...'" */
-
-#ifndef VMS
   av [ac++] = shell;
   av [ac++] = "-c";
-#endif
   av [ac++] = command;
   av [ac++] = 0;
   
   if (verbose_p)
     printf ("%s: spawning \"%s\" in pid %d.\n", progname, command, getpid ());
 
-#if defined(SYSV) || defined(SVR4) || defined(__hpux) || defined(VMS)
+#if defined(SYSV) || defined(SVR4) || defined(__hpux)
   {
     int old_nice = nice (0);
     int n = nice_inferior - old_nice;
@@ -208,11 +193,7 @@ exec_screenhack (command)
   /* Now overlay the current process with /bin/sh running the command.
      If this returns, it's an error.
    */
-#ifndef VMS
   execve (av [0], av, environ);
-#else
-  system(command);
-#endif
 
   sprintf (buf, "%s: %sexecve() failed", progname, (verbose_p ? "## " : ""));
   perror (buf);
@@ -239,9 +220,6 @@ await_child_death (killed)
   killing = 1;
   if (! pid)
     return;
-#ifdef VMS
-    return;
-#else
 
   do
     {
@@ -307,7 +285,6 @@ await_child_death (killed)
   killing = 0;
   if (suspended_p != True)
     pid = 0;
-#endif /* VMS */
 }
 
 static char *
@@ -457,7 +434,6 @@ suspend_screenhack (suspend_p)
   suspending = suspend_p;
   if (! pid)
     ;
-#ifndef VMS
   else if (kill (pid, (suspend_p ? SIGSTOP : SIGCONT)) < 0)
     {
       char buf [255];
@@ -470,7 +446,6 @@ suspend_screenhack (suspend_p)
   else if (verbose_p)
     printf ("%s: %s pid %d.\n", progname,
            (suspend_p ? "suspending" : "resuming"), pid);
-#endif
 }
 
 \f
@@ -542,10 +517,8 @@ hack_environment ()
   i = strlen (buf);
   s = (char *) malloc (i+1);
   strncpy (s, buf, i+1);
-#ifndef VMS
   if (putenv (s))
     abort ();
-#endif
 }
 
 \f
old mode 100755 (executable)
new mode 100644 (file)
index 9ad0206..ff367e4
@@ -1,4 +1,4 @@
-/* xscreensaver, Copyright (c) 1991-1993 Jamie Zawinski <jwz@mcom.com>
+/* xscreensaver, Copyright (c) 1991-1995 Jamie Zawinski <jwz@mcom.com>
  *
  * Permission to use, copy, modify, distribute, and sell this software and its
  * documentation for any purpose is hereby granted without fee, provided that
@@ -9,19 +9,23 @@
  * implied warranty.
  */
 
+/* #define DEBUG_TIMERS */
+
 #include <stdio.h>
 #include <X11/Xlib.h>
 #include <X11/Intrinsic.h>
 #include <X11/Xos.h>
-#ifndef VMS
 #include <X11/Xmu/Error.h>
-#else
-#include "sys$common:[decw$include.xmu]Error.h"
-#endif
 
-#ifdef HAVE_XIDLE
+#ifdef HAVE_XIDLE_EXTENSION
 #include <X11/extensions/xidle.h>
-#endif
+#endif /* HAVE_XIDLE_EXTENSION */
+
+#ifdef HAVE_SAVER_EXTENSION
+#include <X11/extensions/scrnsaver.h>
+extern int saver_ext_event_number;
+extern Window server_saver_window;
+#endif /* HAVE_SAVER_EXTENSION */
 
 #include "xscreensaver.h"
 
@@ -38,14 +42,15 @@ Time timeout;
 Time pointer_timeout;
 Time notice_events_timeout;
 
-extern Bool use_xidle;
+extern Bool use_xidle_extension;
+extern Bool use_saver_extension;
 extern Bool dbox_up_p;
 extern Bool locked_p;
 extern Window screensaver_window;
 
 extern Bool handle_clientmessage P((XEvent *, Bool));
 
-static time_t last_activity_time; /* for non-XIdle mode */
+static time_t last_activity_time; /* for when we have no server extensions */
 static XtIntervalId timer_id = 0;
 static XtIntervalId check_pointer_timer_id = 0;
 XtIntervalId cycle_id = 0;
@@ -111,7 +116,8 @@ notice_events (window, top_p)
   if (top_p && verbose_p && (events & KeyPressMask))
     {
       /* Only mention one window per tree (hack hack). */
-      printf ("%s: selected KeyPress on 0x%X\n", progname, window);
+      printf ("%s: selected KeyPress on 0x%lX\n", progname,
+             (unsigned long) window);
       top_p = False;
     }
 
@@ -144,7 +150,7 @@ BadWindow_ehandler (dpy, error)
 void
 notice_events_timer (closure, timer)
      XtPointer closure;
-     void *timer;
+     XtIntervalId *timer;
 {
   Window window = (Window) closure;
   int (*old_handler) ();
@@ -178,6 +184,12 @@ cycle_timer (junk1, junk2)
       spawn_screenhack (False);
     }
   cycle_id = XtAppAddTimeOut (app, how_long, cycle_timer, 0);
+
+#ifdef DEBUG_TIMERS
+  if (verbose_p)
+    printf ("%s: starting cycle_timer (%ld, %ld)\n",
+           progname, how_long, cycle_id);
+#endif
 }
 
 
@@ -197,20 +209,29 @@ activate_lock_timer (junk1, junk2)
 static void
 reset_timers P((void))
 {
+  if (use_saver_extension)
+    return;
+
 #ifdef DEBUG_TIMERS
   if (verbose_p)
-    printf ("%s: restarting idle_timer (%d, %d)\n",
+    printf ("%s: restarting idle_timer (%ld, %ld)\n",
            progname, timeout, timer_id);
 #endif
   XtRemoveTimeOut (timer_id);
   timer_id = XtAppAddTimeOut (app, timeout, idle_timer, 0);
   if (cycle_id) abort ();
 
+#ifdef DEBUG_TIMERS
+  if (verbose_p)
+    printf ("%s: starting idle_timer (%ld, %ld)\n",
+           progname, timeout, timer_id);
+#endif
+
   last_activity_time = time ((time_t *) 0);
 }
 
-/* When we aren't using XIdle, this timer is used to periodically wake up
-   and poll the mouse position, which is possibly more reliable than
+/* When we aren't using a server extension, this timer is used to periodically
+   wake up and poll the mouse position, which is possibly more reliable than
    selecting motion events on every window.
  */
 static void
@@ -226,10 +247,9 @@ check_pointer_timer (closure, this_timer)
   int root_x, root_y, x, y;
   unsigned int mask;
   XtIntervalId *timerP = (XtIntervalId *) closure;
-#ifdef HAVE_XIDLE
-  if (use_xidle)
+
+  if (use_xidle_extension || use_saver_extension)
     abort ();
-#endif
 
   *timerP = XtAppAddTimeOut (app, pointer_timeout, check_pointer_timer,
                             closure);
@@ -265,10 +285,18 @@ sleep_until_idle (until_idle_p)
 
   if (until_idle_p)
     {
-      timer_id = XtAppAddTimeOut (app, timeout, idle_timer, 0);
-#ifdef HAVE_XIDLE
-      if (! use_xidle)
+      if (!use_saver_extension)
+       {
+         /* Wake up periodically to ask the server if we are idle. */
+         timer_id = XtAppAddTimeOut (app, timeout, idle_timer, 0);
+#ifdef DEBUG_TIMERS
+         if (verbose_p)
+           printf ("%s: starting idle_timer (%ld, %ld)\n",
+                   progname, timeout, timer_id);
 #endif
+       }
+
+      if (!use_xidle_extension && !use_saver_extension)
        /* start polling the mouse position */
        check_pointer_timer (&check_pointer_timer_id, 0);
     }
@@ -282,8 +310,8 @@ sleep_until_idle (until_idle_p)
        if (until_idle_p)
          {
            Time idle;
-#ifdef HAVE_XIDLE
-           if (use_xidle)
+#ifdef HAVE_XIDLE_EXTENSION
+           if (use_xidle_extension)
              {
                if (! XGetIdleTime (dpy, &idle))
                  {
@@ -293,14 +321,33 @@ sleep_until_idle (until_idle_p)
                  }
              }
            else
-#endif /* HAVE_XIDLE */
-             idle = 1000 * (last_activity_time - time ((time_t *) 0));
+#endif /* HAVE_XIDLE_EXTENSION */
+#ifdef HAVE_SAVER_EXTENSION
+             if (use_saver_extension)
+               {
+                 /* We don't need to do anything in this case - the synthetic
+                    event isn't necessary, as we get sent specific events
+                    to wake us up. */
+                 idle = 0;
+               }
+           else
+#endif /* HAVE_SAVER_EXTENSION */
+             {
+               idle = 1000 * (last_activity_time - time ((time_t *) 0));
+             }
            
            if (idle >= timeout)
              goto DONE;
-           else
-             timer_id = XtAppAddTimeOut (app, timeout - idle,
-                                         idle_timer, 0);
+           else if (!use_saver_extension)
+             {
+               timer_id = XtAppAddTimeOut (app, timeout - idle,
+                                           idle_timer, 0);
+#ifdef DEBUG_TIMERS
+               if (verbose_p)
+                 printf ("%s: starting idle_timer (%ld, %ld)\n",
+                         progname, timeout - idle, timer_id);
+#endif /* DEBUG_TIMERS */
+             }
          }
        break;
 
@@ -310,11 +357,18 @@ sleep_until_idle (until_idle_p)
        break;
 
       case CreateNotify:
-#ifdef HAVE_XIDLE
-       if (! use_xidle)
-#endif
-         XtAppAddTimeOut (app, notice_events_timeout, notice_events_timer,
-                          (XtPointer) event.xcreatewindow.window);
+       if (!use_xidle_extension && !use_saver_extension)
+         {
+           XtAppAddTimeOut (app, notice_events_timeout, notice_events_timer,
+                            (XtPointer) event.xcreatewindow.window);
+#ifdef DEBUG_TIMERS
+           if (verbose_p)
+             printf ("%s: starting notice_events_timer for 0x%X (%lu)\n",
+                     progname,
+                     (unsigned int) event.xcreatewindow.window,
+                     notice_events_timeout);
+#endif /* DEBUG_TIMERS */
+         }
        break;
 
       case KeyPress:
@@ -330,7 +384,7 @@ sleep_until_idle (until_idle_p)
              printf ("%s: MotionNotify at %s\n", progname, timestring ());
            else if (event.xany.type == KeyPress)
              printf ("%s: KeyPress seen on 0x%X at %s\n", progname,
-                     event.xkey.window, timestring ());
+                     (unsigned int) event.xkey.window, timestring ());
          }
 #endif
 
@@ -342,7 +396,59 @@ sleep_until_idle (until_idle_p)
        break;
 
       default:
-       XtDispatchEvent (&event);
+
+#ifdef HAVE_SAVER_EXTENSION
+       if (event.type == saver_ext_event_number)
+         {
+           XScreenSaverNotifyEvent *sevent =
+             (XScreenSaverNotifyEvent *) &event;
+           if (sevent->state == ScreenSaverOn)
+             {
+# ifdef DEBUG_TIMERS
+               if (verbose_p)
+                 printf ("%s: ScreenSaverOn event received at %s\n",
+                         progname, timestring ());
+# endif /* DEBUG_TIMERS */
+
+               /* Get the "real" server window out of the way as soon
+                  as possible. */
+               if (server_saver_window &&
+                   window_exists_p (dpy, server_saver_window))
+                 XUnmapWindow (dpy, server_saver_window);
+
+               if (sevent->kind != ScreenSaverExternal)
+                 {
+# ifdef DEBUG_TIMERS
+                   fprintf (stderr,
+                        "%s: ScreenSaverOn event wasn't of type External!\n",
+                            progname);
+# endif /* DEBUG_TIMERS */
+                 }
+
+               if (until_idle_p)
+                 goto DONE;
+             }
+           else if (sevent->state == ScreenSaverOff)
+             {
+# ifdef DEBUG_TIMERS
+               if (verbose_p)
+                 printf ("%s: ScreenSaverOff event received at %s\n",
+                         progname, timestring ());
+# endif /* DEBUG_TIMERS */
+               if (!until_idle_p)
+                 goto DONE;
+             }
+# ifdef DEBUG_TIMERS
+           else if (verbose_p)
+             printf ("%s: unknown ScreenSaver event received at %s\n",
+                     progname, timestring ());
+# endif /* DEBUG_TIMERS */
+         }
+       else
+
+#endif /* HAVE_SAVER_EXTENSION */
+
+         XtDispatchEvent (&event);
       }
     }
  DONE:
diff --git a/driver/validate.c b/driver/validate.c
deleted file mode 100755 (executable)
index 255fd6c..0000000
Binary files a/driver/validate.c and /dev/null differ
diff --git a/driver/vaxdeccobjs.zip b/driver/vaxdeccobjs.zip
deleted file mode 100755 (executable)
index 9e58ff8..0000000
Binary files a/driver/vaxdeccobjs.zip and /dev/null differ
diff --git a/driver/vaxobjs.zip b/driver/vaxobjs.zip
deleted file mode 100755 (executable)
index 7de07f3..0000000
Binary files a/driver/vaxobjs.zip and /dev/null differ
diff --git a/driver/version.h b/driver/version.h
deleted file mode 100755 (executable)
index 899992b..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-static char *screensaver_id =
-       "@(#)xscreensaver 1.24, by Jamie Zawinski (jwz@mcom.com)";
diff --git a/driver/visual.c b/driver/visual.c
deleted file mode 100755 (executable)
index 75d2e2c..0000000
+++ /dev/null
@@ -1,307 +0,0 @@
-/* xscreensaver, Copyright (c) 1993 Jamie Zawinski <jwz@mcom.com>
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation.  No representations are made about the suitability of this
- * software for any purpose.  It is provided "as is" without express or 
- * implied warranty.
- */
-
-/* This file contains some code for intelligently picking the best visual
-   (where "best" is somewhat biased in the direction of writable cells...)
- */
-
-#if __STDC__
-#include <stdlib.h>
-#include <unistd.h>
-#endif
-
-#ifdef __DECC
-typedef char * caddr_t;
-#endif
-
-#include <stdio.h>
-#include <X11/Xlib.h>
-#include <X11/Xutil.h>
-
-#if __STDC__
-# define P(x)x
-#else
-#define P(x)()
-#endif
-
-#ifndef isupper
-# define isupper(c)  ((c) >= 'A' && (c) <= 'Z')
-#endif
-#ifndef _tolower
-# define _tolower(c)  ((c) - 'A' + 'a')
-#endif
-
-extern char *progname;
-extern char *get_string_resource P((char *, char *));
-
-static Visual *pick_best_visual P ((Screen *));
-static Visual *pick_best_visual_of_class P((Screen *, int));
-static Visual *id_to_visual P((Screen *, int));
-static int visual_depth P((Display *, Visual *));
-static int screen_number P((Screen *));
-static Visual *id_to_visual P((Screen *screen, int id));
-
-
-#define DEFAULT_VISUAL -1
-#define BEST_VISUAL    -2
-#define SPECIFIC_VISUAL        -3
-
-Visual *
-get_visual_resource (dpy, name, class)
-     Display *dpy;
-     char *name, *class;
-{
-  Screen *screen = DefaultScreenOfDisplay (dpy);
-  char c, *v = get_string_resource (name, class);
-  char *tmp;
-  int vclass;
-  unsigned long id;
-
-  if (v)
-    for (tmp = v; *tmp; tmp++)
-      if (isupper (*tmp)) *tmp = _tolower (*tmp);
-
-  if (!v)                                        vclass = BEST_VISUAL;
-  else if (!strcmp (v, "default"))               vclass = DEFAULT_VISUAL;
-  else if (!strcmp (v, "best"))                  vclass = BEST_VISUAL;
-  else if (!strcmp (v, "staticgray"))            vclass = StaticGray;
-  else if (!strcmp (v, "staticcolor"))           vclass = StaticColor;
-  else if (!strcmp (v, "truecolor"))             vclass = TrueColor;
-  else if (!strcmp (v, "grayscale"))             vclass = GrayScale;
-  else if (!strcmp (v, "pseudocolor"))           vclass = PseudoColor;
-  else if (!strcmp (v, "directcolor"))           vclass = DirectColor;
-  else if (1 == sscanf (v, " %ld %c", &id, &c))          vclass = SPECIFIC_VISUAL;
-  else if (1 == sscanf (v, " 0x%lx %c", &id, &c)) vclass = SPECIFIC_VISUAL;
-  else
-    {
-      fprintf (stderr, "%s: unrecognized visual \"%s\".\n", progname, v);
-      vclass = DEFAULT_VISUAL;
-    }
-  if (v) free (v);
-
-  if (vclass == DEFAULT_VISUAL)
-    return DefaultVisualOfScreen (screen);
-  else if (vclass == BEST_VISUAL)
-    return pick_best_visual (screen);
-  else if (vclass == SPECIFIC_VISUAL)
-    {
-      Visual *visual = id_to_visual (screen, id);
-      if (visual) return visual;
-      fprintf (stderr, "%s: no visual with id 0x%x.\n", progname,
-              (unsigned int) id);
-      return DefaultVisualOfScreen (screen);
-    }
-  else
-    {
-      Visual *visual = pick_best_visual_of_class (screen, vclass);
-      if (visual) return visual;
-      fprintf (stderr, "%s: no visual of class %s.\n", progname, v);
-      return DefaultVisualOfScreen (screen);
-    }
-}
-
-static Visual *
-pick_best_visual (screen)
-       Screen *screen;
-{
-  /* The "best" visual is the one on which we can allocate the largest
-     range and number of colors.
-
-     Therefore, a TrueColor visual which is at least 16 bits deep is best.
-     (The assumption here being that a TrueColor of less than 16 bits is
-     really just a PseudoColor visual with a pre-allocated color cube.)
-
-     The next best thing is a PseudoColor visual of any type.  After that
-     come the non-colormappable visuals, and non-color visuals.
-   */
-  Display *dpy = DisplayOfScreen (screen);
-  Visual *visual;
-  if ((visual = pick_best_visual_of_class (screen, TrueColor)) &&
-      visual_depth (dpy, visual) >= 16)
-    return visual;
-  if ((visual = pick_best_visual_of_class (screen, PseudoColor)))
-    return visual;
-  if ((visual = pick_best_visual_of_class (screen, TrueColor)))
-    return visual;
-  if ((visual = pick_best_visual_of_class (screen, DirectColor)))
-    return visual;
-  if ((visual = pick_best_visual_of_class (screen, GrayScale)))
-    return visual;
-  if ((visual = pick_best_visual_of_class (screen, StaticGray)))
-    return visual;
-  return DefaultVisualOfScreen (screen);
-}
-
-static Visual *
-pick_best_visual_of_class (screen, visual_class)
-     Screen *screen;
-     int visual_class;
-{
-  /* The best visual of a class is the one which on which we can allocate
-     the largest range and number of colors, which means the one with the
-     greatest depth and number of cells.
-   */
-  Display *dpy = DisplayOfScreen (screen);
-  XVisualInfo vi_in, *vi_out;
-  int out_count;
-
-  vi_in.class = visual_class;
-  vi_in.screen = screen_number (screen);
-  vi_out = XGetVisualInfo (dpy, (VisualClassMask | VisualScreenMask),
-                          &vi_in, &out_count);
-  if (vi_out)
-    {
-      /* choose the 'best' one, if multiple */
-      int i, best;
-      Visual *visual;
-      for (i = 0, best = 0; i < out_count; i++)
-       /* It's better if it's deeper, or if it's the same depth with
-          more cells (does that ever happen?  Well, it could...) */
-       if ((vi_out [i].depth > vi_out [best].depth) ||
-           ((vi_out [i].depth == vi_out [best].depth) &&
-            (vi_out [i].colormap_size > vi_out [best].colormap_size)))
-         best = i;
-      visual = vi_out [best].visual;
-      XFree ((char *) vi_out);
-      return visual;
-    }
-  else
-    return 0;
-}
-
-static Visual *
-id_to_visual (screen, id)
-     Screen *screen;
-     int id;
-{
-  Display *dpy = DisplayOfScreen (screen);
-  XVisualInfo vi_in, *vi_out;
-  int out_count;
-  vi_in.screen = screen_number (screen);
-  vi_in.visualid = id;
-  vi_out = XGetVisualInfo (dpy, (VisualScreenMask | VisualIDMask),
-                          &vi_in, &out_count);
-  if (vi_out)
-    {
-      Visual *v = vi_out[0].visual;
-      XFree ((char *) vi_out);
-      return v;
-    }
-  return 0;
-}
-
-int
-get_visual_depth (dpy, visual)
-     Display *dpy;
-     Visual *visual;
-{
-  XVisualInfo vi_in, *vi_out;
-  int out_count, d;
-  vi_in.screen = DefaultScreen (dpy);
-  vi_in.visualid = XVisualIDFromVisual (visual);
-  vi_out = XGetVisualInfo (dpy, VisualScreenMask|VisualIDMask,
-                          &vi_in, &out_count);
-  if (! vi_out) abort ();
-  d = vi_out [0].depth;
-  XFree ((char *) vi_out);
-  return d;
-}
-
-
-int
-get_visual_class (dpy, visual)
-     Display *dpy;
-     Visual *visual;
-{
-  XVisualInfo vi_in, *vi_out;
-  int out_count, c;
-  vi_in.screen = DefaultScreen (dpy);
-  vi_in.visualid = XVisualIDFromVisual (visual);
-  vi_out = XGetVisualInfo (dpy, VisualScreenMask|VisualIDMask,
-                          &vi_in, &out_count);
-  if (! vi_out) abort ();
-  c = vi_out [0].class;
-  XFree ((char *) vi_out);
-  return c;
-}
-
-void
-describe_visual (f, dpy, visual)
-     FILE *f;
-     Display *dpy;
-     Visual *visual;
-{
-  Screen *screen = DefaultScreenOfDisplay (dpy);
-  XVisualInfo vi_in, *vi_out;
-  int out_count;
-  vi_in.screen = screen_number (screen);
-  vi_in.visualid = XVisualIDFromVisual (visual);
-  vi_out = XGetVisualInfo (dpy, (VisualScreenMask | VisualIDMask),
-                          &vi_in, &out_count);
-  if (! vi_out) abort ();
-  fprintf (f, "0x%02x (%s depth: %2d, cmap: %3d)\n",
-          (unsigned int) vi_out->visualid,
-          (vi_out->class == StaticGray  ? "StaticGray, " :
-           vi_out->class == StaticColor ? "StaticColor," :
-           vi_out->class == TrueColor   ? "TrueColor,  " :
-           vi_out->class == GrayScale   ? "GrayScale,  " :
-           vi_out->class == PseudoColor ? "PseudoColor," :
-           vi_out->class == DirectColor ? "DirectColor," :
-                                          "UNKNOWN:    "),
-          vi_out->depth, vi_out->colormap_size /*, vi_out->bits_per_rgb*/);
-  XFree ((char *) vi_out);
-}
-
-static int
-screen_number (screen)
-       Screen *screen;
-{
-  Display *dpy = DisplayOfScreen (screen);
-  int i;
-  for (i = 0; i < ScreenCount (dpy); i++)
-    if (ScreenOfDisplay (dpy, i) == screen)
-      return i;
-  abort ();
-}
-
-static int
-visual_depth (dpy, visual)
-       Display *dpy;
-       Visual *visual;
-{
-  XVisualInfo vi_in, *vi_out;
-  int out_count, d;
-  vi_in.screen = DefaultScreen (dpy);
-  vi_in.visualid = XVisualIDFromVisual (visual);
-  vi_out = XGetVisualInfo (dpy, VisualScreenMask|VisualIDMask,
-                          &vi_in, &out_count);
-  if (! vi_out) abort ();
-  d = vi_out [0].depth;
-  XFree ((char *) vi_out);
-  return d;
-}
-
-int
-visual_cells (dpy, visual)
-       Display *dpy;
-       Visual *visual;
-{
-  XVisualInfo vi_in, *vi_out;
-  int out_count, c;
-  vi_in.screen = DefaultScreen (dpy);
-  vi_in.visualid = XVisualIDFromVisual (visual);
-  vi_out = XGetVisualInfo (dpy, VisualScreenMask|VisualIDMask,
-                          &vi_in, &out_count);
-  if (! vi_out) abort ();
-  c = vi_out [0].colormap_size;
-  XFree ((char *) vi_out);
-  return c;
-}
diff --git a/driver/vms.opt b/driver/vms.opt
deleted file mode 100755 (executable)
index 74f08ec..0000000
Binary files a/driver/vms.opt and /dev/null differ
diff --git a/driver/vms_axp.opt b/driver/vms_axp.opt
deleted file mode 100755 (executable)
index 29393bb..0000000
Binary files a/driver/vms_axp.opt and /dev/null differ
diff --git a/driver/vms_decc.opt b/driver/vms_decc.opt
deleted file mode 100755 (executable)
index 0e0d91d..0000000
Binary files a/driver/vms_decc.opt and /dev/null differ
diff --git a/driver/wait.h b/driver/wait.h
deleted file mode 100755 (executable)
index b9e97b0..0000000
+++ /dev/null
@@ -1 +0,0 @@
-/* Null file works for VMS */
old mode 100755 (executable)
new mode 100644 (file)
index 763a941..a9731b0
@@ -1,4 +1,4 @@
-/* xscreensaver, Copyright (c) 1991-1993 Jamie Zawinski <jwz@mcom.com>
+/* xscreensaver, Copyright (c) 1991-1995 Jamie Zawinski <jwz@mcom.com>
  *
  * Permission to use, copy, modify, distribute, and sell this software and its
  * documentation for any purpose is hereby granted without fee, provided that
  */
 
 #include <stdio.h>
-
-#ifdef VMS
-typedef char * caddr_t;
-#endif
-
 #include <X11/Xlib.h>
 #include <X11/Xutil.h>
 #include <X11/Xatom.h>
 #include <X11/Xos.h>
-#ifndef VMS
 #include <X11/Xmu/SysUtil.h>
-#else
-#include "sys$common:[decw$include.xmu]SysUtil.h"
-#endif
 
 #include <signal.h>            /* for the signal names */
 
 #include "xscreensaver.h"
 
+#ifdef HAVE_SAVER_EXTENSION
+#include <X11/extensions/scrnsaver.h>
+extern Bool use_saver_extension;
+#endif /* HAVE_SAVER_EXTENSION */
+
 #if __STDC__
-#ifndef __DECC
 extern int kill (pid_t, int);          /* signal() is in sys/signal.h... */
-#else
-extern int kill (int, int);
-#endif
 #endif /* __STDC__ */
 
+extern Time timeout;
+
 extern Bool lock_p, demo_mode_p;
 
 Atom XA_VROOT, XA_XSETROOT_ID;
@@ -44,6 +38,7 @@ Atom XA_SCREENSAVER_VERSION, XA_SCREENSAVER_ID;
 
 #if __STDC__
 extern void describe_visual (FILE *, Display *, Visual *);
+extern void reset_stderr (void);
 #endif
 
 Window screensaver_window = 0;
@@ -56,6 +51,10 @@ int fade_seconds, fade_ticks;
 static unsigned long black_pixel;
 static Window real_vroot, real_vroot_value;
 
+#ifdef HAVE_SAVER_EXTENSION
+Window server_saver_window = 0;
+#endif /* HAVE_SAVER_EXTENSION */
+
 #define ALL_POINTER_EVENTS \
        (ButtonPressMask | ButtonReleaseMask | EnterWindowMask | \
         LeaveWindowMask | PointerMotionMask | PointerMotionHintMask | \
@@ -160,12 +159,34 @@ ensure_no_screensaver_running ()
 void
 disable_builtin_screensaver ()
 {
-  int timeout, interval, prefer_blank, allow_exp;
+  int server_timeout, server_interval, prefer_blank, allow_exp;
+  /* Turn off the server builtin saver if it is now running. */
   XForceScreenSaver (dpy, ScreenSaverReset);
-  XGetScreenSaver (dpy, &timeout, &interval, &prefer_blank, &allow_exp);
-  if (timeout != 0)
+  XGetScreenSaver (dpy, &server_timeout, &server_interval,
+                  &prefer_blank, &allow_exp);
+
+#ifdef HAVE_SAVER_EXTENSION
+  if (use_saver_extension)
+    {
+      /* Override the values specified with "xset" with our own parameters. */
+      prefer_blank = False;
+      allow_exp = True;
+      server_interval = 0;
+      server_timeout = (timeout / 1000);
+      if (verbose_p)
+       fprintf (stderr,
+                "%s: configuring server for saver timeout of %d seconds.\n",
+                progname, server_timeout);
+      XSetScreenSaver (dpy, server_timeout, server_interval,
+                      prefer_blank, allow_exp);
+    }
+  else
+#endif /* HAVE_SAVER_EXTENSION */
+  if (server_timeout != 0)
     {
-      XSetScreenSaver (dpy, 0, interval, prefer_blank, allow_exp);
+      server_timeout = 0;
+      XSetScreenSaver (dpy, server_timeout, server_interval,
+                      prefer_blank, allow_exp);
       printf ("%s%sisabling server builtin screensaver.\n\
        You can re-enable it with \"xset s on\".\n",
              (verbose_p ? "" : progname), (verbose_p ? "\n\tD" : ": d"));
@@ -250,15 +271,15 @@ kill_xsetroot_data P((void))
          nitems == 1 && bytesafter == 0)
        {
          if (verbose_p)
-           printf ("%s: destroying xsetroot data (0x%X).\n",
+           printf ("%s: destroying xsetroot data (0x%lX).\n",
                    progname, *dataP);
          XKillClient (dpy, *dataP);
        }
       else
        fprintf (stderr, "%s: %sdeleted unrecognised _XSETROOT_ID property: \n\
-       %d, %d; type: %d, format: %d, nitems: %d, bytesafter %d\n",
+       %lu, %lu; type: %lu, format: %d, nitems: %lu, bytesafter %ld\n",
                 progname, (verbose_p ? "## " : ""),
-                dataP, (dataP ? *dataP : 0), type,
+                (unsigned long) dataP, (dataP ? *dataP : 0), type,
                 format, nitems, bytesafter);
     }
 }
@@ -323,8 +344,8 @@ static Bool
 restore_real_vroot_1 P((void))
 {
   if (verbose_p && real_vroot)
-    printf ("%s: restoring __SWM_VROOT property on the real vroot (0x%x).\n",
-           progname, real_vroot);
+    printf ("%s: restoring __SWM_VROOT property on the real vroot (0x%lx).\n",
+           progname, (unsigned long) real_vroot);
   remove_vroot_property (screensaver_window);
   if (real_vroot)
     {
@@ -411,9 +432,7 @@ handle_signals (on_p)
   catch_signal (SIGILL,  "SIGILL",  on_p);
   catch_signal (SIGTRAP, "SIGTRAP", on_p);
   catch_signal (SIGIOT,  "SIGIOT",  on_p);
-#ifndef VMS
   catch_signal (SIGABRT, "SIGABRT", on_p);
-#endif
 #ifdef SIGEMT
   catch_signal (SIGEMT,  "SIGEMT",  on_p);
 #endif
@@ -438,6 +457,21 @@ handle_signals (on_p)
 \f
 /* Managing the actual screensaver window */
 
+Bool
+window_exists_p (dpy, window)
+     Display *dpy;
+     Window window;
+{
+  int (*old_handler) ();
+  XWindowAttributes xgwa;
+  xgwa.screen = 0;
+  old_handler = XSetErrorHandler (BadWindow_ehandler);
+  XGetWindowAttributes (dpy, window, &xgwa);
+  XSync (dpy, False);
+  XSetErrorHandler (old_handler);
+  return (xgwa.screen != 0);
+}
+
 void
 initialize_screensaver_window P((void))
 {
@@ -454,13 +488,14 @@ initialize_screensaver_window P((void))
   int height = HeightOfScreen (screen);
   char id [2048];
 
+  reset_stderr ();
+
   black.red = black.green = black.blue = 0;
 
   if (cmap == DefaultColormapOfScreen (screen))
     cmap = 0;
 
-  if ((install_cmap_p && !demo_mode_p) ||
-      (visual != DefaultVisualOfScreen (screen)))
+  if (install_cmap_p || visual != DefaultVisualOfScreen (screen))
     {
       if (! cmap)
        {
@@ -506,7 +541,74 @@ initialize_screensaver_window P((void))
   attrs.backing_pixel = black_pixel;
   attrs.border_pixel = black_pixel;
 
-/*  if (demo_mode_p || lock_p) width = width / 2;   #### */
+#if 0
+  if (demo_mode_p || lock_p) width = width / 2;  /* #### */
+#endif
+
+  if (screensaver_window || !verbose_p)
+    ;
+  else if (visual == DefaultVisualOfScreen (screen))
+    {
+      fprintf (stderr, "%s: using default visual ", progname);
+      describe_visual (stderr, dpy, visual);
+    }
+  else
+    {
+      fprintf (stderr, "%s: using visual:   ", progname);
+      describe_visual (stderr, dpy, visual);
+      fprintf (stderr, "%s: default visual: ", progname);
+      describe_visual (stderr, dpy, DefaultVisualOfScreen (screen));
+    }
+
+#ifdef HAVE_SAVER_EXTENSION
+  if (use_saver_extension)
+    {
+      XScreenSaverInfo *info;
+      Window root = RootWindowOfScreen (screen);
+
+      /* This call sets the server screensaver timeouts to what we think
+        they should be (based on the resources and args xscreensaver was
+        started with.)  It's important that we do this to sync back up
+        with the server - if we have turned on prematurely, as by an
+        ACTIVATE ClientMessage, then the server may decide to activate
+        the screensaver while it's already active.  That's ok for us,
+        since we would know to ignore that ScreenSaverActivate event,
+        but a side effect of this would be that the server would map its
+        saver window (which we then hide again right away) meaning that
+        the bits currently on the screen get blown away.  Ugly. */
+#if 0
+      /* #### Ok, that doesn't work - when we tell the server that the
+        screensaver is "off" it sends us a Deactivate event, which is
+        sensible... but causes the saver to never come on.  Hmm. */
+      disable_builtin_screensaver ();
+#endif /* 0 */
+
+#if 0
+      /* #### The MIT-SCREEN-SAVER extension gives us access to the
+        window that the server itself uses for saving the screen.
+        However, using this window in any way, in particular, calling
+        XScreenSaverSetAttributes() as below, tends to make the X server
+        crash.  So fuck it, let's try and get along without using it...
+
+        It's also inconvenient to use this window because it doesn't
+        always exist (though the ID is constant.)  So to use this
+        window, we'd have to reimplement the ACTIVATE ClientMessage to
+        tell the *server* to tell *us* to turn on, to cause the window
+        to get created at the right time.  Gag.  */
+      XScreenSaverSetAttributes (dpy, root,
+                                0, 0, width, height, 0,
+                                visual_depth, InputOutput, visual,
+                                attrmask, &attrs);
+      XSync (dpy, False);
+#endif /* 0 */
+
+      info = XScreenSaverAllocInfo ();
+      XScreenSaverQueryInfo (dpy, root, info);
+      server_saver_window = info->window;
+      if (! server_saver_window) abort ();
+      XFree (info);
+    }
+#endif /* HAVE_SAVER_EXTENSION */
 
   if (screensaver_window)
     {
@@ -523,57 +625,54 @@ initialize_screensaver_window P((void))
     }
   else
     {
-      if (! verbose_p)
-       ;
-      else if (visual == DefaultVisualOfScreen (screen))
-       {
-         fprintf (stderr, "%s: using default visual ", progname);
-         describe_visual (stderr, dpy, visual);
-       }
-      else
-       {
-         fprintf (stderr, "%s: using visual:   ", progname);
-         describe_visual (stderr, dpy, visual);
-         fprintf (stderr, "%s: default visual: ", progname);
-         describe_visual (stderr, dpy, DefaultVisualOfScreen (screen));
-       }
-
       screensaver_window =
        XCreateWindow (dpy, RootWindowOfScreen (screen), 0, 0, width, height,
                       0, visual_depth, InputOutput, visual, attrmask,
                       &attrs);
     }
 
-  class_hints.res_name = progname;
-  class_hints.res_class = progclass;
-  XSetClassHint (dpy, screensaver_window, &class_hints);
-  XStoreName (dpy, screensaver_window, "screensaver");
-  XChangeProperty (dpy, screensaver_window, XA_SCREENSAVER_VERSION,
-                  XA_STRING, 8, PropModeReplace,
-                  (unsigned char *) screensaver_version,
-                  strlen (screensaver_version));
-
-  sprintf (id, "%d on host ", getpid ());
-  if (! XmuGetHostname (id + strlen (id), sizeof (id) - strlen (id) - 1))
-    strcat (id, "???");
-  XChangeProperty (dpy, screensaver_window, XA_SCREENSAVER_ID, XA_STRING, 8,
-                  PropModeReplace, (unsigned char *) id, strlen (id));
-
-  if (!cursor)
+#ifdef HAVE_SAVER_EXTENSION
+  if (!use_saver_extension ||
+      window_exists_p (dpy, screensaver_window))
+    /* When using the MIT-SCREEN-SAVER extension, the window pointed to
+       by screensaver_window only exists while the saver is active.
+       So we must be careful to only try and manipulate it while it
+       exists...
+     */
+#endif /* HAVE_SAVER_EXTENSION */
     {
-      Pixmap bit;
-      bit = XCreatePixmapFromBitmapData (dpy, screensaver_window, "\000", 1, 1,
-                                        BlackPixelOfScreen (screen),
-                                        BlackPixelOfScreen (screen), 1);
-      cursor = XCreatePixmapCursor (dpy, bit, bit, &black, &black, 0, 0);
-      XFreePixmap (dpy, bit);
-    }
+      class_hints.res_name = progname;
+      class_hints.res_class = progclass;
+      XSetClassHint (dpy, screensaver_window, &class_hints);
+      XStoreName (dpy, screensaver_window, "screensaver");
+      XChangeProperty (dpy, screensaver_window, XA_SCREENSAVER_VERSION,
+                      XA_STRING, 8, PropModeReplace,
+                      (unsigned char *) screensaver_version,
+                      strlen (screensaver_version));
+
+      sprintf (id, "%d on host ", getpid ());
+      if (! XmuGetHostname (id + strlen (id), sizeof (id) - strlen (id) - 1))
+       strcat (id, "???");
+      XChangeProperty (dpy, screensaver_window, XA_SCREENSAVER_ID, XA_STRING,
+                      8, PropModeReplace, (unsigned char *) id, strlen (id));
+
+      if (!cursor)
+       {
+         Pixmap bit;
+         bit = XCreatePixmapFromBitmapData (dpy, screensaver_window, "\000",
+                                            1, 1,
+                                            BlackPixelOfScreen (screen),
+                                            BlackPixelOfScreen (screen), 1);
+         cursor = XCreatePixmapCursor (dpy, bit, bit, &black, &black, 0, 0);
+         XFreePixmap (dpy, bit);
+       }
 
-  XSetWindowBackground (dpy, screensaver_window, black_pixel);
-  if (! demo_mode_p)
-    XDefineCursor (dpy, screensaver_window, cursor);
-  else
-    XUndefineCursor (dpy, screensaver_window);
+      XSetWindowBackground (dpy, screensaver_window, black_pixel);
+      if (! demo_mode_p)
+       XDefineCursor (dpy, screensaver_window, cursor);
+      else
+       XUndefineCursor (dpy, screensaver_window);
+    }
 }
 
 
@@ -598,6 +697,12 @@ raise_window (inhibit_fade, between_hacks_p)
       fade_colormap (dpy, current_map, cmap2, fade_seconds, fade_ticks, True);
       XClearWindow (dpy, screensaver_window);
       XMapRaised (dpy, screensaver_window);
+
+#ifdef HAVE_SAVER_EXTENSION
+      if (server_saver_window && window_exists_p (dpy, server_saver_window))
+       XUnmapWindow (dpy, server_saver_window);
+#endif /* HAVE_SAVER_EXTENSION */
+
       /* Once the saver window is up, restore the colormap.
         (The "black" pixels of the two colormaps are compatible.) */
       XInstallColormap (dpy, cmap);
@@ -609,9 +714,13 @@ raise_window (inhibit_fade, between_hacks_p)
     {
       XClearWindow (dpy, screensaver_window);
       XMapRaised (dpy, screensaver_window);
+#ifdef HAVE_SAVER_EXTENSION
+      if (server_saver_window && window_exists_p (dpy, server_saver_window))
+       XUnmapWindow (dpy, server_saver_window);
+#endif /* HAVE_SAVER_EXTENSION */
     }
 
-  if (install_cmap_p && !demo_mode_p)
+  if (install_cmap_p)
     XInstallColormap (dpy, cmap);
 }
 
@@ -649,7 +758,7 @@ unblank_screen ()
     }
   else
     {
-      if (install_cmap_p && !demo_mode_p)
+      if (install_cmap_p)
        {
          XClearWindow (dpy, screensaver_window); /* avoid technicolor */
          XInstallColormap (dpy, DefaultColormapOfScreen (screen));
old mode 100755 (executable)
new mode 100644 (file)
index 46af331..15e8606
@@ -1,4 +1,4 @@
-/* xscreensaver-command, Copyright (c) 1991-1994 Jamie Zawinski <jwz@mcom.com>
+/* xscreensaver-command, Copyright (c) 1991-1995 Jamie Zawinski <jwz@mcom.com>
  *
  * Permission to use, copy, modify, distribute, and sell this software and its
  * documentation for any purpose is hereby granted without fee, provided that
@@ -82,7 +82,7 @@ find_screensaver_window (dpy, progname)
          && type != None)
        return kids[i];
     }
-  fprintf (stderr, "%s: no screensaver is running on display %s", progname,
+  fprintf (stderr, "%s: no screensaver is running on display %s\n", progname,
           DisplayString (dpy));
   exit (1);
 }
@@ -91,11 +91,7 @@ find_screensaver_window (dpy, progname)
 #define USAGE() \
  { fprintf (stderr, usage, argv[0], screensaver_version); exit (1); }
 
-#ifndef VMS
 void
-#else
-int
-#endif
 main (argc, argv)
      int argc;
      char **argv;
diff --git a/driver/xscreensaver-command.exe_axp b/driver/xscreensaver-command.exe_axp
deleted file mode 100755 (executable)
index 1293abb..0000000
Binary files a/driver/xscreensaver-command.exe_axp and /dev/null differ
diff --git a/driver/xscreensaver-command.exe_vax b/driver/xscreensaver-command.exe_vax
deleted file mode 100755 (executable)
index 6946978..0000000
Binary files a/driver/xscreensaver-command.exe_vax and /dev/null differ
diff --git a/driver/xscreensaver-command.hlp b/driver/xscreensaver-command.hlp
deleted file mode 100755 (executable)
index 630ea86..0000000
+++ /dev/null
@@ -1,105 +0,0 @@
-1 XSCREENCOMMAND 
-Control a running xscreensaver process
-
-SYNOPSIS
-
-  $ xscreencommand [-activate] [-deactivate] [-cycle] [-next] [-prev] 
-                   [-exit] [-restart] [-demo] [-lock]
-
-2 DESCRIPTION
-The xscreensaver-command program controls a running xscreensaver
-process by sending it client-messages.
-
-2 OPTIONS
-xscreencommand accepts the following options:
-
-   -activate
-Tell the screensaver to turn on immediately (that is, pretend that the 
-user been idle for long enough.)  It will turn off as soon as there is
-any user activity, as usual.
-
-It is useful to run this from a menu; you may wish to run it as
-
-  $ wait 0:00:05
-  $ xscreencommand -activate
-
-to be sure that you have time to remove your hand from the mouse before
-the screensaver comes on.
-
-   -deactivate
-Tell the screensaver to turn off, as if there had been user activity.
-If locking is enabled, then the screensaver will prompt for a password
-as usual.
-
-   -cycle
-Tell the screensaver to change which graphics hack it is running, just
-as if the ``cycle'' timer had expired.
-
-   -next
-This is like either -activate or -cycle, depending on which is
-more appropriate, except that the screenhack that will be run is the next
-one in the list of programs, instead of a randomly-chosen one.  This option
-is good for looking at a demo of each of the screensavers currently available.
-You might want to put this on a menu.
-
-   -prev
-This is like -next, but cycles in the other direction.
-
-   -demo
-Cause the screensaver to enter its interactive demo mode, if it has been
-compiled with support for it.
-
-   -lock
-Like -activate, but a password will be required before the screensaver
-turns off, even if the screensaver's lock resource is false.  The 
-display will be locked immediately even if the screensaver's lockTimeout
-resource is non-zero.
-
-   -exit
-Causes the screensaver process to exit gracefully.  This is a slightly
-safer way to kill the screensaver than by using kill.  
-
-Never use kill -9 with xscreensaver while the screensaver is
-active.  If you are using a virtual root window manager, that can leave
-things in an inconsistent state, and you may need to restart your window
-manager to repair the damage.
-
-   -restart
-Causes the screensaver process to exit and then restart with the same command
-line arguments.  This is a good way of causing the screensaver to re-read the
-resource database.
-
-If the screensaver is run from xdm(1) (that is, it is already running
-before you log in) then you may want to issue the ``restart'' command from 
-one of your startup scripts, so that the screensaver gets your resource
-settings instead of the default ones.
-
-2 ENVIRONMENT
-
-   DISPLAY
-to get the default host and display number.
-
-   PATH
-to find the executable to restart.
-
-2 BUGS
-Diagnostics are reported on the stderr of the xscreensaver
-process, not this process, so the caller of xscreencommand
-may not see the error messages.
-
-2 COPYRIGHT
-Copyright (co 1992, 1993 by Jamie Zawinski.  Permission to use, copy, modify, 
-distribute, and sell this software and its documentation for any purpose is 
-hereby granted without fee, provided that the above copyright notice appear 
-in all copies and that both that copyright notice and this permission notice
-appear in supporting documentation.  No representations are made about the 
-suitability of this software for any purpose.  It is provided "as is" without
-express or implied warranty.
-
-2 AUTHOR
-Jamie Zawinski <jwz@mcom.com>, 13-aug-92.
-
-2 VMS_PORT
-
-Patrick MOREAU - CENA/Athis-Mons - FRANCE (pmoreau@cena.dgac.fr)
-
old mode 100755 (executable)
new mode 100644 (file)
diff --git a/driver/xscreensaver.ad b/driver/xscreensaver.ad
deleted file mode 100755 (executable)
index dda4428..0000000
+++ /dev/null
@@ -1,152 +0,0 @@
-! app-defaults file for XScreenSaver by Jamie Zawinski.
-
-*timeout:      10
-*cycle:                10
-*lockTimeout:  0
-*passwdTimeout:        30
-*nice:         10
-*lock:         False
-*verbose:      False
-*fade:         True
-*unfade:       False
-*fadeSeconds:  1
-*fadeTicks:    75
-
-! Turning on "installColormap" interacts erratically with twm and tvtwm,
-! but seems to work fine with mwm and olwm.  Try it and see.
-!
-*installColormap: False
-
-! Programs on this list apply all the time.
-*programs:     qix -root                                               \n\
-               qix -root -solid -delay 0 -segments 100                 \n\
-               qix -root -linear -count 10 -size 100 -segments 200     \n\
-               attraction -root -mode balls                            \n\
-               attraction -root -mode lines -points 3 -segments 200    \n\
-               attraction -root -mode splines -segments 300            \n\
-               attraction -root -mode lines -radius 300                \
-                       -orbit -vmult 0.5                               \n\
-               pyro -root                                              \n\
-               helix -root                                             \n\
-               rorschach -root -offset 7                               \n\
-               hopalong -root                                          \n\
-               greynetic -root                                         \n\
-               xroger -root                                            \n\
-               imsmap -root                                            \n\
-               slidescreen -root                                       \n\
-               decayscreen -root                                       \n\
-               hypercube -root                                         \n\
-               halo -root                                              \n\
-               maze -root                                              \n\
-               flame -root                                             \n
-
-! Programs on this list are run only for monochrome screens.
-*monoPrograms: qix -root -linear -count 5 -size 200 -spread 30         \
-                       -segments 75 -solid -xor                        \n\
-               rocks -root                                             \n\
-               noseguy -root                                           \n
-
-! Programs on this list are run only for color (really, non-mono) screens.
-*colorPrograms:        qix -root -count 4 -solid -transparent                  \n\
-               qix -root -count 5 -solid -transparent -linear          \
-                       -segments 250 -size 100                         \n\
-               attraction -root -mode polygons                         \n\
-               attraction -root -mode filled-splines -segments 0       \n\
-               attraction -root -glow -points 10                       \n\
-               rocks -root -fg darksalmon                              \n\
-               noseguy -root -fg yellow -bg gray30                     \n
-
-
-! Some other screenhacks that you might want to track down:
-!
-!              xdaliclock -root -builtin2                              \n\
-!              xswarm -r 2>&-                                          \n\
-!              xwave -root                                             \n\
-!              xbouncebits ...                                         \n\
-!              ico -r                                                  \n\
-!              xsplinefun                                              \n\
-!              kaleid -root                                            \n\
-!              xfishtank -c black -d -r 2                              \n\
-
-
-! Resources for the dialog boxes:
-! 
-*fontList:                       *-helvetica-medium-r-*-*-*-120-*-*-*-iso8859-1
-*demoDialog*label1.fontList:     *-helvetica-medium-r-*-*-*-140-*-*-*-iso8859-1
-*passwdDialog*fontList:          *-helvetica-medium-r-*-*-*-140-*-*-*-iso8859-1
-*XmList.fontList:                  *-courier-medium-r-*-*-*-120-*-*-*-iso8859-1
-*XmTextField.fontList:             *-courier-medium-r-*-*-*-120-*-*-*-iso8859-1
-*passwdDialog.passwdText.fontList: *-courier-medium-r-*-*-*-120-*-*-*-iso8859-1
-
-*XmDialogShell*foreground:             black
-*XmDialogShell*background:             gray90
-*XmDialogShell*XmTextField.foreground: black
-*XmDialogShell*XmTextField.background: white
-*XmDialogShell*demoList.foreground:    black
-*XmDialogShell*demoList.background:    white
-*XmDialogShell*rogerLabel.foreground:  red3
-*XmDialogShell*rogerLabel.background:  white
-
-*XmDialogShell.title:          XScreenSaver
-*allowShellResize:             True
-*autoUnmanage:                 False
-
-! This doesn't work.  Motif ignores it if there is a scroll-list!
-*demoDialog.maxWidth:          600
-
-*label1.labelString:           XScreenSaver %s
-*label2.labelString: Copyright Â© 1991-1994 by Jamie Zawinski <jwz@mcom.com>
-*demoList.visibleItemCount:    10
-*demoList.automaticSelection:  True
-*next.labelString:             Run Next
-*prev.labelString:             Run Previous
-*edit.labelString:             Edit Parameters
-*done.labelString:             Exit Demo Mode
-*restart.labelString:          Reinitialize
-
-*resourcesLabel.labelString:   XScreenSaver Parameters
-
-! *timeoutLabel.labelString:   Timeout Minutes
-! *cycleLabel.labelString:     Cycle Seconds
-! *fadeSecondsLabel.labelString:Fade Seconds
-! *fadeTicksLabel.labelString: Fade Ticks
-! *lockLabel.labelString:      Lock Timeout
-! *passwdLabel.labelString:    Password Timeout
-! *resourcesForm*XmTextField.columns:  5
-
-*timeoutLabel.labelString:     Saver Timeout
-*cycleLabel.labelString:       Cycle Timeout
-*fadeSecondsLabel.labelString: Fade Duration
-*fadeTicksLabel.labelString:   Fade Ticks
-*lockLabel.labelString:                Lock Timeout
-*passwdLabel.labelString:      Password Timeout
-*resourcesForm*XmTextField.columns:    8
-
-*verboseToggle.labelString:    Verbose
-*cmapToggle.labelString:       Install Colormap
-*fadeToggle.labelString:       Fade Colormap
-*unfadeToggle.labelString:     Unfade Colormap
-*lockToggle.labelString:       Require Password
-*resourcesDone.labelString:    Done
-*resourcesCancel.labelString:  Cancel
-
-*passwdDialog.title:           Password
-*passwdLabel1.labelString:     XScreenSaver %s
-*passwdLabel2.labelString:     This display is locked.
-*passwdLabel3.labelString:     Please type %s's password to unlock it.
-*passwdDone.labelString:       Done
-*passwdCancel.labelString:     Cancel
-
-*passwdLabel1.alignment:       ALIGNMENT_BEGINNING
-*passwdLabel2.alignment:       ALIGNMENT_BEGINNING
-*passwdLabel3.alignment:       ALIGNMENT_BEGINNING
-*rogerLabel.width:             150
-
-! You probably won't need to change these.  They aren't consulted if the
-! XIdle extension is being used.
-!
-*pointerPollTime:      5
-*initialDelay:         30
-*windowCreationTimeout:        30
-
-*bourneShell:          /bin/sh
old mode 100755 (executable)
new mode 100644 (file)
index 77c06e0..451f953
@@ -1,4 +1,4 @@
-/* xscreensaver, Copyright (c) 1991-1994 Jamie Zawinski <jwz@mcom.com>
+/* xscreensaver, Copyright (c) 1991-1995 Jamie Zawinski <jwz@mcom.com>
  *
  * Permission to use, copy, modify, distribute, and sell this software and its
  * documentation for any purpose is hereby granted without fee, provided that
 
 /*   ========================================================================
  *   First we wait until the keyboard and mouse become idle for the specified
- *   amount of time.  We do this by periodically checking with the XIdle
- *   server extension.
+ *   amount of time.  We do this in one of three different ways: periodically
+ *   checking with the XIdle server extension; selecting key and mouse events
+ *   on (nearly) all windows; or by waiting for the MIT-SCREEN-SAVER extension
+ *   to send us a "you are idle" event.
  *
- *   Then, we map a full screen black window.  
+ *   Then, we map a full screen black window (or, in the case of the 
+ *   MIT-SCREEN-SAVER extension, use the one it gave us.)
  *
  *   We place a __SWM_VROOT property on this window, so that newly-started
  *   clients will think that this window is a "virtual root" window.
  *   and a few other things.  The included "xscreensaver_command" program
  *   sends these messsages.
  *
- *   If we don't have the XIdle extension, then we do the XAutoLock trick:
- *   notice every window that gets created, and wait 30 seconds or so until
- *   its creating process has settled down, and then select KeyPress events on
- *   those windows which already select for KeyPress events.  It's important
- *   that we not select KeyPress on windows which don't select them, because
- *   that would interfere with event propagation.  This will break if any
- *   program changes its event mask to contain KeyRelease or PointerMotion
- *   more than 30 seconds after creating the window, but that's probably
- *   pretty rare.
+ *   If we don't have the XIdle or MIT-SCREENSAVER extensions, then we do the
+ *   XAutoLock trick: notice every window that gets created, and wait 30
+ *   seconds or so until its creating process has settled down, and then
+ *   select KeyPress events on those windows which already select for
+ *   KeyPress events.  It's important that we not select KeyPress on windows
+ *   which don't select them, because that would interfere with event
+ *   propagation.  This will break if any program changes its event mask to
+ *   contain KeyRelease or PointerMotion more than 30 seconds after creating
+ *   the window, but that's probably pretty rare.
  *   
  *   The reason that we can't select KeyPresses on windows that don't have
  *   them already is that, when dispatching a KeyPress event, X finds the
  *   "client changing event mask" problem that the KeyPress events hack does.
  *   I think polling is more reliable.
  *
- *   None of this crap happens if we're using the XIdle extension, so install
- *   it if the description above sounds just too flaky to live.  It is, but
- *   those are your choices.
+ *   None of this crap happens if we're using one of the extensions, so install
+ *   one of them if the description above sounds just too flaky to live.  It
+ *   is, but those are your choices.
  *
- *   A third idle-detection option could be implement (but is not): when running
- *   on the console display ($DISPLAY is `localhost`:0) and we're on a machine
- *   where /dev/tty and /dev/mouse have reasonable last-modification times, we
- *   could just stat those.  But the incremental benefit of implementing this
- *   is really small, so forget I said anything.
+ *   A third idle-detection option could be implement (but is not): when
+ *   running on the console display ($DISPLAY is `localhost`:0) and we're on a
+ *   machine where /dev/tty and /dev/mouse have reasonable last-modification
+ *   times, we could just stat those.  But the incremental benefit of
+ *   implementing this is really small, so forget I said anything.
  *
  *   Debugging hints:
  *     - Have a second terminal handy.
  *       of the keypress events it's selecting for.  This can make your X
  *       server wedge with "no more input buffers."
  *       
- *   ========================================================================
- */
+ *   ======================================================================== */
 
 #if __STDC__
 #include <stdlib.h>
 #include <X11/Xatom.h>
 #include <X11/Intrinsic.h>
 #include <X11/Xos.h>
+#include <X11/Xmu/Error.h>
 
-#ifdef HAVE_XIDLE
+#ifdef HAVE_XIDLE_EXTENSION
 #include <X11/extensions/xidle.h>
-#endif
+#endif /* HAVE_XIDLE_EXTENSION */
+
+#ifdef HAVE_SAVER_EXTENSION
+#include <X11/extensions/scrnsaver.h>
+#endif /* HAVE_SAVER_EXTENSION */
 
 #include "xscreensaver.h"
 
-#if defined(SVR4) || defined(SYSV) || defined(VMS)
+#if defined(SVR4) || defined(SYSV)
 # define srandom(i) srand((unsigned int)(i))
 #else
 # ifndef __linux
@@ -150,7 +157,7 @@ extern unsigned int get_seconds_resource P((char *, char *));
 extern Visual *get_visual_resource P((Display *, char *, char *));
 extern int get_visual_depth P((Display *, Visual *));
 
-extern void notice_events_timer P((XtPointer closure, void *timer));
+extern void notice_events_timer P((XtPointer closure, XtIntervalId *timer));
 extern void cycle_timer P((void *junk1, XtPointer junk2));
 extern void activate_lock_timer P((void *junk1, XtPointer junk2));
 extern void sleep_until_idle P((Bool until_idle_p));
@@ -165,6 +172,7 @@ extern void ungrab_keyboard_and_mouse P((void));
 
 extern void save_argv P((int argc, char **argv));
 
+extern void initialize_stderr P((void));
 
 char *screensaver_version;
 char *progname;
@@ -191,7 +199,8 @@ extern Time pointer_timeout;
 extern Time notice_events_timeout;
 extern XtIntervalId lock_id, cycle_id;
 
-Bool use_xidle;
+Bool use_xidle_extension;
+Bool use_saver_extension;
 Bool verbose_p;
 Bool lock_p, locked_p;
 
@@ -211,6 +220,11 @@ extern Bool demo_mode_p;
 extern Bool dbox_up_p;
 extern int next_mode_p;
 
+#ifdef HAVE_SAVER_EXTENSION
+int saver_ext_event_number = 0;
+int saver_ext_error_number = 0;
+#endif /* HAVE_SAVER_EXTENSION */
+
 static time_t initial_delay;
 
 extern Atom XA_VROOT, XA_XSETROOT_ID;
@@ -236,25 +250,25 @@ extern void demo_mode P((void));
 #endif
 \f
 static XrmOptionDescRec options [] = {
-  { "-timeout",                ".timeout",     XrmoptionSepArg, 0 },
-  { "-idelay",         ".initialDelay",XrmoptionSepArg, 0 },
-  { "-cycle",          ".cycle",       XrmoptionSepArg, 0 },
-  { "-visual",         ".visualID",    XrmoptionSepArg, 0 },
-  { "-lock-timeout",   ".lockTimeout", XrmoptionSepArg, 0 },
-  { "-verbose",                ".verbose",     XrmoptionNoArg, "on" },
-  { "-silent",         ".verbose",     XrmoptionNoArg, "off" },
-  { "-xidle",          ".xidle",       XrmoptionNoArg, "on" },
-  { "-no-xidle",       ".xidle",       XrmoptionNoArg, "off" },
-  { "-lock",           ".lock",        XrmoptionNoArg, "on" },
-  { "-no-lock",                ".lock",        XrmoptionNoArg, "off" }
+  { "-timeout",                   ".timeout",          XrmoptionSepArg, 0 },
+  { "-cycle",             ".cycle",            XrmoptionSepArg, 0 },
+  { "-idelay",            ".initialDelay",     XrmoptionSepArg, 0 },
+  { "-visual",            ".visualID",         XrmoptionSepArg, 0 },
+  { "-lock-timeout",      ".lockTimeout",      XrmoptionSepArg, 0 },
+  { "-install",                   ".installColormap",  XrmoptionNoArg, "on" },
+  { "-no-install",        ".installColormap",  XrmoptionNoArg, "off" },
+  { "-verbose",                   ".verbose",          XrmoptionNoArg, "on" },
+  { "-silent",            ".verbose",          XrmoptionNoArg, "off" },
+  { "-xidle-extension",           ".xidleExtension",   XrmoptionNoArg, "on" },
+  { "-no-xidle-extension", ".xidleExtension",  XrmoptionNoArg, "off" },
+  { "-ss-extension",      ".saverExtension",   XrmoptionNoArg, "on" },
+  { "-no-ss-extension",           ".saverExtension",   XrmoptionNoArg, "off" },
+  { "-lock",              ".lock",             XrmoptionNoArg, "on" },
+  { "-no-lock",                   ".lock",             XrmoptionNoArg, "off" }
 };
 
 static char *defaults[] = {
-#ifndef VMS
 #include "XScreenSaver.ad.h"
-#else
-#include "XScreenSaver_ad.h"
-#endif
  0
 };
 
@@ -262,21 +276,26 @@ static void
 do_help P((void))
 {
   printf ("\
-xscreensaver %s, copyright (c) 1991-1994 by Jamie Zawinski <jwz@mcom.com>.\n\
+xscreensaver %s, copyright (c) 1991-1995 by Jamie Zawinski <jwz@mcom.com>.\n\
 The standard Xt command-line options are accepted; other options include:\n\
 \n\
-    -timeout <minutes>         when the screensaver should activate\n\
-    -cycle <minutes>           how long to let each hack run\n\
-    -idelay <seconds>          how long to sleep before startup\n\
-    -demo                      enter interactive demo mode on startup\n\
-    -verbose                   be loud\n\
-    -silent                    don't\n\
-    -xidle                     use the XIdle server extension\n\
-    -no-xidle                  don't\n\
-    -lock                      require a password before deactivating\n\
-    -no-lock                   don't\n\
-    -lock-timeout <minutes>    grace period before locking; default 0\n\
-    -help                      this message\n\
+    -timeout <minutes>         When the screensaver should activate.\n\
+    -cycle <minutes>           How long to let each hack run.\n\
+    -idelay <seconds>          How long to sleep before startup.\n\
+    -visual <id-or-class>      Which X visual to run on.\n\
+    -demo                      Enter interactive demo mode on startup.\n\
+    -install                   Install a private colormap.\n\
+    -no-install                Don't.\n\
+    -verbose                   Be loud.\n\
+    -silent                    Don't.\n\
+    -xidle-extension           Use the R5 XIdle server extension.\n\
+    -no-xidle-extension        Don't.\n\
+    -saver-extension           Use the R6 MIT-SCREEN-SAVER server extension.\n\
+    -no-saver-extension        Don't.\n\
+    -lock                      Require a password before deactivating.\n\
+    -no-lock                   Don't.\n\
+    -lock-timeout <minutes>    Grace period before locking; default 0.\n\
+    -help                      This message.\n\
 \n\
 Use the `xscreensaver-command' program to control a running screensaver.\n\
 \n\
@@ -286,14 +305,15 @@ more details.\n\n",
          screensaver_version);
 
 #ifdef NO_LOCKING
-  printf("Support for locking was not enabled at compile-time.\n");
+  printf ("Support for locking was not enabled at compile-time.\n");
 #endif
 #ifdef NO_DEMO_MODE
-  printf("Support for demo mode was not enabled at compile-time.\n");
-#endif
-#ifndef HAVE_XIDLE
-  printf("Support for the XIdle extension was not enabled at compile-time.\n");
+  printf ("Support for demo mode was not enabled at compile-time.\n");
 #endif
+#if !defined(HAVE_XIDLE_EXTENSION) && !defined(HAVE_SAVER_EXTENSION)
+  printf ("Support for the XIDLE and MIT-SCREEN-SAVER server extensions\
+ was not\n\enabled at compile-time.\n");
+#endif /* !HAVE_XIDLE_EXTENSION && !HAVE_SAVER_EXTENSION */
 
   fflush (stdout);
   exit (1);
@@ -447,15 +467,27 @@ get_resources P((void))
     }
 #endif /* ! NO_LOCKING */
 
-  /* don't set use_xidle unless it is explicitly specified */
-  if (get_string_resource ("xidle", "Boolean"))
-    use_xidle = get_boolean_resource ("xidle", "Boolean");
+  /* don't set use_xidle_extension unless it is explicitly specified */
+  if (get_string_resource ("xidleExtension", "Boolean"))
+    use_xidle_extension = get_boolean_resource ("xidleExtension", "Boolean");
   else
-#ifdef HAVE_XIDLE      /* pick a default */
-    use_xidle = True;
-#else
-    use_xidle = False;
-#endif
+#ifdef HAVE_XIDLE_EXTENSION    /* pick a default */
+    use_xidle_extension = True;
+#else  /* !HAVE_XIDLE_EXTENSION */
+    use_xidle_extension = False;
+#endif /* !HAVE_XIDLE_EXTENSION */
+
+  /* don't set use_saver_extension unless it is explicitly specified */
+  if (get_string_resource ("saverExtension", "Boolean"))
+    use_xidle_extension = get_boolean_resource ("saverExtension", "Boolean");
+  else
+#ifdef HAVE_SAVER_EXTENSION    /* pick a default */
+    use_saver_extension = True;
+#else  /* !HAVE_SAVER_EXTENSION */
+    use_saver_extension = False;
+#endif /* !HAVE_SAVER_EXTENSION */
+
+
   get_screenhacks ();
 }
 
@@ -486,11 +518,7 @@ extern Bool lock_init P((void));
 static void initialize P((int argc, char **argv));
 static void main_loop P((void));
 
-#ifndef VMS
 void
-#else
-int
-#endif
 main (argc, argv)
      int argc;
      char **argv;
@@ -500,6 +528,19 @@ main (argc, argv)
 }
 
 
+static int
+saver_ehandler (dpy, error)
+     Display *dpy;
+     XErrorEvent *error;
+{
+  fprintf (real_stderr, "\nX error in %s:\n", progname);
+  if (XmuPrintDefaultErrorMessage (dpy, error, real_stderr))
+    exit (-1);
+  else
+    fprintf (real_stderr, " (nonfatal.)\n");
+  return 0;
+}
+
 static void
 #if __STDC__
 initialize_connection (int argc, char **argv)
@@ -544,6 +585,63 @@ initialize_connection (argc, argv)
   XA_LOCK = XInternAtom (dpy, "LOCK", False);
 }
 
+#ifdef HAVE_SAVER_EXTENSION
+
+static int
+ignore_all_errors_ehandler (dpy, error)
+     Display *dpy;
+     XErrorEvent *error;
+{
+  return 0;
+}
+
+static void
+init_saver_extension ()
+{
+  XID kill_id;
+  Atom kill_type;
+  Window root = RootWindowOfScreen (screen);
+  XScreenSaverInfo *info;
+  Pixmap blank_pix = XCreatePixmap (dpy, root, 1, 1, 1);
+
+  /* Kill off the old MIT-SCREEN-SAVER client if there is one.
+     This tends to generate X errors, though (possibly due to a bug
+     in the server extension itself?) so just ignore errors here. */
+  if (XScreenSaverGetRegistered (dpy, XScreenNumberOfScreen (screen),
+                                &kill_id, &kill_type)
+      && kill_id != blank_pix)
+    {
+      int (*old_handler) ();
+      old_handler = XSetErrorHandler (ignore_all_errors_ehandler);
+      XKillClient (dpy, kill_id);
+      XSync (dpy, False);
+      XSetErrorHandler (old_handler);
+    }
+
+  XScreenSaverSelectInput (dpy, root, ScreenSaverNotifyMask);
+
+  XScreenSaverRegister (dpy, XScreenNumberOfScreen (screen),
+                       (XID) blank_pix, XA_PIXMAP);
+  info = XScreenSaverAllocInfo ();
+
+#if 0
+  /* #### I think this is noticing that the saver is on, and replacing it
+     without turning it off first. */
+  saver = info->window;
+  if (info->state == ScreenSaverOn)
+    {
+      if (info->kind != ScreenSaverExternal) 
+       {
+         XResetScreenSaver (display);
+         XActivateScreenSaver (display);
+       }
+      StartSaver ();
+    }
+#endif
+}
+#endif /* HAVE_SAVER_EXTENSION */
+
+
 extern void init_sigchld P((void));
 
 static void
@@ -593,7 +691,7 @@ initialize (argc, argv)
 
   if (verbose_p)
     printf ("\
-%s %s, copyright (c) 1991-1994 by Jamie Zawinski <jwz@mcom.com>.\n\
+%s %s, copyright (c) 1991-1995 by Jamie Zawinski <jwz@mcom.com>.\n\
  pid = %d.\n", progname, screensaver_version, getpid ());
   ensure_no_screensaver_running ();
 
@@ -606,42 +704,82 @@ initialize (argc, argv)
   lock_id = 0;
   locked_p = False;
 
-  if (use_xidle)
+  if (use_saver_extension)
     {
-#ifdef HAVE_XIDLE
+#ifdef HAVE_SAVER_EXTENSION
+      if (! XScreenSaverQueryExtension (dpy,
+                                       &saver_ext_event_number,
+                                       &saver_ext_error_number))
+       {
+         fprintf (stderr,
+        "%s: %sdisplay %s does not support the MIT-SCREEN-SAVER extension.\n",
+                  progname, (verbose_p ? "## " : ""), DisplayString (dpy));
+         use_saver_extension = False;
+       }
+      else if (use_xidle_extension)
+       {
+         fprintf (stderr,
+        "%s: %sMIT-SCREEN-SAVER extension used instead of XIDLE extension.\n",
+                  progname, (verbose_p ? "## " : ""));
+         use_xidle_extension = False;
+       }
+#else  /* !HAVE_SAVER_EXTENSION */
+      fprintf (stderr,
+       "%s: %snot compiled with support for the MIT-SCREEN-SAVER extension.\n",
+              progname, (verbose_p ? "## " : ""));
+      use_saver_extension = False;
+#endif /* !HAVE_SAVER_EXTENSION */
+    }
+
+  if (use_xidle_extension)
+    {
+#ifdef HAVE_XIDLE_EXTENSION
       int first_event, first_error;
       if (! XidleQueryExtension (dpy, &first_event, &first_error))
        {
          fprintf (stderr,
-                  "%s: display %s does not support the XIdle extension.\n",
-                  progname, DisplayString (dpy));
-         use_xidle = 0;
+                  "%s: %sdisplay %s does not support the XIdle extension.\n",
+                  progname, (verbose_p ? "## " : ""), DisplayString (dpy));
+         use_xidle_extension = False;
        }
-#else
-      fprintf (stderr, "%s: not compiled with support for XIdle.\n",
-              progname);
-      use_xidle = 0;
-#endif
+#else  /* !HAVE_XIDLE_EXTENSION */
+      fprintf (stderr, "%s: %snot compiled with support for XIdle.\n",
+              progname, (verbose_p ? "## " : ""));
+      use_xidle_extension = False;
+#endif /* !HAVE_XIDLE_EXTENSION */
     }
 
   init_sigchld ();
 
   disable_builtin_screensaver ();
 
+#ifdef HAVE_SAVER_EXTENSION
+  if (use_saver_extension)
+    init_saver_extension ();
+#endif /* HAVE_SAVER_EXTENSION */
+
+  if (verbose_p && use_saver_extension)
+    fprintf (stderr, "%s: using MIT-SCREEN-SAVER server extension.\n",
+            progname);
+  if (verbose_p && use_xidle_extension)
+    fprintf (stderr, "%s: using XIdle server extension.\n",
+            progname);
+
+  initialize_stderr ();
+  XSetErrorHandler (saver_ehandler);
+
   if (initial_demo_mode_p)
     /* If the user wants demo mode, don't wait around before doing it. */
     initial_delay = 0;
 
-#ifdef HAVE_XIDLE
-  if (! use_xidle)
-#endif
+  if (!use_xidle_extension && !use_saver_extension)
     {
       if (initial_delay)
        {
          if (verbose_p)
            {
              printf ("%s: waiting for %d second%s...", progname,
-                     initial_delay, (initial_delay == 1 ? "" : "s"));
+                     (int) initial_delay, (initial_delay == 1 ? "" : "s"));
              fflush (stdout);
            }
          sleep (initial_delay);
@@ -940,7 +1078,7 @@ handle_clientmessage (event, until_idle_p)
        fprintf (stderr,
                 "%s: %sunrecognised screensaver ClientMessage 0x%x received\n",
                 progname, (verbose_p ? "## " : ""),
-                event->xclient.data.l[0]);
+                (unsigned int) event->xclient.data.l[0]);
       if (str) XFree (str);
     }
   return False;
diff --git a/driver/xscreensaver.dat b/driver/xscreensaver.dat
deleted file mode 100755 (executable)
index d68c3bc..0000000
+++ /dev/null
@@ -1,152 +0,0 @@
-! app-defaults file for XScreenSaver by Jamie Zawinski.
-
-*timeout:      10
-*cycle:                10
-*lockTimeout:  0
-*passwdTimeout:        30
-*nice:         10
-*lock:         False
-*verbose:      False
-*fade:         True
-*unfade:       False
-*fadeSeconds:  1
-*fadeTicks:    75
-
-! Turning on "installColormap" interacts erratically with twm and tvtwm,
-! but seems to work fine with mwm and olwm.  Try it and see.
-!
-*installColormap: False
-
-! Programs on this list apply all the time.
-*programs:     qix -root                                               \n\
-               qix -root -solid -delay 0 -segments 100                 \n\
-               qix -root -linear -count 10 -size 100 -segments 200     \n\
-               attraction -root -mode balls                            \n\
-               attraction -root -mode lines -points 3 -segments 200    \n\
-               attraction -root -mode splines -segments 300            \n\
-               attraction -root -mode lines -radius 300                \
-                       -orbit -vmult 0.5                               \n\
-               pyro -root                                              \n\
-               helix -root                                             \n\
-               rorschach -root -offset 7                               \n\
-               hopalong -root                                          \n\
-               greynetic -root  -delay 1000                            \n\
-               xroger -root                                            \n\
-               imsmap -root                                            \n\
-               slidescreen -root                                       \n\
-               decayscreen -root                                       \n\
-               hypercube -root                                         \n\
-               halo -root                                              \n\
-               maze -root                                              \n\
-               flame -root                                             \n
-
-! Programs on this list are run only for monochrome screens.
-*monoPrograms: qix -root -linear -count 5 -size 200 -spread 30         \
-                       -segments 75 -solid -xor                        \n\
-               rocks -root                                             \n\
-               noseguy -root                                           \n
-
-! Programs on this list are run only for color (really, non-mono) screens.
-*colorPrograms:        qix -root -count 4 -solid -transparent                  \n\
-               qix -root -count 5 -solid -transparent -linear          \
-                       -segments 250 -size 100                         \n\
-               attraction -root -mode polygons                         \n\
-               attraction -root -mode filled-splines -segments 0       \n\
-               attraction -root -glow -points 10                       \n\
-               rocks -root -fg darksalmon                              \n\
-               noseguy -root -fg yellow -bg gray30                     \n
-
-
-! Some other screenhacks that you might want to track down:
-!
-!              xdaliclock -root -builtin2                              \n\
-!              xswarm -r 2>&-                                          \n\
-!              xwave -root                                             \n\
-!              xbouncebits ...                                         \n\
-!              ico -r                                                  \n\
-!              xsplinefun                                              \n\
-!              kaleid -root                                            \n\
-!              xfishtank -c black -d -r 2                              \n\
-
-
-! Resources for the dialog boxes:
-! 
-*fontList:                       *-helvetica-medium-r-*-*-*-120-*-*-*-iso8859-1
-*demoDialog*label1.fontList:     *-helvetica-medium-r-*-*-*-140-*-*-*-iso8859-1
-*passwdDialog*fontList:          *-helvetica-medium-r-*-*-*-140-*-*-*-iso8859-1
-*XmList.fontList:                  *-courier-medium-r-*-*-*-120-*-*-*-iso8859-1
-*XmTextField.fontList:             *-courier-medium-r-*-*-*-120-*-*-*-iso8859-1
-*passwdDialog.passwdText.fontList: *-courier-medium-r-*-*-*-120-*-*-*-iso8859-1
-
-*XmDialogShell*foreground:             black
-*XmDialogShell*background:             gray90
-*XmDialogShell*XmTextField.foreground: black
-*XmDialogShell*XmTextField.background: white
-*XmDialogShell*demoList.foreground:    black
-*XmDialogShell*demoList.background:    white
-*XmDialogShell*rogerLabel.foreground:  red3
-*XmDialogShell*rogerLabel.background:  white
-
-*XmDialogShell.title:          XScreenSaver
-*allowShellResize:             True
-*autoUnmanage:                 False
-
-! This doesn't work.  Motif ignores it if there is a scroll-list!
-*demoDialog.maxWidth:          600
-
-*label1.labelString:           XScreenSaver %s
-*label2.labelString: Copyright Â© 1991-1994 by Jamie Zawinski <jwz@mcom.com>
-*demoList.visibleItemCount:    10
-*demoList.automaticSelection:  True
-*next.labelString:             Run Next
-*prev.labelString:             Run Previous
-*edit.labelString:             Edit Parameters
-*done.labelString:             Exit Demo Mode
-*restart.labelString:          Reinitialize
-
-*resourcesLabel.labelString:   XScreenSaver Parameters
-
-! *timeoutLabel.labelString:   Timeout Minutes
-! *cycleLabel.labelString:     Cycle Seconds
-! *fadeSecondsLabel.labelString:Fade Seconds
-! *fadeTicksLabel.labelString: Fade Ticks
-! *lockLabel.labelString:      Lock Timeout
-! *passwdLabel.labelString:    Password Timeout
-! *resourcesForm*XmTextField.columns:  5
-
-*timeoutLabel.labelString:     Saver Timeout
-*cycleLabel.labelString:       Cycle Timeout
-*fadeSecondsLabel.labelString: Fade Duration
-*fadeTicksLabel.labelString:   Fade Ticks
-*lockLabel.labelString:                Lock Timeout
-*passwdLabel.labelString:      Password Timeout
-*resourcesForm*XmTextField.columns:    8
-
-*verboseToggle.labelString:    Verbose
-*cmapToggle.labelString:       Install Colormap
-*fadeToggle.labelString:       Fade Colormap
-*unfadeToggle.labelString:     Unfade Colormap
-*lockToggle.labelString:       Require Password
-*resourcesDone.labelString:    Done
-*resourcesCancel.labelString:  Cancel
-
-*passwdDialog.title:           Password
-*passwdLabel1.labelString:     XScreenSaver %s
-*passwdLabel2.labelString:     This display is locked.
-*passwdLabel3.labelString:     Please type %s's password to unlock it.
-*passwdDone.labelString:       Done
-*passwdCancel.labelString:     Cancel
-
-*passwdLabel1.alignment:       ALIGNMENT_BEGINNING
-*passwdLabel2.alignment:       ALIGNMENT_BEGINNING
-*passwdLabel3.alignment:       ALIGNMENT_BEGINNING
-*rogerLabel.width:             150
-
-! You probably won't need to change these.  They aren't consulted if the
-! XIdle extension is being used.
-!
-*pointerPollTime:      5
-*initialDelay:         30
-*windowCreationTimeout:        30
-
-*bourneShell:          /bin/sh
diff --git a/driver/xscreensaver.exe_axp b/driver/xscreensaver.exe_axp
deleted file mode 100755 (executable)
index e5db616..0000000
Binary files a/driver/xscreensaver.exe_axp and /dev/null differ
diff --git a/driver/xscreensaver.exe_vax b/driver/xscreensaver.exe_vax
deleted file mode 100755 (executable)
index 9dc4dcd..0000000
Binary files a/driver/xscreensaver.exe_vax and /dev/null differ
old mode 100755 (executable)
new mode 100644 (file)
index 77325a0..751ae0c
@@ -1,4 +1,4 @@
-/* xscreensaver, Copyright (c) 1993 Jamie Zawinski <jwz@mcom.com>
+/* xscreensaver, Copyright (c) 1993, 1995 Jamie Zawinski <jwz@mcom.com>
  *
  * Permission to use, copy, modify, distribute, and sell this software and its
  * documentation for any purpose is hereby granted without fee, provided that
@@ -9,15 +9,13 @@
  * implied warranty.
  */
 
-#ifdef VMS
-#include "config.h"
-#endif /* VMS */
-
 #if __STDC__
 # include <stdlib.h>
 # include <unistd.h>
 #endif
 
+#include <stdio.h>
+
 #if __STDC__
 # define P(x)x
 #else
@@ -44,6 +42,9 @@ extern int visual_depth;
 
 extern Bool verbose_p;
 
+extern FILE *real_stderr;
+extern FILE *real_stdout;
+
 extern void initialize_screensaver_window P((void));
 extern void raise_window P((Bool inhibit_fade, Bool between_hacks_p));
 extern void blank_screen P((void));
@@ -60,3 +61,6 @@ extern void fade_colormap P((Display*, Colormap, Colormap, int, int, Bool));
 extern void blacken_colormap P((Display *, Colormap));
 
 extern int BadWindow_ehandler P((Display *dpy, XErrorEvent *error));
+
+extern char *timestring P((void));
+extern Bool window_exists_p P((Display *dpy, Window window));
diff --git a/driver/xscreensaver.hlp b/driver/xscreensaver.hlp
deleted file mode 100755 (executable)
index 17d2732..0000000
+++ /dev/null
@@ -1,453 +0,0 @@
-1 XSCREENSAVER 
-Run graphics hacks after the user has been idle for a while
-
-SYNOPSIS
-
-  $ xscreensaver [-display host:display.screen] [-timeout int] 
-                 [-cycle int] [-nice int] [-verbose] [-silent] 
-                 [-xidle] [-no-xidle] [-lock] [-no-lock] [-lock-timeout int] 
-                 [-demo] [-visual visual] [-xrm resources]
-2 DESCRIPTION
-The xscreensaver program waits until the keyboard and mouse have been 
-idle for a period, and then runs a graphics demo chosen at random.  It 
-turns off as soon as there is any mouse or keyboard activity.
-
-This program can lock your terminal in order to prevent others from using it,
-though its default mode of operation is merely to display pretty pictures on
-your screen when it is not in use.  
-
-The benefit that this program has over the combination of the xlock (1)
-and xautolock (1) programs is the ease with which new graphics hacks can be 
-installed. You don't need to recompile (or even re-run) this program to add 
-a new display mode.
-
-2 OPTIONS
-xscreensaver accepts the following options:
-
-   -timeout minutes
-The screensaver will activate after the keyboard and mouse have been idle
-for this many minutes.
-
-   -cycle minutes
-After the screensaver has been running for this many minutes, the currently
-running sub-process will be killed (with SIGTERM), and a new one 
-started.  If this is 0, then the sub-process will not be killed; only one
-demo will run until the screensaver is deactivated by user activity.
-
-   -nice integer
-The sub-processes created by xscreensaver will be ``niced'' to this
-level, so that they do not consume cycles that are needed elsewhere.
-
-   -verbose
-Print diagnostics.
-
-   -silent
-
-
-   -xidle
-Use the XIdle server extension to decide whether the user is idle.
-This is the default if xscreensaver has been compiled with support
-for XIdle.  The XIdle method is faster and more reliable than what will
-be done otherwise, so use it if you can.  
-
-   -no-xidle
-Don't use XIdle.
-
-   -lock
-Enable locking: before the screensaver will turn off, it requires you to
-type the password of the person who launched the screensaver, or the root
-password.  (Note: this doesn't work if the screensaver is launched
-by xdm (1) because it can't know the user-id of the logged-in user.)
-
-   -no-lock
-Disable locking.  This is the default.
-
-   -lock-timeout minutes
-This is how long after the screensaver activates that locking is enabled.
-For example, if this is 5, then any user activity within five minutes of
-the time when the screensaver activated will cause the screen to unblank
-without requiring a password.  After 5 minutes, a password will be
-required.  The default is 0, meaning that if locking is enabled, then
-a password will be required as soon as the screensaver activates.
-
-   -visual visual
-Specify which visual to use.  Legal values are:
-
-      best
-  Use the visual which supports the most writable color cells; this is
-  the default.
-
-      default
-  Use the screen's default visual (the visual of the root window.)  This is
-  not necessarily the most colorful visual, which is why it is not the default.
-
-      class
-  One of StaticGray, StaticColor, TrueColor, GrayScale, 
-  PseudoColor, or DirectColor.  Selects the deepest visual of
-  the given class.
-
-      number
-  A number (decimal or hex) is interpreted as a visual id number, as reported
-  by the xdpyinfo (1) program; in this way you can select a shallower visual 
-  if desired.
-
-   -demo
-Enter the interactive demo mode immediately after startup.  Normally
-demo mode is invoked via the xscreencommand (1) program.
-
-2 X_RESOURCES
-xscreensaver understands the following resources:
-
-   timeout (class Time)
-Same as the -timeout command-line option.  Default 10 minutes.
-
-   cycle (class Time)
-Same as the -cycle command-line option.  Default 10 minutes.
-
-   nice (class Nice)
-Same as the -nice command-line option.  Default 10.
-
-   verbose (class Boolean)
-Same as the -verbose command-line option.
-
-   xidle (class Boolean)
-Same as the -xidle command-line option.
-
-   lock (class Boolean)
-Same as the -lock command-line option.
-
-   lockTimeout (class Time)
-Same as the -lock-timeout command-line option.
-
-   fade (class Boolean)
-If this is true, then when the screensaver activates, the current contents
-of the screen will fade to black instead of simply winking out.  This only
-works on displays with writable colormaps.  Default true.  A fade will also
-be done when switching graphics hacks (when the cycle timer expires.)
-
-   unfade (class Boolean)
-If this is true, then when the screensaver deactivates, the original contents
-of the screen will fade in from black instead of appearing immediately.  This
-only works on displays with writable colormaps, and if fade is true
-as well.  Default false.
-
-   fadeSeconds (class Time)
-If fade is true, this is how long the fade will be in  seconds (default 1.)
-
-   fadeTicks (class Integer)
-If fade is true, this is how many times a second the colormap will
-be changed to effect a fade.  Higher numbers yield smoother fades, but
-may make the fades take longer if your server isn't fast enough to keep
-up.  Default 75.
-
-   installColormap (class Boolean)
-Whether a new colormap should be installed while the screensaver is on,
-so that the graphics hacks can get as many colors as possible.  Default
-false.
-
-   passwdTimeout (class Time)
-If lock is true, this is how many seconds the password dialog box
-should be left on the screen before giving up (default 30.)  This should
-not be too large: the X server is grabbed for the duration that the password
-dialog box is up (for security purposes) and leaving the server grabbed for
-too long can cause problems.
-
-   visualID (class VisualID)
-Same as the -visual command-line option.  Default best.
-
-
-   programs (class Programs)
-The graphics hacks which xscreensaver runs when the user is idle.
-The value of this resource is a string, one sh command per line.
-Each line must contain exactly one command -- no semicolons.
-
-When the screensaver starts up, one of these is selected at random, and
-run.  After the cycle period expires, it is killed, and another
-is selected and run.
-
-If the value of this resource (and the applicable one of colorPrograms
-or monoPrograms) is empty, then no programs will be run; the screen
-will simply be made black.
-
-Note that you must escape the newlines; here is an example of how you
-might set this in your .Xdefaults file:
-
-  xscreensaver.programs:  \\
-        qix -root                        \\n\\
-        ico -r -faces -sleep 1 -obj ico  \\n\\
-        xdaliclock -builtin2 -root       \\n\\
-        xwave -root
-
-To use a program as a screensaver, two things are required: that that
-program draw on the root window (or be able to be configured to draw on
-the root window); and that that program understand ``virtual root''
-windows, as used by virtual window managers such as tvtwm.
-
-It is quite easy to make programs understand virtual roots if they
-don't already: you merely need to include the file "vroot.h" in
-them after the standard X includes, and recompile.  This file is distributed
-with X11r5, and is included with xscreensaver as well.
-
-   monoPrograms (class MonoPrograms)
-This resource is appended to the value of the programs resource if
-the display on which the screensaver is running is monochrome.
-
-   colorPrograms (class ColorPrograms)
-This resource is appended to the value of the programs resource if
-the display on which the screensaver is running is not monochrome.
-
-Normally you won't need to change the following resources:
-
-   bourneShell (class BourneShell)
-The pathname of the shell that xscreensaver uses to start subprocesses.
-This must be whatever your local variant of /bin/sh is -- in particular,
-it must not be csh.
-
-   windowCreationTimeout (class Time)
-When XIdle is not in use, this controls the delay between when 
-windows are created and when xscreensaver selects events on them.
-Default 30 seconds.
-
-   pointerPollTime (class Time)
-When XIdle is not in use, this controls how frequently xscreensaver
-checks to see if the mouse position or buttons have changed.  Default 5 seconds.
-
-   initialDelay (class Time)
-When XIdle is not in use, xscreensaver will wait this many seconds
-before selecting events on existing windows, under the assumption that 
-xscreensaver is started during your login procedure, and the window 
-state may be in flux.  Default 30 seconds.
-
-2 HOW_IT_WORKS
-When it is time to activate the screensaver, a full-screen black window is
-created.  This window is given the appropriate properties so that, to any 
-subsequently-created programs, it will appear to be a ``virtual root'' 
-window.  Because of this, any program which draws on the root window (and 
-which understands virtual roots) can be used as a screensaver.
-
-When the user becomes active again, the screensaver window is unmapped and
-the running subprocess is killed by sending it SIGTERM.  This is also
-how the subprocesses are killed when the screensaver decides that it's time
-to run a different demo: the old one is killed and a new one is launched.
-
-Before launching a subprocess, xscreensaver stores an appropriate value
-for $DISPLAY in the environment that the child will recieve.  (This is
-so that if you start xscreensaver with a -display argument, the
-programs which xscreensaver launches will draw on the same display.)
-
-When the screensaver turns off, or is killed, care is taken to restore 
-the ``real'' virtual root window if there is one.  Because of this, it is
-important that you not kill the screensaver process with kill -9 if
-you are running a virtual-root window manager.  If you kill it with -9,
-you may need to restart your window manager to repair the damage.  This
-isn't an issue if you aren't running a virtual-root window manager.
-
-For all the gory details, see the commentary at the top of xscreensaver.c.
-
-You can control a running screensaver process by using the xscreencommand (1)
-program (which see.)
-
-2 ENVIRONMENT
-
-   DISPLAY
-to get the default host and display number.
-
-   XENVIRONMENT
-to get the name of a resource file that overrides the global resources
-stored in the RESOURCE_MANAGER property.
-
-2 USING_XDM
-You can run xscreensaver from your xdm session, so that the 
-screensaver will run even when nobody is logged in on the console.  
-Simply add "xscreensaver &" to your /usr/lib/X11/xdm/Xsetup 
-file.  Because xdm grabs the keyboard, keypresses will not make 
-the screensaver deactivate, but any mouse activity will.
-
-Users may want to add "xscreensaver-command -restart" to their 
-startup scripts, so that the screensaver will be reinitialized with
-their private resource settings when they log in.
-
-It is safe to run this program as root (as xdm is likely to do.)  If 
-run as root, xscreensaver changes its effective user and group ids to
-something safe (like "nobody") before connecting to the X server
-or launching user-specified programs.
-
-Locking doesn't work if the screensaver is launched by xdm.  To get
-around this, you can run the screensaver from xdm without locking, 
-and kill and restart it from your personal X startup script to enable
-locking.
-
-2 DEMO MODE
-If xscreensaver receives the DEMO ClientMessage, it pops up
-a dialog box from which you can examine and experiment with the screensaver's
-client programs.
-
-Clicking left on an element in the scrolling list will place the indicated
-program and its args in the text field to be edited.  Edit the arguments and
-hit return to run the program with the parameters you have specified.
-
-Double-clicking on an element in the scrolling list will run the indicated
-program immediately.
-
-When a client program is launched, the dialog box is hidden.  Clicking
-any mouse button will re-expose the dialog box (but will not kill the 
-client program.)
-
-   Run Next
-Clicking this button will run the next program in the list after the 
-currently-selected one, and will scroll around to the top when it reaches
-the bottom.
-
-   Run Previous
-Opposite of Run Next; at the top, it scrolls around to the bottom.
-
-   Edit Parameters
-This pops up a second dialog box, in which you have the option to 
-interactively change most of the screensaver's operational parameters,
-such as its timeouts, and whether it should hack colormaps.  Changing
-these parameters here will affect only the running xscreensaver
-process; to make the changes permanent, you need to edit your X resource
-file.
-
-   Exit Demo Mode
-Returns to normal screensaver operation.
-
-   Reinitialize
-Causes the screensaver process to exit and then restart with the same 
-command-line arguments.  This causes the X resource database to be 
-re-read.  This is just like the -restart argument to xscreencommand (1)
-except that when executed from this button, the screensaver will 
-automatically return to demo mode after restarting.
-
-2 SEE_ALSO
- xscreencommand (1),
- xlock (1),
- xnlock (1),
- xautolock (1),
- xdm (1),
- qix (1),
- pyro (1),
- helix (1),
- rorschach (1),
- hopalong (1),
- attraction (1),
- greynetic (1),
- rocks (1),
- noseguy (1),
- blitspin (1),
- imsmap (1),
- slidescreen (1),
- hypercube (1),
- flame (1),
- maze (1),
- ico (1),
- xdaliclock (1),
- xbouncebits (1),
- xswarm (1),
- xwave (1),
- xfishtank (1)
-
-2 BUGS
-If you are not using XIdle, and an application does not 
-select KeyPress events on its non-leaf windows within the first
- 30 seconds of their existence, but selects them later, then it is 
-possible that xscreensaver could interfere with the propagation
-of those events.  This isn't very likely, but this is the reason that
-it's a good idea to install the XIdle extension.
-
-Although this program ``nices'' the subprocesses that it starts, 
-graphics-intensive subprograms can still overload the machine by causing
-the X server process itself (which is not ``niced'') to suck a lot of 
-cycles.  Care should be taken to slow down programs intended for use as 
-screensavers by inserting strategic calls to
- sleep (3) or usleep (3).
-
-Also, it will cause your X server to be pretty much permanently swapped in.
-(but the same is true of any program that draws periodically, like xclock or
-xload.)
-
-If the subprocess is drawing too quickly and the connection to the X
-server is a slow one (such as an X terminal running over a phone line) then 
-the screensaver might not turn off right away when the user becomes active
-again (the ico (1) demo has this problem if being run in full-speed mode). 
-This can be alleviated by inserting strategic calls to XSync (3)
-in code intended for use as a screensaver.  This prevents too much graphics
-activity from being buffered up.
-
-The screensaver only runs on the default screen of the display.  If you have
-more than one screen, you can run multiple screensaver processes, one for
-each screen.  This interacts poorly with locking.  In an ideal world, the
-screensaver would save (and lock) both screens simultaniously, and any activity
-would restore both screens.  It would be nice if one could run different hacks
-on each screen simultaniously.  However, I don't have access to a multi-headed
-workstation, so it would be hard for me to implement something like this.
-
-If you don't have Motif, you can't compile with support for locking or
-demo mode.
-
-When the Run Next and Run Previous buttons are used, the selected
-item may not be visible in the window.  It's a Motif bug that selecting a
-different item doesn't scroll the list to show the new selected item.
-
-Locking doesn't work if the screensaver is launched by xdm.
-
-If you get an error message like ``couldn't get password of foo'' then 
-this probably means that you're on a system in which the getpwent (3)
-library routine can only be effectively used by root.  If this is the case, 
-then xscreensaver must be installed as setuid to root.  Care has 
-been taken to make this a safe thing to do.
-There need to be a lot more graphics hacks.  In particular, there should be
-a simulation of a Lavalite (tm).
-The installColormap option doesn't work very well with the twm (1)
-window manager and its descendants.  There is a race condition between the
-screensaver and this window manager, which can result in the screensaver's
-colormap not getting installed properly, meaning the graphics hacks will
-appear in essentially random colors.  The mwm (1) and olwm (1)
-window managers don't seem to have this problem.  The race condition exists
-because X apparently does not provide a way for an OverrideRedirect window to 
-have its own colormap, short of grabbing the server (which is neither a good 
-idea, nor really possible with the current design.)  What happens is that, as 
-soon as the screensaver installs its colormap, twm responds to 
-the ColormapNotify event that is generated by re-instaling the default
-colormap.  Apparently, twm doesn't always do this; it seems to do
-it regularly if the screensaver is activated from a menu item, but seems to
-not do it if the screensaver comes on of its own volition, or is activated
-from another console.  Any thoughts on this problem are welcome...
-The installColormap option has no effect in "demo" mode, since the
-dialog boxes allocate their colors out of the screen's default colormap
-instead of the installed colormap.
-For this same reason, locking doesn't work too well along 
-with installColormap; the dialog box's colors are random.
-Apparently there are some problems with ``XView'' programs getting confused
-and thinking that the screensaver window is the real root window even when
-the screensaver is not active: ClientMessages intended for the window manager
-are sent to the screensaver window instead.  This could be solved by making
-xscreensaver forward all unrecognised ClientMessages to the real root window,
-but there may be other problems as well.
-
-2 COPYRIGHT
-Copyright (co 1992, 1993, 1994 by Jamie Zawinski.  Permission to use, copy, 
-modify, distribute, and sell this software and its documentation for any
-purpose is hereby granted without fee, provided that the above copyright
-notice appear in all copies and that both that copyright notice and this
-permission notice appear in supporting documentation.  No representations are
-made about the suitability of this software for any purpose.  It is provided
-"as is" without express or implied warranty.
-
-2 AUTHOR
-Jamie Zawinski <jwz@mcom.com>, 13-aug-92.
-Please let me know if you find any bugs or make any improvements.
-
-Thanks to David Wojtowicz for implementing lockTimeout.
-
-Thanks to Martin Kraemer for adding support for shadow passwords and 
-locking-disabled diagnostics.
-
-2 VMS_PORT
-
-Patrick MOREAU - CENA/Athis-Mons - FRANCE (pmoreau@cena.dgac.fr)
old mode 100755 (executable)
new mode 100644 (file)
index 3d13f3d..6d7c2f0
 .if n .sp 1
 .if t .sp .5
 ..
-.TH XScreenSaver 1 "12-May-94" "X Version 11"
+.TH XScreenSaver 1 "6-Jan-95" "X Version 11"
 .SH NAME
-xscreensaver - run graphics hacks after the user has been idle for a while
+xscreensaver - graphics hack and screen locker, launched when the user is idle
 .SH SYNOPSIS
 .B xscreensaver
-[\-display \fIhost:display.screen\fP] [\-timeout \fIint\fP] [\-cycle \fIint\fP] [\-nice \fIint\fP] [\-verbose] [\-silent] [\-xidle] [\-no-xidle] [\-lock] [\-no-lock] [\-lock\-timeout \fIint\fP] [\-demo] [\-visual \fIvisual\fP] [\-xrm \fIresources\fP]
+[\-display \fIhost:display.screen\fP] [\-timeout \fIint\fP] [\-cycle \fIint\fP] [\-nice \fIint\fP] [\-verbose] [\-silent] [\-xidle] [\-no-xidle] [\-lock] [\-no-lock] [\-lock\-timeout \fIint\fP] [\-demo] [\-visual \fIvisual\fP] [\-install] [\-no-install] [\-xrm \fIresources\fP]
 .SH DESCRIPTION
 The \fIxscreensaver\fP program waits until the keyboard and mouse have been 
 idle for a period, and then runs a graphics demo chosen at random.  It 
@@ -57,14 +57,24 @@ Print diagnostics.
 .B \-silent
 
 .TP 8
-.B \-xidle
-Use the \fIXIdle\fP server extension to decide whether the user is idle.
+.B \-xidle\-extension
+Use the \fBXIDLE\fP server extension to decide whether the user is idle.
 This is the default if \fIxscreensaver\fP has been compiled with support
-for XIdle.  The XIdle method is faster and more reliable than what will
-be done otherwise, so use it if you can.  
+for this extension.  On X11R4 or X11R5 systems, the XIdle method is faster 
+and more reliable than what will be done otherwise, so use it if you can.
 .TP 8
-.B \-no\-xidle
-Don't use \fIXIdle\fP.
+.B \-no\-xidle\-extension
+Don't use the \fBXIDLE\fP server extension.
+.TP 8
+.B \-ss\-extension
+Use the \fBMIT\-SCREEN\-SAVER\fP server extension to decide whether the user
+is idle.  This is the default if \fIxscreensaver\fP has been compiled with
+support for this extension.  On X11R6 systems, the  \fBMIT\-SCREEN\-SAVER\fP 
+method is faster and more reliable than what will be done otherwise, so use
+it if you can.
+.TP 8
+.B \-no\-ss\-extension
+Don't use the \fBMIT\-SCREEN\-SAVER\fP server extension.
 .TP 8
 .B \-lock
 Enable locking: before the screensaver will turn off, it requires you to
@@ -109,6 +119,13 @@ by the
 program; in this way you can select a shallower visual if desired.
 .RE
 .TP 8
+.B \-no\-install
+Use the default colormap.  This is the default.
+.TP 8
+.B \-install
+Install a private colormap while the screensaver is on, so that the graphics
+hacks can get as many colors as possible.
+.TP 8
 .B \-demo
 Enter the interactive demo mode immediately after startup.  Normally
 demo mode is invoked via the
@@ -162,9 +179,7 @@ may make the fades take longer if your server isn't fast enough to keep
 up.  Default 75.
 .TP 8
 .B installColormap \fR(class \fBBoolean\fP)
-Whether a new colormap should be installed while the screensaver is on,
-so that the graphics hacks can get as many colors as possible.  Default
-false.
+Same as the \fI\-install\fP command-line option.  Default false.
 .TP 8
 .B passwdTimeout \fR(class \fBTime\fP)
 If \fIlock\fP is true, this is how many seconds the password dialog box
@@ -175,7 +190,30 @@ too long can cause problems.
 .TP 8
 .B visualID \fR(class \fBVisualID\fP)
 Same as the \fI\-visual\fP command-line option.  Default \fBbest\fP.
-
+.TP 8
+.B captureStderr \fR(class \fBBoolean\fP)
+Whether \fIxscreensaver\fP should redirect its standard-error stream to the
+window itself.  Since its nature is to take over the screen, you would not
+normally see error messages generated by the screensaver or the programs it
+runs; this resource will cause the output of all relevant programs to be
+drawn on the screensaver window itself instead of written to the controlling
+terminal of the screensaver driver process.  Default: True.
+.TP 8
+.B captureStdout \fR(class \fBBoolean\fP)
+Like \fBcaptureStderr\fP but for the standard-output stream.  Default: True.
+.TP 8
+.B font \fR(class \fBFont\fP)
+The font used for the stdout/stderr text, if \fBcaptureStdout\fP or
+\fBcaptureStderr\fP are true.  Default \fB*\-medium\-r\-*\-140\-*\-m\-*\fP
+(a 14 point fixed-width font.)
+.TP 8
+.B textForeground \fR(class \fBForeground\fP)
+The foreground color used for the stdout/stderr text, if \fBcaptureStdout\fP 
+or \fBcaptureStderr\fP are true.  Default: Yellow.
+.TP 8
+.B textBackground \fR(class \fBBackground\fP)
+The background color used for the stdout/stderr text, if \fBcaptureStdout\fP 
+or \fBcaptureStderr\fP are true.  Default: Black.
 .TP 8
 .B programs \fR(class \fBPrograms\fP)
 The graphics hacks which \fIxscreensaver\fP runs when the user is idle.
@@ -217,6 +255,14 @@ the display on which the screensaver is running is monochrome.
 This resource is appended to the value of the \fIprograms\fP resource if
 the display on which the screensaver is running is not monochrome.
 .PP
+.RS 4
+\fBNOTE: this means that if you want to completely replace the list of 
+programs which xscreensaver runs, you must set at least \fItwo\fP,
+possibly \fIthree\fP resources.  It is not enough to just set 
+the \fBprograms\fP resource -- you must also set \fBcolorPrograms\fP 
+or \fBmonoPrograms\fP or both.\fP
+.RE
+.PP
 Normally you won't need to change the following resources:
 .TP 8
 .B bourneShell \fR(class \fBBourneShell\fP)
@@ -357,6 +403,7 @@ automatically return to demo mode after restarting.
 .BR blitspin (1),
 .BR imsmap (1),
 .BR slidescreen (1),
+.BR decayscreen (1),
 .BR hypercube (1),
 .BR flame (1),
 .BR maze (1),
@@ -367,12 +414,24 @@ automatically return to demo mode after restarting.
 .BR xwave (1),
 .BR xfishtank (1)
 .SH BUGS
-If you are not using \fIXIdle\fP, and an application does not 
-select \fBKeyPress\fP events on its non-leaf windows within the first
-30 seconds of their existence, but selects them later, then it is 
-possible that \fIxscreensaver\fP could interfere with the propagation
-of those events.  This isn't very likely, but this is the reason that
-it's a good idea to install the \fIXIdle\fP extension.
+If you think you have changed the \fBprograms\fP resource but the
+screensaver is ignoring it, you are confused -- you need to set 
+the \fBcolorPrograms\fP and/or \fBmonoPrograms\fP resources as well.
+(This is not a bug, but I mention it here because people think that
+it is with great regularity.)
+.PP
+If you are not making use of one of the server extensions (\fBXIDLE\fP
+or \fBMIT-SCREEN-SAVER\fP), then it is possible, in rare situations,
+for \fIxscreensaver\fP to interfere with event propagation and make
+another X program malfunction.  For this to occur, that other application
+would need to \fInot\fP select \fBKeyPress\fP events on its non-leaf windows
+within the first 30 seconds of their existence, but then select for them later.
+In this case, that client \fImight\fP fail to receive those events.
+This isn't very likely, since programs generally select a constant set
+of events immediately after creating their windows and then don't change
+them, but this is the reason that it's a good idea to install and use one
+of the server extensions instead, to work around this shortcoming in the
+X protocol.
 .PP
 Although this program ``nices'' the subprocesses that it starts, 
 graphics-intensive subprograms can still overload the machine by causing
@@ -410,11 +469,18 @@ workstation, so it would be hard for me to implement something like this.
 If you don't have Motif, you can't compile with support for locking or
 demo mode.
 .PP
-When the \fBRun Next\fP and \fBRun Previous\fP buttons are used, the selected
-item may not be visible in the window.  It's a Motif bug that selecting a
-different item doesn't scroll the list to show the new selected item.
-.PP
 Locking doesn't work if the screensaver is launched by \fIxdm\fP.
+The reason for this is that when it is launched by \fIxdm\fP, the
+screensaver process is owned by some standard user id (such as \fIroot\fP
+or \fIdaemon\fP) instead of the user who is logged in on the console.
+In order for the screensaver to prompt for the password of the person
+who had logged in from \fIxdm\fP, it would need to know who that user was, 
+and there is no reliable and safe way to figure that out.  (And even if 
+there was, there would be some other security issues here as well.)
+
+So if you want to use it as a locker, you must start it with your user id.
+If it has already been started by \fIxdm\fP, you can kill it with
+\fBxscreensaver-command -exit\fP, and then start it again as you.
 .PP
 If you get an error message like ``couldn't get password of foo'' then 
 this probably means that you're on a system in which the
@@ -423,9 +489,6 @@ library routine can only be effectively used by root.  If this is the case,
 then \fIxscreensaver\fP must be installed as setuid to root.  Care has 
 been taken to make this a safe thing to do.
 .PP
-There need to be a lot more graphics hacks.  In particular, there should be
-a simulation of a Lavalite (tm).
-.PP
 The \fBinstallColormap\fP option doesn't work very well with the
 .BR twm (1)
 window manager and its descendants.  There is a race condition between the
@@ -446,23 +509,26 @@ it regularly if the screensaver is activated from a menu item, but seems to
 not do it if the screensaver comes on of its own volition, or is activated
 from another console.  Any thoughts on this problem are welcome...
 .PP
-The \fBinstallColormap\fP option has no effect in "demo" mode, since the
-dialog boxes allocate their colors out of the screen's default colormap
-instead of the installed colormap.
-.PP
-For this same reason, locking doesn't work too well along 
-with \fBinstallColormap\fP; the dialog box's colors are random.
-.PP
 Apparently there are some problems with ``XView'' programs getting confused
 and thinking that the screensaver window is the real root window even when
 the screensaver is not active: ClientMessages intended for the window manager
 are sent to the screensaver window instead.  This could be solved by making
 xscreensaver forward all unrecognised ClientMessages to the real root window,
 but there may be other problems as well.
+.PP
+When using the \fBMIT-SCREEN-SAVER\fP extension in conjunction with 
+the \fBfade\fP option, you may notice an unattractive flicker just before 
+the fade begins.  This is because the server maps a black window just before 
+it tells the \fIxscreensaver\fP process to activate.  The \fIxscreensaver\fP 
+process immediately unmaps that window, but this results in a flicker.  I 
+haven't figured out how to get around this yet.
+.PP
+There need to be a lot more graphics hacks.  In particular, there should be
+a simulation of a Lavalite (tm).
 .SH COPYRIGHT
-Copyright \(co 1992, 1993, 1994 by Jamie Zawinski.  Permission to use, copy
-modify, distribute, and sell this software and its documentation for any
-purpose is hereby granted without fee, provided that the above copyright
+Copyright \(co 1992, 1993, 1994, 1995 by Jamie Zawinski.  Permission to use
+copy, modify, distribute, and sell this software and its documentation for 
+any purpose is hereby granted without fee, provided that the above copyright
 notice appear in all copies and that both that copyright notice and this
 permission notice appear in supporting documentation.  No representations are
 made about the suitability of this software for any purpose.  It is provided
diff --git a/driver/xscreensaver_ad.h b/driver/xscreensaver_ad.h
deleted file mode 100755 (executable)
index 5eefc62..0000000
+++ /dev/null
@@ -1,101 +0,0 @@
-"*timeout: 10",
-"*cycle: 10",
-"*lockTimeout: 0",
-"*passwdTimeout: 30",
-"*nice:         10",
-"*lock:                False",
-"*verbose:     False",
-"*fade:                True",
-"*unfade:      False",
-"*fadeSeconds: 1",
-"*fadeTicks: 75",
-"*installColormap: False",
-"*programs:    qix -root                                               \\n\
-               qix -root -solid -delay 0 -segments 100                 \\n\
-               qix -root -linear -count 10 -size 100 -segments 200     \\n\
-               attraction -root -mode balls                            \\n\
-               attraction -root -mode lines -points 3 -segments 200    \\n\
-               attraction -root -mode splines -segments 300            \\n\
-               attraction -root -mode lines -radius 300                \
-                       -orbit -vmult 0.5                               \\n\
-               pyro -root                                              \\n\
-               helix -root                                             \\n\
-               rorschach -root -offset 7                               \\n\
-               hopalong -root                                          \\n\
-               greynetic -root -delay 1000                             \\n\
-               xroger -root                                            \\n\
-               imsmap -root                                            \\n\
-               slidescreen -root                                       \\n\
-               decayscreen -root                                       \\n\
-               hypercube -root                                         \\n\
-               halo -root                                              \\n\
-               maze -root                                              \\n\
-               flame -root                                             \\n",
-"*monoPrograms:        qix -root -linear -count 5 -size 200 -spread 30         \
-                       -segments 75 -solid -xor                        \\n\
-               rocks -root                                             \\n\
-               noseguy -root                                           \\n",
-"*colorPrograms:       qix -root -count 4 -solid -transparent                  \\n\
-               qix -root -count 5 -solid -transparent -linear          \
-                       -segments 250 -size 100                         \\n\
-               attraction -root -mode polygons                         \\n\
-               attraction -root -mode filled-splines -segments 0       \\n\
-               attraction -root -glow -points 10                       \\n\
-               rocks -root  -fg  lightblue                             \\n\
-               noseguy -root -fg yellow -bg gray30                     \\n",
-"*fontList:                       *-helvetica-medium-r-*-*-*-120-*-*-*-iso8859-1",
-"*demoDialog*label1.fontList:     *-helvetica-medium-r-*-*-*-140-*-*-*-iso8859-1",
-"*passwdDialog*fontList:          *-helvetica-medium-r-*-*-*-140-*-*-*-iso8859-1",
-"*XmList.fontList:                  *-courier-medium-r-*-*-*-120-*-*-*-iso8859-1",
-"*XmTextField.fontList:             *-courier-medium-r-*-*-*-120-*-*-*-iso8859-1",
-"*passwdDialog.passwdText.fontList: *-courier-medium-r-*-*-*-120-*-*-*-iso8859-1",
-"*XmDialogShell*foreground:            black",
-"*XmDialogShell*background:            gray90",
-"*XmDialogShell*XmTextField.foreground:        black",
-"*XmDialogShell*XmTextField.background:        white",
-"*XmDialogShell*demoList.foreground:   black",
-"*XmDialogShell*demoList.background:   white",
-"*XmDialogShell*rogerLabel.foreground: red3",
-"*XmDialogShell*rogerLabel.background: white",
-"*XmDialogShell.title:         XScreenSaver",
-"*allowShellResize:            True",
-"*autoUnmanage:                        False",
-"*demoDialog.maxWidth:         600",
-"*label1.labelString:          XScreenSaver %s",
-"*label2.labelString: Copyright Â© 1991-1994 by Jamie Zawinski <jwz@mcom.com>",
-"*demoList.visibleItemCount:   10",
-"*demoList.automaticSelection: True",
-"*next.labelString:            Run Next",
-"*prev.labelString:            Run Previous",
-"*edit.labelString:            Edit Parameters",
-"*done.labelString:            Exit Demo Mode",
-"*restart.labelString:         Reinitialize",
-"*resourcesLabel.labelString:  XScreenSaver Parameters",
-"*timeoutLabel.labelString:    Saver Timeout",
-"*cycleLabel.labelString:      Cycle Timeout",
-"*fadeSecondsLabel.labelString:        Fade Duration",
-"*fadeTicksLabel.labelString:  Fade Ticks",
-"*lockLabel.labelString:               Lock Timeout",
-"*passwdLabel.labelString:     Password Timeout",
-"*resourcesForm*XmTextField.columns:   8",
-"*verboseToggle.labelString:   Verbose",
-"*cmapToggle.labelString:      Install Colormap",
-"*fadeToggle.labelString:      Fade Colormap",
-"*unfadeToggle.labelString:    Unfade Colormap",
-"*lockToggle.labelString:      Require Password",
-"*resourcesDone.labelString:   Done",
-"*resourcesCancel.labelString: Cancel",
-"*passwdDialog.title:          Password",
-"*passwdLabel1.labelString:    XScreenSaver %s",
-"*passwdLabel2.labelString:    This display is locked.",
-"*passwdLabel3.labelString:    Please type %s's password to unlock it.",
-"*passwdDone.labelString:      Done",
-"*passwdCancel.labelString:    Cancel",
-"*passwdLabel1.alignment:      ALIGNMENT_BEGINNING",
-"*passwdLabel2.alignment:      ALIGNMENT_BEGINNING",
-"*passwdLabel3.alignment:      ALIGNMENT_BEGINNING",
-"*rogerLabel.width:            150",
-"*pointerPollTime: 5",
-"*initialDelay: 30",
-"*windowCreationTimeout: 30",
-"*bourneShell:         /bin/sh",
old mode 100755 (executable)
new mode 100644 (file)
diff --git a/hacks/Imakefile b/hacks/Imakefile
new file mode 100644 (file)
index 0000000..1c68fa9
--- /dev/null
@@ -0,0 +1,72 @@
+/*
+ * Imakefile file for xscreensaver, Copyright (c) 1993, 1995 Jamie Zawinski.
+ *
+ * You should not need to edit this file; edit ../config.h instead.
+ *
+ */
+
+#include "../config.h"
+
+#ifdef HAVE_XPM
+ /* Yeah, this means that all hacks link against libXpm even though only
+    one hack actually uses it.  It doesn't matter: it's a library. */
+# define XPMDEFS -DHAVE_XPM
+# define XPMLIB -lXpm
+#else
+# define XPMDEFS
+# define XPMLIB
+#endif
+
+          UTILS = ../utils
+       INCLUDES = -I$(UTILS)
+        DEFINES = R5ISMS XPMDEFS
+EXTRA_LOAD_FLAGS= $(XMULIB) $(XTOOLLIB) XPMLIB $(EXTENSIONLIB) $(XLIB) -lm
+          HACKS = attraction.c greynetic.c helix.c hopalong.c xroger-hack.c \
+                  noseguy.c pyro.c qix.c rocks.c rorschach.c blitspin.c \
+                  imsmap.c slidescreen.c decayscreen.c maze.c hypercube.c \
+                  halo.c flame.c pedal.c
+            MEN = attraction.man greynetic.man helix.man hopalong.man \
+                  noseguy.man pyro.man xroger.man qix.man rocks.man \
+                  rorschach.man blitspin.man imsmap.man slidescreen.man \
+                  decayscreen.man maze.man hypercube.man halo.man flame.man \
+                  pedal.man
+       TARFILES = README Imakefile screenhack.c $(HACKS) screenhack.h \
+                  vroot.h xlock.h default.xbm $(MEN) .gdbinit noses/\*
+
+all::
+
+echo_tarfiles:
+       @echo $(TARFILES)
+
+#define        ScreenhackTarget(p,ps,deps)                                      @@\
+all:: p                                                                         @@\
+p: deps screenhack.h ps.o $(DEPLIBS)                                    @@\
+       RemoveTargetProgram($@)                                          @@\
+       $(CC) -o $@ $(LDOPTIONS) deps ps.o $(LDLIBS) $(EXTRA_LOAD_FLAGS) @@\
+                                                                        @@\
+InstallProgram(p,$(BINDIR))                                             @@\
+InstallManPage(p,$(MANDIR))                                             @@\
+clean::                                                                         @@\
+       $(RM) p
+
+HOBJS=screenhack.o $(UTILS)/resources.o $(UTILS)/usleep.o $(UTILS)/visual.o
+
+ScreenhackTarget (qix, qix, $(HOBJS) $(UTILS)/hsv.o)
+ScreenhackTarget (helix, helix, $(HOBJS) $(UTILS)/hsv.o)
+ScreenhackTarget (pyro, pyro, $(HOBJS) $(UTILS)/hsv.o)
+ScreenhackTarget (attraction, attraction, $(HOBJS) $(UTILS)/hsv.o $(UTILS)/spline.o)
+ScreenhackTarget (rorschach, rorschach, $(HOBJS) $(UTILS)/hsv.o)
+ScreenhackTarget (hopalong, hopalong, $(HOBJS) $(UTILS)/hsv.o)
+ScreenhackTarget (xroger, xroger-hack, $(HOBJS) $(UTILS)/hsv.o $(UTILS)/xroger.o)
+ScreenhackTarget (rocks, rocks, $(HOBJS))
+ScreenhackTarget (noseguy, noseguy, $(HOBJS))
+ScreenhackTarget (blitspin, blitspin, $(HOBJS))
+ScreenhackTarget (greynetic, greynetic, $(HOBJS))
+ScreenhackTarget (slidescreen, slidescreen, $(HOBJS) $(UTILS)/grabscreen.o)
+ScreenhackTarget (decayscreen, decayscreen, $(HOBJS) $(UTILS)/grabscreen.o)
+ScreenhackTarget (imsmap, imsmap, $(HOBJS) $(UTILS)/hsv.o)
+ScreenhackTarget (maze, maze, $(HOBJS) $(UTILS)/xroger.o)
+ScreenhackTarget (hypercube, hypercube, $(HOBJS))
+ScreenhackTarget (halo, halo, $(HOBJS) $(UTILS)/hsv.o)
+ScreenhackTarget (flame, flame, $(HOBJS) $(UTILS)/hsv.o)
+ScreenhackTarget (pedal, pedal, $(HOBJS) $(UTILS)/hsv.o)
diff --git a/hacks/README b/hacks/README
new file mode 100644 (file)
index 0000000..c5ebcd6
--- /dev/null
@@ -0,0 +1,9 @@
+
+This directory contains various graphics hacks.  These are independent from
+the xscreensaver program (in the ../driver/ directory) but some of them use
+the utility functions found in the ../utils/ directory.
+
+If you have compilation problems, check the parameters in ../config.h.
+
+The file xlock.h makes it really easy to turn `xlock' modules into standalone
+programs that can be used with xscreensaver; check it out.
diff --git a/hacks/aaa_vms.notes b/hacks/aaa_vms.notes
deleted file mode 100755 (executable)
index f5d27ad..0000000
Binary files a/hacks/aaa_vms.notes and /dev/null differ
old mode 100755 (executable)
new mode 100644 (file)
index f5f1c2a..7844154
@@ -38,9 +38,6 @@
 #include "spline.h"
 #include <stdio.h>
 #include <math.h>
-#ifdef VMS
-#define M_PI 3.14159265358979323846
-#endif
 #if __STDC__
 #include <math.h>      /* for M_PI */
 #endif
diff --git a/hacks/attraction.exe_axp b/hacks/attraction.exe_axp
deleted file mode 100755 (executable)
index 1304777..0000000
Binary files a/hacks/attraction.exe_axp and /dev/null differ
diff --git a/hacks/attraction.exe_vax b/hacks/attraction.exe_vax
deleted file mode 100755 (executable)
index 9505448..0000000
Binary files a/hacks/attraction.exe_vax and /dev/null differ
diff --git a/hacks/attraction.hlp b/hacks/attraction.hlp
deleted file mode 100755 (executable)
index 9b9b323..0000000
+++ /dev/null
@@ -1,129 +0,0 @@
-1 ATTRACTION 
-Interactions of opposing forces
-
-SYNOPSIS
-
- $ attraction [-display host:display.screen] [-foreground color] 
-              [-background color] [-window] [-root] [-mono] [-points int]
-              [-threshold int] 
-           [-mode balls | lines | polygons | splines | filled-splines | tails ] 
-              [-color-mode cycle | random] [-size int] [-segments int] 
-              [-delay usecs] [-color-shift degrees] [-radius int] [-vx int] 
-              [-vy int] [-glow] [-noglow] [-orbit]
-
-2 DESCRIPTION
-The attraction program has several visually different modes of 
-operation, all of which are based on the interactions of a set of control
-points which attract each other up to a certain distance, and then begin
-to repel each other.  The attraction/repulsion is proportional to the 
-distance between any two particles.
-
-2 OPTIONS
-Attraction accepts the following options:
-
-    -window
-Draw on a newly-created window.  This is the default.
-
-    -root
-Draw on the root window.
-
-    -mono 
-If on a color display, pretend we're on a monochrome display.
-
-    -points integer
-How many control points should be used, or 0 to select the number randomly.
-Default 0.  Between 3 and 15 works best.
-
-    -threshold integer
-The distance (in pixels) from each particle at which the attractive force
-becomes repulsive.  Default 100.
-
-    -mode "balls | lines | polygons | tails | splines | filled-splines"
-In balls mode (the default) the control points are drawn as filled
-circles.  The larger the circle, the more massive the particle.
-
-In lines mode, the control points are connected by straight lines;
-the effect is something like qix.
-
-In polygons mode, the control points are connected by straight
-lines, and filled in.  This is most interesting in color.
-
-In splines mode, a closed spline is interpolated from the control 
-points.
-
-In filled-splines mode, the splines are filled in instead of being
-outlines.  This is most interesting in color.
-
-In tails mode, the path which each particle follows is indicated
-by a worm-like trail, whose length is controlled by the segments
-parameter.
-
-    -color-mode cycle | random
-Whether colors should cycle through the spectrum, or be picked randomly.
-
-    -size integer
-The size of the balls in pixels, or 0, meaning to select the sizes 
-randomly (the default.)  If this is specified, then all balls will be 
-the same size.  This option has an effect in all modes, since the ``size''
-of the balls controls their mass.
-
-    -segments integer
-If in lines or polygons mode, how many sets of line segments
-or polygons should be drawn. Default 100.  This has no effect in balls
-mode.  If segments is 0, then no segments will ever be erased (this
-is only useful in color.)
-
-    -delay microseconds
-How much of a delay should be introduced between steps of the animation.
-Default 10000, or about 0.01 seconds.
-
-    -color-shift degrees
-If on a color display, the color of the line segments or polygons will 
-cycle through the spectrum.  This specifies how far the hue of each segment
-should be from the next, in degrees on the HSV wheel.  Default 3.
-This has no effect in balls mode.
-
-    -radius
-The size in pixels of the circle on which the points are initially positioned.
-The default is slightly smaller than the size of the window.
-
-    -glow
-This is consulted only in balls mode.  If this is specified, then 
-the saturation of the colors of the points will vary according to their
-current acceleration.  This has the effect that the balls flare brighter
-when they are reacting to each other most strongly.
-
-In glow mode, all of the balls will be drawn the same (random)
-color, modulo the saturation shifts.  In non-glow mode, the balls will
-each be drawn in a random color that doesn't change.
-
-    -noglow
-Don't do ``glowing.''  This is the default.
-
-    -vx pixels
-
-    -vy pixels
-Initial velocity of the balls.  This has no effect in \fB\-orbit mode.
-
-    -orbit
-Make the initial force on each ball be tangential to the circle on which
-they are initially placed, with the right velocity to hold them in orbit
-about each other.  After a while, roundoff errors will cause the orbit
-to decay.
-
-    -vmult float
-In orbit mode, the initial velocity of the balls is multiplied by this;
-a number less than 1 will make the balls pull closer together, and a larger
-number will make them move apart.  The default is 1, meaning stability.
-
-2 COPYRIGHT
-Copyright (co 1992, 1993 by Jamie Zawinski.  Permission to use, copy, modify, 
-distribute, and sell this software and its documentation for any purpose is 
-hereby granted without fee, provided that the above copyright notice appear 
-in all copies and that both that copyright notice and this permission notice
-appear in supporting documentation.  No representations are made about the 
-suitability of this software for any purpose.  It is provided "as is" without
-express or implied warranty.
-
-2 AUTHOR
-Jamie Zawinski <jwz@mcom.com>, 13-aug-92.
old mode 100755 (executable)
new mode 100644 (file)
index 12c7506..334898e
@@ -3,7 +3,7 @@
 attraction - interactions of opposing forces
 .SH SYNOPSIS
 .B attraction
-[\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] [\-background \fIcolor\fP] [\-window] [\-root] [\-mono] [\-points \fIint\fP] [\-threshold \fIint\fP] [\-mode balls | lines | polygons | splines | filled-splines | tails ] [\-color-mode cycle | random] [\-size \fIint\fP] [\-segments \fIint\fP] [\-delay \fIusecs\fP] [\-color-shift \fIdegrees\fP] [\-radius \fIint\fP] [\-vx \fIint\fP] [\-vy \fIint\fP] [\-glow] [\-noglow] [\-orbit]
+[\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] [\-background \fIcolor\fP] [\-window] [\-root] [\-mono] [\-install] [\-visual \fIvisual\fP] [\-points \fIint\fP] [\-threshold \fIint\fP] [\-mode balls | lines | polygons | splines | filled-splines | tails ] [\-color-mode cycle | random] [\-size \fIint\fP] [\-segments \fIint\fP] [\-delay \fIusecs\fP] [\-color-shift \fIdegrees\fP] [\-radius \fIint\fP] [\-vx \fIint\fP] [\-vy \fIint\fP] [\-glow] [\-noglow] [\-orbit]
 .SH DESCRIPTION
 The \fIattraction\fP program has several visually different modes of 
 operation, all of which are based on the interactions of a set of control
@@ -23,6 +23,13 @@ Draw on the root window.
 .B \-mono 
 If on a color display, pretend we're on a monochrome display.
 .TP 8
+.B \-install
+Install a private colormap for the window.
+.TP 8
+.B \-visual \fIvisual\fP
+Specify which visual to use.  Legal values are the name of a visual class,
+or the id number (decimal or hex) of a specific visual.
+.TP 8
 .B \-points integer
 How many control points should be used, or 0 to select the number randomly.
 Default 0.  Between 3 and 15 works best.
diff --git a/hacks/axpobjs.zip b/hacks/axpobjs.zip
deleted file mode 100755 (executable)
index c6d13e4..0000000
Binary files a/hacks/axpobjs.zip and /dev/null differ
old mode 100755 (executable)
new mode 100644 (file)
index 091d84d..10f49dd
 # endif
 #endif
 
-#ifndef VMS
 #include <X11/Xmu/Drawing.h>
-#else
-#include "sys$common:[decw$include.xmu]Drawing.h"
-#endif
 
 #include "default.xbm"
 
diff --git a/hacks/blitspin.exe_axp b/hacks/blitspin.exe_axp
deleted file mode 100755 (executable)
index 4f0b799..0000000
Binary files a/hacks/blitspin.exe_axp and /dev/null differ
diff --git a/hacks/blitspin.exe_vax b/hacks/blitspin.exe_vax
deleted file mode 100755 (executable)
index 7fa2af4..0000000
Binary files a/hacks/blitspin.exe_vax and /dev/null differ
diff --git a/hacks/blitspin.hlp b/hacks/blitspin.hlp
deleted file mode 100755 (executable)
index 2a2cfa2..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-1 BLITSPIN 
-Rotate a bitmap in an interesting way
-
-SYNOPSIS
-
- $ blitspin [-display host:display.screen] [-foreground color] 
-            [-background color] [-window] [-root] [-mono] [-bitmap filename] 
-            [-delay usecs] [-delay2 usecs]
-
-2 DESCRIPTION
-The blitspin program repeatedly rotates a bitmap by 90 degrees by
-using logical operations: the bitmap is divided into quadrants, and the
-quadrants are shifted clockwise.  Then the same thing is done again with
-progressively smaller quadrants, except that all sub-quadrants of a 
-given size are rotated in parallel.  So this takes aO(16*log2(N)) 
-blits of size NxN, with the limitation that the image must be square,
-and the size must be a power of 2.
-
-2 OPTIONS
-blitspin accepts the following options:
-
-   -window
-Draw on a newly-created window.  This is the default.
-
-   -root
-Draw on the root window.
-
-   -mono 
-If on a color display, pretend we're on a monochrome display.
-
-   -bitmap bitmap-name
-The file name of a bitmap to rotate.  It need not be square: it 
-will be padded with the background color.  If unspecified or the
-string (default), a builtin bitmap is used.
-
-If support for the XPM library was enabled at compile-time, 
-the specified file may be in XPM format as well as XBM, and thus 
-may be a color image.
-
-The XPM*bitmapFilePath resource will be searched if the bitmap
-name is not a fully-qualified pathname.
-
-2 ENVIRONMENT
-
-   -delay microseconds
-How long to delay between steps of the rotation process, in microseconds.
-Default is 500000, one-half second.
-
-   -delay2 microseconds
-How long to delay between each 90-degree rotation, in microseconds.
-Default is 500000, one-half second.
-
-   DISPLAY
-to get the default host and display number.
-
-   XENVIRONMENT
-to get the name of a resource file that overrides the global resources
-stored in the RESOURCE_MANAGER property.
-
-2 COPYRIGHT
-Copyright (co 1992, 1993 by Jamie Zawinski.  Permission to use, copy, modify, 
-distribute, and sell this software and its documentation for any purpose is 
-hereby granted without fee, provided that the above copyright notice appear 
-in all copies and that both that copyright notice and this permission notice
-appear in supporting documentation.  No representations are made about the 
-suitability of this software for any purpose.  It is provided "as is" without
-express or implied warranty.
-
-2 AUTHOR
-Jamie Zawinski <jwz@mcom.com>, 17-aug-92.
-
-Based on SmallTalk code which appeared in the August 1981 issue of Byte
-magazine.
old mode 100755 (executable)
new mode 100644 (file)
index 08b7ff0..4903faa
@@ -3,7 +3,7 @@
 blitspin - rotate a bitmap in an interesting way
 .SH SYNOPSIS
 .B blitspin
-[\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] [\-background \fIcolor\fP] [\-window] [\-root] [\-mono] [\-bitmap \fIfilename\fP] [\-delay \fIusecs\fP] [\-delay2 \fIusecs\fP]
+[\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] [\-background \fIcolor\fP] [\-window] [\-root] [\-mono] [\-install] [\-visual \fIvisual\fP] [\-bitmap \fIfilename\fP] [\-delay \fIusecs\fP] [\-delay2 \fIusecs\fP]
 .SH DESCRIPTION
 The \fIblitspin\fP program repeatedly rotates a bitmap by 90 degrees by
 using logical operations: the bitmap is divided into quadrants, and the
@@ -25,18 +25,24 @@ Draw on the root window.
 .B \-mono 
 If on a color display, pretend we're on a monochrome display.
 .TP 8
-.B \-bitmap bitmap-name
+.B \-install
+Install a private colormap for the window.
+.TP 8
+.B \-visual \fIvisual\fP
+Specify which visual to use.  Legal values are the name of a visual class,
+or the id number (decimal or hex) of a specific visual.
+.TP 8
+.B \-bitmap \fIfilename\fP
 The file name of a bitmap to rotate.  It need not be square: it 
 will be padded with the background color.  If unspecified or the
 string \fI(default)\fP, a builtin bitmap is used.
 
-If support for the \fBXPM\fP library was enabled at compile-time, 
-the specified file may be in XPM format as well as XBM, and thus 
-may be a color image.
+If support for the \fIXPM\fP library was enabled at compile-time, 
+the specified file may be in \fIXPM\fP format as well as \fIXBM\fP, and 
+thus may be a color image.
 
 The \fB*bitmapFilePath\fP resource will be searched if the bitmap
 name is not a fully-qualified pathname.
-.SH ENVIRONMENT
 .PP
 .TP 8
 .B \-delay microseconds
@@ -49,7 +55,7 @@ How long to delay between each 90-degree rotation, in microseconds.
 Default is 500000, one-half second.
 .B DISPLAY
 to get the default host and display number.
-.TP 8
+.SH ENVIRONMENT
 .B XENVIRONMENT
 to get the name of a resource file that overrides the global resources
 stored in the RESOURCE_MANAGER property.
diff --git a/hacks/compile.com b/hacks/compile.com
deleted file mode 100755 (executable)
index 96dbc54..0000000
Binary files a/hacks/compile.com and /dev/null differ
diff --git a/hacks/compile_axp.com b/hacks/compile_axp.com
deleted file mode 100755 (executable)
index 37d5cc6..0000000
Binary files a/hacks/compile_axp.com and /dev/null differ
diff --git a/hacks/compile_decc.com b/hacks/compile_decc.com
deleted file mode 100755 (executable)
index 7d52903..0000000
Binary files a/hacks/compile_decc.com and /dev/null differ
old mode 100755 (executable)
new mode 100644 (file)
diff --git a/hacks/decayscreen.exe_axp b/hacks/decayscreen.exe_axp
deleted file mode 100755 (executable)
index 2a16d4a..0000000
Binary files a/hacks/decayscreen.exe_axp and /dev/null differ
diff --git a/hacks/decayscreen.exe_vax b/hacks/decayscreen.exe_vax
deleted file mode 100755 (executable)
index 7da33ab..0000000
Binary files a/hacks/decayscreen.exe_vax and /dev/null differ
diff --git a/hacks/decayscreen.hlp b/hacks/decayscreen.hlp
deleted file mode 100755 (executable)
index 94f4db5..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-1 DECAYSCREEN
-Make a screen meltdown.
-
-SYNOPSIS
-   decayscreen [-display host:display.screen] [-window] [-root] [-mono] 
-               [-delay usecs]
-
-2 DESCRIPTION
-The decayscreen program creates a melting effect by randomly
-shifting rectangles around the screen.
-
-2 OPTIONS
-decayscreen accepts the following options:
-
-   -window
-Draw on a newly-created window.  This is the default.
-
-   -root
-Draw on the root window.
-
-   -mono 
-If on a color display, pretend we're on a monochrome display.
-
-   -delay microseconds
-Slow it down.
-
-2 ENVIRONMENT
-
-   DISPLAY
-to get the default host and display number.
-
-   XENVIRONMENT
-to get the name of a resource file that overrides the global resources
-stored in the RESOURCE_MANAGER property.
-
-2 COPYRIGHT
-Copyright 1992 by Vivek Khera.  Permission to use, copy, modify, distribute, 
-and sell this software and its documentation for any purpose is hereby granted
-without fee, provided that the above copyright notice appear in all copies and
-that both that copyright notice and this permission notice appear in 
-supporting documentation.  No representations are made about the suitability
-of this software for any purpose.  It is provided "as is" without express or
-implied warranty.
-
-2 AUTHOR
-Vivek Khera <khera@cs.duke.edu>, 05-Aug-93; based on code by David Wald, 1988.
old mode 100755 (executable)
new mode 100644 (file)
index a165e03..007301b
@@ -3,7 +3,7 @@
 decayscreen - make a screen meltdown.
 .SH SYNOPSIS
 .B decayscreen
-[\-display \fIhost:display.screen\fP] [\-window] [\-root] [\-mono] [\-delay \fIusecs\fP]
+[\-display \fIhost:display.screen\fP] [\-window] [\-root] [\-mono] [\-install] [\-visual \fIvisual\fP] [\-delay \fIusecs\fP]
 .SH DESCRIPTION
 The \fIdecayscreen\fP program creates a melting effect by randomly
 shifting rectangles around the screen.
@@ -20,7 +20,14 @@ Draw on the root window.
 .B \-mono 
 If on a color display, pretend we're on a monochrome display.
 .TP 8
-.B \-delay microseconds
+.B \-install
+Install a private colormap for the window.
+.TP 8
+.B \-visual \fIvisual\fP
+Specify which visual to use.  Legal values are the name of a visual class,
+or the id number (decimal or hex) of a specific visual.
+.TP 8
+.B \-delay \fImicroseconds\fP
 Slow it down.
 .SH ENVIRONMENT
 .PP
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
diff --git a/hacks/flame.exe_axp b/hacks/flame.exe_axp
deleted file mode 100755 (executable)
index 15ec19d..0000000
Binary files a/hacks/flame.exe_axp and /dev/null differ
diff --git a/hacks/flame.exe_vax b/hacks/flame.exe_vax
deleted file mode 100755 (executable)
index cb2a204..0000000
Binary files a/hacks/flame.exe_vax and /dev/null differ
diff --git a/hacks/flame.hlp b/hacks/flame.hlp
deleted file mode 100755 (executable)
index 15eba95..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-1 FLAME 
-Draw weird cosmic fractals
-
-SYNOPSIS
-  $ flame [-display host:display.screen] [-foreground color] 
-          [-background color] [-window] [-root] [-mono] [-ncolors integer] 
-          [-iterations integer] [-points integer] [-delay microseconds] 
-          [-delay2 microseconds]
-
-2 DESCRIPTION
-The flame program generates colorful fractal displays.
-
-2 OPTIONS
-flame accepts the following options:
-
-   -window
-Draw on a newly-created window.  This is the default.
-
-   -root
-Draw on the root window.
-
-   -mono 
-If on a color display, pretend we're on a monochrome display.
-
-   -ncolors integer
-How many colors should be used (if possible).  Default 128.
-The colors used cycle through the hue, making N stops around 
-the color wheel.
-
-   -iterations integer
-How many fractals to generate.  Default 25.
-
-   -points integer
-How many pixels to draw for each fractal.  Default 10000.
-
-   -delay microseconds
-How long we should wait between drawing each fractal.  Default 50000,
-or about 1/20th second.
-
-   -delay2 microseconds
-How long we should wait before clearing the screen when each run ends.
-Default 2000000, or two seconds.
-
-2 ENVIRONMENT
-
-   DISPLAY
-to get the default host and display number.
-
-   XENVIRONMENT
-to get the name of a resource file that overrides the global resources
-stored in the RESOURCE_MANAGER property.
-
-2 COPYRIGHT
-Copyright (co 1991 by Patrick J. Naughton
-
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
-provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
-supporting documentation. 
-
-2 AUTHOR
-Scott Graves <spot@cs.cmu.edu>, 06-Jun-91.n
-
-Ability to run standalone or with xscreensaver added by 
-Jamie Zawinski <jwz@mcom.com>, 18-Oct-93.
old mode 100755 (executable)
new mode 100644 (file)
index aefc15d..67254f8
@@ -3,7 +3,7 @@
 flame - draw weird cosmic fractals
 .SH SYNOPSIS
 .B flame
-[\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] [\-background \fIcolor\fP] [\-window] [\-root] [\-mono] [\-ncolors \fIinteger\fP] [\-iterations \fIinteger\fP] [\-points \fIinteger\fP] [\-delay \fImicroseconds\fP] [\-delay2 \fImicroseconds\fP]
+[\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] [\-background \fIcolor\fP] [\-window] [\-root] [\-mono] [\-install] [\-visual \fIvisual\fP] [\-ncolors \fIinteger\fP] [\-iterations \fIinteger\fP] [\-points \fIinteger\fP] [\-delay \fImicroseconds\fP] [\-delay2 \fImicroseconds\fP]
 .SH DESCRIPTION
 The \fIflame\fP program generates colorful fractal displays.
 .SH OPTIONS
@@ -19,22 +19,29 @@ Draw on the root window.
 .B \-mono 
 If on a color display, pretend we're on a monochrome display.
 .TP 8
-.B \-ncolors integer
+.B \-install
+Install a private colormap for the window.
+.TP 8
+.B \-visual \fIvisual\fP
+Specify which visual to use.  Legal values are the name of a visual class,
+or the id number (decimal or hex) of a specific visual.
+.TP 8
+.B \-ncolors \fIinteger\fP
 How many colors should be used (if possible).  Default 128.
 The colors used cycle through the hue, making N stops around 
 the color wheel.
 .TP 8
-.B \-iterations integer
+.B \-iterations \fIinteger\fP
 How many fractals to generate.  Default 25.
 .TP 8
-.B \-points integer
+.B \-points \fIinteger\fP
 How many pixels to draw for each fractal.  Default 10000.
 .TP 8
-.B \-delay microseconds
+.B \-delay \fImicroseconds\fP
 How long we should wait between drawing each fractal.  Default 50000,
 or about 1/20th second.
 .TP 8
-.B \-delay2 microseconds
+.B \-delay2 \fImicroseconds\fP
 How long we should wait before clearing the screen when each run ends.
 Default 2000000, or two seconds.
 .SH ENVIRONMENT
old mode 100755 (executable)
new mode 100644 (file)
index 2b6ed56..dd9312a
@@ -13,7 +13,6 @@
 
 #define NBITS 12
 
-#ifndef VMS
 #include <X11/bitmaps/stipple>
 #include <X11/bitmaps/cross_weave>
 #include <X11/bitmaps/dimple1>
 #include <X11/bitmaps/root_weave>
 #include <X11/bitmaps/vlines2>
 #include <X11/bitmaps/vlines3>
-#else
-#include "sys$common:[decw$include.bitmaps]stipple.xbm"
-#include "sys$common:[decw$include.bitmaps]cross_weave.xbm"
-#include "sys$common:[decw$include.bitmaps]dimple1.xbm"
-#include "sys$common:[decw$include.bitmaps]dimple3.xbm"
-#include "sys$common:[decw$include.bitmaps]flipped_gray.xbm"
-#include "sys$common:[decw$include.bitmaps]gray1.xbm"
-#include "sys$common:[decw$include.bitmaps]gray3.xbm"
-#include "sys$common:[decw$include.bitmaps]hlines2.xbm"
-#include "sys$common:[decw$include.bitmaps]light_gray.xbm"
-#include "sys$common:[decw$include.bitmaps]root_weave.xbm"
-#include "sys$common:[decw$include.bitmaps]vlines2.xbm"
-#include "sys$common:[decw$include.bitmaps]vlines3.xbm"
-#endif
 
 static Pixmap pixmaps [NBITS];
 static GC gc;
diff --git a/hacks/greynetic.exe_axp b/hacks/greynetic.exe_axp
deleted file mode 100755 (executable)
index 50af37a..0000000
Binary files a/hacks/greynetic.exe_axp and /dev/null differ
diff --git a/hacks/greynetic.exe_vax b/hacks/greynetic.exe_vax
deleted file mode 100755 (executable)
index 1f0180e..0000000
Binary files a/hacks/greynetic.exe_vax and /dev/null differ
diff --git a/hacks/greynetic.hlp b/hacks/greynetic.hlp
deleted file mode 100755 (executable)
index d2849bd..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-1 GREYNETIC 
-Draw random stippled/color rectangles
-
-SYNOPSIS
-  $ greynetic [-display host:display.screen] [-foreground color] 
-              [-background color] [-window] [-root] [-mono] [-delay usecs]
-
-2 DESCRIPTION
-The greynetic program draws random rectangles.
-
-2 OPTIONS
-greynetic accepts the following options:
-
-   -window
-Draw on a newly-created window.  This is the default.
-
-   -root
-Draw on the root window.
-
-   -mono 
-If on a color display, pretend we're on a monochrome display.
-
-   -delay microseconds
-Slow it down.
-
-2 ENVIRONMENT
-
-   DISPLAY
-to get the default host and display number.
-
-   XENVIRONMENT
-to get the name of a resource file that overrides the global resources
-stored in the RESOURCE_MANAGER property.
-
-2 COPYRIGHT
-Copyright (co 1992 by Jamie Zawinski.  Permission to use, copy, modify, 
-distribute, and sell this software and its documentation for any purpose is 
-hereby granted without fee, provided that the above copyright notice appear 
-in all copies and that both that copyright notice and this permission notice
-appear in supporting documentation.  No representations are made about the 
-suitability of this software for any purpose.  It is provided "as is" without
-express or implied warranty.
-
-2 AUTHOR
-Jamie Zawinski <jwz@mcom.com>, 13-aug-92.
old mode 100755 (executable)
new mode 100644 (file)
index a34af7a..2d18782
@@ -3,7 +3,7 @@
 greynetic - draw random stippled/color rectangles
 .SH SYNOPSIS
 .B greynetic
-[\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] [\-background \fIcolor\fP] [\-window] [\-root] [\-mono] [\-delay \fIusecs\fP]
+[\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] [\-background \fIcolor\fP] [\-window] [\-root] [\-mono] [\-install] [\-visual \fIvisual\fP] [\-delay \fIusecs\fP]
 .SH DESCRIPTION
 The \fIgreynetic\fP program draws random rectangles.
 .SH OPTIONS
@@ -19,7 +19,14 @@ Draw on the root window.
 .B \-mono 
 If on a color display, pretend we're on a monochrome display.
 .TP 8
-.B \-delay microseconds
+.B \-install
+Install a private colormap for the window.
+.TP 8
+.B \-visual \fIvisual\fP
+Specify which visual to use.  Legal values are the name of a visual class,
+or the id number (decimal or hex) of a specific visual.
+.TP 8
+.B \-delay \fImicroseconds\fP
 Slow it down.
 .SH ENVIRONMENT
 .PP
old mode 100755 (executable)
new mode 100644 (file)
diff --git a/hacks/halo.exe_axp b/hacks/halo.exe_axp
deleted file mode 100755 (executable)
index 5b6b9fb..0000000
Binary files a/hacks/halo.exe_axp and /dev/null differ
diff --git a/hacks/halo.exe_vax b/hacks/halo.exe_vax
deleted file mode 100755 (executable)
index 793d579..0000000
Binary files a/hacks/halo.exe_vax and /dev/null differ
diff --git a/hacks/halo.hlp b/hacks/halo.hlp
deleted file mode 100755 (executable)
index 61f3710..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-1 HALO 
-Draw circular patterns
-
-SYNOPSIS
-  $ halo [-display host:display.screen] [-foreground color] 
-         [-background color] [-window] [-root] [-mono] [-count int] 
-         [-delay usecs] [-animate]
-
-2 DESCRIPTION
-The halo program draws cool patterns based on circles.
-
-2 OPTIONS
-halo accepts the following options:
-
-   -window
-Draw on a newly-created window.  This is the default.
-
-   -root
-Draw on the root window.
-
-   -mono 
-If on a color display, pretend we're on a monochrome display.
-
-   -count integer
-How many circles to draw.  Default 0, meaning random.
-
-   -delay microseconds
-How much of a delay should be introduced between steps of the animation.
-Default 100000, or about 0.1 second.
-
-   -animate
-If specified, then the centerpoints of the circles will bounce around.
-Otherwise, the circles will be drawn once, erased, and a new set of
-circles will be drawn.
-
-2 ENVIRONMENT
-
-   DISPLAY
-to get the default host and display number.
-
-   XENVIRONMENT
-to get the name of a resource file that overrides the global resources
-stored in the RESOURCE_MANAGER property.
-
-2 COPYRIGHT
-Copyright (co 1993 by Jamie Zawinski.  Permission to use, copy, modify, 
-distribute, and sell this software and its documentation for any purpose is 
-hereby granted without fee, provided that the above copyright notice appear 
-in all copies and that both that copyright notice and this permission notice
-appear in supporting documentation.  No representations are made about the 
-suitability of this software for any purpose.  It is provided "as is" without
-express or implied warranty.
-
-2 AUTHOR
-Jamie Zawinski <jwz@mcom.com>, 6-jul-93.
old mode 100755 (executable)
new mode 100644 (file)
index 1538a46..270bc2f
@@ -3,7 +3,7 @@
 halo - draw circular patterns
 .SH SYNOPSIS
 .B halo
-[\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] [\-background \fIcolor\fP] [\-window] [\-root] [\-mono] [\-count \fIint\fP] [\-delay \fIusecs\fP] [\-animate]
+[\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] [\-background \fIcolor\fP] [\-window] [\-root] [\-mono] [\-install] [\-visual \fIvisual\fP] [\-count \fIint\fP] [\-delay \fIusecs\fP] [\-animate]
 .SH DESCRIPTION
 The \fIhalo\fP program draws cool patterns based on circles.
 .SH OPTIONS
@@ -19,10 +19,17 @@ Draw on the root window.
 .B \-mono 
 If on a color display, pretend we're on a monochrome display.
 .TP 8
-.B \-count integer
+.B \-install
+Install a private colormap for the window.
+.TP 8
+.B \-visual \fIvisual\fP
+Specify which visual to use.  Legal values are the name of a visual class,
+or the id number (decimal or hex) of a specific visual.
+.TP 8
+.B \-count \fIinteger\fP
 How many circles to draw.  Default 0, meaning random.
 .TP 8
-.B \-delay microseconds
+.B \-delay \fImicroseconds\fP
 How much of a delay should be introduced between steps of the animation.
 Default 100000, or about 0.1 second.
 .TP 8
old mode 100755 (executable)
new mode 100644 (file)
index 25149c3..a6ce0aa
  */
 
 #include "screenhack.h"
-#include <math.h>
-#ifdef VMS
-#define M_PI 3.14159265358979323846
-#endif
-#if __STDC__
+#ifdef __STDC__
 #include <math.h>      /* for M_PI */
 #endif
 
diff --git a/hacks/helix.exe_axp b/hacks/helix.exe_axp
deleted file mode 100755 (executable)
index c04942f..0000000
Binary files a/hacks/helix.exe_axp and /dev/null differ
diff --git a/hacks/helix.exe_vax b/hacks/helix.exe_vax
deleted file mode 100755 (executable)
index efca285..0000000
Binary files a/hacks/helix.exe_vax and /dev/null differ
diff --git a/hacks/helix.hlp b/hacks/helix.hlp
deleted file mode 100755 (executable)
index 40048db..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-1 Helix 
-Draw helical string-art patterns
-
-SYNOPSIS
-
-  $ helix [-display host:display.screen] [-foreground color] 
-          [-background color] [-window] [-root] [-mono]
-
-2 DESCRIPTION
-The helix program draws interesting patterns composed of line segments
-in random colors.
-
-2 OPTIONS
-helix accepts the following options:
-
-   -window
-Draw on a newly-created window.  This is the default.
-
-   -root
-Draw on the root window.
-
-   -mono 
-If on a color display, pretend we're on a monochrome display.
-
-2 ENVIRONMENT
-
-   DISPLAY
-to get the default host and display number.
-
-   XENVIRONMENT
-to get the name of a resource file that overrides the global resources
-stored in the RESOURCE_MANAGER property.
-
-2 COPYRIGHT
-Copyright (co 1992 by Jamie Zawinski.  Permission to use, copy, modify, 
-distribute, and sell this software and its documentation for any purpose is 
-hereby granted without fee, provided that the above copyright notice appear 
-in all copies and that both that copyright notice and this permission notice
-appear in supporting documentation.  No representations are made about the 
-suitability of this software for any purpose.  It is provided "as is" without
-express or implied warranty.
-
-2 AUTHOR
-Jamie Zawinski <jwz@mcom.com>, 13-aug-92.
old mode 100755 (executable)
new mode 100644 (file)
index e79cec0..9777f1d
@@ -3,7 +3,7 @@
 helix - draw helical string-art patterns
 .SH SYNOPSIS
 .B helix
-[\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] [\-background \fIcolor\fP] [\-window] [\-root] [\-mono]
+[\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] [\-background \fIcolor\fP] [\-window] [\-root] [\-mono] [\-install] [\-visual \fIvisual\fP]
 .SH DESCRIPTION
 The \fIhelix\fP program draws interesting patterns composed of line segments
 in random colors.
@@ -19,6 +19,13 @@ Draw on the root window.
 .TP 8
 .B \-mono 
 If on a color display, pretend we're on a monochrome display.
+.TP 8
+.B \-install
+Install a private colormap for the window.
+.TP 8
+.B \-visual \fIvisual\fP
+Specify which visual to use.  Legal values are the name of a visual class,
+or the id number (decimal or hex) of a specific visual.
 .SH ENVIRONMENT
 .PP
 .TP 8
old mode 100755 (executable)
new mode 100644 (file)
diff --git a/hacks/hopalong.exe_axp b/hacks/hopalong.exe_axp
deleted file mode 100755 (executable)
index dd8d9fb..0000000
Binary files a/hacks/hopalong.exe_axp and /dev/null differ
diff --git a/hacks/hopalong.exe_vax b/hacks/hopalong.exe_vax
deleted file mode 100755 (executable)
index d722ad2..0000000
Binary files a/hacks/hopalong.exe_vax and /dev/null differ
diff --git a/hacks/hopalong.hlp b/hacks/hopalong.hlp
deleted file mode 100755 (executable)
index bd3231d..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-1 HOPALONG 
-Draw real plane fractals
-
-SYNOPSIS
-
-  $ hopalong [-display host:display.screen] [-foreground color] 
-             [-background color] [-window] [-root] [-mono] [-count integer] 
-             [-ncolors integer] [-timeout seconds] [-delay microseconds]
-
-2 DESCRIPTION
-The hopalong program generates real plane fractals as described in
-the September 1986 issue of Scientific American.
-
-2 OPTIONS
-hopalong accepts the following options:
-
-   -window
-Draw on a newly-created window.  This is the default.
-
-   -root
-Draw on the root window.
-
-   -mono 
-If on a color display, pretend we're on a monochrome display.
-
-   -count integer
-How many pixels should be drawn before a color change.  Default 1000.
-
-   -ncolors integer
-How many colors should be used (if possible).  Default 100.
-The colors used cycle through the hue, making N stops around 
-the color wheel.
-
-   -timeout seconds
-How many seconds we should generate for before clearing the screen
-and starting over.  Default 20.
-
-   -delay microseconds
-How long we should wait between drawing each pixel.  Default 0.
-
-2 ENVIRONMENT
-
-   DISPLAY
-to get the default host and display number.
-
-   XENVIRONMENT
-to get the name of a resource file that overrides the global resources
-stored in the RESOURCE_MANAGER property.
-
-2 COPYRIGHT
-Copyright (co 1988-91 by Patrick J. Naughton
-
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
-provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
-supporting documentation. 
-
-2 AUTHOR
-Patrick J. Naughton <naughton@eng.sun.com>, 23-mar-88.
-
-Ability to run standalone or with xscreensaver added by 
-Jamie Zawinski <jwz@mcom.com>, 13-aug-92.
old mode 100755 (executable)
new mode 100644 (file)
index f89769e..d30746b
@@ -3,7 +3,7 @@
 hopalong - draw real plane fractals
 .SH SYNOPSIS
 .B hopalong
-[\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] [\-background \fIcolor\fP] [\-window] [\-root] [\-mono] [\-count \fIinteger\fP] [\-ncolors \fIinteger\fP] [\-timeout \fIseconds\fP] [\-delay \fImicroseconds\fP]
+[\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] [\-background \fIcolor\fP] [\-window] [\-root] [\-mono] [\-install] [\-visual \fIvisual\fP] [\-count \fIinteger\fP] [\-ncolors \fIinteger\fP] [\-timeout \fIseconds\fP] [\-delay \fImicroseconds\fP]
 .SH DESCRIPTION
 The \fIhopalong\fP program generates real plane fractals as described in
 the September 1986 issue of Scientific American.
@@ -20,19 +20,26 @@ Draw on the root window.
 .B \-mono 
 If on a color display, pretend we're on a monochrome display.
 .TP 8
-.B \-count integer
+.B \-install
+Install a private colormap for the window.
+.TP 8
+.B \-visual \fIvisual\fP
+Specify which visual to use.  Legal values are the name of a visual class,
+or the id number (decimal or hex) of a specific visual.
+.TP 8
+.B \-count \fIinteger\fP
 How many pixels should be drawn before a color change.  Default 1000.
 .TP 8
-.B \-ncolors integer
+.B \-ncolors \fIinteger\fP
 How many colors should be used (if possible).  Default 100.
 The colors used cycle through the hue, making N stops around 
 the color wheel.
 .TP 8
-.B \-timeout seconds
+.B \-timeout \fIseconds\fP
 How many seconds we should generate for before clearing the screen
 and starting over.  Default 20.
 .TP 8
-.B \-delay microseconds
+.B \-delay \fImicroseconds\fP
 How long we should wait between drawing each pixel.  Default 0.
 .SH ENVIRONMENT
 .PP
old mode 100755 (executable)
new mode 100644 (file)
diff --git a/hacks/hypercube.exe_axp b/hacks/hypercube.exe_axp
deleted file mode 100755 (executable)
index db07d43..0000000
Binary files a/hacks/hypercube.exe_axp and /dev/null differ
diff --git a/hacks/hypercube.exe_vax b/hacks/hypercube.exe_vax
deleted file mode 100755 (executable)
index fbdf80c..0000000
Binary files a/hacks/hypercube.exe_vax and /dev/null differ
diff --git a/hacks/hypercube.hlp b/hacks/hypercube.hlp
deleted file mode 100755 (executable)
index 4957f54..0000000
+++ /dev/null
@@ -1,89 +0,0 @@
-1 HYPERCUBE 
-2D projection of a 4d object
-
-SYNOPSIS
-
-  $ hypercube [-display host:display.screen] [-foreground color] 
-              [-background color] [-color[0-7] color] [-xy float] [-xz float] 
-              [-yz float] [-xw float] [-yw float] [-zw float] 
-              [-observer-z int] [-window] [-root] [-mono] [-delay usecs]
-
-2 DESCRIPTION
-The hypercube program displays a wireframe projection of a hypercube
-which is rotating at user-specified rates around any or all of its four axes.
-
-2 OPTIONS
-hypercube accepts the following options:
-
-   -window
-Draw on a newly-created window.  This is the default.
-
-   -root
-Draw on the root window.
-
-   -mono 
-If on a color display, pretend we're on a monochrome display.
-
-   -delay microseconds
-How much of a delay should be introduced between steps of the animation.
-Default 100000, or about 1/10th second.
-
-   -observer-z int
-How far away the observer is from the center of the cube (the cube is one
-unit per side.)  Default 5.
-
-   -color0 color
-
-   -color1 color
-
-   -color2 color
-
-   -color3 color
-
-   -color4 color
-
-   -color5 color
-
-   -color6 color
-
-   -color7 color
-The colors used to draw the line segments bordering the eight faces of
-the cube.  Some of the faces have only two of their border-lines drawn in
-the specified color, and some have all four.
-
-   -xw float
-
-   -xy float
-
-   -xz float
-
-   -yw float
-
-   -yz float
-
-   -zw float
-The amount that the cube should be rotated around the specified axis at
-each frame of the animation, expressed in radians.  These should be small
-floating-point values (less than 0.05 works best.)  Default: xy=0.01,
-xz=0.005, yw=0.01.
-
-2 ENVIRONMENT
-
-   DISPLAY
-to get the default host and display number.
-
-   XENVIRONMENT
-to get the name of a resource file that overrides the global resources
-stored in the RESOURCE_MANAGER property.
-
-2 COPYRIGHT
-Copyright (co 1992 by Jamie Zawinski.  Permission to use, copy, modify, 
-distribute, and sell this software and its documentation for any purpose is 
-hereby granted without fee, provided that the above copyright notice appear 
-in all copies and that both that copyright notice and this permission notice
-appear in supporting documentation.  No representations are made about the 
-suitability of this software for any purpose.  It is provided "as is" without
-express or implied warranty.
-
-2 AUTHOR
-Jamie Zawinski <jwz@mcom.com>, 6-dec-92.
old mode 100755 (executable)
new mode 100644 (file)
index a5c58aa..5efd02c
@@ -3,7 +3,7 @@
 hypercube - 2d projection of a 4d object
 .SH SYNOPSIS
 .B hypercube
-[\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] [\-background \fIcolor\fP] [\-color[0-7] \fIcolor\fP] [\-xy \fIfloat\fP] [\-xz \fIfloat\fP] [\-yz \fIfloat\fP] [\-xw \fIfloat\fP] [\-yw \fIfloat\fP] [\-zw \fIfloat\fP] [\-observer-z \fIint\fP] [\-window] [\-root] [\-mono] [\-delay \fIusecs\fP]
+[\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] [\-background \fIcolor\fP] [\-color[0-7] \fIcolor\fP] [\-xy \fIfloat\fP] [\-xz \fIfloat\fP] [\-yz \fIfloat\fP] [\-xw \fIfloat\fP] [\-yw \fIfloat\fP] [\-zw \fIfloat\fP] [\-observer-z \fIint\fP] [\-delay \fIusecs\fP] [\-window] [\-root] [\-mono] [\-install] [\-visual \fIvisual\fP]
 .SH DESCRIPTION
 The \fIhypercube\fP program displays a wireframe projection of a hypercube
 which is rotating at user-specified rates around any or all of its four axes.
@@ -20,44 +20,51 @@ Draw on the root window.
 .B \-mono 
 If on a color display, pretend we're on a monochrome display.
 .TP 8
-.B \-delay microseconds
+.B \-install
+Install a private colormap for the window.
+.TP 8
+.B \-visual \fIvisual\fP
+Specify which visual to use.  Legal values are the name of a visual class,
+or the id number (decimal or hex) of a specific visual.
+.TP 8
+.B \-delay \fImicroseconds\fP
 How much of a delay should be introduced between steps of the animation.
 Default 100000, or about 1/10th second.
 .TP 8
-.B \-observer-z int
+.B \-observer-z \fIint\fP
 How far away the observer is from the center of the cube (the cube is one
 unit per side.)  Default 5.
 .TP 8
-.B \-color0 color
+.B \-color0 \fIcolor\fP
 .TP 8
-.B \-color1 color
+.B \-color1 \fIcolor\fP
 .TP 8
-.B \-color2 color
+.B \-color2 \fIcolor\fP
 .TP 8
-.B \-color3 color
+.B \-color3 \fIcolor\fP
 .TP 8
-.B \-color4 color
+.B \-color4 \fIcolor\fP
 .TP 8
-.B \-color5 color
+.B \-color5 \fIcolor\fP
 .TP 8
-.B \-color6 color
+.B \-color6 \fIcolor\fP
 .TP 8
-.B \-color7 color
+.B \-color7 \fIcolor\fP
 The colors used to draw the line segments bordering the eight faces of
 the cube.  Some of the faces have only two of their border-lines drawn in
 the specified color, and some have all four.
 .TP 8
-.B \-xw float
+.B \-xw \fIfloat\fP
 .TP 8
-.B \-xy float
+.B \-xy \fIfloat\fP
 .TP 8
-.B \-xz float
+.B \-xz \fIfloat\fP
 .TP 8
-.B \-yw float
+.B \-yw \fIfloat\fP
 .TP 8
-.B \-yz float
+.B \-yz \fIfloat\fP
 .TP 8
-.B \-zw float
+.B \-zw \fIfloat\fP
 The amount that the cube should be rotated around the specified axis at
 each frame of the animation, expressed in radians.  These should be small
 floating-point values (less than 0.05 works best.)  Default: xy=0.01,
diff --git a/hacks/imakefile b/hacks/imakefile
deleted file mode 100755 (executable)
index ed3482c..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Imakefile file for xscreensaver, Copyright (c) 1993 Jamie Zawinski.
- *
- * You should not need to edit this file; edit ../config.h instead.
- *
- */
-
-#include "../config.h"
-
-#ifdef HAVE_XPM
- /* Yeah, this means that all hacks link against libXpm even though only
-    one hack actually uses it.  It doesn't matter: it's a library. */
-# define XPMDEFS -DHAVE_XPM
-# define XPMLIB -lXpm
-#else
-# define XPMDEFS
-# define XPMLIB
-#endif
-
-          UTILS = ../utils
-       INCLUDES = -I$(UTILS)
-        DEFINES = R5ISMS XPMDEFS
-EXTRA_LOAD_FLAGS= $(XMULIB) $(XTOOLLIB) XPMLIB $(EXTENSIONLIB) $(XLIB) -lm
-          HACKS = attraction.c greynetic.c helix.c hopalong.c xroger-hack.c \
-                  noseguy.c pyro.c qix.c rocks.c rorschach.c blitspin.c \
-                  imsmap.c slidescreen.c decayscreen.c maze.c hypercube.c \
-                  halo.c flame.c
-            MEN = attraction.man greynetic.man helix.man hopalong.man \
-                  noseguy.man pyro.man xroger.man qix.man rocks.man \
-                  rorschach.man blitspin.man imsmap.man slidescreen.man \
-                  decayscreen.man maze.man hypercube.man halo.man flame.man
-       TARFILES = README Imakefile screenhack.c $(HACKS) screenhack.h \
-                  vroot.h xlock.h default.xbm $(MEN) .gdbinit noses/\*
-
-all::
-
-echo_tarfiles:
-       @echo $(TARFILES)
-
-#define        ScreenhackTarget(p,ps,deps)                                      @@\
-all:: p                                                                         @@\
-p: deps screenhack.h ps.o $(DEPLIBS)                                    @@\
-       RemoveTargetProgram($@)                                          @@\
-       $(CC) -o $@ $(LDOPTIONS) deps ps.o $(LDLIBS) $(EXTRA_LOAD_FLAGS) @@\
-                                                                        @@\
-InstallProgram(p,$(BINDIR))                                             @@\
-InstallManPage(p,$(MANDIR))                                             @@\
-clean::                                                                         @@\
-       $(RM) p
-
-HOBJS=screenhack.o $(UTILS)/resources.o $(UTILS)/usleep.o
-
-ScreenhackTarget (qix, qix, $(HOBJS) $(UTILS)/hsv.o)
-ScreenhackTarget (helix, helix, $(HOBJS) $(UTILS)/hsv.o)
-ScreenhackTarget (pyro, pyro, $(HOBJS) $(UTILS)/hsv.o)
-ScreenhackTarget (attraction, attraction, $(HOBJS) $(UTILS)/hsv.o $(UTILS)/spline.o)
-ScreenhackTarget (rorschach, rorschach, $(HOBJS) $(UTILS)/hsv.o)
-ScreenhackTarget (hopalong, hopalong, $(HOBJS) $(UTILS)/hsv.o)
-ScreenhackTarget (xroger, xroger-hack, $(HOBJS) $(UTILS)/hsv.o $(UTILS)/xroger.o)
-ScreenhackTarget (rocks, rocks, $(HOBJS))
-ScreenhackTarget (noseguy, noseguy, $(HOBJS))
-ScreenhackTarget (blitspin, blitspin, $(HOBJS))
-ScreenhackTarget (greynetic, greynetic, $(HOBJS))
-ScreenhackTarget (slidescreen, slidescreen, $(HOBJS) $(UTILS)/grabscreen.o)
-ScreenhackTarget (decayscreen, decayscreen, $(HOBJS) $(UTILS)/grabscreen.o)
-ScreenhackTarget (imsmap, imsmap, $(HOBJS) $(UTILS)/hsv.o)
-ScreenhackTarget (maze, maze, $(HOBJS) $(UTILS)/xroger.o)
-ScreenhackTarget (hypercube, hypercube, $(HOBJS))
-ScreenhackTarget (halo, halo, $(HOBJS) $(UTILS)/hsv.o)
-ScreenhackTarget (flame, flame, $(HOBJS) $(UTILS)/hsv.o)
old mode 100755 (executable)
new mode 100644 (file)
index a69e449..fc4f2ca
@@ -29,11 +29,6 @@ static XWindowAttributes wattrs;
 #define signed /**/
 #endif
 
-#ifdef VMS
-#ifndef __DECC
-#define signed /**/              /* for VAX C */
-#endif
-#endif
 static unsigned long *pixels = 0, fg_pixel, bg_pixel;
 static int npixels = 0;
 static Colormap cmap;
diff --git a/hacks/imsmap.exe_axp b/hacks/imsmap.exe_axp
deleted file mode 100755 (executable)
index 2f6af0b..0000000
Binary files a/hacks/imsmap.exe_axp and /dev/null differ
diff --git a/hacks/imsmap.exe_vax b/hacks/imsmap.exe_vax
deleted file mode 100755 (executable)
index ba861e6..0000000
Binary files a/hacks/imsmap.exe_vax and /dev/null differ
diff --git a/hacks/imsmap.hlp b/hacks/imsmap.hlp
deleted file mode 100755 (executable)
index 11f5fe1..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-1 IMSMAP 
-Generate fractal maps
-
-SYNOPSIS
-
-  $ imsmap [-display host:display.screen] [-foreground color] 
-           [-background color] [-window] [-root] [-mono] [-ncolors int] 
-           [-timeout seconds] [-iterations int] [-mode h|s|v|random] 
-           [-cycle] [-no-cycle]
-
-2 DESCRIPTION
-The imsmap program generates map or cloud-like patterns.  It looks
-quite different in monochrome and color.
-
-2 OPTIONS
-imsmap accepts the following options:
-
-   -window
-Draw on a newly-created window.  This is the default.
-
-   -root
-Draw on the root window.
-
-   -mono 
-If on a color display, pretend we're on a monochrome display.
-
-   -ncolors integer
-How many colors to use.  Default 50.
-
-   -timeout integer
-How long to delay between images.  Default 10 seconds.
-
-   -iterations integer
-A measure of the resolution of the resultant image, from 0 to 7.  Default 7.
-
-   -mode hue|saturation|value|random
-The axis upon which colors should be interpolated between the foreground
-and background color.  Default random.  
-
-   -cycle
-Whether to do colormap cycling.  This is the default.
-
-   -no-cycle
-Turns -cycle off.
-
-2 ENVIRONMENT
-
-   DISPLAY
-to get the default host and display number.
-
-   XENVIRONMENT
-to get the name of a resource file that overrides the global resources
-stored in the RESOURCE_MANAGER property.
-
-2 AUTHOR
-Juergen Nickelsen <nickel@cs.tu-berlin.de>, 23-aug-92.
-
-Hacked on by Jamie Zawinski <jwz@mcom.com>, 24-aug-92.
old mode 100755 (executable)
new mode 100644 (file)
index 79825d5..178b4c5
@@ -3,7 +3,7 @@
 imsmap - generate fractal maps
 .SH SYNOPSIS
 .B imsmap
-[\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] [\-background \fIcolor\fP] [\-window] [\-root] [\-mono] [\-ncolors \fIint\fP] [\-timeout \fIseconds\fP] [\-iterations \fIint\fP] [\-mode h|s|v|random] [\-cycle] [\-no\-cycle]
+[\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] [\-background \fIcolor\fP] [\-window] [\-root] [\-mono] [\-install] [\-visual \fIvisual\fP] [\-ncolors \fIint\fP] [\-timeout \fIseconds\fP] [\-iterations \fIint\fP] [\-mode h|s|v|random] [\-cycle] [\-no\-cycle]
 .SH DESCRIPTION
 The \fIimsmap\fP program generates map or cloud-like patterns.  It looks
 quite different in monochrome and color.
@@ -20,16 +20,23 @@ Draw on the root window.
 .B \-mono 
 If on a color display, pretend we're on a monochrome display.
 .TP 8
-.B \-ncolors integer
+.B \-install
+Install a private colormap for the window.
+.TP 8
+.B \-visual \fIvisual\fP
+Specify which visual to use.  Legal values are the name of a visual class,
+or the id number (decimal or hex) of a specific visual.
+.TP 8
+.B \-ncolors \fIinteger\fP
 How many colors to use.  Default 50.
 .TP 8
-.B \-timeout integer
+.B \-timeout \fIinteger\fP
 How long to delay between images.  Default 10 seconds.
 .TP 8
-.B \-iterations integer
+.B \-iterations \fIinteger\fP
 A measure of the resolution of the resultant image, from 0 to 7.  Default 7.
 .TP 8
-.B \-mode hue|saturation|value|random
+.B \-mode [ hue | saturation | value | random ]
 The axis upon which colors should be interpolated between the foreground
 and background color.  Default random.  
 .TP 8
diff --git a/hacks/link.com b/hacks/link.com
deleted file mode 100755 (executable)
index 3f806ea..0000000
Binary files a/hacks/link.com and /dev/null differ
diff --git a/hacks/link_axp.com b/hacks/link_axp.com
deleted file mode 100755 (executable)
index aa673ca..0000000
Binary files a/hacks/link_axp.com and /dev/null differ
diff --git a/hacks/link_decc.com b/hacks/link_decc.com
deleted file mode 100755 (executable)
index 6041dbc..0000000
Binary files a/hacks/link_decc.com and /dev/null differ
old mode 100755 (executable)
new mode 100644 (file)
index c7e09fa..5a77195
@@ -52,11 +52,7 @@ static int solve_delay, pre_solve_delay, post_solve_delay;
 #include  <stdio.h>
 #include  <X11/Xlib.h>
 #include  <X11/Xutil.h>
-#ifndef VMS
 #include  <X11/bitmaps/gray1>
-#else
-#include "sys$common:[decw$include.bitmaps]gray1.xbm"
-#endif
 
 #define MAX_MAZE_SIZE_X        500
 #define MAX_MAZE_SIZE_Y        500
@@ -93,11 +89,7 @@ static int logo_x, logo_y;
 # define logo_width  128
 # define logo_height 128
 #else
-#ifndef VMS
 # include  <X11/bitmaps/xlogo64>
-#else
-# include "sys$common:[decw$include.bitmaps]xlogo64.xbm"
-#endif
 # define logo_width xlogo64_width
 # define logo_height xlogo64_height
 # define logo_bits xlogo64_bits
diff --git a/hacks/maze.exe_axp b/hacks/maze.exe_axp
deleted file mode 100755 (executable)
index f2dd87c..0000000
Binary files a/hacks/maze.exe_axp and /dev/null differ
diff --git a/hacks/maze.exe_vax b/hacks/maze.exe_vax
deleted file mode 100755 (executable)
index dffe680..0000000
Binary files a/hacks/maze.exe_vax and /dev/null differ
diff --git a/hacks/maze.hlp b/hacks/maze.hlp
deleted file mode 100755 (executable)
index 5dda581..0000000
+++ /dev/null
@@ -1,98 +0,0 @@
-1 MAZE 
-An automated X11 demo repeatedly creating and solving a random maze
-
-SYNOPSIS
-
-  $ maze [-display host:display.screen] [-foreground color] 
-         [-background color] [-window] [-root] [-grid-size pixels] 
-         [-live-color color] [-dead-color color] [-solve-delay usecs] 
-         [-pre-delay usecs] [-post-delay usecs]
-
-2 DESCRIPTION
-The maze program creates a "random" maze and then solves it with 
-graphical feedback. 
-
-2 OPTIONS
-maze accepts the following options:
-
-   -window
-Draw on a newly-created window.  This is the default.
-
-   -root
-Draw on the root window.
-
-   -grid-size pixels
-The size of each block of the maze, in pixels; default is 0, meaning
-pick a random grid size.
-
-   -live-color color
-The color of the path.
-
-   -dead-color color
-The color of the failed path (it is also stippled with a 50% pattern.)
-
-   -solve-delay integer
-Delay (in microseconds) between each step of the solution path.
-Default 5000, or about 1/200th second.
-
-   -pre-delay integer
-Delay (in microseconds) between generating a maze and starting to solve it.
-Default 2000000 (2 seconds.)
-
-   -post-delay integer
-Delay (in microseconds) after solving a maze and before generating a new one.
-Default 4000000 (4 seconds.)
-
-Clicking the mouse in the maze window controls it.
-   "LeftButton"
-Clears the window and restarts maze.
-   "MiddleButton"
-Pause or unpause the program.
-   "RightButton"
-Exit.
-
-2 BUGS
-Expose events force a restart of maze.
-
-Mouse actions are based on "raw" values (Button1, Button2 and Button3)
-instead of using the pointer map.
-
-2 ENVIRONMENT
-
-   DISPLAY
-to get the default host and display number.
-
-   XENVIRONMENT
-to get the name of a resource file that overrides the global resources
-stored in the RESOURCE_MANAGER property.
-
-2 COPYRIGHT
-
-Copyright (co 1988 by Sun Microsystems, Inc. Mountain View, CA.
-All Rights Reserved
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted, provided that
-the above copyright notice appear in all copies and that both that copyright
-notice and this permission notice appear in supporting documentation, and that
-the names of Sun or MIT not be used in advertising or publicity pertaining to
-distribution of the software without specific prior written permission. Sun
-and M.I.T.  make no representations about the suitability of this software for
-any purpose. It is provided "as is" without any express or implied warranty.
-
-SUN DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN
-NO EVENT SHALL SUN BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
-DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
-OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
-2 AUTHOR(s)
-
-Jim Randell    [ XScreenSaver version ] jmr@mddjmr.fc.hp.com
-  HPLabs, Bristol
-Richard Hess   [ X11 extensions ]      {...}!uunet!cimshop!rhess
-  Consilium, Mountain View, CA
-Dave Lemke     [ X11 version ]         lemke@sun.COM
-  Sun MicroSystems, Mountain View, CA
-Martin Weiss   [ SunView version ]
-  Sun MicroSystems, Mountain View, CA
old mode 100755 (executable)
new mode 100644 (file)
index 10d0cea..f93a70f
@@ -3,7 +3,7 @@
 maze \- an automated X11 demo repeatedly creating and solving a random maze
 .SH SYNOPSIS
 .B maze 
-[\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] [\-background \fIcolor\fP] [\-window] [\-root] [\-grid\-size \fIpixels\fP] [\-live\-color \fIcolor\fP] [\-dead\-color \fIcolor\fP] [\-solve\-delay \fIusecs\fP] [\-pre\-delay \fIusecs\fP] [\-post\-delay \fIusecs\fP]
+[\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] [\-background \fIcolor\fP] [\-window] [\-root] [\-install] [\-visual \fIvisual\fP] [\-grid\-size \fIpixels\fP] [\-live\-color \fIcolor\fP] [\-dead\-color \fIcolor\fP] [\-solve\-delay \fIusecs\fP] [\-pre\-delay \fIusecs\fP] [\-post\-delay \fIusecs\fP]
 .SH DESCRIPTION
 The \fImaze\fP program creates a "random" maze and then solves it with 
 graphical feedback. 
@@ -17,34 +17,44 @@ Draw on a newly-created window.  This is the default.
 .B \-root
 Draw on the root window.
 .TP 8
-.B \-grid\-size pixels
+.B \-install
+Install a private colormap for the window.
+.TP 8
+.B \-visual \fIvisual\fP
+Specify which visual to use.  Legal values are the name of a visual class,
+or the id number (decimal or hex) of a specific visual.
+.TP 8
+.B \-grid\-size \fIpixels\fP
 The size of each block of the maze, in pixels; default is 0, meaning
 pick a random grid size.
 .TP 8
-.B \-live\-color color
+.B \-live\-color \fIcolor\fP
 The color of the path.
 .TP 8
-.B \-dead\-color color
+.B \-dead\-color \fIcolor\fP
 The color of the failed path (it is also stippled with a 50% pattern.)
 .TP 8
-.B \-solve\-delay integer
+.B \-solve\-delay \fIinteger\fP
 Delay (in microseconds) between each step of the solution path.
 Default 5000, or about 1/200th second.
 .TP 8
-.B \-pre\-delay integer
+.B \-pre\-delay \fIinteger\fP
 Delay (in microseconds) between generating a maze and starting to solve it.
 Default 2000000 (2 seconds.)
 .TP 8
-.B \-post\-delay integer
+.B \-post\-delay \fIinteger\fP
 Delay (in microseconds) after solving a maze and before generating a new one.
 Default 4000000 (4 seconds.)
 .PP
 Clicking the mouse in the maze window controls it.
-.IP "\fBLeftButton\fP"
+.TP 16
+.B "LeftButton
 Clears the window and restarts maze.
-.IP "\fBMiddleButton\fP"
+.TP 16
+.B MiddleButton
 Pause or unpause the program.
-.IP "\fBRightButton\fP"
+.TP 16
+.B RightButton
 Exit.
 .SH BUGS
 Expose events force a restart of maze.
old mode 100755 (executable)
new mode 100644 (file)
index de47881..a39df17
@@ -54,7 +54,6 @@ static int state;     /* indicates states: walking or getting passwd */
 
 static void (*next_fn) ();
 
-#ifndef VMS
 #include "noses/nose.0.left"
 #include "noses/nose.1.left"
 #include "noses/nose.0.right"
@@ -63,16 +62,6 @@ static void (*next_fn) ();
 #include "noses/nose.right.front"
 #include "noses/nose.front"
 #include "noses/nose.down"
-#else
-#include "noses/nose.0_left"
-#include "noses/nose.1_left"
-#include "noses/nose.0_right"
-#include "noses/nose.1_right"
-#include "noses/nose.left_front"
-#include "noses/nose.right_front"
-#include "noses/nose.front"
-#include "noses/nose.down"
-#endif
 
 static void
 init_images ()
@@ -556,7 +545,7 @@ char *progclass = "Noseguy";
 char *defaults [] = {
   "Noseguy.background: black",         /* to placate SGI */
   "Noseguy.foreground: white",
-  "*mode:              string",
+  "*mode:              program",
   "*program:           fortune -s",
   "noseguy.font:       -*-new century schoolbook-*-r-*-*-*-180-*-*-*-*-*-*",
   0
diff --git a/hacks/noseguy.exe_axp b/hacks/noseguy.exe_axp
deleted file mode 100755 (executable)
index 4853501..0000000
Binary files a/hacks/noseguy.exe_axp and /dev/null differ
diff --git a/hacks/noseguy.exe_vax b/hacks/noseguy.exe_vax
deleted file mode 100755 (executable)
index 56cc80f..0000000
Binary files a/hacks/noseguy.exe_vax and /dev/null differ
diff --git a/hacks/noseguy.hlp b/hacks/noseguy.hlp
deleted file mode 100755 (executable)
index be32b73..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-1 NOSEGUY 
-A little guy with a big nose wanders around being witty
-
-SYNOPSIS
-
-  $ noseguy [-display host:display.screen] [-foreground color] 
-            [-background color] [-text-foreground color] 
-            [-text-background color] [-font font] [-window] [-root] 
-            [-mode mode] [-program program] [-filename \file] [-text text]
-
-2 DESCRIPTION
-A little man with a big nose and a hat runs around spewing out messages to
-the screen.  This code (and its bitmaps) were extracted from the xnlock
-program.
-
-2 OPTIONS
-noseguy accepts the following options:
-
-   -window
-Draw on a newly-created window.  This is the default.
-
-   -root
-Draw on the root window.
-
-   -font font
-The font used for the messages.
-
-   -mode program | file | string
-In program mode, the messages are gotten by running a program.
-The program used is controlled by the -program option, and 
-the .program resource.
-
-In filename mode, the message used is the contents of a file.
-The file used is controlled by the -file option, and 
-the .filename resource.
-
-In string mode, the message is whatever was specified on the 
-command line as the -text option, or in the resource database
-as the .text resource.
-
-   -program " program"
-If mode is program (the default), then this program will be
-run periodically, and its output will be the text of the messages.  The
-default program is "fortune -s", but yow is also a good choice.
-
-   -filename file
-If mode is file, then the contents of this file will be used
-for all messages.
-
-   -text string
-If mode is string, then this text will be used for all messages.
-
-2 ENVIRONMENT
-
-   DISPLAY
-to get the default host and display number.
-
-   XENVIRONMENT
-to get the name of a resource file that overrides the global resources
-stored in the RESOURCE_MANAGER property.
-
-2 COPYRIGHT
-Copyright 1985, 1990 by Dan Heller <argv@sun.com>.
-
-2 AUTHOR
-Dan Heller <argv@sun.com>, 1985.
-
-Ability to run standalone or with xscreensaver added by 
-Jamie Zawinski <jwz@mcom.com>, 13-aug-92.
old mode 100755 (executable)
new mode 100644 (file)
index 63aa3cb..7f7bedb
@@ -3,7 +3,7 @@
 noseguy - a little guy with a big nose wanders around being witty
 .SH SYNOPSIS
 .B noseguy
-[\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] [\-background \fIcolor\fP] [\-text-foreground \fIcolor\fP] [\-text-background \fIcolor\fP] [\-font \fIfont\fP] [\-window] [\-root] [\-mode \fImode\fP] [\-program \fIprogram\fP] [\-filename \file\fP] [\-text \fItext\fP]
+[\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] [\-background \fIcolor\fP] [\-text-foreground \fIcolor\fP] [\-text-background \fIcolor\fP] [\-font \fIfont\fP] [\-window] [\-root] [\-install] [\-visual \fIvisual\fP] [\-mode \fImode\fP] [\-program \fIprogram\fP] [\-filename \file\fP] [\-text \fItext\fP]
 .SH DESCRIPTION
 A little man with a big nose and a hat runs around spewing out messages to
 the screen.  This code (and its bitmaps) were extracted from the \fIxnlock\fP
@@ -18,10 +18,17 @@ Draw on a newly-created window.  This is the default.
 .B \-root
 Draw on the root window.
 .TP 8
-.B \-font font
+.B \-install
+Install a private colormap for the window.
+.TP 8
+.B \-visual \fIvisual\fP
+Specify which visual to use.  Legal values are the name of a visual class,
+or the id number (decimal or hex) of a specific visual.
+.TP 8
+.B \-font \fIfont\fP
 The font used for the messages.
 .TP 8
-.B \-mode program | file | string
+.B \-mode [ program | file | string ]
 In \fIprogram\fP mode, the messages are gotten by running a program.
 The program used is controlled by the \fI\-program\fP option, and 
 the \fI.program\fP resource.
@@ -34,16 +41,16 @@ In \fIstring\fP mode, the message is whatever was specified on the
 command line as the \fI\-text\fP option, or in the resource database
 as the \fI.text\fP resource.
 .TP 8
-.B \-program " program"
+.B \-program \fIprogram\fP
 If \fImode\fP is \fIprogram\fP (the default), then this program will be
 run periodically, and its output will be the text of the messages.  The
 default program is \fI"fortune -s"\fP, but \fIyow\fP is also a good choice.
 .TP 8
-.B \-filename file
+.B \-filename \fIfile\fP
 If \fImode\fP is \fIfile\fP, then the contents of this file will be used
 for all messages.
 .TP 8
-.B \-text string
+.B \-text \fIstring\fP
 If \fImode\fP is \fIstring\fP, then this text will be used for all messages.
 .SH ENVIRONMENT
 .PP
diff --git a/hacks/noses/CVS/Entries b/hacks/noses/CVS/Entries
new file mode 100644 (file)
index 0000000..7ca1c40
--- /dev/null
@@ -0,0 +1,8 @@
+/nose.0.left/1.1/Mon Dec 19 04:30:41 1994 Thu Aug 25 15:04:28 1994//
+/nose.0.right/1.1/Mon Dec 19 04:30:41 1994 Thu Aug 25 15:04:29 1994//
+/nose.1.left/1.1/Mon Dec 19 04:30:41 1994 Thu Aug 25 15:04:30 1994//
+/nose.1.right/1.1/Mon Dec 19 04:30:41 1994 Thu Aug 25 15:04:31 1994//
+/nose.down/1.1/Mon Dec 19 04:30:41 1994 Thu Aug 25 15:04:32 1994//
+/nose.front/1.1/Mon Dec 19 04:30:41 1994 Thu Aug 25 15:04:33 1994//
+/nose.left.front/1.1/Mon Dec 19 04:30:41 1994 Thu Aug 25 15:04:34 1994//
+/nose.right.front/1.1/Mon Dec 19 04:30:41 1994 Thu Aug 25 15:04:35 1994//
diff --git a/hacks/noses/CVS/Repository b/hacks/noses/CVS/Repository
new file mode 100644 (file)
index 0000000..5c363df
--- /dev/null
@@ -0,0 +1 @@
+/m/src/xscreensaver/hacks/noses
diff --git a/hacks/noses/cvs/entries b/hacks/noses/cvs/entries
deleted file mode 100755 (executable)
index 86e7659..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-/nose.0.left/1.1/Tue Oct 11 12:26:40 1994 Thu Aug 25 15:04:28 1994//
-/nose.0.right/1.1/Tue Oct 11 12:26:40 1994 Thu Aug 25 15:04:29 1994//
-/nose.1.left/1.1/Tue Oct 11 12:26:40 1994 Thu Aug 25 15:04:30 1994//
-/nose.1.right/1.1/Tue Oct 11 12:26:40 1994 Thu Aug 25 15:04:31 1994//
-/nose.down/1.1/Tue Oct 11 12:26:40 1994 Thu Aug 25 15:04:32 1994//
-/nose.front/1.1/Tue Oct 11 12:26:40 1994 Thu Aug 25 15:04:33 1994//
-/nose.left.front/1.1/Tue Oct 11 12:26:40 1994 Thu Aug 25 15:04:34 1994//
-/nose.right.front/1.1/Tue Oct 11 12:26:40 1994 Thu Aug 25 15:04:35 1994//
diff --git a/hacks/noses/cvs/repository b/hacks/noses/cvs/repository
deleted file mode 100755 (executable)
index 5c363df..0000000
+++ /dev/null
@@ -1 +0,0 @@
-/m/src/xscreensaver/hacks/noses
diff --git a/hacks/noses/nose.0.left b/hacks/noses/nose.0.left
new file mode 100644 (file)
index 0000000..cb3d152
--- /dev/null
@@ -0,0 +1,38 @@
+#define nose_0_left_width 64
+#define nose_0_left_height 64
+static unsigned char nose_0_left_bits[] = {
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0xff,0x07,0x00,0x00,0x00,0x00,0x40,0x00,
+ 0x00,0x04,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x40,
+ 0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x04,0x00,0x00,0x00,0x00,
+ 0x40,0x00,0x00,0x04,0x00,0x00,0x00,0xf8,0xff,0xff,0xff,0xff,0x3f,0x00,0x00,
+ 0x08,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x20,0x00,
+ 0x00,0xf8,0xff,0xff,0xff,0xff,0x3f,0x00,0x00,0xf0,0x03,0x00,0x00,0x80,0x00,
+ 0x00,0x00,0x0e,0x0c,0x00,0x00,0x80,0x01,0x00,0x00,0x03,0x30,0x00,0x00,0x00,
+ 0x01,0x00,0x80,0x00,0x40,0x00,0x00,0x00,0x02,0x00,0x40,0x00,0xc0,0x00,0x00,
+ 0x00,0x02,0x00,0x20,0x00,0x80,0x00,0x00,0x00,0x04,0x00,0x10,0x00,0x00,0x00,
+ 0x00,0x00,0x04,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x0c,0x00,0x08,0x00,0x00,
+ 0x00,0x00,0x00,0x08,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x08,0x00,
+ 0x00,0x00,0x00,0x00,0x10,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x08,
+ 0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x10,0x00,
+ 0x08,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x10,
+ 0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x10,0x00,0x00,0x01,0x00,0x00,
+ 0x18,0x00,0x20,0x00,0x00,0x01,0x00,0x00,0x08,0x00,0x40,0x00,0x80,0x00,0x00,
+ 0x00,0x08,0x00,0x80,0x00,0x40,0x00,0x00,0x00,0x0c,0x00,0x00,0x01,0x20,0x00,
+ 0x00,0x00,0x04,0x00,0x00,0x06,0x18,0x00,0x00,0x00,0x06,0x00,0x00,0xf8,0x07,
+ 0x00,0x00,0x00,0x02,0x00,0x00,0x00,0xf8,0xff,0xff,0xff,0x01,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x0f,0x00,0x00,0x00,
+ 0x00,0xff,0x00,0x04,0x10,0x00,0x00,0x00,0xc0,0x00,0x03,0x03,0x10,0x00,0x00,
+ 0x00,0x30,0x00,0x0c,0x01,0x20,0x00,0x00,0x00,0x08,0x00,0x98,0x00,0x20,0x00,
+ 0x00,0x00,0x0c,0x03,0x60,0x00,0x20,0x00,0x00,0x00,0xc2,0x00,0xc0,0x00,0x20,
+ 0x00,0x00,0x00,0x42,0x00,0x80,0x00,0x20,0x00,0x00,0x00,0x21,0x00,0x00,0x01,
+ 0x20,0x00,0x00,0x00,0x21,0x00,0x00,0x01,0x20,0x00,0x00,0x00,0x21,0x00,0x00,
+ 0x00,0x20,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x01,0x00,
+ 0x00,0x00,0x40,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x02,
+ 0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x20,0x00,0x00,0x00,
+ 0x18,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x70,0x00,0x00,0x00,0x10,0x00,0x00,
+ 0x00,0xc0,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00};
diff --git a/hacks/noses/nose.0.right b/hacks/noses/nose.0.right
new file mode 100644 (file)
index 0000000..f387baa
--- /dev/null
@@ -0,0 +1,38 @@
+#define nose_0_right_width 64
+#define nose_0_right_height 64
+static unsigned char nose_0_right_bits[] = {
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0xe0,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x20,0x00,
+ 0x00,0x02,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x20,
+ 0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x02,0x00,0x00,0x00,0x00,
+ 0x20,0x00,0x00,0x02,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0x1f,0x00,0x00,
+ 0x04,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x10,0x00,
+ 0x00,0xfc,0xff,0xff,0xff,0xff,0x1f,0x00,0x00,0x00,0x01,0x00,0x00,0xc0,0x0f,
+ 0x00,0x00,0x80,0x01,0x00,0x00,0x30,0x70,0x00,0x00,0x80,0x00,0x00,0x00,0x0c,
+ 0xc0,0x00,0x00,0x40,0x00,0x00,0x00,0x02,0x00,0x01,0x00,0x40,0x00,0x00,0x00,
+ 0x03,0x00,0x02,0x00,0x20,0x00,0x00,0x00,0x01,0x00,0x04,0x00,0x20,0x00,0x00,
+ 0x00,0x00,0x00,0x08,0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x10,0x00,
+ 0x00,0x00,0x00,0x00,0x10,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x08,
+ 0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x10,0x00,
+ 0x08,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x10,
+ 0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x08,0x00,0x00,0x00,0x00,0x00,
+ 0x10,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x18,0x00,0x00,0x80,0x00,
+ 0x00,0x08,0x00,0x10,0x00,0x00,0x80,0x00,0x00,0x04,0x00,0x10,0x00,0x00,0x00,
+ 0x01,0x00,0x02,0x00,0x30,0x00,0x00,0x00,0x02,0x00,0x01,0x00,0x20,0x00,0x00,
+ 0x00,0x04,0x80,0x00,0x00,0x60,0x00,0x00,0x00,0x18,0x60,0x00,0x00,0x40,0x00,
+ 0x00,0x00,0xe0,0x1f,0x00,0x00,0x80,0xff,0xff,0xff,0x1f,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x1f,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x08,0x20,0x00,0xff,0x00,0x00,0x00,0x00,0x08,0xc0,0xc0,0x00,0x03,0x00,
+ 0x00,0x00,0x04,0x80,0x30,0x00,0x0c,0x00,0x00,0x00,0x04,0x00,0x19,0x00,0x10,
+ 0x00,0x00,0x00,0x04,0x00,0x06,0xc0,0x30,0x00,0x00,0x00,0x04,0x00,0x03,0x00,
+ 0x43,0x00,0x00,0x00,0x04,0x00,0x01,0x00,0x42,0x00,0x00,0x00,0x04,0x80,0x00,
+ 0x00,0x84,0x00,0x00,0x00,0x04,0x80,0x00,0x00,0x84,0x00,0x00,0x00,0x04,0x00,
+ 0x00,0x00,0x84,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x02,
+ 0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x40,0x00,0x00,0x00,
+ 0x02,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x20,0x00,0x00,
+ 0x00,0x04,0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x0e,0x00,
+ 0x00,0x00,0xf0,0xff,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00};
diff --git a/hacks/noses/nose.0_left b/hacks/noses/nose.0_left
deleted file mode 100755 (executable)
index cb3d152..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-#define nose_0_left_width 64
-#define nose_0_left_height 64
-static unsigned char nose_0_left_bits[] = {
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0xff,0x07,0x00,0x00,0x00,0x00,0x40,0x00,
- 0x00,0x04,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x40,
- 0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x04,0x00,0x00,0x00,0x00,
- 0x40,0x00,0x00,0x04,0x00,0x00,0x00,0xf8,0xff,0xff,0xff,0xff,0x3f,0x00,0x00,
- 0x08,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x20,0x00,
- 0x00,0xf8,0xff,0xff,0xff,0xff,0x3f,0x00,0x00,0xf0,0x03,0x00,0x00,0x80,0x00,
- 0x00,0x00,0x0e,0x0c,0x00,0x00,0x80,0x01,0x00,0x00,0x03,0x30,0x00,0x00,0x00,
- 0x01,0x00,0x80,0x00,0x40,0x00,0x00,0x00,0x02,0x00,0x40,0x00,0xc0,0x00,0x00,
- 0x00,0x02,0x00,0x20,0x00,0x80,0x00,0x00,0x00,0x04,0x00,0x10,0x00,0x00,0x00,
- 0x00,0x00,0x04,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x0c,0x00,0x08,0x00,0x00,
- 0x00,0x00,0x00,0x08,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x08,0x00,
- 0x00,0x00,0x00,0x00,0x10,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x08,
- 0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x10,0x00,
- 0x08,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x10,
- 0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x10,0x00,0x00,0x01,0x00,0x00,
- 0x18,0x00,0x20,0x00,0x00,0x01,0x00,0x00,0x08,0x00,0x40,0x00,0x80,0x00,0x00,
- 0x00,0x08,0x00,0x80,0x00,0x40,0x00,0x00,0x00,0x0c,0x00,0x00,0x01,0x20,0x00,
- 0x00,0x00,0x04,0x00,0x00,0x06,0x18,0x00,0x00,0x00,0x06,0x00,0x00,0xf8,0x07,
- 0x00,0x00,0x00,0x02,0x00,0x00,0x00,0xf8,0xff,0xff,0xff,0x01,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x0f,0x00,0x00,0x00,
- 0x00,0xff,0x00,0x04,0x10,0x00,0x00,0x00,0xc0,0x00,0x03,0x03,0x10,0x00,0x00,
- 0x00,0x30,0x00,0x0c,0x01,0x20,0x00,0x00,0x00,0x08,0x00,0x98,0x00,0x20,0x00,
- 0x00,0x00,0x0c,0x03,0x60,0x00,0x20,0x00,0x00,0x00,0xc2,0x00,0xc0,0x00,0x20,
- 0x00,0x00,0x00,0x42,0x00,0x80,0x00,0x20,0x00,0x00,0x00,0x21,0x00,0x00,0x01,
- 0x20,0x00,0x00,0x00,0x21,0x00,0x00,0x01,0x20,0x00,0x00,0x00,0x21,0x00,0x00,
- 0x00,0x20,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x01,0x00,
- 0x00,0x00,0x40,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x02,
- 0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x20,0x00,0x00,0x00,
- 0x18,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x70,0x00,0x00,0x00,0x10,0x00,0x00,
- 0x00,0xc0,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00};
diff --git a/hacks/noses/nose.0_right b/hacks/noses/nose.0_right
deleted file mode 100755 (executable)
index f387baa..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-#define nose_0_right_width 64
-#define nose_0_right_height 64
-static unsigned char nose_0_right_bits[] = {
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0xe0,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x20,0x00,
- 0x00,0x02,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x20,
- 0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x02,0x00,0x00,0x00,0x00,
- 0x20,0x00,0x00,0x02,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0x1f,0x00,0x00,
- 0x04,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x10,0x00,
- 0x00,0xfc,0xff,0xff,0xff,0xff,0x1f,0x00,0x00,0x00,0x01,0x00,0x00,0xc0,0x0f,
- 0x00,0x00,0x80,0x01,0x00,0x00,0x30,0x70,0x00,0x00,0x80,0x00,0x00,0x00,0x0c,
- 0xc0,0x00,0x00,0x40,0x00,0x00,0x00,0x02,0x00,0x01,0x00,0x40,0x00,0x00,0x00,
- 0x03,0x00,0x02,0x00,0x20,0x00,0x00,0x00,0x01,0x00,0x04,0x00,0x20,0x00,0x00,
- 0x00,0x00,0x00,0x08,0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x10,0x00,
- 0x00,0x00,0x00,0x00,0x10,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x08,
- 0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x10,0x00,
- 0x08,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x10,
- 0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x08,0x00,0x00,0x00,0x00,0x00,
- 0x10,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x18,0x00,0x00,0x80,0x00,
- 0x00,0x08,0x00,0x10,0x00,0x00,0x80,0x00,0x00,0x04,0x00,0x10,0x00,0x00,0x00,
- 0x01,0x00,0x02,0x00,0x30,0x00,0x00,0x00,0x02,0x00,0x01,0x00,0x20,0x00,0x00,
- 0x00,0x04,0x80,0x00,0x00,0x60,0x00,0x00,0x00,0x18,0x60,0x00,0x00,0x40,0x00,
- 0x00,0x00,0xe0,0x1f,0x00,0x00,0x80,0xff,0xff,0xff,0x1f,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x1f,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x08,0x20,0x00,0xff,0x00,0x00,0x00,0x00,0x08,0xc0,0xc0,0x00,0x03,0x00,
- 0x00,0x00,0x04,0x80,0x30,0x00,0x0c,0x00,0x00,0x00,0x04,0x00,0x19,0x00,0x10,
- 0x00,0x00,0x00,0x04,0x00,0x06,0xc0,0x30,0x00,0x00,0x00,0x04,0x00,0x03,0x00,
- 0x43,0x00,0x00,0x00,0x04,0x00,0x01,0x00,0x42,0x00,0x00,0x00,0x04,0x80,0x00,
- 0x00,0x84,0x00,0x00,0x00,0x04,0x80,0x00,0x00,0x84,0x00,0x00,0x00,0x04,0x00,
- 0x00,0x00,0x84,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x02,
- 0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x40,0x00,0x00,0x00,
- 0x02,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x20,0x00,0x00,
- 0x00,0x04,0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x0e,0x00,
- 0x00,0x00,0xf0,0xff,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00};
diff --git a/hacks/noses/nose.1.left b/hacks/noses/nose.1.left
new file mode 100644 (file)
index 0000000..8a6b829
--- /dev/null
@@ -0,0 +1,38 @@
+#define nose_1_left_width 64
+#define nose_1_left_height 64
+static unsigned char nose_1_left_bits[] = {
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0xff,0x07,0x00,0x00,0x00,0x00,0x40,0x00,
+ 0x00,0x04,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x40,
+ 0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x04,0x00,0x00,0x00,0x00,
+ 0x40,0x00,0x00,0x04,0x00,0x00,0x00,0xf8,0xff,0xff,0xff,0xff,0x3f,0x00,0x00,
+ 0x08,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x20,0x00,
+ 0x00,0xf8,0xff,0xff,0xff,0xff,0x3f,0x00,0x00,0xf0,0x03,0x00,0x00,0x80,0x00,
+ 0x00,0x00,0x0e,0x0c,0x00,0x00,0x80,0x01,0x00,0x00,0x03,0x30,0x00,0x00,0x00,
+ 0x01,0x00,0x80,0x00,0x40,0x00,0x00,0x00,0x02,0x00,0x40,0x00,0xc0,0x00,0x00,
+ 0x00,0x02,0x00,0x20,0x00,0x80,0x00,0x00,0x00,0x04,0x00,0x10,0x00,0x00,0x00,
+ 0x00,0x00,0x04,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x0c,0x00,0x08,0x00,0x00,
+ 0x00,0x00,0x00,0x08,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x08,0x00,
+ 0x00,0x00,0x00,0x00,0x10,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x08,
+ 0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x10,0x00,
+ 0x08,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x10,
+ 0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x10,0x00,0x00,0x01,0x00,0x00,
+ 0x18,0x00,0x10,0x00,0x00,0x01,0x00,0x00,0x08,0x00,0x20,0x00,0x80,0x00,0x00,
+ 0x00,0x08,0x00,0x40,0x00,0x40,0x00,0x00,0x00,0x0c,0x00,0x80,0x00,0x20,0x00,
+ 0x00,0x00,0xe4,0x00,0x00,0x03,0x18,0x00,0x00,0x00,0x26,0x03,0x00,0xfc,0x07,
+ 0x00,0x00,0x00,0x12,0x0c,0x00,0x00,0xf8,0xff,0xff,0xff,0x11,0x10,0x80,0x1f,
+ 0x00,0x00,0x00,0x00,0x08,0x20,0x60,0x60,0xc0,0x07,0x00,0x00,0x04,0x40,0x10,
+ 0xc0,0x20,0x08,0x00,0x1f,0x02,0x40,0x08,0x00,0x21,0x10,0xc0,0x60,0x02,0x40,
+ 0x04,0x00,0x12,0x20,0x20,0x80,0x02,0x20,0xc2,0x00,0x14,0x40,0x18,0x00,0x03,
+ 0x20,0x22,0x00,0x0c,0x80,0x04,0x03,0x02,0x10,0x12,0x00,0x08,0x80,0x86,0x00,
+ 0x04,0x10,0x12,0x00,0x10,0x80,0x42,0x00,0x18,0x08,0x12,0x00,0x10,0x40,0x42,
+ 0x00,0x00,0x04,0x02,0x00,0x20,0x40,0x42,0x00,0x00,0x04,0x02,0x00,0x00,0x20,
+ 0x42,0x00,0x00,0x02,0x04,0x00,0x00,0x20,0x02,0x00,0x00,0x01,0x04,0x00,0x00,
+ 0x20,0x02,0x00,0x00,0x01,0x08,0x00,0x00,0x20,0x04,0x00,0x80,0x00,0x10,0x00,
+ 0x00,0x20,0x0c,0x00,0x80,0x00,0x60,0x00,0x00,0x10,0x08,0x00,0x40,0x00,0x80,
+ 0xff,0xff,0x0f,0x30,0x00,0x30,0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0x0f,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00};
diff --git a/hacks/noses/nose.1.right b/hacks/noses/nose.1.right
new file mode 100644 (file)
index 0000000..f7c8962
--- /dev/null
@@ -0,0 +1,38 @@
+#define nose_1_right_width 64
+#define nose_1_right_height 64
+static unsigned char nose_1_right_bits[] = {
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0xe0,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x20,0x00,
+ 0x00,0x02,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x20,
+ 0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x02,0x00,0x00,0x00,0x00,
+ 0x20,0x00,0x00,0x02,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0x1f,0x00,0x00,
+ 0x04,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x10,0x00,
+ 0x00,0xfc,0xff,0xff,0xff,0xff,0x1f,0x00,0x00,0x00,0x01,0x00,0x00,0xc0,0x0f,
+ 0x00,0x00,0x80,0x01,0x00,0x00,0x30,0x70,0x00,0x00,0x80,0x00,0x00,0x00,0x0c,
+ 0xc0,0x00,0x00,0x40,0x00,0x00,0x00,0x02,0x00,0x01,0x00,0x40,0x00,0x00,0x00,
+ 0x03,0x00,0x02,0x00,0x20,0x00,0x00,0x00,0x01,0x00,0x04,0x00,0x20,0x00,0x00,
+ 0x00,0x00,0x00,0x08,0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x10,0x00,
+ 0x00,0x00,0x00,0x00,0x10,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x08,
+ 0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x10,0x00,
+ 0x08,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x10,
+ 0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x08,0x00,0x00,0x00,0x00,0x00,
+ 0x10,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x18,0x00,0x00,0x80,0x00,
+ 0x00,0x08,0x00,0x10,0x00,0x00,0x80,0x00,0x00,0x08,0x00,0x10,0x00,0x00,0x00,
+ 0x01,0x00,0x04,0x00,0x30,0x00,0x00,0x00,0x02,0x00,0x02,0x00,0x27,0x00,0x00,
+ 0x00,0x04,0x00,0x01,0xc0,0x64,0x00,0x00,0x00,0x18,0xc0,0x00,0x30,0x48,0x00,
+ 0x00,0x00,0xe0,0x3f,0x00,0x08,0x88,0xff,0xff,0xff,0x1f,0x00,0x00,0x04,0x10,
+ 0x00,0x00,0x00,0x00,0xf8,0x01,0x02,0x20,0x00,0x00,0xe0,0x03,0x06,0x06,0x02,
+ 0x40,0xf8,0x00,0x10,0x04,0x03,0x08,0x02,0x40,0x06,0x03,0x08,0x84,0x00,0x10,
+ 0x04,0x40,0x01,0x04,0x04,0x48,0x00,0x20,0x04,0xc0,0x00,0x18,0x02,0x28,0x00,
+ 0x43,0x08,0x40,0xc0,0x20,0x01,0x30,0x00,0x44,0x08,0x20,0x00,0x61,0x01,0x10,
+ 0x00,0x48,0x10,0x18,0x00,0x42,0x01,0x08,0x00,0x48,0x20,0x00,0x00,0x42,0x02,
+ 0x08,0x00,0x48,0x20,0x00,0x00,0x42,0x02,0x04,0x00,0x40,0x40,0x00,0x00,0x42,
+ 0x04,0x00,0x00,0x40,0x80,0x00,0x00,0x40,0x04,0x00,0x00,0x20,0x80,0x00,0x00,
+ 0x40,0x04,0x00,0x00,0x20,0x00,0x01,0x00,0x20,0x04,0x00,0x00,0x10,0x00,0x01,
+ 0x00,0x30,0x04,0x00,0x00,0x08,0x00,0x02,0x00,0x10,0x08,0x00,0x00,0x06,0x00,
+ 0x0c,0x00,0x0c,0xf0,0xff,0xff,0x01,0x00,0xf0,0xff,0x03,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00};
diff --git a/hacks/noses/nose.1_left b/hacks/noses/nose.1_left
deleted file mode 100755 (executable)
index 8a6b829..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-#define nose_1_left_width 64
-#define nose_1_left_height 64
-static unsigned char nose_1_left_bits[] = {
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0xff,0x07,0x00,0x00,0x00,0x00,0x40,0x00,
- 0x00,0x04,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x40,
- 0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x04,0x00,0x00,0x00,0x00,
- 0x40,0x00,0x00,0x04,0x00,0x00,0x00,0xf8,0xff,0xff,0xff,0xff,0x3f,0x00,0x00,
- 0x08,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x20,0x00,
- 0x00,0xf8,0xff,0xff,0xff,0xff,0x3f,0x00,0x00,0xf0,0x03,0x00,0x00,0x80,0x00,
- 0x00,0x00,0x0e,0x0c,0x00,0x00,0x80,0x01,0x00,0x00,0x03,0x30,0x00,0x00,0x00,
- 0x01,0x00,0x80,0x00,0x40,0x00,0x00,0x00,0x02,0x00,0x40,0x00,0xc0,0x00,0x00,
- 0x00,0x02,0x00,0x20,0x00,0x80,0x00,0x00,0x00,0x04,0x00,0x10,0x00,0x00,0x00,
- 0x00,0x00,0x04,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x0c,0x00,0x08,0x00,0x00,
- 0x00,0x00,0x00,0x08,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x08,0x00,
- 0x00,0x00,0x00,0x00,0x10,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x08,
- 0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x10,0x00,
- 0x08,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x10,
- 0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x10,0x00,0x00,0x01,0x00,0x00,
- 0x18,0x00,0x10,0x00,0x00,0x01,0x00,0x00,0x08,0x00,0x20,0x00,0x80,0x00,0x00,
- 0x00,0x08,0x00,0x40,0x00,0x40,0x00,0x00,0x00,0x0c,0x00,0x80,0x00,0x20,0x00,
- 0x00,0x00,0xe4,0x00,0x00,0x03,0x18,0x00,0x00,0x00,0x26,0x03,0x00,0xfc,0x07,
- 0x00,0x00,0x00,0x12,0x0c,0x00,0x00,0xf8,0xff,0xff,0xff,0x11,0x10,0x80,0x1f,
- 0x00,0x00,0x00,0x00,0x08,0x20,0x60,0x60,0xc0,0x07,0x00,0x00,0x04,0x40,0x10,
- 0xc0,0x20,0x08,0x00,0x1f,0x02,0x40,0x08,0x00,0x21,0x10,0xc0,0x60,0x02,0x40,
- 0x04,0x00,0x12,0x20,0x20,0x80,0x02,0x20,0xc2,0x00,0x14,0x40,0x18,0x00,0x03,
- 0x20,0x22,0x00,0x0c,0x80,0x04,0x03,0x02,0x10,0x12,0x00,0x08,0x80,0x86,0x00,
- 0x04,0x10,0x12,0x00,0x10,0x80,0x42,0x00,0x18,0x08,0x12,0x00,0x10,0x40,0x42,
- 0x00,0x00,0x04,0x02,0x00,0x20,0x40,0x42,0x00,0x00,0x04,0x02,0x00,0x00,0x20,
- 0x42,0x00,0x00,0x02,0x04,0x00,0x00,0x20,0x02,0x00,0x00,0x01,0x04,0x00,0x00,
- 0x20,0x02,0x00,0x00,0x01,0x08,0x00,0x00,0x20,0x04,0x00,0x80,0x00,0x10,0x00,
- 0x00,0x20,0x0c,0x00,0x80,0x00,0x60,0x00,0x00,0x10,0x08,0x00,0x40,0x00,0x80,
- 0xff,0xff,0x0f,0x30,0x00,0x30,0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0x0f,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00};
diff --git a/hacks/noses/nose.1_right b/hacks/noses/nose.1_right
deleted file mode 100755 (executable)
index f7c8962..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-#define nose_1_right_width 64
-#define nose_1_right_height 64
-static unsigned char nose_1_right_bits[] = {
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0xe0,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x20,0x00,
- 0x00,0x02,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x20,
- 0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x02,0x00,0x00,0x00,0x00,
- 0x20,0x00,0x00,0x02,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0x1f,0x00,0x00,
- 0x04,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x10,0x00,
- 0x00,0xfc,0xff,0xff,0xff,0xff,0x1f,0x00,0x00,0x00,0x01,0x00,0x00,0xc0,0x0f,
- 0x00,0x00,0x80,0x01,0x00,0x00,0x30,0x70,0x00,0x00,0x80,0x00,0x00,0x00,0x0c,
- 0xc0,0x00,0x00,0x40,0x00,0x00,0x00,0x02,0x00,0x01,0x00,0x40,0x00,0x00,0x00,
- 0x03,0x00,0x02,0x00,0x20,0x00,0x00,0x00,0x01,0x00,0x04,0x00,0x20,0x00,0x00,
- 0x00,0x00,0x00,0x08,0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x10,0x00,
- 0x00,0x00,0x00,0x00,0x10,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x08,
- 0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x10,0x00,
- 0x08,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x10,
- 0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x08,0x00,0x00,0x00,0x00,0x00,
- 0x10,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x18,0x00,0x00,0x80,0x00,
- 0x00,0x08,0x00,0x10,0x00,0x00,0x80,0x00,0x00,0x08,0x00,0x10,0x00,0x00,0x00,
- 0x01,0x00,0x04,0x00,0x30,0x00,0x00,0x00,0x02,0x00,0x02,0x00,0x27,0x00,0x00,
- 0x00,0x04,0x00,0x01,0xc0,0x64,0x00,0x00,0x00,0x18,0xc0,0x00,0x30,0x48,0x00,
- 0x00,0x00,0xe0,0x3f,0x00,0x08,0x88,0xff,0xff,0xff,0x1f,0x00,0x00,0x04,0x10,
- 0x00,0x00,0x00,0x00,0xf8,0x01,0x02,0x20,0x00,0x00,0xe0,0x03,0x06,0x06,0x02,
- 0x40,0xf8,0x00,0x10,0x04,0x03,0x08,0x02,0x40,0x06,0x03,0x08,0x84,0x00,0x10,
- 0x04,0x40,0x01,0x04,0x04,0x48,0x00,0x20,0x04,0xc0,0x00,0x18,0x02,0x28,0x00,
- 0x43,0x08,0x40,0xc0,0x20,0x01,0x30,0x00,0x44,0x08,0x20,0x00,0x61,0x01,0x10,
- 0x00,0x48,0x10,0x18,0x00,0x42,0x01,0x08,0x00,0x48,0x20,0x00,0x00,0x42,0x02,
- 0x08,0x00,0x48,0x20,0x00,0x00,0x42,0x02,0x04,0x00,0x40,0x40,0x00,0x00,0x42,
- 0x04,0x00,0x00,0x40,0x80,0x00,0x00,0x40,0x04,0x00,0x00,0x20,0x80,0x00,0x00,
- 0x40,0x04,0x00,0x00,0x20,0x00,0x01,0x00,0x20,0x04,0x00,0x00,0x10,0x00,0x01,
- 0x00,0x30,0x04,0x00,0x00,0x08,0x00,0x02,0x00,0x10,0x08,0x00,0x00,0x06,0x00,
- 0x0c,0x00,0x0c,0xf0,0xff,0xff,0x01,0x00,0xf0,0xff,0x03,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00};
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
diff --git a/hacks/noses/nose.left.front b/hacks/noses/nose.left.front
new file mode 100644 (file)
index 0000000..3a871ea
--- /dev/null
@@ -0,0 +1,38 @@
+#define nose_left_front_width 64
+#define nose_left_front_height 64
+static unsigned char nose_left_front_bits[] = {
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0xff,0x07,0x00,0x00,0x00,0x00,0x40,0x00,
+ 0x00,0x04,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x40,
+ 0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x04,0x00,0x00,0x00,0x00,
+ 0x40,0x00,0x00,0x04,0x00,0x00,0x00,0xf8,0xff,0xff,0xff,0xff,0x3f,0x00,0x00,
+ 0x08,0x00,0xe0,0x0f,0x00,0x20,0x00,0x00,0x08,0x00,0x18,0x30,0x00,0x20,0x00,
+ 0x00,0xf8,0xff,0x07,0xc0,0xff,0x3f,0x00,0x00,0x00,0x02,0x01,0x00,0x81,0x00,
+ 0x00,0x00,0x00,0x83,0x00,0x00,0x82,0x01,0x00,0x00,0x00,0x41,0x00,0x00,0x04,
+ 0x01,0x00,0x00,0x80,0x40,0x00,0x00,0x04,0x02,0x00,0x00,0x80,0x20,0x00,0x00,
+ 0x08,0x02,0x00,0x00,0x40,0x20,0x00,0x00,0x08,0x04,0x00,0x00,0x40,0x10,0x00,
+ 0x00,0x10,0x04,0x00,0x00,0x60,0x10,0x00,0x00,0x10,0x0c,0x00,0x00,0x20,0x10,
+ 0x00,0x00,0x10,0x08,0x00,0x00,0x30,0x10,0x00,0x00,0x10,0x08,0x00,0x00,0x10,
+ 0x10,0x00,0x00,0x10,0x10,0x00,0x00,0x10,0x10,0x00,0x00,0x10,0x10,0x00,0x00,
+ 0x10,0x10,0x00,0x00,0x10,0x10,0x00,0x00,0x10,0x20,0x00,0x00,0x08,0x10,0x00,
+ 0x00,0x10,0x20,0x00,0x00,0x08,0x10,0x00,0x00,0x10,0x40,0x00,0x00,0x04,0x10,
+ 0x00,0x00,0x30,0x40,0x00,0x00,0x04,0x10,0x00,0x00,0x20,0x80,0x00,0x00,0x02,
+ 0x18,0x00,0x00,0x20,0x00,0x01,0x00,0x01,0x08,0x00,0x00,0x60,0x00,0x06,0xc0,
+ 0x00,0x08,0x00,0x00,0x80,0x00,0x18,0x30,0x00,0x0c,0x00,0x00,0x80,0x00,0xe0,
+ 0x0f,0x00,0x04,0x00,0x00,0x80,0x01,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x01,
+ 0x00,0x00,0x00,0x02,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0x01,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x0f,0x00,0x00,0x00,
+ 0x00,0xff,0x00,0x04,0x10,0x00,0x00,0x00,0xe0,0x00,0x07,0x02,0x10,0x00,0x00,
+ 0x00,0x30,0x00,0x8c,0x01,0x20,0x00,0x00,0x00,0x0c,0x00,0x90,0x00,0x20,0x00,
+ 0x00,0x00,0x04,0x03,0x60,0x00,0x20,0x00,0x00,0x00,0xc2,0x00,0xc0,0x00,0x20,
+ 0x00,0x00,0x00,0x42,0x00,0x00,0x01,0x20,0x00,0x00,0x00,0x21,0x00,0x00,0x02,
+ 0x20,0x00,0x00,0x00,0x21,0x00,0x00,0x06,0x20,0x00,0x00,0x00,0x21,0x00,0x00,
+ 0x00,0x20,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x03,0x00,
+ 0x00,0x00,0x40,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x02,
+ 0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x20,0x00,0x00,0x00,
+ 0x18,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x70,0x00,0x00,0x00,0x10,0x00,0x00,
+ 0x00,0xc0,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00};
diff --git a/hacks/noses/nose.left_front b/hacks/noses/nose.left_front
deleted file mode 100755 (executable)
index 3a871ea..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-#define nose_left_front_width 64
-#define nose_left_front_height 64
-static unsigned char nose_left_front_bits[] = {
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0xff,0x07,0x00,0x00,0x00,0x00,0x40,0x00,
- 0x00,0x04,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x40,
- 0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x04,0x00,0x00,0x00,0x00,
- 0x40,0x00,0x00,0x04,0x00,0x00,0x00,0xf8,0xff,0xff,0xff,0xff,0x3f,0x00,0x00,
- 0x08,0x00,0xe0,0x0f,0x00,0x20,0x00,0x00,0x08,0x00,0x18,0x30,0x00,0x20,0x00,
- 0x00,0xf8,0xff,0x07,0xc0,0xff,0x3f,0x00,0x00,0x00,0x02,0x01,0x00,0x81,0x00,
- 0x00,0x00,0x00,0x83,0x00,0x00,0x82,0x01,0x00,0x00,0x00,0x41,0x00,0x00,0x04,
- 0x01,0x00,0x00,0x80,0x40,0x00,0x00,0x04,0x02,0x00,0x00,0x80,0x20,0x00,0x00,
- 0x08,0x02,0x00,0x00,0x40,0x20,0x00,0x00,0x08,0x04,0x00,0x00,0x40,0x10,0x00,
- 0x00,0x10,0x04,0x00,0x00,0x60,0x10,0x00,0x00,0x10,0x0c,0x00,0x00,0x20,0x10,
- 0x00,0x00,0x10,0x08,0x00,0x00,0x30,0x10,0x00,0x00,0x10,0x08,0x00,0x00,0x10,
- 0x10,0x00,0x00,0x10,0x10,0x00,0x00,0x10,0x10,0x00,0x00,0x10,0x10,0x00,0x00,
- 0x10,0x10,0x00,0x00,0x10,0x10,0x00,0x00,0x10,0x20,0x00,0x00,0x08,0x10,0x00,
- 0x00,0x10,0x20,0x00,0x00,0x08,0x10,0x00,0x00,0x10,0x40,0x00,0x00,0x04,0x10,
- 0x00,0x00,0x30,0x40,0x00,0x00,0x04,0x10,0x00,0x00,0x20,0x80,0x00,0x00,0x02,
- 0x18,0x00,0x00,0x20,0x00,0x01,0x00,0x01,0x08,0x00,0x00,0x60,0x00,0x06,0xc0,
- 0x00,0x08,0x00,0x00,0x80,0x00,0x18,0x30,0x00,0x0c,0x00,0x00,0x80,0x00,0xe0,
- 0x0f,0x00,0x04,0x00,0x00,0x80,0x01,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x01,
- 0x00,0x00,0x00,0x02,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0x01,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x0f,0x00,0x00,0x00,
- 0x00,0xff,0x00,0x04,0x10,0x00,0x00,0x00,0xe0,0x00,0x07,0x02,0x10,0x00,0x00,
- 0x00,0x30,0x00,0x8c,0x01,0x20,0x00,0x00,0x00,0x0c,0x00,0x90,0x00,0x20,0x00,
- 0x00,0x00,0x04,0x03,0x60,0x00,0x20,0x00,0x00,0x00,0xc2,0x00,0xc0,0x00,0x20,
- 0x00,0x00,0x00,0x42,0x00,0x00,0x01,0x20,0x00,0x00,0x00,0x21,0x00,0x00,0x02,
- 0x20,0x00,0x00,0x00,0x21,0x00,0x00,0x06,0x20,0x00,0x00,0x00,0x21,0x00,0x00,
- 0x00,0x20,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x03,0x00,
- 0x00,0x00,0x40,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x02,
- 0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x20,0x00,0x00,0x00,
- 0x18,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x70,0x00,0x00,0x00,0x10,0x00,0x00,
- 0x00,0xc0,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00};
diff --git a/hacks/noses/nose.right.front b/hacks/noses/nose.right.front
new file mode 100644 (file)
index 0000000..f821417
--- /dev/null
@@ -0,0 +1,38 @@
+#define nose_right_front_width 64
+#define nose_right_front_height 64
+static unsigned char nose_right_front_bits[] = {
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0xe0,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x20,0x00,
+ 0x00,0x02,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x20,
+ 0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x02,0x00,0x00,0x00,0x00,
+ 0x20,0x00,0x00,0x02,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0x1f,0x00,0x00,
+ 0x04,0x00,0xf0,0x07,0x00,0x10,0x00,0x00,0x04,0x00,0x0c,0x18,0x00,0x10,0x00,
+ 0x00,0xfc,0xff,0x03,0xe0,0xff,0x1f,0x00,0x00,0x00,0x81,0x00,0x80,0x40,0x00,
+ 0x00,0x00,0x80,0x41,0x00,0x00,0xc1,0x00,0x00,0x00,0x80,0x20,0x00,0x00,0x82,
+ 0x00,0x00,0x00,0x40,0x20,0x00,0x00,0x02,0x01,0x00,0x00,0x40,0x10,0x00,0x00,
+ 0x04,0x01,0x00,0x00,0x20,0x10,0x00,0x00,0x04,0x02,0x00,0x00,0x20,0x08,0x00,
+ 0x00,0x08,0x02,0x00,0x00,0x30,0x08,0x00,0x00,0x08,0x06,0x00,0x00,0x10,0x08,
+ 0x00,0x00,0x08,0x04,0x00,0x00,0x10,0x08,0x00,0x00,0x08,0x0c,0x00,0x00,0x08,
+ 0x08,0x00,0x00,0x08,0x08,0x00,0x00,0x08,0x08,0x00,0x00,0x08,0x08,0x00,0x00,
+ 0x08,0x08,0x00,0x00,0x08,0x08,0x00,0x00,0x08,0x10,0x00,0x00,0x04,0x08,0x00,
+ 0x00,0x08,0x10,0x00,0x00,0x04,0x08,0x00,0x00,0x08,0x20,0x00,0x00,0x02,0x08,
+ 0x00,0x00,0x08,0x20,0x00,0x00,0x02,0x0c,0x00,0x00,0x18,0x40,0x00,0x00,0x01,
+ 0x04,0x00,0x00,0x10,0x80,0x00,0x80,0x00,0x04,0x00,0x00,0x10,0x00,0x03,0x60,
+ 0x00,0x06,0x00,0x00,0x30,0x00,0x0c,0x18,0x00,0x01,0x00,0x00,0x20,0x00,0xf0,
+ 0x07,0x00,0x01,0x00,0x00,0x60,0x00,0x00,0x00,0x80,0x01,0x00,0x00,0x40,0x00,
+ 0x00,0x00,0x80,0x00,0x00,0x00,0x80,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x1f,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x08,0x20,0x00,0xff,0x00,0x00,0x00,0x00,0x08,0x40,0xe0,0x00,0x07,0x00,
+ 0x00,0x00,0x04,0x80,0x31,0x00,0x0c,0x00,0x00,0x00,0x04,0x00,0x09,0x00,0x30,
+ 0x00,0x00,0x00,0x04,0x00,0x06,0xc0,0x20,0x00,0x00,0x00,0x04,0x00,0x03,0x00,
+ 0x43,0x00,0x00,0x00,0x04,0x80,0x00,0x00,0x42,0x00,0x00,0x00,0x04,0x40,0x00,
+ 0x00,0x84,0x00,0x00,0x00,0x04,0x60,0x00,0x00,0x84,0x00,0x00,0x00,0x04,0x00,
+ 0x00,0x00,0x84,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x02,
+ 0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x40,0x00,0x00,0x00,
+ 0x02,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x20,0x00,0x00,
+ 0x00,0x04,0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x0e,0x00,
+ 0x00,0x00,0xf0,0xff,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00};
diff --git a/hacks/noses/nose.right_front b/hacks/noses/nose.right_front
deleted file mode 100755 (executable)
index f821417..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-#define nose_right_front_width 64
-#define nose_right_front_height 64
-static unsigned char nose_right_front_bits[] = {
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0xe0,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x20,0x00,
- 0x00,0x02,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x20,
- 0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x02,0x00,0x00,0x00,0x00,
- 0x20,0x00,0x00,0x02,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0x1f,0x00,0x00,
- 0x04,0x00,0xf0,0x07,0x00,0x10,0x00,0x00,0x04,0x00,0x0c,0x18,0x00,0x10,0x00,
- 0x00,0xfc,0xff,0x03,0xe0,0xff,0x1f,0x00,0x00,0x00,0x81,0x00,0x80,0x40,0x00,
- 0x00,0x00,0x80,0x41,0x00,0x00,0xc1,0x00,0x00,0x00,0x80,0x20,0x00,0x00,0x82,
- 0x00,0x00,0x00,0x40,0x20,0x00,0x00,0x02,0x01,0x00,0x00,0x40,0x10,0x00,0x00,
- 0x04,0x01,0x00,0x00,0x20,0x10,0x00,0x00,0x04,0x02,0x00,0x00,0x20,0x08,0x00,
- 0x00,0x08,0x02,0x00,0x00,0x30,0x08,0x00,0x00,0x08,0x06,0x00,0x00,0x10,0x08,
- 0x00,0x00,0x08,0x04,0x00,0x00,0x10,0x08,0x00,0x00,0x08,0x0c,0x00,0x00,0x08,
- 0x08,0x00,0x00,0x08,0x08,0x00,0x00,0x08,0x08,0x00,0x00,0x08,0x08,0x00,0x00,
- 0x08,0x08,0x00,0x00,0x08,0x08,0x00,0x00,0x08,0x10,0x00,0x00,0x04,0x08,0x00,
- 0x00,0x08,0x10,0x00,0x00,0x04,0x08,0x00,0x00,0x08,0x20,0x00,0x00,0x02,0x08,
- 0x00,0x00,0x08,0x20,0x00,0x00,0x02,0x0c,0x00,0x00,0x18,0x40,0x00,0x00,0x01,
- 0x04,0x00,0x00,0x10,0x80,0x00,0x80,0x00,0x04,0x00,0x00,0x10,0x00,0x03,0x60,
- 0x00,0x06,0x00,0x00,0x30,0x00,0x0c,0x18,0x00,0x01,0x00,0x00,0x20,0x00,0xf0,
- 0x07,0x00,0x01,0x00,0x00,0x60,0x00,0x00,0x00,0x80,0x01,0x00,0x00,0x40,0x00,
- 0x00,0x00,0x80,0x00,0x00,0x00,0x80,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x1f,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x08,0x20,0x00,0xff,0x00,0x00,0x00,0x00,0x08,0x40,0xe0,0x00,0x07,0x00,
- 0x00,0x00,0x04,0x80,0x31,0x00,0x0c,0x00,0x00,0x00,0x04,0x00,0x09,0x00,0x30,
- 0x00,0x00,0x00,0x04,0x00,0x06,0xc0,0x20,0x00,0x00,0x00,0x04,0x00,0x03,0x00,
- 0x43,0x00,0x00,0x00,0x04,0x80,0x00,0x00,0x42,0x00,0x00,0x00,0x04,0x40,0x00,
- 0x00,0x84,0x00,0x00,0x00,0x04,0x60,0x00,0x00,0x84,0x00,0x00,0x00,0x04,0x00,
- 0x00,0x00,0x84,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x02,
- 0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x40,0x00,0x00,0x00,
- 0x02,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x20,0x00,0x00,
- 0x00,0x04,0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x0e,0x00,
- 0x00,0x00,0xf0,0xff,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00};
diff --git a/hacks/pedal.c b/hacks/pedal.c
new file mode 100644 (file)
index 0000000..b39fef4
--- /dev/null
@@ -0,0 +1,404 @@
+/*
+ * pedal
+ *
+ * Based on a program for some old PDP-11 Graphics Display Processors
+ * at CMU.
+ *
+ * X version by
+ *
+ *  Dale Moore  <Dale.Moore@cs.cmu.edu>
+ *  24-Jun-1994
+ *
+ *  Copyright \(co 1994, by Carnegie Mellon University.  Permission to use,
+ *  copy, modify, distribute, and sell this software and its documentation
+ *  for any purpose is hereby granted without fee, provided fnord that the
+ *  above copyright notice appear in all copies and that both that copyright
+ *  notice and this permission notice appear in supporting documentation.
+ *  No representations are made about the  suitability of fnord this software
+ *  for any purpose.  It is provided "as is" without express or implied
+ *  warranty.
+ */
+
+#include <math.h>
+#include <stdlib.h>
+#include "screenhack.h"
+
+/* If MAXLINES is too big, we might not be able to get it
+ * to the X server in the 2byte length field. Must be less
+ * than 16k
+ */
+#define MAXLINES (16 * 1024)
+#define MAXPOINTS MAXLINES
+XPoint *points;
+
+/* 
+ * If the pedal has only this many lines, it must be ugly and we dont
+ * want to see it.
+ */
+#define MINLINES 7
+
+static int sizex, sizey;
+static int delay;
+static int fadedelay;
+static int maxlines;
+static GC gc;
+static XColor foreground, background;
+static Colormap cmap;
+
+static Bool fade_p;
+
+
+/*
+ * Routine (Macro actually)
+ *   mysin
+ * Description:
+ *   Assume that degrees is .. oh 360... meaning that
+ *   there are 360 degress in a circle.  Then this function
+ *   would return the sin of the angle in degrees.  But lets
+ *   say that they are really big degrees, with 4 big degrees
+ *   the same as one regular degree.  Then this routine
+ *   would be called mysin(t, 90) and would return sin(t degrees * 4)
+ */
+#define mysin(t, degrees) sin(t * 2 * M_PI / (degrees))
+#define mycos(t, degrees) cos(t * 2 * M_PI / (degrees))
+
+/*
+ * Macro:
+ *   rand_range
+ * Description:
+ *   Return a random number between a inclusive  and b exclusive.
+ *    rand (3, 6) returns 3 or 4 or 5, but not 6.
+ */
+#define rand_range(a, b) (a + random() % (b - a))
+
+
+static int gcd (m, n)
+    int m;
+    int n;
+/* 
+ * Greatest Common Divisor (also Greates common factor).
+ */
+{
+    int r;
+
+    for (;;) {
+        r = m % n;
+        if (r == 0) return (n);
+        m = n;
+        n = r;
+    }
+}
+
+static int numlines (a, b, d)
+    int a;
+    int b;
+    int d;
+/*
+ * Description:
+ *
+ *      Given parameters a and b, how many lines will we have to draw?
+ *
+ * Algorithm:
+ *
+ *      This algorithm assumes that r = sin (theta * a), where we
+ *      evaluate theta on multiples of b.
+ *
+ *      LCM (i, j) = i * j / GCD (i, j);
+ *
+ *      So, at LCM (b, 360) we start over again.  But since we
+ *      got to LCM (b, 360) by steps of b, the number of lines is
+ *      LCM (b, 360) / b.
+ *
+ *      If a is odd, then at 180 we cross over and start the
+ *      negative.  Someone should write up an elegant way of proving
+ *      this.  Why?  Because I'm not convinced of it myself. 
+ *
+ */
+{
+#define odd(x) (x & 1)
+#define even(x) (!odd(x))
+    if ( odd(a) && odd(b) && even(d)) d /= 2;
+    return  (d / gcd (d, b));
+#undef odd
+}
+
+static int
+compute_pedal(points, maxpoints)
+XPoint *points;
+int maxpoints;
+/*
+ * Description:
+ *
+ *    Basically, it's combination spirograph and string art.
+ *    Instead of doing lines, we just use a complex polygon,
+ *    and use an even/odd rule for filling in between.
+ *
+ *    The spirograph, in mathematical terms is a polar
+ *    plot of the form r = sin (theta * c);
+ *    The string art of this is that we evaluate that
+ *    function only on certain multiples of theta.  That is
+ *    we let theta advance in some random increment.  And then
+ *    we draw a straight line between those two adjacent points.
+ *
+ *    Eventually, the lines will start repeating themselves
+ *    if we've evaluated theta on some rational portion of the
+ *    whole.
+ *
+ *    The number of lines generated is limited to the
+ *    ratio of the increment we put on theta to the whole.
+ *    If we say that there are 360 degrees in a circle, then we
+ *    will never have more than 360 lines.   
+ *
+ * Return:
+ *
+ *    The number of points.
+ *
+ */
+{
+    int a, b, d;  /* These describe a unique pedal */
+
+    double r;
+    int theta = 0;
+    XPoint *pp = points;
+    int count;
+    int numpoints;
+
+    /* Just to make sure that this division is not done inside the loop */
+    int h_width = sizex / 2, h_height = sizey / 2 ;
+
+    for (;;) {
+       d = rand_range (MINLINES, maxlines);
+
+       a = rand_range (1, d);
+       b = rand_range (1, d);
+       numpoints = numlines(a, b, d);
+       if (numpoints > MINLINES) break;
+    }
+
+    /* it might be nice to try to move as much sin and cos computing
+     * (or at least the argument computing) out of the loop.
+     */
+    for (count = numpoints; count-- ; )
+    {
+        r = mysin (theta * a, d);
+
+        /* Convert from polar to cartesian coordinates */
+       /* We could round the results, but coercing seems just fine */
+        pp->x = mysin (theta, d) * r * h_width  + h_width;
+        pp->y = mycos (theta, d) * r * h_height + h_height;
+
+        /* Advance index into array */
+        pp++;
+
+        /* Advance theta */
+        theta += b;
+        theta %= d;
+    }
+
+    return(numpoints);
+}
+
+static void
+init_pedal (dpy, window)
+     Display *dpy;
+     Window window;
+{
+  XGCValues gcv;
+  XWindowAttributes xgwa;
+
+  fade_p = !mono_p;
+
+  delay = get_integer_resource ("delay", "Integer");
+  if (delay < 0) delay = 0;
+
+  fadedelay = get_integer_resource ("fadedelay", "Integer");
+  if (fadedelay < 0) fadedelay = 0;
+
+  maxlines = get_integer_resource ("maxlines", "Integer");
+  if (maxlines < MINLINES) maxlines = MINLINES;
+  else if (maxlines > MAXLINES) maxlines = MAXLINES;
+
+  points = (XPoint *)malloc(sizeof(XPoint) * maxlines);
+
+  XGetWindowAttributes (dpy, window, &xgwa);
+  sizex = xgwa.width;
+  sizey = xgwa.height;
+
+  if ((xgwa.visual->class != GrayScale) && (xgwa.visual->class != PseudoColor))
+    fade_p = False;
+
+  cmap = xgwa.colormap;
+
+  gcv.function = GXcopy;
+  gcv.subwindow_mode = IncludeInferiors;
+  gcv.foreground = get_pixel_resource ("foreground", "Foreground", dpy, cmap);
+  gcv.background = get_pixel_resource ("background", "Background", dpy, cmap);
+  gc = XCreateGC (
+       dpy,
+       window,
+       GCForeground | GCBackground |GCFunction | GCSubwindowMode ,
+       &gcv);
+
+  if (fade_p)
+  {
+      int status;
+      foreground.pixel = gcv.foreground;
+      XQueryColor (dpy, cmap, &foreground);
+
+      status = XAllocColorCells (
+                       dpy,
+                       cmap,
+                       0,
+                       NULL,
+                       0,
+                       &foreground.pixel,
+                       1);
+      if (status)
+      {
+         XStoreColor ( dpy, cmap, &foreground);
+         XSetForeground (dpy, gc, foreground.pixel);
+
+         background.pixel = gcv.background;
+         XQueryColor (dpy, cmap, &background);
+      }
+      else
+      {
+         /* If we cant allocate a color cell, then just forget the
+           * whole fade business.
+           */
+         fade_p = False;
+      }
+  }
+}
+
+static void
+fade_foreground (dpy, cmap, from, to, steps)
+    Display *dpy;
+    Colormap cmap;
+    XColor from;
+    XColor to;
+    int steps;
+/*
+ * This routine assumes that we have a writeable colormap.
+ * That means that the default colormap is not full, and that
+ * the visual class is PseudoColor or GrayScale.
+ */
+{
+    int i;
+    XColor inbetween;
+    int udelay = fadedelay / (steps + 1);
+
+    inbetween = foreground;
+    for (i = 0; i <= steps; i++ )
+    {
+      inbetween.red   = from.red   + (to.red   - from.red)   * i / steps ;
+      inbetween.green = from.green + (to.green - from.green) * i / steps ;
+      inbetween.blue  = from.blue  + (to.blue  - from.blue)  * i / steps ;
+      XStoreColor (dpy, cmap, &inbetween);
+      /* If we don't sync, these can bunch up */
+      XSync(dpy, 0);
+      usleep(udelay);
+    }
+}
+
+static void
+pedal (dpy, window)
+     Display *dpy;
+     Window window;
+/*
+ *    Since the XFillPolygon doesn't require that the last
+ *    point == first point, the number of points is the same
+ *    as the number of lines.  We just let XFillPolygon supply
+ *    the line from the last point to the first point.
+ *
+ */
+{
+   int numpoints;
+
+   numpoints = compute_pedal(points, maxlines);
+
+   /* Fade out, make foreground the same as background */
+   if (fade_p)
+     fade_foreground (dpy, cmap, foreground, background, 32);
+
+    /* Clear the window of previous garbage */
+    XClearWindow (dpy, window);
+
+    XFillPolygon (
+                dpy,
+                window,
+                gc,
+                points,
+                numpoints,
+                Complex,
+                CoordModeOrigin);
+
+   /* Pick a new foreground color (added by jwz) */
+   if (! mono_p)
+     {
+       XColor color;
+       hsv_to_rgb (random()%360, 1.0, 1.0,
+                  &color.red, &color.green, &color.blue);
+       XSync(dpy, 0);
+       if (fade_p)
+        {
+          foreground.red = color.red;
+          foreground.green = color.green;
+          foreground.blue = color.blue;
+          XStoreColor (dpy, cmap, &foreground);
+        }
+       else if (XAllocColor (dpy, cmap, &color))
+        {
+          XSetForeground (dpy, gc, color.pixel);
+          XFreeColors (dpy, cmap, &foreground.pixel, 1, 0);
+          foreground.red = color.red;
+          foreground.green = color.green;
+          foreground.blue = color.blue;
+          foreground.pixel = color.pixel;
+        }
+       XSync(dpy, 0);
+     }
+
+    /* Fade in by bringing the foreground back from background */
+    if (fade_p)
+       fade_foreground (dpy, cmap, background, foreground, 32);
+}
+
+\f
+char *progclass = "Pedal";
+
+/*
+ * If we are trying to save the screen, the background
+ * should be dark.
+ */
+char *defaults [] = {
+  "*delay:                     5",
+  "*fadedelay:                 200000",
+  "*maxlines:                  1000",
+  "*foreground:                 white",
+  "*background:                 black",
+  0
+};
+
+XrmOptionDescRec options [] = {
+  { "-delay",          ".delay",               XrmoptionSepArg, 0 },
+  { "-fadedelay",      ".fadedelay",           XrmoptionSepArg, 0 },
+  { "-maxlines",       ".maxlines",            XrmoptionSepArg, 0 },
+  { "-foreground",      ".foreground",          XrmoptionSepArg, 0 },
+  { "-background",      ".background",          XrmoptionSepArg, 0 },
+};
+
+int options_size = (sizeof (options) / sizeof (options[0]));
+
+void
+screenhack (dpy, window)
+     Display *dpy;
+     Window window;
+{
+    init_pedal (dpy, window);
+    for (;;) {
+       pedal (dpy, window);
+       XSync(dpy, 0);
+       if (delay) sleep (delay);
+    }
+}
diff --git a/hacks/pedal.man b/hacks/pedal.man
new file mode 100644 (file)
index 0000000..7a0c3e5
--- /dev/null
@@ -0,0 +1,62 @@
+.TH XScreenSaver 1 "24-Jun-94" "X Version 11"
+.SH NAME
+pedal - pretty geometric picture program
+.SH SYNOPSIS
+.B pedal
+[\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] [\-background \fIcolor\fP] [\-window] [\-root] [\-delay \fIseconds\fP] [-maxlines \fInumber\fP] [-fadedelay \fIuseconds\fP] [-mono] [\-install] [\-visual \fIvisual\fP]
+.SH DESCRIPTION
+The \fIpedal\fP program displays pretty geometric pictures.
+.SH OPTIONS
+.I pedal
+accepts the following options:
+.TP 8
+.B \-window
+Draw on a newly-created window.  This is the default.
+.TP 8
+.B \-root
+Draw on the root window.
+.TP 8
+.B \-foreground \fIcolor\fP
+The color for the foreground.  Default is white.
+.TP 8
+.B \-background \fIcolor\fP
+The color for the background.  Default is black.
+.TP 8
+.B \-delay \fIseconds\fP
+The number of seconds to pause between each picture.
+.TP 8
+.B \-maxlines \fInumber\fP
+The maximum number of lines in the drawing.  Good values are
+between 20 and 2000.  Maximum value is 16K.
+.TP 8
+.B \-fadedelay \fImicroseconds\fP
+The number of micro seconds to take when fading in and out.
+.TP 8
+.B \-mono
+Don't do fading.  Pretend we're on a monochrome display.
+.PP
+To make your X server grunt under load, and to impress your
+friends, try \fIpedal -mono -delay 0 -maxlines 100\fp.
+.SH ENVIRONMENT
+.PP
+.TP 8
+.B DISPLAY
+to get the default host and display number.
+.TP 8
+.B XENVIRONMENT
+to get the name of a resource file that overrides the global resources
+stored in the RESOURCE_MANAGER property.
+.SH SEE ALSO
+.BR X (1),
+.BR xscreensaver (1)
+.SH COPYRIGHT
+Copyright \(co 1994, by Carnegie Mellon University.  Permission to use,
+copy, modify, distribute, and sell this software and its documentation
+for any purpose is hereby granted without fee, provided fnord that the
+above copyright notice appear in all copies and that both that copyright
+notice and this permission notice appear in supporting documentation.
+No representations are made about the  suitability of fnord this software
+for any purpose.  It is provided "as is" without express or implied
+warranty.
+.SH AUTHOR
+Dale Moore <Dale.Moore@cs.cmu.edu>, 24-Jun-1994.
old mode 100755 (executable)
new mode 100644 (file)
diff --git a/hacks/pyro.exe_axp b/hacks/pyro.exe_axp
deleted file mode 100755 (executable)
index 38d58db..0000000
Binary files a/hacks/pyro.exe_axp and /dev/null differ
diff --git a/hacks/pyro.exe_vax b/hacks/pyro.exe_vax
deleted file mode 100755 (executable)
index f556094..0000000
Binary files a/hacks/pyro.exe_vax and /dev/null differ
diff --git a/hacks/pyro.hlp b/hacks/pyro.hlp
deleted file mode 100755 (executable)
index e1e1c68..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-1 PYRO 
-Simulate fireworks
-
-SYNOPSIS
-
-   $ pyro [-display host:display.screen] [-foreground color] 
-          [-background color] [-window] [-root] [-mono] [-count integer] 
-          [-frequency integer] [-scatter integer]
-
-2 DESCRIPTION
-The pyro program simulates fireworks, in a way similar to a Macintosh
-program of the same name.
-
-2 OPTIONSpyro
-Pyro accepts the following options:
-
-   -window
-Draw on a newly-created window.  This is the default.
-
-   -root
-Draw on the root window.
-
-   -mono 
-If on a color display, pretend we're on a monochrome display.
-
-   -count integer
-How many particles should be allowed on the screen at once.  Default 100.
-
-   -frequency integer
-How often new missiles should launch.  Default 30.
-
-   -scatter integer
-How many particles should appear when a missile explodes.  Default 20.
-The actual number used is between N and N+(N/2).
-
-2 ENVIRONMENT
-
-   DISPLAY
-to get the default host and display number.
-
-   XENVIRONMENT
-to get the name of a resource file that overrides the global resources
-stored in the RESOURCE_MANAGER property.
-
-2 COPYRIGHT
-Copyright (co 1992 by Jamie Zawinski.  Permission to use, copy, modify, 
-distribute, and sell this software and its documentation for any purpose is 
-hereby granted without fee, provided that the above copyright notice appear 
-in all copies and that both that copyright notice and this permission notice
-appear in supporting documentation.  No representations are made about the 
-suitability of this software for any purpose.  It is provided "as is" without
-express or implied warranty.
-
-2 AUTHOR
-Jamie Zawinski <jwz@mcom.com>, 13-aug-92.
old mode 100755 (executable)
new mode 100644 (file)
index 3059dd5..5e83518
@@ -3,7 +3,7 @@
 pyro - simulate fireworks
 .SH SYNOPSIS
 .B pyro
-[\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] [\-background \fIcolor\fP] [\-window] [\-root] [\-mono] [\-count \fIinteger\fP] [\-frequency \fIinteger\fP] [\-scatter \fIinteger\fP]
+[\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] [\-background \fIcolor\fP] [\-window] [\-root] [\-mono] [\-install] [\-visual \fIvisual\fP] [\-count \fIinteger\fP] [\-frequency \fIinteger\fP] [\-scatter \fIinteger\fP]
 .SH DESCRIPTION
 The \fIpyro\fP program simulates fireworks, in a way similar to a Macintosh
 program of the same name.
@@ -20,13 +20,20 @@ Draw on the root window.
 .B \-mono 
 If on a color display, pretend we're on a monochrome display.
 .TP 8
-.B \-count integer
+.B \-install
+Install a private colormap for the window.
+.TP 8
+.B \-visual \fIvisual\fP
+Specify which visual to use.  Legal values are the name of a visual class,
+or the id number (decimal or hex) of a specific visual.
+.TP 8
+.B \-count \fIinteger\fP
 How many particles should be allowed on the screen at once.  Default 100.
 .TP 8
-.B \-frequency integer
+.B \-frequency \fIinteger\fP
 How often new missiles should launch.  Default 30.
 .TP 8
-.B \-scatter integer
+.B \-scatter \fIinteger\fP
 How many particles should appear when a missile explodes.  Default 20.
 The actual number used is between \fIN\fP and \fIN+(N/2)\fP.
 .SH ENVIRONMENT
old mode 100755 (executable)
new mode 100644 (file)
diff --git a/hacks/qix.exe_axp b/hacks/qix.exe_axp
deleted file mode 100755 (executable)
index b8e8a19..0000000
Binary files a/hacks/qix.exe_axp and /dev/null differ
diff --git a/hacks/qix.exe_vax b/hacks/qix.exe_vax
deleted file mode 100755 (executable)
index cf5243b..0000000
Binary files a/hacks/qix.exe_vax and /dev/null differ
diff --git a/hacks/qix.hlp b/hacks/qix.hlp
deleted file mode 100755 (executable)
index 0e7a535..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-1 QIX 
-Bounce colored lines around a window
-
-SYNOPSIS
-
-  $ qix [-display host:display.screen] [-foreground color] 
-        [-background color] [-window] [-root] [-mono] [-segments int] 
-        [-spread pixels] [-size pixels] [-count int] [-color-shift degrees] 
-        [-delay usecs] [-random] [-linear] [-solid] [-hollow] [-xor] 
-        [-no-xor] [-transparent] [-non-transparent] [-additive] [-subtractive]
-
-2 DESCRIPTION
-The qix program bounces a series of line segments around its window.
-This is truly the swiss army chainsaw of qix programs.  If you know of one
-with more display modes, I want to know about it.
-
-2 OPTIONS
-qix accepts the following options:
-
-   -window
-Draw on a newly-created window.  This is the default.
-
-   -root
-Draw on the root window.
-
-   -mono 
-If on a color display, pretend we're on a monochrome display.
-
-   -segments integer
-How many line segments should be drawn.  Default 50.
-
-   -spread integer
-How far apart the endpoints of one segment should be from the next.
-Default 8.
-
-   -size integer
-The maximum distance one endpoint of a segment is allowed to be from
-the opposite end of that segment.  Default 0, meaning unlimited.
-
-   -count integer
-How many qixes to draw.  Default 1.
-
-   -color-shift degrees
-If on a color display, the color of the line segments will cycle through
-the spectrum.  This specifies how far the hue of each segment should be
-from the next, in degrees on the HSV wheel.  Default 3.
-
-   -delay microseconds
-How much of a delay should be introduced between steps of the animation.
-Default 25000, or about 0.025 seconds.
-
-   -random
-The qix will wander around the screen semi-randomly.  This is the
-default.
-
-   -linear
-The opposite of -random: the qix will travel in straight lines
-until it reaches a wall, and then it will bounce.
-
-   -solid
-If this is specified, then the area between the line segments will be filled
-in with the appropriate color, instead of the qix simply being composed
-of one-pixel-wide line segments.  This option looks really good in color.
-
-   -hollow
-The opposite of -solid; this is the default.
-
-   -xor
-If this is specified, then qix segments will be drawn and erased with xor,
-instead of being drawn in some color and erased in the background color.
-This implies -mono, in that only two colors can be used.
-
-   -transparent
-If this is specified, and -count is greater than 1, then each qix
-will be drawn in one color, and when they overlap, the colors will be mixed.
-This only works on \fBPseudoColor displays.  This looks best in
-conjuction with -solid.
-
-   -non-transparent
-Turns off -transparent.
-
-   -additive
-If -transparent is specified, then this option means that the colors
-will be mixed using an additive color model, as if the qixes were projected
-light.  This is the default.
-
-   -subtractive
-If -transparent is specified, then this option means that the
-colors will be mixed using a subtractive color model, as if the qixes were
-translucent filters.
-
-2 ENVIRONMENT
-
-   DISPLAY
-to get the default host and display number.
-
-   XENVIRONMENT
-to get the name of a resource file that overrides the global resources
-stored in the RESOURCE_MANAGER property.
-
-2 COPYRIGHT
-Copyright (co 1992 by Jamie Zawinski.  Permission to use, copy, modify, 
-distribute, and sell this software and its documentation for any purpose is 
-hereby granted without fee, provided that the above copyright notice appear 
-in all copies and that both that copyright notice and this permission notice
-appear in supporting documentation.  No representations are made about the 
-suitability of this software for any purpose.  It is provided "as is" without
-express or implied warranty.
-
-2 AUTHOR
-Jamie Zawinski <jwz@mcom.com>, 13-aug-92.
old mode 100755 (executable)
new mode 100644 (file)
index dea9ea2..c67221c
@@ -3,7 +3,7 @@
 qix - bounce colored lines around a window
 .SH SYNOPSIS
 .B qix
-[\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] [\-background \fIcolor\fP] [\-window] [\-root] [\-mono] [\-segments \fIint\fP] [\-spread \fIpixels\fP] [\-size \fIpixels\fP] [\-count \fIint\fP] [\-color-shift \fIdegrees\fP] [\-delay \fIusecs\fP] [\-random] [\-linear] [\-solid] [\-hollow] [\-xor] [\-no\-xor] [\-transparent] [\-non\-transparent] [\-additive] [\-subtractive]
+[\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] [\-background \fIcolor\fP] [\-window] [\-root] [\-mono] [\-install] [\-visual \fIvisual\fP] [\-segments \fIint\fP] [\-spread \fIpixels\fP] [\-size \fIpixels\fP] [\-count \fIint\fP] [\-color-shift \fIdegrees\fP] [\-delay \fIusecs\fP] [\-random] [\-linear] [\-solid] [\-hollow] [\-xor] [\-no\-xor] [\-transparent] [\-non\-transparent] [\-additive] [\-subtractive]
 .SH DESCRIPTION
 The \fIqix\fP program bounces a series of line segments around its window.
 This is truly the swiss army chainsaw of qix programs.  If you know of one
@@ -21,26 +21,33 @@ Draw on the root window.
 .B \-mono 
 If on a color display, pretend we're on a monochrome display.
 .TP 8
-.B \-segments integer
+.B \-install
+Install a private colormap for the window.
+.TP 8
+.B \-visual \fIvisual\fP
+Specify which visual to use.  Legal values are the name of a visual class,
+or the id number (decimal or hex) of a specific visual.
+.TP 8
+.B \-segments \fIinteger\fP
 How many line segments should be drawn.  Default 50.
 .TP 8
-.B \-spread integer
+.B \-spread \fIinteger\fP
 How far apart the endpoints of one segment should be from the next.
 Default 8.
 .TP 8
-.B \-size integer
+.B \-size \fIinteger\fP
 The maximum distance one endpoint of a segment is allowed to be from
 the opposite end of that segment.  Default 0, meaning unlimited.
 .TP 8
-.B \-count integer
+.B \-count \fIinteger\fP
 How many qixes to draw.  Default 1.
 .TP 8
-.B \-color\-shift degrees
+.B \-color\-shift \fIdegrees\fP
 If on a color display, the color of the line segments will cycle through
 the spectrum.  This specifies how far the hue of each segment should be
 from the next, in degrees on the HSV wheel.  Default 3.
 .TP 8
-.B \-delay microseconds
+.B \-delay \fImicroseconds\fP
 How much of a delay should be introduced between steps of the animation.
 Default 25000, or about 0.025 seconds.
 .TP 8
diff --git a/hacks/readme b/hacks/readme
deleted file mode 100755 (executable)
index c5ebcd6..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-
-This directory contains various graphics hacks.  These are independent from
-the xscreensaver program (in the ../driver/ directory) but some of them use
-the utility functions found in the ../utils/ directory.
-
-If you have compilation problems, check the parameters in ../config.h.
-
-The file xlock.h makes it really easy to turn `xlock' modules into standalone
-programs that can be used with xscreensaver; check it out.
old mode 100755 (executable)
new mode 100644 (file)
index e1db24b..8cf49cf
@@ -16,9 +16,6 @@
 #include "screenhack.h"
 #include <stdio.h>
 #include <math.h>
-#ifdef VMS
-#define M_PI 3.14159265358979323846
-#endif
 #if __STDC__
 #include <math.h>      /* for M_PI */
 #endif
diff --git a/hacks/rocks.exe_axp b/hacks/rocks.exe_axp
deleted file mode 100755 (executable)
index aea1950..0000000
Binary files a/hacks/rocks.exe_axp and /dev/null differ
diff --git a/hacks/rocks.exe_vax b/hacks/rocks.exe_vax
deleted file mode 100755 (executable)
index 9939fb1..0000000
Binary files a/hacks/rocks.exe_vax and /dev/null differ
diff --git a/hacks/rocks.hlp b/hacks/rocks.hlp
deleted file mode 100755 (executable)
index 2303ebe..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-1 ROCKS 
-Animation of flying through an asteroid field
-
-SYNOPSIS
-
-  $ rocks [-display host:display.screen] [-foreground color] 
-          [-background color] [-window] [-root] [-count integer] 
-          [-delay usecs] [-speed integer] [-norotate]
-
-2 DESCRIPTION
-The rocks program draws an animation of an asteroid field moving past
-the observer (or vice versa).  Sometimes the observer picks up spin on Z axis.
-
-2 OPTIONS
-rocks accepts the following options:
-
-   -window
-Draw on a newly-created window.  This is the default.
-
-   -root
-Draw on the root window.
-
-   -count integer
-Maximum number of rocks to draw on the screen at once.  Default 100.
-
-   -speed integer
-A measure of the speed with which the observer and the rocks pass each other,
-from 1 to 100.  Default 100, meaning ``very fast.''  If you're on a slow 
-display connection (the animation looks jerky) then try making this number 
-smaller, and/or decreasing the number of rocks.
-
-   -delay microseconds
-Number of microseconds to delay between each frame.  Default 50000, meaning
-about 1/20th second.  Compare and contrast with -speed, above.
-
-   -norotate
-Don't rotate the observer; just fly straight through the field.
-
-2 ENVIRONMENT
-
-   DISPLAY
-to get the default host and display number.
-
-   XENVIRONMENT
-to get the name of a resource file that overrides the global resources
-stored in the RESOURCE_MANAGER property.
-
-2 BUGS
-There should be an option to display doppler shift (a gravity rainbow.)
-
-Speed of rotation should be settable.
-
-Default speed of rotation should be relative to forward velocity.
-
-2 COPYRIGHT
-Copyright (co 1992 by Jamie Zawinski.  Permission to use, copy, modify, 
-distribute, and sell this software and its documentation for any purpose is 
-hereby granted without fee, provided that the above copyright notice appear 
-in all copies and that both that copyright notice and this permission notice
-appear in supporting documentation.  No representations are made about the 
-suitability of this software for any purpose.  It is provided "as is" without
-express or implied warranty.
-
-2 AUTHOR
-Based on Lisp Machine code copyright 1988 John Nguyen <johnn@hx.lcs.mit.edu>.
-
-Ported to C and X by Jamie Zawinski <jwz@mcom.com>, 13-aug-92.
old mode 100755 (executable)
new mode 100644 (file)
index c36e5f3..af45f89
@@ -3,7 +3,7 @@
 rocks - animation of flying through an asteroid field
 .SH SYNOPSIS
 .B rocks
-[\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] [\-background \fIcolor\fP] [\-window] [\-root] [\-count \fIinteger\fP] [\-delay \fIusecs\fP] [\-speed \fIinteger\fP] [\-norotate]
+[\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] [\-background \fIcolor\fP] [\-window] [\-root] [\-install] [\-visual \fIvisual\fP] [\-count \fIinteger\fP] [\-delay \fIusecs\fP] [\-speed \fIinteger\fP] [\-norotate]
 .SH DESCRIPTION
 The \fIrocks\fP program draws an animation of an asteroid field moving past
 the observer (or vice versa).  Sometimes the observer picks up spin on Z axis.
@@ -17,16 +17,23 @@ Draw on a newly-created window.  This is the default.
 .B \-root
 Draw on the root window.
 .TP 8
-.B \-count integer
+.B \-install
+Install a private colormap for the window.
+.TP 8
+.B \-visual \fIvisual\fP
+Specify which visual to use.  Legal values are the name of a visual class,
+or the id number (decimal or hex) of a specific visual.
+.TP 8
+.B \-count \fIinteger\fP
 Maximum number of rocks to draw on the screen at once.  Default 100.
 .TP 8
-.B \-speed integer
+.B \-speed \fIinteger\fP
 A measure of the speed with which the observer and the rocks pass each other,
 from 1 to 100.  Default 100, meaning ``very fast.''  If you're on a slow 
 display connection (the animation looks jerky) then try making this number 
 smaller, and/or decreasing the number of rocks.
 .TP 8
-.B \-delay microseconds
+.B \-delay \fImicroseconds\fP
 Number of microseconds to delay between each frame.  Default 50000, meaning
 about 1/20th second.  Compare and contrast with \fI\-speed\fP, above.
 .TP 8
old mode 100755 (executable)
new mode 100644 (file)
diff --git a/hacks/rorschach.exe_axp b/hacks/rorschach.exe_axp
deleted file mode 100755 (executable)
index 1ad22fd..0000000
Binary files a/hacks/rorschach.exe_axp and /dev/null differ
diff --git a/hacks/rorschach.exe_vax b/hacks/rorschach.exe_vax
deleted file mode 100755 (executable)
index c0d2f67..0000000
Binary files a/hacks/rorschach.exe_vax and /dev/null differ
diff --git a/hacks/rorschach.hlp b/hacks/rorschach.hlp
deleted file mode 100755 (executable)
index 8b9df28..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-1 RORSCHACH 
-Simulate ink-blot patterns
-
-SYNOPSIS
-
-  $ rorschach [-display host:display.screen] [-foreground color] 
-              [-background color] [-window] [-root] [-mono] 
-              [-iterations integer] [-offset integer] [-xsymmetry] [-ysymmetry]
-
-2 DESCRIPTION
-The rorschach program draws random patterns reminiscent of the
-psychological test of same name.
-
-2 OPTIONS
-rorschach accepts the following options:
-
-   -window
-Draw on a newly-created window.  This is the default.
-
-   -root
-Draw on the root window.
-
-   -mono 
-If on a color display, pretend we're on a monochrome display.
-
-   -iterations integer
-How many dots should be drawn each time.  Default 4000.
-
-   -offset integer
-How far apart the dots should be.  Default 4 pixels.
-
-   -xsymmetry
-Whether the images should be horizontally symmetrical.  Default true.
-
-   -ysymmetry
-Whether the images should be vertically symmetrical.  Default false.
-
-2 ENVIRONMENT
-
-   DISPLAY
-to get the default host and display number.
-
-   XENVIRONMENT
-to get the name of a resource file that overrides the global resources
-stored in the RESOURCE_MANAGER property.
-
-2 BUGS
-May call your sanity into question.
-
-2 COPYRIGHT
-Copyright (co 1992 by Jamie Zawinski.  Permission to use, copy, modify, 
-distribute, and sell this software and its documentation for any purpose is 
-hereby granted without fee, provided that the above copyright notice appear 
-in all copies and that both that copyright notice and this permission notice
-appear in supporting documentation.  No representations are made about the 
-suitability of this software for any purpose.  It is provided "as is" without
-express or implied warranty.
-
-2 AUTHOR
-Jamie Zawinski <jwz@mcom.com>, 13-aug-92.
old mode 100755 (executable)
new mode 100644 (file)
index 46b832f..1b0b249
@@ -3,7 +3,7 @@
 rorschach - simulate ink-blot patterns
 .SH SYNOPSIS
 .B rorschach
-[\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] [\-background \fIcolor\fP] [\-window] [\-root] [\-mono] [\-iterations \fIinteger\fP] [\-offset \fIinteger\fP] [\-xsymmetry] [\-ysymmetry]
+[\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] [\-background \fIcolor\fP] [\-window] [\-root] [\-mono] [\-install] [\-visual \fIvisual\fP] [\-iterations \fIinteger\fP] [\-offset \fIinteger\fP] [\-xsymmetry] [\-ysymmetry]
 .SH DESCRIPTION
 The \fIrorschach\fP program draws random patterns reminiscent of the
 psychological test of same name.
@@ -20,10 +20,17 @@ Draw on the root window.
 .B \-mono 
 If on a color display, pretend we're on a monochrome display.
 .TP 8
-.B \-iterations integer
+.B \-install
+Install a private colormap for the window.
+.TP 8
+.B \-visual \fIvisual\fP
+Specify which visual to use.  Legal values are the name of a visual class,
+or the id number (decimal or hex) of a specific visual.
+.TP 8
+.B \-iterations \fIinteger\fP
 How many dots should be drawn each time.  Default 4000.
 .TP 8
-.B \-offset integer
+.B \-offset \fIinteger\fP
 How far apart the dots should be.  Default 4 pixels.
 .TP 8
 .B \-xsymmetry
old mode 100755 (executable)
new mode 100644 (file)
index 5690c47..4261553
@@ -1,4 +1,4 @@
-/* xscreensaver, Copyright (c) 1992 Jamie Zawinski <jwz@mcom.com>
+/* xscreensaver, Copyright (c) 1992, 1995 Jamie Zawinski <jwz@mcom.com>
  *
  * Permission to use, copy, modify, distribute, and sell this software and its
  * documentation for any purpose is hereby granted without fee, provided that
 #include <X11/Intrinsic.h>
 #include <X11/IntrinsicP.h>
 #include <X11/CoreP.h>
-#ifndef VMS
+#include <X11/Shell.h>
+#include <X11/StringDefs.h>
 #include <X11/Xmu/Error.h>
-#else
-#include "sys$common:[decw$include.xmu]Error.h"
-#endif
-
 #include "screenhack.h"
 
 char *progname;
@@ -58,14 +55,16 @@ static XrmOptionDescRec default_options [] = {
   { "-root",   ".root",                XrmoptionNoArg, "True" },
   { "-window", ".root",                XrmoptionNoArg, "False" },
   { "-mono",   ".mono",                XrmoptionNoArg, "True" },
-  { "-install",        ".installColormap",     XrmoptionNoArg, "True" }
+  { "-install",        ".installColormap",     XrmoptionNoArg, "True" },
+  { "-visual", ".visualID",            XrmoptionSepArg, 0 }
 };
 
 static char *default_defaults[] = {
   "*root:              false",
-  "*geometry:          500x500",
+  "*geometry:          500x500", /* this should be .geometry, but nooooo... */
   "*mono:              false",
   "*installColormap:   false",
+  "*visualID:          default",
   0
 };
 
@@ -123,11 +122,7 @@ MapNotify_event_p (dpy, event, window)
 }
 
 
-#ifndef VMS
 void
-#else
-int
-#endif
 main (argc, argv)
      int argc;
      char **argv;
@@ -136,6 +131,7 @@ main (argc, argv)
   Widget toplevel;
   Display *dpy;
   Window window;
+  Visual *visual;
   Colormap cmap;
   Bool root_p;
   XEvent event;
@@ -186,12 +182,38 @@ main (argc, argv)
       XtDestroyWidget (toplevel);
       XGetWindowAttributes (dpy, window, &xgwa);
       cmap = xgwa.colormap;
+      visual = xgwa.visual;
     }
   else
     {
+      visual = get_visual_resource (dpy, "visualID", "VisualID");
+
+      XtVaSetValues (toplevel, XtNmappedWhenManaged, False, 0);
       XtRealizeWidget (toplevel);
       window = XtWindow (toplevel);
-      if (get_boolean_resource ("installColormap", "InstallColormap"))
+
+      if (visual != DefaultVisualOfScreen (XtScreen (toplevel)))
+       {
+         Arg av [20];
+         int ac;
+         unsigned int bg, bd;
+         Widget new;
+         cmap = XCreateColormap (dpy, window, visual, AllocNone);
+         bg = get_pixel_resource ("background", "Background", dpy, cmap);
+         bd = get_pixel_resource ("borderColor", "Foreground", dpy, cmap);
+         ac = 0;
+         XtSetArg (av[ac], XtNvisual, visual); ac++;
+         XtSetArg (av[ac], XtNcolormap, cmap); ac++;
+         XtSetArg (av[ac], XtNdepth, get_visual_depth (dpy, visual)); ac++;
+         XtSetArg (av[ac], XtNbackground, (Pixel) bg); ac++;
+         XtSetArg (av[ac], XtNborderColor, (Pixel) bd); ac++;
+         new = XtAppCreateShell (progname, progclass,
+                                 topLevelShellWidgetClass, dpy,
+                                 av, ac);
+         XtDestroyWidget (toplevel);
+         toplevel = new;
+       }
+      else if (get_boolean_resource ("installColormap", "InstallColormap"))
        {
          cmap = XCreateColormap (dpy, window,
                                  DefaultVisualOfScreen (XtScreen (toplevel)),
@@ -199,8 +221,14 @@ main (argc, argv)
          XSetWindowColormap (dpy, window, cmap);
        }
       else
-       cmap = DefaultColormap (dpy, DefaultScreen (dpy));
+       {
+         cmap = DefaultColormap (dpy, DefaultScreen (dpy));
+       }
+
+      XtPopup (toplevel, XtGrabNone);
+      window = XtWindow (toplevel);
     }
+
   if (!get_boolean_resource ("dontClearWindow", "Boolean")) /* kludge-o-rama */
     {
       XSetWindowBackground (dpy, window,
old mode 100755 (executable)
new mode 100644 (file)
index 9737f65..fb3de4c
@@ -1,4 +1,4 @@
-/* xscreensaver, Copyright (c) 1992, 1993 Jamie Zawinski <jwz@mcom.com>
+/* xscreensaver, Copyright (c) 1992-1995 Jamie Zawinski <jwz@mcom.com>
  *
  * Permission to use, copy, modify, distribute, and sell this software and its
  * documentation for any purpose is hereby granted without fee, provided that
@@ -9,8 +9,7 @@
  * implied warranty.
  */
 
-#if 0
- * Found in Don Hopkin`s .plan file:
+/* Found in Don Hopkins' .plan file:
  *
  *   The color situation is a total flying circus.  The X approach to
  *   device independence is to treat everything like a MicroVax framebuffer
  *   WHAT IS YOUR COLORMAP?
  *         cmap = DefaultColormap(display, DefaultScreen(display));
  *   AND WHAT IS YOUR FAVORITE COLOR?
- *         favorite_color = 0; /* Black. */
- *         /* Whoops! No, I mean: */
+ *         favorite_color = 0; / * Black. * /
+ *         / * Whoops! No, I mean: * /
  *         favorite_color = BlackPixel(display, DefaultScreen(display));
- *         /* AAAYYYYEEEEE!! (client dumps core & falls into the chasm) */
+ *         / * AAAYYYYEEEEE!! (client dumps core & falls into the chasm) * /
  *
  *   WHAT IS YOUR DISPLAY?
  *         display = XOpenDisplay("unix:0");
  *                              8, PseudoColor, &vinfo) != 0)
  *            visual = vinfo.visual;
  *   AND WHAT IS THE NET SPEED VELOCITY OF AN XConfigureWindow REQUEST?
- *         /* Is that a SubStructureRedirectMask or a ResizeRedirectMask? */
- *   WHAT??! HOW AM I SUPPOSED TO KNOW THAT?
+ *         / * Is that a SubStructureRedirectMask or a ResizeRedirectMask? * /
+ *   WHAT?! HOW AM I SUPPOSED TO KNOW THAT?
  *   AAAAUUUGGGHHH!!!! (server dumps core & falls into the chasm)
- *
-#endif /* 0 */
+ */
 
 #ifndef _SCREENHACK_H_
 #define _SCREENHACK_H_
@@ -64,7 +62,6 @@
 #include <X11/Xos.h>
 #include "vroot.h"
 
-
 extern Bool mono_p;
 extern char *progname;
 extern char *progclass;
@@ -73,8 +70,8 @@ extern XrmOptionDescRec options [];
 extern int options_size;
 extern char *defaults [];
 
-#if xxx__STDC__
-# if defined(SVR4) || defined(SYSV)
+#if __STDC__
+# if (defined(SVR4) || defined(SYSV)) && !defined(__sgi)
 #  ifndef random
     extern int rand (void);
 #   define random() rand()
@@ -88,17 +85,11 @@ extern char *defaults [];
     extern long random (void);
 #  endif
 #  ifndef srandom
-    extern void srandom (int);
+    extern int srandom (unsigned int);
 #  endif
 # endif /* !totally-losing-SYSV */
 #endif /* __STDC__ */
 
-
-#ifdef VMS
-#define random rand
-#define srandom srand
-#endif
-
 #if __STDC__
 # define P(x)x
 #else
@@ -139,7 +130,7 @@ static double _frand_tmp_;
 #define frand(f)                                                       \
  (_frand_tmp_ = (((double) random()) /                                         \
                 (((double) ((unsigned int)~0)) / ((double) (f+f)))),   \
-  _frand_tmp_ < 0 ? -_frand_tmp_ : _frand_tmp_)
+  _frand_tmp_ < 0 ? (-_frand_tmp_) : _frand_tmp_)
 
 #undef P
 #endif /* _SCREENHACK_H_ */
old mode 100755 (executable)
new mode 100644 (file)
diff --git a/hacks/slidescreen.exe_axp b/hacks/slidescreen.exe_axp
deleted file mode 100755 (executable)
index 449fa88..0000000
Binary files a/hacks/slidescreen.exe_axp and /dev/null differ
diff --git a/hacks/slidescreen.exe_vax b/hacks/slidescreen.exe_vax
deleted file mode 100755 (executable)
index f17e5f0..0000000
Binary files a/hacks/slidescreen.exe_vax and /dev/null differ
diff --git a/hacks/slidescreen.hlp b/hacks/slidescreen.hlp
deleted file mode 100755 (executable)
index 217b08f..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-1 SLIDESCREEN 
-Permute the screen image like an 8-puzzle
-
-SYNOPSIS
-
-  $ slidescreen [-display host:display.screen] [-background color] 
-                [-grid-size pixels] [-ibw pixels] [-increment pixels] 
-                [-delay usecs] [-delay2 usecs] [-window] [-root]
-
-2 DESCRIPTION
-The slidescreen program takes an image of the screen, divides it into
-a grid, deletes a random square of that grid, and then randomly slides 
-one of the neighbors of this "hole" into the hole (and repeat.)
-
-2 OPTIONS
-slidescreen accepts the following options:
-
-   -window
-Draw on a newly-created window.  This is the default.
-
-   -root
-Draw on the root window.
-
-   -grid-size pixels
-The size of the grid cells.  Default 70 pixels.
-
-   -ibw pixels
-The size of the "gutter" between grid cells.  Default 1 pixel.
-
-   -increment pixels
-How many pixels by which a piece should be moved when sliding to a new 
-location.  Default 10 pixels.
-
-   -delay microseconds
-How much of a delay should be introduced between steps of the animation of
-the motion of each segment.  Default 50000, which is 0.05 seconds.  This
-is closely related to the -increment parameter.
-
-   -delay microseconds
-How much of a delay should be introduced between the end of the motion of
-one segment and the beginning of the motion of another.  Default 1000000,
-which isone second.
-
-2 ENVIRONMENT
-
-   DISPLAY
-to get the default host and display number.
-
-   XENVIRONMENT
-to get the name of a resource file that overrides the global resources
-stored in the RESOURCE_MANAGER property.
-
-2 COPYRIGHT
-Copyright (co 1992 by Jamie Zawinski.  Permission to use, copy, modify, 
-distribute, and sell this software and its documentation for any purpose is 
-hereby granted without fee, provided that the above copyright notice appear 
-in all copies and that both that copyright notice and this permission notice
-appear in supporting documentation.  No representations are made about the 
-suitability of this software for any purpose.  It is provided "as is" without
-express or implied warranty.
-
-2 AUTHOR
-Jamie Zawinski <jwz@mcom.com>, 3-dec-92.
old mode 100755 (executable)
new mode 100644 (file)
index 762d22a..9dc86fc
@@ -3,7 +3,7 @@
 slidescreen - permute the screen image like an 8-puzzle
 .SH SYNOPSIS
 .B slidescreen
-[\-display \fIhost:display.screen\fP] [\-background \fIcolor\fP] [\-grid-size \fIpixels\fP] [\-ibw \fIpixels\fP] [\-increment \fIpixels\fP] [\-delay \fIusecs\fP] [\-delay2 \fIusecs\fP] [\-window] [\-root]
+[\-display \fIhost:display.screen\fP] [\-background \fIcolor\fP] [\-grid-size \fIpixels\fP] [\-ibw \fIpixels\fP] [\-increment \fIpixels\fP] [\-delay \fIusecs\fP] [\-delay2 \fIusecs\fP] [\-window] [\-root] [\-install] [\-visual \fIvisual\fP]
 .SH DESCRIPTION
 The \fIslidescreen\fP program takes an image of the screen, divides it into
 a grid, deletes a random square of that grid, and then randomly slides 
@@ -18,22 +18,29 @@ Draw on a newly-created window.  This is the default.
 .B \-root
 Draw on the root window.
 .TP 8
-.B \-grid-size pixels
+.B \-install
+Install a private colormap for the window.
+.TP 8
+.B \-visual \fIvisual\fP
+Specify which visual to use.  Legal values are the name of a visual class,
+or the id number (decimal or hex) of a specific visual.
+.TP 8
+.B \-grid-size \fIpixels\fP
 The size of the grid cells.  Default 70 pixels.
 .TP 8
-.B \-ibw pixels
+.B \-ibw \fIpixels\fP
 The size of the "gutter" between grid cells.  Default 1 pixel.
 .TP 8
-.B \-increment pixels
+.B \-increment \fIpixels\fP
 How many pixels by which a piece should be moved when sliding to a new 
 location.  Default 10 pixels.
 .TP 8
-.B \-delay microseconds
+.B \-delay \fImicroseconds\fP
 How much of a delay should be introduced between steps of the animation of
 the motion of each segment.  Default 50000, which is 0.05 seconds.  This
 is closely related to the \fI\-increment\fP parameter.
 .TP 8
-.B \-delay microseconds
+.B \-delay \fImicroseconds\fP
 How much of a delay should be introduced between the end of the motion of
 one segment and the beginning of the motion of another.  Default 1000000,
 which isone second.
diff --git a/hacks/spline.h b/hacks/spline.h
deleted file mode 100755 (executable)
index dd23586..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright (c) 1987, 1988, 1989 Stanford University
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided
- * that the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of Stanford not be used in advertising or
- * publicity pertaining to distribution of the software without specific,
- * written prior permission.  Stanford makes no representations about
- * the suitability of this software for any purpose.  It is provided "as is"
- * without express or implied warranty.
- *
- * STANFORD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.
- * IN NO EVENT SHALL STANFORD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
- * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
- * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* This code came with the InterViews distribution, and was translated
-   from C++ to C by Matthieu Devin <devin@lucid.com> some time in 1992.
- */
-
-#ifndef _SPLINE_H_
-#define _SPLINE_H_
-
-#include <X11/Xlib.h>
-
-#if __STDC__
-# define P(x)x
-#else
-# define P(x)()
-#endif
-
-#ifdef VMS
-typedef unsigned int u_int;
-#endif
-
-typedef struct _spline
-{
-  /* input */
-  u_int                n_controls;
-  double*      control_x;
-  double*      control_y;
-
-  /* output */
-  u_int                n_points;
-  XPoint*      points;
-  u_int                allocated_points;
-} spline;
-
-spline* make_spline P((u_int size));
-void compute_spline P((spline* s));
-void compute_closed_spline P((spline* s));
-void just_fill_spline P((spline* s));
-void append_spline_points P((spline* s1, spline* s2));
-void spline_bounding_box P((spline* s, XRectangle* rectangle_out));
-
-#undef P
-#endif /* _SPLINE_H_ */
diff --git a/hacks/vaxdeccobjs.zip b/hacks/vaxdeccobjs.zip
deleted file mode 100755 (executable)
index 1cfa707..0000000
Binary files a/hacks/vaxdeccobjs.zip and /dev/null differ
diff --git a/hacks/vaxobjs.zip b/hacks/vaxobjs.zip
deleted file mode 100755 (executable)
index 1afe888..0000000
Binary files a/hacks/vaxobjs.zip and /dev/null differ
diff --git a/hacks/version.h b/hacks/version.h
deleted file mode 100755 (executable)
index 899992b..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-static char *screensaver_id =
-       "@(#)xscreensaver 1.24, by Jamie Zawinski (jwz@mcom.com)";
diff --git a/hacks/vms.opt b/hacks/vms.opt
deleted file mode 100755 (executable)
index fedd38b..0000000
Binary files a/hacks/vms.opt and /dev/null differ
diff --git a/hacks/vms_axp.opt b/hacks/vms_axp.opt
deleted file mode 100755 (executable)
index eaecdb5..0000000
Binary files a/hacks/vms_axp.opt and /dev/null differ
diff --git a/hacks/vms_decc.opt b/hacks/vms_decc.opt
deleted file mode 100755 (executable)
index 12afc8c..0000000
Binary files a/hacks/vms_decc.opt and /dev/null differ
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
diff --git a/hacks/xroger.exe_axp b/hacks/xroger.exe_axp
deleted file mode 100755 (executable)
index 7139a2d..0000000
Binary files a/hacks/xroger.exe_axp and /dev/null differ
diff --git a/hacks/xroger.exe_vax b/hacks/xroger.exe_vax
deleted file mode 100755 (executable)
index 089b292..0000000
Binary files a/hacks/xroger.exe_vax and /dev/null differ
diff --git a/hacks/xroger.hlp b/hacks/xroger.hlp
deleted file mode 100755 (executable)
index 71a7e44..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-1 XROGER 
-Throbbing X logo, of a sort
-
-SYNOPSIS
-
-  $ xroger [-display host:display.screen] [-foreground color] 
-           [-background color] [-window] [-root] [-mono]
-
-2 DESCRIPTION
-The xroger program displays a replacement for the X logo with a more
-accurate Look and Feel.
-
-2 OPTIONS
-xroger accepts the following options:
-
-   -window
-Draw on a newly-created window.  This is the default.
-
-   -root
-Draw on the root window.
-
-   -mono 
-If on a color display, pretend we're on a monochrome display.
-
-2 ENVIRONMENT
-
-   DISPLAY
-to get the default host and display number.
-
-   XENVIRONMENT
-to get the name of a resource file that overrides the global resources
-stored in the RESOURCE_MANAGER property.
-
-2 COPYRIGHT
-Copyright (co 1992, 1993 by Jamie Zawinski.  Permission to use, copy, modify, 
-distribute, and sell this software and its documentation for any purpose is 
-hereby granted without fee, provided fnord that the above copyright notice 
-appear in all copies and that both that copyright notice and this permission 
-notice appear in supporting documentation.  No representations are made about
-the  suitability of fnord this software for any purpose.  It is provided "as
-is" without express or fnord implied warranty.
-
-2 AUTHOR
-Jamie Zawinski <jwz@mcom.com>, 13-aug-92.
old mode 100755 (executable)
new mode 100644 (file)
index 96a1d6e..2eeb2e6
@@ -3,7 +3,7 @@
 xroger - throbbing X logo, of a sort
 .SH SYNOPSIS
 .B xroger
-[\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] [\-background \fIcolor\fP] [\-window] [\-root] [\-mono]
+[\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] [\-background \fIcolor\fP] [\-window] [\-root] [\-mono] [\-install] [\-visual \fIvisual\fP]
 .SH DESCRIPTION
 The \fIxroger\fP program displays a replacement for the X logo with a more
 accurate Look and Feel.
@@ -19,6 +19,13 @@ Draw on the root window.
 .TP 8
 .B \-mono 
 If on a color display, pretend we're on a monochrome display.
+.TP 8
+.B \-install
+Install a private colormap for the window.
+.TP 8
+.B \-visual \fIvisual\fP
+Specify which visual to use.  Legal values are the name of a visual class,
+or the id number (decimal or hex) of a specific visual.
 .SH ENVIRONMENT
 .PP
 .TP 8
@@ -28,6 +35,8 @@ to get the default host and display number.
 .B XENVIRONMENT
 to get the name of a resource file that overrides the global resources
 stored in the RESOURCE_MANAGER property.
+.SH BUGS
+It should also drip blood while making a horrible screeching noise.
 .SH SEE ALSO
 .BR X (1),
 .BR xscreensaver (1)
diff --git a/imakefile b/imakefile
deleted file mode 100755 (executable)
index d7ec7c6..0000000
--- a/imakefile
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Imakefile file for xscreensaver, Copyright (c) 1991-1994 Jamie Zawinski.
- *
- * You should not need to edit this file; edit config.h instead.
- *
- */
-
-#include "config.h"
-
-       TARFILES = README Imakefile config.h screenblank.txt
-            TAR = tar
-       COMPRESS = compress
-   COMPRESS_EXT = Z
-/**/#      COMPRESS = gzip --verbose --best
-/**/#  COMPRESS_EXT = gz
-
-all:: utils/Makefile driver/Makefile hacks/Makefile
-       cd utils  ; $(MAKE) $@ CC="$(CC)" CCOPTIONS="$(CCOPTIONS)" CDEBUGFLAGS="$(CDEBUGFLAGS)"
-       cd driver ; $(MAKE) $@ CC="$(CC)" CCOPTIONS="$(CCOPTIONS)" CDEBUGFLAGS="$(CDEBUGFLAGS)"
-       cd hacks  ; $(MAKE) $@ CC="$(CC)" CCOPTIONS="$(CCOPTIONS)" CDEBUGFLAGS="$(CDEBUGFLAGS)"
-
-clean install install.man:: utils/Makefile driver/Makefile hacks/Makefile
-       cd utils  ; $(MAKE) $@ BINDIR=$(BINDIR) XAPPLOADDIR=$(XAPPLOADDIR)
-       cd driver ; $(MAKE) $@ BINDIR=$(BINDIR) XAPPLOADDIR=$(XAPPLOADDIR)
-       cd hacks  ; $(MAKE) $@ BINDIR=$(BINDIR) XAPPLOADDIR=$(XAPPLOADDIR)
-
-Makefiles:: utils/Makefile driver/Makefile hacks/Makefile
-
-utils/Makefile: utils/Imakefile config.h
-       cd utils  ; $(IMAKE_CMD) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT_DIR)/utils
-driver/Makefile: driver/Imakefile config.h
-       cd driver ; $(IMAKE_CMD) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT_DIR)/driver
-hacks/Makefile: hacks/Imakefile config.h
-       cd hacks  ; $(IMAKE_CMD) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT_DIR)/hacks
-
-/* This really makes me sick... */
-tar: utils/Makefile driver/Makefile hacks/Makefile
-       @NAME=`sed -n                                                       \
-  's/[^0-9]*\([0-9]\.[0-9][0-9]*\).*/xscreensaver-\1/p' utils/version.h` ;  \
-  rm -f $$NAME ; ln -s . $$NAME ;                                          \
-  FILES= ;                                                                 \
-  for subdir in driver utils hacks ; do                                            \
-    cd $$subdir ;                                                          \
-    FILES="$$FILES `make echo_tarfiles                                     \
-      | grep -v '^make\['                                                  \
-      | sed \"s|^|$$subdir/|g;s| | $$subdir/|g\"                           \
-      ` ";                                                                 \
-    cd .. ; done ;                                                         \
-  echo creating tar file $${NAME}.tar.$(COMPRESS_EXT)... ;                 \
-  $(TAR) -vchf -                                                           \
-    `echo $(TARFILES) $$FILES | sed "s|^|$$NAME/|g; s| | $$NAME/|g" `      \
-   | $(COMPRESS) > $${NAME}.tar.$(COMPRESS_EXT) ;                          \
-  rm $$NAME
diff --git a/readme b/readme
deleted file mode 100755 (executable)
index 927c9a8..0000000
--- a/readme
+++ /dev/null
@@ -1,119 +0,0 @@
-
-To build:
-
-  -  read the comments in `config.h' and edit it as appropriate
-  -  xmkmf ; make
-  -  make install install.man
-
-The xscreensaver program waits until the keyboard and mouse have been idle
-for a period, and then runs a graphics demo chosen at random.  It turns off
-as soon as there is any mouse or keyboard activity.
-
-The purpose of xscreensaver is to display pretty pictures on your screen 
-when it is not in use, in keeping with the philosophy that unattended 
-monitors should always be doing something interesting, just like they do 
-in the movies.
-
-However, xscreensaver can also be used as a screen locker, to prevent
-others from using your terminal while your are away.
-
-The benefit that this program has over the combination of the xlock and
-xautolock programs is the ease with which new graphics hacks can be
-installed: you don't need to recompile this program to add a new display
-mode, you just change some resource settings.  Any program which can be
-invoked in such a way that it draws on the root window of the screen can
-now be used as a screensaver without modification.  The programs that
-are being run as screensavers don't need to have any special knowledge
-about what it means to be a screensaver.
-
-The XIdle extension will be used if you have it (win win.)
-
-Unfortunately, locking doesn't work if you don't have Motif.
-
-Also included are several graphics hacks for use as screensavers.  There's
-nothing magic about these: they're just programs that draw on the root
-window, which are pointed at by the screensaver's default resource settings.
-
-   qix         - My own implementation of this, with many more options
-                 than you would have thought qix could have.
-   helix       - Generates spirally "stringart" patterns.
-   rorschach   - Random inkblot patterns.
-   attraction  - A bouncing ball demo, or a qix-like demo, or a wild
-                 color-cycling thing, with some odd rules.
-   greynetic   - Random colored/stippled rectangles.
-   rocks       - Flying through an asteroid field.
-   blitspin    - Rotate a bitmap using bitblts.
-   imsmap      - Generates random maps or cloud formations.
-   hypercube   - 2d projection of a hypercube rotating on all four axes.
-   slidescreen - Divides the screen into a grid and plays a 16-puzzle on it.
-   decayscreen - A melting effect.
-   halo                - Random circular patterns.
-   pyro                - Fireworks.  Looks a lot like the version in xlock.
-   hopalong    - Fractals.  I snarfed this code from xlock.
-   flame       - Fractals.  Also from xlock.
-   noseguy     - A guy with a big nose wanders around the screen saying
-                 things.  I snarfed this code from xnlock.
-   maze                - This is the X maze demo modified to take a -root option
-                 so that it works with xscreensaver.
-
-All of these will pop up their own window unless given that -root option.
-See their man pages for more details.
-
-Other reasonable things to use as screensavers, if you have them, are
-
-  xdaliclock -root -builtin2   - melting digital clock
-  xswarm -r 2>&-               - swimming sperm
-  xwave -root                  - random 3d graphs
-  xbouncebits                  - bounce arbitrary bitmaps around
-  ico -r                       - it's dull, but it's there
-  xv -root file.gif -quit      - they don't all have to animate!
-  xsplinefun                   - bouncing splines
-  kaleid -root                 - qix-like kaleidescope patterns
-  xfishtank -c black -d -r 1   - fish (use version 2.0 or later)
-
-You can get all of these from the contrib directory on ftp.x.org.  If you
-know of (or write) any other interesting programs that can be used as
-screensavers, please let me know!
-
-This program should be updated to take advantage of the new R6 `screensaver'
-server extension instead of XIdle.  I didn't have time to do this before the
-deadline for the R6 contrib tape, but by the time you read this, maybe it's
-done - check a later release.
-
-The latest version of xscreensaver is on FTP.X.ORG.
-
-       -- Jamie Zawinski <jwz@mcom.com>
-
-\f
-Changes since 1.23:    Fixed some private-colormap oddities in slidescreen,
-                       decayscreen, and xroger.  Fixed apparent conservation-
-                       of-mass problem in pyro; made the shrapnel round.
-Changes since 1.22:    Minor tweaks for IRIX5; fixed locking race condition.
-Changes since 1.21:    Minor tweaks for X11R6.
-                       Fixes for non-default visuals.
-Changes since 1.20:    Fixed bug in color blitspin; added default image.
-                       Added diagnostics to noseguy.  Fixed off-by-one
-                       error in flame.  Added some missing casts.
-Changes since 1.18:    Added `flame' hack.
-                       Fixed a minor Motif dialog text field bug.
-                       Fixed yet another XPointer-not-defined-in-R4 bug.
-Changes since 1.17:    Added support for shadow password files.
-                       Fixed some Motif-related locking bugs.
-                       Added diagnostics when locking is disabled.
-                       Made blitspin able to use the XPM library.
-                       Added `decayscreen' hack.
-Changes since 1.16:    Added `halo' hack.
-Changes since 1.15:    Portability fixes.
-Changes since 1.14:    Broke the driver up into more source files.
-                       Moved the hacks into their own directory.
-                       Made all `time' parameters accept the 00:00:00 syntax,
-                       so that even the parameters which are normally read as
-                       `minutes' can be specified in seconds.
-                       Added colormap cycling to `imsmap'.
-                       Made hyper work with K&R compilers.
-Changes since 1.13:    Added `orbit' option to `attraction' hack.
-                       Added `lock-timeout' option.
-                       Cleaned up options of `maze' hack.
-Changes since 1.8:     Added demo mode, and locking.
-                       Added `maze' hack.
-                       Added `norotate' option to `rocks' hack.
old mode 100755 (executable)
new mode 100644 (file)
diff --git a/setup.com b/setup.com
deleted file mode 100755 (executable)
index fed15d3..0000000
Binary files a/setup.com and /dev/null differ
diff --git a/utils/Imakefile b/utils/Imakefile
new file mode 100644 (file)
index 0000000..2564282
--- /dev/null
@@ -0,0 +1,24 @@
+/*
+ * Imakefile file for xscreensaver, Copyright (c) 1993, 1995 Jamie Zawinski.
+ *
+ * You should not need to edit this file; edit ../config.h instead.
+ *
+ */
+
+#include "../config.h"
+
+#ifdef NO_SELECT
+    DEFINES = R5ISMS -DNO_SELECT
+#else
+    DEFINES = R5ISMS
+#endif
+       SRCS = fade.c hsv.c resources.c spline.c usleep.c xroger.c \
+              grabscreen.c visual.c
+       OBJS = fade.o hsv.o resources.o spline.o usleep.o xroger.o \
+              grabscreen.o visual.o
+   TARFILES = README Imakefile ad2c $(SRCS) spline.h version.h
+
+all:: $(OBJS)
+
+echo_tarfiles:
+       @echo $(TARFILES)
diff --git a/utils/README b/utils/README
new file mode 100644 (file)
index 0000000..2f5bc11
--- /dev/null
@@ -0,0 +1,6 @@
+
+This directory contains various utilities that are used both by the 
+screensaver driver and by the demo programs; for example, a portable
+implementation of usleep(), and code for manipulating color maps.
+
+If you have compilation problems, check the parameters in ../config.h.
diff --git a/utils/compile.com b/utils/compile.com
deleted file mode 100755 (executable)
index cb3c178..0000000
Binary files a/utils/compile.com and /dev/null differ
diff --git a/utils/compile_axp.com b/utils/compile_axp.com
deleted file mode 100755 (executable)
index d1a439d..0000000
Binary files a/utils/compile_axp.com and /dev/null differ
diff --git a/utils/compile_decc.com b/utils/compile_decc.com
deleted file mode 100755 (executable)
index 274a725..0000000
Binary files a/utils/compile_decc.com and /dev/null differ
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
index e12aa0c..57e695f
 #include <unistd.h>
 #endif
 
-#ifdef __DECC
-typedef char * caddr_t;
-#endif
-
 #include <X11/Xlib.h>
 #include <X11/Xatom.h>
 #include <X11/Xutil.h>
old mode 100755 (executable)
new mode 100644 (file)
diff --git a/utils/imakefile b/utils/imakefile
deleted file mode 100755 (executable)
index 3244837..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * Imakefile file for xscreensaver, Copyright (c) 1993 Jamie Zawinski.
- *
- * You should not need to edit this file; edit ../config.h instead.
- *
- */
-
-#include "../config.h"
-
-#ifdef NO_SELECT
-    DEFINES = R5ISMS -DNO_SELECT
-#else
-    DEFINES = R5ISMS
-#endif
-       SRCS = fade.c hsv.c resources.c spline.c usleep.c xroger.c grabscreen.c
-       OBJS = fade.o hsv.o resources.o spline.o usleep.o xroger.o grabscreen.o
-   TARFILES = README Imakefile ad2c $(SRCS) spline.h version.h
-
-all:: $(OBJS)
-
-echo_tarfiles:
-       @echo $(TARFILES)
diff --git a/utils/readme b/utils/readme
deleted file mode 100755 (executable)
index 2f5bc11..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-
-This directory contains various utilities that are used both by the 
-screensaver driver and by the demo programs; for example, a portable
-implementation of usleep(), and code for manipulating color maps.
-
-If you have compilation problems, check the parameters in ../config.h.
old mode 100755 (executable)
new mode 100644 (file)
index 01c1a1e..1e73abe
@@ -157,7 +157,6 @@ parse_time (string, seconds_default_p, silent_p)
 {
   unsigned int h, m, s;
   char c;
-#ifdef __DECC
   if (3 == sscanf (string,   " %u : %2u : %2u %c", &h, &m, &s, &c))
     ;
   else if (2 == sscanf (string, " : %2u : %2u %c", &m, &s, &c) ||
@@ -167,17 +166,6 @@ parse_time (string, seconds_default_p, silent_p)
     h = m = 0;
   else if (1 == sscanf (string,          " %u %c",
                        (seconds_default_p ? &s : &m), &c))
-#else
-  if (3 == sscanf (string,   " %d : %2d : %2d %c", &h, &m, &s, &c))
-    ;
-  else if (2 == sscanf (string, " : %2d : %2d %c", &m, &s, &c) ||
-          2 == sscanf (string,    " %d : %2d %c", &m, &s, &c))
-    h = 0;
-  else if (1 == sscanf (string,       " : %2d %c", &s, &c))
-    h = m = 0;
-  else if (1 == sscanf (string,          " %d %c",
-                       (seconds_default_p ? &s : &m), &c))
-#endif
     {
       h = 0;
       if (seconds_default_p) m = 0;
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
index dd23586..a8a04d5
 # define P(x)()
 #endif
 
-#ifdef VMS
-typedef unsigned int u_int;
-#endif
-
 typedef struct _spline
 {
   /* input */
diff --git a/utils/strings.c b/utils/strings.c
deleted file mode 100755 (executable)
index 3c11a81..0000000
Binary files a/utils/strings.c and /dev/null differ
old mode 100755 (executable)
new mode 100644 (file)
index ad0f4b6..2de351e
 #include <X11/Xlib.h>
 #include <X11/Xos.h>   /* lazy way out */
 
-#ifdef VMS
-#include <descrip.h>
-#include <stdio.h>
-extern char *progname;
-#include <lib$routines.h>
-unsigned long int statvms;
-float seconds;
-#endif
-
 /* usleep() doesn't exist everywhere, and select() is faster anyway.
  */
 
@@ -95,17 +86,12 @@ screenhack_usleep (usecs)
      unsigned long usecs;
 {
   int status, *bin_delta;
-
-/*  extern int SYS$SCHWDK (), SYS$HIBER ();                               */
-/*#define TICK_INTERVAL 1000                                              */
-/*                                                                        */
-/*  if (!deltas_set) set_deltas ();                                       */
-/*  bin_delta = (usecs == TICK_INTERVAL) ? &bin_tick_delta : &bin_sec_delta; */
-/*  status = SYS$SCHDWK (0, 0, bin_delta, 0);                             */
-/*  if ((status & 1)) (void) SYS$HIBER ();                                */
-
-      seconds = ((float) usecs)/1000000.0;
-      statvms = lib$wait(&seconds);
+  extern int SYS$SCHWDK (), SYS$HIBER (); 
+  
+  if (!deltas_set) set_deltas ();
+  bin_delta = (usecs == TICK_INTERVAL) ? &bin_tick_delta : &bin_sec_delta;
+  status = SYS$SCHDWK (0, 0, bin_delta, 0);
+  if ((status & 1)) (void) SYS$HIBER ();
 }
 
 #endif /*VMS */
diff --git a/utils/utils.olb b/utils/utils.olb
deleted file mode 100755 (executable)
index a181111..0000000
Binary files a/utils/utils.olb and /dev/null differ
diff --git a/utils/utils.olb_axp b/utils/utils.olb_axp
deleted file mode 100755 (executable)
index 090792d..0000000
Binary files a/utils/utils.olb_axp and /dev/null differ
diff --git a/utils/utils.olb_decc b/utils/utils.olb_decc
deleted file mode 100755 (executable)
index b0460ab..0000000
Binary files a/utils/utils.olb_decc and /dev/null differ
old mode 100755 (executable)
new mode 100644 (file)
index 899992b..f7d2887
@@ -1,2 +1,2 @@
 static char *screensaver_id =
-       "@(#)xscreensaver 1.24, by Jamie Zawinski (jwz@mcom.com)";
+       "@(#)xscreensaver 1.25, by Jamie Zawinski (jwz@mcom.com)";
diff --git a/utils/visual.c b/utils/visual.c
new file mode 100644 (file)
index 0000000..2737752
--- /dev/null
@@ -0,0 +1,287 @@
+/* xscreensaver, Copyright (c) 1993, 1994, 1995 Jamie Zawinski <jwz@mcom.com>
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation.  No representations are made about the suitability of this
+ * software for any purpose.  It is provided "as is" without express or 
+ * implied warranty.
+ */
+
+/* This file contains some code for intelligently picking the best visual
+   (where "best" is biased in the direction of high color counts...)
+ */
+
+#if __STDC__
+#include <stdlib.h>
+#include <unistd.h>
+#include <string.h>
+#endif
+
+#include <stdio.h>
+#include <X11/Xlib.h>
+#include <X11/Xutil.h>
+
+#if __STDC__
+# define P(x)x
+#else
+#define P(x)()
+#endif
+
+#ifndef isupper
+# define isupper(c)  ((c) >= 'A' && (c) <= 'Z')
+#endif
+#ifndef _tolower
+# define _tolower(c)  ((c) - 'A' + 'a')
+#endif
+
+extern char *progname;
+extern char *get_string_resource P((char *, char *));
+
+static Visual *pick_best_visual P ((Screen *));
+static Visual *pick_best_visual_of_class P((Screen *, int));
+static Visual *id_to_visual P((Screen *, int));
+static int screen_number P((Screen *));
+static Visual *id_to_visual P((Screen *screen, int id));
+int get_visual_depth P((Display *dpy, Visual *visual));
+
+
+#define DEFAULT_VISUAL -1
+#define BEST_VISUAL    -2
+#define SPECIFIC_VISUAL        -3
+
+Visual *
+get_visual_resource (dpy, name, class)
+     Display *dpy;
+     char *name, *class;
+{
+  Screen *screen = DefaultScreenOfDisplay (dpy);
+  char c, *v = get_string_resource (name, class);
+  char *tmp;
+  int vclass;
+  unsigned long id;
+
+  if (v)
+    for (tmp = v; *tmp; tmp++)
+      if (isupper (*tmp)) *tmp = _tolower (*tmp);
+
+  if (!v)                                        vclass = BEST_VISUAL;
+  else if (!strcmp (v, "default"))               vclass = DEFAULT_VISUAL;
+  else if (!strcmp (v, "best"))                  vclass = BEST_VISUAL;
+  else if (!strcmp (v, "staticgray"))            vclass = StaticGray;
+  else if (!strcmp (v, "staticcolor"))           vclass = StaticColor;
+  else if (!strcmp (v, "truecolor"))             vclass = TrueColor;
+  else if (!strcmp (v, "grayscale"))             vclass = GrayScale;
+  else if (!strcmp (v, "pseudocolor"))           vclass = PseudoColor;
+  else if (!strcmp (v, "directcolor"))           vclass = DirectColor;
+  else if (1 == sscanf (v, " %ld %c", &id, &c))          vclass = SPECIFIC_VISUAL;
+  else if (1 == sscanf (v, " 0x%lx %c", &id, &c)) vclass = SPECIFIC_VISUAL;
+  else
+    {
+      fprintf (stderr, "%s: unrecognized visual \"%s\".\n", progname, v);
+      vclass = DEFAULT_VISUAL;
+    }
+  if (v) free (v);
+
+  if (vclass == DEFAULT_VISUAL)
+    return DefaultVisualOfScreen (screen);
+  else if (vclass == BEST_VISUAL)
+    return pick_best_visual (screen);
+  else if (vclass == SPECIFIC_VISUAL)
+    {
+      Visual *visual = id_to_visual (screen, id);
+      if (visual) return visual;
+      fprintf (stderr, "%s: no visual with id 0x%x.\n", progname,
+              (unsigned int) id);
+      return DefaultVisualOfScreen (screen);
+    }
+  else
+    {
+      Visual *visual = pick_best_visual_of_class (screen, vclass);
+      if (visual) return visual;
+      fprintf (stderr, "%s: no visual of class %s.\n", progname, v);
+      return DefaultVisualOfScreen (screen);
+    }
+}
+
+static Visual *
+pick_best_visual (screen)
+       Screen *screen;
+{
+  /* The "best" visual is the one on which we can allocate the largest
+     range and number of colors.
+
+     Therefore, a TrueColor visual which is at least 16 bits deep is best.
+     (The assumption here being that a TrueColor of less than 16 bits is
+     really just a PseudoColor visual with a pre-allocated color cube.)
+
+     The next best thing is a PseudoColor visual of any type.  After that
+     come the non-colormappable visuals, and non-color visuals.
+   */
+  Display *dpy = DisplayOfScreen (screen);
+  Visual *visual;
+  if ((visual = pick_best_visual_of_class (screen, TrueColor)) &&
+      get_visual_depth (dpy, visual) >= 16)
+    return visual;
+  if ((visual = pick_best_visual_of_class (screen, PseudoColor)))
+    return visual;
+  if ((visual = pick_best_visual_of_class (screen, TrueColor)))
+    return visual;
+  if ((visual = pick_best_visual_of_class (screen, DirectColor)))
+    return visual;
+  if ((visual = pick_best_visual_of_class (screen, GrayScale)))
+    return visual;
+  if ((visual = pick_best_visual_of_class (screen, StaticGray)))
+    return visual;
+  return DefaultVisualOfScreen (screen);
+}
+
+static Visual *
+pick_best_visual_of_class (screen, visual_class)
+     Screen *screen;
+     int visual_class;
+{
+  /* The best visual of a class is the one which on which we can allocate
+     the largest range and number of colors, which means the one with the
+     greatest depth and number of cells.
+   */
+  Display *dpy = DisplayOfScreen (screen);
+  XVisualInfo vi_in, *vi_out;
+  int out_count;
+
+  vi_in.class = visual_class;
+  vi_in.screen = screen_number (screen);
+  vi_out = XGetVisualInfo (dpy, (VisualClassMask | VisualScreenMask),
+                          &vi_in, &out_count);
+  if (vi_out)
+    {
+      /* choose the 'best' one, if multiple */
+      int i, best;
+      Visual *visual;
+      for (i = 0, best = 0; i < out_count; i++)
+       /* It's better if it's deeper, or if it's the same depth with
+          more cells (does that ever happen?  Well, it could...) */
+       if ((vi_out [i].depth > vi_out [best].depth) ||
+           ((vi_out [i].depth == vi_out [best].depth) &&
+            (vi_out [i].colormap_size > vi_out [best].colormap_size)))
+         best = i;
+      visual = vi_out [best].visual;
+      XFree ((char *) vi_out);
+      return visual;
+    }
+  else
+    return 0;
+}
+
+static Visual *
+id_to_visual (screen, id)
+     Screen *screen;
+     int id;
+{
+  Display *dpy = DisplayOfScreen (screen);
+  XVisualInfo vi_in, *vi_out;
+  int out_count;
+  vi_in.screen = screen_number (screen);
+  vi_in.visualid = id;
+  vi_out = XGetVisualInfo (dpy, (VisualScreenMask | VisualIDMask),
+                          &vi_in, &out_count);
+  if (vi_out)
+    {
+      Visual *v = vi_out[0].visual;
+      XFree ((char *) vi_out);
+      return v;
+    }
+  return 0;
+}
+
+int
+get_visual_depth (dpy, visual)
+     Display *dpy;
+     Visual *visual;
+{
+  XVisualInfo vi_in, *vi_out;
+  int out_count, d;
+  vi_in.screen = DefaultScreen (dpy);
+  vi_in.visualid = XVisualIDFromVisual (visual);
+  vi_out = XGetVisualInfo (dpy, VisualScreenMask|VisualIDMask,
+                          &vi_in, &out_count);
+  if (! vi_out) abort ();
+  d = vi_out [0].depth;
+  XFree ((char *) vi_out);
+  return d;
+}
+
+
+int
+get_visual_class (dpy, visual)
+     Display *dpy;
+     Visual *visual;
+{
+  XVisualInfo vi_in, *vi_out;
+  int out_count, c;
+  vi_in.screen = DefaultScreen (dpy);
+  vi_in.visualid = XVisualIDFromVisual (visual);
+  vi_out = XGetVisualInfo (dpy, VisualScreenMask|VisualIDMask,
+                          &vi_in, &out_count);
+  if (! vi_out) abort ();
+  c = vi_out [0].class;
+  XFree ((char *) vi_out);
+  return c;
+}
+
+void
+describe_visual (f, dpy, visual)
+     FILE *f;
+     Display *dpy;
+     Visual *visual;
+{
+  Screen *screen = DefaultScreenOfDisplay (dpy);
+  XVisualInfo vi_in, *vi_out;
+  int out_count;
+  vi_in.screen = screen_number (screen);
+  vi_in.visualid = XVisualIDFromVisual (visual);
+  vi_out = XGetVisualInfo (dpy, (VisualScreenMask | VisualIDMask),
+                          &vi_in, &out_count);
+  if (! vi_out) abort ();
+  fprintf (f, "0x%02x (%s depth: %2d, cmap: %3d)\n",
+          (unsigned int) vi_out->visualid,
+          (vi_out->class == StaticGray  ? "StaticGray, " :
+           vi_out->class == StaticColor ? "StaticColor," :
+           vi_out->class == TrueColor   ? "TrueColor,  " :
+           vi_out->class == GrayScale   ? "GrayScale,  " :
+           vi_out->class == PseudoColor ? "PseudoColor," :
+           vi_out->class == DirectColor ? "DirectColor," :
+                                          "UNKNOWN:    "),
+          vi_out->depth, vi_out->colormap_size /*, vi_out->bits_per_rgb*/);
+  XFree ((char *) vi_out);
+}
+
+static int
+screen_number (screen)
+       Screen *screen;
+{
+  Display *dpy = DisplayOfScreen (screen);
+  int i;
+  for (i = 0; i < ScreenCount (dpy); i++)
+    if (ScreenOfDisplay (dpy, i) == screen)
+      return i;
+  abort ();
+}
+
+int
+visual_cells (dpy, visual)
+       Display *dpy;
+       Visual *visual;
+{
+  XVisualInfo vi_in, *vi_out;
+  int out_count, c;
+  vi_in.screen = DefaultScreen (dpy);
+  vi_in.visualid = XVisualIDFromVisual (visual);
+  vi_out = XGetVisualInfo (dpy, VisualScreenMask|VisualIDMask,
+                          &vi_in, &out_count);
+  if (! vi_out) abort ();
+  c = vi_out [0].colormap_size;
+  XFree ((char *) vi_out);
+  return c;
+}
old mode 100755 (executable)
new mode 100644 (file)