From 258170f6204e23da06f272ffda1f4504b6ae2eaf Mon Sep 17 00:00:00 2001 From: Zygo Blaxell Date: Mon, 2 Mar 2009 00:42:18 -0500 Subject: [PATCH] ftp://ftp.zenez.com/pub/SCO/Skunk96/UnixWare/FreeBird/x11/utils/xscreensaver-1.18.src.tar.Z -rw-r--r-- 1 zblaxell zblaxell 223601 Feb 27 13:58 xscreensaver-1.18.src.tar.Z 8f6a59ffb01673cb52775361dae56fe1c86e47ef xscreensaver-1.18.src.tar.Z --- Imakefile | 10 +- Makefile | 457 ++++++++++++++++++++++ README | 24 ++ config.h | 27 +- driver/Imakefile | 10 +- driver/Makefile | 508 ++++++++++++++++++++++++ driver/XScreenSaver.ad | 1 + driver/lock.c | 416 ++++++++++++-------- driver/subprocs.c | 18 +- driver/timers.c | 12 +- driver/windows.c | 2 +- driver/xscreensaver.c | 18 +- driver/xscreensaver.h | 3 + driver/xscreensaver.man | 3 + hacks/.gdbinit | 3 - hacks/Imakefile | 20 +- hacks/Makefile | 728 +++++++++++++++++++++++++++++++++++ hacks/blitspin.c | 73 +++- hacks/decayscreen.c | 175 +++++++++ hacks/decayscreen.man | 46 +++ hacks/halo.c | 3 + hacks/helix.c | 8 +- hacks/hypercube.c | 4 +- hacks/noses/nose.0.left | 82 ++-- hacks/noses/nose.0.right | 82 ++-- hacks/noses/nose.1.left | 82 ++-- hacks/noses/nose.1.right | 82 ++-- hacks/noses/nose.down | 82 ++-- hacks/noses/nose.front | 82 ++-- hacks/noses/nose.left.front | 82 ++-- hacks/noses/nose.right.front | 82 ++-- hacks/screenhack.h | 28 +- hacks/slidescreen.c | 77 +--- utils/Imakefile | 8 +- utils/Makefile | 426 ++++++++++++++++++++ utils/fade.c | 6 +- utils/grabscreen.c | 117 ++++++ utils/spline.c | 26 ++ utils/spline.h | 26 ++ utils/usleep.c | 4 + utils/version.h | 2 +- 41 files changed, 3348 insertions(+), 597 deletions(-) create mode 100644 Makefile create mode 100644 driver/Makefile delete mode 100644 hacks/.gdbinit create mode 100644 hacks/Makefile create mode 100644 hacks/decayscreen.c create mode 100644 hacks/decayscreen.man create mode 100644 utils/Makefile create mode 100644 utils/grabscreen.c diff --git a/Imakefile b/Imakefile index baa81b19..174f63f7 100644 --- a/Imakefile +++ b/Imakefile @@ -9,6 +9,10 @@ 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)" @@ -32,13 +36,13 @@ hacks/Makefile: hacks/Imakefile config.h # This really makes me sick... tar: utils/Makefile driver/Makefile hacks/Makefile @NAME=`sed -n \ - 's/[^0-9]*\([0-9].[0-9]*\).*/xscreensaver-\1/p' utils/version.h` ; \ + 's/[^0-9]*\([0-9]\.[0-9][0-9]*\).*/xscreensaver-\1/p' utils/version.h` ; \ rm -f $$NAME ; ln -s . $$NAME ; \ - echo creating tar file $${NAME}.tar.Z... ; \ + echo creating tar file $${NAME}.tar.$(COMPRESS_EXT)... ; \ $(TAR) -vchf - `echo $(TARFILES) \ \`cd driver ; make echo_tarfiles | sed 's|^|driver/|g;s| | driver/|g'\` \ \`cd utils ; make echo_tarfiles | sed 's|^|utils/|g; s| | utils/|g'\` \ \`cd hacks ; make echo_tarfiles | sed 's|^|hacks/|g; s| | hacks/|g'\` \ | sed "s|^|$$NAME/|g; s| | $$NAME/|g" ` \ - | compress > $${NAME}.tar.Z ; \ + | $(COMPRESS) > $${NAME}.tar.$(COMPRESS_EXT) ; \ rm $$NAME diff --git a/Makefile b/Makefile new file mode 100644 index 00000000..08e0dfda --- /dev/null +++ b/Makefile @@ -0,0 +1,457 @@ +# Makefile generated by imake - do not edit! +# $XConsortium: imake.c,v 1.65 91/07/25 17:50:17 rws Exp $ +# +# The cpp used on this machine replaces all newlines and multiple tabs and +# spaces in a macro expansion with a single space. Imake tries to compensate +# for this, but is not always successful. +# + +# ------------------------------------------------------------------------- +# Makefile generated from "Imake.tmpl" and +# $XConsortium: Imake.tmpl,v 1.139 91/09/16 08:52:48 rws Exp $ +# +# Platform-specific parameters may be set in the appropriate .cf +# configuration files. Site-specific parameters should be set in the file +# site.def. Full rebuilds are recommended if any parameters are changed. +# +# If your C preprocessor does not define any unique symbols, you will need +# to set BOOTSTRAPCFLAGS when rebuilding imake (usually when doing +# "make World" the first time). +# + +# ------------------------------------------------------------------------- +# site-specific configuration parameters that need to come before +# the platform-specific parameters - edit site.def to change + +# site: $XConsortium: site.def,v 1.2 91/07/30 20:26:44 rws Exp $ + + ALLINCLUDES = $(STD_INCLUDES) $(INCLUDES) $(EXTRA_INCLUDES) $(TOP_INCLUDES) + +# ------------------------------------------------------------------------- +# platform-specific configuration parameters - edit usl.cf to change + +MEMUTILDEF = +MEMUTILLIB = +INC = $(TOOLS)/usr/include + + YFLAGS = + STRIP = $(PFX)strip + AWK = /usr/bin/awk + CD = cd + LS = /bin/ls + PR = /bin/pr + CHMOD = $(CH)chmod + CHOWN = $(CH)chown + CHGRP = $(CH)chgrp + SED = /bin/sed + MCS = $(PFX)mcs -d + + PROTO_DEFINES = +LOCAL_LIBRARIES = $(XLIB) + SYS_LIBRARIES = + + USE_INSTALLED = + SYS_TO_BUILD = + ARCHIVE_ONLY = + + USE_INSTALLED = -DUseInstalled + +BUILD_DEFINES = $(SYS_TO_BUILD) $(USE_INSTALLED) $(ARCHIVE_ONLY) + +# :: end of BUILD_DEFINES set-up + + UNIX_REL = -DSVR4 + +MAKEDEFINES = $(STD_DEFINES) $(BUILD_DEFINES) $(UNIX_REL) $(CCS_USED) + +# until we use R5 server, use R4 font structures + +# operating system: OSName + +INSTALLFLAGS = -m 0644 + +# $XConsortium: sv4Lib.rules,v 1.8 91/07/19 15:38:53 rws Exp $ + + FURCCOPTIONS = -Xa -W2,-A -Wa,-r + FUR = $(PFX)fur + +INCLUDE_EXTENSION = $(INCDIR)/extensions + + TOP_INCLUDES = + +# ------------------------------------------------------------------------- +# site-specific configuration parameters that go after +# the platform-specific parameters - edit site.def to change + +# site: $XConsortium: site.def,v 1.2 91/07/30 20:26:44 rws Exp $ + +# +# ProjectRoot is where you want to install the binaries, libs, fonts etc +# + + PROJECTROOT = $(ROOT)/$(MACH)/usr/X + XWINHOME = /usr/X + XWINLIBDIR = $(XWINHOME)/lib + XWINBINDIR = $(XWINHOME)/bin + + USLCLIENTSRC = $(TOP)/uslclients + DESKTOPDIR = $(PROJECTROOT)/desktop + DTADMDIR = $(PROJECTROOT)/adm + XDEFAULTS = $(PROJECTROOT)/defaults + + FONTINCSRC = $(FONTSRC)/include + FONTLIBINCSRC = $(FONTSRC)/lib/include + FOLIOLIBSRC = $(FONTSRC)/lib/folio + FONTLIBSRC = $(FONTSRC)/lib/font + BITMAPFONTSRC = $(FONTSRC)/lib/bitmap + FONTSLIBSRC = $(FONTSRC)/lib/ + XOLSRC = $(LIBSRC)/Xol + XOLLIBSRC = $(LIBSRC)/Xol +BITMAPLIBS_TO_BUILD = libbitmap.a libbitmap.so +FONTLIBS_TO_BUILD = libfont.a libfont.so + + USL_DEFINES = -DLIBDIR=\"$(XWINLIBDIR)\" -DDESTDIR=\"$(XWINHOME)\" + + DEFINES = $(USL_DEFINES) + + SHELL = /bin/sh + + TOP = . + CURRENT_DIR = . + + AR = $(PFX)ar rv + BOOTSTRAPCFLAGS = -Dusl + CC = $(PFX)cc + AS = $(PFX)as + + COMPRESS = compress + CPP = $(TOOLS)/usr/ccs/lib/$(PFX)cpp $(STD_CPP_DEFINES) + PREPROCESSCMD = $(PFX)cc -E $(STD_CPP_DEFINES) + INSTALL = /usr/ucb/install + LD = $(PFX)ld + LINT = $(PFX)lint + LINTLIBFLAG = -o + LINTOPTS = -ax + LN = /bin/ln -s + MAKE = $(PFX)make + MV = /bin/mv + CP = /bin/cp + HCC = /bin/cc + SED = /bin/sed + + RM = /bin/rm -f + TROFF = psroff + MSMACROS = -ms + TBL = tbl + EQN = eqn + STD_INCLUDES = -I. + STD_CPP_DEFINES = -DUSL -DSVR4 -DSYSV -DI18N $(MEMUTILDEF) + STD_DEFINES = -DUSL -DSVR4 -DSYSV -DI18N $(MEMUTILDEF) + EXTRA_LOAD_FLAGS = + EXTRA_LIBRARIES = -lnsl -ldl $(MEMUTILLIB) + TAGS = ctags + + SHAREDCODEDEF = + SHLIBDEF = + + PROTO_DEFINES = -DFUNCPROTO=15 -DNARROWPROTO + + INSTPGMFLAGS = -s + + INSTBINFLAGS = -m 0755 + INSTUIDFLAGS = -m 4755 + INSTLIBFLAGS = -m 0644 + INSTINCFLAGS = -m 0444 + INSTMANFLAGS = -m 0444 + INSTDATFLAGS = -m 0444 + INSTKMEMFLAGS = -m 4755 + + PROJECTROOT = $(ROOT)/$(MACH)/usr/X + + CDEBUGFLAGS = + CCOPTIONS = -Xa -W2,-A + + ALLINCLUDES = $(INCLUDES) $(EXTRA_INCLUDES) $(TOP_INCLUDES) $(STD_INCLUDES) + ALLDEFINES = $(ALLINCLUDES) $(STD_DEFINES) $(EXTRA_DEFINES) $(PROTO_DEFINES) $(DEFINES) + CFLAGS = $(CDEBUGFLAGS) $(CCOPTIONS) $(ALLDEFINES) + LINTFLAGS = $(LINTOPTS) -DLINT $(ALLDEFINES) + + LDLIBS = $(SYS_LIBRARIES) $(EXTRA_LIBRARIES) + + LDOPTIONS = $(CDEBUGFLAGS) $(CCOPTIONS) $(LOCAL_LDFLAGS) -T 0x8300000 -L$(USRLIBDIR) + + LDCOMBINEFLAGS = -r + DEPENDFLAGS = + + MACROFILE = usl.cf + RM_CMD = $(RM) *.CKP *.ln *.BAK *.bak *.o core errs ,* *~ *.a .emacs_* tags TAGS make.log MakeOut + + IMAKE_DEFINES = + + IRULESRC = $(CONFIGDIR) + IMAKE_CMD = $(IMAKE) -DUseInstalled -I$(IRULESRC) $(IMAKE_DEFINES) + + ICONFIGFILES = $(IRULESRC)/Imake.tmpl $(IRULESRC)/Imake.rules \ + $(IRULESRC)/Project.tmpl $(IRULESRC)/site.def \ + $(IRULESRC)/$(MACROFILE) $(EXTRA_ICONFIGFILES) + +# ------------------------------------------------------------------------- +# X Window System Build Parameters +# $XConsortium: Project.tmpl,v 1.142 92/01/25 16:44:02 rws Exp $ + +# ------------------------------------------------------------------------- +# X Window System make variables; this need to be coordinated with rules + + PATHSEP = / + USRLIBDIR = $(ROOT)/$(MACH)/usr/X/lib + BINDIR = $(ROOT)/$(MACH)/usr/X/bin + INCROOT = $(ROOT)/$(MACH)/usr/X/include + BUILDINCROOT = $(TOP) + BUILDINCDIR = $(BUILDINCROOT)/X11 + BUILDINCTOP = .. + INCDIR = $(INCROOT)/X11 + ADMDIR = /usr/adm + LIBDIR = $(USRLIBDIR) + CONFIGDIR = $(LIBDIR)/config + LINTLIBDIR = $(USRLIBDIR)/lint + + FONTDIR = $(LIBDIR)/fonts + XINITDIR = $(LIBDIR)/xinit + XDMDIR = $(LIBDIR)/xdm + TWMDIR = $(LIBDIR)/twm + MANPATH = $(ROOT)/$(MACH)/usr/X/man + MANSOURCEPATH = $(MANPATH)/man + MANSUFFIX = n + LIBMANSUFFIX = 3 + MANDIR = $(MANSOURCEPATH)$(MANSUFFIX) + LIBMANDIR = $(MANSOURCEPATH)$(LIBMANSUFFIX) + NLSDIR = $(LIBDIR)/nls + PEXAPIDIR = $(LIBDIR)/PEX + XAPPLOADDIR = $(LIBDIR)/app-defaults + FONTCFLAGS = -L -l -t + + INSTAPPFLAGS = $(INSTDATFLAGS) + + IMAKE = imake + DEPEND = makedepend + RGB = rgb + + FONTC = bdftosnf + + MKFONTDIR = mkfontdir + MKDIRHIER = /bin/sh $(BINDIR)/mkdirhier + + CONFIGSRC = $(TOP)/config + DOCUTILSRC = $(TOP)/doc/util + CLIENTSRC = $(TOP)/clients + DEMOSRC = $(TOP)/demos + LIBSRC = $(TOP)/lib + FONTSRC = $(TOP)/fonts + INCLUDESRC = $(TOP)/X11 + SERVERSRC = $(TOP)/server + UTILSRC = $(TOP)/util + SCRIPTSRC = $(UTILSRC)/scripts + EXAMPLESRC = $(TOP)/examples + CONTRIBSRC = $(TOP)/../contrib + DOCSRC = $(TOP)/doc + RGBSRC = $(TOP)/rgb + DEPENDSRC = $(UTILSRC)/makedepend + IMAKESRC = $(CONFIGSRC) + XAUTHSRC = /usr/X/lib + XLIBSRC = /usr/X/lib + XMUSRC = /usr/X/lib + TOOLKITSRC = /usr/X/lib + AWIDGETSRC = /usr/X/lib + OLDXLIBSRC = /usr/X/lib + XDMCPLIBSRC = /usr/X/lib + + BDFTOSNFSRC = $(FONTSRC)/clients/bdftosnf + + MKFONTDIRSRC = $(FONTSRC)/clients/mkfontdir + FSLIBSRC = $(FONTSRC)/lib/fs + FONTSERVERSRC = $(FONTSRC)/server + EXTENSIONSRC = $(TOP)/extensions + XILIBSRC = $(EXTENSIONSRC)/lib/xinput + XTESTLIBSRC = $(EXTENSIONSRC)/lib/xtest + PHIGSLIBSRC = $(EXTENSIONSRC)/lib/PEX + +# $XConsortium: sv4Lib.tmpl,v 1.6 92/01/25 16:46:55 rws Exp $ + +# +# USL: BEGIN +# The default revision numbers from MIT is 5. But since USL has to be +# backward compatible, so force it to 1 +# + + SOXOLREV = 1 + SOOLITREV = 1 + SOOLITMREV = 1 + SOOLITOREV = 1 + SODTREV = 1 + +# USL: END + +SHLIBLDFLAGS = -G -z text +PICFLAGS = -K PIC + + DEPEXTENSIONLIB = + EXTENSIONLIB = -lXext + + DEPXLIB = $(DEPEXTENSIONLIB) + XLIB = $(EXTENSIONLIB) -lX11 + + DEPXMULIB = $(USRLIBDIR)/libXmu.so.$(SOXMUREV) + + XMULIB = -lXmu + + DEPOLDXLIB = + OLDXLIB = -loldX + + DEPXTOOLLIB = + XTOOLLIB = -lXt + + DEPXOLLIB = $(USRLIBDIR)/libOlit.so.$(SOXOLREV) + XOLLIB = -lOlit + + DEPXAWLIB = + XAWLIB = -lXaw + + DEPXILIB = + XILIB = -lXi + + DEPXTESTLIB = + XTESTLIB = -lXtst + +# +# USL: BEGIN +# + +XHOSTLOC = $(DESTDIR)/$(LIBDIR) +SHLIBFLAGS = -L $(ROOT)/$(MACH)/usr/lib -L $(ROOT)/$(MACH)/lib -L $(XHOSTLOC) + +# +# USL: END +# + + SOXLIBREV = 1 + SOXTREV = 1 + SOXAWREV = 1 + SOOLDXREV = 1 + SOXMUREV = 1 + SOXEXTREV = 1 + SOXINPUTREV = 1 + SOXTESTREV = 1 + SOXTRAPREV = 1 + + DEPXAUTHLIB = $(USRLIBDIR)/libXau.a + XAUTHLIB = -lXau + DEPXDMCPLIB = $(USRLIBDIR)/libXdmcp.a + XDMCPLIB = -lXdmcp + + DEPPHIGSLIB = $(USRLIBDIR)/libphigs.a + PHIGSLIB = -lphigs + + DEPXBSDLIB = $(USRLIBDIR)/libXbsd.a + XBSDLIB = -lXbsd + + LINTEXTENSIONLIB = $(LINTLIBDIR)/llib-lXext.ln + LINTXLIB = $(LINTLIBDIR)/llib-lX11.ln + LINTXMU = $(LINTLIBDIR)/llib-lXmu.ln + LINTXTOOL = $(LINTLIBDIR)/llib-lXt.ln + LINTXAW = $(LINTLIBDIR)/llib-lXaw.ln + LINTXI = $(LINTLIBDIR)/llib-lXi.ln + LINTPHIGS = $(LINTLIBDIR)/llib-lphigs.ln + + DEPLIBS = $(DEPXAWLIB) $(DEPXMULIB) $(DEPXTOOLLIB) $(DEPXLIB) + + DEPLIBS1 = $(DEPLIBS) + DEPLIBS2 = $(DEPLIBS) + DEPLIBS3 = $(DEPLIBS) + +# ------------------------------------------------------------------------- +# Imake rules for building libraries, programs, scripts, and data files +# rules: $XConsortium: Imake.rules,v 1.126 91/12/30 20:14:35 rws Exp $ + +# ------------------------------------------------------------------------- +# start of Imakefile + + MOTIFINCLUDES = -I/usr/X/include + MOTIFLDOPTIONS = -L/usr/X/lib + MOTIFLIBS = -lXm + +EXTRA_LIBRARIES= -lgen -L/usr/ucblib -lucb -lnsl + + 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 ; \ + echo creating tar file $${NAME}.tar.$(COMPRESS_EXT)... ; \ + $(TAR) -vchf - `echo $(TARFILES) \ + \`cd driver ; make echo_tarfiles | sed 's|^|driver/|g;s| | driver/|g'\` \ + \`cd utils ; make echo_tarfiles | sed 's|^|utils/|g; s| | utils/|g'\` \ + \`cd hacks ; make echo_tarfiles | sed 's|^|hacks/|g; s| | hacks/|g'\` \ + | sed "s|^|$$NAME/|g; s| | $$NAME/|g" ` \ + | $(COMPRESS) > $${NAME}.tar.$(COMPRESS_EXT) ; \ + rm $$NAME + +# ------------------------------------------------------------------------- +# common rules for all Makefiles - do not edit + +emptyrule:: + +clean:: + $(RM_CMD) "#"* + +Makefile:: + -@if [ -f Makefile ]; then set -x; \ + $(RM) Makefile.bak; $(MV) Makefile Makefile.bak; \ + else exit 0; fi + $(IMAKE_CMD) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT_DIR) + +tags:: + $(TAGS) -w *.[ch] + $(TAGS) -xw *.[ch] > TAGS + +# ------------------------------------------------------------------------- +# empty rules for directories that do not have SUBDIRS - do not edit + +install:: + @echo "install in $(CURRENT_DIR) done" + +install.man:: + @echo "install.man in $(CURRENT_DIR) done" + +Makefiles:: + +includes:: + +# ------------------------------------------------------------------------- +# dependencies generated by makedepend + diff --git a/README b/README index 2783d608..3e2fa163 100644 --- a/README +++ b/README @@ -44,6 +44,7 @@ window, which are pointed at by the screensaver's default resource settings. 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. @@ -75,3 +76,26 @@ me know! [*] It may be necessary to include "vroot.h" in the program, but that would be necessary for it to work with virtual-root window managers anyway. + + + +Changes since 1.17: Added support for shadow password files. + Fixed some Motif-related locking bugs. + Added diagnostics when locking is disabled. + Made blitspin able to use the XPM library. + Added `decayscreen' hack. +Changes since 1.16: Added `halo' hack. +Changes since 1.15: Portability fixes. +Changes since 1.14: Broke the driver up into more source files. + Moved the hacks into their own directory. + Made all `time' parameters accept the 00:00:00 syntax, + so that even the parameters which are normally read as + `minutes' can be specified in seconds. + Added colormap cycling to `imsmap'. + Made hyper work with K&R compilers. +Changes since 1.13: Added `orbit' option to `attraction' hack. + Added `lock-timeout' option. + Cleaned up options of `maze' hack. +Changes since 1.8: Added demo mode, and locking. + Added `maze' hack. + Added `norotate' option to `rocks' hack. diff --git a/config.h b/config.h index 6ec75c87..dd54ba38 100644 --- a/config.h +++ b/config.h @@ -8,19 +8,24 @@ * Installing it is the morally superior thing to do, but xscreensaver will * work without it. */ -#define HAVE_XIDLE +/* #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 */ +/*#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 */ +#define NO_LOCKING /* Uncomment the following line if your system doesn't have the select() * system call. @@ -37,21 +42,27 @@ */ /* #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 + MOTIFINCLUDES = -I/usr/X/include + MOTIFLDOPTIONS = -L/usr/X/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 need this? Let me know.) */ -#if defined(HPArchitecture) /* What other systems need this? Let me know. */ +#if defined(HPArchitecture) || defined(HAVE_SHADOW) # define INSTALL_SETUID #endif @@ -75,3 +86,5 @@ #else /* r5 or better */ # define R5ISMS #endif +/*EXTRA_LIBRARIES=-L/usr/ucblib -lucb -lnsl*/ +EXTRA_LIBRARIES= -lgen -L/usr/ucblib -lucb -lnsl diff --git a/driver/Imakefile b/driver/Imakefile index 59eaf6f2..4343119b 100644 --- a/driver/Imakefile +++ b/driver/Imakefile @@ -33,6 +33,12 @@ # 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 @@ -49,9 +55,9 @@ UTILS = ../utils INCLUDES = -I$(UTILS) MOTIF_INC - DEFINES = SETUID_DEF XIDLE_DEF MOTIF_DEF LOCKING_DEF R5ISMS + DEFINES = SETUID_DEF XIDLE_DEF MOTIF_DEF LOCKING_DEF SHADOW_DEF R5ISMS SAVERLIBS = $(XMULIB) $(XTOOLLIB) $(EXTENSIONLIB) $(XLIB) -lm - COMMLIBS = $(XLIB) -lm + COMMLIBS = $(XLIB) -lm -Bstatic -lcrypt -Bdynamic 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 diff --git a/driver/Makefile b/driver/Makefile new file mode 100644 index 00000000..ef75851b --- /dev/null +++ b/driver/Makefile @@ -0,0 +1,508 @@ +# Makefile generated by imake - do not edit! +# $XConsortium: imake.c,v 1.65 91/07/25 17:50:17 rws Exp $ +# +# The cpp used on this machine replaces all newlines and multiple tabs and +# spaces in a macro expansion with a single space. Imake tries to compensate +# for this, but is not always successful. +# + +# ------------------------------------------------------------------------- +# Makefile generated from "Imake.tmpl" and +# $XConsortium: Imake.tmpl,v 1.139 91/09/16 08:52:48 rws Exp $ +# +# Platform-specific parameters may be set in the appropriate .cf +# configuration files. Site-specific parameters should be set in the file +# site.def. Full rebuilds are recommended if any parameters are changed. +# +# If your C preprocessor does not define any unique symbols, you will need +# to set BOOTSTRAPCFLAGS when rebuilding imake (usually when doing +# "make World" the first time). +# + +# ------------------------------------------------------------------------- +# site-specific configuration parameters that need to come before +# the platform-specific parameters - edit site.def to change + +# site: $XConsortium: site.def,v 1.2 91/07/30 20:26:44 rws Exp $ + + ALLINCLUDES = $(STD_INCLUDES) $(INCLUDES) $(EXTRA_INCLUDES) $(TOP_INCLUDES) + +# ------------------------------------------------------------------------- +# platform-specific configuration parameters - edit usl.cf to change + +MEMUTILDEF = +MEMUTILLIB = +INC = $(TOOLS)/usr/include + + YFLAGS = + STRIP = $(PFX)strip + AWK = /usr/bin/awk + CD = cd + LS = /bin/ls + PR = /bin/pr + CHMOD = $(CH)chmod + CHOWN = $(CH)chown + CHGRP = $(CH)chgrp + SED = /bin/sed + MCS = $(PFX)mcs -d + + PROTO_DEFINES = +LOCAL_LIBRARIES = $(XLIB) + SYS_LIBRARIES = + + USE_INSTALLED = + SYS_TO_BUILD = + ARCHIVE_ONLY = + + USE_INSTALLED = -DUseInstalled + +BUILD_DEFINES = $(SYS_TO_BUILD) $(USE_INSTALLED) $(ARCHIVE_ONLY) + +# :: end of BUILD_DEFINES set-up + + UNIX_REL = -DSVR4 + +MAKEDEFINES = $(STD_DEFINES) $(BUILD_DEFINES) $(UNIX_REL) $(CCS_USED) + +# until we use R5 server, use R4 font structures + +# operating system: OSName + +INSTALLFLAGS = -m 0644 + +# $XConsortium: sv4Lib.rules,v 1.8 91/07/19 15:38:53 rws Exp $ + + FURCCOPTIONS = -Xa -W2,-A -Wa,-r + FUR = $(PFX)fur + +INCLUDE_EXTENSION = $(INCDIR)/extensions + + TOP_INCLUDES = + +# ------------------------------------------------------------------------- +# site-specific configuration parameters that go after +# the platform-specific parameters - edit site.def to change + +# site: $XConsortium: site.def,v 1.2 91/07/30 20:26:44 rws Exp $ + +# +# ProjectRoot is where you want to install the binaries, libs, fonts etc +# + + PROJECTROOT = $(ROOT)/$(MACH)/usr/X + XWINHOME = /usr/X + XWINLIBDIR = $(XWINHOME)/lib + XWINBINDIR = $(XWINHOME)/bin + + USLCLIENTSRC = $(TOP)/uslclients + DESKTOPDIR = $(PROJECTROOT)/desktop + DTADMDIR = $(PROJECTROOT)/adm + XDEFAULTS = $(PROJECTROOT)/defaults + + FONTINCSRC = $(FONTSRC)/include + FONTLIBINCSRC = $(FONTSRC)/lib/include + FOLIOLIBSRC = $(FONTSRC)/lib/folio + FONTLIBSRC = $(FONTSRC)/lib/font + BITMAPFONTSRC = $(FONTSRC)/lib/bitmap + FONTSLIBSRC = $(FONTSRC)/lib/ + XOLSRC = $(LIBSRC)/Xol + XOLLIBSRC = $(LIBSRC)/Xol +BITMAPLIBS_TO_BUILD = libbitmap.a libbitmap.so +FONTLIBS_TO_BUILD = libfont.a libfont.so + + USL_DEFINES = -DLIBDIR=\"$(XWINLIBDIR)\" -DDESTDIR=\"$(XWINHOME)\" + + DEFINES = $(USL_DEFINES) + + SHELL = /bin/sh + + TOP = . + CURRENT_DIR = ./driver + + AR = $(PFX)ar rv + BOOTSTRAPCFLAGS = -Dusl + CC = $(PFX)cc + AS = $(PFX)as + + COMPRESS = compress + CPP = $(TOOLS)/usr/ccs/lib/$(PFX)cpp $(STD_CPP_DEFINES) + PREPROCESSCMD = $(PFX)cc -E $(STD_CPP_DEFINES) + INSTALL = /usr/ucb/install + LD = $(PFX)ld + LINT = $(PFX)lint + LINTLIBFLAG = -o + LINTOPTS = -ax + LN = /bin/ln -s + MAKE = $(PFX)make + MV = /bin/mv + CP = /bin/cp + HCC = /bin/cc + SED = /bin/sed + + RM = /bin/rm -f + TROFF = psroff + MSMACROS = -ms + TBL = tbl + EQN = eqn + STD_INCLUDES = -I. + STD_CPP_DEFINES = -DUSL -DSVR4 -DSYSV -DI18N $(MEMUTILDEF) + STD_DEFINES = -DUSL -DSVR4 -DSYSV -DI18N $(MEMUTILDEF) + EXTRA_LOAD_FLAGS = + EXTRA_LIBRARIES = -lnsl -ldl $(MEMUTILLIB) + TAGS = ctags + + SHAREDCODEDEF = + SHLIBDEF = + + PROTO_DEFINES = -DFUNCPROTO=15 -DNARROWPROTO + + INSTPGMFLAGS = -s + + INSTBINFLAGS = -m 0755 + INSTUIDFLAGS = -m 4755 + INSTLIBFLAGS = -m 0644 + INSTINCFLAGS = -m 0444 + INSTMANFLAGS = -m 0444 + INSTDATFLAGS = -m 0444 + INSTKMEMFLAGS = -m 4755 + + PROJECTROOT = $(ROOT)/$(MACH)/usr/X + + CDEBUGFLAGS = + CCOPTIONS = -Xa -W2,-A + + ALLINCLUDES = $(INCLUDES) $(EXTRA_INCLUDES) $(TOP_INCLUDES) $(STD_INCLUDES) + ALLDEFINES = $(ALLINCLUDES) $(STD_DEFINES) $(EXTRA_DEFINES) $(PROTO_DEFINES) $(DEFINES) + CFLAGS = $(CDEBUGFLAGS) $(CCOPTIONS) $(ALLDEFINES) + LINTFLAGS = $(LINTOPTS) -DLINT $(ALLDEFINES) + + LDLIBS = $(SYS_LIBRARIES) $(EXTRA_LIBRARIES) + + LDOPTIONS = $(CDEBUGFLAGS) $(CCOPTIONS) $(LOCAL_LDFLAGS) -T 0x8300000 -L$(USRLIBDIR) + + LDCOMBINEFLAGS = -r + DEPENDFLAGS = + + MACROFILE = usl.cf + RM_CMD = $(RM) *.CKP *.ln *.BAK *.bak *.o core errs ,* *~ *.a .emacs_* tags TAGS make.log MakeOut + + IMAKE_DEFINES = + + IRULESRC = $(CONFIGDIR) + IMAKE_CMD = $(IMAKE) -DUseInstalled -I$(IRULESRC) $(IMAKE_DEFINES) + + ICONFIGFILES = $(IRULESRC)/Imake.tmpl $(IRULESRC)/Imake.rules \ + $(IRULESRC)/Project.tmpl $(IRULESRC)/site.def \ + $(IRULESRC)/$(MACROFILE) $(EXTRA_ICONFIGFILES) + +# ------------------------------------------------------------------------- +# X Window System Build Parameters +# $XConsortium: Project.tmpl,v 1.142 92/01/25 16:44:02 rws Exp $ + +# ------------------------------------------------------------------------- +# X Window System make variables; this need to be coordinated with rules + + PATHSEP = / + USRLIBDIR = $(ROOT)/$(MACH)/usr/X/lib + BINDIR = $(ROOT)/$(MACH)/usr/X/bin + INCROOT = $(ROOT)/$(MACH)/usr/X/include + BUILDINCROOT = $(TOP) + BUILDINCDIR = $(BUILDINCROOT)/X11 + BUILDINCTOP = .. + INCDIR = $(INCROOT)/X11 + ADMDIR = /usr/adm + LIBDIR = $(USRLIBDIR) + CONFIGDIR = $(LIBDIR)/config + LINTLIBDIR = $(USRLIBDIR)/lint + + FONTDIR = $(LIBDIR)/fonts + XINITDIR = $(LIBDIR)/xinit + XDMDIR = $(LIBDIR)/xdm + TWMDIR = $(LIBDIR)/twm + MANPATH = $(ROOT)/$(MACH)/usr/X/man + MANSOURCEPATH = $(MANPATH)/man + MANSUFFIX = n + LIBMANSUFFIX = 3 + MANDIR = $(MANSOURCEPATH)$(MANSUFFIX) + LIBMANDIR = $(MANSOURCEPATH)$(LIBMANSUFFIX) + NLSDIR = $(LIBDIR)/nls + PEXAPIDIR = $(LIBDIR)/PEX + XAPPLOADDIR = $(LIBDIR)/app-defaults + FONTCFLAGS = -L -l -t + + INSTAPPFLAGS = $(INSTDATFLAGS) + + IMAKE = imake + DEPEND = makedepend + RGB = rgb + + FONTC = bdftosnf + + MKFONTDIR = mkfontdir + MKDIRHIER = /bin/sh $(BINDIR)/mkdirhier + + CONFIGSRC = $(TOP)/config + DOCUTILSRC = $(TOP)/doc/util + CLIENTSRC = $(TOP)/clients + DEMOSRC = $(TOP)/demos + LIBSRC = $(TOP)/lib + FONTSRC = $(TOP)/fonts + INCLUDESRC = $(TOP)/X11 + SERVERSRC = $(TOP)/server + UTILSRC = $(TOP)/util + SCRIPTSRC = $(UTILSRC)/scripts + EXAMPLESRC = $(TOP)/examples + CONTRIBSRC = $(TOP)/../contrib + DOCSRC = $(TOP)/doc + RGBSRC = $(TOP)/rgb + DEPENDSRC = $(UTILSRC)/makedepend + IMAKESRC = $(CONFIGSRC) + XAUTHSRC = /usr/X/lib + XLIBSRC = /usr/X/lib + XMUSRC = /usr/X/lib + TOOLKITSRC = /usr/X/lib + AWIDGETSRC = /usr/X/lib + OLDXLIBSRC = /usr/X/lib + XDMCPLIBSRC = /usr/X/lib + + BDFTOSNFSRC = $(FONTSRC)/clients/bdftosnf + + MKFONTDIRSRC = $(FONTSRC)/clients/mkfontdir + FSLIBSRC = $(FONTSRC)/lib/fs + FONTSERVERSRC = $(FONTSRC)/server + EXTENSIONSRC = $(TOP)/extensions + XILIBSRC = $(EXTENSIONSRC)/lib/xinput + XTESTLIBSRC = $(EXTENSIONSRC)/lib/xtest + PHIGSLIBSRC = $(EXTENSIONSRC)/lib/PEX + +# $XConsortium: sv4Lib.tmpl,v 1.6 92/01/25 16:46:55 rws Exp $ + +# +# USL: BEGIN +# The default revision numbers from MIT is 5. But since USL has to be +# backward compatible, so force it to 1 +# + + SOXOLREV = 1 + SOOLITREV = 1 + SOOLITMREV = 1 + SOOLITOREV = 1 + SODTREV = 1 + +# USL: END + +SHLIBLDFLAGS = -G -z text +PICFLAGS = -K PIC + + DEPEXTENSIONLIB = + EXTENSIONLIB = -lXext + + DEPXLIB = $(DEPEXTENSIONLIB) + XLIB = $(EXTENSIONLIB) -lX11 + + DEPXMULIB = $(USRLIBDIR)/libXmu.so.$(SOXMUREV) + + XMULIB = -lXmu + + DEPOLDXLIB = + OLDXLIB = -loldX + + DEPXTOOLLIB = + XTOOLLIB = -lXt + + DEPXOLLIB = $(USRLIBDIR)/libOlit.so.$(SOXOLREV) + XOLLIB = -lOlit + + DEPXAWLIB = + XAWLIB = -lXaw + + DEPXILIB = + XILIB = -lXi + + DEPXTESTLIB = + XTESTLIB = -lXtst + +# +# USL: BEGIN +# + +XHOSTLOC = $(DESTDIR)/$(LIBDIR) +SHLIBFLAGS = -L $(ROOT)/$(MACH)/usr/lib -L $(ROOT)/$(MACH)/lib -L $(XHOSTLOC) + +# +# USL: END +# + + SOXLIBREV = 1 + SOXTREV = 1 + SOXAWREV = 1 + SOOLDXREV = 1 + SOXMUREV = 1 + SOXEXTREV = 1 + SOXINPUTREV = 1 + SOXTESTREV = 1 + SOXTRAPREV = 1 + + DEPXAUTHLIB = $(USRLIBDIR)/libXau.a + XAUTHLIB = -lXau + DEPXDMCPLIB = $(USRLIBDIR)/libXdmcp.a + XDMCPLIB = -lXdmcp + + DEPPHIGSLIB = $(USRLIBDIR)/libphigs.a + PHIGSLIB = -lphigs + + DEPXBSDLIB = $(USRLIBDIR)/libXbsd.a + XBSDLIB = -lXbsd + + LINTEXTENSIONLIB = $(LINTLIBDIR)/llib-lXext.ln + LINTXLIB = $(LINTLIBDIR)/llib-lX11.ln + LINTXMU = $(LINTLIBDIR)/llib-lXmu.ln + LINTXTOOL = $(LINTLIBDIR)/llib-lXt.ln + LINTXAW = $(LINTLIBDIR)/llib-lXaw.ln + LINTXI = $(LINTLIBDIR)/llib-lXi.ln + LINTPHIGS = $(LINTLIBDIR)/llib-lphigs.ln + + DEPLIBS = $(DEPXAWLIB) $(DEPXMULIB) $(DEPXTOOLLIB) $(DEPXLIB) + + DEPLIBS1 = $(DEPLIBS) + DEPLIBS2 = $(DEPLIBS) + DEPLIBS3 = $(DEPLIBS) + +# ------------------------------------------------------------------------- +# Imake rules for building libraries, programs, scripts, and data files +# rules: $XConsortium: Imake.rules,v 1.126 91/12/30 20:14:35 rws Exp $ + +# ------------------------------------------------------------------------- +# start of Imakefile + + MOTIFINCLUDES = -I/usr/X/include + MOTIFLDOPTIONS = -L/usr/X/lib + MOTIFLIBS = -lXm + +EXTRA_LIBRARIES= -lgen -L/usr/ucblib -lucb -lnsl + + UTILS = ../utils + INCLUDES = -I$(UTILS) $(MOTIFINCLUDES) + DEFINES = -DNO_LOCKING -DHAVE_SHADOW + SAVERLIBS = $(XMULIB) $(XTOOLLIB) $(EXTENSIONLIB) $(XLIB) -lm + COMMLIBS = $(XLIB) -lm -Bstatic -lcrypt -Bdynamic + 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) $(DBOX_SRCS) $(UTILS)/xroger.c $(UTIL_SRCS) + OBJS1 = $(SAVEROBJS) $(DBOX_OBJS) $(UTILS)/xroger.o $(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 + +all:: xscreensaver xscreensaver-command + +echo_tarfiles: + @echo $(TARFILES) + +PROGRAMS = xscreensaver xscreensaver-command + + OBJS = $(OBJS1) $(OBJS2) $(OBJS3) + SRCS = $(SRCS1) $(SRCS2) $(SRCS3) + +all:: $(PROGRAMS) + +xscreensaver: $(OBJS1) $(DEPLIBS1) + $(RM) $@ + $(CC) -o $@ $(LDOPTIONS) $(OBJS1) $(MOTIFLDOPTIONS) $(MOTIFLIBS) $(SAVERLIBS) $(LDLIBS) $(EXTRA_LOAD_FLAGS) + +install:: xscreensaver + @if [ -d $(DESTDIR)$(BINDIR) ]; then set +x; \ + else (set -x; $(MKDIRHIER) $(DESTDIR)$(BINDIR)); fi + $(INSTALL) -c $(INSTPGMFLAGS) xscreensaver $(DESTDIR)$(BINDIR) + +install.man:: xscreensaver.man + @if [ -d $(DESTDIR)$(MANDIR) ]; then set +x; \ + else (set -x; $(MKDIRHIER) $(DESTDIR)$(MANDIR)); fi + $(INSTALL) -c $(INSTMANFLAGS) xscreensaver.man $(DESTDIR)$(MANDIR)/xscreensaver.$(MANSUFFIX) + +depend:: + $(DEPEND) $(DEPENDFLAGS) -s "# DO NOT DELETE" -- $(ALLDEFINES) $(DEPEND_DEFINES) -- $(SRCS) + +lint: + $(LINT) $(LINTFLAGS) $(SRCS) $(LINTLIBS) +lint1: + $(LINT) $(LINTFLAGS) $(FILE) $(LINTLIBS) + +clean:: + $(RM) $(PROGRAMS) + +xscreensaver-command: $(OBJS2) $(DEPLIBS2) + $(RM) $@ + $(CC) -o $@ $(LDOPTIONS) $(OBJS2) $(COMMLIBS) $(LDLIBS) $(EXTRA_LOAD_FLAGS) + +install:: xscreensaver-command + @if [ -d $(DESTDIR)$(BINDIR) ]; then set +x; \ + else (set -x; $(MKDIRHIER) $(DESTDIR)$(BINDIR)); fi + $(INSTALL) -c $(INSTPGMFLAGS) xscreensaver-command $(DESTDIR)$(BINDIR) + +install.man:: xscreensaver-command.man + @if [ -d $(DESTDIR)$(MANDIR) ]; then set +x; \ + else (set -x; $(MKDIRHIER) $(DESTDIR)$(MANDIR)); fi + $(INSTALL) -c $(INSTMANFLAGS) xscreensaver-command.man $(DESTDIR)$(MANDIR)/xscreensaver-command.$(MANSUFFIX) + +install:: XScreenSaver.ad + @if [ -d $(DESTDIR)$(XAPPLOADDIR) ]; then set +x; \ + else (set -x; $(MKDIRHIER) $(DESTDIR)$(XAPPLOADDIR)); fi + $(INSTALL) -c $(INSTAPPFLAGS) XScreenSaver.ad $(DESTDIR)$(XAPPLOADDIR)/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 + +depend:: XScreenSaver.ad.h + +XScreenSaver.ad.h: XScreenSaver.ad + $(UTILS)/ad2c XScreenSaver.ad > XScreenSaver.ad.h + +clean:: + $(RM) XScreenSaver.ad.h + +# ------------------------------------------------------------------------- +# common rules for all Makefiles - do not edit + +emptyrule:: + +clean:: + $(RM_CMD) "#"* + +Makefile:: + -@if [ -f Makefile ]; then set -x; \ + $(RM) Makefile.bak; $(MV) Makefile Makefile.bak; \ + else exit 0; fi + $(IMAKE_CMD) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT_DIR) + +tags:: + $(TAGS) -w *.[ch] + $(TAGS) -xw *.[ch] > TAGS + +# ------------------------------------------------------------------------- +# empty rules for directories that do not have SUBDIRS - do not edit + +install:: + @echo "install in $(CURRENT_DIR) done" + +install.man:: + @echo "install.man in $(CURRENT_DIR) done" + +Makefiles:: + +includes:: + +# ------------------------------------------------------------------------- +# dependencies generated by makedepend + diff --git a/driver/XScreenSaver.ad b/driver/XScreenSaver.ad index 8e2aae12..a3312614 100644 --- a/driver/XScreenSaver.ad +++ b/driver/XScreenSaver.ad @@ -34,6 +34,7 @@ xroger -root \n\ imsmap -root \n\ slidescreen -root \n\ + decayscreen -root \n\ hypercube -root \n\ halo -root \n\ maze -root \n diff --git a/driver/lock.c b/driver/lock.c index 48b2f526..92137aa8 100644 --- a/driver/lock.c +++ b/driver/lock.c @@ -1,11 +1,11 @@ -/* xscreensaver, Copyright (c) 1993 Jamie Zawinski +/* xscreensaver, Copyright (c) 1993 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 + * software for any purpose. It is provided "as is" without express or * implied warranty. */ @@ -15,6 +15,10 @@ #include #endif +#ifdef HAVE_SHADOW +#include +#endif + #include #include @@ -30,9 +34,9 @@ #include "xscreensaver.h" +Time passwd_timeout; #ifndef NO_LOCKING -Time passwd_timeout; extern char *screensaver_version; extern char *progname; @@ -50,48 +54,69 @@ extern Widget passwd_cancel; extern create_passwd_dialog (); -static enum { pw_read, pw_ok, pw_fail, pw_cancel, pw_time } passwd_state; -static char typed_passwd [1024]; +static enum +{ + pw_read, pw_ok, pw_fail, pw_cancel, pw_time +} passwd_state; +static char typed_passwd[1024]; -static char root_passwd [255]; -static char user_passwd [255]; +static char root_passwd[255]; +static char user_passwd[255]; + +#ifdef HAVE_SHADOW +# define PWTYPE struct spwd * +# define PWSLOT sp_pwdp +# define GETPW getspnam +#else +# define PWTYPE struct passwd * +# define PWSLOT pw_passwd +# define GETPW getpwnam +#endif Bool lock_init () { Bool ok = True; - struct passwd *p; char *u; - p = getpwnam ("root"); - if (p && p->pw_passwd && p->pw_passwd[0] != '*') - strcpy (root_passwd, p->pw_passwd); + PWTYPE p = GETPW ("root"); + + if (p && p->PWSLOT && p->PWSLOT[0] != '*') + strcpy (root_passwd, p->PWSLOT); else - { - fprintf (stderr, "%s: couldn't get root's password\n", progname); - strcpy (root_passwd, "*"); - } + { + fprintf (stderr, "%s: couldn't get root's password\n", progname); + strcpy (root_passwd, "*"); + } - u = getlogin (); + /* It has been reported that getlogin() returns the wrong user id on some + very old SGI systems... */ + u = (char *) getlogin (); if (u) - p = getpwnam (u); + p = GETPW (u); else - { - /* getlogin() fails if not attached to a terminal; + { + /* getlogin() fails if not attached to a terminal; in that case, use getpwuid(). */ - p = getpwuid (getuid ()); - u = p->pw_name; - } + p = getpwuid (getuid ()); + u = p->pw_name; + } - if (p && p->pw_passwd && p->pw_passwd[0] != '*') - strcpy (user_passwd, p->pw_passwd); + if (p && p->PWSLOT && p->PWSLOT[0] != '*') + strcpy (user_passwd, p->PWSLOT); else - { - fprintf (stderr, "%s: couldn't get password of \"%s\"\n", progname, u); - strcpy (user_passwd, "*"); - ok = False; - } + { + fprintf (stderr, "%s: couldn't get password of \"%s\"\n", progname, u); + strcpy (user_passwd, "*"); + ok = False; + } return ok; } + +#ifdef XmVersion +# if (XmVersion >= 1002) /* The `destroy' bug apears to be fixed as */ +# define DESTROY_WORKS /* of Motif 1.2.1, but the `verify-callback' */ +# endif /* bug is still present. */ +#endif static void passwd_cancel_cb (button, client_data, call_data) @@ -106,11 +131,13 @@ passwd_done_cb (button, client_data, call_data) Widget button; XtPointer client_data, call_data; { - if (passwd_state != pw_read) return; /* already done */ + if (passwd_state != pw_read) + return; /* already done */ + if (!strcmp ((char *) crypt (typed_passwd, user_passwd), user_passwd)) passwd_state = pw_ok; /* do not allow root to have empty passwd */ - else if (typed_passwd [0] && + else if (typed_passwd[0] && !strcmp ((char *) crypt (typed_passwd, root_passwd), root_passwd)) passwd_state = pw_ok; else @@ -119,13 +146,17 @@ passwd_done_cb (button, client_data, call_data) #ifdef VERIFY_CALLBACK_WORKS - /* #### It looks to me like adding any modifyVerify callback causes +/* #### It looks to me like adding any modifyVerify callback causes #### Motif 1.1.4 to free the the TextF_Value() twice. I can't see #### the bug in the Motif source, but Purify complains, even if #### check_passwd_cb() is a no-op. + + #### Update: Motif 1.2.1 also loses, but in a different way: it + #### writes beyond the end of a malloc'ed block in ModifyVerify(). + #### Probably this block is the text field's text. */ -static void +static void check_passwd_cb (button, client_data, call_data) Widget button; XtPointer client_data, call_data; @@ -135,37 +166,40 @@ check_passwd_cb (button, client_data, call_data) if (passwd_state != pw_read) return; else if (vcb->reason == XmCR_ACTIVATE) - { - passwd_done_cb (0, 0, 0); - } + { + passwd_done_cb (0, 0, 0); + } else if (vcb->text->length > 1) /* don't allow "paste" operations */ - { - vcb->doit = False; - } + { + vcb->doit = False; + } else if (vcb->text->ptr != 0) - { - int i; - strncat (typed_passwd, vcb->text->ptr, vcb->text->length); - typed_passwd [vcb->endPos + vcb->text->length] = 0; - for (i = 0; i < vcb->text->length; i++) - vcb->text->ptr [i] = '*'; - } + { + int i; + + strncat (typed_passwd, vcb->text->ptr, vcb->text->length); + typed_passwd[vcb->endPos + vcb->text->length] = 0; + for (i = 0; i < vcb->text->length; i++) + vcb->text->ptr[i] = '*'; + } } #else /* !VERIFY_CALLBACK_WORKS */ -static void keypress(); -static void backspace(); -static void kill_line(); -static void done(); +static void keypress (); +static void backspace (); +static void kill_line (); +static void done (); -static XtActionsRec actions[] = {{"keypress", keypress}, - {"backspace", backspace}, - {"kill_line", kill_line}, - {"done", done} - }; +static XtActionsRec actions[] = +{ + {"keypress", keypress}, + {"backspace", backspace}, + {"kill_line", kill_line}, + {"done", done} +}; -#if 0 /* oh fuck, why doesn't this work? */ +#if 0 /* oh fuck, why doesn't this work? */ static char translations[] = "\ BackSpace: backspace()\n\ Delete: backspace()\n\ @@ -176,8 +210,10 @@ CtrlJ: done()\n\ CtrlM: done()\n\ : keypress()\n\ "; + #else static char translations[] = ":keypress()"; + #endif static void @@ -188,23 +224,49 @@ keypress (w, event, argv, argc) Cardinal *argc; { int i, j; - char s [sizeof (typed_passwd)]; + char s[sizeof (typed_passwd)]; int size = XLookupString ((XKeyEvent *) event, s, sizeof (s), 0, 0); - if (size != 1) return; + + if (size != 1) + return; /* hack because I can't get translations to dance to my tune... */ - if (*s == '\010') { backspace (w, event, argv, argc); return; } - if (*s == '\177') { backspace (w, event, argv, argc); return; } - if (*s == '\025') { kill_line (w, event, argv, argc); return; } - if (*s == '\030') { kill_line (w, event, argv, argc); return; } - if (*s == '\012') { done (w, event, argv, argc); return; } - if (*s == '\015') { done (w, event, argv, argc); return; } + if (*s == '\010') + { + backspace (w, event, argv, argc); + return; + } + if (*s == '\177') + { + backspace (w, event, argv, argc); + return; + } + if (*s == '\025') + { + kill_line (w, event, argv, argc); + return; + } + if (*s == '\030') + { + kill_line (w, event, argv, argc); + return; + } + if (*s == '\012') + { + done (w, event, argv, argc); + return; + } + if (*s == '\015') + { + done (w, event, argv, argc); + return; + } i = j = strlen (typed_passwd); - typed_passwd [i] = *s; - s [++i] = 0; + typed_passwd[i] = *s; + s[++i] = 0; while (i--) - s [i] = '*'; + s[i] = '*'; XmTextFieldSetString (passwd_text, s); XmTextFieldSetInsertionPosition (passwd_text, j + 1); } @@ -216,15 +278,16 @@ backspace (w, event, argv, argc) String *argv; Cardinal *argc; { - char s [sizeof (typed_passwd)]; + char s[sizeof (typed_passwd)]; int i = strlen (typed_passwd); int j = i; + if (i == 0) return; - typed_passwd [--i] = 0; - s [i] = 0; + typed_passwd[--i] = 0; + s[i] = 0; while (i--) - s [i] = '*'; + s[i] = '*'; XmTextFieldSetString (passwd_text, s); XmTextFieldSetInsertionPosition (passwd_text, j + 1); } @@ -258,12 +321,14 @@ format_into_label (widget, string) char *string; { char *label; - char buf [255]; + char buf[255]; XmString xm_label = 0; XmString new_xm_label; Arg av[10]; int ac = 0; - XtSetArg (av [ac], XmNlabelString, &xm_label); ac++; + + XtSetArg (av[ac], XmNlabelString, &xm_label); + ac++; XtGetValues (widget, av, ac); XmStringGetLtoR (xm_label, XmSTRING_DEFAULT_CHARSET, &label); if (!strcmp (label, XtName (widget))) @@ -272,7 +337,8 @@ format_into_label (widget, string) sprintf (buf, label, string); new_xm_label = XmStringCreate (buf, XmSTRING_DEFAULT_CHARSET); ac = 0; - XtSetArg (av [ac], XmNlabelString, new_xm_label); ac++; + XtSetArg (av[ac], XmNlabelString, new_xm_label); + ac++; XtSetValues (widget, av, ac); XmStringFree (new_xm_label); XtFree (label); @@ -280,6 +346,7 @@ format_into_label (widget, string) #if __STDC__ extern void skull (Display *, Window, GC, GC, int, int, int, int); + #endif static void @@ -290,7 +357,7 @@ roger (button, client_data, call_data) Display *dpy = XtDisplay (button); Screen *screen = XtScreen (button); Window window = XtWindow (button); - Arg av [10]; + Arg av[10]; int ac = 0; XGCValues gcv; Colormap cmap; @@ -298,15 +365,21 @@ roger (button, client_data, call_data) unsigned int fg, bg; int x, y, size; XWindowAttributes xgwa; + XGetWindowAttributes (dpy, window, &xgwa); cmap = xgwa.colormap; - if (xgwa.width > xgwa.height) size = xgwa.height; - else size = xgwa.width; - if (size > 40) size -= 30; + if (xgwa.width > xgwa.height) + size = xgwa.height; + else + size = xgwa.width; + if (size > 40) + size -= 30; x = (xgwa.width - size) / 2; y = (xgwa.height - size) / 2; - XtSetArg (av [ac], XmNforeground, &fg); ac++; - XtSetArg (av [ac], XmNbackground, &bg); ac++; + XtSetArg (av[ac], XmNforeground, &fg); + ac++; + XtSetArg (av[ac], XmNbackground, &bg); + ac++; XtGetValues (button, av, ac); /* if it's black on white, swap it cause it looks better (hack hack) */ if (fg == BlackPixelOfScreen (screen) && bg == WhitePixelOfScreen (screen)) @@ -326,6 +399,7 @@ make_passwd_dialog (parent) Widget parent; { struct passwd *pw; + create_passwd_dialog (parent); XtAddCallback (passwd_done, XmNactivateCallback, passwd_done_cb, 0); @@ -345,7 +419,6 @@ make_passwd_dialog (parent) format_into_label (passwd_label1, screensaver_version); } - extern void idle_timer (); static int passwd_idle_timer_tick; @@ -364,41 +437,48 @@ passwd_idle_timer (junk1, junk2) idle_timer (junk1, junk2); - if (passwd_idle_timer_tick == max) /* first time */ - { - Arg av [10]; - int ac = 0; - XGCValues gcv; - unsigned long fg, bg; - XtSetArg (av [ac], XmNheight, &d); ac++; - XtGetValues (passwd_done, av, ac); - ac = 0; - XtSetArg (av [ac], XmNwidth, &x); ac++; - XtSetArg (av [ac], XmNheight, &y); ac++; - XtSetArg (av [ac], XmNforeground, &fg); ac++; - XtSetArg (av [ac], XmNbackground, &bg); ac++; - XtGetValues (passwd_form, av, ac); - x -= d; - y -= d; - d -= 4; - gcv.foreground = fg; - if (gc) XFreeGC (dpy, gc); - gc = XCreateGC (dpy, window, GCForeground, &gcv); - s = 360*64 / (passwd_idle_timer_tick - 1); - ss = 90*64; - XFillArc (dpy, window, gc, x, y, d, d, 0, 360*64); - XSetForeground (dpy, gc, bg); - x += 1; - y += 1; - d -= 2; - } + if (passwd_idle_timer_tick == max) /* first time */ + { + Arg av[10]; + int ac = 0; + XGCValues gcv; + unsigned long fg, bg; + + XtSetArg (av[ac], XmNheight, &d); + ac++; + XtGetValues (passwd_done, av, ac); + ac = 0; + XtSetArg (av[ac], XmNwidth, &x); + ac++; + XtSetArg (av[ac], XmNheight, &y); + ac++; + XtSetArg (av[ac], XmNforeground, &fg); + ac++; + XtSetArg (av[ac], XmNbackground, &bg); + ac++; + XtGetValues (passwd_form, av, ac); + x -= d; + y -= d; + d -= 4; + gcv.foreground = fg; + if (gc) + XFreeGC (dpy, gc); + gc = XCreateGC (dpy, window, GCForeground, &gcv); + s = 360 * 64 / (passwd_idle_timer_tick - 1); + ss = 90 * 64; + XFillArc (dpy, window, gc, x, y, d, d, 0, 360 * 64); + XSetForeground (dpy, gc, bg); + x += 1; + y += 1; + d -= 2; + } if (--passwd_idle_timer_tick) - { - id = XtAppAddTimeOut (app, 1000, passwd_idle_timer, 0); - XFillArc (dpy, window, gc, x, y, d, d, ss, s); - ss += s; - } + { + id = XtAppAddTimeOut (app, 1000, (XtTimerCallbackProc) passwd_idle_timer, 0); + XFillArc (dpy, window, gc, x, y, d, d, ss, s); + ss += s; + } } extern void pop_up_dialog_box (); @@ -411,7 +491,8 @@ pop_passwd_dialog (parent) Display *dpy = XtDisplay (passwd_dialog); Window focus; int revert_to; - typed_passwd [0] = 0; + + typed_passwd[0] = 0; passwd_state = pw_read; XmTextFieldSetString (passwd_text, ""); @@ -423,68 +504,79 @@ pop_passwd_dialog (parent) doesn't work right either, so we hack the window directly. FMH. */ if (XtWindow (passwd_form)) - XMapWindow (dpy, XtWindow (passwd_dialog)); + XMapRaised (dpy, XtWindow (passwd_dialog)); #endif pop_up_dialog_box (passwd_dialog, passwd_form, 2); XtManageChild (passwd_form); XSetInputFocus (dpy, XtWindow (passwd_dialog), revert_to, CurrentTime); + + /* #### This doesn't work in 1.2.1... Check return code... */ XmProcessTraversal (passwd_text, 0); passwd_idle_timer_tick = passwd_timeout / 1000; - id = XtAppAddTimeOut (app, 1000, passwd_idle_timer, 0); + id = XtAppAddTimeOut (app, 1000, (XtTimerCallbackProc) passwd_idle_timer, 0); - - XGrabServer (dpy); /* ############ DANGER! */ + XGrabServer (dpy); /* ############ DANGER! */ while (passwd_state == pw_read) - { - XEvent event; - XtAppNextEvent (app, &event); - /* wait for timer event */ - if (event.xany.type == 0 && passwd_idle_timer_tick == 0) - passwd_state = pw_time; - XtDispatchEvent (&event); - } + { + XEvent event; + + XtAppNextEvent (app, &event); + /* wait for timer event */ + if (event.xany.type == 0 && passwd_idle_timer_tick == 0) + passwd_state = pw_time; + XtDispatchEvent (&event); + } XUngrabServer (dpy); - XSync (dpy, False); /* ###### (danger over) */ + XSync (dpy, False); /* ###### (danger over) */ if (passwd_state != pw_time) XtRemoveTimeOut (id); if (passwd_state != pw_ok) + { + char *lose; + + switch (passwd_state) + { + case pw_time: + lose = "Timed out!"; + break; + case pw_fail: + lose = "Sorry!"; + break; + case pw_cancel: + lose = 0; + break; + default: + abort (); + } + XmProcessTraversal (passwd_cancel, 0); /* turn off I-beam */ + if (lose) { - char *lose; - switch (passwd_state) - { - case pw_time: lose = "Timed out!"; break; - case pw_fail: lose = "Sorry!"; break; - case pw_cancel: lose = 0; break; - default: abort (); - } - XmProcessTraversal (passwd_cancel, 0); /* turn off I-beam */ - if (lose) - { - XmTextFieldSetString (passwd_text, lose); - XmTextFieldSetInsertionPosition (passwd_text, strlen (lose) + 1); - passwd_idle_timer_tick = 1; - id = XtAppAddTimeOut (app, 3000, passwd_idle_timer, 0); - while (1) - { - XEvent event; - XtAppNextEvent (app, &event); - if (event.xany.type == 0 && /* wait for timer event */ - passwd_idle_timer_tick == 0) - break; - XtDispatchEvent (&event); - } - } + XmTextFieldSetString (passwd_text, lose); + XmTextFieldSetInsertionPosition (passwd_text, strlen (lose) + 1); + passwd_idle_timer_tick = 1; + id = XtAppAddTimeOut (app, 3000, (XtTimerCallbackProc) passwd_idle_timer, 0); + while (1) + { + XEvent event; + + XtAppNextEvent (app, &event); + if (event.xany.type == 0 && /* wait for timer event */ + passwd_idle_timer_tick == 0) + break; + XtDispatchEvent (&event); + } } + } memset (typed_passwd, 0, sizeof (typed_passwd)); XmTextFieldSetString (passwd_text, ""); XtSetKeyboardFocus (parent, None); -#ifndef DESTROY_WORKS +#ifdef DESTROY_WORKS XtDestroyWidget (passwd_dialog); passwd_dialog = 0; #else @@ -492,6 +584,7 @@ pop_passwd_dialog (parent) #endif { int (*old_handler) (); + old_handler = XSetErrorHandler (BadWindow_ehandler); /* I don't understand why this doesn't refocus on the old selected window when MWM is running in click-to-type mode. The value of @@ -509,15 +602,16 @@ unlock_p (parent) Widget parent; { static Bool initted = False; - if (! initted) - { + + if (!initted) + { #ifndef VERIFY_CALLBACK_WORKS - XtAppAddActions (app, actions, XtNumber (actions)); + XtAppAddActions (app, actions, XtNumber (actions)); #endif - passwd_dialog = 0; - initted = True; - } - if (! passwd_dialog) + passwd_dialog = 0; + initted = True; + } + if (!passwd_dialog) make_passwd_dialog (parent); return pop_passwd_dialog (parent); } diff --git a/driver/subprocs.c b/driver/subprocs.c index e6a28127..4d8332a6 100644 --- a/driver/subprocs.c +++ b/driver/subprocs.c @@ -40,11 +40,12 @@ extern char **environ; /* why isn't this in some header file? */ #endif #if __STDC__ -extern int putenv (const char *); /* getenv() is in stdlib.h... */ +extern int putenv (/* const char * */); /* getenv() is in stdlib.h... */ extern int kill (pid_t, int); /* signal() is in sys/signal.h... */ #endif # if defined(SVR4) || defined(SYSV) +# undef PRIO_PROCESS # define random() rand() # else /* !totally-losing-SYSV */ extern long random(); /* rand() is in stdlib.h... */ @@ -62,6 +63,7 @@ int current_hack = -1; char *demo_hack; int next_mode_p = 0; Bool locking_disabled_p = False; +char *nolock_reason = 0; int nice_inferior = 0; extern Bool demo_mode_p; @@ -496,8 +498,14 @@ hack_uid () to something safe. */ if (getuid () == 0) { - struct passwd *p = getpwnam ("nobody"); + struct passwd *p; + /* Locking can't work when running as root, because we have no way of + knowing what the user id of the logged in user is (so we don't know + whose password to prompt for.) + */ locking_disabled_p = True; + nolock_reason = "running as root"; + p = getpwnam ("nobody"); if (! p) p = getpwnam ("daemon"); if (! p) p = getpwnam ("bin"); if (! p) p = getpwnam ("sys"); @@ -542,7 +550,11 @@ hack_uid () !strcmp (p->pw_name, "daemon") || !strcmp (p->pw_name, "bin") || !strcmp (p->pw_name, "sys")) - locking_disabled_p = True; + { + locking_disabled_p = True; + nolock_reason = hack_uid_buf; + sprintf (nolock_reason, "running as %s", p->pw_name); + } } #endif /* NO_LOCKING */ } diff --git a/driver/timers.c b/driver/timers.c index 64117cea..b8c3e91e 100644 --- a/driver/timers.c +++ b/driver/timers.c @@ -163,7 +163,7 @@ cycle_timer (junk1, junk2) kill_screenhack (); spawn_screenhack (False); } - cycle_id = XtAppAddTimeOut (app, how_long, cycle_timer, 0); + cycle_id = XtAppAddTimeOut (app, how_long, (XtTimerCallbackProc)cycle_timer, 0); } @@ -189,7 +189,7 @@ reset_timers () progname, timeout, timer_id); #endif XtRemoveTimeOut (timer_id); - timer_id = XtAppAddTimeOut (app, timeout, idle_timer, 0); + timer_id = XtAppAddTimeOut (app, timeout, (XtTimerCallbackProc)idle_timer, 0); if (cycle_id) abort (); last_activity_time = time ((time_t *) 0); @@ -217,7 +217,7 @@ check_pointer_timer (closure, this_timer) abort (); #endif - *timerP = XtAppAddTimeOut (app, pointer_timeout, check_pointer_timer, + *timerP = XtAppAddTimeOut (app, pointer_timeout, (XtTimerCallbackProc)check_pointer_timer, closure); XQueryPointer (dpy, screensaver_window, &root, &child, @@ -251,7 +251,7 @@ sleep_until_idle (until_idle_p) if (until_idle_p) { - timer_id = XtAppAddTimeOut (app, timeout, idle_timer, 0); + timer_id = XtAppAddTimeOut (app, timeout, (XtTimerCallbackProc)idle_timer, 0); #ifdef HAVE_XIDLE if (! use_xidle) #endif @@ -286,7 +286,7 @@ sleep_until_idle (until_idle_p) goto DONE; else timer_id = XtAppAddTimeOut (app, timeout - idle, - idle_timer, 0); + (XtTimerCallbackProc)idle_timer, 0); } break; @@ -299,7 +299,7 @@ sleep_until_idle (until_idle_p) #ifdef HAVE_XIDLE if (! use_xidle) #endif - XtAppAddTimeOut (app, notice_events_timeout, notice_events_timer, + XtAppAddTimeOut (app, notice_events_timeout, (XtTimerCallbackProc)notice_events_timer, (XtPointer) event.xcreatewindow.window); break; diff --git a/driver/windows.c b/driver/windows.c index 1e4b22df..84802404 100644 --- a/driver/windows.c +++ b/driver/windows.c @@ -467,7 +467,7 @@ initialize_screensaver_window () attrs.backing_store = NotUseful; attrs.colormap = cmap; -/* if (demo_mode_p || lock_p || locked_p) width = width / 2; #### */ +/* if (demo_mode_p || lock_p) width = width / 2; #### */ if (screensaver_window) { diff --git a/driver/xscreensaver.c b/driver/xscreensaver.c index 54aee1dc..5afc1c39 100644 --- a/driver/xscreensaver.c +++ b/driver/xscreensaver.c @@ -94,6 +94,12 @@ * it if the description above sounds just too flaky to live. It is, but * those are your choices. * + * A third idle-detection option could be implement (but is not): when running + * on the console display ($DISPLAY is `localhost`:0) and we're on a machine + * where /dev/tty and /dev/mouse have reasonable last-modification times, we + * could just stat those. But the incremental benefit of implementing this + * is really small, so forget I said anything. + * * Debugging hints: * - Have a second terminal handy. * - Be careful where you set your breakpoints, you don't want this to @@ -196,6 +202,7 @@ extern Bool fade_p, unfade_p; extern int fade_seconds, fade_ticks; extern Bool install_cmap_p; extern Bool locking_disabled_p; +extern char *nolock_reason; extern Bool demo_mode_p; extern Bool dbox_up_p; extern int next_mode_p; @@ -411,6 +418,7 @@ get_resources () #ifdef NO_LOCKING locking_disabled_p = True; + nolock_reason = "not compiled with locking support"; if (lock_p) { lock_p = False; @@ -420,8 +428,8 @@ get_resources () #else /* ! NO_LOCKING */ if (lock_p && locking_disabled_p) { - fprintf (stderr, "%s: %slocking is disabled.\n", progname, - (verbose_p ? "## " : "")); + fprintf (stderr, "%s: %slocking is disabled (%s).\n", progname, + (verbose_p ? "## " : ""), nolock_reason); lock_p = False; } #endif /* ! NO_LOCKING */ @@ -531,10 +539,14 @@ initialize (argc, argv) #ifdef NO_LOCKING locking_disabled_p = True; + nolock_reason = "not compiled with locking support"; #else locking_disabled_p = False; if (! lock_init ()) /* before hack_uid() for proper permissions */ - locking_disabled_p = True; + { + locking_disabled_p = True; + nolock_reason = "error getting password"; + } #endif hack_uid (); diff --git a/driver/xscreensaver.h b/driver/xscreensaver.h index 7bdc7762..b6ba56a9 100644 --- a/driver/xscreensaver.h +++ b/driver/xscreensaver.h @@ -18,6 +18,9 @@ # define P(x)x #else # define P(x)() +# ifndef const +# define const /**/ +# endif #endif #ifdef NO_MOTIF diff --git a/driver/xscreensaver.man b/driver/xscreensaver.man index a524d02e..770701ec 100644 --- a/driver/xscreensaver.man +++ b/driver/xscreensaver.man @@ -440,3 +440,6 @@ Jamie Zawinski , 13-aug-92. Please let me know if you find any bugs or make any improvements. Thanks to David Wojtowicz for implementing \fIlockTimeout\fP. + +Thanks to Martin Kraemer for adding support for shadow passwords and +locking-disabled diagnostics. diff --git a/hacks/.gdbinit b/hacks/.gdbinit deleted file mode 100644 index 0bd01420..00000000 --- a/hacks/.gdbinit +++ /dev/null @@ -1,3 +0,0 @@ -b exit -b abort -set args -geom =700x700+0+0 diff --git a/hacks/Imakefile b/hacks/Imakefile index daf08f38..5e42776d 100644 --- a/hacks/Imakefile +++ b/hacks/Imakefile @@ -7,17 +7,26 @@ #include "../config.h" +#ifdef HAVE_XPM +# define XPMDEFS -DHAVE_XPM +# define XPMLIB -lXpm -L/usr/ucblib -lucb +#else +# define XPMDEFS +# define XPMLIB +#endif + UTILS = ../utils INCLUDES = -I$(UTILS) - DEFINES = R5ISMS -EXTRA_LIBRARIES = $(XMULIB) $(XTOOLLIB) $(EXTENSIONLIB) $(XLIB) -lm + DEFINES = R5ISMS XPMDEFS +EXTRA_LIBRARIES = $(XMULIB) $(XTOOLLIB) XPMLIB $(EXTENSIONLIB) $(XLIB) -lm -lnsl 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 maze.c hypercube.c halo.c + imsmap.c slidescreen.c decayscreen.c maze.c hypercube.c \ + halo.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 \ - maze.man hypercube.man halo.man + decayscreen.man maze.man hypercube.man halo.man TARFILES = README Imakefile screenhack.c $(HACKS) screenhack.h \ vroot.h xlock.h $(MEN) .gdbinit noses/\* @@ -50,7 +59,8 @@ ScreenhackTarget (rocks, rocks, $(HOBJS)) ScreenhackTarget (noseguy, noseguy, $(HOBJS)) ScreenhackTarget (blitspin, blitspin, $(HOBJS)) ScreenhackTarget (greynetic, greynetic, $(HOBJS)) -ScreenhackTarget (slidescreen, slidescreen, $(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)) diff --git a/hacks/Makefile b/hacks/Makefile new file mode 100644 index 00000000..864e1d6d --- /dev/null +++ b/hacks/Makefile @@ -0,0 +1,728 @@ +# Makefile generated by imake - do not edit! +# $XConsortium: imake.c,v 1.65 91/07/25 17:50:17 rws Exp $ +# +# The cpp used on this machine replaces all newlines and multiple tabs and +# spaces in a macro expansion with a single space. Imake tries to compensate +# for this, but is not always successful. +# + +# ------------------------------------------------------------------------- +# Makefile generated from "Imake.tmpl" and +# $XConsortium: Imake.tmpl,v 1.139 91/09/16 08:52:48 rws Exp $ +# +# Platform-specific parameters may be set in the appropriate .cf +# configuration files. Site-specific parameters should be set in the file +# site.def. Full rebuilds are recommended if any parameters are changed. +# +# If your C preprocessor does not define any unique symbols, you will need +# to set BOOTSTRAPCFLAGS when rebuilding imake (usually when doing +# "make World" the first time). +# + +# ------------------------------------------------------------------------- +# site-specific configuration parameters that need to come before +# the platform-specific parameters - edit site.def to change + +# site: $XConsortium: site.def,v 1.2 91/07/30 20:26:44 rws Exp $ + + ALLINCLUDES = $(STD_INCLUDES) $(INCLUDES) $(EXTRA_INCLUDES) $(TOP_INCLUDES) + +# ------------------------------------------------------------------------- +# platform-specific configuration parameters - edit usl.cf to change + +MEMUTILDEF = +MEMUTILLIB = +INC = $(TOOLS)/usr/include + + YFLAGS = + STRIP = $(PFX)strip + AWK = /usr/bin/awk + CD = cd + LS = /bin/ls + PR = /bin/pr + CHMOD = $(CH)chmod + CHOWN = $(CH)chown + CHGRP = $(CH)chgrp + SED = /bin/sed + MCS = $(PFX)mcs -d + + PROTO_DEFINES = +LOCAL_LIBRARIES = $(XLIB) + SYS_LIBRARIES = + + USE_INSTALLED = + SYS_TO_BUILD = + ARCHIVE_ONLY = + + USE_INSTALLED = -DUseInstalled + +BUILD_DEFINES = $(SYS_TO_BUILD) $(USE_INSTALLED) $(ARCHIVE_ONLY) + +# :: end of BUILD_DEFINES set-up + + UNIX_REL = -DSVR4 + +MAKEDEFINES = $(STD_DEFINES) $(BUILD_DEFINES) $(UNIX_REL) $(CCS_USED) + +# until we use R5 server, use R4 font structures + +# operating system: OSName + +INSTALLFLAGS = -m 0644 + +# $XConsortium: sv4Lib.rules,v 1.8 91/07/19 15:38:53 rws Exp $ + + FURCCOPTIONS = -Xa -W2,-A -Wa,-r + FUR = $(PFX)fur + +INCLUDE_EXTENSION = $(INCDIR)/extensions + + TOP_INCLUDES = + +# ------------------------------------------------------------------------- +# site-specific configuration parameters that go after +# the platform-specific parameters - edit site.def to change + +# site: $XConsortium: site.def,v 1.2 91/07/30 20:26:44 rws Exp $ + +# +# ProjectRoot is where you want to install the binaries, libs, fonts etc +# + + PROJECTROOT = $(ROOT)/$(MACH)/usr/X + XWINHOME = /usr/X + XWINLIBDIR = $(XWINHOME)/lib + XWINBINDIR = $(XWINHOME)/bin + + USLCLIENTSRC = $(TOP)/uslclients + DESKTOPDIR = $(PROJECTROOT)/desktop + DTADMDIR = $(PROJECTROOT)/adm + XDEFAULTS = $(PROJECTROOT)/defaults + + FONTINCSRC = $(FONTSRC)/include + FONTLIBINCSRC = $(FONTSRC)/lib/include + FOLIOLIBSRC = $(FONTSRC)/lib/folio + FONTLIBSRC = $(FONTSRC)/lib/font + BITMAPFONTSRC = $(FONTSRC)/lib/bitmap + FONTSLIBSRC = $(FONTSRC)/lib/ + XOLSRC = $(LIBSRC)/Xol + XOLLIBSRC = $(LIBSRC)/Xol +BITMAPLIBS_TO_BUILD = libbitmap.a libbitmap.so +FONTLIBS_TO_BUILD = libfont.a libfont.so + + USL_DEFINES = -DLIBDIR=\"$(XWINLIBDIR)\" -DDESTDIR=\"$(XWINHOME)\" + + DEFINES = $(USL_DEFINES) + + SHELL = /bin/sh + + TOP = . + CURRENT_DIR = ./hacks + + AR = $(PFX)ar rv + BOOTSTRAPCFLAGS = -Dusl + CC = $(PFX)cc + AS = $(PFX)as + + COMPRESS = compress + CPP = $(TOOLS)/usr/ccs/lib/$(PFX)cpp $(STD_CPP_DEFINES) + PREPROCESSCMD = $(PFX)cc -E $(STD_CPP_DEFINES) + INSTALL = /usr/ucb/install + LD = $(PFX)ld + LINT = $(PFX)lint + LINTLIBFLAG = -o + LINTOPTS = -ax + LN = /bin/ln -s + MAKE = $(PFX)make + MV = /bin/mv + CP = /bin/cp + HCC = /bin/cc + SED = /bin/sed + + RM = /bin/rm -f + TROFF = psroff + MSMACROS = -ms + TBL = tbl + EQN = eqn + STD_INCLUDES = -I. + STD_CPP_DEFINES = -DUSL -DSVR4 -DSYSV -DI18N $(MEMUTILDEF) + STD_DEFINES = -DUSL -DSVR4 -DSYSV -DI18N $(MEMUTILDEF) + EXTRA_LOAD_FLAGS = + EXTRA_LIBRARIES = -lnsl -ldl $(MEMUTILLIB) + TAGS = ctags + + SHAREDCODEDEF = + SHLIBDEF = + + PROTO_DEFINES = -DFUNCPROTO=15 -DNARROWPROTO + + INSTPGMFLAGS = -s + + INSTBINFLAGS = -m 0755 + INSTUIDFLAGS = -m 4755 + INSTLIBFLAGS = -m 0644 + INSTINCFLAGS = -m 0444 + INSTMANFLAGS = -m 0444 + INSTDATFLAGS = -m 0444 + INSTKMEMFLAGS = -m 4755 + + PROJECTROOT = $(ROOT)/$(MACH)/usr/X + + CDEBUGFLAGS = + CCOPTIONS = -Xa -W2,-A + + ALLINCLUDES = $(INCLUDES) $(EXTRA_INCLUDES) $(TOP_INCLUDES) $(STD_INCLUDES) + ALLDEFINES = $(ALLINCLUDES) $(STD_DEFINES) $(EXTRA_DEFINES) $(PROTO_DEFINES) $(DEFINES) + CFLAGS = $(CDEBUGFLAGS) $(CCOPTIONS) $(ALLDEFINES) + LINTFLAGS = $(LINTOPTS) -DLINT $(ALLDEFINES) + + LDLIBS = $(SYS_LIBRARIES) $(EXTRA_LIBRARIES) + + LDOPTIONS = $(CDEBUGFLAGS) $(CCOPTIONS) $(LOCAL_LDFLAGS) -T 0x8300000 -L$(USRLIBDIR) + + LDCOMBINEFLAGS = -r + DEPENDFLAGS = + + MACROFILE = usl.cf + RM_CMD = $(RM) *.CKP *.ln *.BAK *.bak *.o core errs ,* *~ *.a .emacs_* tags TAGS make.log MakeOut + + IMAKE_DEFINES = + + IRULESRC = $(CONFIGDIR) + IMAKE_CMD = $(IMAKE) -DUseInstalled -I$(IRULESRC) $(IMAKE_DEFINES) + + ICONFIGFILES = $(IRULESRC)/Imake.tmpl $(IRULESRC)/Imake.rules \ + $(IRULESRC)/Project.tmpl $(IRULESRC)/site.def \ + $(IRULESRC)/$(MACROFILE) $(EXTRA_ICONFIGFILES) + +# ------------------------------------------------------------------------- +# X Window System Build Parameters +# $XConsortium: Project.tmpl,v 1.142 92/01/25 16:44:02 rws Exp $ + +# ------------------------------------------------------------------------- +# X Window System make variables; this need to be coordinated with rules + + PATHSEP = / + USRLIBDIR = $(ROOT)/$(MACH)/usr/X/lib + BINDIR = $(ROOT)/$(MACH)/usr/X/bin + INCROOT = $(ROOT)/$(MACH)/usr/X/include + BUILDINCROOT = $(TOP) + BUILDINCDIR = $(BUILDINCROOT)/X11 + BUILDINCTOP = .. + INCDIR = $(INCROOT)/X11 + ADMDIR = /usr/adm + LIBDIR = $(USRLIBDIR) + CONFIGDIR = $(LIBDIR)/config + LINTLIBDIR = $(USRLIBDIR)/lint + + FONTDIR = $(LIBDIR)/fonts + XINITDIR = $(LIBDIR)/xinit + XDMDIR = $(LIBDIR)/xdm + TWMDIR = $(LIBDIR)/twm + MANPATH = $(ROOT)/$(MACH)/usr/X/man + MANSOURCEPATH = $(MANPATH)/man + MANSUFFIX = n + LIBMANSUFFIX = 3 + MANDIR = $(MANSOURCEPATH)$(MANSUFFIX) + LIBMANDIR = $(MANSOURCEPATH)$(LIBMANSUFFIX) + NLSDIR = $(LIBDIR)/nls + PEXAPIDIR = $(LIBDIR)/PEX + XAPPLOADDIR = $(LIBDIR)/app-defaults + FONTCFLAGS = -L -l -t + + INSTAPPFLAGS = $(INSTDATFLAGS) + + IMAKE = imake + DEPEND = makedepend + RGB = rgb + + FONTC = bdftosnf + + MKFONTDIR = mkfontdir + MKDIRHIER = /bin/sh $(BINDIR)/mkdirhier + + CONFIGSRC = $(TOP)/config + DOCUTILSRC = $(TOP)/doc/util + CLIENTSRC = $(TOP)/clients + DEMOSRC = $(TOP)/demos + LIBSRC = $(TOP)/lib + FONTSRC = $(TOP)/fonts + INCLUDESRC = $(TOP)/X11 + SERVERSRC = $(TOP)/server + UTILSRC = $(TOP)/util + SCRIPTSRC = $(UTILSRC)/scripts + EXAMPLESRC = $(TOP)/examples + CONTRIBSRC = $(TOP)/../contrib + DOCSRC = $(TOP)/doc + RGBSRC = $(TOP)/rgb + DEPENDSRC = $(UTILSRC)/makedepend + IMAKESRC = $(CONFIGSRC) + XAUTHSRC = /usr/X/lib + XLIBSRC = /usr/X/lib + XMUSRC = /usr/X/lib + TOOLKITSRC = /usr/X/lib + AWIDGETSRC = /usr/X/lib + OLDXLIBSRC = /usr/X/lib + XDMCPLIBSRC = /usr/X/lib + + BDFTOSNFSRC = $(FONTSRC)/clients/bdftosnf + + MKFONTDIRSRC = $(FONTSRC)/clients/mkfontdir + FSLIBSRC = $(FONTSRC)/lib/fs + FONTSERVERSRC = $(FONTSRC)/server + EXTENSIONSRC = $(TOP)/extensions + XILIBSRC = $(EXTENSIONSRC)/lib/xinput + XTESTLIBSRC = $(EXTENSIONSRC)/lib/xtest + PHIGSLIBSRC = $(EXTENSIONSRC)/lib/PEX + +# $XConsortium: sv4Lib.tmpl,v 1.6 92/01/25 16:46:55 rws Exp $ + +# +# USL: BEGIN +# The default revision numbers from MIT is 5. But since USL has to be +# backward compatible, so force it to 1 +# + + SOXOLREV = 1 + SOOLITREV = 1 + SOOLITMREV = 1 + SOOLITOREV = 1 + SODTREV = 1 + +# USL: END + +SHLIBLDFLAGS = -G -z text +PICFLAGS = -K PIC + + DEPEXTENSIONLIB = + EXTENSIONLIB = -lXext + + DEPXLIB = $(DEPEXTENSIONLIB) + XLIB = $(EXTENSIONLIB) -lX11 + + DEPXMULIB = $(USRLIBDIR)/libXmu.so.$(SOXMUREV) + + XMULIB = -lXmu + + DEPOLDXLIB = + OLDXLIB = -loldX + + DEPXTOOLLIB = + XTOOLLIB = -lXt + + DEPXOLLIB = $(USRLIBDIR)/libOlit.so.$(SOXOLREV) + XOLLIB = -lOlit + + DEPXAWLIB = + XAWLIB = -lXaw + + DEPXILIB = + XILIB = -lXi + + DEPXTESTLIB = + XTESTLIB = -lXtst + +# +# USL: BEGIN +# + +XHOSTLOC = $(DESTDIR)/$(LIBDIR) +SHLIBFLAGS = -L $(ROOT)/$(MACH)/usr/lib -L $(ROOT)/$(MACH)/lib -L $(XHOSTLOC) + +# +# USL: END +# + + SOXLIBREV = 1 + SOXTREV = 1 + SOXAWREV = 1 + SOOLDXREV = 1 + SOXMUREV = 1 + SOXEXTREV = 1 + SOXINPUTREV = 1 + SOXTESTREV = 1 + SOXTRAPREV = 1 + + DEPXAUTHLIB = $(USRLIBDIR)/libXau.a + XAUTHLIB = -lXau + DEPXDMCPLIB = $(USRLIBDIR)/libXdmcp.a + XDMCPLIB = -lXdmcp + + DEPPHIGSLIB = $(USRLIBDIR)/libphigs.a + PHIGSLIB = -lphigs + + DEPXBSDLIB = $(USRLIBDIR)/libXbsd.a + XBSDLIB = -lXbsd + + LINTEXTENSIONLIB = $(LINTLIBDIR)/llib-lXext.ln + LINTXLIB = $(LINTLIBDIR)/llib-lX11.ln + LINTXMU = $(LINTLIBDIR)/llib-lXmu.ln + LINTXTOOL = $(LINTLIBDIR)/llib-lXt.ln + LINTXAW = $(LINTLIBDIR)/llib-lXaw.ln + LINTXI = $(LINTLIBDIR)/llib-lXi.ln + LINTPHIGS = $(LINTLIBDIR)/llib-lphigs.ln + + DEPLIBS = $(DEPXAWLIB) $(DEPXMULIB) $(DEPXTOOLLIB) $(DEPXLIB) + + DEPLIBS1 = $(DEPLIBS) + DEPLIBS2 = $(DEPLIBS) + DEPLIBS3 = $(DEPLIBS) + +# ------------------------------------------------------------------------- +# Imake rules for building libraries, programs, scripts, and data files +# rules: $XConsortium: Imake.rules,v 1.126 91/12/30 20:14:35 rws Exp $ + +# ------------------------------------------------------------------------- +# start of Imakefile + + MOTIFINCLUDES = -I/usr/X/include + MOTIFLDOPTIONS = -L/usr/X/lib + MOTIFLIBS = -lXm + +EXTRA_LIBRARIES= -lgen -L/usr/ucblib -lucb -lnsl + + UTILS = ../utils + INCLUDES = -I$(UTILS) + DEFINES = -DHAVE_XPM +EXTRA_LIBRARIES = $(XMULIB) $(XTOOLLIB) -lXpm -L/usr/ucblib -lucb $(EXTENSIONLIB) $(XLIB) -lm -lnsl + 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 + 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 + TARFILES = README Imakefile screenhack.c $(HACKS) screenhack.h \ + vroot.h xlock.h $(MEN) .gdbinit noses/\* + +all:: + +echo_tarfiles: + @echo $(TARFILES) + +HOBJS=screenhack.o $(UTILS)/resources.o $(UTILS)/usleep.o + +all:: qix +qix: $(HOBJS) $(UTILS)/hsv.o screenhack.h qix.o $(DEPLIBS) + $(RM) $@ + $(CC) -o $@ $(LDOPTIONS) $(HOBJS) $(UTILS)/hsv.o qix.o $(LDLIBS) $(EXTRA_LOAD_FLAGS) + +install:: qix + @if [ -d $(DESTDIR)$(BINDIR) ]; then set +x; \ + else (set -x; $(MKDIRHIER) $(DESTDIR)$(BINDIR)); fi + $(INSTALL) -c $(INSTPGMFLAGS) qix $(DESTDIR)$(BINDIR) + +install.man:: qix.man + @if [ -d $(DESTDIR)$(MANDIR) ]; then set +x; \ + else (set -x; $(MKDIRHIER) $(DESTDIR)$(MANDIR)); fi + $(INSTALL) -c $(INSTMANFLAGS) qix.man $(DESTDIR)$(MANDIR)/qix.$(MANSUFFIX) +clean:: + $(RM) qix + +all:: helix +helix: $(HOBJS) $(UTILS)/hsv.o screenhack.h helix.o $(DEPLIBS) + $(RM) $@ + $(CC) -o $@ $(LDOPTIONS) $(HOBJS) $(UTILS)/hsv.o helix.o $(LDLIBS) $(EXTRA_LOAD_FLAGS) + +install:: helix + @if [ -d $(DESTDIR)$(BINDIR) ]; then set +x; \ + else (set -x; $(MKDIRHIER) $(DESTDIR)$(BINDIR)); fi + $(INSTALL) -c $(INSTPGMFLAGS) helix $(DESTDIR)$(BINDIR) + +install.man:: helix.man + @if [ -d $(DESTDIR)$(MANDIR) ]; then set +x; \ + else (set -x; $(MKDIRHIER) $(DESTDIR)$(MANDIR)); fi + $(INSTALL) -c $(INSTMANFLAGS) helix.man $(DESTDIR)$(MANDIR)/helix.$(MANSUFFIX) +clean:: + $(RM) helix + +all:: pyro +pyro: $(HOBJS) $(UTILS)/hsv.o screenhack.h pyro.o $(DEPLIBS) + $(RM) $@ + $(CC) -o $@ $(LDOPTIONS) $(HOBJS) $(UTILS)/hsv.o pyro.o $(LDLIBS) $(EXTRA_LOAD_FLAGS) + +install:: pyro + @if [ -d $(DESTDIR)$(BINDIR) ]; then set +x; \ + else (set -x; $(MKDIRHIER) $(DESTDIR)$(BINDIR)); fi + $(INSTALL) -c $(INSTPGMFLAGS) pyro $(DESTDIR)$(BINDIR) + +install.man:: pyro.man + @if [ -d $(DESTDIR)$(MANDIR) ]; then set +x; \ + else (set -x; $(MKDIRHIER) $(DESTDIR)$(MANDIR)); fi + $(INSTALL) -c $(INSTMANFLAGS) pyro.man $(DESTDIR)$(MANDIR)/pyro.$(MANSUFFIX) +clean:: + $(RM) pyro + +all:: attraction +attraction: $(HOBJS) $(UTILS)/hsv.o $(UTILS)/spline.o screenhack.h attraction.o $(DEPLIBS) + $(RM) $@ + $(CC) -o $@ $(LDOPTIONS) $(HOBJS) $(UTILS)/hsv.o $(UTILS)/spline.o attraction.o $(LDLIBS) $(EXTRA_LOAD_FLAGS) + +install:: attraction + @if [ -d $(DESTDIR)$(BINDIR) ]; then set +x; \ + else (set -x; $(MKDIRHIER) $(DESTDIR)$(BINDIR)); fi + $(INSTALL) -c $(INSTPGMFLAGS) attraction $(DESTDIR)$(BINDIR) + +install.man:: attraction.man + @if [ -d $(DESTDIR)$(MANDIR) ]; then set +x; \ + else (set -x; $(MKDIRHIER) $(DESTDIR)$(MANDIR)); fi + $(INSTALL) -c $(INSTMANFLAGS) attraction.man $(DESTDIR)$(MANDIR)/attraction.$(MANSUFFIX) +clean:: + $(RM) attraction + +all:: rorschach +rorschach: $(HOBJS) $(UTILS)/hsv.o screenhack.h rorschach.o $(DEPLIBS) + $(RM) $@ + $(CC) -o $@ $(LDOPTIONS) $(HOBJS) $(UTILS)/hsv.o rorschach.o $(LDLIBS) $(EXTRA_LOAD_FLAGS) + +install:: rorschach + @if [ -d $(DESTDIR)$(BINDIR) ]; then set +x; \ + else (set -x; $(MKDIRHIER) $(DESTDIR)$(BINDIR)); fi + $(INSTALL) -c $(INSTPGMFLAGS) rorschach $(DESTDIR)$(BINDIR) + +install.man:: rorschach.man + @if [ -d $(DESTDIR)$(MANDIR) ]; then set +x; \ + else (set -x; $(MKDIRHIER) $(DESTDIR)$(MANDIR)); fi + $(INSTALL) -c $(INSTMANFLAGS) rorschach.man $(DESTDIR)$(MANDIR)/rorschach.$(MANSUFFIX) +clean:: + $(RM) rorschach + +all:: hopalong +hopalong: $(HOBJS) $(UTILS)/hsv.o screenhack.h hopalong.o $(DEPLIBS) + $(RM) $@ + $(CC) -o $@ $(LDOPTIONS) $(HOBJS) $(UTILS)/hsv.o hopalong.o $(LDLIBS) $(EXTRA_LOAD_FLAGS) + +install:: hopalong + @if [ -d $(DESTDIR)$(BINDIR) ]; then set +x; \ + else (set -x; $(MKDIRHIER) $(DESTDIR)$(BINDIR)); fi + $(INSTALL) -c $(INSTPGMFLAGS) hopalong $(DESTDIR)$(BINDIR) + +install.man:: hopalong.man + @if [ -d $(DESTDIR)$(MANDIR) ]; then set +x; \ + else (set -x; $(MKDIRHIER) $(DESTDIR)$(MANDIR)); fi + $(INSTALL) -c $(INSTMANFLAGS) hopalong.man $(DESTDIR)$(MANDIR)/hopalong.$(MANSUFFIX) +clean:: + $(RM) hopalong + +all:: xroger +xroger: $(HOBJS) $(UTILS)/hsv.o $(UTILS)/xroger.o screenhack.h xroger-hack.o $(DEPLIBS) + $(RM) $@ + $(CC) -o $@ $(LDOPTIONS) $(HOBJS) $(UTILS)/hsv.o $(UTILS)/xroger.o xroger-hack.o $(LDLIBS) $(EXTRA_LOAD_FLAGS) + +install:: xroger + @if [ -d $(DESTDIR)$(BINDIR) ]; then set +x; \ + else (set -x; $(MKDIRHIER) $(DESTDIR)$(BINDIR)); fi + $(INSTALL) -c $(INSTPGMFLAGS) xroger $(DESTDIR)$(BINDIR) + +install.man:: xroger.man + @if [ -d $(DESTDIR)$(MANDIR) ]; then set +x; \ + else (set -x; $(MKDIRHIER) $(DESTDIR)$(MANDIR)); fi + $(INSTALL) -c $(INSTMANFLAGS) xroger.man $(DESTDIR)$(MANDIR)/xroger.$(MANSUFFIX) +clean:: + $(RM) xroger + +all:: rocks +rocks: $(HOBJS) screenhack.h rocks.o $(DEPLIBS) + $(RM) $@ + $(CC) -o $@ $(LDOPTIONS) $(HOBJS) rocks.o $(LDLIBS) $(EXTRA_LOAD_FLAGS) + +install:: rocks + @if [ -d $(DESTDIR)$(BINDIR) ]; then set +x; \ + else (set -x; $(MKDIRHIER) $(DESTDIR)$(BINDIR)); fi + $(INSTALL) -c $(INSTPGMFLAGS) rocks $(DESTDIR)$(BINDIR) + +install.man:: rocks.man + @if [ -d $(DESTDIR)$(MANDIR) ]; then set +x; \ + else (set -x; $(MKDIRHIER) $(DESTDIR)$(MANDIR)); fi + $(INSTALL) -c $(INSTMANFLAGS) rocks.man $(DESTDIR)$(MANDIR)/rocks.$(MANSUFFIX) +clean:: + $(RM) rocks + +all:: noseguy +noseguy: $(HOBJS) screenhack.h noseguy.o $(DEPLIBS) + $(RM) $@ + $(CC) -o $@ $(LDOPTIONS) $(HOBJS) noseguy.o $(LDLIBS) $(EXTRA_LOAD_FLAGS) + +install:: noseguy + @if [ -d $(DESTDIR)$(BINDIR) ]; then set +x; \ + else (set -x; $(MKDIRHIER) $(DESTDIR)$(BINDIR)); fi + $(INSTALL) -c $(INSTPGMFLAGS) noseguy $(DESTDIR)$(BINDIR) + +install.man:: noseguy.man + @if [ -d $(DESTDIR)$(MANDIR) ]; then set +x; \ + else (set -x; $(MKDIRHIER) $(DESTDIR)$(MANDIR)); fi + $(INSTALL) -c $(INSTMANFLAGS) noseguy.man $(DESTDIR)$(MANDIR)/noseguy.$(MANSUFFIX) +clean:: + $(RM) noseguy + +all:: blitspin +blitspin: $(HOBJS) screenhack.h blitspin.o $(DEPLIBS) + $(RM) $@ + $(CC) -o $@ $(LDOPTIONS) $(HOBJS) blitspin.o $(LDLIBS) $(EXTRA_LOAD_FLAGS) + +install:: blitspin + @if [ -d $(DESTDIR)$(BINDIR) ]; then set +x; \ + else (set -x; $(MKDIRHIER) $(DESTDIR)$(BINDIR)); fi + $(INSTALL) -c $(INSTPGMFLAGS) blitspin $(DESTDIR)$(BINDIR) + +install.man:: blitspin.man + @if [ -d $(DESTDIR)$(MANDIR) ]; then set +x; \ + else (set -x; $(MKDIRHIER) $(DESTDIR)$(MANDIR)); fi + $(INSTALL) -c $(INSTMANFLAGS) blitspin.man $(DESTDIR)$(MANDIR)/blitspin.$(MANSUFFIX) +clean:: + $(RM) blitspin + +all:: greynetic +greynetic: $(HOBJS) screenhack.h greynetic.o $(DEPLIBS) + $(RM) $@ + $(CC) -o $@ $(LDOPTIONS) $(HOBJS) greynetic.o $(LDLIBS) $(EXTRA_LOAD_FLAGS) + +install:: greynetic + @if [ -d $(DESTDIR)$(BINDIR) ]; then set +x; \ + else (set -x; $(MKDIRHIER) $(DESTDIR)$(BINDIR)); fi + $(INSTALL) -c $(INSTPGMFLAGS) greynetic $(DESTDIR)$(BINDIR) + +install.man:: greynetic.man + @if [ -d $(DESTDIR)$(MANDIR) ]; then set +x; \ + else (set -x; $(MKDIRHIER) $(DESTDIR)$(MANDIR)); fi + $(INSTALL) -c $(INSTMANFLAGS) greynetic.man $(DESTDIR)$(MANDIR)/greynetic.$(MANSUFFIX) +clean:: + $(RM) greynetic + +all:: slidescreen +slidescreen: $(HOBJS) $(UTILS)/grabscreen.o screenhack.h slidescreen.o $(DEPLIBS) + $(RM) $@ + $(CC) -o $@ $(LDOPTIONS) $(HOBJS) $(UTILS)/grabscreen.o slidescreen.o $(LDLIBS) $(EXTRA_LOAD_FLAGS) + +install:: slidescreen + @if [ -d $(DESTDIR)$(BINDIR) ]; then set +x; \ + else (set -x; $(MKDIRHIER) $(DESTDIR)$(BINDIR)); fi + $(INSTALL) -c $(INSTPGMFLAGS) slidescreen $(DESTDIR)$(BINDIR) + +install.man:: slidescreen.man + @if [ -d $(DESTDIR)$(MANDIR) ]; then set +x; \ + else (set -x; $(MKDIRHIER) $(DESTDIR)$(MANDIR)); fi + $(INSTALL) -c $(INSTMANFLAGS) slidescreen.man $(DESTDIR)$(MANDIR)/slidescreen.$(MANSUFFIX) +clean:: + $(RM) slidescreen + +all:: decayscreen +decayscreen: $(HOBJS) $(UTILS)/grabscreen.o screenhack.h decayscreen.o $(DEPLIBS) + $(RM) $@ + $(CC) -o $@ $(LDOPTIONS) $(HOBJS) $(UTILS)/grabscreen.o decayscreen.o $(LDLIBS) $(EXTRA_LOAD_FLAGS) + +install:: decayscreen + @if [ -d $(DESTDIR)$(BINDIR) ]; then set +x; \ + else (set -x; $(MKDIRHIER) $(DESTDIR)$(BINDIR)); fi + $(INSTALL) -c $(INSTPGMFLAGS) decayscreen $(DESTDIR)$(BINDIR) + +install.man:: decayscreen.man + @if [ -d $(DESTDIR)$(MANDIR) ]; then set +x; \ + else (set -x; $(MKDIRHIER) $(DESTDIR)$(MANDIR)); fi + $(INSTALL) -c $(INSTMANFLAGS) decayscreen.man $(DESTDIR)$(MANDIR)/decayscreen.$(MANSUFFIX) +clean:: + $(RM) decayscreen + +all:: imsmap +imsmap: $(HOBJS) $(UTILS)/hsv.o screenhack.h imsmap.o $(DEPLIBS) + $(RM) $@ + $(CC) -o $@ $(LDOPTIONS) $(HOBJS) $(UTILS)/hsv.o imsmap.o $(LDLIBS) $(EXTRA_LOAD_FLAGS) + +install:: imsmap + @if [ -d $(DESTDIR)$(BINDIR) ]; then set +x; \ + else (set -x; $(MKDIRHIER) $(DESTDIR)$(BINDIR)); fi + $(INSTALL) -c $(INSTPGMFLAGS) imsmap $(DESTDIR)$(BINDIR) + +install.man:: imsmap.man + @if [ -d $(DESTDIR)$(MANDIR) ]; then set +x; \ + else (set -x; $(MKDIRHIER) $(DESTDIR)$(MANDIR)); fi + $(INSTALL) -c $(INSTMANFLAGS) imsmap.man $(DESTDIR)$(MANDIR)/imsmap.$(MANSUFFIX) +clean:: + $(RM) imsmap + +all:: maze +maze: $(HOBJS) $(UTILS)/xroger.o screenhack.h maze.o $(DEPLIBS) + $(RM) $@ + $(CC) -o $@ $(LDOPTIONS) $(HOBJS) $(UTILS)/xroger.o maze.o $(LDLIBS) $(EXTRA_LOAD_FLAGS) + +install:: maze + @if [ -d $(DESTDIR)$(BINDIR) ]; then set +x; \ + else (set -x; $(MKDIRHIER) $(DESTDIR)$(BINDIR)); fi + $(INSTALL) -c $(INSTPGMFLAGS) maze $(DESTDIR)$(BINDIR) + +install.man:: maze.man + @if [ -d $(DESTDIR)$(MANDIR) ]; then set +x; \ + else (set -x; $(MKDIRHIER) $(DESTDIR)$(MANDIR)); fi + $(INSTALL) -c $(INSTMANFLAGS) maze.man $(DESTDIR)$(MANDIR)/maze.$(MANSUFFIX) +clean:: + $(RM) maze + +all:: hypercube +hypercube: $(HOBJS) screenhack.h hypercube.o $(DEPLIBS) + $(RM) $@ + $(CC) -o $@ $(LDOPTIONS) $(HOBJS) hypercube.o $(LDLIBS) $(EXTRA_LOAD_FLAGS) + +install:: hypercube + @if [ -d $(DESTDIR)$(BINDIR) ]; then set +x; \ + else (set -x; $(MKDIRHIER) $(DESTDIR)$(BINDIR)); fi + $(INSTALL) -c $(INSTPGMFLAGS) hypercube $(DESTDIR)$(BINDIR) + +install.man:: hypercube.man + @if [ -d $(DESTDIR)$(MANDIR) ]; then set +x; \ + else (set -x; $(MKDIRHIER) $(DESTDIR)$(MANDIR)); fi + $(INSTALL) -c $(INSTMANFLAGS) hypercube.man $(DESTDIR)$(MANDIR)/hypercube.$(MANSUFFIX) +clean:: + $(RM) hypercube + +all:: halo +halo: $(HOBJS) $(UTILS)/hsv.o screenhack.h halo.o $(DEPLIBS) + $(RM) $@ + $(CC) -o $@ $(LDOPTIONS) $(HOBJS) $(UTILS)/hsv.o halo.o $(LDLIBS) $(EXTRA_LOAD_FLAGS) + +install:: halo + @if [ -d $(DESTDIR)$(BINDIR) ]; then set +x; \ + else (set -x; $(MKDIRHIER) $(DESTDIR)$(BINDIR)); fi + $(INSTALL) -c $(INSTPGMFLAGS) halo $(DESTDIR)$(BINDIR) + +install.man:: halo.man + @if [ -d $(DESTDIR)$(MANDIR) ]; then set +x; \ + else (set -x; $(MKDIRHIER) $(DESTDIR)$(MANDIR)); fi + $(INSTALL) -c $(INSTMANFLAGS) halo.man $(DESTDIR)$(MANDIR)/halo.$(MANSUFFIX) +clean:: + $(RM) halo + +# ------------------------------------------------------------------------- +# common rules for all Makefiles - do not edit + +emptyrule:: + +clean:: + $(RM_CMD) "#"* + +Makefile:: + -@if [ -f Makefile ]; then set -x; \ + $(RM) Makefile.bak; $(MV) Makefile Makefile.bak; \ + else exit 0; fi + $(IMAKE_CMD) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT_DIR) + +tags:: + $(TAGS) -w *.[ch] + $(TAGS) -xw *.[ch] > TAGS + +# ------------------------------------------------------------------------- +# empty rules for directories that do not have SUBDIRS - do not edit + +install:: + @echo "install in $(CURRENT_DIR) done" + +install.man:: + @echo "install.man in $(CURRENT_DIR) done" + +Makefiles:: + +includes:: + +# ------------------------------------------------------------------------- +# dependencies generated by makedepend + diff --git a/hacks/blitspin.c b/hacks/blitspin.c index a532e296..5f742ccd 100644 --- a/hacks/blitspin.c +++ b/hacks/blitspin.c @@ -16,17 +16,27 @@ The input bitmap may be non-square, it is padded and centered with the background color. Another way would be to subdivide - the bitmap into square components and rotate them independently, - but I don't think that would be as interesting looking. + the bitmap into square components and rotate them independently + (and preferably in parallel), but I don't think that would be as + interesting looking. It's too bad almost nothing uses blitter hardware these days, or this might actually win. */ #include "screenhack.h" -#include #include +#ifdef HAVE_XPM +# include +# ifndef PIXEL_ALREADY_TYPEDEFED +# define PIXEL_ALREADY_TYPEDEFED /* Sigh, Xmu/Drawing.h needs this... */ +# endif +#endif + +#include + + static Display *dpy; static Window window; static unsigned int size; @@ -35,6 +45,7 @@ static GC SET, CLR, CPY, IOR, AND, XOR; static GC gc; static int delay, delay2; static Pixmap bitmap; +static int depth; static void rotate(), init (), display (); @@ -84,8 +95,14 @@ init () unsigned int real_size; char *bitmap_name; int i; +#ifdef HAVE_XPM + XpmAttributes xpmattrs; + int result; +#endif + XGetWindowAttributes (dpy, window, &xgwa); cmap = xgwa.colormap; + depth = xgwa.depth; delay = get_integer_resource ("delay", "Integer"); delay2 = get_integer_resource ("delay2", "Integer"); @@ -97,7 +114,37 @@ init () fprintf (stderr, "%s: no bitmap specified\n", progname); exit (1); } - bitmap = XmuLocateBitmapFile (DefaultScreenOfDisplay (dpy), bitmap_name, +#ifdef HAVE_XPM + xpmattrs.valuemask = 0; + bitmap = 0; + result = XpmReadFileToPixmap (dpy,window, bitmap_name, &bitmap, 0, &xpmattrs); + switch (result) + { + case XpmColorError: + fprintf (stderr, "%s: warning: xpm color substitution performed\n", + progname); + /* fall through */ + case XpmSuccess: + width = xpmattrs.width; + height = xpmattrs.height; + break; + case XpmFileInvalid: + case XpmOpenFailed: + bitmap = 0; + break; + case XpmColorFailed: + fprintf (stderr, "%s: xpm: color allocation failed\n", progname); + exit (-1); + case XpmNoMemory: + fprintf (stderr, "%s: xpm: out of memory\n", progname); + exit (-1); + default: + fprintf (stderr, "%s: xpm: unknown error code %d\n", progname, result); + exit (-1); + } + if (! bitmap) +#endif + bitmap = XmuLocateBitmapFile (DefaultScreenOfDisplay (dpy), bitmap_name, 0, 0, &width, &height, &xh, &yh); if (! bitmap) { @@ -113,10 +160,10 @@ init () if (size & (1<>i)<<(i+1); - self = XCreatePixmap (dpy, window, size, size, 1); - temp = XCreatePixmap (dpy, window, size, size, 1); - mask = XCreatePixmap (dpy, window, size, size, 1); - gcv.foreground = 1; + self = XCreatePixmap (dpy, window, size, size, depth); + temp = XCreatePixmap (dpy, window, size, size, depth); + mask = XCreatePixmap (dpy, window, size, size, depth); + gcv.foreground = (depth == 1 ? 1 : (~0)); gcv.function=GXset; SET = XCreateGC(dpy,self,GCFunction|GCForeground,&gcv); gcv.function=GXclear;CLR = XCreateGC(dpy,self,GCFunction|GCForeground,&gcv); gcv.function=GXcopy; CPY = XCreateGC(dpy,self,GCFunction|GCForeground,&gcv); @@ -146,8 +193,14 @@ display (pixmap) last_w = xgwa.width; last_h = xgwa.height; } - XCopyPlane (dpy, pixmap, window, gc, 0, 0, size, size, - (xgwa.width-size)>>1, (xgwa.height-size)>>1, 1); +#ifdef HAVE_XPM + if (depth != 1) + XCopyArea (dpy, pixmap, window, gc, 0, 0, size, size, + (xgwa.width-size)>>1, (xgwa.height-size)>>1); + else +#endif + XCopyPlane (dpy, pixmap, window, gc, 0, 0, size, size, + (xgwa.width-size)>>1, (xgwa.height-size)>>1, 1); /* XDrawRectangle (dpy, window, gc, ((xgwa.width-size)>>1)-1, ((xgwa.height-size)>>1)-1, diff --git a/hacks/decayscreen.c b/hacks/decayscreen.c new file mode 100644 index 00000000..704f67db --- /dev/null +++ b/hacks/decayscreen.c @@ -0,0 +1,175 @@ +/* xscreensaver, Copyright (c) 1992 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. + */ + +/* decayscreen + * + * Based on slidescreen program from the xscreensaver application and the + * decay program for Sun framebuffers. This is the comment from the decay.c + * file: + + * decay.c + * find the screen bitmap for the console and make it "decay" by + * randomly shifting random rectangles by one pixelwidth at a time. + * + * by David Wald, 1988 + * rewritten by Natuerlich! + * based on a similar "utility" on the Apollo ring at Yale. + + * X version by + * + * Vivek Khera + * 5-AUG-1993 + */ + +#include "screenhack.h" + +static int sizex, sizey; +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; + Window window; +{ + XGCValues gcv; + XWindowAttributes xgwa; + int root_p; + Pixmap pixmap; + + delay = get_integer_resource ("delay", "Integer"); + root_p = get_boolean_resource ("root", "Boolean"); + + if (delay < 0) delay = 0; + + gcv.function = GXcopy; + gcv.subwindow_mode = IncludeInferiors; + 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; +} + + +/* + * perform one iteration of decay + */ +static void +decay1 (dpy, window) + Display *dpy; + Window window; +{ + int left, top, width, height; + +#define nrnd(x) (random() % (x)) + + switch (random() % 8) { + case 0: /* move a block left */ + case 1: + left = nrnd(sizex - 1) + 1; + top = nrnd(sizey); + width = nrnd(sizex - left); + height = nrnd(sizey - top); + XCopyArea (dpy, window, window, gc, left, top, width, height, + left - 1, top); + break; + case 2: /* move a block right */ + case 3: + left = nrnd(sizex - 1); + top = nrnd(sizey); + width = nrnd(sizex - 1 - left); + height = nrnd(sizey - top); + XCopyArea (dpy, window, window, gc, left, top, width, height, + left + 1, top); + break; + case 4: /* move a block up */ + left = nrnd(sizex); + top = nrnd(sizey - 1) + 1; + width = nrnd(sizex - left); + height = nrnd(sizey - top); + XCopyArea (dpy, window, window, gc, left, top, width, height, + left, top - 1); + break; + default: /* move block down (biased to this) */ + left = nrnd(sizex); + top = nrnd(sizey - 1); + width = nrnd(sizex - left); + height = nrnd(sizey - 1 - top); + XCopyArea (dpy, window, window, gc, left, top, width, height, + left, top + 1); + break; + } + XSync (dpy, True); +#undef nrnd +} + + +char *progclass = "DecayScreen"; + +char *defaults [] = { + "DecayScreen.mappedWhenManaged:false", + "DecayScreen.dontClearWindow: true", + "*delay: 10", + 0 +}; + +XrmOptionDescRec options [] = { + { "-delay", ".delay", XrmoptionSepArg, 0 }, +}; + +int options_size = (sizeof (options) / sizeof (options[0])); + +void +screenhack (dpy, window) + Display *dpy; + Window window; +{ + init_decay (dpy, window); + while (1) { + decay1 (dpy, window); + if (delay) usleep (delay); + } +} diff --git a/hacks/decayscreen.man b/hacks/decayscreen.man new file mode 100644 index 00000000..a165e036 --- /dev/null +++ b/hacks/decayscreen.man @@ -0,0 +1,46 @@ +.TH XScreenSaver 1 "05-aug-93" "X Version 11" +.SH NAME +decayscreen - make a screen meltdown. +.SH SYNOPSIS +.B decayscreen +[\-display \fIhost:display.screen\fP] [\-window] [\-root] [\-mono] [\-delay \fIusecs\fP] +.SH DESCRIPTION +The \fIdecayscreen\fP program creates a melting effect by randomly +shifting rectangles around the screen. +.SH OPTIONS +.I decayscreen +accepts the following options: +.TP 8 +.B \-window +Draw on a newly-created window. This is the default. +.TP 8 +.B \-root +Draw on the root window. +.TP 8 +.B \-mono +If on a color display, pretend we're on a monochrome display. +.TP 8 +.B \-delay microseconds +Slow it down. +.SH ENVIRONMENT +.PP +.TP 8 +.B DISPLAY +to get the default host and display number. +.TP 8 +.B XENVIRONMENT +to get the name of a resource file that overrides the global resources +stored in the RESOURCE_MANAGER property. +.SH "SEE ALSO" +X(1), +xscreensaver(1) +.SH 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. +.SH AUTHOR +Vivek Khera , 05-Aug-93; based on code by David Wald, 1988. diff --git a/hacks/halo.c b/hacks/halo.c index 08db7894..a9f18855 100644 --- a/hacks/halo.c +++ b/hacks/halo.c @@ -13,6 +13,9 @@ but X doesn't support arithmetic combinations of pixmaps!! What losers. I suppose I could crank out the 2's compliment math by hand, but that's a real drag... + + This would probably look good with shapes other than circles as well. + */ #include "screenhack.h" diff --git a/hacks/helix.c b/hacks/helix.c index 9e6d905b..31ab7f02 100644 --- a/hacks/helix.c +++ b/hacks/helix.c @@ -130,7 +130,7 @@ random_helix (dpy, window) factor3 = 2; factor4 = 2; - divisor = ((frand (3.0) + 1) * (((random() % 1) * 2) - 1)); + divisor = ((frand (3.0) + 1) * (((random() & 1) * 2) - 1)); if ((random () & 1) == 0) { @@ -147,8 +147,8 @@ random_helix (dpy, window) d_angle = random () % 360; #define random_factor() \ - (((random() % 7) ? ((random() % 1) + 1) : 3) \ - * (((random() % 1) * 2) - 1)) + (((random() % 7) ? ((random() & 1) + 1) : 3) \ + * (((random() & 1) * 2) - 1)) while (gcd (gcd (gcd (factor1, factor2), factor3), factor4) != 1) { @@ -164,7 +164,7 @@ random_helix (dpy, window) { hsv_to_rgb (random () % 360, frand (1.0), frand (0.5) + 0.5, &color.red, &color.green, &color.blue); - if (got_color = XAllocColor (dpy, cmap, &color)) + if ((got_color = XAllocColor (dpy, cmap, &color))) XSetForeground (dpy, draw_gc, color.pixel); else XSetForeground (dpy, draw_gc, default_fg_pixel); diff --git a/hacks/hypercube.c b/hacks/hypercube.c index c58906e4..37ac0745 100644 --- a/hacks/hypercube.c +++ b/hacks/hypercube.c @@ -174,7 +174,7 @@ hyper (xy, xz, yz, xw, yw, zw) mixing an ANSI compiler with a non-ANSI preprocessor, or vice versa. Regardless, your system is broken; it's not a bug in this program. */ -#if __STDC__ +#if __STDC__ || SVR4 # define rotate(name,dim0,dim1,cos,sin) \ _tmp0_ = ((name##dim0 * cos) + (name##dim1 * sin)); \ _tmp1_ = ((name##dim1 * cos) - (name##dim0 * sin)); \ @@ -229,7 +229,7 @@ char *defaults [] = { "*color3: white", "*color4: green", "*color5: cyan", - "*color6: dodgerblue", + "*color6: blue", "*color7: magenta", "*xw: 0.000", diff --git a/hacks/noses/nose.0.left b/hacks/noses/nose.0.left index cb3d1528..1f5ebdbc 100644 --- a/hacks/noses/nose.0.left +++ b/hacks/noses/nose.0.left @@ -1,38 +1,46 @@ -#define nose_0_left_width 64 -#define nose_0_left_height 64 +#define nose_width 64 +#define nose_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}; + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x07, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xc0, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, + 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x05, 0x00, 0x00, + 0x00, 0xc0, 0xff, 0xed, 0xaa, 0xff, 0x3f, 0x00, 0x00, 0xf8, 0xff, 0xff, + 0xff, 0xff, 0x3f, 0x00, 0x00, 0xf8, 0xff, 0xff, 0xff, 0xff, 0x3f, 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, 0x06, 0x00, 0x01, 0x00, 0x80, 0x00, 0x40, 0x00, + 0x02, 0x00, 0x02, 0x00, 0x40, 0x00, 0xc0, 0x00, 0x01, 0x00, 0x02, 0x00, + 0x20, 0x00, 0x80, 0x80, 0x01, 0x00, 0x04, 0x00, 0x10, 0x00, 0x00, 0x40, + 0x00, 0x00, 0x04, 0x00, 0x10, 0x00, 0x00, 0x30, 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, + 0xfc, 0x1f, 0x00, 0x00, 0x00, 0xc0, 0xff, 0x03, 0xff, 0x1f, 0x00, 0x00, + 0x00, 0xf0, 0xff, 0x0f, 0xff, 0x3f, 0x00, 0x00, 0x00, 0xf8, 0xff, 0x9f, + 0xff, 0x3f, 0x00, 0x00, 0x00, 0xfc, 0xff, 0xff, 0xff, 0x3f, 0x00, 0x00, + 0x00, 0xbe, 0xff, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, 0xde, 0xff, 0xff, + 0xff, 0x3f, 0x00, 0x00, 0x00, 0xef, 0xff, 0xff, 0xff, 0x3f, 0x00, 0x00, + 0x00, 0xef, 0xff, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, 0xf7, 0xff, 0xff, + 0xff, 0x3f, 0x00, 0x00, 0x00, 0xe7, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x00, + 0x00, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, + 0xff, 0x7f, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x00, + 0x00, 0xfc, 0xff, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, 0xf8, 0xff, 0xff, + 0xff, 0x3f, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, 0x1f, 0x00, 0x00, + 0x00, 0xc0, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/hacks/noses/nose.0.right b/hacks/noses/nose.0.right index f387baa7..bcbd5cdc 100644 --- a/hacks/noses/nose.0.right +++ b/hacks/noses/nose.0.right @@ -1,38 +1,46 @@ -#define nose_0_right_width 64 -#define nose_0_right_height 64 +#define nose_width 64 +#define nose_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}; + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x1f, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xe0, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, + 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0xff, 0xff, 0x00, 0x00, 0x00, + 0x00, 0xfc, 0xff, 0x55, 0xb7, 0xff, 0x03, 0x00, 0x00, 0xfc, 0xff, 0xff, + 0xff, 0xff, 0x1f, 0x00, 0x00, 0xfc, 0xff, 0xff, 0xff, 0xff, 0x1f, 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, 0x60, 0x00, 0x0c, 0xc0, 0x00, 0x00, 0x40, 0x00, 0x40, + 0x00, 0x02, 0x00, 0x01, 0x00, 0x40, 0x00, 0x80, 0x00, 0x03, 0x00, 0x02, + 0x00, 0x20, 0x00, 0x80, 0x01, 0x01, 0x00, 0x04, 0x00, 0x20, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x08, 0x00, 0x30, 0x00, 0x00, 0x0c, 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, 0xf8, 0x3f, + 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xff, 0xc0, 0xff, 0x03, 0x00, + 0x00, 0x00, 0xfc, 0xff, 0xf0, 0xff, 0x0f, 0x00, 0x00, 0x00, 0xfc, 0xff, + 0xf9, 0xff, 0x1f, 0x00, 0x00, 0x00, 0xfc, 0xff, 0xff, 0xff, 0x3f, 0x00, + 0x00, 0x00, 0xfc, 0xff, 0xff, 0xff, 0x7d, 0x00, 0x00, 0x00, 0xfc, 0xff, + 0xff, 0xff, 0x7b, 0x00, 0x00, 0x00, 0xfc, 0xff, 0xff, 0xff, 0xf7, 0x00, + 0x00, 0x00, 0xfc, 0xff, 0xff, 0xff, 0xf7, 0x00, 0x00, 0x00, 0xfc, 0xff, + 0xff, 0xff, 0xef, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xe7, 0x00, + 0x00, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0xfe, 0xff, + 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0xff, 0x7f, 0x00, + 0x00, 0x00, 0xfc, 0xff, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, 0xfc, 0xff, + 0xff, 0xff, 0x1f, 0x00, 0x00, 0x00, 0xf8, 0xff, 0xff, 0xff, 0x0f, 0x00, + 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/hacks/noses/nose.1.left b/hacks/noses/nose.1.left index 8a6b8295..3e247e65 100644 --- a/hacks/noses/nose.1.left +++ b/hacks/noses/nose.1.left @@ -1,38 +1,46 @@ -#define nose_1_left_width 64 -#define nose_1_left_height 64 +#define nose_width 64 +#define nose_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}; + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xfc, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0x0f, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0xc0, + 0xff, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0xff, 0x1f, 0x00, + 0x00, 0x00, 0xfc, 0xff, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, 0xfc, 0xff, + 0xff, 0xff, 0x3f, 0x00, 0x00, 0xc0, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00, + 0x00, 0xf0, 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, 0xe6, 0x03, + 0x00, 0xfc, 0x07, 0x00, 0x00, 0x00, 0xf2, 0x0f, 0x00, 0x00, 0xf8, 0xff, + 0xff, 0xff, 0xf1, 0x1f, 0x80, 0x1f, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x3f, + 0xe0, 0x7f, 0xc0, 0x07, 0x00, 0x00, 0xfc, 0x7f, 0xf0, 0xff, 0xe0, 0x0f, + 0x00, 0x1f, 0xfe, 0x7f, 0xf8, 0xff, 0xe1, 0x1f, 0xc0, 0x7f, 0xfe, 0x7f, + 0xfc, 0xff, 0xf3, 0x3f, 0xe0, 0xff, 0xfe, 0x3f, 0xfe, 0xff, 0xf7, 0x7f, + 0xf8, 0xff, 0xff, 0x3f, 0x3e, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xff, 0x1f, + 0x1e, 0xfe, 0xff, 0xff, 0xfe, 0xfc, 0xff, 0x1f, 0xde, 0xff, 0xff, 0xff, + 0x7e, 0xfe, 0xff, 0x0f, 0xfe, 0xff, 0xff, 0x7f, 0xfe, 0xff, 0xff, 0x07, + 0xfe, 0xff, 0xff, 0x7f, 0xfe, 0xff, 0xff, 0x07, 0xfe, 0xff, 0xff, 0x3f, + 0xfe, 0xff, 0xff, 0x03, 0xfc, 0xff, 0xff, 0x3f, 0xfe, 0xff, 0xff, 0x01, + 0xfc, 0xff, 0xff, 0x3f, 0xfe, 0xff, 0xff, 0x01, 0xf8, 0xff, 0xff, 0x3f, + 0xfc, 0xff, 0xff, 0x00, 0xf0, 0xff, 0xff, 0x3f, 0xfc, 0xff, 0xff, 0x00, + 0xe0, 0xff, 0xff, 0x1f, 0xf8, 0xff, 0x7f, 0x00, 0x80, 0xff, 0xff, 0x0f, + 0xf0, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0x0f, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/hacks/noses/nose.1.right b/hacks/noses/nose.1.right index f7c8962c..52c9b56f 100644 --- a/hacks/noses/nose.1.right +++ b/hacks/noses/nose.1.right @@ -1,38 +1,46 @@ -#define nose_1_right_width 64 -#define nose_1_right_height 64 +#define nose_width 64 +#define nose_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}; + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xe0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x3f, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xf8, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xff, 0xff, + 0x03, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, + 0x00, 0xfc, 0xff, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, 0xfc, 0xff, 0xff, + 0xff, 0x3f, 0x00, 0x00, 0x00, 0xfc, 0xff, 0xff, 0xff, 0xff, 0x03, 0x00, + 0x00, 0xfc, 0xff, 0xff, 0xff, 0xff, 0x0f, 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, 0x67, 0x00, 0x00, 0x00, 0x18, 0xc0, 0x00, + 0xf0, 0x4f, 0x00, 0x00, 0x00, 0xe0, 0x3f, 0x00, 0xf8, 0x8f, 0xff, 0xff, + 0xff, 0x1f, 0x00, 0x00, 0xfc, 0x1f, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x01, + 0xfe, 0x3f, 0x00, 0x00, 0xe0, 0x03, 0xfe, 0x07, 0xfe, 0x7f, 0xf8, 0x00, + 0xf0, 0x07, 0xff, 0x0f, 0xfe, 0x7f, 0xfe, 0x03, 0xf8, 0x87, 0xff, 0x1f, + 0xfc, 0x7f, 0xff, 0x07, 0xfc, 0xcf, 0xff, 0x3f, 0xfc, 0xff, 0xff, 0x1f, + 0xfe, 0xef, 0xff, 0x7f, 0xf8, 0xff, 0xff, 0x3f, 0xff, 0xff, 0xff, 0x7c, + 0xf8, 0xff, 0x3f, 0x7f, 0xff, 0xff, 0x7f, 0x78, 0xf0, 0xff, 0x7f, 0x7e, + 0xff, 0xff, 0xff, 0x7b, 0xe0, 0xff, 0xff, 0x7f, 0xfe, 0xff, 0xff, 0x7f, + 0xe0, 0xff, 0xff, 0x7f, 0xfe, 0xff, 0xff, 0x7f, 0xc0, 0xff, 0xff, 0x7f, + 0xfc, 0xff, 0xff, 0x7f, 0x80, 0xff, 0xff, 0x7f, 0xfc, 0xff, 0xff, 0x3f, + 0x80, 0xff, 0xff, 0x7f, 0xfc, 0xff, 0xff, 0x3f, 0x00, 0xff, 0xff, 0x3f, + 0xfc, 0xff, 0xff, 0x1f, 0x00, 0xff, 0xff, 0x3f, 0xfc, 0xff, 0xff, 0x0f, + 0x00, 0xfe, 0xff, 0x1f, 0xf8, 0xff, 0xff, 0x07, 0x00, 0xfc, 0xff, 0x0f, + 0xf0, 0xff, 0xff, 0x01, 0x00, 0xf0, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/hacks/noses/nose.down b/hacks/noses/nose.down index e8bdba4f..ab8c70f0 100644 --- a/hacks/noses/nose.down +++ b/hacks/noses/nose.down @@ -1,38 +1,46 @@ -#define nose_down_width 64 -#define nose_down_height 64 +#define nose_width 64 +#define nose_height 64 static unsigned char nose_down_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,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0xfc,0xff,0x01,0x00,0x00,0x00,0x00,0xc0,0x03,0x00,0x1e,0x00, - 0x00,0x00,0x00,0x38,0x00,0x00,0xe0,0x00,0x00,0x00,0x00,0x06,0x00,0x00,0x00, - 0x03,0x00,0x00,0x80,0x01,0x00,0x00,0x00,0x04,0x00,0x00,0x40,0x00,0x00,0x00, - 0x00,0x08,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x30,0x00,0x00,0x10,0x00,0x80, - 0x1f,0x00,0x40,0x00,0x00,0x08,0x00,0x60,0x60,0x00,0x80,0x00,0x00,0x08,0x00, - 0x10,0x80,0x00,0x80,0x00,0x00,0x04,0x00,0x08,0x00,0x01,0x00,0x01,0x00,0x04, - 0x00,0x08,0x00,0x01,0x00,0x01,0x00,0x02,0x00,0x18,0x80,0x01,0x00,0x02,0x00, - 0x02,0x00,0x68,0x60,0x01,0x00,0x02,0x00,0x02,0x00,0x88,0x1f,0x01,0x00,0x02, - 0x00,0x02,0x00,0x08,0x00,0x01,0x00,0x02,0x00,0x02,0x00,0x10,0x80,0x00,0x00, - 0x03,0x00,0x06,0x00,0x60,0x60,0x00,0x80,0x02,0x00,0x0c,0x00,0x80,0x1f,0x00, - 0x40,0x01,0x00,0x14,0x00,0x00,0x00,0x00,0x20,0x01,0x00,0x28,0x00,0x00,0x00, - 0x00,0x90,0x00,0x00,0x50,0x00,0x00,0x00,0x00,0x48,0x00,0x00,0xa0,0x01,0x00, - 0x00,0x00,0x26,0x00,0x00,0x40,0x1e,0x00,0x00,0xc0,0x11,0x00,0x00,0x80,0xe1, - 0x03,0x00,0x3c,0x0c,0x00,0x00,0x00,0x0e,0xfc,0xff,0x83,0x03,0x00,0x00,0x00, - 0xf0,0x01,0x00,0x78,0x00,0x00,0x00,0x00,0x00,0xfe,0xff,0x0f,0x00,0x00,0x00, - 0x00,0x80,0x03,0x00,0x0c,0x00,0x00,0x00,0x00,0x80,0x02,0x00,0x14,0x00,0x00, - 0x00,0x00,0x60,0x04,0x00,0x12,0x00,0x00,0xc0,0x7f,0x10,0x04,0x00,0x22,0xe0, - 0x01,0x70,0xc0,0x18,0x08,0x00,0x61,0x1c,0x06,0x10,0x00,0x0f,0x30,0xc0,0x80, - 0x07,0x08,0x08,0x00,0x06,0xc0,0x3f,0x80,0x01,0x08,0x08,0x00,0x18,0x00,0x02, - 0xc0,0x00,0x10,0x04,0x00,0x30,0x00,0x05,0x30,0x00,0x10,0x04,0x00,0x00,0x80, - 0x08,0x18,0x00,0x20,0x04,0x00,0x00,0x80,0x08,0x00,0x00,0x20,0x04,0x00,0x00, - 0x40,0x10,0x00,0x00,0x20,0x24,0x00,0x00,0x40,0x10,0x00,0x00,0x22,0x24,0x00, - 0x00,0x40,0x10,0x00,0x00,0x22,0x44,0x00,0x00,0x40,0x10,0x00,0x00,0x11,0x84, - 0x01,0x00,0xc0,0x18,0x00,0xc0,0x10,0x08,0x00,0x00,0x80,0x08,0x00,0x00,0x08, - 0x30,0x00,0x00,0x80,0x08,0x00,0x00,0x04,0xe0,0xff,0xff,0xff,0xf8,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, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x54, 0x55, 0x01, 0x00, 0x00, 0x00, 0x00, 0x80, 0xaa, + 0xaa, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x50, 0x55, 0x55, 0x55, 0x00, 0x00, + 0x00, 0x00, 0xaa, 0xaa, 0xaa, 0xaa, 0x02, 0x00, 0x00, 0x00, 0x55, 0x55, + 0x55, 0x55, 0x05, 0x00, 0x00, 0x80, 0xaa, 0xaa, 0xaa, 0xaa, 0x0a, 0x00, + 0x00, 0x40, 0x55, 0x55, 0x55, 0x55, 0x15, 0x00, 0x00, 0xa0, 0xaa, 0xaa, + 0xaa, 0xaa, 0x2a, 0x00, 0x00, 0x50, 0x55, 0x55, 0x55, 0x55, 0x55, 0x00, + 0x00, 0xa8, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0x54, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x01, 0x00, 0xa8, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0x02, + 0x00, 0x54, 0x55, 0x55, 0x55, 0x55, 0x55, 0x01, 0x00, 0xaa, 0xaa, 0xaa, + 0xaa, 0xaa, 0xaa, 0x02, 0x00, 0x54, 0x55, 0x55, 0x55, 0x55, 0x55, 0x01, + 0x00, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0x02, 0x00, 0x54, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x01, 0x00, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0x02, + 0x00, 0x54, 0x55, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xac, 0xaa, 0xaa, + 0xaa, 0xaa, 0xaa, 0x01, 0x00, 0x38, 0x55, 0x55, 0x55, 0x55, 0xd5, 0x00, + 0x00, 0xf0, 0xaa, 0xaa, 0xaa, 0xaa, 0x6a, 0x00, 0x00, 0xe0, 0x55, 0x55, + 0x55, 0x55, 0x3d, 0x00, 0x00, 0xc0, 0xaf, 0xaa, 0xaa, 0xaa, 0x1e, 0x00, + 0x00, 0x80, 0x7f, 0x55, 0x55, 0xd5, 0x0f, 0x00, 0x00, 0x00, 0xfe, 0xaa, + 0xaa, 0xfa, 0x03, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0x7f, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xfe, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, + 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x1c, 0x00, 0x00, + 0x00, 0x00, 0xe0, 0x07, 0x00, 0x1e, 0x00, 0x00, 0xc0, 0x7f, 0xf0, 0x07, + 0x00, 0x3e, 0xe0, 0x01, 0xf0, 0xff, 0xf8, 0x0f, 0x00, 0x7f, 0xfc, 0x07, + 0xf0, 0xff, 0xff, 0x3f, 0xc0, 0xff, 0xff, 0x0f, 0xf8, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0x0f, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, + 0xfc, 0xff, 0xff, 0xff, 0xfd, 0xff, 0xff, 0x1f, 0xfc, 0xff, 0xff, 0xff, + 0xf8, 0xff, 0xff, 0x3f, 0xfc, 0xff, 0xff, 0xff, 0xf8, 0xff, 0xff, 0x3f, + 0xbc, 0xff, 0xff, 0x7f, 0xf0, 0xff, 0xff, 0x3f, 0xbc, 0xff, 0xff, 0x7f, + 0xf0, 0xff, 0xff, 0x3d, 0x7c, 0xff, 0xff, 0x7f, 0xf0, 0xff, 0xff, 0x3d, + 0x7c, 0xff, 0xff, 0x7f, 0xf0, 0xff, 0x7f, 0x1e, 0xfc, 0xff, 0xff, 0xff, + 0xf8, 0xff, 0xff, 0x1e, 0xf8, 0xff, 0xff, 0xff, 0xf8, 0xff, 0xff, 0x0f, + 0xf0, 0xff, 0xff, 0xff, 0xf8, 0xff, 0xff, 0x07, 0xe0, 0xff, 0xff, 0xff, + 0xf8, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/hacks/noses/nose.front b/hacks/noses/nose.front index 64b82015..588cb0c9 100644 --- a/hacks/noses/nose.front +++ b/hacks/noses/nose.front @@ -1,38 +1,46 @@ -#define nose_front_width 64 -#define nose_front_height 64 +#define nose_width 64 +#define nose_height 64 static unsigned char nose_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,0xc0,0x1f,0x00,0x20,0x00,0x00,0x08,0x00,0x30,0x60,0x00,0x20,0x00, - 0x00,0xf8,0xff,0x0f,0x80,0xff,0x3f,0x00,0x00,0x00,0x02,0x02,0x00,0x82,0x00, - 0x00,0x00,0x00,0x03,0x01,0x00,0x84,0x01,0x00,0x00,0x00,0x81,0x00,0x00,0x08, - 0x01,0x00,0x00,0x80,0x80,0x00,0x00,0x08,0x02,0x00,0x00,0x80,0x40,0x00,0x00, - 0x10,0x02,0x00,0x00,0x40,0x40,0x00,0x00,0x10,0x04,0x00,0x00,0x40,0x20,0x00, - 0x00,0x20,0x04,0x00,0x00,0x60,0x20,0x00,0x00,0x20,0x0c,0x00,0x00,0x20,0x20, - 0x00,0x00,0x20,0x08,0x00,0x00,0x20,0x20,0x00,0x00,0x20,0x08,0x00,0x00,0x10, - 0x20,0x00,0x00,0x20,0x10,0x00,0x00,0x10,0x20,0x00,0x00,0x20,0x10,0x00,0x00, - 0x10,0x20,0x00,0x00,0x20,0x10,0x00,0x00,0x10,0x40,0x00,0x00,0x10,0x10,0x00, - 0x00,0x10,0x40,0x00,0x00,0x10,0x10,0x00,0x00,0x10,0x80,0x00,0x00,0x08,0x10, - 0x00,0x00,0x10,0x80,0x00,0x00,0x08,0x10,0x00,0x00,0x30,0x00,0x01,0x00,0x04, - 0x18,0x00,0x00,0x20,0x00,0x02,0x00,0x02,0x08,0x00,0x00,0x20,0x00,0x0c,0x80, - 0x01,0x08,0x00,0x00,0x60,0x00,0x30,0x60,0x00,0x0c,0x00,0x00,0x40,0x00,0xc0, - 0x1f,0x00,0x04,0x00,0x00,0xc0,0x00,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,0x80,0x0f,0xc0,0x0f,0x00,0x00,0x00, - 0x00,0x40,0x10,0x20,0x10,0x00,0x00,0x00,0x00,0x20,0x60,0x30,0x20,0x00,0x00, - 0x00,0x00,0x20,0xc0,0x18,0x20,0x00,0x00,0xc0,0x7f,0x10,0x80,0x0d,0x40,0xe0, - 0x01,0x70,0xc0,0x18,0x00,0x05,0x40,0x1c,0x06,0x10,0x00,0x0f,0x00,0x05,0x80, - 0x07,0x08,0x08,0x00,0x06,0x00,0x05,0x80,0x01,0x08,0x08,0x00,0x18,0x00,0x05, - 0xc0,0x00,0x10,0x04,0x00,0x30,0x00,0x05,0x30,0x00,0x10,0x04,0x00,0x00,0x80, - 0x08,0x18,0x00,0x20,0x04,0x00,0x00,0x80,0x08,0x00,0x00,0x20,0x04,0x00,0x00, - 0x40,0x10,0x00,0x00,0x20,0x24,0x00,0x00,0x40,0x10,0x00,0x00,0x22,0x24,0x00, - 0x00,0x40,0x10,0x00,0x00,0x22,0x44,0x00,0x00,0x40,0x10,0x00,0x00,0x11,0x84, - 0x01,0x00,0xc0,0x18,0x00,0xc0,0x10,0x08,0x00,0x00,0x80,0x08,0x00,0x00,0x08, - 0x30,0x00,0x00,0x80,0x08,0x00,0x00,0x04,0xe0,0xff,0xff,0xff,0xf8,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, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xf0, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, + 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0xff, 0x07, 0x00, 0x00, + 0x00, 0x00, 0xf8, 0xff, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, + 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, + 0x00, 0x80, 0xff, 0xff, 0xff, 0xff, 0x07, 0x00, 0x00, 0xe0, 0xff, 0xff, + 0xff, 0xff, 0x0f, 0x00, 0x00, 0xf0, 0xff, 0x3f, 0xe0, 0xff, 0x1f, 0x00, + 0x00, 0xf8, 0xff, 0x0f, 0x80, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x02, 0x02, + 0x00, 0x82, 0x00, 0x00, 0x00, 0x00, 0x03, 0x01, 0x00, 0x84, 0x01, 0x00, + 0x00, 0x00, 0x81, 0x00, 0x00, 0x08, 0x01, 0x00, 0x00, 0x80, 0x80, 0x00, + 0x00, 0x08, 0x02, 0x00, 0x00, 0x80, 0x40, 0x00, 0x00, 0x10, 0x02, 0x00, + 0x00, 0x40, 0x40, 0x00, 0x00, 0x10, 0x04, 0x00, 0x00, 0x40, 0x20, 0x00, + 0x00, 0x20, 0x04, 0x00, 0x00, 0x60, 0x20, 0x00, 0x00, 0x20, 0x0c, 0x00, + 0x00, 0x20, 0x20, 0x00, 0x00, 0x20, 0x08, 0x00, 0x00, 0x20, 0x20, 0x00, + 0x00, 0x20, 0x08, 0x00, 0x00, 0x10, 0x20, 0x00, 0x00, 0x20, 0x10, 0x00, + 0x00, 0x10, 0x20, 0x00, 0x00, 0x20, 0x10, 0x00, 0x00, 0x10, 0x20, 0x08, + 0xc0, 0x20, 0x10, 0x00, 0x00, 0x10, 0x40, 0x18, 0xc0, 0x10, 0x10, 0x00, + 0x00, 0x10, 0x40, 0x30, 0x30, 0x10, 0x10, 0x00, 0x00, 0x10, 0x80, 0x20, + 0x10, 0x08, 0x10, 0x00, 0x00, 0x10, 0x84, 0x00, 0x00, 0x08, 0x11, 0x00, + 0x00, 0x30, 0x0c, 0x01, 0x00, 0x84, 0x19, 0x00, 0x00, 0x20, 0x18, 0x02, + 0x00, 0x62, 0x08, 0x00, 0x00, 0x20, 0x30, 0x0c, 0x80, 0x39, 0x08, 0x00, + 0x00, 0x60, 0xc0, 0x31, 0xe0, 0x07, 0x0c, 0x00, 0x00, 0x40, 0x00, 0xcf, + 0x3f, 0x00, 0x04, 0x00, 0x00, 0xc0, 0x00, 0x60, 0x03, 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, 0x80, 0x0f, 0xc0, 0x0f, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x1f, + 0xe0, 0x1f, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x7f, 0xf0, 0x3f, 0x00, 0x00, + 0x00, 0x00, 0xe0, 0xff, 0xf8, 0x3f, 0x00, 0x00, 0xc0, 0x7f, 0xf0, 0xff, + 0xfd, 0x7f, 0xe0, 0x01, 0xf0, 0xff, 0xf8, 0xff, 0xfd, 0x7f, 0xfc, 0x07, + 0xf0, 0xff, 0xff, 0xff, 0xfd, 0xff, 0xff, 0x0f, 0xf8, 0xff, 0xff, 0xff, + 0xfd, 0xff, 0xff, 0x0f, 0xf8, 0xff, 0xff, 0xff, 0xfd, 0xff, 0xff, 0x1f, + 0xfc, 0xff, 0xff, 0xff, 0xfd, 0xff, 0xff, 0x1f, 0xfc, 0xff, 0xff, 0xff, + 0xf8, 0xff, 0xff, 0x3f, 0xfc, 0xff, 0xff, 0xff, 0xf8, 0xff, 0xff, 0x3f, + 0x7c, 0xff, 0xff, 0x7f, 0xf0, 0xff, 0xff, 0x3d, 0x3c, 0xff, 0xff, 0x7f, + 0xf0, 0xff, 0xff, 0x3e, 0x7c, 0xff, 0xff, 0x7f, 0xf0, 0xff, 0xff, 0x3e, + 0x7c, 0xfe, 0xff, 0x7f, 0xf0, 0xff, 0x7f, 0x1f, 0xfc, 0xff, 0xff, 0xff, + 0xf8, 0xff, 0xff, 0x1f, 0xf8, 0xff, 0xff, 0xff, 0xf8, 0xff, 0xff, 0x0f, + 0xf0, 0xff, 0xff, 0xff, 0xf8, 0xff, 0xff, 0x07, 0xe0, 0xff, 0xff, 0xff, + 0xf8, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/hacks/noses/nose.left.front b/hacks/noses/nose.left.front index 3a871eaa..2b7ff371 100644 --- a/hacks/noses/nose.left.front +++ b/hacks/noses/nose.left.front @@ -1,38 +1,46 @@ -#define nose_left_front_width 64 -#define nose_left_front_height 64 +#define nose_width 64 +#define nose_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}; + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xf8, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, + 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0xff, 0x07, 0x00, 0x00, + 0x00, 0x00, 0xf8, 0xff, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, + 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0xff, 0x01, 0x00, + 0x00, 0x80, 0xff, 0xff, 0xff, 0xff, 0x03, 0x00, 0x00, 0xc0, 0xff, 0xff, + 0xff, 0xff, 0x07, 0x00, 0x00, 0xe0, 0xff, 0x1f, 0xf0, 0xff, 0x1f, 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, + 0x80, 0x10, 0x10, 0x00, 0x00, 0x10, 0x20, 0x06, 0xc0, 0x08, 0x10, 0x00, + 0x00, 0x10, 0x20, 0x0c, 0x40, 0x08, 0x10, 0x00, 0x00, 0x10, 0x40, 0x08, + 0x38, 0x04, 0x10, 0x00, 0x00, 0x30, 0x40, 0x70, 0x18, 0x04, 0x10, 0x00, + 0x00, 0x20, 0x80, 0x20, 0x08, 0x02, 0x18, 0x00, 0x00, 0x20, 0x38, 0x01, + 0x00, 0x79, 0x08, 0x00, 0x00, 0x60, 0x64, 0x06, 0xe0, 0x44, 0x08, 0x00, + 0x00, 0x80, 0xc4, 0x1b, 0xb0, 0xc7, 0x0c, 0x00, 0x00, 0x80, 0x00, 0xe0, + 0x8f, 0x81, 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, + 0xfc, 0x1f, 0x00, 0x00, 0x00, 0xe0, 0xff, 0x07, 0xfe, 0x1f, 0x00, 0x00, + 0x00, 0xf0, 0xff, 0x8f, 0xff, 0x3f, 0x00, 0x00, 0x00, 0xfc, 0xff, 0x9f, + 0xff, 0x3f, 0x00, 0x00, 0x00, 0xfc, 0xff, 0xff, 0xff, 0x3f, 0x00, 0x00, + 0x00, 0xfe, 0xff, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, + 0xff, 0x3f, 0x00, 0x00, 0x00, 0xdf, 0xff, 0xff, 0xff, 0x3f, 0x00, 0x00, + 0x00, 0xdf, 0xff, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, 0xef, 0xff, 0xff, + 0xff, 0x3f, 0x00, 0x00, 0x00, 0xf7, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x00, + 0x00, 0xe7, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0xee, 0xff, 0xff, + 0xff, 0x7f, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x00, + 0x00, 0xfc, 0xff, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, 0xf8, 0xff, 0xff, + 0xff, 0x3f, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, 0x1f, 0x00, 0x00, + 0x00, 0xc0, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/hacks/noses/nose.right.front b/hacks/noses/nose.right.front index f8214174..204e73e3 100644 --- a/hacks/noses/nose.right.front +++ b/hacks/noses/nose.right.front @@ -1,38 +1,46 @@ -#define nose_right_front_width 64 -#define nose_right_front_height 64 +#define nose_width 64 +#define nose_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}; + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, + 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x03, 0x00, 0x00, + 0x00, 0x00, 0xf8, 0xff, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, + 0xff, 0x3f, 0x00, 0x00, 0x00, 0x80, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, + 0x00, 0xc0, 0xff, 0xff, 0xff, 0xff, 0x03, 0x00, 0x00, 0xf0, 0xff, 0xff, + 0xff, 0xff, 0x07, 0x00, 0x00, 0xf8, 0xff, 0x0f, 0xf8, 0xff, 0x0f, 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, 0x01, + 0x40, 0x08, 0x08, 0x00, 0x00, 0x08, 0x10, 0x02, 0x40, 0x04, 0x08, 0x00, + 0x00, 0x08, 0x10, 0x02, 0x40, 0x04, 0x08, 0x00, 0x00, 0x08, 0x20, 0x0c, + 0x30, 0x02, 0x08, 0x00, 0x00, 0x08, 0x20, 0x08, 0x10, 0x02, 0x0c, 0x00, + 0x00, 0x18, 0x43, 0x00, 0x00, 0x41, 0x04, 0x00, 0x00, 0x10, 0x8e, 0x00, + 0x80, 0x20, 0x04, 0x00, 0x00, 0x10, 0xb8, 0x03, 0x60, 0x30, 0x06, 0x00, + 0x00, 0x30, 0x60, 0x0e, 0x18, 0x0c, 0x01, 0x00, 0x00, 0x20, 0x80, 0xfe, + 0x87, 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, 0xf8, 0x3f, + 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x7f, 0xe0, 0xff, 0x07, 0x00, + 0x00, 0x00, 0xfc, 0xff, 0xf1, 0xff, 0x0f, 0x00, 0x00, 0x00, 0xfc, 0xff, + 0xf9, 0xff, 0x3f, 0x00, 0x00, 0x00, 0xfc, 0xff, 0xff, 0xff, 0x3f, 0x00, + 0x00, 0x00, 0xfc, 0xff, 0xff, 0x1f, 0x7f, 0x00, 0x00, 0x00, 0xfc, 0xff, + 0xff, 0xff, 0x7e, 0x00, 0x00, 0x00, 0xfc, 0xff, 0xff, 0xff, 0xfd, 0x00, + 0x00, 0x00, 0xfc, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0xfc, 0xff, + 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0x00, + 0x00, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0xfe, 0xff, + 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0xff, 0x7f, 0x00, + 0x00, 0x00, 0xfc, 0xff, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, 0xfc, 0xff, + 0xff, 0xff, 0x1f, 0x00, 0x00, 0x00, 0xf8, 0xff, 0xff, 0xff, 0x0f, 0x00, + 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/hacks/screenhack.h b/hacks/screenhack.h index 4cfc8f05..bca3bcc5 100644 --- a/hacks/screenhack.h +++ b/hacks/screenhack.h @@ -1,3 +1,13 @@ +/* xscreensaver, Copyright (c) 1992, 1993 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. + */ #if 0 * Found in Don Hopkin`s .plan file: @@ -100,15 +110,17 @@ extern unsigned int get_seconds_resource P((char*,char*)); extern Visual *get_visual_resource P((Display *, char *, char *)); extern int get_visual_depth P((Display *, Visual *)); -void hsv_to_rgb P((int,double,double,unsigned short*, - unsigned short*,unsigned short*)); -void rgb_to_hsv P((unsigned short,unsigned short,unsigned short, - int*,double*,double*)); -void cycle_hue P((XColor*,int)); +extern void hsv_to_rgb P((int,double,double,unsigned short*, + unsigned short*,unsigned short*)); +extern void rgb_to_hsv P((unsigned short,unsigned short,unsigned short, + int*,double*,double*)); +extern void cycle_hue P((XColor*,int)); + +extern void make_color_ramp P((int h1, double s1, double v1, + int h2, double s2, double v2, + XColor *pixels, int npixels)); -void make_color_ramp P((int h1, double s1, double v1, - int h2, double s2, double v2, - XColor *pixels, int npixels)); +extern Pixmap grab_screen_image P((Display *dpy, Window window, int root_p)); static double _frand_tmp_; #define frand(f) \ diff --git a/hacks/slidescreen.c b/hacks/slidescreen.c index 37ca4d15..27e15f1c 100644 --- a/hacks/slidescreen.c +++ b/hacks/slidescreen.c @@ -20,51 +20,18 @@ static int grid_w, grid_h; static int delay, delay2; 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; - Pixmap pixmap; - 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_slide (dpy, window) Display *dpy; Window window; { int i; - XEvent event; XGCValues gcv; XWindowAttributes xgwa; int border; int root_p; unsigned long fg; - Pixmap pixmap = 0; + Pixmap pixmap; Drawable d; Colormap cmap; @@ -90,47 +57,7 @@ init_slide (dpy, window) gc = XCreateGC (dpy, window, GCForeground |GCFunction | GCSubwindowMode, &gcv); - if (screensaver_window_p (dpy, window)) - { - /* note: this assumes vroot.h didn't encapsulate the XRootWindowOfScreen - function, only the RootWindowOfScreen macro... */ - Window real_root = XRootWindowOfScreen (DefaultScreenOfDisplay (dpy)); - - XSetWindowBackgroundPixmap (dpy, window, None); - - /* prevent random viewer of the screen saver (locker) from messing - with windows. We don't check whether it succeeded, because what - are our options, really... */ - XGrabPointer (dpy, real_root, True, ButtonPressMask|ButtonReleaseMask, - GrabModeAsync, GrabModeAsync, None, None, CurrentTime); - XGrabKeyboard (dpy, real_root, True, GrabModeSync, GrabModeAsync, - CurrentTime); - - XUnmapWindow (dpy, window); - XSync (dpy, True); - sleep (5); /* wait for everyone to swap in and handle exposes... */ - XMapWindow (dpy, window); - - XUngrabPointer (dpy, CurrentTime); - XUngrabKeyboard (dpy, CurrentTime); - - XSync (dpy, True); - } - else if (root_p) - { - pixmap = XCreatePixmap(dpy, window, xgwa.width, xgwa.height, xgwa.depth); - XCopyArea (dpy, RootWindowOfScreen (xgwa.screen), pixmap, gc, - xgwa.x, xgwa.y, xgwa.width, xgwa.height, 0, 0); - XSetWindowBackgroundPixmap (dpy, window, pixmap); - } - else - { - XSetWindowBackgroundPixmap (dpy, window, None); - XMapWindow (dpy, window); - XFlush (dpy); - XIfEvent (dpy, &event, MapNotify_event_p, (XPointer) window); - XSync (dpy, True); - } + pixmap = grab_screen_image (dpy, window, root_p); XGetWindowAttributes (dpy, window, &xgwa); bitmap_w = xgwa.width; diff --git a/utils/Imakefile b/utils/Imakefile index 87c1ca33..c2130aa2 100644 --- a/utils/Imakefile +++ b/utils/Imakefile @@ -8,11 +8,11 @@ #include "../config.h" #ifdef NO_SELECT - DEFINES = -DNO_SELECT + DEFINES = -DNO_SELECT #endif - SRCS = fade.c hsv.c resources.c spline.c usleep.c xroger.c - OBJS = fade.o hsv.o resources.o spline.o usleep.o xroger.o - TARFILES = README Imakefile ad2c $(SRCS) spline.h version.h + 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) diff --git a/utils/Makefile b/utils/Makefile new file mode 100644 index 00000000..cc3bf8d9 --- /dev/null +++ b/utils/Makefile @@ -0,0 +1,426 @@ +# Makefile generated by imake - do not edit! +# $XConsortium: imake.c,v 1.65 91/07/25 17:50:17 rws Exp $ +# +# The cpp used on this machine replaces all newlines and multiple tabs and +# spaces in a macro expansion with a single space. Imake tries to compensate +# for this, but is not always successful. +# + +# ------------------------------------------------------------------------- +# Makefile generated from "Imake.tmpl" and +# $XConsortium: Imake.tmpl,v 1.139 91/09/16 08:52:48 rws Exp $ +# +# Platform-specific parameters may be set in the appropriate .cf +# configuration files. Site-specific parameters should be set in the file +# site.def. Full rebuilds are recommended if any parameters are changed. +# +# If your C preprocessor does not define any unique symbols, you will need +# to set BOOTSTRAPCFLAGS when rebuilding imake (usually when doing +# "make World" the first time). +# + +# ------------------------------------------------------------------------- +# site-specific configuration parameters that need to come before +# the platform-specific parameters - edit site.def to change + +# site: $XConsortium: site.def,v 1.2 91/07/30 20:26:44 rws Exp $ + + ALLINCLUDES = $(STD_INCLUDES) $(INCLUDES) $(EXTRA_INCLUDES) $(TOP_INCLUDES) + +# ------------------------------------------------------------------------- +# platform-specific configuration parameters - edit usl.cf to change + +MEMUTILDEF = +MEMUTILLIB = +INC = $(TOOLS)/usr/include + + YFLAGS = + STRIP = $(PFX)strip + AWK = /usr/bin/awk + CD = cd + LS = /bin/ls + PR = /bin/pr + CHMOD = $(CH)chmod + CHOWN = $(CH)chown + CHGRP = $(CH)chgrp + SED = /bin/sed + MCS = $(PFX)mcs -d + + PROTO_DEFINES = +LOCAL_LIBRARIES = $(XLIB) + SYS_LIBRARIES = + + USE_INSTALLED = + SYS_TO_BUILD = + ARCHIVE_ONLY = + + USE_INSTALLED = -DUseInstalled + +BUILD_DEFINES = $(SYS_TO_BUILD) $(USE_INSTALLED) $(ARCHIVE_ONLY) + +# :: end of BUILD_DEFINES set-up + + UNIX_REL = -DSVR4 + +MAKEDEFINES = $(STD_DEFINES) $(BUILD_DEFINES) $(UNIX_REL) $(CCS_USED) + +# until we use R5 server, use R4 font structures + +# operating system: OSName + +INSTALLFLAGS = -m 0644 + +# $XConsortium: sv4Lib.rules,v 1.8 91/07/19 15:38:53 rws Exp $ + + FURCCOPTIONS = -Xa -W2,-A -Wa,-r + FUR = $(PFX)fur + +INCLUDE_EXTENSION = $(INCDIR)/extensions + + TOP_INCLUDES = + +# ------------------------------------------------------------------------- +# site-specific configuration parameters that go after +# the platform-specific parameters - edit site.def to change + +# site: $XConsortium: site.def,v 1.2 91/07/30 20:26:44 rws Exp $ + +# +# ProjectRoot is where you want to install the binaries, libs, fonts etc +# + + PROJECTROOT = $(ROOT)/$(MACH)/usr/X + XWINHOME = /usr/X + XWINLIBDIR = $(XWINHOME)/lib + XWINBINDIR = $(XWINHOME)/bin + + USLCLIENTSRC = $(TOP)/uslclients + DESKTOPDIR = $(PROJECTROOT)/desktop + DTADMDIR = $(PROJECTROOT)/adm + XDEFAULTS = $(PROJECTROOT)/defaults + + FONTINCSRC = $(FONTSRC)/include + FONTLIBINCSRC = $(FONTSRC)/lib/include + FOLIOLIBSRC = $(FONTSRC)/lib/folio + FONTLIBSRC = $(FONTSRC)/lib/font + BITMAPFONTSRC = $(FONTSRC)/lib/bitmap + FONTSLIBSRC = $(FONTSRC)/lib/ + XOLSRC = $(LIBSRC)/Xol + XOLLIBSRC = $(LIBSRC)/Xol +BITMAPLIBS_TO_BUILD = libbitmap.a libbitmap.so +FONTLIBS_TO_BUILD = libfont.a libfont.so + + USL_DEFINES = -DLIBDIR=\"$(XWINLIBDIR)\" -DDESTDIR=\"$(XWINHOME)\" + + DEFINES = $(USL_DEFINES) + + SHELL = /bin/sh + + TOP = . + CURRENT_DIR = ./utils + + AR = $(PFX)ar rv + BOOTSTRAPCFLAGS = -Dusl + CC = $(PFX)cc + AS = $(PFX)as + + COMPRESS = compress + CPP = $(TOOLS)/usr/ccs/lib/$(PFX)cpp $(STD_CPP_DEFINES) + PREPROCESSCMD = $(PFX)cc -E $(STD_CPP_DEFINES) + INSTALL = /usr/ucb/install + LD = $(PFX)ld + LINT = $(PFX)lint + LINTLIBFLAG = -o + LINTOPTS = -ax + LN = /bin/ln -s + MAKE = $(PFX)make + MV = /bin/mv + CP = /bin/cp + HCC = /bin/cc + SED = /bin/sed + + RM = /bin/rm -f + TROFF = psroff + MSMACROS = -ms + TBL = tbl + EQN = eqn + STD_INCLUDES = -I. + STD_CPP_DEFINES = -DUSL -DSVR4 -DSYSV -DI18N $(MEMUTILDEF) + STD_DEFINES = -DUSL -DSVR4 -DSYSV -DI18N $(MEMUTILDEF) + EXTRA_LOAD_FLAGS = + EXTRA_LIBRARIES = -lnsl -ldl $(MEMUTILLIB) + TAGS = ctags + + SHAREDCODEDEF = + SHLIBDEF = + + PROTO_DEFINES = -DFUNCPROTO=15 -DNARROWPROTO + + INSTPGMFLAGS = -s + + INSTBINFLAGS = -m 0755 + INSTUIDFLAGS = -m 4755 + INSTLIBFLAGS = -m 0644 + INSTINCFLAGS = -m 0444 + INSTMANFLAGS = -m 0444 + INSTDATFLAGS = -m 0444 + INSTKMEMFLAGS = -m 4755 + + PROJECTROOT = $(ROOT)/$(MACH)/usr/X + + CDEBUGFLAGS = + CCOPTIONS = -Xa -W2,-A + + ALLINCLUDES = $(INCLUDES) $(EXTRA_INCLUDES) $(TOP_INCLUDES) $(STD_INCLUDES) + ALLDEFINES = $(ALLINCLUDES) $(STD_DEFINES) $(EXTRA_DEFINES) $(PROTO_DEFINES) $(DEFINES) + CFLAGS = $(CDEBUGFLAGS) $(CCOPTIONS) $(ALLDEFINES) + LINTFLAGS = $(LINTOPTS) -DLINT $(ALLDEFINES) + + LDLIBS = $(SYS_LIBRARIES) $(EXTRA_LIBRARIES) + + LDOPTIONS = $(CDEBUGFLAGS) $(CCOPTIONS) $(LOCAL_LDFLAGS) -T 0x8300000 -L$(USRLIBDIR) + + LDCOMBINEFLAGS = -r + DEPENDFLAGS = + + MACROFILE = usl.cf + RM_CMD = $(RM) *.CKP *.ln *.BAK *.bak *.o core errs ,* *~ *.a .emacs_* tags TAGS make.log MakeOut + + IMAKE_DEFINES = + + IRULESRC = $(CONFIGDIR) + IMAKE_CMD = $(IMAKE) -DUseInstalled -I$(IRULESRC) $(IMAKE_DEFINES) + + ICONFIGFILES = $(IRULESRC)/Imake.tmpl $(IRULESRC)/Imake.rules \ + $(IRULESRC)/Project.tmpl $(IRULESRC)/site.def \ + $(IRULESRC)/$(MACROFILE) $(EXTRA_ICONFIGFILES) + +# ------------------------------------------------------------------------- +# X Window System Build Parameters +# $XConsortium: Project.tmpl,v 1.142 92/01/25 16:44:02 rws Exp $ + +# ------------------------------------------------------------------------- +# X Window System make variables; this need to be coordinated with rules + + PATHSEP = / + USRLIBDIR = $(ROOT)/$(MACH)/usr/X/lib + BINDIR = $(ROOT)/$(MACH)/usr/X/bin + INCROOT = $(ROOT)/$(MACH)/usr/X/include + BUILDINCROOT = $(TOP) + BUILDINCDIR = $(BUILDINCROOT)/X11 + BUILDINCTOP = .. + INCDIR = $(INCROOT)/X11 + ADMDIR = /usr/adm + LIBDIR = $(USRLIBDIR) + CONFIGDIR = $(LIBDIR)/config + LINTLIBDIR = $(USRLIBDIR)/lint + + FONTDIR = $(LIBDIR)/fonts + XINITDIR = $(LIBDIR)/xinit + XDMDIR = $(LIBDIR)/xdm + TWMDIR = $(LIBDIR)/twm + MANPATH = $(ROOT)/$(MACH)/usr/X/man + MANSOURCEPATH = $(MANPATH)/man + MANSUFFIX = n + LIBMANSUFFIX = 3 + MANDIR = $(MANSOURCEPATH)$(MANSUFFIX) + LIBMANDIR = $(MANSOURCEPATH)$(LIBMANSUFFIX) + NLSDIR = $(LIBDIR)/nls + PEXAPIDIR = $(LIBDIR)/PEX + XAPPLOADDIR = $(LIBDIR)/app-defaults + FONTCFLAGS = -L -l -t + + INSTAPPFLAGS = $(INSTDATFLAGS) + + IMAKE = imake + DEPEND = makedepend + RGB = rgb + + FONTC = bdftosnf + + MKFONTDIR = mkfontdir + MKDIRHIER = /bin/sh $(BINDIR)/mkdirhier + + CONFIGSRC = $(TOP)/config + DOCUTILSRC = $(TOP)/doc/util + CLIENTSRC = $(TOP)/clients + DEMOSRC = $(TOP)/demos + LIBSRC = $(TOP)/lib + FONTSRC = $(TOP)/fonts + INCLUDESRC = $(TOP)/X11 + SERVERSRC = $(TOP)/server + UTILSRC = $(TOP)/util + SCRIPTSRC = $(UTILSRC)/scripts + EXAMPLESRC = $(TOP)/examples + CONTRIBSRC = $(TOP)/../contrib + DOCSRC = $(TOP)/doc + RGBSRC = $(TOP)/rgb + DEPENDSRC = $(UTILSRC)/makedepend + IMAKESRC = $(CONFIGSRC) + XAUTHSRC = /usr/X/lib + XLIBSRC = /usr/X/lib + XMUSRC = /usr/X/lib + TOOLKITSRC = /usr/X/lib + AWIDGETSRC = /usr/X/lib + OLDXLIBSRC = /usr/X/lib + XDMCPLIBSRC = /usr/X/lib + + BDFTOSNFSRC = $(FONTSRC)/clients/bdftosnf + + MKFONTDIRSRC = $(FONTSRC)/clients/mkfontdir + FSLIBSRC = $(FONTSRC)/lib/fs + FONTSERVERSRC = $(FONTSRC)/server + EXTENSIONSRC = $(TOP)/extensions + XILIBSRC = $(EXTENSIONSRC)/lib/xinput + XTESTLIBSRC = $(EXTENSIONSRC)/lib/xtest + PHIGSLIBSRC = $(EXTENSIONSRC)/lib/PEX + +# $XConsortium: sv4Lib.tmpl,v 1.6 92/01/25 16:46:55 rws Exp $ + +# +# USL: BEGIN +# The default revision numbers from MIT is 5. But since USL has to be +# backward compatible, so force it to 1 +# + + SOXOLREV = 1 + SOOLITREV = 1 + SOOLITMREV = 1 + SOOLITOREV = 1 + SODTREV = 1 + +# USL: END + +SHLIBLDFLAGS = -G -z text +PICFLAGS = -K PIC + + DEPEXTENSIONLIB = + EXTENSIONLIB = -lXext + + DEPXLIB = $(DEPEXTENSIONLIB) + XLIB = $(EXTENSIONLIB) -lX11 + + DEPXMULIB = $(USRLIBDIR)/libXmu.so.$(SOXMUREV) + + XMULIB = -lXmu + + DEPOLDXLIB = + OLDXLIB = -loldX + + DEPXTOOLLIB = + XTOOLLIB = -lXt + + DEPXOLLIB = $(USRLIBDIR)/libOlit.so.$(SOXOLREV) + XOLLIB = -lOlit + + DEPXAWLIB = + XAWLIB = -lXaw + + DEPXILIB = + XILIB = -lXi + + DEPXTESTLIB = + XTESTLIB = -lXtst + +# +# USL: BEGIN +# + +XHOSTLOC = $(DESTDIR)/$(LIBDIR) +SHLIBFLAGS = -L $(ROOT)/$(MACH)/usr/lib -L $(ROOT)/$(MACH)/lib -L $(XHOSTLOC) + +# +# USL: END +# + + SOXLIBREV = 1 + SOXTREV = 1 + SOXAWREV = 1 + SOOLDXREV = 1 + SOXMUREV = 1 + SOXEXTREV = 1 + SOXINPUTREV = 1 + SOXTESTREV = 1 + SOXTRAPREV = 1 + + DEPXAUTHLIB = $(USRLIBDIR)/libXau.a + XAUTHLIB = -lXau + DEPXDMCPLIB = $(USRLIBDIR)/libXdmcp.a + XDMCPLIB = -lXdmcp + + DEPPHIGSLIB = $(USRLIBDIR)/libphigs.a + PHIGSLIB = -lphigs + + DEPXBSDLIB = $(USRLIBDIR)/libXbsd.a + XBSDLIB = -lXbsd + + LINTEXTENSIONLIB = $(LINTLIBDIR)/llib-lXext.ln + LINTXLIB = $(LINTLIBDIR)/llib-lX11.ln + LINTXMU = $(LINTLIBDIR)/llib-lXmu.ln + LINTXTOOL = $(LINTLIBDIR)/llib-lXt.ln + LINTXAW = $(LINTLIBDIR)/llib-lXaw.ln + LINTXI = $(LINTLIBDIR)/llib-lXi.ln + LINTPHIGS = $(LINTLIBDIR)/llib-lphigs.ln + + DEPLIBS = $(DEPXAWLIB) $(DEPXMULIB) $(DEPXTOOLLIB) $(DEPXLIB) + + DEPLIBS1 = $(DEPLIBS) + DEPLIBS2 = $(DEPLIBS) + DEPLIBS3 = $(DEPLIBS) + +# ------------------------------------------------------------------------- +# Imake rules for building libraries, programs, scripts, and data files +# rules: $XConsortium: Imake.rules,v 1.126 91/12/30 20:14:35 rws Exp $ + +# ------------------------------------------------------------------------- +# start of Imakefile + + MOTIFINCLUDES = -I/usr/X/include + MOTIFLDOPTIONS = -L/usr/X/lib + MOTIFLIBS = -lXm + +EXTRA_LIBRARIES= -lgen -L/usr/ucblib -lucb -lnsl + + 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) + +# ------------------------------------------------------------------------- +# common rules for all Makefiles - do not edit + +emptyrule:: + +clean:: + $(RM_CMD) "#"* + +Makefile:: + -@if [ -f Makefile ]; then set -x; \ + $(RM) Makefile.bak; $(MV) Makefile Makefile.bak; \ + else exit 0; fi + $(IMAKE_CMD) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT_DIR) + +tags:: + $(TAGS) -w *.[ch] + $(TAGS) -xw *.[ch] > TAGS + +# ------------------------------------------------------------------------- +# empty rules for directories that do not have SUBDIRS - do not edit + +install:: + @echo "install in $(CURRENT_DIR) done" + +install.man:: + @echo "install.man in $(CURRENT_DIR) done" + +Makefiles:: + +includes:: + +# ------------------------------------------------------------------------- +# dependencies generated by makedepend + diff --git a/utils/fade.c b/utils/fade.c index 2fbb2e97..8d486690 100644 --- a/utils/fade.c +++ b/utils/fade.c @@ -96,9 +96,9 @@ fade_colormap (dpy, cmap, cmap2, seconds, ticks, out_p) int j; for (j = 0; j < ncolors; j++) { - current_colors[j].red = orig_colors[j].red * i / steps; - current_colors[j].green = orig_colors[j].green * i / steps; - current_colors[j].blue = orig_colors[j].blue * i / steps; + current_colors[j].red = (int)orig_colors[j].red * i / steps; + current_colors[j].green = (int)orig_colors[j].green * i / steps; + current_colors[j].blue = (int)orig_colors[j].blue * i / steps; } XStoreColors (dpy, cmap2, current_colors, ncolors); XSync (dpy, False); diff --git a/utils/grabscreen.c b/utils/grabscreen.c new file mode 100644 index 00000000..7e79f382 --- /dev/null +++ b/utils/grabscreen.c @@ -0,0 +1,117 @@ +/* xscreensaver, Copyright (c) 1992, 1993 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. + */ + +/* This file contains code for grabbing an image of the screen to hack its + bits. This is a little tricky, since doing this involves the need to tell + the difference between drawing on the actual root window, and on the fake + root window used by the screensaver, since at this level the illusion + breaks down... + */ + +#if __STDC__ +#include +#endif + +#include +#include + +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; +} + +Pixmap +grab_screen_image (dpy, window, root_p) + Display *dpy; + Window window; + int root_p; +{ + Pixmap pixmap = 0; + XWindowAttributes xgwa; + + XGetWindowAttributes (dpy, window, &xgwa); + + if (screensaver_window_p (dpy, window)) + { + /* note: this assumes vroot.h didn't encapsulate the XRootWindowOfScreen + function, only the RootWindowOfScreen macro... */ + Window real_root = XRootWindowOfScreen (DefaultScreenOfDisplay (dpy)); + + XSetWindowBackgroundPixmap (dpy, window, None); + + /* prevent random viewer of the screen saver (locker) from messing + with windows. We don't check whether it succeeded, because what + are our options, really... */ + XGrabPointer (dpy, real_root, True, ButtonPressMask|ButtonReleaseMask, + GrabModeAsync, GrabModeAsync, None, None, CurrentTime); + XGrabKeyboard (dpy, real_root, True, GrabModeSync, GrabModeAsync, + CurrentTime); + + XUnmapWindow (dpy, window); + XSync (dpy, True); + sleep (5); /* wait for everyone to swap in and handle exposes... */ + XMapRaised (dpy, window); + + XUngrabPointer (dpy, CurrentTime); + XUngrabKeyboard (dpy, CurrentTime); + + XSync (dpy, True); + } + else if (root_p) + { + XGCValues gcv; + GC gc; + gcv.function = GXcopy; + gcv.subwindow_mode = IncludeInferiors; + gc = XCreateGC (dpy, window, GCFunction | GCSubwindowMode, &gcv); + pixmap = XCreatePixmap(dpy, window, xgwa.width, xgwa.height, xgwa.depth); + XCopyArea (dpy, RootWindowOfScreen (xgwa.screen), pixmap, gc, + xgwa.x, xgwa.y, xgwa.width, xgwa.height, 0, 0); + XFreeGC (dpy, gc); + XSetWindowBackgroundPixmap (dpy, window, pixmap); + } + else + { + XEvent event; + XSetWindowBackgroundPixmap (dpy, window, None); + XMapWindow (dpy, window); + XFlush (dpy); + XIfEvent (dpy, &event, MapNotify_event_p, (XPointer) window); + XSync (dpy, True); + } + return pixmap; +} diff --git a/utils/spline.c b/utils/spline.c index ed5a224a..8b341c6c 100644 --- a/utils/spline.c +++ b/utils/spline.c @@ -1,3 +1,29 @@ +/* + * 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 some time in 1992. + */ + #include #include "spline.h" #if __STDC__ diff --git a/utils/spline.h b/utils/spline.h index c0c4d7fd..a8a04d5e 100644 --- a/utils/spline.h +++ b/utils/spline.h @@ -1,3 +1,29 @@ +/* + * 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 some time in 1992. + */ + #ifndef _SPLINE_H_ #define _SPLINE_H_ diff --git a/utils/usleep.c b/utils/usleep.c index 2529d57f..ed779a4a 100644 --- a/utils/usleep.c +++ b/utils/usleep.c @@ -13,6 +13,10 @@ #include #endif +#ifdef SVR4 +#include +#endif + #include #include /* lazy way out */ diff --git a/utils/version.h b/utils/version.h index 867367a3..a7920974 100644 --- a/utils/version.h +++ b/utils/version.h @@ -1,2 +1,2 @@ static char *screensaver_id = - "@(#)xscreensaver 1.17, by Jamie Zawinski (jwz@lucid.com)"; + "@(#)xscreensaver 1.18, by Jamie Zawinski (jwz@lucid.com)"; -- 2.30.2