[comp.sources.games] v09i009: NetHack3 - display oriented dungeons & dragons

billr@saab.CNA.TEK.COM (Bill Randle) (02/24/90)

Submitted-by: Izchak Miller <izchak@linc.cis.upenn.edu>
Posting-number: Volume 9, Issue 9
Archive-name: NetHack3/Patch7i
Patch-To: NetHack3: Volume 7, Issue 56-93



#! /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 <file", e.g..  If this archive is complete, you
# will see the following message at the end:
#		"End of archive 9 (of 30)."
# Contents:  UPDATE7 patch7.17
# Wrapped by billr@saab on Wed Feb 21 10:04:30 1990
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f 'UPDATE7' -a "${1}" != "-c" ; then 
  echo shar: Renaming existing file \"'UPDATE7'\" to \"'UPDATE7.orig'\"
  mv -f 'UPDATE7' 'UPDATE7.orig'
fi
echo shar: Extracting \"'UPDATE7'\" \(1596 characters\)
sed "s/^X//" >'UPDATE7' <<'END_OF_FILE'
XSorry this one took so long.  We think just about every computer and network
Xwe depend on has broken sometime in last few weeks.
X
XWork on the PC overlay mechanism continues, with Kevin Smolkowski joining
XPierre Martineau, Stephen Spackman, and Norm Meluch.  Breaking each .c file
Xinto separately-swapped pieces should help performance considerably.  More
Xchanges to the overlay manager are brewing, and will be distributed in the
Xunfortunately required Patch 8.
X
XThe Amiga port was brought up to date and extended by Richard Addison,
XJochen Erwied, Mark Gooderum, Ken Lorber, Greg Olson, Mike Passaretti, and
XGregg Wonderly.
X
XThe Macintosh port was futher extended by Kevin Sitze, Andy Swanson, Jon
XWatte, and Tom West, working with Johnny Lee.
X
XSupport for recent versions of HP-UX was added by Steve Creps.
X
XWe believe all major various platforms and compilers are working properly now.
X
X
XIn other news, '/' now distinguishes among monsters of a given class, named
Xobjects (including artifacts) are handled better, an extended version command
Xgives compilation options, monster colors should show up better, more
Xoccupations are being stopped appropriately, unconscious and non-animal
Xmonsters are handled better, and the eating behavior and ending messages have
Xbeen overhauled again.
X
XVarious display nuisances have been fixed and the "worm segment", "nymph
Xfreeinv", and combined nymph/succubus/polymorphing bugs are gone, along with
Xa large number of less notorious problems.  A few more fun loopholes no longer
Xexist.
X
XIn all, we think this is the stablest and most balanced version yet.
X
END_OF_FILE
if test 1596 -ne `wc -c <'UPDATE7'`; then
    echo shar: \"'UPDATE7'\" unpacked with wrong size!
fi
# end of 'UPDATE7'
if test -f 'patch7.17' -a "${1}" != "-c" ; then 
  echo shar: Renaming existing file \"'patch7.17'\" to \"'patch7.17.orig'\"
  mv -f 'patch7.17' 'patch7.17.orig'
fi
echo shar: Extracting \"'patch7.17'\" \(55711 characters\)
sed "s/^X//" >'patch7.17' <<'END_OF_FILE'
X*** /dev/null	Mon Feb 19 17:43:37 1990
X--- ./Install.ami	Mon Feb 19 16:24:51 1990
X***************
X*** 0 ****
X--- 1,311 ----
X+ 
X+ 	Instructions for compiling and installing NetHack 3.0
X+ 			on an AMIGA system
X+ 	=====================================================
X+ 		    Last Revision: 17 Feb 1990
X+ 
X+ Overview
X+ --------
X+     This file contains the procedure to follow when installing NetHack 3.0
X+     on an Amiga computer system.  It also includes some procedures and hints
X+     for individuals desiring to create a binary from the source.  This
X+     document is divided into 4 sections.  Section I deals with installing
X+     already existing binaries and data files to create a working NetHack
X+     game disk (or directory, in the case of a hard drive).  Section II
X+     describes, in general, how to produce working binaries from the source.
X+     Section III and IV are compiler specific sections, with section III
X+     designed for Lattice users, and section IV for Manx/Aztec users.
X+ 
X+ Credits
X+ -------
X+     Olaf Seibert first ported NetHack 2.3 and 3.0 to the Amiga.  Richard
X+     Addison, Jochen Erwied, Mark Gooderum, Ken Lorber, Greg Olson, Mike
X+     Passaretti, and Gregg Wonderly polished and extended the 3.0 port.
X+ 
X+ Section I - Installation Guide
X+ -------------------------------
X+     This section assumes you have the following handy:
X+ 
X+ 	* NetHack (executable code)
X+ 	* Rumors file
X+ 	* Oracle file
X+ 	* All of the various help and informational files (help, opthelp, etc)
X+ 	* Special level files (castle, tower1, tower2, tower3, endgame)
X+ 	* Amiga with at least 1 meg memory (may be optimistic....)
X+ 
X+     And optionally:
X+ 
X+ 	* Icons if WorkBench interface is to be used.  These files include
X+ 		+ NetHack.info
X+ 		+ NewGame.info
X+ 		+ NetHackScore.info
X+ 		+ default.icon
X+ 	* Special NetHack font.
X+ 
X+     Installation Steps:
X+ 
X+ 	1) If you have a hard disk, create a directory named NetHack.
X+ 	   Assign Nethack: to be the path to this directory.  If you have a
X+ 	   floppy, format a disk named NetHack.
X+ 
X+ 	2) If you have a hard disk, assign HackExe: to the above directory.
X+ 	   If you have a floppy, format an additional disk named HackExe.
X+ 
X+ 	3) Copy Nethack, NetHack.info, NewGame.info, and NetHackScore.info
X+ 	   to HackExe.  Create an empty file called NewGame (WorkBench
X+ 	   refuses to Duplicate a project icon without a file attached).
X+ 
X+ 	4) Copy the remainder of the files to NetHack:.  If you are using
X+ 	   the optional font, create a Hack subdirectory on NetHack:, and
X+ 	   copy "8" into it.
X+ 
X+ 	5) Configure NetHack.cnf as per your configuration.  Remember not
X+ 	   to set GRAPHICS if you are not using the optional font.
X+ 
X+     That's all there is to it!  If you are using the CLI interface, make sure
X+     that the stack is set fairly large (at LEAST 40000 bytes).  Move to the
X+     NetHack: directory, and type NetHack <cmd line options>.  If you're
X+     using the WorkBench interface, click on the NetHack directory/disk.
X+     You should see 3 icons.  Select the "NewGame" option, and "Duplicate" from
X+     the WorkBench pull down menu.  This icon now represents your personal
X+     profile.  You can now rename this icon, and tailor it to your liking
X+     as described below.  If you start a game from the WorkBench interface,
X+     saving the game will automatically tie the personal file icon with the
X+     saved game.  So the next time you select your icon, the game will be
X+     restored.
X+ 
X+     As mentioned above, the icon representing your personal profile can be
X+     customized by you.  This is done via the the Info command available from
X+     WorkBench.  You can adjust the following using the ToolTypes from the
X+     WorkBench info command:
X+ 
X+ 	* OPTIONS=<options> - Options as avaliable in the NetHack.cnf file.
X+ 
X+ 	* HACKDIR=<directory> - Set NetHack working directory to be this
X+ 	  directory.
X+ 
X+ 	* RAMDISK=<ram disk> - Set up ram disk option.
X+ 
X+ 	* LEVELS=<levels> - Intermediate level saving device/directory.
X+ 
X+ 	* PATH=<path> - To search for files such as rumors, help, etc.
X+ 
X+ 	* CMDLINE=<args> - Arguments as passed on command line from cli.
X+ 	  Note:  only the following flags are valid at this point: n, X,
X+ 	  D, and r.
X+ 
X+ 	* SCORE <options> - Display the record of scores.  Options as
X+ 	  available on the command line from CLI after a -s flag.
X+ 
X+     Note that the NetHack.cnf file is read first, then the ToolTypes.  This
X+     means that the options specified in the NetHack.cnf act as defaults
X+     which can be overridden by an individual's personal icon's ToolTypes.
X+     Thus the system oriented entries (HACKDIR, RAMDISK, LEVELS, and PATH)
X+     should generally be set only in NetHack.cnf.  NetHack.cnf should have
X+     default values for OPTIONS, which will generally be overridden by
X+     ToolTypes entries.
X+ 
X+ Section II - General Compilation Instructions
X+ ---------------------------------------------
X+ 
X+     1)  Before doing any compilation, read the README files distributed
X+ 	with the source.  These should familiarize you with the
X+ 	source tree layout, and what files are shared with what computers.
X+ 	Generally, everything in the amiga directory is used exclusively by
X+ 	the Amiga.
X+ 
X+     2)  Create the sub-directories, and name them as indicated in the source
X+ 	README file.  If you have a hard drive, this is fairly trivial
X+ 	(create a directory, and corresponding NetHack sub-directories).
X+ 	If you have only floppies, you'll have to be a bit more clever.
X+ 	The makefile (Makefile.ami) is set up to depend upon certain
X+         assignments, providing the developer with a fairly flexible
X+ 	environment.  The main directory with which a floppy user will have
X+         problems is the src directory.  In order to fit all of the source on
X+ 	to floppies, the src directory has been split into logical units.
X+ 	For example, the makefile expects:
X+ 
X+ 	    Src1:  contains src [a-l]*.c
X+ 	    Src2:  contains src [m-po]*.c
X+ 	    Src3:  contains src [pr-z]*.c
X+ 
X+ 	See makefile.ami for assignment assumptions.
X+ 
X+     3)  Edit config.h to your liking and system configuration.  The following
X+ 	are strong suggestions for certain #define values.
X+ 
X+ 	    + UNIX - DO NOT DEFINE
X+ 	    + MSDOS - DO NOT DEFINE HERE, IT WILL BE DONE LATER FOR YOU
X+ 	    + COMPRESS - DO NOT DEFINE
X+ 	    + ZEROCOMP - DEFINE
X+ 	    + CHDIR - RECOMMENDED
X+ 	    + HACKDIR - "NetHack:" MANDATORY
X+ 	    + BITFIELDS - DO NOT DEFINE IF YOU HAVE MANX3.6
X+ 	    + CLIPPING - DO NOT DEFINE
X+ 
X+ 	4) Edit amiconf.h to your liking.  It is recommended you leave
X+ 	   everything as is with the following exceptions:
X+ 
X+             + TEXTCOLOR - Will allow the use of colors for text objects in
X+               the game.  For instance, red gems will be red.  Unfortunately,
X+               at this time this is only configurable at compile time, when
X+ 	      it really should be configurable at run time.  Note also that
X+ 	      there is a slight bug when running textcolor, namely that when
X+ 	      you are polymorphed, the color you are is not correct because
X+ 	      the cursor overlays the default monster color.  You can see
X+ 	      yourself fine, but you do not represent the correct monster color.
X+ 
X+ 	    + HACKFONT - Enable if you want to use the special NetHack font,
X+ 	      disable otherwise.
X+ 
X+             + AMIGA_WBENCH - Enable if you want the WorkBench interface to
X+ 	      be compiled into the code. This does NOT preclude you from
X+               running from CLI.
X+ 
X+ 	5) If you have significant spare ram, you may wish to make your
X+ 	   compiler resident (Lattice 5.04's lc, lc1, and lc2 need about
X+ 	   215K while Manx's cc and as need about 135K).
X+ 
X+ 	6) At this point, you're almost ready to begin a compile.  Read VERY
X+ 	   CAREFULLY through the Makefile to familiarize yourself with which
X+ 	   assignments are assumed.  Otherwise, you're going to get something
X+ 	   like "Insert O_Src1: in any drive." requestors.  If you have the
X+ 	   uudecode program and need to uudecode the various *.uu files from
X+ 	   the Amiga: directory (font and icons), define the UUDEC symbol
X+ 	   at the appropriate place in the makefile.  The first thing
X+ 	   Makefile.ami does is build a program called 'makedefs', which
X+ 	   handles a variety of data file generation.  Makedefs will then be
X+ 	   run to create a few files, followed by an alphabetically sorted
X+ 	   compilation of the entire source tree.  This compilation process
X+ 	   will compile selected files from Amiga:, Others:, Src1:, Src2:,
X+ 	   and Src3: directories.  If all goes well, all of the  objects will
X+ 	   be linked together to form a binary.  With all of the options
X+ 	   enabled, the Manx 3.6 executable runs about 790K, and the Lattice
X+ 	   executable runs about 790K (without debug hunks, or about 1050K
X+ 	   with debug hunks - see below).
X+ 
X+ SECTION III - Lattice Compilation Instructions
X+ ----------------------------------------------
X+ 
X+     If you're a Lattice user, you should be pretty well set up at this point.
X+     If you have some spare ram, you may wish to examine the Amiga:compact.lat
X+     script.  This script will reduce your compile time by using Lattice's
X+     lcompact utility to pre-scan the header files and place compacted copies
X+     onto the Ram: disk.  Read through the comments in that script if you
X+     wish to utilize it.
X+ 
X+     Due to a problem with version 5.04, you must make one change:  edit the
X+     file Others:lev_lex.c.  At (or near) line 1002 is the definition for the
X+     function yyunput.  Delete the word "register" from this line.  Note that
X+     if you neglect to do this, you will get an Error 72 at line 318 of file
X+     lev_comp.l (this is the correct message - lev_lex.c is flex output).  Save
X+     the changed file.  Later compiler versions may or may not need this fix.
X+ 
X+     Type 'CD NetHack:' and then type "lmk -f Amiga:Makefile.ami".  If all
X+     goes well, you'll have a working binary a couple of hours later (depending
X+     on your hardware configuration).  A couple of notes and warnings from the
X+     Lattice users on the team:
X+ 
X+ 	* The primary Lattice compiler used on the Amiga port was version
X+ 	  5.04.  However, the patch bringing the compiler to 5.04a does
X+ 	  not appear necessary for compiling NH3.0pl7.
X+ 
X+ 	* The function monsndx, in file mondata.c, has a section of code
X+ 	  which Lattice 5.04 compiles incorrectly.  A hack has been written
X+ 	  around this so that Lattice will generate the correct code.  It is
X+ 	  recommended that you leave this in place, and not attempt to
X+ 	  "improve" it.  As of this date (1/90) Lattice is preparing 5.05
X+ 	  which, it is being claimed, fixes this bug.
X+ 
X+ 	* Included in the Lattice port is code for generating a SnapShot.tb
X+ 	  file upon catching various internal disasters.  That is why the
X+ 	  -d1 flag is in the makefile.  This adds about 270K to the disk
X+ 	  image, but it does not increase the run time memory requirements.
X+ 	  Floppy users will have to delete -d1 flag, or the binary won't
X+ 	  fit on a single disk.
X+ 
X+ 	* The optimizer seems to work, but no extensive testing has been
X+ 	  done with it.
X+ 
X+ 	* There are a large number of warnings under Lattice, which are
X+ 	  harmless.
X+ 
X+ SECTION IV  - AZTEC/MANX Compilation Instructions
X+ -------------------------------------------------
X+ 
X+     NetHack 3.0 compiles and runs fine under Aztec 3.6, but a little bit
X+     of work is necessary.  The problem is that the Aztec pre-processor
X+     is fairly stupid, and doesn't recognize the defined() pre-processor
X+     function.  Unfortunately, this function is laced throughout the NetHack
X+     code, hence removing it would be quite a chore, and end up rendering the
X+     code much more unreadable.
X+ 
X+     There are a couple solutions to this problem.  The first solution is to
X+     run every source file through some c pre-processor which understands
X+     defined() (the Decus cpp works fine).  The problem with this solution is
X+     that the time it takes to compile/recompile is (at least) doubled.  My
X+     configuration is a 33 meg hard drive and 2 1/2 megs of ram, and it still
X+     takes over 4 hours to generate a binary from scratch!  Also note that
X+     Makefile.ami was not built to support cpp, and so you'll have to modify
X+     the makefile to add this step.
X+ 
X+     But don't despair, have we got a deal for you!  The Apple NetHackers also
X+     had a similar problem with defined, which led them to developing a
X+     defined() hack (located in config.h).  This hack basically adds
X+     the defined() functionality to the Aztec pre-processor, with the exception
X+     of performing this operation on strings.  Fortunately, using defined() on
X+     strings is done very rarely, and they are handled on an individual basis.
X+     (The only one I can think of right now is WIZARD/WIZARD_NAME).  What's the
X+     catch, you ask?  Well, there is one. The problem is as follows.
X+ 
X+     The Aztec compiler doesn't know how to handle const, volatile, and signed
X+     data types.  Normally, this can be fixed by sticking a #define const
X+     before const is used, thereby rendering it disabled.  Unfortunately, the
X+     Aztec pre-processor, in its infinite wisdom, WILL NOT LET YOU REDEFINE
X+     these strings.
X+ 
X+     The solution to this is not quite as elegant as the solution to the
X+     defined() problem above.  It requires a one time modification to the
X+     Aztec cc binary.  (DO THIS TO A BACKUP COPY OF CC!!)  Find a disk zapper,
X+     NewZap works fine.  Then do a search for the string 'const'.  Change
X+     the const, signed and volatile strings to __nst, __gned and __latile.
X+     (It's really not as bad as it sounds....)
X+ 
X+     A couple of warnings regarding the 3.6 compiler/NetHack:
X+ 
X+ 	* The 3.6 Manx bitfield handling is buggy at best.  Though I can't
X+ 	  specifically cite a flaw when NetHack is compiled with it, I
X+ 	  don't trust it.  I recommend you don't either.
X+ 
X+ 	* If your signal.h (in your Manx include directory) has SIGINT
X+ 	  commented out, go ahead and uncomment it.
X+ 
X+ 	* If you use the cpp method, pass -DAZTEC_C and -DMCH_AMIGA to
X+           the cpp.  These are defined automatically by Aztec C, but are
X+           ineffective if the source is run through a filter first.
X+ 
X+ 	* There will be a few harmless warnings in the compile process.
X+ 	  These warnings will be in amidos.c, and pickup.c.  There may also
X+ 	  be a warning when defining lev_lex.c that LEV_LEX is redefined.  This
X+ 	  is OK.  Any other warnings should be investigated.
X+ 
X+ 	* I haven't tried sdb on it, as I can't affort the disk space.  (You'll
X+ 	  have to save the intermediate cpp files if you cpp).  Unless you've
X+           got a whopping amount of memory, I suspect it's going to be too large.
X+ 
X+ 	* There are 2 versions of lev_lex.c that are being distributed; one
X+ 	  generated by (unix) lex, and one generated by gnu flex.  The gnu
X+ 	  flex lev_lex.c should work without modification.  If you use the
X+           lex lev_lex.c, you will get 4 warnings regarding ptr/int conversions.
X+           Change the masks from (int) to (long) to generate a clean binary.
X+ 
X+ 	* Unfortunately, Manx 5.0 arrived too late to integrate into patch
X+ 	  level 7, but merging will occur in the next few weeks.  Contact us
X+ 	  (below) for progress/hints.
X+ 
X+ 			- - - - - - - - - - - -
X+ 
X+ If you have problems or questions, email to nethack-bugs@linc.cis.upenn.edu,
X+ or directly to Greg Olson (golson@sundown.sun.com)  for Manx questions,
X+ to Ken Lorber (keni@dtix.dt.navy.mil) for Lattice questions, or to
X+ Richard Addison (addison@pollux.usc.edu) for either.  Have fun!!
X*** /dev/null	Mon Feb 19 17:44:19 1990
X--- ./Install.mac	Mon Feb 19 16:36:18 1990
X***************
X*** 0 ****
X--- 1,237 ----
X+ 
X+ Instructions for installing NetHack 3.0 on a Macintosh system
X+ =============================================================
X+ 
X+     (Credit for first porting NetHack 3.0 to the Macintosh goes to Johnny
X+     Lee and Michael Sokolov.  Kevin Sitze, Andy Swanson, Jon Watte, and
X+     Tom West helped polish and extend the port through further releases.)
X+ 
X+ 1.  Make sure all the NetHack files are in the appropriate directory structure.
X+     You should have a main directory with subdirectories src, include, auxil,
X+     mac, and others.  If you do not follow this structure, the Makefile
X+     will not function properly.  All the UNIX .c files and the source Makefile
X+     belong in src; all the PC .c files and Makefiles belong in others; all the
X+     .h files belong in include; other assorted files belong in auxil.  The Mac
X+     .c files belong in mac.
X+ 
X+ 2.  If you're not using Lightspeed/THINK C, move the .c files from the mac
X+     folder, and the pc*.c files from others, to your src folder.  Also move
X+     random.c from others to src if you want to use the Berkeley random number
X+     routines (suggested).
X+ 
X+ 3.  If you are using Aztec C, you'll need the Makefile.src.  You'll have to
X+     make minor modifications to make it work.  If you use Lightspeed/THINK C
X+     the warning concerning the Makefile not functioning properly is a moot
X+     point.
X+ 
X+ 4.  Go to the include subdirectory and edit config.h to select the desired
X+     game options.  MACOS must be defined.
X+     For compilers, you can select from LSC or THINKC4 (or AZTEC if you want to
X+     do some work).  If you select AZTEC or LSC (not THINKC4) you'll have to
X+     define KR1ED.  SMALLDATA should be defined (AZTEC users might be able to
X+     get around it).  BITFIELDS should be defined if SMALLDATA was defined
X+     in order to come in under the 32K global data limit.
X+ 
X+     The #defines that should be commented out are UNIX, and LOGFILE.
X+ 
X+     KR1ED sets up a macro which allows older preprocessors to make use of the
X+     defined() construct.  
X+     If you're using the Berkeley random number routines and KR1ED had
X+     to be defined for your compiler, then you'll have to add the
X+     line "#define defined(x) (-x - 1 != -1)" to random.c before the
X+     first #if defined() statement. Do the same in mon.c.
X+      
X+     Similarly edit macconf.h.
X+     
X+     If you want to, look through system.h.  This file attempts to match the
X+     types for system calls and library routines with various flavors of
X+     operating systems.  Leaving this file alone is unlikely to cause problems,
X+     but if you're using a different compiler and get compile errors with any
X+     functions in the standard library, it's worth checking the declarations
X+     there.
X+ 
X+     If you want to change the high score list behavior, go to the src
X+     subdirectory and look at the top of topten.c.  You may want to change the
X+     definitions of PERSMAX, POINTSMIN, and ENTRYMAX.  I set POINTSMIN of
X+     51 and ENTRYMAX of 50 to keep the size of the score list down.
X+ 
X+ 5.  Decode the .hqx files with a BinHex decoder (BinHex or StuffIt 1.5.1) to
X+     get the resource files for the makedefs and NetHack programs.
X+ 
X+ 6.  The source files needed for makedefs are:
X+ 
X+ 	    alloc.c, macfile.c, makedefs.c, monst.c, objects.c and panic.c
X+ 
X+     You'll have to uncomment the "#define MAKEDEFS_C" statement in
X+     config.h. This is used especially to construct the monst and object
X+     resources for the NetHack application.
X+     Remember to comment out this define again when not compiling makedefs.
X+     In the "Set Project Type..." dialog, select "Separate STRS" to keep the
X+     project's global data under 32K.
X+ 
X+     Add in the necessary libraries (this will vary with what compiler you are
X+     using - in Think C 4.0 it will be ANSI, unix, and MacTraps, or get the
X+     libraries from the routines that your linker complains aren't there).
X+ 
X+     Compile and run makedefs and select all the options [Note: you'll have to
X+     run makedefs several times to do this].  This will build the various
X+     include and auxiliary files.
X+ 
X+     N.B. Lightspeed/Think C users:  you really can't use precompiled headers
X+ 	here since there is no ONE header file.  It is such a small app. that
X+ 	the benefit of precompiled headers is small.
X+ 
X+ 7.  Build the NetHack project with the source files in the various code
X+     segments as specified in "Segments.mac".  (For Lightspeed/THINK C users,
X+     I suggest adding each file in the proper segment as you build the
X+     project.)  If you are using Think C v.4,  you may just unBinHex the supplied
X+     NH3.proj.hqx file.
X+ 
X+     Uncomment the CUSTOM_IO #define.
X+     
X+     If you use precompiled headers in Lightspeed C v.3 or Think C v.4
X+     you'll have to rename "hack.h" to something else.
X+     Precompile the renamed hack.h file and save this as "hack.h".  You'll
X+     probably will want to precompile "config.h" also.  In order for the
X+     precompiled headers to work, they must be the first #include/#define
X+     statement in every source file.  Certain source files contain
X+     "#define xxxxxxx" before the first "#include hack.h";
X+     the #defines can just be commented out. 
X+     Files that will have to be altered in this manner include end.c,
X+     extralev.c, mon.c, pager.c, priest.c, save.c, shk.c, sounds.c, topl.c,
X+     and topten.c.
X+     To do this effortlessly, you can use the Grep feature in the Find
X+     dialog box.
X+ 
X+     Assuming, all the source files are in a project, select Find... from
X+     the Search menu.
X+     Select the checkbox "Grep" and press Command-A to search all source files.
X+     Type the following into the "Search for:" field:
X+         \(#.*pre-compiled headers \*\/\)
X+     Type the following into the "Replace with:" field.
X+         /* \1
X+     Then press the Find button in the dialog box. After the first time
X+     it locates the pattern, select Replace All from the Search menu.
X+     Afterwards, select Find in Next File and select Replace All for
X+     every file the pattern is located in, until you have reached the end.
X+ 
X+     In mon.c, though, you'll have to comment out the #if to avoid the
X+     Microport bug, by hand.
X+ 
X+     Also make sure that you aren't auto-including "MacHeaders"
X+     (under the "Options..." menu item, Code Generation).
X+ 
X+     In the "Set Project Type..." dialog, select Application,
X+     File type 'APPL', Creator 'nh30', Separate STRS, enter 750 for
X+     Partition Size and select Multifinder-Aware and Suspend & Resume
X+     Events from the Multifinder Popup menu.
X+ 
X+     An executable with all features set, except for STRONGHOLD, will be around
X+     650K in size.
X+ 
X+ 8.  For ease of use make sure the support files data, rumors, cmdhelp, opthelp,
X+     help, hh, history, and license (and oracles, if you compiled in that
X+     feature) got copied to the game directory.  If not, move them there from
X+     the auxil directory yourself.  The rumors file can be created by selecting
X+     'rumors' from makedefs; data by selecting 'data' from makedefs.
X+     The record file will be created by makedefs.
X+ 
X+     You'll have to create a TEXT file called "news" if you want this option
X+     to work. The makedefs project will set the icon for this file.
X+ 
X+     If you're industrious you might try working on the special files. If you
X+     compiled in the special levels, make sure castle, tower? and endgame are in
X+     the game folder, too.  The lev_comp project will create these.  You may use
X+     precompiled headers here - just make sure they are the first #include or
X+     #define in the lev*.c files.  THINK C 4 users should make sure that stdio.h
X+     won't try to include itself twice by prepending a
X+ 
X+         #ifndef _H_stdio
X+         #define _H_stdio
X+ 
X+     to the beginning of stdio.h and a corresponding #endif at the end of the
X+     file.
X+ 
X+     The necessary source files for the special level compiler are:
X+         alloc.c, lev_comp.c, lev_lex.c, lev_main.c, monst.c, objects.c,
X+         and panic.c.
X+ 
X+     Ensure that "#define MAKEDEFS_C" is undefined in config.h
X+     as the special level compiler makes use of the resources created
X+     in the makedefs project.
X+     A couple of changes needed in lev_lex.c which couldn't be incorporated into
X+     lev_lex.l (at least not now) if SMALLDATA is used:
X+ 
X+     Change
X+         FILE *yyin ={stdin}, *yyout ={stdout};
X+     to
X+         FILE *yyin =stdin, *yyout =stdout;
X+ 
X+     Change
X+         int yyleng; extern char yytext[];
X+         int yymorfg;
X+         extern char *yysptr, yysbuf[];
X+     to
X+ 	int yyleng; extern char *yytext;
X+ 	int yymorfg;
X+ 	extern char *yysptr, *yysbuf;
X+ 
X+     Change
X+         char yytext[YYLMAX];
X+     to
X+         char *yytext;
X+ 
X+     Change
X+         char yysbuf[YYLMAX];
X+         char *yysptr = yysbuf;
X+     to
X+         char *yysbuf;
X+         char *yysptr;
X+ 
X+ 	Change
X+ 		#endif not lint
X+ 	to
X+ 		#endif /* not lint */
X+ 
X+     If you're using precompiled headers, you'll have to move the line
X+     #include "hack.h" to the top of the file, before #include "stdio.h"
X+ 	
X+     You will have to comment out the second #define NLSTATE if you're using
X+     Lightspeed/THINK C.  There is code in lev_main.c to handle the changes.
X+     In the "Set Project Type..." dialog, select "Separate STRS" to keep the
X+     project's global data under 32K.
X+ 
X+     In lev_main.c you'll have to uncomment the #include "hack.h" at the
X+     top of the file.
X+ 
X+     Add in the necessary libraries to the project - these should be the
X+     same libraries used in the makedefs project.
X+ 
X+ Notes:
X+ 1.  Save files and bones files from previous versions will not work with
X+     NetHack 3.0.  Don't bother trying to keep them.  Record (score) files
X+     from before 3.0 patchlevel 7 will almost work, but you need to make one
X+     change manually to them:  At the end of each line is a word or phrase
X+     specifying what killed the player.  Change the string to start with the
X+     words "killed by", "killed by a", or "killed by an" (whichever is
X+     appropriate).  If the death was petrification, it should read "petrified
X+     by" instead of "killed by".  Don't change "starvation", "quit", "escaped",
X+     or "ascended".
X+ 
X+ 2.  For Aztec C:
X+     To install an update of this version of NetHack after changing something,
X+     type 'make' from the src directory.  If you created the new version
X+     yourself, it should be safe to use 'make update' as long as you did not
X+     add, delete, or reorder monsters or objects and you did not change 
X+     the format of saved level files.  If you did any of these things, you
X+     should also delete any saved games and bones levels.  (Trying to use such
X+     files often produces amusing but useless confusions on the game's part.)
X+ 
X+ 3.  If you have any problems with Lightspeed/THINK C you might try these
X+     two suggestions:
X+            a) Increase the Partition Size for NetHack to >750K.
X+     and/or b) Remove all the objects from the Project and do a full build.
X+ 
X+     On a Mac II you will have NetHack in about 30 minutes.
X+     Hope you enjoy the game.  We have worked very hard to try to bring it
X+     to the Mac.
X*** ./Old/Install.unix	Mon Feb 19 17:44:32 1990
X--- ./Install.unix	Fri Feb  2 18:24:58 1990
X***************
X*** 3,15 ****
X  
X  1.  Make sure all the NetHack files are in the appropriate directory structure.
X      You should have a main directory with subdirectories src, include, auxil,
X!     amiga, and others.  If you do not follow this structure, the Makefiles
X!     will not function properly.  All the UNIX .c files and the source Makefile
X!     belong in src; all the .h files belong in include; other assorted files
X!     belong in auxil.  The UNIX version does not use any files from amiga or
X!     others, except possibly for random.c from others, as explained in step 6.
X!     (A more detailed explanation of the directory structure may be found in
X!     Files, which should be in the top directory.)
X  
X  2.  Your Makefiles may still have tags on the end of them.  Makefile.top should
X      become Makefile in the top directory, Makefile.src Makefile in the src
X--- 3,16 ----
X  
X  1.  Make sure all the NetHack files are in the appropriate directory structure.
X      You should have a main directory with subdirectories src, include, auxil,
X!     amiga, mac, vms, and others.  If you do not follow this structure, the
X!     Makefiles will not function properly.  All the UNIX .c files and the
X!     source Makefile belong in src; all the .h files belong in include; other
X!     assorted data files belong in auxil.  The UNIX version does not use any
X!     files from the other directories, except possibly for random.c from
X!     others, as explained in step 6.  (A more detailed explanation of the
X!     directory structure may be found in Files, which should be in the top
X!     directory.)
X  
X  2.  Your Makefiles may still have tags on the end of them.  Makefile.top should
X      become Makefile in the top directory, Makefile.src Makefile in the src
X***************
X*** 53,66 ****
X      terminal capability libraries.  Make sure that the TERMINFO definition in
X      unixconf.h and the TERMLIB definition in the source Makefile correspond.
X      If spurious characters appear on the screen while kicking, zapping, etc.,
X!     it is likely that you have linked the source to the wrong library.
X!     If your terminal library does not provide suitable delays, NetHack will
X!     try to fake its own if you set the nonull option.
X  
X! 2.  No, your old save files and bones files will not work with NetHack 3.0.
X!     Don't bother trying to keep them.  The old score list will work fine; the
X!     only problem is that you may have trouble beating your old scores in this
X!     version.
X  
X  3.  If you insisted on doing the final installation by hand, you probably
X      forgot to make a save directory.  If you don't go back and do this, you
X--- 54,73 ----
X      terminal capability libraries.  Make sure that the TERMINFO definition in
X      unixconf.h and the TERMLIB definition in the source Makefile correspond.
X      If spurious characters appear on the screen while kicking, zapping, etc.,
X!     it is likely that you have linked the source to the wrong library or
X!     mistakenly defined/undefined TERMINFO.  If your terminal library does not
X!     provide suitable delays, NetHack will try to fake its own if you set the
X!     nonull option.
X  
X! 2.  Save files and bones files from previous versions will not work with
X!     NetHack 3.0.  Don't bother trying to keep them.  Record (score) files
X!     from before 3.0 patchlevel 7 will almost work, but you need to make one
X!     change manually to them:  At the end of each line is a word or phrase
X!     specifying what killed the player.  Change the string to start with the
X!     words "killed by", "killed by a", or "killed by an" (whichever is
X!     appropriate).  If the death was petrification, it should read "petrified
X!     by" instead of "killed by".  Don't change "starvation", "quit", "escaped",
X!     or "ascended".
X  
X  3.  If you insisted on doing the final installation by hand, you probably
X      forgot to make a save directory.  If you don't go back and do this, you
X***************
X*** 85,87 ****
X--- 92,102 ----
X  6.  If you get unexplained deaths by trickery, you are probably running
X      NetHack on a bunch of workstations, but you have overlooked the NETWORK
X      definition in unixconf.h that is necessary in that configuration.
X+ 
X+ 7.  If you are trying to compile NetHack on an AT&T 3B that is running an
X+     OS earlier than SVR3, you are likely to have problems with overflowing
X+     symbol tables.  This can be worked around by editing the source Makefile
X+     to make the Sys.3B2 target work more like the SysV-AT target, adding
X+     -DDUMB to CFLAGS and DUMB.Setup to the Sys.3B2 dependency line.  The
X+     compiler provided with later versions of the OS has a large enough
X+     symbol table that it does not need this workaround.
X*** /dev/null	Mon Feb 19 17:44:45 1990
X--- ./Install.vms	Fri Feb  2 18:25:03 1990
X***************
X*** 0 ****
X--- 1,102 ----
X+ 
X+ Instructions for installing NetHack 3.0 on a VMS system
X+ =======================================================
X+ 
X+ 1.  Make sure all the NetHack files are in the appropriate directory
X+     structure.  You should have a main directory with subdirectories [.src],
X+     [.include], [.auxil], [.amiga], [.mac], [.vms], and [.others].  If you do
X+     not follow this structure, the instructions in this file will not function
X+     properly.  The .c files in [.src] are files which are used by all versions
X+     of NetHack, regardless of machine (there are a few UNIX specific files,
X+     but we can ignore them).  All the VMS specific .c files and some .com
X+     files belong in [.vms].  All the .h files belong in [.include].  Other
X+     assorted files belong in [.auxil].  The VMS version does not use any files
X+     from [.amiga], [.mac], or [.others], except possibly for random.c from
X+     others, as explained in step 6.  (A more detailed explanation of the
X+     directory structure may be found in Files, which should be in the top
X+     directory.)
X+ 
X+ 2.  Go to the [.include] directory and edit config.h according to the comments
X+     to match your system and desired set of features.  Similarly edit
X+     vmsconf.h.
X+ 
X+ 3.  If you want to, look through system.h.  This file attempts to match the
X+     types for system calls and library routines with various flavors of
X+     operating systems.  Leaving this file alone is unlikely to cause problems,
X+     but it's worth checking if you get compile errors, especially if you have
X+     an unusual configuration.
X+ 
X+ 4.  Go to the [.src] directory and look at the top of topten.c.  You may want
X+     to change the definitions of PERSMAX and PERS_IS_UID here to get different
X+     behavior from the high score list.
X+ 
X+ 5.  If you are using GCC rather than VAX C as your compiler, you will need to
X+     edit [.vms]vmsbuild.com to change the definition of the 'cc' command
X+     (comment out the "CC" definition and un-comment the "GCC" definition).
X+     Also un-comment the reference to gcclib in the link command.
X+ 
X+ 6.  If you elected to not use the provided (BSD) random routines (by changing
X+     [.include]vmsconf.h), you will need to remove the references to random.c
X+     and random.obj from [.vms]vmsbuild.com.
X+ 
X+ 7.  SET DEFAULT to [.src] and type '@[-.vms]vmsbuild', then go get a cup of
X+     coffee or take a nap.  You should now have created the game executable.
X+ 
X+ 8.  Edit [.vms]spec_lev.com to reflect the versions of lex/flex/yacc/bison
X+     you wish to use.  If you don't have any lex/yacc, you may be able to use
X+     the versions of lev_lex.c and lev_comp.c supplied with the distribution,
X+     although they were probably produced on a Unix system and may have some
X+     non-portable constructs.
X+ 
X+ 9.  Type @[-.vms]spec_lev to set up files for some of the special levels.
X+ 
X+ 10. Go back to the main directory.  Edit [.vms]install.com to indicate where
X+     you want everything to be installed.  Type @[.vms]install and everything
X+     should be set.
X+ 
X+ Notes:
X+ 
X+ 1.  VMS Nethack uses the termcap routines supplied with GNU Emacs.  These have
X+     been supplied for those who do not already have GNU Emacs, but they are
X+     not properly a part of the NetHack distribution.  Since these files
X+     (vmstermcap.c and vmstparam.c) bear the usual GNU license, any executable
X+     made with these files is also under the GNU license, which among other
X+     things means you must be prepared to distribute all the source that went
X+     into the executable if you distribute the executable.  See the GNU license
X+     in the files for further details.
X+ 
X+ 2.  No termcap file is supplied.  One should be snarfable from any Unix
X+     system.  If you do not have GNU Emacs installed, you will need to define
X+     the logical TERMCAP to point to the termcap file.
X+ 
X+ 3.  There is code which attempts to make Nethack secure in case it is
X+     installed with privileges (to allow the playground to be protected against
X+     world write).  THIS HAS NOT BEEN TESTED.  Install Nethack with privileges
X+     at your own risk.  If you do so, however, we would love to hear of your
X+     experiences, good or bad.
X+ 
X+ 4.  VMS Nethack uses SMG$READ_KEYSTROKE to read characters from the keyboard.
X+     This means that arrow keys work!  It also means that using escape to abort
X+     commands doesn't!  If you want to abort a command use ^Z.  Just about any
X+     non-arrow function key should also work.  Note that under Unix ^Z is the
X+     suspend command.  This is of little use on VMS so our use is harmless.
X+ 
X+ 5.  Nethack does not run in PASTHRU or PASSALL mode.  This is to allow ^C
X+     interrupts.  An unpleasant (albeit minor) side-effect of this is that some
X+     wizard commands don't work (^G, ^O, ^X).  Another side-effect is that ^Y
X+     and ^C echo the stupid, inverse-video "CANCEL" and "INTERRUPT" banners.
X+     Is there no way other than PASTHRU/PASSALL to turn these off???
X+ 
X+ 6.  To install an update of this version of NetHack after changing something
X+     you will have to go through almost the entire build process (unless you
X+     know for certain exactly what needs to be rebuilt).  If you added,
X+     deleted, or reordered monsters or objects or changed the format of saved
X+     level files, you should also remove any saved games and bones levels.
X+     (Trying to use such files often produces amusing but useless confusions on
X+     the game's part.)
X+ 
X+ 7.  As of 3.0 patchlevel 7, the format of the record (score) file has been
X+     changed.  If you want to use your old record file, manually edit it so that
X+     the killer (last item on each line) is preceded by "killed by", "killed by
X+     a", or "killed by an".  If the death was by petrification, use "petrified
X+     by" instead.  Do not change "starvation", "quit", "escaped", or "ascended".
X*** ./Old/README	Mon Feb 19 17:45:17 1990
X--- ./README	Tue Feb  6 18:44:32 1990
X***************
X*** 77,98 ****
X  
X      At the time of this release, NetHack 3.0 is known to run on:
X  
X! 	DEC vaxen running Ultrix and BSD
X! 	Sun-3s running SunOS 4.0
X! 	Encore Multimax running UMAX 4.2
X! 	Bull XPS100 running System V R2.2 or R3.1
X! 	Bull DPX/2 200 running System V R3.1
X! 	AT&T 3B4000 running System V
X! 	AT&T 3B1 running System V (3.51)
X! 	286 box running Microport SysV/AT (not extensively tested)
X! 	IBM PC compatibles running MicroSoft C or Turbo C under MS-DOS
X! 	Commodore Amiga (probably -- there have been some changes since
X! 		the Amiga port was done, but we believe it should still work)
X! 	Atari 1040ST under TOS
X! 	DEC vaxen running VMS (probably still requires tweaking) 
X! 	Data General AViiON systems under DG/UX
X          Valid Logic Systems SCALD-System
X          Macintosh (still requires testing)
X  
X  			- - - - - - - - - - -
X  
X--- 77,105 ----
X  
X      At the time of this release, NetHack 3.0 is known to run on:
X  
X!         DEC vaxen running Ultrix and BSD
X!         Sun-3s running SunOS 4.0
X!         Encore Multimax running UMAX 4.2
X!         Bull XPS100 running System V R2.2 or R3.1
X!         Bull DPX/2 200 running System V R3.1
X!         AT&T 3B4000 running System V
X!         AT&T 3B1 running System V (3.51)
X!         AT&T 3B2/600 & 3B2/622 running System V R3.2.1
X!         AT&T 3B2/1000 Model 80 running System V R3.2.2
X!         286 box running Microport SysV/AT (not extensively tested)
X!         IBM PC compatibles running MicroSoft C or Turbo C under MS-DOS
X!         IBM PS/2 and AT compatibles running MicroSoft C under OS/2
X!         Commodore Amiga running Lattice or Manx/Aztec C under
X! 		AmigaDOS 1.3 (WorkBench 1.3, KickStart 1.2 or 1.3)
X!         Atari 1040ST under TOS
X!         DEC vaxen running VMS
X!         Data General AViiON systems under DG/UX
X          Valid Logic Systems SCALD-System
X          Macintosh (still requires testing)
X+         Mips M2000 running RiscOS 4.1
X+         Gould NP1 running UTX 3/2
X+         Stride 460 running UniStride 2.1
X+         Pyramid 9820x running OSx 4.4c
X  
X  			- - - - - - - - - - -
X  
X*** /dev/null	Mon Feb 19 16:41:39 1990
X--- vms/Install.com	Sun Jan 21 15:08:23 1990
X***************
X*** 0 ****
X--- 1,20 ----
X+ $ gamedir = "USR$ROOT0:[GENTZEL.NHDIR]"
X+ $ gameuic = "GENTZEL"
X+ $
X+ $ set default [.src]
X+ $ mcr sys$disk:[]makedefs -d
X+ $ mcr sys$disk:[]makedefs -r
X+ $ set default [-]
X+ $
X+ $! set up the directories
X+ $ create/directory/owner='gameuic'/prot=(s:rwed,o:rwed,g:rwed,w:rwed) -
X+ 	'f$string(gamedir - "]" + ".SAVE]")'
X+ $! create some files
X+ $ create/prot=(s:rwed,o:rwed,g:rwed,w:rwed) 'gamedir'perm.,record.,logfile.
X+ $! copy over the game files
X+ $ copy/prot=(s:re,o:re,g:re,w:re) [.auxil]help.,hh,cmdhelp,history,opthelp, -
X+ 	oracles,data,rumors,endgame,castle,tower1,tower2,tower3,license -
X+ 	'gamedir'
X+ $ copy/prot=(s:re,o:re,g:re,w:re) [.src]nethack.exe 'gamedir'
X+ $! set up the permissions
X+ $ set file/owner='gameuic' 'gamedir'*.*;*
X*** vms/Old/vmsbuild.com	Mon Feb 19 16:42:05 1990
X--- vms/vmsbuild.com	Tue Feb  6 19:02:10 1990
X***************
X*** 1,8 ****
X--- 1,10 ----
X  $ makedefs := $sys$disk:[]makedefs
X  $ cc = "CC/NOLIST/OPT=NOINLINE/DEB/INCL=[-.INCLUDE]/DEFI=(""WIZARD=""""GENTZEL"""""")"
X+ $! cc = "GCC/DEB/INCL=[-.INCLUDE]/DEFI=(""WIZARD=""""GENTZEL"""""")/CC1=""-fwritable-strings"""
X  $ link := link/nomap'p2'
X  $ if p1 .eqs. "LINK" then goto link
X  $ define sys sys$library:
X+ $ ! /obj=file doesn't work for GCC 1.36, so use rename instead
X  $ cc alloc.c
X  $ cc makedefs.c
X  $ cc monst.c
X***************
X*** 41,47 ****
X  $ cc invent.c
X  $ cc lock.c
X  $ cc mail.c
X! $ cc [-.vms]vmsmain.c/obj=main.obj
X  $ cc makemon.c
X  $ cc mcastu.c
X  $ cc mhitm.c
X--- 43,50 ----
X  $ cc invent.c
X  $ cc lock.c
X  $ cc mail.c
X! $ cc [-.vms]vmsmain.c
X! $ rename vmsmain.obj main.obj
X  $ cc makemon.c
X  $ cc mcastu.c
X  $ cc mhitm.c
X***************
X*** 86,95 ****
X  $ cc topten.c
X  $ cc track.c
X  $ cc trap.c
X! $ cc [-.vms]vmstty.c/obj=tty.obj
X  $ cc u_init.c
X  $ cc uhitm.c
X! $ cc [-.vms]vmsunix.c/obj=unix.obj
X  $ cc vault.c
X  $ makedefs -v
X  $ cc version.c
X--- 89,100 ----
X  $ cc topten.c
X  $ cc track.c
X  $ cc trap.c
X! $ cc [-.vms]vmstty.c
X! $ rename vmstty.obj tty.obj
X  $ cc u_init.c
X  $ cc uhitm.c
X! $ cc [-.vms]vmsunix.c
X! $ rename vmsunix.obj unix.obj
X  $ cc vault.c
X  $ makedefs -v
X  $ cc version.c
X***************
X*** 102,108 ****
X  $ cc write.c
X  $ cc zap.c
X  $ cc [-.others]random.c
X! $ cc/def="bcopy(s1,s2,sz)=memcpy(s2,s1,sz)" [-.vms]vmstermcap.c
X  $ cc [-.vms]vmstparam.c
X  $link:
X  $ link/exe=nethack sys$input:/opt
X--- 107,116 ----
X  $ cc write.c
X  $ cc zap.c
X  $ cc [-.others]random.c
X! $ create vmstermcap.c
X! #define bcopy(s,d,n) memcpy(d,s,n)
X! $ append [-.vms]vmstermcap.c []
X! $ cc vmstermcap.c
X  $ cc [-.vms]vmstparam.c
X  $link:
X  $ link/exe=nethack sys$input:/opt
X***************
X*** 200,202 ****
X--- 208,211 ----
X  vmstermcap.obj,-
X  vmstparam.obj
X  sys$library:vaxcrtl/library
X+ !gnu_cc:[000000]gcclib/library
X*** vms/Old/vmsmain.c	Mon Feb 19 16:42:18 1990
X--- vms/vmsmain.c	Sun Feb 11 11:29:15 1990
X***************
X*** 3,15 ****
X  /* NetHack may be freely redistributed.  See license for details. */
X  /* main.c - VMS NetHack */
X  
X- #include <signal.h>
X- 
X  #include "hack.h"
X  
X  char SAVEF[PL_NSIZ + 20];			/* [.save]<uic>player;1 */
X  
X! char *hname = 0;		/* name of the game (argv[0] of call) */
X  char obuf[BUFSIZ];	/* BUFSIZ is defined in stdio.h */
X  int hackpid = 0;				/* current pid */
X  int locknum = 0;				/* max num of players */
X--- 3,15 ----
X  /* NetHack may be freely redistributed.  See license for details. */
X  /* main.c - VMS NetHack */
X  
X  #include "hack.h"
X  
X+ #include <signal.h>
X+ 
X  char SAVEF[PL_NSIZ + 20];			/* [.save]<uic>player;1 */
X  
X! const char *hname = 0;		/* name of the game (argv[0] of call) */
X  char obuf[BUFSIZ];	/* BUFSIZ is defined in stdio.h */
X  int hackpid = 0;				/* current pid */
X  int locknum = 0;				/* max num of players */
X***************
X*** 213,219 ****
X  
X  	Sprintf(SAVEF, "[.save]%d%s", getuid(), plname);
X  	regularize(SAVEF+7);	/* avoid bogus chars in name */
X! 	if((fd = open(SAVEF,0)) >= 0 &&
X  	   (uptodate(fd) || unlink(SAVEF) >= 0)) {
X  #ifdef WIZARD
X  		/* Since wizard is actually flags.debug, restoring might
X--- 213,220 ----
X  
X  	Sprintf(SAVEF, "[.save]%d%s", getuid(), plname);
X  	regularize(SAVEF+7);	/* avoid bogus chars in name */
X! 	if((fd = open(SAVEF,O_RDONLY)) >= 0 &&
X! 	   /* if not up-to-date, quietly unlink file via false condition */
X  	   (uptodate(fd) || unlink(SAVEF) >= 0)) {
X  #ifdef WIZARD
X  		/* Since wizard is actually flags.debug, restoring might
X***************
X*** 221,228 ****
X  		 */
X  		boolean remember_wiz_mode = wizard;
X  #endif
X  		(void) signal(SIGINT, (SIG_RET_TYPE) done1);
X! 		pline("Restoring old save file...");
X  		(void) fflush(stdout);
X  		if(!dorecover(fd))
X  			goto not_recovered;
X--- 222,230 ----
X  		 */
X  		boolean remember_wiz_mode = wizard;
X  #endif
X+ 		(void) chmod(SAVEF,0);	/* disallow parallel restores */
X  		(void) signal(SIGINT, (SIG_RET_TYPE) done1);
X! 		pline("Restoring save file...");
X  		(void) fflush(stdout);
X  		if(!dorecover(fd))
X  			goto not_recovered;
X***************
X*** 240,246 ****
X  		if (discover || wizard) {
X  			pline("Do you want to keep the save file? ");
X  			if(yn() == 'n')
X! 				(void) unlink(SAVEF);
X  		}
X  #endif
X  		flags.move = 0;
X--- 242,250 ----
X  		if (discover || wizard) {
X  			pline("Do you want to keep the save file? ");
X  			if(yn() == 'n')
X! 			    (void) unlink(SAVEF);
X! 			else
X! 			    (void) chmod(SAVEF,FCMASK); /* back to readable */
X  		}
X  #endif
X  		flags.move = 0;
X***************
X*** 331,344 ****
X  	}
X  
X  	/* warn the player if we can't write the record file */
X  	if(wr) {
X  	    register int fd;
X  
X  	    if(dir == NULL)
X  		dir = "";
X! 	    if((fd = open(RECORD, 2)) < 0) {
X! 		Printf("Warning: cannot write %s%s", dir, RECORD);
X! 		getret();
X  	    } else
X  		(void) close(fd);
X  	}
X--- 335,353 ----
X  	}
X  
X  	/* warn the player if we can't write the record file */
X+ 	/* perhaps we should also test whether . is writable */
X+ 	/* unfortunately the access systemcall is worthless */
X  	if(wr) {
X  	    register int fd;
X  
X  	    if(dir == NULL)
X  		dir = "";
X! 	    if((fd = open(RECORD, O_RDWR)) < 0) {
X! 		if((fd = open(RECORD, O_CREAT|O_RDWR, FCMASK)) < 0) {
X! 		    Printf("Warning: cannot write %s/%s", dir, RECORD);
X! 		    getret();
X! 		} else
X! 		    (void) close(fd);
X  	    } else
X  		(void) close(fd);
X  	}
X***************
X*** 366,372 ****
X  static void
X  byebye()
X  {
X!     void (*hup)();
X      extern unsigned int dosh_pid;
X  
X      /* SIGHUP doesn't seem to do anything on VMS, so we fudge it here... */
X--- 375,381 ----
X  static void
X  byebye()
X  {
X!     int (*hup)();
X      extern unsigned int dosh_pid;
X  
X      /* SIGHUP doesn't seem to do anything on VMS, so we fudge it here... */
X*** vms/Old/vmsunix.c	Mon Feb 19 16:43:44 1990
X--- vms/vmsunix.c	Tue Feb  6 19:02:25 1990
X***************
X*** 23,28 ****
X--- 23,30 ----
X  #undef off_t
X  #include <sys/stat.h>
X  
X+ int FDECL(link, (const char *, const char *));
X+ 
X  void
X  setrandom()
X  {
X***************
X*** 197,203 ****
X  		if((fd = open(lock, 0)) == -1) {
X  			if(errno == ENOENT) goto gotlock;    /* no such file */
X  			perror(lock);
X! 			(void) delete(LLOCK);
X  			error("Cannot open %s", lock);
X  		}
X  
X--- 199,205 ----
X  		if((fd = open(lock, 0)) == -1) {
X  			if(errno == ENOENT) goto gotlock;    /* no such file */
X  			perror(lock);
X! 			(void) unlink(LLOCK);
X  			error("Cannot open %s", lock);
X  		}
X  
X***************
X*** 206,218 ****
X  		(void) close(fd);
X  	} while(i < locknum);
X  
X! 	(void) delete(LLOCK);
X  	error(locknum ? "Too many hacks running now."
X  		      : "There is a game in progress under your name.");
X  gotlock:
X  	fd = creat(lock, FCMASK);
X! 	if(delete(LLOCK) == -1)
X! 		error("Cannot delete %s.", LLOCK);
X  	if(fd == -1) {
X  		error("cannot creat lock file.");
X  	} else {
X--- 208,220 ----
X  		(void) close(fd);
X  	} while(i < locknum);
X  
X! 	(void) unlink(LLOCK);
X  	error(locknum ? "Too many hacks running now."
X  		      : "There is a game in progress under your name.");
X  gotlock:
X  	fd = creat(lock, FCMASK);
X! 	if(unlink(LLOCK) == -1)
X! 		error("Cannot unlink %s.", LLOCK);
X  	if(fd == -1) {
X  		error("cannot creat lock file.");
X  	} else {
X***************
X*** 242,248 ****
X  }
X  
X  int link(file, new)
X! char *file, *new;
X  {
X      int status;
X      struct FAB fab;
X--- 244,250 ----
X  }
X  
X  int link(file, new)
X! const char *file, *new;
X  {
X      int status;
X      struct FAB fab;
X***************
X*** 298,304 ****
X  
X  #undef unlink
X  int unlink(file)
X! char *file;
X  {
X      int status;
X      struct FAB fab = cc$rms_fab;
X--- 300,306 ----
X  
X  #undef unlink
X  int unlink(file)
X! const char *file;
X  {
X      int status;
X      struct FAB fab = cc$rms_fab;
X***************
X*** 306,312 ****
X      char esa[NAM$C_MAXRSS];
X  
X      fab.fab$l_fop = FAB$M_DLT;
X!     fab.fab$l_fna = file;
X      fab.fab$b_fns = strlen(file);
X      fab.fab$l_nam = &nam;
X      nam.nam$l_esa = esa;
X--- 308,314 ----
X      char esa[NAM$C_MAXRSS];
X  
X      fab.fab$l_fop = FAB$M_DLT;
X!     fab.fab$l_fna = (char *) file;
X      fab.fab$b_fns = strlen(file);
X      fab.fab$l_nam = &nam;
X      nam.nam$l_esa = esa;
X*** /dev/null	Mon Feb 19 22:05:28 1990
X--- include/MacAlert.h	Fri Feb 16 19:04:41 1990
X***************
X*** 0 ****
X--- 1,66 ----
X+ /*	SCCS Id: @(#)MacAlert.h		3.0	90/01/06
X+ /*      Copyright (c) Jon Watte  1989		*/ 
X+ /* NetHack may be freely redistributed.  See license for details. */
X+ 
X+ #ifndef MACALERT_H
X+ #define MACALERT_H
X+ 
X+ #define MAtype 'MAlt'
X+ 
X+ 
X+ typedef struct Malrt {
X+ 	int width;
X+ 	int height;
X+ 	int PICTno;
X+ 	char text[256];
X+ 	char but1[32];
X+ 	char but2[32];
X+ 	char but3[32];
X+ 	char but4[32];
X+ 	int def;
X+ 	int esc;
X+ } MAlrt, * MAlrtPtr, ** MAlrtHandle;
X+ 
X+ 
X+ extern int UseMacAlert(int MAno);
X+ extern int UseMacAlertText(int MAno, char * txt);
X+ extern int MacAlert(int width, int height, int PICTno, char * text,
X+ 	char * but1, char * but2, char * but3, char * but4, int def, int esc);
X+ extern int TrackThem(Rect * b_rect, char * hi_lite, int no_butts);
X+ extern int mac_more(FILE * fp, int strip);
X+ 
X+ /* Minimum values to which given values will be justified if lower */
X+ 
X+ #define MIN_WIDTH 170
X+ #define MIN_HEIGHT 100
X+ 
X+ /* Good values for a "normal" alert */
X+ 
X+ #define WIDTH 250
X+ #define HEIGHT 200
X+ 
X+ /* Constants to tweak how to draw the buttons */
X+ 
X+ #define BUT_HEIGHT 20
X+ #define BUT_WIDTH 50
X+ #define BUT_SPACING 10
X+ #define BUT_MARGIN 5
X+ #define BUT_CORNER 10
X+ 
X+ /* Frame around the default button */
X+ 
X+ #define FRAME_WIDTH 3
X+ #define FRAME_OFFSET 1
X+ #define FRAME_CORNER 16
X+ 
X+ /* How to draw the border */
X+ 
X+ #define BORDER_PAT 5
X+ #define BORDER_WIDTH 3
X+ 
X+ /* How long to mark the pressed ? */
X+ 
X+ #define FLASH_TIME 10 /* In ticks */
X+ 
X+ 
X+ #endif
X*** include/Old/amiconf.h	Mon Feb 19 22:05:40 1990
X--- include/amiconf.h	Mon Feb 19 18:16:01 1990
X***************
X*** 4,18 ****
X  #ifndef AMICONF_H
X  #define AMICONF_H
X  
X! #define MSDOS           /* must be defined to allow some inclusions */
X! #define AMIGA           /* and for some other inclusions */
X  
X! #define O_BINARY        0
X! #define remove(x)       unlink(x)
X  
X! #define DGK             /* You'll probably want this; define it in PCCONF.H */
X  #define RANDOM
X  
X  #ifndef MSDOS_H
X  #include "msdos.h"
X  #endif
X--- 4,55 ----
X  #ifndef AMICONF_H
X  #define AMICONF_H
X  
X! #undef abs		/* avoid using macro form of abs */
X! #undef min		/* this gets redefined */
X! #undef max		/* this gets redefined */
X  
X! #include <time.h>	/* get time_t defined before use! */
X! 
X! #ifdef LATTICE		/* since Lattice can prevent re-inclusion */
X! #include <stdlib.h>	/* and other things, including builtins */
X! #if (__VERSION__==5) && (__REVISION__<=4)
X!     /* This enables a fix in src/mondata.c needed to bypass a compiler
X!     bug.  If you need it and don't have it you will get monsndx panics and
X!     monsters that change type when they die and become corpses.
X!     If you don't need it and do have it, even wierder things will happen. */
X! #   define LATTICE_504_BUG
X! #endif
X! #endif
X  
X! #ifdef LATTICE		/* Lattice defines DEBUG when you use -d1 which */
X! # ifdef DEBUG		/* we need for useful SnapShots, but DEBUG is   */
X! #  undef DEBUG		/* used in several files to turn on things we   */
X! # endif			/* don't want (e.g. eat.c), so we get rid of    */
X! #endif			/* DEBUG unless asked for in a particular file  */
X! 
X! typedef long off_t;
X! 
X! #define MSDOS		/* must be defined to allow some inclusions */
X! 
X! #define O_BINARY	0
X! 
X! #define DGK		/* You'll probably want this; provides assistance
X! 			 * for typical personal computer configurations
X! 			 */
X  #define RANDOM
X  
X+ extern void FDECL(exit, (int));
X+ extern void NDECL(CleanUp);
X+ extern void FDECL(Abort, (long));
X+ extern int NDECL(getpid);
X+ extern char *FDECL(CopyFile, (const char *, const char *));
X+ extern int NDECL(WindowGetchar);
X+ extern void FDECL(WindowPutchar, (CHAR_P));
X+ extern void FDECL(WindowPuts, (const char *));
X+ extern void FDECL(WindowFPuts, (const char *));
X+ extern void VDECL(WindowPrintf, (const char *, ...));
X+ extern void FDECL(WindowFlush, (void));
X+ 
X  #ifndef MSDOS_H
X  #include "msdos.h"
X  #endif
X***************
X*** 20,36 ****
X  #include "pcconf.h"     /* remainder of stuff is almost same as the PC */
X  #endif
X  
X  #define memcpy(dest, source, size)  movmem(source, dest, size)
X  
X  /*
X   *  Configurable Amiga options:
X   */
X  
X! #define TEXTCOLOR              /* Use colored monsters and objects */
X! #define HACKFONT                /* Use special hack.font */
X! #define SHELL                   /* Have a shell escape command (!) */
X! #define MAIL                    /* Get mail at unexpected occasions */
X! #undef  TERMLIB
X! #define fopen       fopenp      /* Open most text files according to PATH */
X  
X! #endif /* AMICONF_H /* */
X--- 57,112 ----
X  #include "pcconf.h"     /* remainder of stuff is almost same as the PC */
X  #endif
X  
X+ #ifndef LATTICE
X  #define memcpy(dest, source, size)  movmem(source, dest, size)
X+ #endif
X+ #define remove(x)       unlink(x)
X+ 
X+ #ifdef LATTICE
X+ #define FFLUSH(fp) _flsbf(-1, fp)    /* Was fflush */
X+ #endif
X+ 
X+ #ifdef AZTEC_C
X+ #define FFLUSH(fp) flsh_(fp, -1)     /* Was fflush */
X+ extern FILE *FDECL(freopen, (const char *, const char *, FILE *));
X+ extern char *FDECL(gets, (char *));
X+ #endif
X+ 
X+ /* Use Window functions if not in makedefs.c or lev_lex.c */
X+ 
X+ #if !defined(MAKEDEFS_C) && !defined(LEV_LEX_C)
X+ 
X+ #define fopen	    fopenp	/* Open most text files according to PATH */
X+ 
X+ #undef getchar
X+ #undef putchar
X+ #undef fflush
X+ # ifdef LATTICE
X+ #undef printf
X+ # endif
X+ 
X+ #define getchar()   WindowGetchar()
X+ #define putchar(c)  WindowPutchar(c)
X+ #define puts(s)     WindowPuts(s)
X+ #define fputs(s,f)  WindowFPuts(s)
X+ #define printf	    WindowPrintf
X+ #define fflush(fp)  WindowFlush()
X+ 
X+ #define xputs	    WindowFPuts
X+ #define xputc	    WindowPutchar
X+ 
X+ #endif
X  
X  /*
X   *  Configurable Amiga options:
X   */
X  
X! #define TEXTCOLOR		/* Use colored monsters and objects */
X! #define HACKFONT		/* Use special hack.font */
X! #define SHELL			/* Have a shell escape command (!) */
X! #define MAIL			/* Get mail at unexpected occasions */
X! #define AMIGA_WBENCH		/* Icon support */
X! #define DEFAULT_ICON "NetHack:default.icon"	/* private icon for above */
X! #undef	TERMLIB
X  
X! #endif /* AMICONF_H */
X
END_OF_FILE
if test 55711 -ne `wc -c <'patch7.17'`; then
    echo shar: \"'patch7.17'\" unpacked with wrong size!
fi
# end of 'patch7.17'
echo shar: End of archive 9 \(of 30\).
cp /dev/null ark9isdone
MISSING=""
for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 ; do
    if test ! -f ark${I}isdone ; then
	MISSING="${MISSING} ${I}"
    fi
done
if test "${MISSING}" = "" ; then
    echo You have unpacked all 30 archives.
    rm -f ark[1-9]isdone ark[1-9][0-9]isdone
else
    echo You still need to unpack the following archives:
    echo "        " ${MISSING}
fi
##  End of shell archive.
exit 0