xsnow-1.42.orig/0000755000175000017500000000000007406760174013364 5ustar caiqiancaiqianxsnow-1.42.orig/Makefile0000600000175000017500000006425707406760043015025 0ustar caiqiancaiqian# Makefile generated by imake - do not edit! # $TOG: imake.c /main/104 1998/03/24 12:45:15 kaleb $ # ---------------------------------------------------------------------- # Makefile generated from "Imake.tmpl" and # $TOG: Imake.tmpl /main/249 1997/10/13 15:28:56 kaleb $ # # # # # $XFree86: xc/config/cf/Imake.tmpl,v 3.87 2000/12/02 19:06:57 herrb Exp $ # ---------------------------------------------------------------------- all:: .SUFFIXES: .i # $TOG: Imake.cf /main/30 1998/04/28 13:55:25 barstow $ # $XFree86: xc/config/cf/Imake.cf,v 3.63 2000/11/06 19:24:00 dawes Exp $ # Keep cpp from replacing path elements containing 1/i586/i686 # for compatibility with 3.3.x # ----------------------------------------------------------------------- # site-specific configuration parameters that need to come before # the platform-specific parameters - edit site.def to change # site: $TOG: site.sample /main/r64_final/1 1998/02/05 16:28:49 kaleb $ # site: $XFree86: xc/config/cf/site.def,v 3.24 2000/06/25 20:17:29 dawes Exp $ # $XFree86: xc/config/cf/xf86site.def,v 3.170 2000/12/14 16:38:45 dawes Exp $ # ---------------------------------------------------------------------- # platform-specific configuration parameters - edit linux.cf to change # platform: $TOG: linux.cf /main/47 1998/04/17 11:32:51 mgreess # platform: $XFree86: xc/config/cf/linux.cf,v 3.157 2000/12/14 17:00:46 dawes Exp $ # operating system: SuSE Linux [ELF] (2.4.0) # libc: (6.2.0) # binutils: (30) # $TOG: lnxLib.rules /main/14 1998/03/16 11:15:30 mgreess $ # $XFree86: xc/config/cf/lnxLib.rules,v 3.38 2000/06/15 20:49:56 dawes Exp $ # $XFree86: xc/config/cf/xfree86.cf,v 3.338 2000/12/14 16:59:06 dawes Exp $ # $TOG: xfree86.cf /main/38 1997/10/22 13:01:59 kaleb $ AFB_DEFS = -DUSE_AFB DRIVERSDKDIR = $(USRLIBDIR)/Server DRIVERSDKMODULEDIR = $(USRLIBDIR)/Server/modules DRIVERSDKINCLUDEDIR = $(USRLIBDIR)/Server/include XF86SRC = $(SERVERSRC)/hw/xfree86 XF86COMSRC = $(XF86SRC)/common XF86PARSERSRC = $(XF86SRC)/parser XF86OSSRC = $(XF86SRC)/os-support XF86DRIVERSRC = $(XF86SRC)/drivers DRIVERSRC = $(XF86DRIVERSRC) XFREE86DOCDIR = $(DOCDIR) XFREE86PSDOCDIR = $(DOCPSDIR) XFREE86HTMLDOCDIR = $(DOCHTMLDIR) XFREE86JAPANESEDOCDIR = $(DOCDIR)/Japanese # $XConsortium: xf86.rules /main/9 1996/10/31 14:54:26 kaleb $ # $XFree86: xc/config/cf/xf86.rules,v 3.32 2000/10/30 23:02:06 tsi Exp $ # ---------------------------------------------------------------------- # site-specific configuration parameters that go after # the platform-specific parameters - edit site.def to change # site: $TOG: site.sample /main/r64_final/1 1998/02/05 16:28:49 kaleb $ # site: $XFree86: xc/config/cf/site.def,v 3.24 2000/06/25 20:17:29 dawes Exp $ # --------------------------------------------------------------------- # Imake rules for building libraries, programs, scripts, and data files # rules: $TOG: Imake.rules /main/227 1998/02/02 12:07:57 kaleb $ # # # # # rules: $XFree86: xc/config/cf/Imake.rules,v 3.86 2000/12/12 17:05:30 dawes Exp $ _NULLCMD_ = @ echo -n GLIDE2INCDIR = /usr/include/glide GLIDE3INCDIR = /usr/include/glide3 GLIDE3LIBNAME = glide3 TKLIBNAME = TKLIBDIR = TCLLIBNAME = TCLIBDIR = PATHSEP = / SHELL = /bin/sh -e TOP = . CURRENT_DIR = . IMAKE = imake DEPEND = gccmakedep MKDIRHIER = mkdir -p REVPATH = revpath EXPORTLISTGEN = RMAN = rman RMANOPTIONS = -f HTML CONFIGSRC = $(TOP)/config IMAKESRC = $(CONFIGSRC)/imake DEPENDSRC = $(CONFIGSRC)/util INCROOT = /usr/X11R6/include USRLIBDIR = /usr/X11R6/lib VARDIR = /var VARLIBDIR = $(VARDIR)/lib SYSTEMUSRLIBDIR = /usr/lib SYSTEMUSRINCDIR = /usr/include SHLIBDIR = /usr/X11R6/lib LINTLIBDIR = $(USRLIBDIR)/lint MANPATH = /usr/X11R6/man MANSOURCEPATH = $(MANPATH)/man MANDIR = $(MANSOURCEPATH)1 LIBMANDIR = $(MANSOURCEPATH)3 FILEMANDIR = $(MANSOURCEPATH)5 MISCMANDIR = $(MANSOURCEPATH)$(MISCMANSUFFIX) DRIVERMANDIR = $(MANSOURCEPATH)$(DRIVERMANSUFFIX) LOGDIRECTORY = $(VARDIR)/log VARRUNDIR = $(VARDIR)/run VARDBDIR = /var/lib AR = ar clq BOOTSTRAPCFLAGS = CC = gcc AS = as .SUFFIXES: .cc CXX = c++ CXXFILT = c++filt CXXLIB = CXXDEBUGFLAGS = -O2 CXXDEPENDINCLUDES = CXXEXTRA_DEFINES = CXXEXTRA_INCLUDES = CXXSTD_DEFINES = -Dlinux -D__i386__ -D_POSIX_C_SOURCE=199309L -D_POSIX_SOURCE -D_XOPEN_SOURCE -D_BSD_SOURCE -D_SVID_SOURCE $(CXXPROJECT_DEFINES) CXXOPTIONS = CXXINCLUDES = $(INCLUDES) $(TOP_INCLUDES) $(CXXEXTRA_INCLUDES) CXXDEFINES = $(CXXINCLUDES) $(CXXSTD_DEFINES) $(THREADS_CXXDEFINES) $(CXXEXTRA_DEFINES) $(DEFINES) CXXFLAGS = $(CXXDEBUGFLAGS) $(CXXOPTIONS) $(THREADS_CXXFLAGS) $(CXXDEFINES) COMPRESS = compress GZIPCMD = gzip CPP = /lib/cpp $(STD_CPP_DEFINES) RAWCPP = /lib/cpp -undef $(STD_CPP_OPTIONS) PREPROCESSCMD = gcc -E $(STD_CPP_DEFINES) INSTALL = install INSTALLFLAGS = -c LD = ld LEX = flex -l M4 = m4 M4FLAGS = LEXLIB = -lfl YACC = bison -y CCYACC = bison -y LINT = lint LINTLIBFLAG = -C LINTOPTS = -axz LN = ln -s MAKE = make MV = mv -f CP = cp RANLIB = ranlib RANLIBINSTFLAGS = RM = rm -f PERL = perl PERLOPTS = MANSUFFIX = 1x LIBMANSUFFIX = 3x FILEMANSUFFIX = 5x MISCMANSUFFIX = 7 DRIVERMANSUFFIX = 4 MANDEFS = -D__filemansuffix__=$(FILEMANSUFFIX) -D__miscmansuffix__=$(MISCMANSUFFIX) -D__drivermansuffix__=$(DRIVERMANSUFFIX) -D__projectroot__=$(PROJECTROOT) TROFF = groff -Tps NROFF = nroff MSMACROS = -ms MANMACROS = -man TBL = tbl EQN = eqn NEQN = neqn COL = col COLFLAGS = -b MODCC = gcc MODCPP = /lib/cpp MODCFLAGS = $(CDEBUGFLAGS) $(CCOPTIONS) $(THREAD_CFLAGS) $(ALLDEFINES) MODAS = as MODASFLAGS = MODLD = ld MODLDFLAGS = MODLDCOMBINEFLAGS = -r MODAR = ar clq MODRANLIB = STD_INCLUDES = STD_CPP_OPTIONS = -traditional STD_CPP_DEFINES = -traditional -Dlinux -D__i386__ -D_POSIX_C_SOURCE=199309L -D_POSIX_SOURCE -D_XOPEN_SOURCE -D_BSD_SOURCE -D_SVID_SOURCE $(PROJECT_DEFINES) STD_DEFINES = -Dlinux -D__i386__ -D_POSIX_C_SOURCE=199309L -D_POSIX_SOURCE -D_XOPEN_SOURCE -D_BSD_SOURCE -D_SVID_SOURCE $(PROJECT_DEFINES) EXTRA_LOAD_FLAGS = EXTRA_LDOPTIONS = EXTRA_LIBRARIES = TAGS = ctags PARALLELMFLAGS = SHAREDCODEDEF = SHLIBDEF = SHLIBLDFLAGS = -shared PICFLAGS = -fPIC CXXPICFLAGS = -fPIC PROTO_DEFINES = -DFUNCPROTO=15 -DNARROWPROTO INSTPGMFLAGS = INSTBINFLAGS = -m 0755 INSTUIDFLAGS = -m 4711 INSTLIBFLAGS = -m 0644 INSTINCFLAGS = -m 0444 INSTMANFLAGS = -m 0444 INSTDATFLAGS = -m 0444 INSTKMEMFLAGS = -m 4711 PROJECTROOT = /usr/X11R6 CDEBUGFLAGS = -O2 CCOPTIONS = ALLINCLUDES = $(INCLUDES) $(EXTRA_INCLUDES) $(TOP_INCLUDES) $(STD_INCLUDES) ALLDEFINES = $(ALLINCLUDES) $(STD_DEFINES) $(EXTRA_DEFINES) $(PROTO_DEFINES) $(THREADS_DEFINES) $(MODULE_DEFINES) $(DEFINES) CFLAGS = $(CDEBUGFLAGS) $(CCOPTIONS) $(THREADS_CFLAGS) $(MODULE_CFLAGS) $(ALLDEFINES) LINTFLAGS = $(LINTOPTS) -DLINT $(ALLDEFINES) $(DEPEND_DEFINES) LDPRELIB = -L$(USRLIBDIR) LDPOSTLIB = LDOPTIONS = $(CDEBUGFLAGS) $(CCOPTIONS) $(EXTRA_LDOPTIONS) $(THREADS_LDFLAGS) $(LOCAL_LDFLAGS) $(LDPRELIBS) CXXLDOPTIONS = $(CXXDEBUGFLAGS) $(CXXOPTIONS) $(EXTRA_LDOPTIONS) $(THREADS_CXXLDFLAGS) $(LOCAL_LDFLAGS) $(LDPRELIBS) LDLIBS = $(LDPOSTLIBS) $(THREADS_LIBS) $(SYS_LIBRARIES) $(EXTRA_LIBRARIES) CCLINK = $(CC) CXXLINK = $(CXX) LDSTRIPFLAGS = -x LDCOMBINEFLAGS = -r DEPENDFLAGS = # Not sure this belongs here TKLIBDIR = TKINCDIR = TKLIBNAME = TKLIBRARY = -L$(TKLIBDIR) -l$(TKLIBNAME) TCLLIBDIR = TCLINCDIR = TCLLIBNAME = TCLLIBRARY = -L$(TCLLIBDIR) -l$(TCLLIBNAME) MACROFILE = linux.cf RM_CMD = $(RM) IMAKE_DEFINES = IRULESRC = $(CONFIGDIR) IMAKE_CMD = $(IMAKE) -DUseInstalled -I$(IRULESRC) $(IMAKE_DEFINES) ICONFIGFILES = $(IRULESRC)/Imake.tmpl $(IRULESRC)/X11.tmpl $(IRULESRC)/site.def $(IRULESRC)/$(MACROFILE) $(IRULESRC)/xfree86.cf $(IRULESRC)/xf86.rules $(IRULESRC)/xf86site.def $(IRULESRC)/host.def $(EXTRA_ICONFIGFILES) # $TOG: X11.rules /main/4 1997/04/30 15:23:24 kaleb $ # $XFree86: xc/config/cf/X11.rules,v 1.5 2000/11/06 19:24:00 dawes Exp $ # ---------------------------------------------------------------------- # X Window System Build Parameters and Rules # $TOG: X11.tmpl /main/308 1998/06/16 15:14:24 msr $ # # # # # $XFree86: xc/config/cf/X11.tmpl,v 1.93 2000/12/15 18:18:04 keithp Exp $ STICKY_DEFINES = -DHAS_STICKY_DIR_BIT FCHOWN_DEFINES = -DHAS_FCHOWN # ----------------------------------------------------------------------- # X Window System make variables; these need to be coordinated with rules XTOP = $(TOP) BINDIR = /usr/X11R6/bin BUILDINCROOT = $(TOP)/exports BUILDINCDIR = $(BUILDINCROOT)/include BUILDINCTOP = ../.. BUILDLIBDIR = $(TOP)/exports/lib BUILDLIBTOP = ../.. BUILDBINDIR = $(TOP)/exports/bin BUILDBINTOP = ../.. BUILDMODULEDIR = $(BUILDLIBDIR)/modules BUILDMODULETOP = $(BUILDLIBTOP)/.. XBUILDINCROOT = $(XTOP)/exports XBUILDINCDIR = $(XBUILDINCROOT)/include/X11 XBUILDINCTOP = ../../.. XBUILDBINDIR = $(XBUILDINCROOT)/bin INCDIR = $(INCROOT) ADMDIR = /usr/adm LIBDIR = $(USRLIBDIR)/X11 LIBEXECDIR = /usr/X11R6/libexec MODULEDIR = $(USRLIBDIR)/modules TOP_X_INCLUDES = ETCX11DIR = /etc/X11 CONFDIR = $(ETCX11DIR) DOCDIR = $(LIBDIR)/doc DOCHTMLDIR = $(DOCDIR)/html DOCPSDIR = $(DOCDIR)/PostScript FONTDIR = $(LIBDIR)/fonts ENCODINGSDIR = $(FONTDIR)/encodings XINITDIR = $(LIBDIR)/xinit XDMDIR = /etc/X11/xdm XDMVARDIR = $(VARLIBDIR)/xdm TWMDIR = $(LIBDIR)/twm XSMDIR = $(LIBDIR)/xsm NLSDIR = $(LIBDIR)/nls XLOCALEDIR = $(LIBDIR)/locale PEXAPIDIR = $(LIBDIR)/PEX LBXPROXYDIR = $(LIBDIR)/lbxproxy PROXYMANAGERDIR = $(LIBDIR)/proxymngr XPRINTDIR = $(LIBDIR)/xserver XAPPLOADDIR = $(LIBDIR)/app-defaults FONTCFLAGS = -t INSTAPPFLAGS = $(INSTDATFLAGS) RGB = $(BINDIR)/rgb FONTC = $(BINDIR)/bdftopcf MKFONTDIR = $(BINDIR)/mkfontdir MKHTMLINDEX = $(BINDIR)/mkhtmlindex UCS2ANY = $(BINDIR)/ucs2any.pl BDFTRUNCATE = $(BINDIR)/bdftruncate.pl UCSMAPPREFIX = $(FONTDIR)/util/map- HTMLINDEXCMD = HtmlIndexCmd DOCUTILSRC = $(XTOP)/doc/util CLIENTSRC = $(TOP)/clients DEMOSRC = $(TOP)/demos XDOCMACROS = $(DOCUTILSRC)/macros.t XIDXMACROS = $(DOCUTILSRC)/indexmacros.t PROGRAMSRC = $(TOP)/programs LIBSRC = $(XTOP)/lib FONTSRC = $(XTOP)/fonts ENCODINGSSRC = $(FONTSRC)/encodings INCLUDESRC = $(BUILDINCROOT)/include XINCLUDESRC = $(INCLUDESRC)/X11 SERVERSRC = $(XTOP)/programs/Xserver CONTRIBSRC = $(XTOP)/../contrib UNSUPPORTEDSRC = $(XTOP)/unsupported DOCSRC = $(XTOP)/doc RGBSRC = $(XTOP)/programs/rgb BDFTOPCFSRC = $(PROGRAMSRC)/bdftopcf MKFONTDIRSRC = $(PROGRAMSRC)/mkfontdir FONTSERVERSRC = $(PROGRAMSRC)/xfs FONTINCSRC = $(XTOP)/include/fonts EXTINCSRC = $(XTOP)/include/extensions FTSOURCEDIR = $(TOP)/extras/FreeType XTTSOURCEDIR = $(TOP)/extras/X-TrueType MESASRCDIR = $(TOP)/extras/Mesa OGLSAMPLESRCDIR = $(TOP)/extras/ogl-sample PSWRAPSRC = $(XTOP)/config/pswrap TRANSCOMMSRC = $(LIBSRC)/xtrans TRANS_INCLUDES = -I$(TRANSCOMMSRC) CONNECTION_FLAGS = -DUNIXCONN -DTCPCONN $(STICKY_DEFINES) $(FCHOWN_DEFINES) XENVLIBDIR = $(USRLIBDIR) CLIENTENVSETUP = LD_LIBRARY_PATH=$(XENVLIBDIR) # $TOG: lnxLib.tmpl /main/7 1998/03/20 14:26:41 mgreess $ # $XFree86: xc/config/cf/lnxLib.tmpl,v 3.12 1999/06/27 14:07:17 dawes Exp $ XLIBSRC = $(LIBSRC)/X11 SOXLIBREV = 6.2 DEPXONLYLIB = XONLYLIB = -lX11 LINTXONLY = $(LINTLIBDIR)/llib-lX11.ln XLIBONLY = $(XONLYLIB) XEXTLIBSRC = $(LIBSRC)/Xext SOXEXTREV = 6.4 DEPEXTENSIONLIB = EXTENSIONLIB = -lXext LINTEXTENSION = $(LINTLIBDIR)/llib-lXext.ln LINTEXTENSIONLIB = $(LINTEXTENSION) DEPXLIB = $(DEPEXTENSIONLIB) $(DEPXONLYLIB) XLIB = $(EXTENSIONLIB) $(XONLYLIB) LINTXLIB = $(LINTXONLYLIB) XSSLIBSRC = $(LIBSRC)/Xss DEPXSSLIB = $(USRLIBDIR)/libXss.a XSSLIB = -lXss LINTXSS = $(LINTLIBDIR)/llib-lXss.ln XXF86MISCLIBSRC = $(LIBSRC)/Xxf86misc SOXXF86MISCREV = 1.0 DEPXXF86MISCLIB = XXF86MISCLIB = -lXxf86misc LINTXXF86MISC = $(LINTLIBDIR)/llib-lXxf86misc.ln XXF86VMLIBSRC = $(LIBSRC)/Xxf86vm SOXXF86VMREV = 1.0 DEPXXF86VMLIB = XXF86VMLIB = -lXxf86vm LINTXXF86VM = $(LINTLIBDIR)/llib-lXxf86vm.ln XXF86DGALIBSRC = $(LIBSRC)/Xxf86dga SOXXF86DGAREV = 1.0 DEPXXF86DGALIB = XXF86DGALIB = -lXxf86dga LINTXXF86DGA = $(LINTLIBDIR)/llib-lXxf86dga.ln XXF86RUSHLIBSRC = $(LIBSRC)/Xxf86rush DEPXXF86RUSHLIB = $(USRLIBDIR)/libXxf86rush.a XXF86RUSHLIB = -lXxf86rush LINTXXF86RUSH = $(LINTLIBDIR)/llib-lXxf86rush.ln XVLIBSRC = $(LIBSRC)/Xv SOXVREV = 1.0 DEPXVLIB = XVLIB = -lXv LINTXV = $(LINTLIBDIR)/llib-lXv.ln XINERAMALIBSRC = $(LIBSRC)/Xinerama DEPXINERAMALIB = $(USRLIBDIR)/libXinerama.a XINERAMALIB = -lXinerama LINTXINERAMA = $(LINTLIBDIR)/llib-lXinerama.ln XINERAMALIBSRC = $(LIBSRC)/Xinerama DEPXINERAMALIB = $(USRLIBDIR)/libXinerama.a XINERAMALIB = -lXinerama LINTXINERAMA = $(LINTLIBDIR)/llib-lXinerama.ln DPSLIBSRC = $(LIBSRC)/dps SODPSREV = 1.0 DEPDPSLIB = DPSLIB = -ldps LINTDPS = $(LINTLIBDIR)/llib-ldps.ln DPSTKLIBSRC = $(LIBSRC)/dpstk SODPSTKREV = 1.0 DEPDPSTKLIB = DPSTKLIB = -ldpstk LINTDPSTK = $(LINTLIBDIR)/llib-ldpstk.ln PSRESLIBSRC = $(LIBSRC)/psres SOPSRESREV = 1.0 DEPPSRESLIB = PSRESLIB = -lpsres LINTPSRES = $(LINTLIBDIR)/llib-lpsres.ln GLXLIBSRC = $(LIBSRC)/GL SOGLREV = 1.2 DEPGLXLIB = GLXLIB = -lGL LINTGLX = $(LINTLIBDIR)/llib-lGL.ln GLWIDGETSRC = $(LIBSRC)/GLw DEPGLWLIB = $(USRLIBDIR)/libGLw.a GLWLIB = -lGLw LINTGLW = $(LINTLIBDIR)/llib-lGLw.ln XRENDERLIBSRC = $(LIBSRC)/Xrender SOXRENDERREV = 1.0 DEPXRENDERLIB = XRENDERLIB = -lXrender LINTXRENDER = $(LINTLIBDIR)/llib-lXrender.ln XFONTCACHELIBSRC = $(LIBSRC)/Xfontcache DEPXFONTCACHELIB = $(USRLIBDIR)/libXfontcache.a XFONTCACHELIB = -lXfontcache LINTXFONTCACHE = $(LINTLIBDIR)/llib-lXfontcache.ln XAUTHSRC = $(LIBSRC)/Xau DEPXAUTHLIB = $(USRLIBDIR)/libXau.a XAUTHLIB = -lXau LINTXAUTH = $(LINTLIBDIR)/llib-lXau.ln XDMCPLIBSRC = $(LIBSRC)/Xdmcp DEPXDMCPLIB = $(USRLIBDIR)/libXdmcp.a XDMCPLIB = -lXdmcp LINTXDMCP = $(LINTLIBDIR)/llib-lXdmcp.ln XMUSRC = $(LIBSRC)/Xmu SOXMUREV = 6.2 DEPXMULIB = XMULIB = -lXmu LINTXMU = $(LINTLIBDIR)/llib-lXmu.ln OLDXLIBSRC = $(LIBSRC)/oldX DEPOLDXLIB = $(USRLIBDIR)/liboldX.a OLDXLIB = -loldX LINTOLDX = $(LINTLIBDIR)/llib-loldX.ln XPLIBSRC = $(LIBSRC)/Xp SOXPREV = 6.2 DEPXPLIB = XPLIB = -lXp LINTXP = $(LINTLIBDIR)/llib-lXp.ln TOOLKITSRC = $(LIBSRC)/Xt SOXTREV = 6.0 DEPXTOOLONLYLIB = XTOOLONLYLIB = -lXt LINTXTOOLONLY = $(LINTLIBDIR)/llib-lXt.ln DEPXTOOLLIB = $(DEPXTOOLONLYLIB) $(DEPSMLIB) $(DEPICELIB) XTOOLLIB = $(XTOOLONLYLIB) $(SMLIB) $(ICELIB) LINTXTOOLLIB = $(LINTXTOOLONLYLIB) XALIBSRC = $(LIBSRC)/Xa SOXAREV = 1.0 DEPXALIB = XALIB = -lXa LINTXA = $(LINTLIBDIR)/llib-lXa.ln AWIDGETSRC = $(LIBSRC)/Xaw SOXAWREV = 7.0 DEPXAWLIB = XAWLIB = -lXaw LINTXAW = $(LINTLIBDIR)/llib-lXaw.ln AWIDGET6SRC = $(LIBSRC)/Xaw6 SOXAW6REV = 6.1 DEPXAW6LIB = XAW6LIB = -lXaw LINTXAW6 = $(LINTLIBDIR)/llib-lXaw.ln XILIBSRC = $(LIBSRC)/Xi SOXINPUTREV = 6.0 DEPXILIB = XILIB = -lXi LINTXI = $(LINTLIBDIR)/llib-lXi.ln XTESTLIBSRC = $(LIBSRC)/Xtst SOXTESTREV = 6.1 DEPXTESTLIB = XTESTLIB = -lXtst LINTXTEST = $(LINTLIBDIR)/llib-lXtst.ln PEXLIBSRC = $(LIBSRC)/PEX5 SOPEXREV = 6.0 DEPPEXLIB = PEXLIB = -lPEX5 LINTPEX = $(LINTLIBDIR)/llib-lPEX5.ln XIELIBSRC = $(LIBSRC)/XIE SOXIEREV = 6.0 DEPXIELIB = XIELIB = -lXIE LINTXIE = $(LINTLIBDIR)/llib-lXIE.ln PHIGSLIBSRC = $(LIBSRC)/PHIGS DEPPHIGSLIB = $(USRLIBDIR)/libphigs.a PHIGSLIB = -lphigs LINTPHIGS = $(LINTLIBDIR)/llib-lphigs.ln DEPXBSDLIB = $(USRLIBDIR)/libXbsd.a XBSDLIB = -lXbsd LINTXBSD = $(LINTLIBDIR)/llib-lXbsd.ln ICESRC = $(LIBSRC)/ICE SOICEREV = 6.3 DEPICELIB = ICELIB = -lICE LINTICE = $(LINTLIBDIR)/llib-lICE.ln SMSRC = $(LIBSRC)/SM SOSMREV = 6.0 DEPSMLIB = SMLIB = -lSM LINTSM = $(LINTLIBDIR)/llib-lSM.ln XKEYSRC = $(LIBSRC)/Xkey SOXKEYREV = 6.0 DEPXKEYLIB = XKEYLIB = -lXkey LINTXKEY = $(LINTLIBDIR)/llib-lXkey.ln FSLIBSRC = $(LIBSRC)/FS DEPFSLIB = $(USRLIBDIR)/libFS.a FSLIB = -lFS LINTFS = $(LINTLIBDIR)/llib-lFS.ln FONTLIBSRC = $(LIBSRC)/font SOFONTREV = 1.3 DEPFONTLIB = FONTLIB = -L$(FREETYPELIBDIR) -L$(FONTLIBSRC) -lXfont LINTXFONT = $(LINTLIBDIR)/llib-lXfont.ln # SOFONTREV = 1.3 DEPXFONTLIB = XFONTLIB = -lXfont LINTXFONT = $(LINTLIBDIR)/llib-lXfont.ln FONTSTUBLIBSRC = $(FONTLIBSRC)/stubs DEPFONTSTUBLIB = $(USRLIBDIR)/libfntstubs.a FONTSTUBLIB = -lfntstubs LINTFONTSTUB = $(LINTLIBDIR)/llib-lfntstubs.ln DEPFONTLIB = $(DEPXFONTLIB) $(DEPFONTSTUBLIB) FONTLIB = $(XFONTLIB) $(FONTSTUBLIB) XPMLIBSRC = $(LIBSRC)/Xpm SOXPMREV = 4.11 DEPXPMLIB = XPMLIB = -lXpm LINTXPM = $(LINTLIBDIR)/llib-lXpm.ln XFTLIBSRC = $(LIBSRC)/Xft SOXFTREV = 1.0 DEPXFTLIB = XFTLIB = -lXft LINTXFT = $(LINTLIBDIR)/llib-lXft.ln FREETYPE2DIR = freetype-2.0.1 FREETYPE2LIBDIR = freetype-2.0.1/lib FREETYPE2INCDIR = freetype-2.0.1/include/freetype2 FREETYPE2INCLUDES = -I$(FREETYPE2INCDIR) FREETYPE2LIB = -L$(FREETYPE2LIBDIR) -lfreetype FREETYPE2DEFINES = -DFREETYPE2 XKBFILELIBSRC = $(LIBSRC)/xkbfile DEPXKBFILELIB = $(USRLIBDIR)/libxkbfile.a XKBFILELIB = -lxkbfile LINTXKBFILE = $(LINTLIBDIR)/llib-lxkbfile.ln XKBCOMPCMD = $(BINDIR)/xkbcomp XKBUILIBSRC = $(LIBSRC)/xkbui DEPXKBUILIB = $(USRLIBDIR)/libxkbui.a XKBUILIB = -lxkbui LINTXKBUI = $(LINTLIBDIR)/llib-lxkbui.ln DEPLIBS = $(DEPXAWLIB) $(DEPXMULIB) $(DEPXTOOLLIB) $(DEPXLIB) DEPLIBS1 = $(DEPLIBS) DEPLIBS2 = $(DEPLIBS) DEPLIBS3 = $(DEPLIBS) DEPLIBS4 = $(DEPLIBS) DEPLIBS5 = $(DEPLIBS) DEPLIBS6 = $(DEPLIBS) DEPLIBS7 = $(DEPLIBS) DEPLIBS8 = $(DEPLIBS) DEPLIBS9 = $(DEPLIBS) DEPLIBS10 = $(DEPLIBS) XMULIBONLY = -lXmu XMULIB = $(XMULIBONLY) $(XTOOLLIB) $(XLIB) CONFIGDIR = $(LIBDIR)/config USRLIBDIRPATH = $(USRLIBDIR) LDPRELIBS = -L$(USRLIBDIR) LDPOSTLIBS = TOP_INCLUDES = -I$(INCROOT) $(TOP_X_INCLUDES) PROJECT_DEFINES = CXXPROJECT_DEFINES = # ---------------------------------------------------------------------- # start of Imakefile SYS_LIBRARIES = -lm -lXpm LOCAL_LIBRARIES = $(XLIB) DEPLIBS = $(DEPXLIB) SRCS = xsnow.c toon_root.c xsnow.h vroot.h OBJS = xsnow.o toon_root.o PROGRAM = xsnow all:: xsnow xsnow: $(OBJS) $(DEPLIBS) $(RM) $@ $(CCLINK) -o $@ $(LDOPTIONS) $(OBJS) $(LOCAL_LIBRARIES) $(LDLIBS) $(EXTRA_LOAD_FLAGS) install:: xsnow @if [ -d $(DESTDIR)$(BINDIR) ]; then set +x; \ else (set -x; $(MKDIRHIER) $(DESTDIR)$(BINDIR)); fi $(INSTALL) $(INSTALLFLAGS) $(INSTPGMFLAGS) xsnow $(DESTDIR)$(BINDIR)/xsnow install.man:: xsnow.man @if [ -d $(DESTDIR)$(MANDIR) ]; then set +x; \ else (set -x; $(MKDIRHIER) $(DESTDIR)$(MANDIR)); fi $(INSTALL) $(INSTALLFLAGS) $(INSTMANFLAGS) xsnow.man $(DESTDIR)$(MANDIR)/xsnow.$(MANSUFFIX) depend:: $(DEPEND) $(DEPENDFLAGS) -- $(ALLDEFINES) $(DEPEND_DEFINES) -- $(SRCS) lint: $(LINT) $(LINTFLAGS) $(SRCS) $(LINTLIBS) lint1: $(LINT) $(LINTFLAGS) $(FILE) $(LINTLIBS) clean:: $(RM) xsnow # ---------------------------------------------------------------------- # common rules for all Makefiles - do not edit .c.i: $(RM) $@ $(CC) -E $(CFLAGS) $(_NOOP_) $*.c > $@ .SUFFIXES: .s .c.s: $(RM) $@ $(CC) -S $(CFLAGS) $(_NOOP_) $*.c emptyrule:: clean:: $(RM) *.CKP *.ln *.BAK *.bak *.o core errs ,* *~ *.a .emacs_* tags TAGS make.log MakeOut "#"* 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 man_keywords:: html_index:: # ---------------------------------------------------------------------- # 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" install.sdk:: @echo "install.sdk in $(CURRENT_DIR) done" Makefiles:: includes:: depend:: # ---------------------------------------------------------------------- # dependencies generated by makedepend # DO NOT DELETE xsnow.o: xsnow.c /usr/X11R6/include/X11/Intrinsic.h \ /usr/X11R6/include/X11/Xlib.h /usr/include/sys/types.h \ /usr/include/features.h /usr/include/sys/cdefs.h \ /usr/include/gnu/stubs.h /usr/include/bits/types.h \ /usr/lib/gcc-lib/i486-suse-linux/2.95.2/include/stddef.h \ /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \ /usr/include/sys/select.h /usr/include/bits/select.h \ /usr/include/bits/sigset.h /usr/include/sys/sysmacros.h \ /usr/X11R6/include/X11/X.h /usr/X11R6/include/X11/Xfuncproto.h \ /usr/X11R6/include/X11/Xosdefs.h /usr/X11R6/include/X11/Xutil.h \ /usr/X11R6/include/X11/Xresource.h /usr/include/string.h \ /usr/X11R6/include/X11/Core.h /usr/X11R6/include/X11/Composite.h \ /usr/X11R6/include/X11/Constraint.h /usr/X11R6/include/X11/Object.h \ /usr/X11R6/include/X11/RectObj.h /usr/X11R6/include/X11/Xos.h \ /usr/include/fcntl.h /usr/include/bits/fcntl.h \ /usr/include/sys/stat.h /usr/include/bits/stat.h \ /usr/include/unistd.h /usr/include/bits/posix_opt.h \ /usr/include/bits/confname.h /usr/include/getopt.h \ /usr/include/sys/time.h /usr/include/bits/time.h \ /usr/X11R6/include/X11/Xarch.h /usr/X11R6/include/X11/xpm.h \ /usr/include/stdio.h \ /usr/lib/gcc-lib/i486-suse-linux/2.95.2/include/stdarg.h \ /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \ /usr/include/bits/wchar.h /usr/include/gconv.h \ /usr/include/bits/stdio_lim.h /usr/include/math.h \ /usr/include/bits/huge_val.h /usr/include/bits/mathdef.h \ /usr/include/bits/mathcalls.h \ /usr/lib/gcc-lib/i486-suse-linux/2.95.2/include/float.h \ /usr/include/signal.h /usr/include/bits/signum.h \ /usr/include/bits/siginfo.h /usr/include/bits/wordsize.h \ /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \ /usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \ /usr/include/ucontext.h /usr/include/sys/ucontext.h \ /usr/lib/gcc-lib/i486-suse-linux/2.95.2/include/limits.h \ /usr/lib/gcc-lib/i486-suse-linux/2.95.2/include/syslimits.h \ /usr/include/limits.h /usr/include/bits/posix1_lim.h \ /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ /usr/include/bits/posix2_lim.h /usr/include/bits/xopen_lim.h \ /usr/include/stdlib.h /usr/include/bits/waitflags.h \ /usr/include/bits/waitstatus.h /usr/include/alloca.h xsnow.h \ pixmaps/snow00.xbm pixmaps/snow01.xbm pixmaps/snow02.xbm \ pixmaps/snow03.xbm pixmaps/snow04.xbm pixmaps/snow05.xbm \ pixmaps/snow06.xbm pixmaps/tannenbaum.xbm pixmaps/BigSanta1.XPM \ pixmaps/BigSanta2.XPM pixmaps/BigSanta3.XPM pixmaps/BigSanta4.XPM \ pixmaps/BigSantaRudolf1.XPM pixmaps/BigSantaRudolf2.XPM \ pixmaps/BigSantaRudolf3.XPM pixmaps/BigSantaRudolf4.XPM \ pixmaps/MediumSanta1.XPM pixmaps/MediumSanta2.XPM \ pixmaps/MediumSanta3.XPM pixmaps/MediumSanta4.XPM \ pixmaps/MediumSantaRudolf1.XPM pixmaps/MediumSantaRudolf2.XPM \ pixmaps/MediumSantaRudolf3.XPM pixmaps/MediumSantaRudolf4.XPM \ pixmaps/RegularSanta1.XPM pixmaps/RegularSanta2.XPM \ pixmaps/RegularSanta3.XPM pixmaps/RegularSanta4.XPM \ pixmaps/RegularSantaRudolf1.XPM pixmaps/RegularSantaRudolf2.XPM \ pixmaps/RegularSantaRudolf3.XPM pixmaps/RegularSantaRudolf4.XPM \ toon.h /usr/X11R6/include/X11/extensions/shape.h toon_root.o: toon_root.c toon.h /usr/X11R6/include/X11/Intrinsic.h \ /usr/X11R6/include/X11/Xlib.h /usr/include/sys/types.h \ /usr/include/features.h /usr/include/sys/cdefs.h \ /usr/include/gnu/stubs.h /usr/include/bits/types.h \ /usr/lib/gcc-lib/i486-suse-linux/2.95.2/include/stddef.h \ /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \ /usr/include/sys/select.h /usr/include/bits/select.h \ /usr/include/bits/sigset.h /usr/include/sys/sysmacros.h \ /usr/X11R6/include/X11/X.h /usr/X11R6/include/X11/Xfuncproto.h \ /usr/X11R6/include/X11/Xosdefs.h /usr/X11R6/include/X11/Xutil.h \ /usr/X11R6/include/X11/Xresource.h /usr/include/string.h \ /usr/X11R6/include/X11/Core.h /usr/X11R6/include/X11/Composite.h \ /usr/X11R6/include/X11/Constraint.h /usr/X11R6/include/X11/Object.h \ /usr/X11R6/include/X11/RectObj.h /usr/X11R6/include/X11/Xos.h \ /usr/include/fcntl.h /usr/include/bits/fcntl.h \ /usr/include/sys/stat.h /usr/include/bits/stat.h \ /usr/include/unistd.h /usr/include/bits/posix_opt.h \ /usr/include/bits/confname.h /usr/include/getopt.h \ /usr/include/sys/time.h /usr/include/bits/time.h \ /usr/X11R6/include/X11/Xarch.h /usr/X11R6/include/X11/xpm.h \ /usr/X11R6/include/X11/extensions/shape.h \ /usr/X11R6/include/X11/Xatom.h /usr/X11R6/include/X11/Xproto.h \ /usr/X11R6/include/X11/Xmd.h /usr/X11R6/include/X11/Xprotostr.h \ /usr/include/stdio.h \ /usr/lib/gcc-lib/i486-suse-linux/2.95.2/include/stdarg.h \ /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \ /usr/include/bits/wchar.h /usr/include/gconv.h \ /usr/include/bits/stdio_lim.h xsnow-1.42.orig/xsnow.c0000600000175000017500000012554107406760157014707 0ustar caiqiancaiqian/* ©Copyright 1984, 1988, 1990, 1993-1995, 2000-2001 by Rick Jansen, all rights reserved. X S N O W * * * * * * * In 1984 the first Macintosh program I wrote was a computer christmas card, which showed a picture of a snowman and falling snow. Later a Father Xmas in his sleigh was added. I converted this program to an undying desk accessory in 1988 with several additions. But, little boys grow up, and when they are forced to a workstation they want their thingies there too. So here is Xsnow. For *you*. Happy winter and a merry X-mas! Rick Jansen (rja@euronet.nl) http://www.euronet.nl/~rja/ Xsnow WWW page: http://www.euronet.nl/~rja/Xsnow/ Latest news: ------------ December 14th 2001 All you KDE-users can now be even happier with a KDE-enabled Xsnow 1.42! December 16th 2000 After 5 years here's a new Xsnow! The program has been around bit, and is now even making it snow on many windows machines, and we're not talking X or Macintosh here (sorry!). Anyway, it's high time for an improved version for X. Xsnow 1.41 works with modern X servers like XFree86, where older versions made snow build up somewhere in the sky at times, defying gravity. Xsnow 1.41 now features the (big) Santa that is long featured in Snow for Macintosh and in Snow for Windows, many thanks to Thomas Linder! (Thomas.Linder@gmx.net). It is now possible to slow Santa down. See the option -santaupdatefactor Availability ------------ Xsnow is available directly from me via my WWW page: http://www.euronet.nl/~rja/ Click on the appropriate item and the tar file will be downloaded upon your request. Xsnow is also archived at ftp.x.org in the contrib/games directory. Ftp to ftp.x.org and enter 'anonymous' as the login name, your e-mail address as the password. Then 'cd contrib/games' and a 'get xsnow.README' for further information. Copyright --------- Xsnow is available freely and you may give it to other people as is, but I retain all rights. Therefore it does not classify as 'Public Domain' software. It *is* allowed to package Xsnow for Unix/Linux distributions, CD-Roms etc, and to make the necessary changes to makefiles etc. to facilitate this. Credits ------- Xsnow borrows code for drawing on the desktop (the 'root' window as they insist on calling it in X) from the infamous xroach program, which is copyright 1991 by J.T. Anderson (jta@locus.com). Xroach is available in the 'contrib' directory of 'ftp.x.org' via anonymous ftp. The code for wind was done by Eiichi TAZOE (tazoe@yamato.ibm.co.jp, tazoe@vnet.ibm.com) Vroot has been replaced by code from Robin Hogan who figured out how to do this for KDE and the like! Installation ------------ To build: xmkmf make depend make To run: ./xsnow or: ./xsnow& (in the background) To install (be root): make install make install.man or: cc -o xsnow snow.c -lX11 [-lsocketorwhatever] [-lm] [-l...] -lXpm SUN Solaris users without a C-compiler, but with gcc installed, try the following two commands. The first compiles Xsnow, the second links Xsnow. gcc -c -O2 -I/usr/openwin/include -DSVR4 -DSYSV xsnow.c gcc -o xsnow xsnow.o -O2 -L/usr/openwin/lib -lXext -lX11 -lXpm -lm -lsocket -lnsl Note: Xsnow-1.41 needs the Xpm library. It is available from: ftp://ftp.x.org/contrib/libraries/ The current Xpm version is xpm3.4k Silicon Graphics ---------------- Silicon Graphics and Irix 5.x users may not see any snow or Santa at all, as long the desktop icons are visible. To circumvent this problem issue this command: /usr/lib/desktop/telldesktop quit The icons will disappear and xsnow will work perfectly. To restart the desktop just start /usr/lib/desktop/startdesktop or select Desktop->Home Directory from the toolchest. It's even possible to have both - desktop icons and xsnow (and even multiple desks). You need to modify the window manager's resource file 4DWm, the file ~/.desktop- `hostname`/4DWm. Example: *Global.backgroundDescription: -execute /etc/killall -TERM xsnow ; /usr/local/bin/xsnow *Desk 1.backgroundDescription: -execute /etc/killall -TERM xsnow ; /usr/local/bin/xsnow *Desk 2.backgroundDescription: -execute /etc/killall -TERM xsnow ; /usr/local/bin/xsnow Restart the he toolchest and Xsnow should appear. What this does is stop the currently running Xsnow and start a new one when you switch to another desktop. HP -- HP also uses a Workspace Manager which may interfere with Xsnow. If Xsnow does not appear: In the "Style Manager", choose "Backdrop" and select "NoBackdrop". You should now be able to run Xsnow. Modification history -------------------- 1984/1985 Macintosh animated Christmas card 1988/1990 Macintosh undying desk accessory, and MultiFinder version 03DEC93 version 0 for X-windows 04DEC93 background setting 06DEC93 delay in main loop using select 10DEC93 keep snow on top of windows and at bottom of display 11DEC93 snow kept sticking to the right of display (1.11) 11DEC93 updated calcwindowtops 12DEC93 call calcwindowtops after last exposure event only 13DEC93 vroot added for virtual window managers 14DEC93 separate options for snowdepth on windows and on screen 15DEC93 patch for fvwm from Mike Hollick (hollick@graphics.cis.upenn.edu) 16DEC93 Really building up snow at bottom of screen 16DEC93 A choice of Santa's. Thanks to Holger Veit (Holger.Veit@gmd.de) for Santa no. 2. Santa 1 was derived from 2 by scaling down. 20DEC93 Aaaargh! gnu C doesn't like the initialization of the new Santa pixmaps. Extra braces do the trick, which is so often the case 20DEC93 Deleted PaintSnowAtBottom. It's more of a surprise this way. 21DEC93 In case of negative x coordinates adapt width (CalcWindowTops) 22DEC93 Rudolf's red nose. Silly. Grmbll. 22DEC93 Bug with -nokeepsnowonwindows removed 10JAN94 Improved handling of erasing snow at screen bottom in case of window in or under the snow. 18FEB94 X-speed really 0 inside snow layers - prevents snowflakes from erasing already fallen snow a bit better 30OCT94 More efficiency due to GC's in server and not drawing where the windows are. 30OCT94 1.30 Eiichi TAZOE's code for wind included in general distribution. 11NOV94 Bug in XRectInRegion call resolved (santa not appearing gradually from behind windows) 15NOV94 Unsigned longs changed to longs, as strtoul is troublesome on many systems (snowDelay) 08DEC94 Snow is really building up on windows now 10DEC94 1.36 Handle Popups (no snow on them) 16DEC94 1.37 -offset and (-nokeepsnowonwindows and -nokeepsnowonscreen back) 20DEC94 1.38 Let Santa be a real snowplough now 21DEC94 1.39 VMS fix for uSsleep, thanks to Ulrich Kabatek 19NOV95 1.40 Memory leak fixed in CalcWindowTops, thanks to Satoshi Asami 19NOV95 1.40 Greatly increased performance when using solid backgrounds by using XFillRectangle instead of XClearArea. Thanks to Benedikt Kessler 20NOV95 1.40 Bug fixed with erasing snow at bot of screen 1996 New macintosh version, in color http://www.euronet.nl/~rja/MacSnow/ 1998 Snow for Windows http://www.euronet.nl/~rja/WinSnow/ 18DEC2000 1.41 Fix for X-servers that do not send expose events after a while, due to backing store. 14DEC2001 KDE and other root window obstructors: sub borrowed from xpenguins 2.2 to find the current "root" window for this system. Credit to Robin Hogan */ #define debug 0 /* And in a vocoded voice it sounds: Xsnow zwei-tausend Xsnow two-thousand Xsnow deux mille Xsnow dos mil etc. */ #define VERSION "Xsnow-1.42, December 14th 2001 by Rick Jansen (rja@euronet.nl)\n\ WWW: http://www.euronet.nl/~rja/Xsnow/\n" #ifdef VMS #include # if defined(__SOCKET_TYPEDEFS) && !defined(CADDR_T) # define CADDR_T # endif #endif #include #include #include #include #include /**** V R O O T ****/ /* For vroot.h see the credits at the beginning of Xsnow */ /***#include /* if vroot.h installed in /usr/include/X11 ***/ /* replaced by ToonGetRootWindow #include "vroot.h" #include "toon.h" */ #include #include #include #include #include #if defined(__STDC__) || defined(VMS) #include #else long strtol(); /*double strtod();*/ char *getenv(); #endif char Copyright[] = "\nXsnow\nCopyright 1984,1988,1990,1993-1995,2000-2001 by Rick Jansen, all rights reserved.\n"; #include "xsnow.h" #include "toon.h" typedef int ErrorHandler(); #if !defined(GRAB_SERVER) #define GRAB_SERVER 0 #endif Display *display; int screen; Window rootWin; char toon_message[TOON_MESSAGE_LENGTH] = ""; Window Parent; int display_width, display_height; int center_x, center_y; GC gc; char *display_name = NULL; Pixel black, white; int done = 0; int errorVal = 0; int flake; int SmoothWhirl = 1; int NoTrees = 0; int NoSanta = 0; int Rudolf = 1; int NoKeepSnow = 0; int NoKeepSBot = 0; int NoKeepSWin = 0; int NoPopuphandling = 1; int NoWind = 0; unsigned int borderWidth = 0; int SnowOffset = 0; int UseFillForClear = 0; Snow *snowflakes; int MaxSnowFlakeHeight = 0; /* Biggest flake */ int maxSnowflakes = INITIALSNOWFLAKES; int curSnowflakes = 0; long snowDelay = 50000; /* useconds */ int MaxXStep = MAXXSTEP; int MaxYStep = MAXYSTEP; int WhirlFactor = WHIRLFACTOR; int WhirlAdapt; int MaxWinSnowDepth = INITWINSNOWDEPTH; int MaxScrSnowDepth = INITSCRSNOWDEPTH; /* The default Santa 0,1,2 */ int SantaSize = 2; int SantaSpeed = -1; /* Not initialized yet */ #define MAXSANTA_SPEED 30 int SantaX; int SantaY; int SantaXStep; int SantaYStep; int SantaVisible; int CurrentSanta; Pixmap SantaPixmap[PIXINANIMATION]; Pixmap SantaMaskPixmap[PIXINANIMATION]; int SantaWidth; int SantaHeight; Region Wr = NULL; Region PrevWr = NULL; Region WDR = NULL; Region CDR = NULL; Region rscrr = NULL; Region snscr = NULL; Region sar = NULL; Region SubR = NULL; int stilltddr = 0; /* Wind stuff */ int diff=0; int wind = 0; int direction=0; int WindTimer=30; int current_snow_height; int geta=0; XRectangle AddRect; unsigned int RunCounter = 0; int SantaUpdateFactor = 3; /* Forward decls */ void Usage(); void SigHandler(); void SigHupHandler(); void InitSnowflake(); void UpdateSnowflake(); void DrawSnowflake(); void EraseSnowflake(); void PaintSnowAtBottom(); void DrawTannenbaum(); void InitSantaPixymaps(); void ResetSanta(); void DrawSanta(); void EraseSanta(); void UpdateSanta(); void uSsleep(); int MWR(int); void MASR(); void RCSR(); int DDLT(); void HEAr(int X,int Y,int W, int H); Pixel AllocNamedColor(); void sig_alarm(); /* Colo(u)rs */ char *snowColor = "snow"; char *slcColor = "black"; char *blackColor = "black"; char *redColor = "red"; char *whiteColor = "white"; char *bgColor = "none"; char *trColor = "chartreuse"; /* The author thoroughly recommends a cup of tea */ /* with a dash of green Chartreuse. Jum! */ char *greenColor = "chartreuse"; Pixel redPix; Pixel whitePix; Pixel greenPix; Pixel blackPix; Pixel snowcPix; Pixel bgPix; Pixel trPix; Pixel slcPix; /* GC's */ GC SnowGC[SNOWFLAKEMAXTYPE+1]; GC ClearSnowGC; GC SleighGCs[3]; GC SantaGC,RudolfGC,FurGC; GC TreesGC; int rc; /* ------------------------------------------------------------------ */ int main(ac, av) int ac; char *av[]; { XGCValues xgcv; int ax; char *arg; SnowMap *rp; TannenbaumMap *tp; XEvent ev; int Exposed; int ConfigureNotified; int i; int x,y; Window root; /* used in getgeometry call */ int winX, winY; unsigned int winHeight, winWidth; unsigned int depth; /* Process command line options. */ for (ax=1; ax MAXSNOWFLAKES) { fprintf(stderr,"** Maximum number of snowflakes is %d\n", MAXSNOWFLAKES); exit(1); } if ((SantaSize < 0) || (SantaSize > MAXSANTA)) { fprintf(stderr,"** Maximum Santa is %d\n",MAXSANTA); exit(1); } if (SantaUpdateFactor == 0) { fprintf(stderr,"** It is naughty (sic!) to specify zero for -santaupdatefactor\n"); exit(1); } /* Eskimo warning */ if (strstr(snowColor,"yellow") != NULL) printf("\nWarning: don't eat yellow snow!\n\n"); if (SantaSpeed < 0) SantaSpeed = Speed[SantaSize]; #ifdef VMS srand((int)time((unsigned long *)NULL)); #else srand((int)time((long *)NULL)); #endif signal(SIGKILL, SigHandler); signal(SIGINT, SigHandler); signal(SIGTERM, SigHandler); #if debug signal(SIGHUP, SigHupHandler); #else signal(SIGHUP, SigHandler); #endif signal(SIGALRM, sig_alarm); alarm(WindTimer); display = XOpenDisplay(display_name); if (display == NULL) { if (display_name == NULL) display_name = getenv("DISPLAY"); (void) fprintf(stderr, "%s: cannot connect to X server %s\n", av[0], display_name ? display_name : "(default)"); exit(1); } screen = DefaultScreen(display); rootWin = ToonGetRootWindow(display, screen, &Parent); black = BlackPixel(display, screen); white = WhitePixel(display, screen); display_width = DisplayWidth(display, screen); display_height = DisplayHeight(display, screen); center_x = display_width / 2; center_y = display_height / 2; current_snow_height = display_height; if (MaxScrSnowDepth> (display_height-SNOWFREE)) { printf("** Maximum snow depth set to %d\n", display_height-SNOWFREE); MaxScrSnowDepth = display_height-SNOWFREE; } for (flake=0; flake<=SNOWFLAKEMAXTYPE; flake++) { rp = &snowPix[flake]; rp->pixmap = XCreateBitmapFromData(display, rootWin, rp->snowBits, rp->width, rp->height); if (rp->height > MaxSnowFlakeHeight) MaxSnowFlakeHeight = rp->height; } snowflakes = (Snow *)malloc(sizeof(Snow) * MAXSNOWFLAKES); tp = &tannenbaumPix[0]; tp->pixmap = XCreateBitmapFromData(display, rootWin, tp->tannenbaumBits, tp->width, tp->height); InitSantaPixymaps(); redPix = AllocNamedColor(redColor, black); whitePix = AllocNamedColor(whiteColor, white); greenPix = AllocNamedColor(greenColor, black); blackPix = AllocNamedColor(blackColor, black); snowcPix = AllocNamedColor(snowColor, white); trPix = AllocNamedColor(trColor, black); gc = XCreateGC(display, rootWin, 0, NULL); XGetGCValues(display, gc, 0, &xgcv); XSetForeground(display, gc, blackPix); XSetFillStyle(display, gc, FillStippled); if(strcmp(bgColor,"none") != 0) { bgPix = AllocNamedColor(bgColor, white); XSetWindowBackground(display, rootWin, bgPix); XClearWindow(display, rootWin); XFlush(display); if (!UseFillForClear) { printf("\nNote: when using backgrounds of one color also specifying\n"); printf(" -solidbg MAY greatly improve performance!\n"); } else { ClearSnowGC = XCreateGC(display, rootWin, 0L, &xgcv); XCopyGC(display,gc,0,ClearSnowGC); XSetForeground(display,ClearSnowGC, bgPix); } } else if (UseFillForClear) { printf("\n"); printf( "Sorry, -solidbg can only be specified with a background color (-bg)"); printf("\n"); exit(1); } for (flake=0; flake<=SNOWFLAKEMAXTYPE; flake++) { SnowGC[flake] = XCreateGC(display, rootWin, 0L, &xgcv); XCopyGC(display,gc,0,SnowGC[flake]); XSetStipple(display, SnowGC[flake], snowPix[flake].pixmap); XSetForeground(display,SnowGC[flake],snowcPix); XSetFillStyle(display, SnowGC[flake], FillStippled); } TreesGC = XCreateGC(display, rootWin, 0L, &xgcv); XCopyGC(display,gc,0,TreesGC); XSetStipple(display, TreesGC, tannenbaumPix[0].pixmap); XSetForeground(display,TreesGC,trPix); XSetFillStyle(display, TreesGC, FillStippled); Wr = XCreateRegion(); PrevWr = XCreateRegion(); snscr = XCreateRegion(); sar = XCreateRegion(); WDR = XCreateRegion(); CDR = XCreateRegion(); rscrr = XCreateRegion(); AddRect.x = 0; AddRect.y = display_height; AddRect.width = display_width - 1; AddRect.height = MaxYStep+MaxSnowFlakeHeight; if (!NoKeepSBot) XUnionRectWithRegion(&AddRect, snscr, snscr); for (i=0; i\n"); USEPRT(" -sc \n"); USEPRT(" -tc \n"); USEPRT(" -bg \n"); USEPRT(" -solidbg (Performance improvement!)\n"); USEPRT(" -snowflakes \n"); USEPRT(" -delay \n"); USEPRT(" -unsmooth\n"); USEPRT(" -whirl \n"); USEPRT(" -nowind\n"); USEPRT(" -windtimer