#! /bin/sh ## This is a shell archive. Remove anything before this line, then unpack ## it by saving it into a file and typing "sh file". To overwrite existing ## files, type "sh file -c". You can also feed this as standard input via ## unshar, or by typing "sh README <<'END_OF_README' XXmines is an X11 game, built using the Xt toolkit intrinsics and Athena Xwidgets, in which the player attempts to cross a minefield without getting Xblown up. X XThe mines game was originally written as a suntools game (called minestool) Xby Tom Anderson of Fluke. Brian Dalio of Silicon Compilers made some Xenhancements, and Jim McBeath of Silicon Compilers (at Globetrotter XSoftware as of April 1990) converted it to X11 and made other enhancements. X XThe History file contains more details, and the signatures of the authors. X XThe man page describes how to play the game and how to customize it Xusing resources. X XXmines is copyrighted with an X11-style copyright that allows for free Xredistribution (see any of the C files for exact wording). X X-Jim McBeath 10.Sep.1990 END_OF_README if test 767 -ne `wc -c History <<'END_OF_History' XXMines History 22-Aug-90 X XThe Mines game was originally written by Tom Anderson of Fluke Manufacturing. XIt was written for suntools, and was based on his chess tool (as Tom said Xin the notes for that version, "you might recognize the lineage"; although, Xgiven the change to X11, this is probably more difficult now). X XIt was modified by Brian Dalio of Silicon Compiler Systems, Xwho added the following features (still a sunview program) Xin November/December 1987: X X - Previously occupied cells display the number of mines nearby. X X - At the end of the game (either after a blowup or success) when X the complete board is displayed, the user's annotations are X preserved. If a cell was marked safe but is really mined or if X it was marked mined but is really safe, an X is put on top of X what the user had placed. X X - If a square has been traversed, it can be moved to even if it X isn't adjacent. X X - If a square is marked `ok' and is next to a traversed square it X can be moved to. Typing `H\n' (for Hint) in the level subwindow X marks a square next to current position `ok' if possible. X XJim McBeath of Silicon Compilers (now at Globetrotter Software) Xadded the following features in February 1988: X X - Allow moves to any square which is adjacent to a traversed square. X X - If the user presses the right mouse button on the square he is on, X give a hint. X XIt was converted to X11 (and the name changed from minestool to xmines) Xby Jim McBeath in January 1990. Various cleanup, writing of man pages, etc., Xhappened (at low priority) over the next few months until it was posted. X X XAuthors: X XTom Anderson, (206) 356-5895 XJohn Fluke Mfg. Co., Inc., P.O. Box C9090 M/S 245F, Everett, Wa. 98206 X{ hplsla, microsoft, uw-beaver, sun, tikal }!fluke!toma X XBrian Dalio XMentor Graphics Silicon Design Division (formerly Silicon Compilers) X(201)580-0102 Xb...@sdl.scs.com X XJim McBeath XGlobetrotter Software, Inc. X(408)741-0489 Xglobes!ji...@oliveb.olivetti.com END_OF_History if test 1971 -ne `wc -c Imakefile <<'END_OF_Imakefile' X DEPLIBS = $(DEPXAWLIB) $(DEPXMULIB) $(DEPXTOOLLIB) $(DEPXLIB) XLOCAL_LIBRARIES = $(XAWLIB) $(XMULIB) $(XTOOLLIB) $(XLIB) X SRCS = actions.c board.c buttons.c draw.c \ X info.c main.c makeform.c msg.c X OBJS = actions.o board.o buttons.o draw.o \ X info.o main.o makeform.o msg.o X XComplexProgramTarget(xmines) END_OF_Imakefile if test 338 -ne `wc -c Makefile <<'END_OF_Makefile' X# Makefile generated by imake - do not edit! X# $XConsortium: imake.c,v 1.51 89/12/12 12:37:30 jim Exp $ X# X# The cpp used on this machine replaces all newlines and multiple tabs and X# spaces in a macro expansion with a single space. Imake tries to compensate X# for this, but is not always successful. X# X X########################################################################### X# Makefile generated from "Imake.tmpl" and X# $XConsortium: Imake.tmpl,v 1.77 89/12/18 17:01:37 jim Exp $ X# X# Platform-specific parameters may be set in the appropriate .cf X# configuration files. Site-wide parameters may be set in the file X# site.def. Full rebuilds are recommended if any parameters are changed. X# X# If your C preprocessor doesn't define any unique symbols, you'll need X# to set BOOTSTRAPCFLAGS when rebuilding imake (usually when doing X# "make Makefile", "make Makefiles", or "make World"). X# X# If you absolutely can't get imake to work, you'll need to set the X# variables at the top of each Makefile as well as the dependencies at the X# bottom (makedepend will do this automatically). X# X X########################################################################### X# platform-specific configuration parameters - edit sun.cf to change X X# platform: $XConsortium: sun.cf,v 1.38 89/12/23 16:10:10 jim Exp $ X# operating system: SunOS 4.0.3 X X########################################################################### X# site-specific configuration parameters - edit site.def to change X X# site: $XConsortium: site.def,v 1.21 89/12/06 11:46:50 jim Exp $ X X SHELL = /bin/sh X X TOP = /u2/X11R4/mit X CURRENT_DIR = ./clients/xmines X X AR = ar cq X BOOTSTRAPCFLAGS = X CC = cc X X COMPRESS = compress X CPP = /lib/cpp $(STD_CPP_DEFINES) X PREPROCESSCMD = cc -E $(STD_CPP_DEFINES) X INSTALL = install X LD = ld X LINT = lint X LINTLIBFLAG = -C X LINTOPTS = -axz X LN = ln -s X MAKE = make X MV = mv X CP = cp X RANLIB = ranlib X RANLIBINSTFLAGS = X RM = rm -f X STD_INCLUDES = X STD_CPP_DEFINES = X STD_DEFINES = X EXTRA_LOAD_FLAGS = X EXTRA_LIBRARIES = X TAGS = ctags X X SHAREDCODEDEF = -DSHAREDCODE X SHLIBDEF = -DSUNSHLIB X X PROTO_DEFINES = X X INSTPGMFLAGS = X X INSTBINFLAGS = -m 0755 X INSTUIDFLAGS = -m 4755 X INSTLIBFLAGS = -m 0664 X INSTINCFLAGS = -m 0444 X INSTMANFLAGS = -m 0444 X INSTDATFLAGS = -m 0444 X INSTKMEMFLAGS = -m 4755 X X DESTDIR = X X TOP_INCLUDES = -I$(TOP) X X CDEBUGFLAGS = -O X CCOPTIONS = X COMPATFLAGS = X X ALLINCLUDES = $(STD_INCLUDES) $(TOP_INCLUDES) $(INCLUDES) $(EXTRA_INCLUDES) X ALLDEFINES = $(ALLINCLUDES) $(STD_DEFINES) $(PROTO_DEFINES) $(DEFINES) $(COMPATFLAGS) X CFLAGS = $(CDEBUGFLAGS) $(CCOPTIONS) $(ALLDEFINES) X LINTFLAGS = $(LINTOPTS) -DLINT $(ALLDEFINES) X LDLIBS = $(SYS_LIBRARIES) $(EXTRA_LIBRARIES) X LDOPTIONS = $(CDEBUGFLAGS) $(CCOPTIONS) X LDCOMBINEFLAGS = -X -r X X MACROFILE = sun.cf X RM_CMD = $(RM) *.CKP *.ln *.BAK *.bak *.o core errs ,* *~ *.a .emacs_* tags TAGS make.log MakeOut X X IMAKE_DEFINES = X X IRULESRC = $(CONFIGSRC) X IMAKE_CMD = $(NEWTOP)$(IMAKE) -I$(NEWTOP)$(IRULESRC) $(IMAKE_DEFINES) X X ICONFIGFILES = $(IRULESRC)/Imake.tmpl $(IRULESRC)/Imake.rules \ X $(IRULESRC)/Project.tmpl $(IRULESRC)/site.def \ X $(IRULESRC)/$(MACROFILE) $(EXTRA_ICONFIGFILES) X X########################################################################### X# X Window System Build Parameters X# $XConsortium: Project.tmpl,v 1.63 89/12/18 16:46:44 jim Exp $ X X########################################################################### X# X Window System make variables; this need to be coordinated with rules X# $XConsortium: Project.tmpl,v 1.63 89/12/18 16:46:44 jim Exp $ X X PATHSEP = / X USRLIBDIR = $(DESTDIR)/usr/lib X BINDIR = $(DESTDIR)/usr/bin/X11 X INCROOT = $(DESTDIR)/usr/include X BUILDINCROOT = $(TOP) X BUILDINCDIR = $(BUILDINCROOT)/X11 X BUILDINCTOP = .. X INCDIR = $(INCROOT)/X11 X ADMDIR = $(DESTDIR)/usr/adm X LIBDIR = $(USRLIBDIR)/X11 X CONFIGDIR = $(LIBDIR)/config X LINTLIBDIR = $(USRLIBDIR)/lint X X FONTDIR = $(LIBDIR)/fonts X XINITDIR = $(LIBDIR)/xinit X XDMDIR = $(LIBDIR)/xdm X AWMDIR = $(LIBDIR)/awm X TWMDIR = $(LIBDIR)/twm X GWMDIR = $(LIBDIR)/gwm X MANPATH = $(DESTDIR)/usr/man X MANSOURCEPATH = $(MANPATH)/man X MANDIR = $(MANSOURCEPATH)n X LIBMANDIR = $(MANSOURCEPATH)3 X XAPPLOADDIR = $(LIBDIR)/app-defaults X X SOXLIBREV = 4.2 X SOXTREV = 4.0 X SOXAWREV = 4.0 X SOOLDXREV = 4.0 X SOXMUREV = 4.0 X SOXEXTREV = 4.0 X X FONTCFLAGS = -t X X INSTAPPFLAGS = $(INSTDATFLAGS) X X IMAKE = $(IMAKESRC)/imake X# DEPEND = $(DEPENDSRC)/makedepend X DEPEND = makedepend X RGB = $(RGBSRC)/rgb X FONTC = $(BDFTOSNFSRC)/bdftosnf X MKFONTDIR = $(MKFONTDIRSRC)/mkfontdir X MKDIRHIER = /bin/sh $(SCRIPTSRC)/mkdirhier.sh X X CONFIGSRC = $(TOP)/config X CLIENTSRC = $(TOP)/clients X DEMOSRC = $(TOP)/demos X LIBSRC = $(TOP)/lib X FONTSRC = $(TOP)/fonts X INCLUDESRC = $(TOP)/X11 X SERVERSRC = $(TOP)/server X UTILSRC = $(TOP)/util X SCRIPTSRC = $(UTILSRC)/scripts X EXAMPLESRC = $(TOP)/examples X CONTRIBSRC = $(TOP)/../contrib X DOCSRC = $(TOP)/doc X RGBSRC = $(TOP)/rgb X DEPENDSRC = $(UTILSRC)/makedepend X IMAKESRC = $(CONFIGSRC) X XAUTHSRC = $(LIBSRC)/Xau X XLIBSRC = $(LIBSRC)/X X XMUSRC = $(LIBSRC)/Xmu X TOOLKITSRC = $(LIBSRC)/Xt X AWIDGETSRC = $(LIBSRC)/Xaw X OLDXLIBSRC = $(LIBSRC)/oldX X XDMCPLIBSRC = $(LIBSRC)/Xdmcp X BDFTOSNFSRC = $(FONTSRC)/bdftosnf X MKFONTDIRSRC = $(FONTSRC)/mkfontdir X EXTENSIONSRC = $(TOP)/extensions X X# DEPEXTENSIONLIB = $(EXTENSIONSRC)/lib/libXext.a X EXTENSIONLIB = $(DEPEXTENSIONLIB) X X DEPXLIB = $(DEPEXTENSIONLIB) X XLIB = $(EXTENSIONLIB) -L$(XLIBSRC) -lX11 X X DEPXAUTHLIB = $(XAUTHSRC)/libXau.a X XAUTHLIB = $(DEPXAUTHLIB) X X DEPXMULIB = X XMULIB = -L$(XMUSRC) -lXmu X X DEPOLDXLIB = X OLDXLIB = -L$(OLDXLIBSRC) -loldX X X DEPXTOOLLIB = X XTOOLLIB = -L$(TOOLKITSRC) -lXt X X DEPXAWLIB = X XAWLIB = -L$(AWIDGETSRC) -lXaw X X LINTEXTENSIONLIB = $(EXTENSIONSRC)/lib/llib-lXext.ln X LINTXLIB = $(XLIBSRC)/llib-lX11.ln X LINTXMU = $(XMUSRC)/llib-lXmu.ln X LINTXTOOL = $(TOOLKITSRC)/llib-lXt.ln X LINTXAW = $(AWIDGETSRC)/llib-lXaw.ln X X DEPLIBS = $(DEPXAWLIB) $(DEPXMULIB) $(DEPXTOOLLIB) $(DEPXLIB) X X DEPLIBS1 = $(DEPLIBS) X DEPLIBS2 = $(DEPLIBS) X DEPLIBS3 = $(DEPLIBS) X X########################################################################### X# Imake rules for building libraries, programs, scripts, and data files X# rules: $XConsortium: Imake.rules,v 1.67 89/12/18 17:14:15 jim Exp $ X X########################################################################### X# start of Imakefile X X DEPLIBS = $(DEPXAWLIB) $(DEPXMULIB) $(DEPXTOOLLIB) $(DEPXLIB) XLOCAL_LIBRARIES = $(XAWLIB) $(XMULIB) $(XTOOLLIB) $(XLIB) X SRCS = actions.c board.c buttons.c draw.c \ X info.c main.c makeform.c msg.c X OBJS = actions.o board.o buttons.o draw.o \ X info.o main.o makeform.o msg.o X X PROGRAM = xmines X Xall:: xmines X Xxmines: $(OBJS) $(DEPLIBS) X $(RM) $@ X $(CC) -o $@ $(OBJS) $(LDOPTIONS) $(LOCAL_LIBRARIES) $(LDLIBS) $(EXTRA_LOAD_FLAGS) X Xinstall:: xmines X $(INSTALL) -c $(INSTPGMFLAGS) xmines $(BINDIR) X Xinstall.man:: xmines.man X $(INSTALL) -c $(INSTMANFLAGS) xmines.man $(MANDIR)/xmines.n X X#depend:: $(DEPEND) X X$(DEPEND): X @echo "checking $@ over in $(DEPENDSRC) first..."; \ X cd $(DEPENDSRC); $(MAKE); \ X echo "okay, continuing in $(CURRENT_DIR)" X Xdepend:: X $(DEPEND) -s "# DO NOT DELETE" -- $(ALLDEFINES) -- $(SRCS) X Xlint: X $(LINT) $(LINTFLAGS) $(SRCS) $(LINTLIBS) Xlint1: X $(LINT) $(LINTFLAGS) $(FILE) $(LINTLIBS) X Xclean:: X $(RM) $(PROGRAM) X X########################################################################### X# common rules for all Makefiles - do not edit X Xemptyrule:: X Xclean:: X $(RM_CMD) \#* X XMakefile:: $(IMAKE) X X$(IMAKE): X @(cd $(IMAKESRC); if [ -f Makefile ]; then \ X echo "checking $@ in $(IMAKESRC) first..."; $(MAKE) all; else \ X echo "bootstrapping $@ from Makefile.ini in $(IMAKESRC) first..."; \ X $(MAKE) -f Makefile.ini BOOTSTRAPCFLAGS=$(BOOTSTRAPCFLAGS); fi; \ X echo "okay, continuing in $(CURRENT_DIR)") X XMakefile:: X -@if [ -f Makefile ]; then \ X echo " $(RM) Makefile.bak; $(MV) Makefile Makefile.bak"; \ X $(RM) Makefile.bak; $(MV) Makefile Makefile.bak; \ X else exit 0; fi X $(IMAKE_CMD) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT_DIR) X Xtags:: X $(TAGS) -w *.[ch] X $(TAGS) -xw *.[ch] > TAGS X X########################################################################### X# empty rules for directories that do not have SUBDIRS - do not edit X Xinstall:: X @echo "install in $(CURRENT_DIR) done" X Xinstall.man:: X @echo "install.man in $(CURRENT_DIR) done" X XMakefiles:: X Xincludes:: X X########################################################################### X# dependencies generated by makedepend X X# DO NOT DELETE X Xactions.o: /usr/include/X11/Intrinsic.h /usr/include/X11/Xlib.h Xactions.o: /usr/include/sys/types.h /usr/include/sys/sysmacros.h Xactions.o: /usr/include/X11/X.h /usr/include/X11/Xutil.h Xactions.o: /usr/include/X11/Xresource.h /usr/include/X11/Xos.h Xactions.o: /usr/include/strings.h /usr/include/sys/file.h Xactions.o: /usr/include/sys/fcntlcom.h /usr/include/sys/time.h Xactions.o: /usr/include/sys/time.h /usr/include/X11/Core.h Xactions.o: /usr/include/X11/Composite.h /usr/include/X11/Constraint.h Xactions.o: /usr/include/X11/Object.h /usr/include/X11/RectObj.h mines.h Xboard.o: /usr/include/stdio.h /usr/include/strings.h /usr/include/sys/types.h Xboard.o: /usr/include/sys/sysmacros.h /usr/include/X11/Intrinsic.h Xboard.o: /usr/include/X11/Xlib.h /usr/include/X11/X.h Xboard.o: /usr/include/X11/Xutil.h /usr/include/X11/Xresource.h Xboard.o: /usr/include/X11/Xos.h /usr/include/sys/file.h Xboard.o: /usr/include/sys/fcntlcom.h /usr/include/sys/time.h Xboard.o: /usr/include/sys/time.h /usr/include/X11/Core.h Xboard.o: /usr/include/X11/Composite.h /usr/include/X11/Constraint.h Xboard.o: /usr/include/X11/Object.h /usr/include/X11/RectObj.h mines.h Xbuttons.o: /usr/include/X11/Intrinsic.h /usr/include/X11/Xlib.h Xbuttons.o: /usr/include/sys/types.h /usr/include/sys/sysmacros.h Xbuttons.o: /usr/include/X11/X.h /usr/include/X11/Xutil.h Xbuttons.o: /usr/include/X11/Xresource.h /usr/include/X11/Xos.h Xbuttons.o: /usr/include/strings.h /usr/include/sys/file.h Xbuttons.o: /usr/include/sys/fcntlcom.h /usr/include/sys/time.h Xbuttons.o: /usr/include/sys/time.h /usr/include/X11/Core.h Xbuttons.o: /usr/include/X11/Composite.h /usr/include/X11/Constraint.h Xbuttons.o: /usr/include/X11/Object.h /usr/include/X11/RectObj.h Xbuttons.o: /usr/include/X11/StringDefs.h /usr/include/X11/Xaw/Form.h Xbuttons.o: /usr/include/X11/Xaw/Command.h /usr/include/X11/Xaw/Label.h Xbuttons.o: /usr/include/X11/Xaw/Simple.h /usr/include/X11/Xmu/Converters.h Xbuttons.o: /usr/include/X11/Xaw/AsciiText.h /usr/include/X11/Xaw/Text.h Xbuttons.o: /usr/include/X11/Xaw/TextSink.h /usr/include/X11/Xaw/TextSrc.h Xbuttons.o: /usr/include/X11/Xaw/AsciiSrc.h /usr/include/X11/Xaw/AsciiSink.h Xbuttons.o: mines.h Xdraw.o: /usr/include/X11/Intrinsic.h /usr/include/X11/Xlib.h Xdraw.o: /usr/include/sys/types.h /usr/include/sys/sysmacros.h Xdraw.o: /usr/include/X11/X.h /usr/include/X11/Xutil.h Xdraw.o: /usr/include/X11/Xresource.h /usr/include/X11/Xos.h Xdraw.o: /usr/include/strings.h /usr/include/sys/file.h Xdraw.o: /usr/include/sys/fcntlcom.h /usr/include/sys/time.h Xdraw.o: /usr/include/sys/time.h /usr/include/X11/Core.h Xdraw.o: /usr/include/X11/Composite.h /usr/include/X11/Constraint.h Xdraw.o: /usr/include/X11/Object.h /usr/include/X11/RectObj.h Xdraw.o: /usr/include/X11/StringDefs.h mines.h bMine.xbm bMineSm.xbm bSafe.xbm Xdraw.o: bSafeSm.xbm hMine.xbm hMineSm.xbm mine.xbm mineSm.xbm safe.xbm Xdraw.o: safeSm.xbm e0.xbm e0Sm.xbm e1.xbm e1Sm.xbm e2.xbm e2Sm.xbm e3.xbm Xdraw.o: e3Sm.xbm e4.xbm e4Sm.xbm e5.xbm e5Sm.xbm e6.xbm e6Sm.xbm e7.xbm Xdraw.o: e7Sm.xbm e8.xbm e8Sm.xbm pl0.xbm pl0Sm.xbm pl1.xbm pl1Sm.xbm pl2.xbm Xdraw.o: pl2Sm.xbm pl3.xbm pl3Sm.xbm pl4.xbm pl4Sm.xbm pl5.xbm pl5Sm.xbm Xdraw.o: pl6.xbm pl6Sm.xbm pl7.xbm pl7Sm.xbm pl8.xbm pl8Sm.xbm Xinfo.o: /usr/include/X11/Intrinsic.h /usr/include/X11/Xlib.h Xinfo.o: /usr/include/sys/types.h /usr/include/sys/sysmacros.h Xinfo.o: /usr/include/X11/X.h /usr/include/X11/Xutil.h Xinfo.o: /usr/include/X11/Xresource.h /usr/include/X11/Xos.h Xinfo.o: /usr/include/strings.h /usr/include/sys/file.h Xinfo.o: /usr/include/sys/fcntlcom.h /usr/include/sys/time.h Xinfo.o: /usr/include/sys/time.h /usr/include/X11/Core.h Xinfo.o: /usr/include/X11/Composite.h /usr/include/X11/Constraint.h Xinfo.o: /usr/include/X11/Object.h /usr/include/X11/RectObj.h Xinfo.o: /usr/include/X11/StringDefs.h /usr/include/X11/Shell.h Xinfo.o: /usr/include/X11/Xaw/Form.h /usr/include/X11/Xaw/Command.h Xinfo.o: /usr/include/X11/Xaw/Label.h /usr/include/X11/Xaw/Simple.h Xinfo.o: /usr/include/X11/Xmu/Converters.h mines.h Xmain.o: /usr/include/X11/Intrinsic.h /usr/include/X11/Xlib.h Xmain.o: /usr/include/sys/types.h /usr/include/sys/sysmacros.h Xmain.o: /usr/include/X11/X.h /usr/include/X11/Xutil.h Xmain.o: /usr/include/X11/Xresource.h /usr/include/X11/Xos.h Xmain.o: /usr/include/strings.h /usr/include/sys/file.h Xmain.o: /usr/include/sys/fcntlcom.h /usr/include/sys/time.h Xmain.o: /usr/include/sys/time.h /usr/include/X11/Core.h Xmain.o: /usr/include/X11/Composite.h /usr/include/X11/Constraint.h Xmain.o: /usr/include/X11/Object.h /usr/include/X11/RectObj.h Xmain.o: /usr/include/X11/Xatom.h /usr/include/X11/StringDefs.h Xmain.o: /usr/include/X11/Shell.h /usr/include/stdio.h /usr/include/ctype.h Xmain.o: mines.h patchlevel.h Xmakeform.o: /usr/include/X11/Intrinsic.h /usr/include/X11/Xlib.h Xmakeform.o: /usr/include/sys/types.h /usr/include/sys/sysmacros.h Xmakeform.o: /usr/include/X11/X.h /usr/include/X11/Xutil.h Xmakeform.o: /usr/include/X11/Xresource.h /usr/include/X11/Xos.h Xmakeform.o: /usr/include/strings.h /usr/include/sys/file.h Xmakeform.o: /usr/include/sys/fcntlcom.h /usr/include/sys/time.h Xmakeform.o: /usr/include/sys/time.h /usr/include/X11/Core.h Xmakeform.o: /usr/include/X11/Composite.h /usr/include/X11/Constraint.h Xmakeform.o: /usr/include/X11/Object.h /usr/include/X11/RectObj.h Xmakeform.o: /usr/include/X11/Xatom.h /usr/include/X11/StringDefs.h Xmakeform.o: /usr/include/X11/Shell.h /usr/include/X11/Xaw/Form.h Xmakeform.o: /usr/include/X11/Xaw/Label.h /usr/include/X11/Xaw/Simple.h Xmakeform.o: /usr/include/X11/Xmu/Converters.h /usr/include/X11/Xaw/Command.h Xmakeform.o: /usr/include/stdio.h /usr/include/ctype.h mines.h Xmsg.o: /usr/include/X11/Intrinsic.h /usr/include/X11/Xlib.h Xmsg.o: /usr/include/sys/types.h /usr/include/sys/sysmacros.h Xmsg.o: /usr/include/X11/X.h /usr/include/X11/Xutil.h Xmsg.o: /usr/include/X11/Xresource.h /usr/include/X11/Xos.h Xmsg.o: /usr/include/strings.h /usr/include/sys/file.h Xmsg.o: /usr/include/sys/fcntlcom.h /usr/include/sys/time.h Xmsg.o: /usr/include/sys/time.h /usr/include/X11/Core.h Xmsg.o: /usr/include/X11/Composite.h /usr/include/X11/Constraint.h Xmsg.o: /usr/include/X11/Object.h /usr/include/X11/RectObj.h Xmsg.o: /usr/include/X11/StringDefs.h /usr/include/X11/Xaw/Form.h Xmsg.o: /usr/include/X11/Xaw/Label.h /usr/include/X11/Xaw/Simple.h Xmsg.o: /usr/include/X11/Xmu/Converters.h mines.h END_OF_Makefile if test 15839 -ne `wc -c xmines.man <<'END_OF_xmines.man' X.TH XMINES 1 "22 August 1990" "X Version 11 Release 4" X.SH NAME Xxmines - a minefield game X.SH SYNOPSIS X\fBxmines\fP [ \fI-toolkitoption\fP ...] X[-cellsize \fIcellsize\fP] X[-rows \fIrows\fP] X[-columns \fIcolumns\fP] X[-mines \fImines\fP] X.SH DESCRIPTION XThe \fIxmines\fP program is a game in which you attempt to cross Xa minefield without getting blown up. XYou can control the size of the minefield and the density of the mines. XAt each step, you are told how many mines are in the neighboring locations, Xfrom which you can often deduce the locations of the mines. XIf you are stuck, you have the option of asking for a hint if you don't Xfeel like taking a chance on moving to a location which might contain a mine. XXmines keeps track of how many moves and hints you have used, and how many Xsafe and mined locations you have marked. X.SH OPTIONS X.I Xmines Xaccepts all of the standard X Toolkit command line options. XIn addition, the command line options listed below may be specified. XEach of these command line options corresponds to a resource. XFor more information about the effect of these command line options, Xsee the RESOURCES section below. X.PP XThe command line options and the resources they represent are: X.TP 8 X.B \-cellsize \fIsize\fP XThis option specifies the size in pixels of each of the cells (squares) Xin the playing field. XThe cellsize command line option corresponds to the "cellSize" resource. X.TP 8 X.B \-rows \fInumber\fP XThis option specifies the number of rows in the playing field. XThe rows command line option corresponds to the "rows" resource. X.TP 8 X.B \-columns \fInumber\fP XThis option specifies the number of columns in the playing field. XThe columns command line option corresponds to the "columns" resource. X.TP 8 X.B \-mines \fInumber\fP XThis option specifies the number of mines to be placed in the playing field. XThe mines command line option corresponds to the "mines" resource. X.SH "THE DISPLAY" X.PP XThe \fIxmines\fP window contains the following: Xa title line, a command widget line, Xa count display line, a status line, and the playing field. X.PP XThe title line lists the class name (XMines) and the current version Xof xmines. X.PP XThe command widget line contains a number of input widgets that you use Xto control the program. These are: X.IP "Mine count" 8 XThis text field allows you to enter a new mine count. XThis allows you to play an easier or harder game. XWhen you enter a return in this field, a restart is automatically done. XNote that you must delete the old number before putting in a new number. XIf you enter a number that is too large, \fIxmines\fP will limit it to Xthe largest number of mines that will fit into the board; Xhowever, this will always produce a minefield which is impossible to Xtraverse (see the discussion under the "restart" button below). XThis is a standard text widget, so you can cut and paste or define Xediting translations to your own desires using the standard text Xwidget actions. X.IP restart 8 XWhen this button is pressed, \fIxmines\fP resets the playing field. XThe number of mines specified in the "Mine count" widget are hidden in the Xplaying field, and the player is placed into the upper left square. XThe object of the game is to move the player to the goal square in the Xlower right corner of the playing field. X\fIXmines\fP will never place a mine in the starting square, the goal Xsquare, or the three squares immediately adjacent to the starting square. XThus, when you first start a game, you will always see the message X"No mines nearby" in the status line. XIf the number of mines is very large, it is possible to generate a Xminefield which has no safe path from start to goal. XIn this case, the word "(impossible)" appears in the status line. XYou can either select a smaller number of mines and try again, or Xsimply try again with the same number until a potentially traversable Xminefield is generated. X.IP hint 8 XIf you are stuck and want to know which neighboring square you can move Xto that is guaranteed not to contain a mine, you can press this button, Xand \fIxmines\fP will mark one of the adjacent squares as "ok", meaning Xthere is no mine there. XIf one of the adjacent squares is already marked as "ok" but not yet Xtraversed, or if there are no adjacent and untraversed squares which Xdo not contain mines, then no square is marked. XThe number of hints you have asked for is displayed in the line below Xthe buttons. X.IP quit 8 XWhen this button is pressed, \fIxmines\fP exits. X.PP XThe count display line displays the various numbers that the program Xkeeps track of: X.IP Moves 8 XThe number of moves that you have made so far in this round. X.IP Hints 8 XThe number of hints that you have asked for so far in this round. XThis number is incremented even if you ask for a hint and no squares Xare marked "ok". X.IP Safes 8 XThe number of squares which are marked "ok". XEach time you mark a square as safe, this number increments. XEach time you unmark a safe square, either Xby explicitly unmarking it, marking it as a mine, or moving onto it, Xthis number is decremented. X.IP Mines XThe number of squares which are marked as mines. XEach time you mark a square as mined, this number increments. XEach time you unmark a mined square, either Xby explicitly unmarking it, marking it as safe, Xthis number is decremented. X.PP XThe status line displays messages concerning the progress of the game. XOn a normal move, it tells you how many mines are in the adjacent squares. XIf you reach the goal, or step on a mine, it displays an appropriate message. X.PP XThe playing field is an array of cells (locations, squares), each of Xwhich can potentially contain a mine. XOne of the squares contains a stick man which represents your current Xlocation in the minefield. XSquares which you have already been traversed show the number of mines which Xare adjacent to that square. XThe number in the same square as the stick man shows the number of mines Xadjacent to that position. XYou use the pointer buttons to move your man around the minefield or to Xmark squares as safe or mined (see the section "ACTIONS" below). X.SH X RESOURCES X\fIXmines\fP accepts all of the standard X Toolkit resource names and classes Xas well as: X.TP 8 X.B "cellSize (\fPclass\fB CellSize)" XThis resource specifies the size, in pixels, of each cell in the playing Xfield. XSince the pictures which are placed into the cells are pixmaps, cell sizes Xwhich do not match the pixmap sizes lead to white space (if cell size is Xlarger than pixmap size), or a cropped picture (if cell size is smaller than Xpixmap size). XThere are two sizes of pixmap available, 16 and 32. X\fIXmines\fP will use the 16 bit pixmaps if the cell size is 31 or less, Xand will use the 32 bit pixmaps if the cell size is 32 or greater. X.TP 8 X.B "rows (\fPclass\fB ArraySize)" XThis resource specifies the number of the rows in the playing field. XThis is typically the same number as the columns resources. X.TP 8 X.B "columns (\fPclass\fB ArraySize)" XThis resource specifies the number of the columns in the playing field. XThis is typically the same number as the rows resources. X.TP 8 X.B "mines (\fPclass\fB Mines)" XThis resource specifies the number of mines to place into the playing field. X.SH WIDGET NAMES XThis section describes the widget tree used in \fIxmines\fP. XBy using these names in your resource specifications, you can configure Xthings like colors and sizes for the various widgets. X.PP XThe program name is taken from the command line, and the class name is XMines. X.PP XThe chart below gives the widget name followed by the name of its class in Xparentheses. XAll of the widgets are from the Athena Widget set. X.PP X.nf X.na Xxmines(Shell - top level toolkit widget) X form(Form) X title(Label) X info(Command) X countlabel(Label) X mineinputcount(AsciiText) X restart(Command) X hint(Command) X quit(Command) X movelabel(Label) X movecount(Label) X hintlabel(Label) X hintcount(Label) X safelabel(Label) X safecount(Label) X minelabel(Label) X minecount(Label) X message(Label) X cell(Form) X R%dC%d(Widget) * Xxmines_info(ApplicationShell) X info(Form) X version(Label) X text(Command) X.fi X.ad X.PP X* The widgets labeled R%dC%d are the array of cells. The %d fields are Xfilled in with the row and column number of that cell, starting at 0. XThus the cell in the top left corner of the array is R0C0, the cell to Xits right is R0C1, etc. XThese widgets are Core widgets, so they have only the basic resources. X.SH ACTIONS X.PP XXMines defines four actions that can be invoked through translations. XThese actions are: X.IP "DrawCell(row,col)" 8 XRefreshes the specified cell. XThis action is invoked by each cell in response to an expose event in Xorder to refresh itself. XIf DrawCell is invoked with no parameters, it will refresh the current cell. X.IP "MovePlayer()" 8 XMoves the player to the cell from which the action was invoked. XThis is normally bound to the left mouse button to allow you to move Xaround the playing field. XIf you move onto a mine, the game ends. XYou can not move to a cell which is marked as mined. XYou can move directly to any square which has been previously traversed, Xor to any square immediately adjacent to one which has been previously Xtraversed (except those marked as mined). X.IP "MarkMined()" 8 XMarks the cell as a mined cell. XThis is normally bound to the center mouse button. XIf the cell is already marked as mined, it will be unmarked. XIf the cell is marked as safe, it will be marked as mined. XThe safe and mined count fields are updated. X.IP "MarkSafe()" 8 XMarks the cell as a safe cell. XThis is normally bound to the right mouse button. XIf the cell is already marked as safe, it will be unmarked. XIf the cell is marked as mined, it will be marked as safe. XThe safe and mined count fields are updated. X.SH COPYRIGHT XCopyright 1987, Tom Anderson X.br XCopyright 1990, Globetrotter Software, Inc. X.br XSee \fIX(1)\fP for a full statement of rights and permissions. X.SH AUTHORS XTom Anderson, Fluke Manufacturing Co. Inc. X.br XBrian Dalio, Mentor Graphics, Silicon Design Division. X.br XJim McBeath, Globetrotter Software, Inc. END_OF_xmines.man if test 10045 -ne `wc -c XMines.ad <<'END_OF_XMines.ad' X!App-defaults file for xmines XXMines*Font: 9x15 XXMines*cell.borderColor: blue XXMines*cell.*.borderColor: red XXMines*Cell.height: 32 XXMines*Cell.width: 32 XXMines*ArraySize: 12 XXMines*Mines: 26 XXMines*Label.borderWidth: 0 XXMines*Label.justify: left XXMines*countlabel.label: Mine count: XXMines*mineinputcount.width: 50 XXMines*info.horizDistance: 303 XXMines*info.label: Info XXMines*movelabel.label: Moves: XXMines*movecount.horizDistance: 0 XXMines*movecount.label: .... XXMines*hintlabel.label: Hints: XXMines*hintcount.horizDistance: 0 XXMines*hintcount.label: .... XXMines*safelabel.label: Safes: XXMines*safecount.horizDistance: 0 XXMines*safecount.label: .... XXMines*minelabel.label: Mines: XXMines*minecount.horizDistance: 0 XXMines*minecount.label: .... XXMines*message.width: 460 XXMines*message.borderWidth: 1 XXMines*cell.*.borderWidth: 1 XXMines*cell.*.translations: #override \n\ X : MovePlayer() \n\ X : MarkMined() \n\ X : MarkSafe() XXMines*restart.accelerators: #override \n\ X Return : set() notify() unset() XXMines*info.version.borderWidth: 0 XXMines*xmines_info.Geometry: +400+300 END_OF_XMines.ad if test 1114 -ne `wc -c