from UUNET; patches 1-3 applied
authorKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Fri, 21 Oct 1988 10:37:56 +0000 (02:37 -0800)
committerKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Fri, 21 Oct 1988 10:37:56 +0000 (02:37 -0800)
SCCS-vsn: contrib/dungeon/History 5.1
SCCS-vsn: contrib/dungeon/MANIFEST 5.1
SCCS-vsn: contrib/dungeon/Makefile 5.1
SCCS-vsn: contrib/dungeon/Makefile.bsd 5.1
SCCS-vsn: contrib/dungeon/Makefile.sun 5.1
SCCS-vsn: contrib/dungeon/Makefile.sysv 5.1
SCCS-vsn: contrib/dungeon/PDP.doc 5.1
SCCS-vsn: contrib/dungeon/README 5.1
SCCS-vsn: contrib/dungeon/README.pdp 5.1

usr/src/contrib/dungeon/History [new file with mode: 0644]
usr/src/contrib/dungeon/MANIFEST [new file with mode: 0644]
usr/src/contrib/dungeon/Makefile [new file with mode: 0644]
usr/src/contrib/dungeon/Makefile.bsd [new file with mode: 0644]
usr/src/contrib/dungeon/Makefile.sun [new file with mode: 0644]
usr/src/contrib/dungeon/Makefile.sysv [new file with mode: 0644]
usr/src/contrib/dungeon/PDP.doc [new file with mode: 0644]
usr/src/contrib/dungeon/README [new file with mode: 0644]
usr/src/contrib/dungeon/README.pdp [new file with mode: 0644]

diff --git a/usr/src/contrib/dungeon/History b/usr/src/contrib/dungeon/History
new file mode 100644 (file)
index 0000000..037191d
--- /dev/null
@@ -0,0 +1,105 @@
+       History of the Unix f77 Implementation of Dungeon
+       =================================================
+
+This version of dungeon has been modified from the original source
+so that it will compile and execute on Unix[TM] Systems using the
+f77 FORTRAN Compiler.  The original was written in DEC FORTRAN,
+translated from MDL.  See the file "dungeon.doc" for the complete
+original documentation.  See the file "PDP.doc" for notes on the
+Unix/pdp implementation.
+
+I. From the original documentation...
+
+To:    Dungeon Players
+From:  "The Translator"
+Subj:  Game Information
+Date:  8-OCT-80
+
+
+This is the first (and last) source release of the PDP-11 version of 
+Dungeon.
+
+Please note that Dungeon has been superceded by the game ZORK(tm).
+The following is an extract from the new product announcement for
+ZORK in the September, 1980 issue of the RT-11 SIG newsletter:
+
+  "'ZORK:  The Great Underground Empire - Part I' ...was developed
+   by the original authors based on their ZORK (Dungeon) game for
+   the PDP-10.  It features a greatly improved parser;  command
+   input and transcript output files;  SAVEs to any device and
+   file name;  and adaptation to different terminal types,
+   including a status line on VT100s.  Note:  this is not the
+   FORTRAN version that has been available through DECUS.  This
+   version has been completely rewritten to run efficiently on
+   small machines - up to 10 times as fast as the DECUS version.
+
+   ...ZORK runs under RT-ll, HT-ll, or RSTS/E and requires as
+   little as 20K words of memory and a single floppy disk drive.
+   The game package, consisting of an RX01-format diskette and
+   an instruction booklet, is available from Infocom, Inc.,
+   P.O. Box 120, Kendall Station, Cambridge, Ma. 02142."
+
+ZORK(tm) is a trademark of Infocom, Inc.  It is available for several
+popular personal computers as well as for the PDP-ll.
+
+
+SUMMARY
+-------
+
+                   Welcome to Dungeon!
+
+   Dungeon is a game of adventure, danger, and low cunning.  In it
+you will explore some of the most amazing territory ever seen by mortal
+man.  Hardened adventurers have run screaming from the terrors contained
+within.
+
+   In Dungeon, the intrepid explorer delves into the forgotten secrets
+of a lost labyrinth deep in the bowels of the earth, searching for
+vast treasures long hidden from prying eyes, treasures guarded by
+fearsome monsters and diabolical traps!
+
+   No DECsystem should be without one!
+
+   Dungeon was created at the Programming Technology Division of the MIT
+Laboratory for Computer Science by Tim Anderson, Marc Blank, Bruce
+Daniels, and Dave Lebling.  It was inspired by the Adventure game of
+Crowther and Woods, and the Dungeons and Dragons game of Gygax
+and Arneson.  The original version was written in MDL (alias MUDDLE).
+The current version was translated from MDL into FORTRAN IV by
+a somewhat paranoid DEC engineer who prefers to remain anonymous.
+
+   On-line information may be obtained with the commands HELP and INFO.
+
+II. DEC FORTRAN to f77 Conversion (17-nov-81)
+
+The conversion from DEC FORTRAN to Unix f77 was done by Randy Dietrich,
+Lynn Cochran and Sig Peterson.  Much hacking was done to get it to fit
+in the limited address space of a PDP-11/44 (split I/D).  See the
+file "PDP.doc" for all the gory details.  Suffice it to say that by
+leaving out the debugging package and not linking in the f77 i/o
+library they managed to get it to run.
+
+III. PDP to VAX (dec-85)
+
+Based on the work of Randy, Lynn and Sig, Bill Randle folded in the
+full save/restore functions and the game debugging package (gdt) into
+the pdp version to create a Vax/Unix version.  This version also uses
+f77 i/o, thus eliminating the extra speak and listen processes needed
+on the pdp.
+
+IV. Cleanup I (11-dec-86)
+
+John Gilmore (hoptoad!gnu) cleaned up the source files by moving
+most of the common declarations into include files and added
+comments from the original (FORTRAN or MDL?) source.  His efforts
+are greatly appreciated.
+
+V. Cleanup II (9-feb-87)
+
+Bill Randle (billr@tekred.tek.com) added the pdp dependencies back
+into the Vax source files with #ifdefs in order to have just one
+set of sources.  Previously, there were two sets of source: one for
+the pdp and one for the Vax.  In addition, a shell escape of the
+form !cmd was added and the wizard can enter the gdt without having
+to recompile the source.  Finally, a man page was generated, based
+on the dungeon.doc file.
diff --git a/usr/src/contrib/dungeon/MANIFEST b/usr/src/contrib/dungeon/MANIFEST
new file mode 100644 (file)
index 0000000..10c760c
--- /dev/null
@@ -0,0 +1,84 @@
+   File Name           Archive #       Description
+-----------------------------------------------------------
+ History                   6   
+ MANIFEST                  1   This shipping list
+ Makefile                  7   
+ PDP.doc                   7   
+ README                    1   
+ README.pdp               8
+ actors.F                  6   
+ advers.h                  7   
+ ballop.F                  7   
+ cinit.c                   7   
+ cio.c                     7   
+ clock.h                   4   
+ clockr.F                  2   
+ cspeak.c                  7   
+ curxt.h                   7   
+ debug.h                   7   
+ decode.c                  7   
+ demons.F                  1   
+ dgame.F                   6   
+ dinit.F                   5   
+ dindx.dat                8
+ dmain.F                   6   
+ dso1.F                    7   
+ dso2.F                    5   
+ dso3.F                    7   
+ dso4.F                    7   
+ dso5.F                    7   
+ dso6.F                    7   
+ dso7.F                    7   
+ dsub.F                    5   
+ dtext.aa                 9
+ dtext.ab                10
+ dtext.ac                11
+ dtext.ad                12
+ dtext.ae                13
+ dtext.af                14
+ dungeon.6                 5   
+ dungeon.doc               2   
+ dungeon.sh                7   
+ dverb1.F                  6   
+ dverb2.F                  4   
+ exits.h                   7   
+ files.h                   7   
+ flags.h                   7   
+ gamestate.h               7   
+ gdt.F                     4   
+ io.h                      7   
+ lex.c                     4   
+ lightp.F                  7   
+ listen.c                  7   
+ maketxt.sh              14
+ mindex.h                  7   
+ nobjs.F                   4   
+ np.F                      6   
+ np1.F                     1   
+ np2.F                     6   
+ np3.F                     5   
+ nrooms.F                  6   
+ objcts.F                  3   
+ objects.h                 5   
+ oflags.h                  6   
+ oindex.h                  7   
+ parser.h                  7   
+ puzzle.h                  7   
+ rflag.h                   7   
+ rindex.h                  1   
+ rooms.F                   3   
+ rooms.h                   7   
+ rtext.dat                 5   
+ rtim.c                    7   
+ screen.h                  7   
+ sobjs.F                   3   
+ speak.F                   6   
+ state.h                   7   
+ sverbs.F                  4   
+ verbs.F                   2   
+ verbs.h                   3   
+ villians.h                7   
+ villns.F                  3   
+ vocab.h                   7   
+ xpars.h                   7   
+ xsrch.h                   7   
diff --git a/usr/src/contrib/dungeon/Makefile b/usr/src/contrib/dungeon/Makefile
new file mode 100644 (file)
index 0000000..50a3a76
--- /dev/null
@@ -0,0 +1,75 @@
+# Makefile for creating dungeon
+# Edit BIN DDIR and FFLAGS suitable for your system
+.c.o:
+       cc -c $(CFLAGS) $*.c
+.F.o:
+       f77 -c $(FFLAGS) $*.F
+
+CFLAGS = -O # -i
+#
+# f77 compiler flags for Vax (and other large address machines)
+#
+FFLAGS = -O -q # -Ddebug
+# f77 compiler flags for pdp (64K split I/D)
+#FFLAGS = -O -q -I2 -L1 -i -DPDP # -Ddebug
+
+# Directory path for main program - default /usr/games
+BIN = /usr/games
+# Directory path for data files - default is /usr/games/lib/dunlib
+DDIR = \'/usr/games/lib/dunlib
+DCDIR =\"/usr/games/lib/dunlib
+# Directory path for man page - default /usr/manl/man6
+MDIR = /usr/manl/man6
+# userid for wizard - allows invoking game debugging tool - default 0
+WIZDEF = -DWIZARDID=20
+
+OBJS =  actors.o ballop.o clockr.o demons.o\
+       dgame.o dinit.o dmain.o dso1.o dso2.o\
+       dso3.o dso4.o dso5.o dso6.o dso7.o\
+       dsub.o dverb1.o dverb2.o gdt.o lightp.o\
+       nobjs.o np.o np1.o np2.o np3.o nrooms.o objcts.o\
+       rooms.o rtim.o sobjs.o sverbs.o verbs.o villns.o
+
+PDPOBJS = cinit.o cio.o lex.o
+LISTEN = listen.o
+SPEAK = cspeak.o speak.o
+
+vax:   dungeon dtext.dat
+pdp:   dungpdp speak listen dtext.dat
+
+dungeon: $(OBJS)
+       f77 -s -o dungeon $(OBJS)
+
+dungpdp: $(OBJS) $(PDPOBJS)
+       f77 -i -s -o dungpdp $(OBJS) $(PDPOBJS)
+
+speak: $(SPEAK)
+       f77 -i -s -o speak $(SPEAK)
+       
+speak.o: speak.F
+       f77 $(FFLAGS) -DDDIR=$(DDIR) -c speak.F
+
+listen:        $(LISTEN)
+       cc $(CFLAGS) -o listen $(LISTEN)
+
+listen.o: listen.c
+       cc $(CFLAGS) -DCINDEXFILE=$(DCDIR)/dindx.dat\" -c listen.c
+
+dinit.o: dinit.F
+       f77 $(FFLAGS) -DDDIR=$(DDIR) $(WIZDEF) -c dinit.F
+
+install-vax: vax
+       cp dungeon $(BIN)
+       -mkdir $(DDIR)
+       cp dindx.dat dtext.dat $(DDIR)
+       cp dungeon.6 $(MDIR)/dungeon.6
+
+install-pdp: pdp
+       cp dungeon.sh $(BIN)
+       -mkdir $(DDIR)
+       cp dindx.dat dtext.dat rtext.dat dungpdp $(DDIR)
+       cp dungeon.6 $(MDIR)/dungeon.6
+
+dtext.dat: 
+       ./maketxt.sh
+
diff --git a/usr/src/contrib/dungeon/Makefile.bsd b/usr/src/contrib/dungeon/Makefile.bsd
new file mode 100644 (file)
index 0000000..2dfaedc
--- /dev/null
@@ -0,0 +1,229 @@
+# Makefile for creating dungeon
+# Edit BIN DDIR and FFLAGS suitable for your system
+# Also, if you are running System V change the .F.o production
+#  and production for dinit.F as indicated.
+#
+# need SUFFIXES for System V (doesn't grok .F)
+.SUFFIXES: .F
+.c.o:
+       cc -c $(CFLAGS) $*.c
+.F.o:
+       f77 -c $(FFLAGS) $*.F
+# For System V use the following production instead:
+#      @/lib/cpp $(CPPFLAGS) $*.F > $*.f
+#      f77 -c $(FFLAGS) $*.f
+#      rm $*.f
+
+# define SYSV if running System V or V7
+CFLAGS = -O # -DSYSV -g -i
+CPPFLAGS = -P
+#
+# f77 compiler flags for BSD Vax (and other similar machines)
+FOPTS = -q # -g -Ddebug
+# use -Nn650 for System V to increase default symbol table size
+# also, define SYSV and no -g flag (causes runtime errors)
+#FOPTS = -q -Nn650 -DSYSV # -Ddebug
+# f77 compiler flags for pdp (64K split I/D)
+#FOPTS = -q -I2 -L1 -i -DPDP # -Nn650 -Ddebug
+# use -DNOCC if system does not react on carriage control (e.g. Unix)
+FFLAGS = -O -DNOCC $(FOPTS)
+
+# flags for the loader
+LDFLAGS = # -s -g -v
+
+# Directory path for main program - default /usr/games
+BIN = /usr/games
+# Directory path for data files - default is /usr/games/lib/dunlib
+LIB = /usr/games/lib/dunlib
+DDIR = \'/usr/games/lib/dunlib
+DCDIR =\"/usr/games/lib/dunlib
+# Directory path for man page - default /usr/manl/man6
+MDIR = /usr/manl/man6
+# userid for wizard - allows invoking game debugging tool - default 0
+WIZDEF = -DWIZARDID=320
+
+HDRS = advers.h clock.h curxt.h debug.h exits.h files.h flags.h\
+       gamestate.h io.h mindex.h objects.h oflags.h oindex.h\
+       parser.h puzzle.h rflag.h rindex.h rooms.h screen.h state.h\
+       verbs.h villians.h vocab.h xpars.h xsrch.h
+
+FSRC =  actors.F ballop.F clockr.F demons.F\
+       dgame.F dinit.F dmain.F dso1.F dso2.F\
+       dso3.F dso4.F dso5.F dso6.F dso7.F\
+       dsub.F dverb1.F dverb2.F gdt.F lightp.F\
+       nobjs.F np.F np1.F np2.F np3.F nrooms.F objcts.F\
+       rooms.F sobjs.F sverbs.F verbs.F villns.F
+
+CSRC = cinit.c cio.c cspeak.c decode.c lex.c listen.c rtim.c
+
+OBJS =  actors.o ballop.o clockr.o demons.o\
+       dgame.o dinit.o dmain.o dso1.o dso2.o\
+       dso3.o dso4.o dso5.o dso6.o dso7.o\
+       dsub.o dverb1.o dverb2.o gdt.o lightp.o\
+       nobjs.o np.o np1.o np2.o np3.o nrooms.o objcts.o\
+       rooms.o rtim.o sobjs.o sverbs.o verbs.o villns.o
+
+PDPOBJS = cinit.o cio.o lex.o
+LISTEN = listen.o
+SPEAK = cspeak.o speak.o
+
+vax:   dungeon dtext.dat
+pdp:   dungpdp speak listen dtext.dat
+
+dungeon: $(OBJS)
+       f77 -o dungeon $(OBJS) $(LDFLAGS)
+       @echo done
+
+dungpdp: $(OBJS) $(PDPOBJS)
+       f77 -i -s -o dungpdp $(OBJS) $(PDPOBJS)
+       @echo done
+
+speak: $(SPEAK)
+       f77 -i -s -o speak $(SPEAK)
+       
+speak.o: speak.F
+       f77 $(FFLAGS) -DDDIR=$(DDIR) -c speak.F
+# For System V use the following instead:
+#      @/lib/cpp $(CPPFLAGS) speak.F > speak.f
+#      f77 $(FFLAGS) -DDDIR=$(DDIR) -c speak.f
+#      rm $*.f
+
+listen:        $(LISTEN)
+       cc $(CFLAGS) -o listen $(LISTEN)
+
+listen.o: listen.c
+       cc $(CFLAGS) -DCINDEXFILE=$(DCDIR)/dindx.dat\" -c listen.c
+
+dinit.o: dinit.F
+       f77 $(FFLAGS) -DDDIR=$(DDIR) $(WIZDEF) -c dinit.F
+# For System V use the following instead:
+#      @/lib/cpp $(CPPFLAGS) dinit.F > dinit.f
+#      f77 $(FFLAGS) -DDDIR=$(DDIR) $(WIZDEF) -c dinit.f
+#      rm $*.f
+
+# uncomment the following for Suns to get around an optimizer bug
+# -P means partial optimization.
+#objcts.o: objcts.F
+#      f77 $(FOPTS) -P -c objcts.F
+
+install-vax: vax
+       cp dungeon $(BIN)
+       -mkdir $(LIB)
+       cp dindx.dat dtext.dat $(LIB)
+       cp dungeon.6 $(MDIR)/dungeon.6
+
+install-pdp: pdp
+       cp dungeon.sh $(BIN)
+       -mkdir $(LIB)
+       cp dindx.dat dtext.dat rtext.dat dungpdp $(LIB)
+       cp dungeon.6 $(MDIR)/dungeon.6
+
+dtext.dat: 
+       ./maketxt.sh
+
+
+clean:
+       -rm $(OBJS) Mk* core makedep eddep
+
+depend:
+       grep '^#include' $(FSRC) $(CSRC) $(HDRS) | grep -v '<' | \
+       sed -e 's/:[^"]*"\([^"]*\)".*/: \1/' \
+           -e 's/\.c/.o/' \
+           -e 's/\.F/.o/' \
+           -e 's,../[a-zA-Z]*/,,' | \
+       awk ' { if ($$1 != prev) { print rec; rec = $$0; prev = $$1; } \
+               else { if (length(rec $$2) > 78) { print rec; rec = $$0; } \
+                      else rec = rec " " $$2 } } \
+             END { print rec } ' > makedep
+       echo '$$r makedep' >>eddep
+       echo '/^# DO NOT DELETE THIS LINE/+1,$$d' >eddep
+       echo '$$r makedep' >>eddep
+       echo 'w' >>eddep
+       cp Makefile Makefile.bak
+       ed - Makefile < eddep
+       rm eddep makedep
+
+# DO NOT DELETE THIS LINE -- make depend uses it
+
+actors.o: parser.h gamestate.h rooms.h rflag.h rindex.h xsrch.h objects.h
+actors.o: oflags.h oindex.h clock.h advers.h verbs.h flags.h gamestate.h
+actors.o: debug.h rooms.h rflag.h rindex.h objects.h oflags.h oindex.h
+actors.o: villians.h flags.h
+ballop.o: parser.h gamestate.h state.h rooms.h rflag.h curxt.h xpars.h
+ballop.o: objects.h oflags.h oindex.h clock.h verbs.h flags.h
+clockr.o: gamestate.h state.h rooms.h rflag.h rindex.h objects.h oflags.h
+clockr.o: oindex.h clock.h curxt.h xsrch.h villians.h advers.h flags.h
+clockr.o: gamestate.h objects.h oflags.h clock.h
+demons.o: parser.h gamestate.h objects.h oflags.h oindex.h villians.h advers.h
+demons.o: verbs.h flags.h gamestate.h parser.h objects.h oflags.h clock.h
+demons.o: advers.h verbs.h gamestate.h curxt.h xsrch.h objects.h oindex.h
+demons.o: villians.h advers.h rindex.h objects.h oindex.h villians.h flags.h
+dgame.o: parser.h gamestate.h state.h io.h rooms.h rindex.h objects.h oflags.h
+dgame.o: oindex.h advers.h verbs.h flags.h parser.h villians.h gamestate.h
+dgame.o: objects.h advers.h
+dinit.o: files.h parser.h gamestate.h state.h screen.h mindex.h io.h debug.h
+dinit.o: rooms.h rflag.h rindex.h exits.h curxt.h xpars.h objects.h oindex.h
+dinit.o: clock.h villians.h advers.h flags.h
+dmain.o: parser.h gamestate.h state.h screen.h puzzle.h io.h debug.h rooms.h
+dmain.o: rflag.h rindex.h exits.h curxt.h xpars.h xsrch.h objects.h oflags.h
+dmain.o: oindex.h clock.h villians.h advers.h verbs.h flags.h
+dso1.o: gamestate.h rooms.h rflag.h objects.h oflags.h oindex.h advers.h
+dso1.o: flags.h gamestate.h objects.h oflags.h advers.h objects.h
+dso2.o: gamestate.h rooms.h rflag.h objects.h oindex.h advers.h gamestate.h
+dso2.o: state.h advers.h flags.h gamestate.h state.h clock.h advers.h flags.h
+dso3.o: rooms.h exits.h curxt.h xpars.h objects.h oflags.h
+dso4.o: objects.h oflags.h objects.h oflags.h objects.h state.h advers.h
+dso4.o: parser.h objects.h oflags.h oindex.h villians.h flags.h
+dso5.o: parser.h objects.h oflags.h verbs.h rooms.h rflag.h objects.h oflags.h
+dso5.o: advers.h objects.h
+dso6.o: rooms.h rflag.h rindex.h rindex.h flags.h
+dso7.o: rooms.h rflag.h rindex.h objects.h oflags.h flags.h flags.h
+dsub.o: gamestate.h mindex.h io.h parser.h objects.h debug.h objects.h
+dsub.o: objects.h objects.h parser.h gamestate.h state.h io.h debug.h rooms.h
+dsub.o: rflag.h rindex.h objects.h oflags.h oindex.h advers.h flags.h advers.h
+dsub.o: flags.h parser.h gamestate.h screen.h rooms.h rflag.h xsrch.h objects.h
+dsub.o: advers.h verbs.h flags.h
+dverb1.o: parser.h gamestate.h state.h objects.h oflags.h advers.h parser.h
+dverb1.o: gamestate.h rindex.h objects.h oflags.h advers.h verbs.h parser.h
+dverb1.o: gamestate.h objects.h oflags.h advers.h verbs.h parser.h gamestate.h
+dverb1.o: objects.h oflags.h verbs.h
+dverb2.o: parser.h gamestate.h state.h screen.h puzzle.h rooms.h exits.h
+dverb2.o: objects.h clock.h villians.h advers.h flags.h parser.h gamestate.h
+dverb2.o: state.h screen.h puzzle.h rooms.h exits.h objects.h clock.h
+dverb2.o: villians.h advers.h flags.h parser.h gamestate.h rooms.h rflag.h
+dverb2.o: curxt.h xsrch.h objects.h oflags.h clock.h villians.h advers.h
+dverb2.o: flags.h gamestate.h parser.h puzzle.h rooms.h rindex.h exits.h
+dverb2.o: curxt.h xpars.h xsrch.h objects.h oflags.h oindex.h advers.h flags.h
+gdt.o: parser.h gamestate.h state.h screen.h puzzle.h io.h mindex.h debug.h
+gdt.o: rooms.h rindex.h exits.h objects.h oindex.h clock.h villians.h advers.h
+gdt.o: flags.h
+lightp.o: parser.h gamestate.h objects.h oflags.h oindex.h clock.h verbs.h
+lightp.o: flags.h
+nobjs.o: parser.h gamestate.h state.h screen.h puzzle.h rooms.h rflag.h
+nobjs.o: rindex.h objects.h oflags.h oindex.h clock.h villians.h advers.h
+nobjs.o: verbs.h flags.h gamestate.h parser.h verbs.h flags.h
+np.o: parser.h io.h debug.h parser.h xsrch.h parser.h debug.h
+np1.o: parser.h gamestate.h debug.h objects.h oindex.h advers.h verbs.h vocab.h
+np2.o: parser.h gamestate.h debug.h objects.h oflags.h advers.h vocab.h
+np2.o: objects.h oflags.h vocab.h
+np3.o: parser.h vocab.h debug.h vocab.h parser.h objects.h parser.h parser.h
+np3.o: gamestate.h state.h objects.h oflags.h advers.h parser.h gamestate.h
+np3.o: objects.h oflags.h advers.h
+nrooms.o: parser.h gamestate.h state.h io.h rooms.h rflag.h rindex.h objects.h
+nrooms.o: oflags.h oindex.h xsrch.h clock.h advers.h verbs.h flags.h
+nrooms.o: gamestate.h flags.h rindex.h flags.h
+objcts.o: parser.h gamestate.h state.h rooms.h rflag.h rindex.h objects.h
+objcts.o: oflags.h oindex.h clock.h advers.h verbs.h flags.h
+rooms.o: parser.h gamestate.h state.h rooms.h rflag.h rindex.h objects.h
+rooms.o: oflags.h oindex.h clock.h villians.h advers.h verbs.h flags.h
+sobjs.o: parser.h gamestate.h state.h rooms.h rflag.h rindex.h objects.h
+sobjs.o: oflags.h oindex.h clock.h villians.h advers.h verbs.h flags.h
+sverbs.o: parser.h gamestate.h state.h screen.h io.h rooms.h rflag.h rindex.h
+sverbs.o: exits.h curxt.h xpars.h xsrch.h objects.h oflags.h oindex.h clock.h
+sverbs.o: advers.h verbs.h flags.h
+verbs.o: parser.h gamestate.h state.h rooms.h rflag.h rindex.h xsrch.h
+verbs.o: objects.h oflags.h oindex.h advers.h verbs.h clock.h
+villns.o: parser.h gamestate.h objects.h oflags.h oindex.h verbs.h flags.h
+villns.o: parser.h gamestate.h objects.h oflags.h oindex.h verbs.h flags.h
+villns.o: parser.h gamestate.h rindex.h objects.h oflags.h oindex.h clock.h
+villns.o: villians.h verbs.h flags.h
diff --git a/usr/src/contrib/dungeon/Makefile.sun b/usr/src/contrib/dungeon/Makefile.sun
new file mode 100644 (file)
index 0000000..2dfaedc
--- /dev/null
@@ -0,0 +1,229 @@
+# Makefile for creating dungeon
+# Edit BIN DDIR and FFLAGS suitable for your system
+# Also, if you are running System V change the .F.o production
+#  and production for dinit.F as indicated.
+#
+# need SUFFIXES for System V (doesn't grok .F)
+.SUFFIXES: .F
+.c.o:
+       cc -c $(CFLAGS) $*.c
+.F.o:
+       f77 -c $(FFLAGS) $*.F
+# For System V use the following production instead:
+#      @/lib/cpp $(CPPFLAGS) $*.F > $*.f
+#      f77 -c $(FFLAGS) $*.f
+#      rm $*.f
+
+# define SYSV if running System V or V7
+CFLAGS = -O # -DSYSV -g -i
+CPPFLAGS = -P
+#
+# f77 compiler flags for BSD Vax (and other similar machines)
+FOPTS = -q # -g -Ddebug
+# use -Nn650 for System V to increase default symbol table size
+# also, define SYSV and no -g flag (causes runtime errors)
+#FOPTS = -q -Nn650 -DSYSV # -Ddebug
+# f77 compiler flags for pdp (64K split I/D)
+#FOPTS = -q -I2 -L1 -i -DPDP # -Nn650 -Ddebug
+# use -DNOCC if system does not react on carriage control (e.g. Unix)
+FFLAGS = -O -DNOCC $(FOPTS)
+
+# flags for the loader
+LDFLAGS = # -s -g -v
+
+# Directory path for main program - default /usr/games
+BIN = /usr/games
+# Directory path for data files - default is /usr/games/lib/dunlib
+LIB = /usr/games/lib/dunlib
+DDIR = \'/usr/games/lib/dunlib
+DCDIR =\"/usr/games/lib/dunlib
+# Directory path for man page - default /usr/manl/man6
+MDIR = /usr/manl/man6
+# userid for wizard - allows invoking game debugging tool - default 0
+WIZDEF = -DWIZARDID=320
+
+HDRS = advers.h clock.h curxt.h debug.h exits.h files.h flags.h\
+       gamestate.h io.h mindex.h objects.h oflags.h oindex.h\
+       parser.h puzzle.h rflag.h rindex.h rooms.h screen.h state.h\
+       verbs.h villians.h vocab.h xpars.h xsrch.h
+
+FSRC =  actors.F ballop.F clockr.F demons.F\
+       dgame.F dinit.F dmain.F dso1.F dso2.F\
+       dso3.F dso4.F dso5.F dso6.F dso7.F\
+       dsub.F dverb1.F dverb2.F gdt.F lightp.F\
+       nobjs.F np.F np1.F np2.F np3.F nrooms.F objcts.F\
+       rooms.F sobjs.F sverbs.F verbs.F villns.F
+
+CSRC = cinit.c cio.c cspeak.c decode.c lex.c listen.c rtim.c
+
+OBJS =  actors.o ballop.o clockr.o demons.o\
+       dgame.o dinit.o dmain.o dso1.o dso2.o\
+       dso3.o dso4.o dso5.o dso6.o dso7.o\
+       dsub.o dverb1.o dverb2.o gdt.o lightp.o\
+       nobjs.o np.o np1.o np2.o np3.o nrooms.o objcts.o\
+       rooms.o rtim.o sobjs.o sverbs.o verbs.o villns.o
+
+PDPOBJS = cinit.o cio.o lex.o
+LISTEN = listen.o
+SPEAK = cspeak.o speak.o
+
+vax:   dungeon dtext.dat
+pdp:   dungpdp speak listen dtext.dat
+
+dungeon: $(OBJS)
+       f77 -o dungeon $(OBJS) $(LDFLAGS)
+       @echo done
+
+dungpdp: $(OBJS) $(PDPOBJS)
+       f77 -i -s -o dungpdp $(OBJS) $(PDPOBJS)
+       @echo done
+
+speak: $(SPEAK)
+       f77 -i -s -o speak $(SPEAK)
+       
+speak.o: speak.F
+       f77 $(FFLAGS) -DDDIR=$(DDIR) -c speak.F
+# For System V use the following instead:
+#      @/lib/cpp $(CPPFLAGS) speak.F > speak.f
+#      f77 $(FFLAGS) -DDDIR=$(DDIR) -c speak.f
+#      rm $*.f
+
+listen:        $(LISTEN)
+       cc $(CFLAGS) -o listen $(LISTEN)
+
+listen.o: listen.c
+       cc $(CFLAGS) -DCINDEXFILE=$(DCDIR)/dindx.dat\" -c listen.c
+
+dinit.o: dinit.F
+       f77 $(FFLAGS) -DDDIR=$(DDIR) $(WIZDEF) -c dinit.F
+# For System V use the following instead:
+#      @/lib/cpp $(CPPFLAGS) dinit.F > dinit.f
+#      f77 $(FFLAGS) -DDDIR=$(DDIR) $(WIZDEF) -c dinit.f
+#      rm $*.f
+
+# uncomment the following for Suns to get around an optimizer bug
+# -P means partial optimization.
+#objcts.o: objcts.F
+#      f77 $(FOPTS) -P -c objcts.F
+
+install-vax: vax
+       cp dungeon $(BIN)
+       -mkdir $(LIB)
+       cp dindx.dat dtext.dat $(LIB)
+       cp dungeon.6 $(MDIR)/dungeon.6
+
+install-pdp: pdp
+       cp dungeon.sh $(BIN)
+       -mkdir $(LIB)
+       cp dindx.dat dtext.dat rtext.dat dungpdp $(LIB)
+       cp dungeon.6 $(MDIR)/dungeon.6
+
+dtext.dat: 
+       ./maketxt.sh
+
+
+clean:
+       -rm $(OBJS) Mk* core makedep eddep
+
+depend:
+       grep '^#include' $(FSRC) $(CSRC) $(HDRS) | grep -v '<' | \
+       sed -e 's/:[^"]*"\([^"]*\)".*/: \1/' \
+           -e 's/\.c/.o/' \
+           -e 's/\.F/.o/' \
+           -e 's,../[a-zA-Z]*/,,' | \
+       awk ' { if ($$1 != prev) { print rec; rec = $$0; prev = $$1; } \
+               else { if (length(rec $$2) > 78) { print rec; rec = $$0; } \
+                      else rec = rec " " $$2 } } \
+             END { print rec } ' > makedep
+       echo '$$r makedep' >>eddep
+       echo '/^# DO NOT DELETE THIS LINE/+1,$$d' >eddep
+       echo '$$r makedep' >>eddep
+       echo 'w' >>eddep
+       cp Makefile Makefile.bak
+       ed - Makefile < eddep
+       rm eddep makedep
+
+# DO NOT DELETE THIS LINE -- make depend uses it
+
+actors.o: parser.h gamestate.h rooms.h rflag.h rindex.h xsrch.h objects.h
+actors.o: oflags.h oindex.h clock.h advers.h verbs.h flags.h gamestate.h
+actors.o: debug.h rooms.h rflag.h rindex.h objects.h oflags.h oindex.h
+actors.o: villians.h flags.h
+ballop.o: parser.h gamestate.h state.h rooms.h rflag.h curxt.h xpars.h
+ballop.o: objects.h oflags.h oindex.h clock.h verbs.h flags.h
+clockr.o: gamestate.h state.h rooms.h rflag.h rindex.h objects.h oflags.h
+clockr.o: oindex.h clock.h curxt.h xsrch.h villians.h advers.h flags.h
+clockr.o: gamestate.h objects.h oflags.h clock.h
+demons.o: parser.h gamestate.h objects.h oflags.h oindex.h villians.h advers.h
+demons.o: verbs.h flags.h gamestate.h parser.h objects.h oflags.h clock.h
+demons.o: advers.h verbs.h gamestate.h curxt.h xsrch.h objects.h oindex.h
+demons.o: villians.h advers.h rindex.h objects.h oindex.h villians.h flags.h
+dgame.o: parser.h gamestate.h state.h io.h rooms.h rindex.h objects.h oflags.h
+dgame.o: oindex.h advers.h verbs.h flags.h parser.h villians.h gamestate.h
+dgame.o: objects.h advers.h
+dinit.o: files.h parser.h gamestate.h state.h screen.h mindex.h io.h debug.h
+dinit.o: rooms.h rflag.h rindex.h exits.h curxt.h xpars.h objects.h oindex.h
+dinit.o: clock.h villians.h advers.h flags.h
+dmain.o: parser.h gamestate.h state.h screen.h puzzle.h io.h debug.h rooms.h
+dmain.o: rflag.h rindex.h exits.h curxt.h xpars.h xsrch.h objects.h oflags.h
+dmain.o: oindex.h clock.h villians.h advers.h verbs.h flags.h
+dso1.o: gamestate.h rooms.h rflag.h objects.h oflags.h oindex.h advers.h
+dso1.o: flags.h gamestate.h objects.h oflags.h advers.h objects.h
+dso2.o: gamestate.h rooms.h rflag.h objects.h oindex.h advers.h gamestate.h
+dso2.o: state.h advers.h flags.h gamestate.h state.h clock.h advers.h flags.h
+dso3.o: rooms.h exits.h curxt.h xpars.h objects.h oflags.h
+dso4.o: objects.h oflags.h objects.h oflags.h objects.h state.h advers.h
+dso4.o: parser.h objects.h oflags.h oindex.h villians.h flags.h
+dso5.o: parser.h objects.h oflags.h verbs.h rooms.h rflag.h objects.h oflags.h
+dso5.o: advers.h objects.h
+dso6.o: rooms.h rflag.h rindex.h rindex.h flags.h
+dso7.o: rooms.h rflag.h rindex.h objects.h oflags.h flags.h flags.h
+dsub.o: gamestate.h mindex.h io.h parser.h objects.h debug.h objects.h
+dsub.o: objects.h objects.h parser.h gamestate.h state.h io.h debug.h rooms.h
+dsub.o: rflag.h rindex.h objects.h oflags.h oindex.h advers.h flags.h advers.h
+dsub.o: flags.h parser.h gamestate.h screen.h rooms.h rflag.h xsrch.h objects.h
+dsub.o: advers.h verbs.h flags.h
+dverb1.o: parser.h gamestate.h state.h objects.h oflags.h advers.h parser.h
+dverb1.o: gamestate.h rindex.h objects.h oflags.h advers.h verbs.h parser.h
+dverb1.o: gamestate.h objects.h oflags.h advers.h verbs.h parser.h gamestate.h
+dverb1.o: objects.h oflags.h verbs.h
+dverb2.o: parser.h gamestate.h state.h screen.h puzzle.h rooms.h exits.h
+dverb2.o: objects.h clock.h villians.h advers.h flags.h parser.h gamestate.h
+dverb2.o: state.h screen.h puzzle.h rooms.h exits.h objects.h clock.h
+dverb2.o: villians.h advers.h flags.h parser.h gamestate.h rooms.h rflag.h
+dverb2.o: curxt.h xsrch.h objects.h oflags.h clock.h villians.h advers.h
+dverb2.o: flags.h gamestate.h parser.h puzzle.h rooms.h rindex.h exits.h
+dverb2.o: curxt.h xpars.h xsrch.h objects.h oflags.h oindex.h advers.h flags.h
+gdt.o: parser.h gamestate.h state.h screen.h puzzle.h io.h mindex.h debug.h
+gdt.o: rooms.h rindex.h exits.h objects.h oindex.h clock.h villians.h advers.h
+gdt.o: flags.h
+lightp.o: parser.h gamestate.h objects.h oflags.h oindex.h clock.h verbs.h
+lightp.o: flags.h
+nobjs.o: parser.h gamestate.h state.h screen.h puzzle.h rooms.h rflag.h
+nobjs.o: rindex.h objects.h oflags.h oindex.h clock.h villians.h advers.h
+nobjs.o: verbs.h flags.h gamestate.h parser.h verbs.h flags.h
+np.o: parser.h io.h debug.h parser.h xsrch.h parser.h debug.h
+np1.o: parser.h gamestate.h debug.h objects.h oindex.h advers.h verbs.h vocab.h
+np2.o: parser.h gamestate.h debug.h objects.h oflags.h advers.h vocab.h
+np2.o: objects.h oflags.h vocab.h
+np3.o: parser.h vocab.h debug.h vocab.h parser.h objects.h parser.h parser.h
+np3.o: gamestate.h state.h objects.h oflags.h advers.h parser.h gamestate.h
+np3.o: objects.h oflags.h advers.h
+nrooms.o: parser.h gamestate.h state.h io.h rooms.h rflag.h rindex.h objects.h
+nrooms.o: oflags.h oindex.h xsrch.h clock.h advers.h verbs.h flags.h
+nrooms.o: gamestate.h flags.h rindex.h flags.h
+objcts.o: parser.h gamestate.h state.h rooms.h rflag.h rindex.h objects.h
+objcts.o: oflags.h oindex.h clock.h advers.h verbs.h flags.h
+rooms.o: parser.h gamestate.h state.h rooms.h rflag.h rindex.h objects.h
+rooms.o: oflags.h oindex.h clock.h villians.h advers.h verbs.h flags.h
+sobjs.o: parser.h gamestate.h state.h rooms.h rflag.h rindex.h objects.h
+sobjs.o: oflags.h oindex.h clock.h villians.h advers.h verbs.h flags.h
+sverbs.o: parser.h gamestate.h state.h screen.h io.h rooms.h rflag.h rindex.h
+sverbs.o: exits.h curxt.h xpars.h xsrch.h objects.h oflags.h oindex.h clock.h
+sverbs.o: advers.h verbs.h flags.h
+verbs.o: parser.h gamestate.h state.h rooms.h rflag.h rindex.h xsrch.h
+verbs.o: objects.h oflags.h oindex.h advers.h verbs.h clock.h
+villns.o: parser.h gamestate.h objects.h oflags.h oindex.h verbs.h flags.h
+villns.o: parser.h gamestate.h objects.h oflags.h oindex.h verbs.h flags.h
+villns.o: parser.h gamestate.h rindex.h objects.h oflags.h oindex.h clock.h
+villns.o: villians.h verbs.h flags.h
diff --git a/usr/src/contrib/dungeon/Makefile.sysv b/usr/src/contrib/dungeon/Makefile.sysv
new file mode 100644 (file)
index 0000000..5ed769c
--- /dev/null
@@ -0,0 +1,230 @@
+# Makefile for creating dungeon
+# Edit BIN DDIR and FFLAGS suitable for your system
+# Also, if you are running System V change the .F.o production
+#  and production for dinit.F as indicated.
+#
+# need SUFFIXES for System V (doesn't grok .F)
+.SUFFIXES: .F
+.c.o:
+       cc -c $(CFLAGS) $*.c
+.F.o:
+#      f77 -c $(FFLAGS) $*.F
+# For System V use the following production instead:
+       @/lib/cpp $(CPPFLAGS) $*.F > $*.f
+       f77 -c $(FFLAGS) $*.f
+       rm $*.f
+
+# define SYSV if running System V or V7
+# define SYSV *and* XELOS if running the XELOS OS
+CFLAGS = -O -DSYSV # -DXELOS -g -i
+# use -DNOCC if system does not react on carriage control (e.g. Unix)
+CPPFLAGS = -P -DNOCC -DSYSV # -DXELOS -Ddebug
+#
+# f77 compiler flags for BSD Vax (and other similar machines)
+#FOPTS = -q # -g -Ddebug
+# use -Nn650 for System V to increase default symbol table size
+# also, no -g flag (causes runtime errors)
+FOPTS = -q -Nn650
+# f77 compiler flags for pdp (64K split I/D)
+#FOPTS = -q -I2 -L1 -i -DPDP # -Ddebug
+FFLAGS = -O $(FOPTS)
+
+# flags for the loader
+LDFLAGS = # -s -g -v
+
+# Directory path for main program - default /usr/games
+BIN = /usr/games
+# Directory path for data files - default is /usr/games/lib/dunlib
+LIB = /usr/games/lib/dunlib
+DDIR = \'/usr/games/lib/dunlib
+DCDIR =\"/usr/games/lib/dunlib
+# Directory path for man page - default /usr/manl/man6
+MDIR = /usr/manl/man6
+# userid for wizard - allows invoking game debugging tool - default 0
+WIZDEF = -DWIZARDID=320
+
+HDRS = advers.h clock.h curxt.h debug.h exits.h files.h flags.h\
+       gamestate.h io.h mindex.h objects.h oflags.h oindex.h\
+       parser.h puzzle.h rflag.h rindex.h rooms.h screen.h state.h\
+       verbs.h villians.h vocab.h xpars.h xsrch.h
+
+FSRC =  actors.F ballop.F clockr.F demons.F\
+       dgame.F dinit.F dmain.F dso1.F dso2.F\
+       dso3.F dso4.F dso5.F dso6.F dso7.F\
+       dsub.F dverb1.F dverb2.F exit.F gdt.F lightp.F\
+       nobjs.F np.F np1.F np2.F np3.F nrooms.F objcts.F\
+       rooms.F sobjs.F sverbs.F verbs.F villns.F
+
+CSRC = cinit.c cio.c cspeak.c decode.c lex.c listen.c rtim.c
+
+OBJS =  actors.o ballop.o clockr.o demons.o\
+       dgame.o dinit.o dmain.o dso1.o dso2.o\
+       dso3.o dso4.o dso5.o dso6.o dso7.o\
+       dsub.o dverb1.o dverb2.o exit.o gdt.o lightp.o\
+       nobjs.o np.o np1.o np2.o np3.o nrooms.o objcts.o\
+       rooms.o rtim.o sobjs.o sverbs.o verbs.o villns.o
+
+PDPOBJS = cinit.o cio.o lex.o
+LISTEN = listen.o
+SPEAK = cspeak.o speak.o
+
+vax:   dungeon dtext.dat
+pdp:   dungpdp speak listen dtext.dat
+
+dungeon: $(OBJS)
+       f77 -o dungeon $(OBJS) $(LDFLAGS)
+       @echo done
+
+dungpdp: $(OBJS) $(PDPOBJS)
+       f77 -i -s -o dungpdp $(OBJS) $(PDPOBJS)
+       @echo done
+
+speak: $(SPEAK)
+       f77 -i -s -o speak $(SPEAK)
+       
+speak.o: speak.F
+#      f77 $(FFLAGS) -DDDIR=$(DDIR) -c speak.F
+# For System V use the following instead:
+       @/lib/cpp $(CPPFLAGS) speak.F > speak.f
+       f77 $(FFLAGS) -DDDIR=$(DDIR) -c speak.f
+       rm $*.f
+
+listen:        $(LISTEN)
+       cc $(CFLAGS) -o listen $(LISTEN)
+
+listen.o: listen.c
+       cc $(CFLAGS) -DCINDEXFILE=$(DCDIR)/dindx.dat\" -c listen.c
+
+dinit.o: dinit.F
+#      f77 $(FFLAGS) -DDDIR=$(DDIR) $(WIZDEF) -c dinit.F
+# For System V use the following instead:
+       @/lib/cpp $(CPPFLAGS) dinit.F > dinit.f
+       f77 $(FFLAGS) -DDDIR=$(DDIR) $(WIZDEF) -c dinit.f
+       rm $*.f
+
+# uncomment the following for Suns to get around an optimizer bug
+# -P means partial optimization.
+#objcts.o: objcts.F
+#      f77 $(FOPTS) -P -c objcts.F
+
+install-vax: vax
+       cp dungeon $(BIN)
+       -mkdir $(LIB)
+       cp dindx.dat dtext.dat $(LIB)
+       cp dungeon.6 $(MDIR)/dungeon.6
+
+install-pdp: pdp
+       cp dungeon.sh $(BIN)
+       -mkdir $(LIB)
+       cp dindx.dat dtext.dat rtext.dat dungpdp $(LIB)
+       cp dungeon.6 $(MDIR)/dungeon.6
+
+dtext.dat: 
+       ./maketxt.sh
+
+
+clean:
+       -rm $(OBJS) Mk* core makedep eddep
+
+depend:
+       grep '^#include' $(FSRC) $(CSRC) $(HDRS) | grep -v '<' | \
+       sed -e 's/:[^"]*"\([^"]*\)".*/: \1/' \
+           -e 's/\.c/.o/' \
+           -e 's/\.F/.o/' \
+           -e 's,../[a-zA-Z]*/,,' | \
+       awk ' { if ($$1 != prev) { print rec; rec = $$0; prev = $$1; } \
+               else { if (length(rec $$2) > 78) { print rec; rec = $$0; } \
+                      else rec = rec " " $$2 } } \
+             END { print rec } ' > makedep
+       echo '$$r makedep' >>eddep
+       echo '/^# DO NOT DELETE THIS LINE/+1,$$d' >eddep
+       echo '$$r makedep' >>eddep
+       echo 'w' >>eddep
+       cp Makefile Makefile.bak
+       ed - Makefile < eddep
+       rm eddep makedep
+
+# DO NOT DELETE THIS LINE -- make depend uses it
+
+actors.o: parser.h gamestate.h rooms.h rflag.h rindex.h xsrch.h objects.h
+actors.o: oflags.h oindex.h clock.h advers.h verbs.h flags.h gamestate.h
+actors.o: debug.h rooms.h rflag.h rindex.h objects.h oflags.h oindex.h
+actors.o: villians.h flags.h
+ballop.o: parser.h gamestate.h state.h rooms.h rflag.h curxt.h xpars.h
+ballop.o: objects.h oflags.h oindex.h clock.h verbs.h flags.h
+clockr.o: gamestate.h state.h rooms.h rflag.h rindex.h objects.h oflags.h
+clockr.o: oindex.h clock.h curxt.h xsrch.h villians.h advers.h flags.h
+clockr.o: gamestate.h objects.h oflags.h clock.h
+demons.o: parser.h gamestate.h objects.h oflags.h oindex.h villians.h advers.h
+demons.o: verbs.h flags.h gamestate.h parser.h objects.h oflags.h clock.h
+demons.o: advers.h verbs.h gamestate.h curxt.h xsrch.h objects.h oindex.h
+demons.o: villians.h advers.h rindex.h objects.h oindex.h villians.h flags.h
+dgame.o: parser.h gamestate.h state.h io.h rooms.h rindex.h objects.h oflags.h
+dgame.o: oindex.h advers.h verbs.h flags.h parser.h villians.h gamestate.h
+dgame.o: objects.h advers.h
+dinit.o: files.h parser.h gamestate.h state.h screen.h mindex.h io.h debug.h
+dinit.o: rooms.h rflag.h rindex.h exits.h curxt.h xpars.h objects.h oindex.h
+dinit.o: clock.h villians.h advers.h flags.h
+dmain.o: parser.h gamestate.h state.h screen.h puzzle.h io.h debug.h rooms.h
+dmain.o: rflag.h rindex.h exits.h curxt.h xpars.h xsrch.h objects.h oflags.h
+dmain.o: oindex.h clock.h villians.h advers.h verbs.h flags.h
+dso1.o: gamestate.h rooms.h rflag.h objects.h oflags.h oindex.h advers.h
+dso1.o: flags.h gamestate.h objects.h oflags.h advers.h objects.h
+dso2.o: gamestate.h rooms.h rflag.h objects.h oindex.h advers.h gamestate.h
+dso2.o: state.h advers.h flags.h gamestate.h state.h clock.h advers.h flags.h
+dso3.o: rooms.h exits.h curxt.h xpars.h objects.h oflags.h
+dso4.o: objects.h oflags.h objects.h oflags.h objects.h state.h advers.h
+dso4.o: parser.h objects.h oflags.h oindex.h villians.h flags.h
+dso5.o: parser.h objects.h oflags.h verbs.h rooms.h rflag.h objects.h oflags.h
+dso5.o: advers.h objects.h
+dso6.o: rooms.h rflag.h rindex.h rindex.h flags.h
+dso7.o: rooms.h rflag.h rindex.h objects.h oflags.h flags.h flags.h
+dsub.o: gamestate.h mindex.h io.h parser.h objects.h debug.h objects.h
+dsub.o: objects.h objects.h parser.h gamestate.h state.h io.h debug.h rooms.h
+dsub.o: rflag.h rindex.h objects.h oflags.h oindex.h advers.h flags.h advers.h
+dsub.o: flags.h parser.h gamestate.h screen.h rooms.h rflag.h xsrch.h objects.h
+dsub.o: advers.h verbs.h flags.h
+dverb1.o: parser.h gamestate.h state.h objects.h oflags.h advers.h parser.h
+dverb1.o: gamestate.h rindex.h objects.h oflags.h advers.h verbs.h parser.h
+dverb1.o: gamestate.h objects.h oflags.h advers.h verbs.h parser.h gamestate.h
+dverb1.o: objects.h oflags.h verbs.h
+dverb2.o: parser.h gamestate.h state.h screen.h puzzle.h rooms.h exits.h
+dverb2.o: objects.h clock.h villians.h advers.h flags.h parser.h gamestate.h
+dverb2.o: state.h screen.h puzzle.h rooms.h exits.h objects.h clock.h
+dverb2.o: villians.h advers.h flags.h parser.h gamestate.h rooms.h rflag.h
+dverb2.o: curxt.h xsrch.h objects.h oflags.h clock.h villians.h advers.h
+dverb2.o: flags.h gamestate.h parser.h puzzle.h rooms.h rindex.h exits.h
+dverb2.o: curxt.h xpars.h xsrch.h objects.h oflags.h oindex.h advers.h flags.h
+gdt.o: parser.h gamestate.h state.h screen.h puzzle.h io.h mindex.h debug.h
+gdt.o: rooms.h rindex.h exits.h objects.h oindex.h clock.h villians.h advers.h
+gdt.o: flags.h
+lightp.o: parser.h gamestate.h objects.h oflags.h oindex.h clock.h verbs.h
+lightp.o: flags.h
+nobjs.o: parser.h gamestate.h state.h screen.h puzzle.h rooms.h rflag.h
+nobjs.o: rindex.h objects.h oflags.h oindex.h clock.h villians.h advers.h
+nobjs.o: verbs.h flags.h gamestate.h parser.h verbs.h flags.h
+np.o: parser.h io.h debug.h parser.h xsrch.h parser.h debug.h
+np1.o: parser.h gamestate.h debug.h objects.h oindex.h advers.h verbs.h vocab.h
+np2.o: parser.h gamestate.h debug.h objects.h oflags.h advers.h vocab.h
+np2.o: objects.h oflags.h vocab.h
+np3.o: parser.h vocab.h debug.h vocab.h parser.h objects.h parser.h parser.h
+np3.o: gamestate.h state.h objects.h oflags.h advers.h parser.h gamestate.h
+np3.o: objects.h oflags.h advers.h
+nrooms.o: parser.h gamestate.h state.h io.h rooms.h rflag.h rindex.h objects.h
+nrooms.o: oflags.h oindex.h xsrch.h clock.h advers.h verbs.h flags.h
+nrooms.o: gamestate.h flags.h rindex.h flags.h
+objcts.o: parser.h gamestate.h state.h rooms.h rflag.h rindex.h objects.h
+objcts.o: oflags.h oindex.h clock.h advers.h verbs.h flags.h
+rooms.o: parser.h gamestate.h state.h rooms.h rflag.h rindex.h objects.h
+rooms.o: oflags.h oindex.h clock.h villians.h advers.h verbs.h flags.h
+sobjs.o: parser.h gamestate.h state.h rooms.h rflag.h rindex.h objects.h
+sobjs.o: oflags.h oindex.h clock.h villians.h advers.h verbs.h flags.h
+sverbs.o: parser.h gamestate.h state.h screen.h io.h rooms.h rflag.h rindex.h
+sverbs.o: exits.h curxt.h xpars.h xsrch.h objects.h oflags.h oindex.h clock.h
+sverbs.o: advers.h verbs.h flags.h
+verbs.o: parser.h gamestate.h state.h rooms.h rflag.h rindex.h xsrch.h
+verbs.o: objects.h oflags.h oindex.h advers.h verbs.h clock.h
+villns.o: parser.h gamestate.h objects.h oflags.h oindex.h verbs.h flags.h
+villns.o: parser.h gamestate.h objects.h oflags.h oindex.h verbs.h flags.h
+villns.o: parser.h gamestate.h rindex.h objects.h oflags.h oindex.h clock.h
+villns.o: villians.h verbs.h flags.h
diff --git a/usr/src/contrib/dungeon/PDP.doc b/usr/src/contrib/dungeon/PDP.doc
new file mode 100644 (file)
index 0000000..c11379e
--- /dev/null
@@ -0,0 +1,62 @@
+The implementation of dungeon on unix systems
+Randy Dietrich                 17 Nov 1981
+
+When we set out to get dungeon running on unix we figured
+it wouldn't be too big a problem.  After all a fortran
+compiler (F77) existed and with relatively little problem
+managed to get everything to compile.  
+Then the Zorkmids hit the volcano.
+We thought that a program which would run in 28k on an
+RSX system would have fit just fine in 64k, especially
+with seperate i & d.  We did not realize just how hostile 
+unix is to FORTRAN programs.
+The first link indicated about 130 k (text only) was needed
+for the whole game (Ieeeeee).  Recompiling with short (I2)
+integers brought this down to about 100k.  Throwing out
+the game debug package (9k) and the save and restore code (3k)
+got us to within 20k.  
+At this point we discovered that the fortran library that
+was being used was about 25k (A HA !!).  If we could just 
+eliminate that we would be in business.  A great game with
+no I/O !!  further work allowed us to write the I/O in C
+with the bulk of the game using only standard input and output.
+The initialization and message printing were "moved out"
+into seperate processes and the whole mess piped together.
+it is a real kludge but seems to work (mostly).
+
+The Input process is called 'listen'.  It first reads the init
+file and shoves it in the pipe and then switches to pass
+keyboard input to the main game.  This keeps the main program
+from having to read anything but 'standard input'.
+
+The output process is currently called 'speak'.
+this process does the lookup in the file 'dtext.dat' and
+sends out the messages that give dungeon it's flavor.  This
+process also passes clear text from the main program to
+allow the output of other messages for such things as the
+echo room, puzzle room, and score.  These functions
+were also 'moved out' so the main program would not have
+to access any disc files.
+
+The main program is sandwitched between listen and speak.
+It really does the work of the game.  I/O is handled
+thorugh C routines in 'cio.c'. this keeps any fortran
+I/O from being used and calling in the whole #$%@ fortran
+library.
+
+The current lash-up does save or restore but not both.  
+It is going to take a while to work in as we are out of room
+in the main program and will have to re-write something
+to make it all fit.  I guess we will just have to play
+without being able to cheat for a while.
+
+Restores are done by initializing the game with a second argument
+(some day the file name) of 'r'.  This causes the init process 
+to send a 'R' down down the pipe followed by the restore data.
+normally the init process ends with a '?'.  The trailing '?'
+will follow the restore data.
+
+Saves are done from within the game.  The game sends a 's'
+down the pipe to signal the speak process to do a save opperation.
+The save data then goes down the pipe followed by 'e' to
+signal the end of data.  The save data is 'dungeon.sav'.
diff --git a/usr/src/contrib/dungeon/README b/usr/src/contrib/dungeon/README
new file mode 100644 (file)
index 0000000..6674ec3
--- /dev/null
@@ -0,0 +1,113 @@
+This is a source file distribution for the game dungeon as implemented
+in f77 for Unix(R) systems.  It is based on the game dungeon as
+distributed on a DECUS tape, circa 1980.  It has been converted from
+the original DEC FORTRAN into something that is palatable to Unix f77.
+See the file "History" for some revision history and credit to those
+whose efforts have made this possible.
+
+Checkout the Makefile and adjust it to fit your system.  The only
+things that should really need tweaking are the directory definitions
+and the "-D" defines.  There is an example for both large address
+machines (e.g. Vax) that get the complete game and small address
+machines (e.g. Pdp-11) that get a modified game with minor functionality
+missing (to get it to fit).  Also edit the include file "files.h" if
+necessary.
+
+All of the f77 files end in a '.F' extension to force f77 to invoke the
+C preprocessor for the #include files and #ifdefs.  Most of the #ifdefs
+are for the PDP version (default non-pdp) and for debug (default off).
+
+Except for DTEXT.DAT, all files in the distribution kit are ASCII.
+DTEXT.DAT is a binary file consisting of 76-byte fixed length records.
+
+This has been compiled and tested on a PDP-11/44 Version 7, PDP-11/70
+2.9bsd Vax-11/785 4.3bsd and Sun-3 before the pdp and Vax sources were
+merged (see the file "History").  After the merge it was again tested on
+the Vax 11-785 4.3bsd.
+
+I/we consider my/our changes to be in the public domain.  The original
+source, however, is copyright.
+
+       John Gilmore, Nebula Consultants
+       hoptoad!gnu
+       11 December 1986
+
+       Bill Randle
+       Tektronix, Inc.
+       billr@tekred.TEK.COM
+       9 February 1987
+
+Dungeon consists of the following files:
+
+       dmain.F                 -program root
+       dgame.F                 -main routine
+       dsub.F                  -resident subroutines
+       dinit.F                 -initialization routine
+       np.F                    -parser, part 0
+       np1.F                   -parser, part 1
+       np2.F                   -parser, part 2
+       np3.F                   -parser, part 3
+       gdt.F                   -game debugging tool
+       verbs.F                 -principal verbs
+       objcts.F                -principal objects
+       sverbs.F                -simple verbs
+       dverb1.F                -auxiliary verbs, part 1
+       dverb2.F                -auxiliary verbs, part 2
+       actors.F                -character processors
+       demons.F                -demon processors
+       clockr.F                -clock event processors
+       rooms.F                 -room processors
+       nrooms.F                -new room processors
+       sobjs.F                 -simple objects
+       nobjs.F                 -new objects
+       ballop.F                -balloon processor
+       lightp.F                -light processors
+       villns.F                -villain processors
+       dso1.F                  -overlaid subroutines, part 1
+       dso2.F                  -overlaid subroutines, part 2
+       dso3.F                  -overlaid subroutines, part 3
+       dso4.F                  -overlaid subroutines, part 4
+       dso5.F                  -overlaid subroutines, part 5
+       dso6.F                  -overlaid subroutines, part 6
+       dso7.F                  -overlaid subroutines, part 7
+       advers.h                -header file
+       clock.h                 -header file
+       curxt.h                 -header file
+       debug.h                 -header file
+       exits.h                 -header file
+       files.h                 -header file for directory paths
+       flags.h                 -header file
+       gamestate.h             -header file
+       io.h                    -header file
+       objects.h               -header file
+       oflags.h                -header file
+       oindex.h                -header file
+       parser.h                -header file
+       puzzle.h                -header file
+       rflag.h                 -header file
+       rindex.h                -header file
+       rooms.h                 -header file
+       screen.h                -header file
+       state.h                 -header file
+       verbs.h                 -header file
+       villians.h              -header file
+       vocab.h                 -header file
+       xpars.h                 -header file
+       xsrch.h                 -header file
+       cinit.c                 -C routine to initialize game [pdp ver]
+       cio.c                   -C routine for misc i/o [pdp version]
+       rtim.c                  -C routines for system dependent functions
+       listen.c                -C co-process for reading keyboard [pdp]
+       cspeak.c                -C co-process for displaying messages [pdp]
+       speak.F                 -lookup messages for speak process [pdp]
+       decode.c                -C routine to decode binary text file [debug]
+       dindx.dat               -initialization data base
+       dtext.dat               -main data base [binary file]
+       rtext.dat               -message index file [pdp version]
+       dungeon.sh              -shell script to invoke pdp version
+       dungeon.doc             -original documentation file
+       dungeon.6               -man page abstracted from dungeon.doc
+       Makefile                -Makefile for making pdp or vax versions
+       History                 -Some revision history notes
+       PDP.doc                 -Notes on the PDP-11/Unix conversion
+       README                  -This file
diff --git a/usr/src/contrib/dungeon/README.pdp b/usr/src/contrib/dungeon/README.pdp
new file mode 100644 (file)
index 0000000..a746007
--- /dev/null
@@ -0,0 +1,14 @@
+After the data declarations were moved into seperate include files
+the sources refused to compile on a pdp-11.  Apparently, the pdp-11
+preprocessor can only handle a limited number of include files.
+To create a version on a pdp machine, you will probably have to
+combine the include files into one include file per source file in
+order to get it to compile.  Not all source files may need this extra
+bit of work.  You'll just have to try and compile and fix those that
+the compiler complains about.  I no longer have access to a pdp-11
+machine, so I can't do any testing on it.  (As stated in the README
+file, I have run this game on a pdp-11/70 before the include files
+were created.)
+
+               Bill Randle
+               8/31/87