+++ /dev/null
-/*
- * 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 = gnutar
- 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) $@
- cd driver ; $(MAKE) $@
- cd hacks ; $(MAKE) $@
-
-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
+++ /dev/null
-
-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 LUCID.COM and FTP.X.ORG.
-
- -- Jamie Zawinski <jwz@lucid.com>
-
-\f
-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.
+++ /dev/null
-/*
- * 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... */
- MOTIFLDOPTIONS = /* -L... */
- 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 need this? Let me know.)
- */
-#if defined(HPArchitecture) || 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.
- */
+++ /dev/null
-/*
- * 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
+++ /dev/null
-
-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.
+++ /dev/null
-! 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@lucid.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
--- /dev/null
+#!/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' "$@"
--- /dev/null
+/*
+ * 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.
+ */
-/* xscreensaver, Copyright (c) 1993 Jamie Zawinski <jwz@lucid.com>
+/* 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
static void demo_mode_hack P((char *));
static void demo_mode_done P((void));
+static void focus_fuckus P((Widget dialog));
+static void text_cb P((Widget button, XtPointer, XtPointer));
+
extern void demo_mode_restart_process ();
extern Widget demo_dialog;
Arg av[10];
int ac;
char *label;
- Dimension max_w = 0;
XmString xm_label = 0;
XmString new_xm_label;
object 'label2' : XmLabel {
arguments {
name = 'label2';
- XmNlabelString= 'Copyright © 1991-1994 by Jamie Zawinski <jwz@lucid.com>';
+ XmNlabelString= 'Copyright © 1991-1994 by Jamie Zawinski <jwz@mcom.com>';
};
};
object 'text_area' : XmScrolledList {
--- /dev/null
+/*
+ * 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
-/* xscreensaver, Copyright (c) 1993 Jamie Zawinski <jwz@lucid.com>
+/* 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
#include <shadow.h>
#endif
-#include <pwd.h>
#include <stdio.h>
#include <X11/Intrinsic.h>
# define _NO_PROTO
#endif
-#include <Xm/Xm.h>
-#include <Xm/List.h>
-#include <Xm/TextF.h>
-
#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>
+
Time passwd_timeout;
extern char *screensaver_version;
static char root_passwd [255];
static char user_passwd [255];
+static char * user_vms;
#ifdef HAVE_SHADOW
# define PWTYPE struct spwd *
{
Bool ok = True;
char *u;
+#ifndef VMS
PWTYPE p = GETPW ("root");
if (p && p->PWSLOT && p->PWSLOT[0] != '*')
strcpy (root_passwd, p->PWSLOT);
#endif
}
+
if (p && p->PWSLOT &&
/* p->PWSLOT[0] != '*' */ /* sensible */
(strlen (p->PWSLOT) > 4) /* solaris */
ok = False;
}
return ok;
+#else
+ return ok;
+#endif /* VMS */
+
}
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 */
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
/* 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);
}
XGrabServer (dpy); /* ############ DANGER! */
+ /* this call to ungrab used to be in main_loop() - see comment in
+ xscreensaver.c around line 696. */
+ ungrab_keyboard_and_mouse ();
+
while (passwd_state == pw_read)
{
XEvent event;
--- /dev/null
+
+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.
--- /dev/null
+#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
-/* xscreensaver, Copyright (c) 1991-1993 Jamie Zawinski <jwz@lucid.com>
+/* xscreensaver, Copyright (c) 1991-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
#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? */
extern Bool demo_mode_p;
static void
+#if __STDC__
+exec_screenhack (char *command)
+#else
exec_screenhack (command)
char *command;
+#endif
{
char *tmp;
char buf [512];
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)
+#if defined(SYSV) || defined(SVR4) || defined(__hpux) || defined(VMS)
{
int old_nice = nice (0);
int n = nice_inferior - old_nice;
/* 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);
static char *current_hack_name P((void));
static void
+#if __STDC__
+await_child_death (Bool killed)
+#else
await_child_death (killed)
Bool killed;
+#endif
{
Bool suspended_p = False;
int status;
killing = 1;
if (! pid)
return;
+#ifdef VMS
+ return;
+#else
do
{
killing = 0;
if (suspended_p != True)
pid = 0;
+#endif /* VMS */
}
static char *
suspending = suspend_p;
if (! pid)
;
+#ifndef VMS
else if (kill (pid, (suspend_p ? SIGSTOP : SIGCONT)) < 0)
{
char buf [255];
else if (verbose_p)
printf ("%s: %s pid %d.\n", progname,
(suspend_p ? "suspending" : "resuming"), pid);
+#endif
}
\f
i = strlen (buf);
s = (char *) malloc (i+1);
strncpy (s, buf, i+1);
+#ifndef VMS
if (putenv (s))
abort ();
+#endif
}
\f
-/* xscreensaver, Copyright (c) 1991-1993 Jamie Zawinski <jwz@lucid.com>
+/* xscreensaver, Copyright (c) 1991-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
#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
#include <X11/extensions/xidle.h>
#include "xscreensaver.h"
+#if __STDC__
+# define P(x)x
+#else
+#define P(x)()
+#endif
+
extern XtAppContext app;
Time cycle;
extern Bool locked_p;
extern Window screensaver_window;
-extern Bool handle_clientmessage P((/*XEvent *, Bool*/));
+extern Bool handle_clientmessage P((XEvent *, Bool));
static time_t last_activity_time; /* for non-XIdle mode */
static XtIntervalId timer_id = 0;
static void
+#if __STDC__
+notice_events (Window window, Bool top_p)
+#else
notice_events (window, top_p)
Window window;
Bool top_p;
+#endif
{
XWindowAttributes attrs;
unsigned long events;
/* Call this when user activity (or "simulated" activity) has been noticed.
*/
static void
-reset_timers ()
+reset_timers P((void))
{
#ifdef DEBUG_TIMERS
if (verbose_p)
--- /dev/null
+static char *screensaver_id =
+ "@(#)xscreensaver 1.24, by Jamie Zawinski (jwz@mcom.com)";
-/* xscreensaver, Copyright (c) 1993 Jamie Zawinski <jwz@lucid.com>
+/* 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
#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
#endif
extern char *progname;
-extern char *get_string_resource ();
+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 (display, visual_class)
- Display *display;
+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 = DefaultScreen (display);
- vi_out = XGetVisualInfo (display, VisualClassMask|VisualScreenMask,
+ 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 */
+ {
+ /* choose the 'best' one, if multiple */
int i, best;
Visual *visual;
for (i = 0, best = 0; i < out_count; i++)
- if (vi_out [i].depth > vi_out [best].depth)
+ /* 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);
}
static Visual *
-pick_best_visual (display)
- Display *display;
-{
- Visual *visual;
- if (visual = pick_best_visual_of_class (display, PseudoColor))
- return visual;
- if (visual = pick_best_visual_of_class (display, DirectColor))
- return visual;
- if (visual = pick_best_visual_of_class (display, GrayScale))
- return visual;
- if (visual = pick_best_visual_of_class (display, StaticGray))
- return visual;
- return DefaultVisual (display, DefaultScreen (display));
-}
-
-
-static Visual *
-id_to_visual (dpy, id)
- Display *dpy;
+id_to_visual (screen, id)
+ Screen *screen;
int id;
{
+ Display *dpy = DisplayOfScreen (screen);
XVisualInfo vi_in, *vi_out;
int out_count;
- vi_in.screen = DefaultScreen (dpy);
+ vi_in.screen = screen_number (screen);
vi_in.visualid = id;
- vi_out = XGetVisualInfo (dpy, VisualScreenMask|VisualIDMask,
+ vi_out = XGetVisualInfo (dpy, (VisualScreenMask | VisualIDMask),
&vi_in, &out_count);
if (vi_out)
{
return c;
}
-
-Visual *
-get_visual_resource (dpy, name, class)
- Display *dpy;
- char *name, *class;
-{
- char c, *s = get_string_resource (name, class);
- char *tmp;
- int vclass;
- int id;
-
- if (s)
- for (tmp = s; *tmp; tmp++)
- if (isupper (*tmp)) *tmp = _tolower (*tmp);
-
- if (!s || !strcmp (s, "best")) vclass = -1;
- else if (!strcmp (s, "default")) vclass = -2;
- else if (!strcmp (s, "staticgray")) vclass = StaticGray;
- else if (!strcmp (s, "staticcolor")) vclass = StaticColor;
- else if (!strcmp (s, "truecolor")) vclass = TrueColor;
- else if (!strcmp (s, "grayscale")) vclass = GrayScale;
- else if (!strcmp (s, "pseudocolor")) vclass = PseudoColor;
- else if (!strcmp (s, "directcolor")) vclass = DirectColor;
- else if (1 == sscanf (s, " %ld %c", &id, &c)) vclass = -3;
- else if (1 == sscanf (s, " 0x%lx %c", &id, &c)) vclass = -3;
- else
- {
- fprintf (stderr, "%s: unrecognized visual \"%s\".\n", progname, s);
- vclass = -1;
- }
- if (s) free (s);
-
- if (vclass == -1)
- return pick_best_visual (dpy);
- else if (vclass == -2)
- return DefaultVisual (dpy, DefaultScreen (dpy));
- else if (vclass == -3)
- {
- Visual *v = id_to_visual (dpy, id);
- if (v) return v;
- fprintf (stderr, "%s: no visual with id 0x%x.\n", progname, id);
- return pick_best_visual (dpy);
- }
- else
- return pick_best_visual_of_class (dpy, vclass);
-}
-
void
describe_visual (f, dpy, visual)
FILE *f;
Display *dpy;
Visual *visual;
{
+ Screen *screen = DefaultScreenOfDisplay (dpy);
XVisualInfo vi_in, *vi_out;
- int out_count, d;
- vi_in.screen = DefaultScreen (dpy);
+ int out_count;
+ vi_in.screen = screen_number (screen);
vi_in.visualid = XVisualIDFromVisual (visual);
- vi_out = XGetVisualInfo (dpy, VisualScreenMask|VisualIDMask,
+ vi_out = XGetVisualInfo (dpy, (VisualScreenMask | VisualIDMask),
&vi_in, &out_count);
if (! vi_out) abort ();
- fprintf (f, "0x%02x (%s depth: %2d, cmap: %3d @ %d)\n", vi_out->visualid,
+ 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," :
- "???"),
- vi_out->depth, vi_out->colormap_size, vi_out->bits_per_rgb);
+ "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;
}
--- /dev/null
+/* Null file works for VMS */
-/* xscreensaver, Copyright (c) 1991-1993 Jamie Zawinski <jwz@lucid.com>
+/* xscreensaver, Copyright (c) 1991-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
*/
#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"
#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 Bool lock_p, demo_mode_p;
GrabModeAsync, GrabModeAsync, None, cursor, CurrentTime)
void
-grab_keyboard_and_mouse ()
+grab_keyboard_and_mouse P((void))
{
Status status;
XSync (dpy, False);
}
void
-ungrab_keyboard_and_mouse ()
+ungrab_keyboard_and_mouse P((void))
{
XUngrabPointer (dpy, CurrentTime);
XUngrabKeyboard (dpy, CurrentTime);
#endif
static void
+#if __STDC__
+store_vroot_property (Window win, Window value)
+#else
store_vroot_property (win, value)
Window win, value;
+#endif
{
#if 0
printf ("%s: storing XA_VROOT = 0x%x (%s) = 0x%x (%s)\n", progname,
}
static void
+#if __STDC__
+remove_vroot_property (Window win)
+#else
remove_vroot_property (win)
Window win;
+#endif
{
#if 0
printf ("%s: removing XA_VROOT from 0x%x (%s)\n", progname, win,
static void
-kill_xsetroot_data ()
+kill_xsetroot_data P((void))
{
Atom type;
int format;
static void handle_signals P((Bool on_p));
static void
-save_real_vroot ()
+save_real_vroot P((void))
{
int i;
Window root = RootWindowOfScreen (screen);
}
static Bool
-restore_real_vroot_1 ()
+restore_real_vroot_1 P((void))
{
if (verbose_p && real_vroot)
printf ("%s: restoring __SWM_VROOT property on the real vroot (0x%x).\n",
static void
+#if __STDC__
+catch_signal (int sig, char *signame, Bool on_p)
+#else
catch_signal (sig, signame, on_p)
int sig;
char *signame;
Bool on_p;
+#endif
{
if (! on_p)
signal (sig, SIG_DFL);
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
catch_signal (SIGFPE, "SIGFPE", on_p);
catch_signal (SIGBUS, "SIGBUS", on_p);
catch_signal (SIGSEGV, "SIGSEGV", on_p);
+#ifdef SIGSYS
catch_signal (SIGSYS, "SIGSYS", on_p);
+#endif
catch_signal (SIGTERM, "SIGTERM", on_p);
#ifdef SIGXCPU
catch_signal (SIGXCPU, "SIGXCPU", on_p);
/* Managing the actual screensaver window */
void
-initialize_screensaver_window ()
+initialize_screensaver_window P((void))
{
/* This resets the screensaver window as fully as possible, since there's
no way of knowing what some random client may have done to us in the
-/* xscreensaver-command, Copyright (c) 1991-1994 Jamie Zawinski <jwz@lucid.com>
+/* xscreensaver-command, Copyright (c) 1991-1994 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
static char *usage = "usage: %s -<switch>\n\
\n\
This program provides external control of a running xscreensaver process.\n\
- Version %s, copyright (c) 1991-1994 Jamie Zawinski <jwz@lucid.com>.\n\
+ Version %s, copyright (c) 1991-1994 Jamie Zawinski <jwz@mcom.com>.\n\
\n\
-demo Enter interactive demo mode.\n\
-deactivate Turns off the screensaver if it is on, as user input would.\n\
#define USAGE() \
{ fprintf (stderr, usage, argv[0], screensaver_version); exit (1); }
+#ifndef VMS
void
+#else
+int
+#endif
main (argc, argv)
int argc;
char **argv;
--- /dev/null
+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)
+
suitability of this software for any purpose. It is provided "as is" without
express or implied warranty.
.SH AUTHOR
-Jamie Zawinski <jwz@lucid.com>, 13-aug-92.
+Jamie Zawinski <jwz@mcom.com>, 13-aug-92.
--- /dev/null
+! 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
-/* xscreensaver, Copyright (c) 1991-1994 Jamie Zawinski <jwz@lucid.com>
+/* xscreensaver, Copyright (c) 1991-1994 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"
-#if defined(SVR4) || defined(SYSV)
+#if defined(SVR4) || defined(SYSV) || defined(VMS)
# define srandom(i) srand((unsigned int)(i))
#else
+# ifndef __linux
extern void srandom P((int)); /* srand() is in stdlib.h... */
+# endif
#endif
extern char *get_string_resource P((char *, char *));
};
static char *defaults[] = {
+#ifndef VMS
#include "XScreenSaver.ad.h"
+#else
+#include "XScreenSaver_ad.h"
+#endif
0
};
static void
-do_help ()
+do_help P((void))
{
printf ("\
-xscreensaver %s, copyright (c) 1991-1994 by Jamie Zawinski <jwz@lucid.com>.\n\
+xscreensaver %s, copyright (c) 1991-1994 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\
static void
-get_screenhacks ()
+get_screenhacks P((void))
{
char *data[3];
int i, hacks_size = 10;
static void
-get_resources ()
+get_resources P((void))
{
/* Note: we can't use the resource ".visual" because Xt is SO FUCKED. */
visual = get_visual_resource (dpy, "visualID", "VisualID");
if (passwd_timeout == 0) passwd_timeout = 30000;
#endif
if (timeout < 10000) timeout = 10000;
- if (cycle < 2000) cycle = 2000;
+ if (cycle != 0 && cycle < 2000) cycle = 2000;
if (pointer_timeout == 0) pointer_timeout = 5000;
if (notice_events_timeout == 0) notice_events_timeout = 10000;
if (fade_seconds == 0 || fade_ticks == 0) fade_p = False;
}
char *
-timestring ()
+timestring P((void))
{
long now = time ((time_t *) 0);
char *str = (char *) ctime (&now);
extern Bool lock_init P((void));
#endif
-static void initialize ();
-static void main_loop ();
-static void initialize ();
+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;
static void
+#if __STDC__
+initialize_connection (int argc, char **argv)
+#else
initialize_connection (argc, argv)
int argc;
char **argv;
+#endif
{
toplevel_shell = XtAppInitialize (&app, progclass,
options, XtNumber (options),
if (verbose_p)
printf ("\
-%s %s, copyright (c) 1991-1994 by Jamie Zawinski <jwz@lucid.com>.\n\
+%s %s, copyright (c) 1991-1994 by Jamie Zawinski <jwz@mcom.com>.\n\
pid = %d.\n", progname, screensaver_version, getpid ());
ensure_no_screensaver_running ();
blank_screen ();
spawn_screenhack (True);
if (cycle)
- cycle_id = XtAppAddTimeOut (app, cycle, cycle_timer, 0);
+ cycle_id = XtAppAddTimeOut (app, cycle, (XtPointer)cycle_timer, 0);
#ifndef NO_LOCKING
if (lock_p && lock_timeout == 0)
locked_p = True;
if (lock_p && !locked_p)
/* locked_p might be true already because of ClientMessage */
- lock_id = XtAppAddTimeOut (app,lock_timeout,activate_lock_timer,0);
+ lock_id = XtAppAddTimeOut (app,lock_timeout,
+ (XtPointer)activate_lock_timer,0);
#endif
PASSWD_INVALID:
Bool val;
if (locking_disabled_p) abort ();
dbox_up_p = True;
- ungrab_keyboard_and_mouse ();
+
+ /* We used to ungrab the keyboard here, before calling unlock_p()
+ to pop up the dialog box. This left the keyboard ungrabbed
+ for a small window, during an insecure state. Bennett Todd
+ was seeing the bahavior that, when the load was high, he could
+ actually get characters through to a shell under the saver
+ window (he accidentally typed his password there...)
+
+ So the ungrab has been moved down into pop_passwd_dialog()
+ just after the server is grabbed, closing this window
+ entirely.
+ */
+ /* ungrab_keyboard_and_mouse (); */
+
suspend_screenhack (True);
XUndefineCursor (dpy, screensaver_window);
if (verbose_p)
dbox_up_p = False;
XDefineCursor (dpy, screensaver_window, cursor);
suspend_screenhack (False);
+
+ /* I think this grab is now redundant, but it shouldn't hurt. */
grab_keyboard_and_mouse ();
+
if (! val)
goto PASSWD_INVALID;
locked_p = False;
--- /dev/null
+! 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
-/* xscreensaver, Copyright (c) 1993 Jamie Zawinski <jwz@lucid.com>
+/* 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
* implied warranty.
*/
+#ifdef VMS
+#include "config.h"
+#endif /* VMS */
+
#if __STDC__
# include <stdlib.h>
# include <unistd.h>
extern Bool verbose_p;
-extern void initialize_screensaver_window P(());
+extern void initialize_screensaver_window P((void));
extern void raise_window P((Bool inhibit_fade, Bool between_hacks_p));
-extern void blank_screen P(());
+extern void blank_screen P((void));
extern void unblank_screen P((void));
extern void restart_process P((void));
--- /dev/null
+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)
made about the suitability of this software for any purpose. It is provided
"as is" without express or implied warranty.
.SH AUTHOR
-Jamie Zawinski <jwz@lucid.com>, 13-aug-92.
+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 \fIlockTimeout\fP.
--- /dev/null
+"*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",
+++ /dev/null
-/*
- * 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_LIBRARIES = $(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)
+++ /dev/null
-
-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.
-/* xscreensaver, Copyright (c) 1992 Jamie Zawinski <jwz@lucid.com>
+/* xscreensaver, Copyright (c) 1992 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 "spline.h"
#include <stdio.h>
#include <math.h>
+#ifdef VMS
+#define M_PI 3.14159265358979323846
+#endif
#if __STDC__
-#include <values.h>
+#include <math.h> /* for M_PI */
#endif
struct ball {
char *progclass = "Attraction";
char *defaults [] = {
- "*background: black",
- "*foreground: white",
+ "Attraction.background: black", /* to placate SGI */
+ "Attraction.foreground: white",
"*mode: balls",
"*points: 0",
"*size: 0",
--- /dev/null
+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.
suitability of this software for any purpose. It is provided "as is" without
express or implied warranty.
.SH AUTHOR
-Jamie Zawinski <jwz@lucid.com>, 13-aug-92.
+Jamie Zawinski <jwz@mcom.com>, 13-aug-92.
-/* xscreensaver, Copyright (c) 1992 Jamie Zawinski <jwz@lucid.com>
+/* xscreensaver, Copyright (c) 1992 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
# endif
#endif
+#ifndef VMS
#include <X11/Xmu/Drawing.h>
+#else
+#include "sys$common:[decw$include.xmu]Drawing.h"
+#endif
#include "default.xbm"
char *progclass = "BlitSpin";
char *defaults [] = {
- "*background: black",
- "*foreground: white",
+ "BlitSpin.background: black", /* to placate SGI */
+ "BlitSpin.foreground: white",
"*delay: 500000",
"*delay2: 500000",
"*bitmap: (default)",
--- /dev/null
+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.
suitability of this software for any purpose. It is provided "as is" without
express or implied warranty.
.SH AUTHOR
-Jamie Zawinski <jwz@lucid.com>, 17-aug-92.
+Jamie Zawinski <jwz@mcom.com>, 17-aug-92.
Based on SmallTalk code which appeared in the August 1981 issue of Byte
magazine.
-/* xscreensaver, Copyright (c) 1992 Jamie Zawinski <jwz@lucid.com>
+/* xscreensaver, Copyright (c) 1992, 1993, 1994 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
static int delay;
static GC gc;
-static Bool
-MapNotify_event_p (dpy, event, window)
- Display *dpy;
- XEvent *event;
- XPointer window;
-{
- return (event->xany.type == MapNotify &&
- event->xvisibility.window == (Window) window);
-}
-
-
-static Bool
-screensaver_window_p (dpy, window)
- Display *dpy;
- Window window;
-{
- Atom type;
- int format;
- unsigned long nitems, bytesafter;
- char *version;
- if (XGetWindowProperty (dpy, window,
- XInternAtom (dpy, "_SCREENSAVER_VERSION", False),
- 0, 1, False, XA_STRING,
- &type, &format, &nitems, &bytesafter,
- (unsigned char **) &version)
- == Success
- && type != None)
- return True;
- return False;
-}
-
static void
init_decay (dpy, window)
Display *dpy;
gc = XCreateGC (dpy, window, GCForeground |GCFunction | GCSubwindowMode,
&gcv);
- pixmap = grab_screen_image (dpy, window, root_p);
-
XGetWindowAttributes (dpy, window, &xgwa);
sizex = xgwa.width;
sizey = xgwa.height;
+
+ copy_default_colormap_contents (dpy, xgwa.colormap, xgwa.visual);
+ pixmap = grab_screen_image (dpy, window, root_p);
}
--- /dev/null
+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.
-/* xscreensaver, Copyright (c) 1993 Jamie Zawinski <jwz@lucid.com>
+/* 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
Display *dpy;
Window window;
{
- int i;
XGCValues gcv;
XWindowAttributes xgwa;
Colormap cmap;
char *progclass = "Flame";
char *defaults [] = {
- "*background: black",
- "*foreground: white",
+ "Flame.background: black", /* to placate SGI */
+ "Flame.foreground: white",
"*colors: 128",
"*iterations: 25",
"*delay: 50000",
--- /dev/null
+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.
Scott Graves <spot@cs.cmu.edu>, 06-Jun-91.n
Ability to run standalone or with \fIxscreensaver\fP added by
-Jamie Zawinski <jwz@lucid.com>, 18-Oct-93.
+Jamie Zawinski <jwz@mcom.com>, 18-Oct-93.
-/* xscreensaver, Copyright (c) 1992 Jamie Zawinski <jwz@lucid.com>
+/* xscreensaver, Copyright (c) 1992 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
#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;
char *progclass = "Greynetic";
char *defaults [] = {
- "*background: black",
- "*foreground: white",
+ "Greynetic.background: black", /* to placate SGI */
+ "Greynetic.foreground: white",
"*delay: 0",
0
};
--- /dev/null
+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.
suitability of this software for any purpose. It is provided "as is" without
express or implied warranty.
.SH AUTHOR
-Jamie Zawinski <jwz@lucid.com>, 13-aug-92.
+Jamie Zawinski <jwz@mcom.com>, 13-aug-92.
-/* xscreensaver, Copyright (c) 1993 Jamie Zawinski <jwz@lucid.com>
+/* 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
char *progclass = "Halo";
char *defaults [] = {
- "*background: black",
- "*foreground: white",
+ "Halo.background: black", /* to placate SGI */
+ "Halo.foreground: white",
/* "*xor: false", */
"*count: 0",
"*delay: 100000",
--- /dev/null
+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.
suitability of this software for any purpose. It is provided "as is" without
express or implied warranty.
.SH AUTHOR
-Jamie Zawinski <jwz@lucid.com>, 6-jul-93.
+Jamie Zawinski <jwz@mcom.com>, 6-jul-93.
-/* xscreensaver, Copyright (c) 1992 Jamie Zawinski <jwz@lucid.com>
+/* xscreensaver, Copyright (c) 1992 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 "screenhack.h"
#include <math.h>
+#ifdef VMS
+#define M_PI 3.14159265358979323846
+#endif
#if __STDC__
-#include <values.h>
+#include <math.h> /* for M_PI */
#endif
static double sins [360];
char *progclass = "Helix";
char *defaults [] = {
- "*background: black",
+ "Helix.background: black", /* to placate SGI */
0
};
--- /dev/null
+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.
suitability of this software for any purpose. It is provided "as is" without
express or implied warranty.
.SH AUTHOR
-Jamie Zawinski <jwz@lucid.com>, 13-aug-92.
+Jamie Zawinski <jwz@mcom.com>, 13-aug-92.
-/* xscreensaver, Copyright (c) 1992 Jamie Zawinski <jwz@lucid.com>
+/* xscreensaver, Copyright (c) 1992 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
char *progclass = "Hopalong";
char *defaults [] = {
- "*background: black",
- "*foreground: white",
+ "Hopalong.background: black", /* to placate SGI */
+ "Hopalong.foreground: white",
"*count: 1000",
"*ncolors: 100",
"*timeout: 20",
--- /dev/null
+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.
Patrick J. Naughton <naughton@eng.sun.com>, 23-mar-88.
Ability to run standalone or with \fIxscreensaver\fP added by
-Jamie Zawinski <jwz@lucid.com>, 13-aug-92.
+Jamie Zawinski <jwz@mcom.com>, 13-aug-92.
-/* xscreensaver, Copyright (c) 1992 Jamie Zawinski <jwz@lucid.com>
+/* xscreensaver, Copyright (c) 1992 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
char *progclass = "Hypercube";
char *defaults [] = {
- "*background: black",
- "*foreground: white",
+ "Hypercube.background: black", /* to placate SGI */
+ "Hypercube.foreground: white",
"*color0: red",
"*color1: orange",
"*color2: yellow",
XWindowAttributes xgwa;
Colormap cmap;
double xy, xz, yz, xw, yw, zw;
- unsigned long bg, pixel;
+ unsigned long bg;
dpy = d;
window = w;
--- /dev/null
+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.
suitability of this software for any purpose. It is provided "as is" without
express or implied warranty.
.SH AUTHOR
-Jamie Zawinski <jwz@lucid.com>, 6-dec-92.
+Jamie Zawinski <jwz@mcom.com>, 6-dec-92.
--- /dev/null
+/*
+ * 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)
#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;
char *progclass = "Imsmap";
char *defaults [] = {
- "*background: black",
- "*foreground: black",
+ "Imsmap.background: black", /* to placate SGI */
+ "Imsmap.foreground: black",
"*mode: random",
"*ncolors: 50",
"*iterations: 7",
--- /dev/null
+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.
.SH AUTHOR
Juergen Nickelsen <nickel@cs.tu-berlin.de>, 23-aug-92.
-Hacked on by Jamie Zawinski <jwz@lucid.com>, 24-aug-92.
+Hacked on by Jamie Zawinski <jwz@mcom.com>, 24-aug-92.
/******************************************************************************
* [ maze ] ...
*
- * modified: [ 3-7-93 ] Jamie Zawinski <jwz@lucid.com>
+ * modified: [ 3-7-93 ] Jamie Zawinski <jwz@mcom.com>
* added the XRoger logo, cleaned up resources, made
* grid size a parameter.
* modified: [ 3-3-93 ] Jim Randell <jmr@mddjmr.fc.hp.com>
#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
# 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
static int maze_size_x, maze_size_y;
static int sqnum, cur_sq_x, cur_sq_y, path_length;
static int start_x, start_y, start_dir, end_x, end_y, end_dir;
-static int maze_restart_flag, random_index;
static int grid_width, grid_height;
static Display *dpy;
static int x = 0, y = 0, restart = 0, stop = 1, state = 1;
+static int
check_events() /* X event handler [ rhess ] */
{
XEvent e;
}
+static void
set_maze_sizes (width, height)
int width, height;
{
}
+static void
initialize_maze() /* draw the surrounding wall and start/end squares */
{
register int i, j, wall;
static void draw_solid_square ();
static void enter_square ();
+static void
create_maze() /* create a maze layout given the intiialized maze */
{
register int i, newdoor;
num_candidates = 0;
- topwall:
/* top wall */
if ( maze[cur_sq_x][cur_sq_y] & DOOR_IN_TOP )
goto rightwall;
}
+static void
draw_maze_border() /* draw the maze outline */
{
register int i, j;
}
+static void
solve_maze() /* solve it with graphical feedback */
{
int i;
/*
- * jmr additions for Jamie Zawinski's <jwz@lucid.com> screensaver stuff,
+ * jmr additions for Jamie Zawinski's <jwz@mcom.com> screensaver stuff,
* note that the code above this has probably been hacked about in some
* arbitrary way.
*/
char *progclass = "Maze";
char *defaults[] = {
+ "Maze.background: black", /* to placate SGI */
+ "Maze.foreground: white", /* to placate SGI */
"*gridSize: 0",
- "*background: black",
"*solveDelay: 5000",
"*preDelay: 2000000",
"*postDelay: 4000000",
--- /dev/null
+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
-/* xscreensaver, Copyright (c) 1992 Jamie Zawinski <jwz@lucid.com>
+/* xscreensaver, Copyright (c) 1992 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
static void (*next_fn) ();
+#ifndef VMS
#include "noses/nose.0.left"
#include "noses/nose.1.left"
#include "noses/nose.0.right"
#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 ()
switch (getwordsfrom)
{
case FROM_PROGRAM:
- if (pp = popen(program, "r"))
+ if ((pp = popen(program, "r")))
{
while (fgets(p, sizeof(buf) - strlen(buf), pp))
{
}
break;
case FROM_FILE:
- if (pp = fopen(filename, "r"))
+ if ((pp = fopen(filename, "r")))
{
while (fgets(p, sizeof(buf) - strlen(buf), pp))
{
char *progclass = "Noseguy";
char *defaults [] = {
- "*background: black",
- "*foreground: white",
- "*mode: program",
+ "Noseguy.background: black", /* to placate SGI */
+ "Noseguy.foreground: white",
+ "*mode: string",
"*program: fortune -s",
"noseguy.font: -*-new century schoolbook-*-r-*-*-*-180-*-*-*-*-*-*",
0
{
list = XListFonts(dpy, FONT_NAME, 32767, &foo);
for (i = 0; i < foo; i++)
- if (font = XLoadQueryFont(dpy, list[i]))
+ if ((font = XLoadQueryFont(dpy, list[i])))
break;
if (!font)
{
--- /dev/null
+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.
Dan Heller <argv@sun.com>, 1985.
Ability to run standalone or with \fIxscreensaver\fP added by
-Jamie Zawinski <jwz@lucid.com>, 13-aug-92.
+Jamie Zawinski <jwz@mcom.com>, 13-aug-92.
--- /dev/null
+/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//
--- /dev/null
+/m/src/xscreensaver/hacks/noses
+++ /dev/null
-#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};
+++ /dev/null
-#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};
--- /dev/null
+#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};
--- /dev/null
+#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};
+++ /dev/null
-#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};
+++ /dev/null
-#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};
--- /dev/null
+#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};
--- /dev/null
+#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};
+++ /dev/null
-#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};
--- /dev/null
+#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};
+++ /dev/null
-#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};
--- /dev/null
+#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};
-/* xscreensaver, Copyright (c) 1992 Jamie Zawinski <jwz@lucid.com>
+/* xscreensaver, Copyright (c) 1992, 1994 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
p->dx = (random () % 5000) - 2500 + parent->dx;
p->dy = (random () % 5000) - 2500 + parent->dy;
p->decay = (random () % 50) - 60;
- p->size = 6000;
+ p->size = (parent->size * 2) / 3;
p->fuse = 0;
p->primary = False;
else
XSetForeground (dpy, draw_gc, p->color.pixel);
- if (p->primary)
+ if /*(p->primary)*/ (size > 2)
XFillArc (dpy, window, draw_gc, x, y, size, size, 0, 360*64);
else
XFillRectangle (dpy, window, draw_gc, x, y, size, size);
char *progclass = "Pyro";
char *defaults [] = {
- "*background: black",
- "*foreground: white",
+ "Pyro.background: black", /* to placate SGI */
+ "Pyro.foreground: white",
"*count: 100",
"*frequency: 30",
"*scatter: 20",
--- /dev/null
+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.
suitability of this software for any purpose. It is provided "as is" without
express or implied warranty.
.SH AUTHOR
-Jamie Zawinski <jwz@lucid.com>, 13-aug-92.
+Jamie Zawinski <jwz@mcom.com>, 13-aug-92.
-/* xscreensaver, Copyright (c) 1992 Jamie Zawinski <jwz@lucid.com>
+/* xscreensaver, Copyright (c) 1992 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
char *progclass = "Qix";
char *defaults [] = {
- "*background: black",
- "*foreground: white",
+ "Qix.background: black", /* to placate SGI */
+ "Qix.foreground: white",
"*count: 1",
"*segments: 50",
"*spread: 8",
--- /dev/null
+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.
suitability of this software for any purpose. It is provided "as is" without
express or implied warranty.
.SH AUTHOR
-Jamie Zawinski <jwz@lucid.com>, 13-aug-92.
+Jamie Zawinski <jwz@mcom.com>, 13-aug-92.
--- /dev/null
+
+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.
-/* xscreensaver, Copyright (c) 1992 Jamie Zawinski <jwz@lucid.com>
+/* xscreensaver, Copyright (c) 1992 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 "screenhack.h"
#include <stdio.h>
#include <math.h>
+#ifdef VMS
+#define M_PI 3.14159265358979323846
+#endif
#if __STDC__
-#include <values.h>
+#include <math.h> /* for M_PI */
#endif
#define MIN_DEPTH 2 /* rocks disappar when they get this close */
char *progclass = "Rocks";
char *defaults [] = {
- "*background: black",
- "*foreground: white",
+ "Rocks.background: black", /* to placate SGI */
+ "Rocks.foreground: white",
"*count: 100",
"*delay: 50000",
"*speed: 100",
--- /dev/null
+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.
.SH AUTHOR
Based on Lisp Machine code copyright 1988 John Nguyen <johnn@hx.lcs.mit.edu>.
-Ported to C and X by Jamie Zawinski <jwz@lucid.com>, 13-aug-92.
+Ported to C and X by Jamie Zawinski <jwz@mcom.com>, 13-aug-92.
-/* xscreensaver, Copyright (c) 1992 Jamie Zawinski <jwz@lucid.com>
+/* xscreensaver, Copyright (c) 1992 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
char *progclass = "Rorschach";
char *defaults [] = {
- "*background: black",
- "*foreground: white",
+ "Rorschach.background: black", /* to placate SGI */
+ "Rorschach.foreground: white",
"*xsymmetry: true",
"*ysymmetry: false",
"*iterations: 4000",
--- /dev/null
+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.
suitability of this software for any purpose. It is provided "as is" without
express or implied warranty.
.SH AUTHOR
-Jamie Zawinski <jwz@lucid.com>, 13-aug-92.
+Jamie Zawinski <jwz@mcom.com>, 13-aug-92.
-/* xscreensaver, Copyright (c) 1992 Jamie Zawinski <jwz@lucid.com>
+/* xscreensaver, Copyright (c) 1992 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/Xmu/Error.h>
+#else
+#include "sys$common:[decw$include.xmu]Error.h"
+#endif
+
#include "screenhack.h"
char *progname;
XrmDatabase db;
Bool mono_p;
+#if __STDC__
+# define P(x) x
+#else
+# define P(x)()
+#endif
+
static XrmOptionDescRec default_options [] = {
{ "-root", ".root", XrmoptionNoArg, "True" },
static char *default_defaults[] = {
"*root: false",
- "*geometry: 500x500", /* this should be .geometry, but nooooo... */
+ "*geometry: 500x500",
"*mono: false",
"*installColormap: false",
0
static char **merged_defaults;
static void
-merge_options ()
+merge_options P((void))
{
int options_sizeof = options_size * sizeof (options[0]);
int defaults_size;
}
+#ifndef VMS
void
+#else
+int
+#endif
main (argc, argv)
int argc;
char **argv;
-/* xscreensaver, Copyright (c) 1992, 1993 Jamie Zawinski <jwz@lucid.com>
+/* xscreensaver, Copyright (c) 1992, 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
#include <X11/Xos.h>
#include "vroot.h"
+
extern Bool mono_p;
extern char *progname;
extern char *progclass;
extern int options_size;
extern char *defaults [];
-#if __STDC__
+#if xxx__STDC__
# if defined(SVR4) || defined(SYSV)
# ifndef random
extern int rand (void);
# endif /* !totally-losing-SYSV */
#endif /* __STDC__ */
+
+#ifdef VMS
+#define random rand
+#define srandom srand
+#endif
+
#if __STDC__
# define P(x)x
#else
XColor *pixels, int npixels));
extern Pixmap grab_screen_image P((Display *dpy, Window window, int root_p));
+extern void copy_default_colormap_contents P((Display *dpy, Colormap to_cmap,
+ Visual *to_visual));
static double _frand_tmp_;
#define frand(f) \
-/* xscreensaver, Copyright (c) 1992, 1993 Jamie Zawinski <jwz@lucid.com>
+/* xscreensaver, Copyright (c) 1992, 1993, 1994 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
Pixmap pixmap;
Drawable d;
Colormap cmap;
+ Visual *visual;
XGetWindowAttributes (dpy, window, &xgwa);
cmap = xgwa.colormap;
+ visual = xgwa.visual;
+
+ copy_default_colormap_contents (dpy, cmap, visual);
delay = get_integer_resource ("delay", "Integer");
delay2 = get_integer_resource ("delay2", "Integer");
grid_size = get_integer_resource ("gridSize", "Integer");
pix_inc = get_integer_resource ("pixelIncrement", "Integer");
border = get_integer_resource ("internalBorderWidth", "InternalBorderWidth");
- fg = get_pixel_resource ("background", "Background", dpy, cmap);
+ fg = get_pixel_resource ("background", "Background", dpy,
+ /* Pixels always come out of default map. */
+ XDefaultColormapOfScreen (xgwa.screen));
root_p = get_boolean_resource ("root", "Boolean");
if (delay < 0) delay = 0;
case 1: dx = -1, dy = 0; break;
case 2: dx = 0, dy = -1; break;
case 3: dx = 1, dy = 0; break;
+ default: abort ();
}
} while (dir == last ||
hole_x + dx < 0 || hole_x + dx >= grid_w ||
case 1: size = 1 + (random()%hole_x); w = size; h = 1; break;
case 2: size = 1 + (random()%hole_y); h = size; w = 1; break;
case 3: size = 1 + (random()%(grid_w - hole_x - 1)); w = size; h = 1; break;
+ default: abort ();
}
if (dx == -1) hole_x -= (size - 1);
--- /dev/null
+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.
suitability of this software for any purpose. It is provided "as is" without
express or implied warranty.
.SH AUTHOR
-Jamie Zawinski <jwz@lucid.com>, 3-dec-92.
+Jamie Zawinski <jwz@mcom.com>, 3-dec-92.
--- /dev/null
+/*
+ * 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_ */
--- /dev/null
+static char *screensaver_id =
+ "@(#)xscreensaver 1.24, by Jamie Zawinski (jwz@mcom.com)";
#define _VROOT_H_
#if !defined(lint) && !defined(SABER)
-static char vroot_rcsid[] = "$Id: vroot.h,v 1.4 1991/09/30 19:23:16 stolcke Exp stolcke $";
+static char vroot_rcsid[] = "$Id: vroot.h,v 1.1 1994/08/25 22:04:24 jwz Exp $";
#endif
#include <X11/X.h>
-/* xscreensaver, Copyright (c) 1991-1993 Jamie Zawinski <jwz@lucid.com>
+/* xscreensaver, Copyright (c) 1991-1994 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
char *progclass = "XRoger";
char *defaults [] = {
- "*background: black",
- "*foreground: red",
- "*delay: 5",
+ "XRoger.background: black",
+ "XRoger.foreground: red",
+ "*delay: 5",
0
};
Colormap cmap;
GC draw_gc, erase_gc;
unsigned int fg;
- XColor color, color2;
+ XColor color, color2, color3;
int delay = get_integer_resource ("delay", "Integer");
XWindowAttributes xgwa;
XGetWindowAttributes (dpy, window, &xgwa);
if (v >= 1.0) v = 1.0, delta = -delta;
if (v <= 0.7) v = 0.7, delta = -delta;
hsv_to_rgb (h, s, v, &color2.red, &color2.green, &color2.blue);
- if (XAllocColor (dpy, cmap, &color2))
+ color3 = color2;
+ if (XAllocColor (dpy, cmap, &color3))
{
- XSetForeground (dpy, draw_gc, color.pixel);
+ XSetForeground (dpy, draw_gc, color3.pixel);
+ color2.pixel = color3.pixel;
XFreeColors (dpy, cmap, &color.pixel, 1, 0);
}
color = color2;
--- /dev/null
+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.
the suitability of fnord this software for any purpose. It is provided "as
is" without express or fnord implied warranty.
.SH AUTHOR
-Jamie Zawinski <jwz@lucid.com>, 13-aug-92.
+Jamie Zawinski <jwz@mcom.com>, 13-aug-92.
--- /dev/null
+/*
+ * 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
--- /dev/null
+
+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.
+++ /dev/null
-/*
- * 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)
+++ /dev/null
-
-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.
-/* xscreensaver, Copyright (c) 1992 Jamie Zawinski <jwz@lucid.com>
+/* xscreensaver, Copyright (c) 1992 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/Xlib.h>
#include <X11/Xos.h>
-extern int get_visual_class ();
-extern void screenhack_usleep ();
+#if __STDC__
+# define P(x)x
+#else
+# define P(x)()
+#endif
+
+extern int get_visual_class P((Display *, Visual *));
+extern void screenhack_usleep P((int));
#define usleep screenhack_usleep
#define MAX_COLORS 4096
-/* xscreensaver, Copyright (c) 1992, 1993 Jamie Zawinski <jwz@lucid.com>
+/* xscreensaver, Copyright (c) 1992, 1993, 1994 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
#if __STDC__
#include <stdlib.h>
+#include <unistd.h>
+#endif
+
+#ifdef __DECC
+typedef char * caddr_t;
#endif
#include <X11/Xlib.h>
#include <X11/Xatom.h>
+#include <X11/Xutil.h>
static Bool
MapNotify_event_p (dpy, event, window)
}
+#if __STDC__
+static Bool screensaver_window_p (Display *, Window);
+#endif
+
static Bool
screensaver_window_p (dpy, window)
Display *dpy;
}
return pixmap;
}
+
+
+/* When we are grabbing and manipulating a screen image, it's important that
+ we use the same colormap it originally had. So, if the screensaver was
+ started with -install, we need to copy the contents of the default colormap
+ into the screensaver's colormap.
+ */
+void
+copy_default_colormap_contents (dpy, to_cmap, to_visual)
+ Display *dpy;
+ Colormap to_cmap;
+ Visual *to_visual;
+{
+ Screen *screen = DefaultScreenOfDisplay (dpy);
+ Visual *from_visual = DefaultVisualOfScreen (screen);
+ Colormap from_cmap = XDefaultColormapOfScreen (screen);
+
+ XColor *old_colors, *new_colors;
+ unsigned long *pixels;
+ XVisualInfo vi_in, *vi_out;
+ int out_count;
+ int from_cells, to_cells, max_cells;
+ int requested;
+ int i;
+
+ if (from_cmap == to_cmap)
+ return;
+
+ vi_in.screen = XScreenNumberOfScreen (screen);
+ vi_in.visualid = XVisualIDFromVisual (from_visual);
+ vi_out = XGetVisualInfo (dpy, VisualScreenMask|VisualIDMask,
+ &vi_in, &out_count);
+ if (! vi_out) abort ();
+ from_cells = vi_out [0].colormap_size;
+ XFree ((char *) vi_out);
+
+ vi_in.screen = XScreenNumberOfScreen (screen);
+ vi_in.visualid = XVisualIDFromVisual (to_visual);
+ vi_out = XGetVisualInfo (dpy, VisualScreenMask|VisualIDMask,
+ &vi_in, &out_count);
+ if (! vi_out) abort ();
+ to_cells = vi_out [0].colormap_size;
+ XFree ((char *) vi_out);
+
+ max_cells = (from_cells > to_cells ? to_cells : from_cells);
+
+ old_colors = (XColor *) calloc (sizeof (XColor), max_cells);
+ new_colors = (XColor *) calloc (sizeof (XColor), max_cells);
+ pixels = (unsigned long *) calloc (sizeof (unsigned long), max_cells);
+ for (i = 0; i < max_cells; i++)
+ old_colors[i].pixel = i;
+ XQueryColors (dpy, from_cmap, old_colors, max_cells);
+
+ requested = max_cells;
+ while (requested > 0)
+ {
+ if (XAllocColorCells (dpy, to_cmap, False, 0, 0, pixels, requested))
+ {
+ /* Got all the pixels we asked for. */
+ for (i = 0; i < requested; i++)
+ new_colors[i] = old_colors [pixels[i]];
+ XStoreColors (dpy, to_cmap, new_colors, requested);
+ }
+ else
+ {
+ /* We didn't get all/any of the pixels we asked for. This time, ask
+ for half as many. (If we do get all that we ask for, we ask for
+ the same number again next time, so we only do O(log(n)) server
+ roundtrips.) */
+ requested = requested / 2;
+ }
+ }
+
+ free (old_colors);
+ free (new_colors);
+ free (pixels);
+}
-/* xscreensaver, Copyright (c) 1992 Jamie Zawinski <jwz@lucid.com>
+/* xscreensaver, Copyright (c) 1992 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/Xlib.h>
void
+#if __STDC__
+hsv_to_rgb (int h, double s, double v,
+ unsigned short *r, unsigned short *g, unsigned short *b)
+#else
hsv_to_rgb (h,s,v, r,g,b)
int h; /* 0 - 360 */
double s, v; /* 0.0 - 1.0 */
unsigned short *r, *g, *b; /* 0 - 65535 */
+#endif
{
double H, S, V, R, G, B;
double p1, p2, p3;
}
void
+#if __STDC__
+rgb_to_hsv (unsigned short r, unsigned short g, unsigned short b,
+ int *h, double *s, double *v)
+#else
rgb_to_hsv (r,g,b, h,s,v)
unsigned short r, g, b; /* 0 - 65535 */
int *h; /* 0 - 360 */
double *s, *v; /* 0.0 - 1.0 */
+#endif
{
double R, G, B, H, S, V;
double cmax, cmin;
--- /dev/null
+/*
+ * 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)
--- /dev/null
+
+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.
-/* xscreensaver, Copyright (c) 1992 Jamie Zawinski <jwz@lucid.com>
+/* xscreensaver, Copyright (c) 1992 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
extern char *progclass;
extern XrmDatabase db;
+#if __STDC__
+char *get_string_resource (char *res_name, char *res_class);
+int parse_time (char *string, Bool seconds_default_p, Bool silent_p);
+static unsigned int get_time_resource (char *res_name, char *res_class,
+ Bool sec_p);
+#endif
+
#ifndef isupper
# define isupper(c) ((c) >= 'A' && (c) <= 'Z')
#endif
{
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) ||
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;
/* Lifted from InterViews */
#define SMOOTHNESS 1.0
+#if __STDC__
+static void no_more_memory (void);
+static void grow_spline_points (spline* s);
+static void mid_point (double x0, double y0, double x1, double y1,
+ double *mx, double *my);
+static int can_approx_with_line (double x0, double y0, double x2,
+ double y2, double x3, double y3);
+static void add_line (spline* s, double x0, double y0, double x1, double y1);
+static void add_bezier_arc (spline* s,
+ double x0, double y0, double x1, double y1,
+ double x2, double y2, double x3, double y3);
+static void third_point (double x0, double y0, double x1, double y1,
+ double *tx, double *ty);
+static void calc_section (spline* s, double cminus1x, double cminus1y,
+ double cx, double cy, double cplus1x, double cplus1y,
+ double cplus2x, double cplus2y);
+
+#endif
+
static void
no_more_memory ()
{
# define P(x)()
#endif
+#ifdef VMS
+typedef unsigned int u_int;
+#endif
+
typedef struct _spline
{
/* input */
-/* xscreensaver, Copyright (c) 1992 Jamie Zawinski <jwz@lucid.com>
+/* xscreensaver, Copyright (c) 1992 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/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.
*/
unsigned long usecs;
{
int status, *bin_delta;
- 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 ();
+
+/* 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);
}
#endif /*VMS */
static char *screensaver_id =
- "@(#)xscreensaver 1.22, by Jamie Zawinski (jwz@lucid.com)";
+ "@(#)xscreensaver 1.24, by Jamie Zawinski (jwz@mcom.com)";
-/* xscreensaver, Copyright (c) 1991-1993 Jamie Zawinski <jwz@lucid.com>
+/* xscreensaver, Copyright (c) 1991-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
#include <X11/Xlib.h>
+#if __STDC__
+static void crossbones (Display *, Window, GC, int x, int y, int w, int h);
+#endif
+
static void
crossbones (dpy, window, draw_gc, x, y, w, h)
Display *dpy;