From decwrl!wyse!mips!zaphod.mps.ohio-state.edu!uwm.edu!ogicse!zephyr.ens.tek.com!tekred!saab!billr Sat May 19 13:03:13 PDT 1990
Article 898 of comp.sources.games:
Path: decwrl!wyse!mips!zaphod.mps.ohio-state.edu!uwm.edu!ogicse!zephyr.ens.tek.com!tekred!saab!billr
From: billr@saab.CNA.TEK.COM (Bill Randle)
Newsgroups: comp.sources.games
Subject: v09i086:  umoria3 - single player dungeon simulation (ver. 5.2), Part31/31
Message-ID: <5622@tekred.CNA.TEK.COM>
Date: 17 May 90 16:32:13 GMT
Sender: news@tekred.CNA.TEK.COM
Lines: 1774
Approved: billr@saab.CNA.TEK.COM

Submitted-by: wilson@ernie.Berkeley.EDU (Jim Wilson)
Posting-number: Volume 9, Issue 86
Archive-name: umoria3/Part31
Supersedes: umoria2: Volume 5, Issue 32-37,41-52,87



#! /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 31 (of 31)."
# Contents:  atari_st/atarist.c doc/ERRORS doc/README files/hours
#   files/news files/owizcmds.hlp files/rwizcmds.hlp ibmpc/ERRORS
#   ibmpc/MAKE.BAT ibmpc/MORIA.CNF ibmpc/README ibmpc/TERMCAP
#   ibmpc/ms_ansi.h mac/README mac/dumpres/DumpRes.h
#   mac/dumpres/TestDR.c mac/macdata.c mac/macrsrc.h
#   mac/scrnmgr/ERRORS mac/scrnmgr/ScrnTest.r misc/flock.c
#   misc/funckeys.h misc/mabbrev util/README util/mc/ERRORS
#   util/mc/generic.h util/mc/st.h util/weapons/ERRORS
#   util/weapons/highchar.in util/weapons/lowchar.in
#   util/weapons/medchar.in util/weapons/mkallwpn
#   util/weapons/mkallwpn.lst vms/ERRORS vms/cbreak.c vms/uexit.c
# Wrapped by billr@saab on Wed May 16 11:54:51 1990
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f 'atari_st/atarist.c' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'atari_st/atarist.c'\"
else
echo shar: Extracting \"'atari_st/atarist.c'\" \(818 characters\)
sed "s/^X//" >'atari_st/atarist.c' <<'END_OF_FILE'
X
X#include <stdio.h>
X
X#include "constant.h"
X#include "config.h"
X#include "types.h"
X#include "externs.h"
X
X#if defined(GEMDOS) && (__STDC__ == 0)
X#include <time.h>
X#include <osbind.h>
X#include <bios.h>
X#include "curses.h"
X/* check_input does a non blocking read (consuming the input if any) and
X   returns 1 if there was input pending */
Xint check_input(microsec)
Xint microsec;
X{
X	time_t start;
X	
X	if(microsec != 0 && (turn & (unsigned long)0x3f) == 0){
X		start = clock();
X		while ((clock() <= (start + 100)));/*	half second pause */
X	}
X	if (Bconstat(2) != 0L)
X	  {
X	    (void) getch();
X	    return 1;
X	  }
X	else
X	  return 0;
X}
X
Xvoid user_name(buf)
Xchar *buf;
X{
X	extern char *getenv();
X	register char *p;
X	
X	if(p=getenv("NAME")) strcpy(buf, p);
X	else if(p=getenv("USER")) strcpy(buf, p);
X	else strcpy(buf, "X");
X}
X#endif
END_OF_FILE
if test 818 -ne `wc -c <'atari_st/atarist.c'`; then
    echo shar: \"'atari_st/atarist.c'\" unpacked with wrong size!
fi
# end of 'atari_st/atarist.c'
fi
if test -f 'doc/ERRORS' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'doc/ERRORS'\"
else
echo shar: Extracting \"'doc/ERRORS'\" \(676 characters\)
sed "s/^X//" >'doc/ERRORS' <<'END_OF_FILE'
Xmoria.ms should:
X
Xthe backslashes in the direction table don't show up in the output for
Xsome reason
X
Xexplain non obvious spells/prayers, many of the priest spells are confusing,
Xreally should have a general section on spells explaining the 'G' command,
Xhow int/wis and level affects number of spells/prayers, how area effect
Xspells work, centering before casting an area effect spell is very useful
Xand perhaps other stuff about spells/magic
X
Xexplain the special inventory/equipment mode?
X
Xexplain how misc abilities depend on level, give table of class versus
Xability showing the relative gain per level values
X
Xmention too-heavy weapons?
X
Xsays nothing about levels and EXP
END_OF_FILE
if test 676 -ne `wc -c <'doc/ERRORS'`; then
    echo shar: \"'doc/ERRORS'\" unpacked with wrong size!
fi
# end of 'doc/ERRORS'
fi
if test -f 'doc/README' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'doc/README'\"
else
echo shar: Extracting \"'doc/README'\" \(1390 characters\)
sed "s/^X//" >'doc/README' <<'END_OF_FILE'
XFEATURES.NEW
X	mentions all of the important user visible changes from
X	umoria 4.87 to umoria 5.x.
X
Xhistory
X	is a brief history of the program umoria.
X
Xmoria.6
X	is the nroff source for a man page for umoria.  Use the command
X	'nroff -man moria.6' to view it.  By default, it assumes that
X	umoria was compiled with the original command set.  If you
X	compiled umoria with the rogue like command set, then remove
X	the three characters defore the .ds command at the start for
X	a more appropriate man page.
X
Xmoria.man
X	is an already processed copy of the man page (with bold and underlined
X	characters removed) for those without the nroff program.
X
Xmoria1.ms, moria2.ms
X	is the document "The Dungeons of Moria".  It is a complete description
X	of the game.  You may want to adjust the margin and line length
X	values at the beginning.  To view it, use the command
X	'tbl moria1.ms moria2.ms | nroff -ms'.  It is split into two
X	parts so that it can be easily mailed.
X
Xmoria1.txt, moria2.txt
X	is an already processed copy of the document "The Dungeons of Moria"
X	(with bold and underlined characters removed) for those without
X	the nroff program.  It is split into two parts so that it can be
X	easily mailed.
X
Xpronounc
X	explains how to pronounce the name moria.
X
Xversions.inf
X	explains the differences between some of the many different
X	versions of moria, and also gives info on how to obtain them.
END_OF_FILE
if test 1390 -ne `wc -c <'doc/README'`; then
    echo shar: \"'doc/README'\" unpacked with wrong size!
fi
# end of 'doc/README'
fi
if test -f 'files/hours' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'files/hours'\"
else
echo shar: Extracting \"'files/hours'\" \(336 characters\)
sed "s/^X//" >'files/hours' <<'END_OF_FILE'
X    Moria operating hours are:
X    |	 AM	|    PM	    |
X    1	      111	  111
X    2123456789012123456789012
XSUN:XXXXXXXXXXXXXXXXXXXXXXXX
XMON:XXXXXXXXXXXXXXXXXXXXXXXX
XTUE:XXXXXXXXXXXXXXXXXXXXXXXX
XWED:XXXXXXXXXXXXXXXXXXXXXXXX
XTHU:XXXXXXXXXXXXXXXXXXXXXXXX
XFRI:XXXXXXXXXXXXXXXXXXXXXXXX
XSAT:XXXXXXXXXXXXXXXXXXXXXXXX
X       (X=Open; .=Closed)
END_OF_FILE
if test 336 -ne `wc -c <'files/hours'`; then
    echo shar: \"'files/hours'\" unpacked with wrong size!
fi
# end of 'files/hours'
fi
if test -f 'files/news' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'files/news'\"
else
echo shar: Extracting \"'files/news'\" \(649 characters\)
sed "s/^X//" >'files/news' <<'END_OF_FILE'
X			 *********************
X			 **   Umoria 5.2    **
X			 *********************
X		 Copyright (c) 1985 Robert Alan Koeneke
X		   Copyright (c) 1989 James E. Wilson
X
XProgrammers : Robert Alan Koeneke / University of Oklahoma
X	      Jimmey Wayne Todd	 / University of Oklahoma
XUNIX Port : James E. Wilson    / UC Berkeley
X
XThis is a beta release of Umoria 5.2.  Please send bug reports to
Xwilson@ernie.berkeley.EDU or to the USENET newsgroup rec.games.moria.
X
XPlease read the file doc/FEATURES.NEW.  In particular, note the new commands
X'G' for learning spells, and '=' for setting options.  Also, to attack
Xinvisible creatures in walls, you must tunnel.
END_OF_FILE
if test 649 -ne `wc -c <'files/news'`; then
    echo shar: \"'files/news'\" unpacked with wrong size!
fi
# end of 'files/news'
fi
if test -f 'files/owizcmds.hlp' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'files/owizcmds.hlp'\"
else
echo shar: Extracting \"'files/owizcmds.hlp'\" \(376 characters\)
sed "s/^X//" >'files/owizcmds.hlp' <<'END_OF_FILE'
X:  - Map area.
X^A - Remove Curse and Cure all maladies.
X^B - Print random objects sample.
X^D - Down/Up n levels.
X^E - Change character.
X^F - Delete monsters.
X^G - Allocate treasures.
X^H - Wizard Help.
X^I - Identify.
X^J - Gain experience.
X^L - Wizard light.
X^T - Teleport player.
X^U  - Summon monster.
X^W - Wizard password on/off.
X@ - Create any object *CAN CAUSE FATAL ERROR*
END_OF_FILE
if test 376 -ne `wc -c <'files/owizcmds.hlp'`; then
    echo shar: \"'files/owizcmds.hlp'\" unpacked with wrong size!
fi
# end of 'files/owizcmds.hlp'
fi
if test -f 'files/rwizcmds.hlp' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'files/rwizcmds.hlp'\"
else
echo shar: Extracting \"'files/rwizcmds.hlp'\" \(376 characters\)
sed "s/^X//" >'files/rwizcmds.hlp' <<'END_OF_FILE'
X*  - Wizard light.
X:  - Map area.
X\  - Wizard Help.
X^A - Remove Curse and Cure all maladies.
X^D - Down/Up n levels.
X^E - Change character.
X^F - Delete monsters.
X^G - Allocate treasures.
X^I - Identify.
X^O - Print random objects sample.
X^T - Teleport player.
X^W - Wizard password on/off.
X@  - Create any object *CAN CAUSE FATAL ERROR*
X+  - Gain experience.
X&  - Summon monster.
END_OF_FILE
if test 376 -ne `wc -c <'files/rwizcmds.hlp'`; then
    echo shar: \"'files/rwizcmds.hlp'\" unpacked with wrong size!
fi
# end of 'files/rwizcmds.hlp'
fi
if test -f 'ibmpc/ERRORS' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'ibmpc/ERRORS'\"
else
echo shar: Extracting \"'ibmpc/ERRORS'\" \(135 characters\)
sed "s/^X//" >'ibmpc/ERRORS' <<'END_OF_FILE'
Xthe two files Makefile and Makefile.XNX are obsolete, and need to be
Xupdated
X
Xthe config.doc file is obsolete, and needs to be updated
END_OF_FILE
if test 135 -ne `wc -c <'ibmpc/ERRORS'`; then
    echo shar: \"'ibmpc/ERRORS'\" unpacked with wrong size!
fi
# end of 'ibmpc/ERRORS'
fi
if test -f 'ibmpc/MAKE.BAT' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'ibmpc/MAKE.BAT'\"
else
echo shar: Extracting \"'ibmpc/MAKE.BAT'\" \(162 characters\)
sed "s/^X//" >'ibmpc/MAKE.BAT' <<'END_OF_FILE'
Xcl -c -AL -Os -Gs -Zp -Gt32 -DPC_CURSES *.c
Xlink <mlink.lnk
Xexemod moria.exe /stack 3fff
Xrename moria.exe moria.xxx
Xexepack moria.xxx moria.exe
Xdelete moria.xxx
X
END_OF_FILE
if test 162 -ne `wc -c <'ibmpc/MAKE.BAT'`; then
    echo shar: \"'ibmpc/MAKE.BAT'\" unpacked with wrong size!
fi
# end of 'ibmpc/MAKE.BAT'
fi
if test -f 'ibmpc/MORIA.CNF' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'ibmpc/MORIA.CNF'\"
else
echo shar: Extracting \"'ibmpc/MORIA.CNF'\" \(2485 characters\)
sed "s/^X//" >'ibmpc/MORIA.CNF' <<'END_OF_FILE'
X# Configuration file for PC MORIA 4.87
X#
X# All lines that have the # character as the first character are
X# comment lines.  Blank lines are totally ignored.
X
X
X
X##################################################################
X###                  Configuration                             ###
X##################################################################
X
X# MORIA is very easy to configure.  The biggest problem is that there
X# is not enough room on a single 360K floppy disk to hold the DOS
X# DOS system files, MORIA.EXE (about 340K) and a MORIA save file
X# (about 80K or so).  Below are a few methods for configuring MORIA
X# depending on your disk storage.  Once you decide which method to
X# use, follow the instructions then remove the comment character ('#')
X# from the beginning of the lines that start with 'SAVE' and 'SCORE'.
X# Only remove the '#' from 1 pair of lines.
X
X
X
X#################### 1 hard disk systems #########################
X#
X# Create a C:\games subdirectory on your hard disk and put C:\games
X# on your PATH.  Copy MORIA.EXE and MORIA.CNF to C:\games.
X#
X#SAVE c:\games\moria.sav;n
X#SCORE c:\games\moria.scr
X
X
X#################### 2 360K floppy disk systems ##################
X#
X# Format /s a floppy disk and copy MORIA.CNF to it.   Format (no /s)
X# a second floppy disk and copy MORIA.EXE to it.  When you want to play
X# MORIA, put the first diskette in drive A, the second in drive B and
X# type B:MORIA
X#
X#SAVE a:\moria.sav
X#SCORE a:\moria.scr
X
X
X#################### 1 high density floppy disk systems ##########
X#
X# Format /s 1 high-density diskette and copy MORIA.CNF and MORIA.EXE
X# to it.
X#
X#SAVE a:\moria.sav
X#SCORE a:\moria.scr
X
X
X
X
X##################################################################
X###                  Other OPTIONS                             ###
X##################################################################
X
X# These graphics characters are a solid box and a centered dot
XGRAPHICS 177 249
X
X# IBMbios option enables the numeric keypad.  Possibly unusable
X# on a non-IBM clone.
XIBMBIOS
X
X# Rawio makes output somewhat faster and allows ^P (control P) to
X# be used for the "previous message" MORIA command.  Cannot be
X# used on a Dec Rainbow.
X#RAWIO
X
X# Being used to LARN and HACK, I prefer the ROGUE-like interface
XKEYBOARD ROGUE
X
X# It is possible to have MORIA output ANSI sequences, rather than
X# use BIOS calls.  This "ANSI" option is required for Dec Rainbows
X# and other computers that are not IBM BIOS compatible.
X#ANSI
END_OF_FILE
if test 2485 -ne `wc -c <'ibmpc/MORIA.CNF'`; then
    echo shar: \"'ibmpc/MORIA.CNF'\" unpacked with wrong size!
fi
# end of 'ibmpc/MORIA.CNF'
fi
if test -f 'ibmpc/README' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'ibmpc/README'\"
else
echo shar: Extracting \"'ibmpc/README'\" \(85 characters\)
sed "s/^X//" >'ibmpc/README' <<'END_OF_FILE'
X
XTo compile this program, you need a copy of PC-Curses, a screen management
Xpackage.
END_OF_FILE
if test 85 -ne `wc -c <'ibmpc/README'`; then
    echo shar: \"'ibmpc/README'\" unpacked with wrong size!
fi
# end of 'ibmpc/README'
fi
if test -f 'ibmpc/TERMCAP' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'ibmpc/TERMCAP'\"
else
echo shar: Extracting \"'ibmpc/TERMCAP'\" \(1337 characters\)
sed "s/^X//" >'ibmpc/TERMCAP' <<'END_OF_FILE'
X# Termcap file for PC MORIA.  This file will only be necessary if you
X# are using the "ANSI" option in MORIA.CNF (see README for details).
X# For PCs, ATs and clones, there is no reason to use the "ANSI" option
X# and this file can be safely discarded.  For DEC Rainbow users, this
X# file is required.  It must be either in the current directory, in
X# directory \ETC, or somewhere on the PATH for MORIA to find it
X#
X# Monochrome IBMPC.
X#	This is a termcap for the NANSI.SYS device driver.
X#	It is the same as the ANSI termcap, except NANSI supports
X#	line insert (al) and delete (dl) while ANSI does not.
X#
Xibmpc-mono:\
X	:co#80:\
X	:li#24:\
X	:cl=\E[2J:\
X	:bs:\
X	:ho=\E[H:\
X	:cm=\E[%i%2;%2H:\
X	:up=\E[A:\
X	:xd=\E[B:\
X	:nd=\E[C:\
X	:bc=\E[D:\
X	:ce=\E[K:\
X	:ti=\E[m:\
X	:te=\E[m:\
X	:so=\E[1m:\
X	:se=\E[m:\
X	:us=\E[1m:\
X	:ue=\E[m:\
X	:al=\E[L:\
X	:dl=\E[M:
X#
X# Color IBMPC.
X#	This is a termcap for the NANSI.SYS device driver.
X#	It is the same as the ANSI termcap, except NANSI supports
X#	line insert (al) and delete (dl) while ANSI does not.
X#
X#	Gratiously supplied by Darren Friedlein.
X#
Xibmpc-color:\
X	:co#80:\
X	:li#24:\
X	:cl=\E[2J:\
X	:bs:\
X	:ho=\E[H:\
X	:cm=\E[%i%2;%2H:\
X	:up=\E[A:\
X	:xd=\E[B:\
X	:nd=\E[C:\
X	:bc=\E[D:\
X	:ce=\E[K:\
X	:ti=\E[44;37m\E1m:\
X	:te=\E[0m:\
X	:so=\E[31m:\
X	:se=\E[37m:\
X	:us=\E[33m:\
X	:ue=\E[37m:\
X	:al=\E[L:\
X	:dl=\E[M:
END_OF_FILE
if test 1337 -ne `wc -c <'ibmpc/TERMCAP'`; then
    echo shar: \"'ibmpc/TERMCAP'\" unpacked with wrong size!
fi
# end of 'ibmpc/TERMCAP'
fi
if test -f 'ibmpc/ms_ansi.h' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'ibmpc/ms_ansi.h'\"
else
echo shar: Extracting \"'ibmpc/ms_ansi.h'\" \(2225 characters\)
sed "s/^X//" >'ibmpc/ms_ansi.h' <<'END_OF_FILE'
X/* ms_ansi.h: ANSI definitions for MSDOS
X
X   Copyright (c) 1989 James E. Wilson, Don Kneller
X
X   This software may be copied and distributed for educational, research, and
X   not for profit purposes provided that this copyright and statement are
X   included in all such copies. */
X
X/* To allow the choice between PCcurses (which may not work on all machines)
X * and ANSI (which should work on all machines), indirect the output routines
X * through pointers and adjust the pointers to the correct routines at
X * initialization time.
X */
X#ifdef LINT_ARGS
Xint	(*output_addch)(int);
Xint	(*output_mvaddstr)(int, int, char *);
Xint	(*output_mvprintw)(int, int, char *, ...);
Xint	(*output_move)(int, int);
Xint	(*output_endwin)(void);
Xint	(*output_clrtobot)(void);
Xint	(*output_clrtoeol)(void);
Xint	(*output_mvaddch)(int, int, char);
Xint	(*output_initscr)(void);
Xint	(*output_refresh)(void);
Xint	(*output_clear)(void);
X
Xint	(*output_nocrmode)(void);
Xint	(*output_crmode)(void);
Xint	(*output_nonl)(void);
Xint	(*output_nl)(void);
Xint	(*output_noecho)(void);
Xint	(*output_echo)(void);
X#else
Xextern int	(*output_addch)();
Xextern int	(*output_mvaddstr)();
Xextern int	(*output_mvprintw)();
Xextern int	(*output_move)();
Xextern int	(*output_endwin)();
Xextern int	(*output_clrtobot)();
Xextern int	(*output_clrtoeol)();
Xextern int	(*output_mvaddch)();
Xextern int	(*output_initscr)();
Xextern int	(*output_refresh)();
Xextern int	(*output_clear)();
X
Xextern int	(*output_nocrmode)();
Xextern int	(*output_crmode)();
Xextern int	(*output_nonl)();
Xextern int	(*output_nl)();
Xextern int	(*output_noecho)();
Xextern int	(*output_echo)();
X#endif
X
Xextern int	ansi;
X
X#define addch		(*output_addch)
X#define mvaddstr	(*output_mvaddstr)
X#define mvprintw	(*output_mvprintw)
X#undef move		/* from curses.h */
X#define move		(*output_move)
X#define endwin		(*output_endwin)
X#define clrtobot	(*output_clrtobot)
X#define clrtoeol	(*output_clrtoeol)
X#define mvaddch		(*output_mvaddch)
X#define initscr		(*output_initscr)
X#define refresh		(*output_refresh)
X#define clear		(*output_clear)
X#define nocrmode	(*output_nocrmode)
X#define crmode		(*output_crmode)
X#define nonl		(*output_nonl)
X#define nl		(*output_nl)
X#define noecho		(*output_noecho)
X#define echo		(*output_echo)
END_OF_FILE
if test 2225 -ne `wc -c <'ibmpc/ms_ansi.h'`; then
    echo shar: \"'ibmpc/ms_ansi.h'\" unpacked with wrong size!
fi
# end of 'ibmpc/ms_ansi.h'
fi
if test -f 'mac/README' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'mac/README'\"
else
echo shar: Extracting \"'mac/README'\" \(1305 characters\)
sed "s/^X//" >'mac/README' <<'END_OF_FILE'
X1.	To build Moria on the mac, you will need MPW C 3.0 or better.
X
X2.	The top directory of the source distribution is denoted "{DistDir}"
X	in the rest of this document.  It has as an immediate subdirectory
X	"mac" which contains the file you are now reading, and an MPW script
X	called "Install".
X
X3.	The "Install" script configures the files of the source distribution
X	for use with MPW.  It also creates a new directory on your disk into
X	which the files required to build the game will be moved (since they
X	are spread out across several directories as received).  Invoke this
X	script as follows --
X	
X	a.	Set the directory to "{DistDir}mac"
X	b.	Execute the command "Install {DistDir} {NewDir}" where "{NewDir}"
X		is the name of the directory you want created to hold all the
X		source required to build to mac version of the game.
X		
X4.	The mac version of the game uses two subroutine packages which must
X	be built first as follows --
X	
X	a.	Set the directory to "{DistDir}mac:scrnmgr"
X	b.	Build (cmd-B) "Install" (or execute "BuildProgram Install").
X	c.	Set the directory to "{DistDir}mac:dumpres"
X	d.	Build (cmd-B) "Install" (or execute "BuildProgram Install").
X	
X5.	Now the game can be built as follows --
X
X	a.	Set the directory to "{NewDir}"
X	b.	Build (cmd-B) "Moria" (or execute "BuildProgram Moria").
END_OF_FILE
if test 1305 -ne `wc -c <'mac/README'`; then
    echo shar: \"'mac/README'\" unpacked with wrong size!
fi
# end of 'mac/README'
fi
if test -f 'mac/dumpres/DumpRes.h' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'mac/dumpres/DumpRes.h'\"
else
echo shar: Extracting \"'mac/dumpres/DumpRes.h'\" \(345 characters\)
sed "s/^X//" >'mac/dumpres/DumpRes.h' <<'END_OF_FILE'
Xvoid DumpRes(
X	char *fileName,
X	int resType, int resID, char *resName, int resAttrs,
X	char *elemPtr, unsigned elemCnt, unsigned elemSiz,
X	void (*strProc)(char *elem, void (*proc)(char **str))
X);
X
Xint LoadRes(
X	char **memPtr,
X	int resType, int resID,
X	unsigned elemCnt, unsigned elemSiz,
X	void (*strProc)(char *elem, void (*proc)(char **str))
X);
END_OF_FILE
if test 345 -ne `wc -c <'mac/dumpres/DumpRes.h'`; then
    echo shar: \"'mac/dumpres/DumpRes.h'\" unpacked with wrong size!
fi
# end of 'mac/dumpres/DumpRes.h'
fi
if test -f 'mac/dumpres/TestDR.c' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'mac/dumpres/TestDR.c'\"
else
echo shar: Extracting \"'mac/dumpres/TestDR.c'\" \(1031 characters\)
sed "s/^X//" >'mac/dumpres/TestDR.c' <<'END_OF_FILE'
X#include <StdIO.h>
X
X#include <Resources.h>
X
X#include "DumpRes.h"
X
Xtypedef struct {
X	char *name;
X	int x, y, z;
X} Test;
X
XTest table[5] = {
X	{ "Huron", 1, 2, 3 },
X	{ "Ontario", 4, 5, 6 },
X	{ "Michigan", 7, 8, 9 },
X	{ "Erie", 10, 11, 12 },
X	{ "Superior", 13, 14, 15 }
X};
X
XTest *data;
X
Xvoid MyStrProc(ptr, proc)
Xchar *ptr;
Xvoid (*proc)(char **);
X
X{
X	(*proc)(&((Test *) ptr)->name);
X	return;
X}
X
Xmain()
X
X{
X	short resFile;
X	int i, rc;
X	
X	DumpRes(
X		"DumpResTest.rsrc",
X		'TEST', 256, "Test Data", 0,
X		(char *) table, 5, sizeof(Test),
X		MyStrProc
X	);
X	
X	resFile = OpenResFile("\pDumpResTest.rsrc");
X	
X	if (resFile != -1) {
X	
X		data = NULL;
X		
X		rc = LoadRes(
X			&((char *) data),
X			'TEST', 256,
X			5, sizeof(Test),
X			MyStrProc
X		);
X		
X		if (rc)
X			for (i = 0; i < 5; i++)
X				fprintf(stderr, "%s : %d %d %d\n", data[i].name, data[i].x, data[i].y, data[i].z);
X				
X		else
X			fprintf(stderr, "LoadRes failed.\n");
X			
X		CloseResFile(resFile);
X		
X	}
X	
X	else
X		fprintf(stderr, "Unable to open file for LoadRes testing.\n");
X		
X	return(0);
X}
END_OF_FILE
if test 1031 -ne `wc -c <'mac/dumpres/TestDR.c'`; then
    echo shar: \"'mac/dumpres/TestDR.c'\" unpacked with wrong size!
fi
# end of 'mac/dumpres/TestDR.c'
fi
if test -f 'mac/macdata.c' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'mac/macdata.c'\"
else
echo shar: Extracting \"'mac/macdata.c'\" \(2384 characters\)
sed "s/^X//" >'mac/macdata.c' <<'END_OF_FILE'
X/* This program creates the initialized global data resources.		*/
X/* It is compiled as an MPW tool.									*/
X
X/* Monsters.c, treasur1.c, treasur2.c, variable.c are included.		*/
X/* But, when this program is built, the compiler is instructed to	*/
X/* actually include the initialized global data.  We just copy it	*/
X/* into resource handles and dump them to the executable.			*/
X
X/* Why do this?  MPW handles >32K global data ok (otherwise, this	*/
X/* program could not compile).  However, we have to pay the price	*/
X/* in efficiency.  The code hacks to keep the global data in		*/
X/* resources are trivial, mainly redefining the variable to be a	*/
X/* pointer instead of an array.  This scheme has the added			*/
X/* advantage of providing a means for re-initialization of the		*/
X/* global data.  MacMoria, which is "restartable" requires this.	*/
X
X/* See macrsrc.c for a list of variables involved.					*/
X
X#include <stdio.h>
X
X#include <types.h>
X#include <memory.h>
X
X#include <dumpres.h>
X
X#include "macrsrc.h"
X
X#define RES_ATTRS				0
X
Xmain(argc, argv)
Xint argc;
Xchar *argv[];
X
X{
X	int i;
X	unsigned size, temp;
X	char *p, *q;
X	restable_type *r;
X	
X	if (argc != 2) {
X		fprintf(stderr, "### %s: Usage - %s targetFileName\n", argv[0], argv[0]);
X		return(1);
X	}
X	
X	for (i = 0, r = restable; i < MAX_RESOURCES; i++, r++) {
X	
X		DumpRes(
X			argv[1],
X			r->resType, r->resID, r->resName, RES_ATTRS,
X			r->memPtr, r->elemCnt, r->elemSiz,
X			r->strProc
X		);
X		
X	}
X	
X	size = 0;
X	for (i = 0; i < MAX_RESTART; i++) size += restart_vars[i].size;
X	
X	p = NewPtr(size);
X	if (p == NULL) {
X		fprintf(stderr, "Cannot get %d bytes for restart vars.\n", size);
X		exit(1);
X	}
X	
X	q = p;
X	for (i = 0; i < MAX_RESTART; i++) {
X		BlockMove(restart_vars[i].ptr, q, restart_vars[i].size);
X		q += restart_vars[i].size;
X	}
X	
X	DumpRes(
X		argv[1],
X		restartRsrc, restart_id, "Restart Vars", RES_ATTRS,
X		p, 1, size,
X		NULL
X	);
X	
X	printf("restable info --\n");
X	for (i = 0, size = 0; i < MAX_RESOURCES; ++i) {
X		size += (temp = restable[i].elemCnt * restable[i].elemSiz);
X		printf("%3d  %8d\n", i, temp);
X	}
X	printf("     --------\n");
X	printf("     %8d\n\n", size);
X	
X	printf("memtable info --\n");
X	for (i = 0, size = 0; i < MAX_PTRS; ++i) {
X		size += (temp = memtable[i].elemCnt * memtable[i].elemSiz);
X		printf("%3d  %8d\n", i, temp);
X	}
X	printf("     --------\n");
X	printf("     %8d\n\n", size);
X	
X	return(0);
X}
END_OF_FILE
if test 2384 -ne `wc -c <'mac/macdata.c'`; then
    echo shar: \"'mac/macdata.c'\" unpacked with wrong size!
fi
# end of 'mac/macdata.c'
fi
if test -f 'mac/macrsrc.h' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'mac/macrsrc.h'\"
else
echo shar: Extracting \"'mac/macrsrc.h'\" \(1786 characters\)
sed "s/^X//" >'mac/macrsrc.h' <<'END_OF_FILE'
X#define treasureRsrc		'TREA'
X#define monsterRsrc			'MONS'
X#define spellRsrc			'SPLL'
X#define charPtrRsrc			'CPTR'
X#define raceRsrc			'RACE'
X#define backgroundRsrc		'BKGD'
X#define ownerRsrc			'OWNR'
X
X#define restartRsrc			'RSRT'
X
X#define stringRsrc			'STR#'
X
X#define object_list_id		128
X#define c_list_id			129
X#define magic_spell_id		130
X#define race_id				131
X#define background_id		132
X#define owners_id			133
X#define player_title_id		134
X#define colors_id			135
X#define mushrooms_id		136
X#define woods_id			137
X#define metals_id			138
X#define rocks_id			139
X#define amulets_id			140
X#define syllables_id		141
X
X#define restart_id			150
X
Xtypedef struct restable_type {
X	#ifdef RSRC
X		char *memPtr;
X	#else
X		char **memPtr;
X	#endif
X	char *resName;
X	int resType, resID;
X	unsigned elemCnt, elemSiz;
X	void (*strProc)(char *ptr, void (*proc)(char **str));
X	int restartFlag;
X} restable_type;
X
X#define MAX_RESOURCES			14
X
Xextern restable_type restable[MAX_RESOURCES];
X
Xtypedef struct memtable_type {
X	char **memPtr;
X	unsigned elemCnt, elemSiz;
X	int restartFlag;
X} memtable_type;
X
X#define MAX_PTRS				3
X
Xextern memtable_type memtable[MAX_PTRS];
X
Xtypedef struct restart_type {
X	char *ptr;
X	unsigned size;
X} restart_type;
X
X#define MAX_RESTART				37
X
Xextern restart_type restart_vars[MAX_RESTART];
X
Xtypedef struct clrtable_type {
X	char *ptr;
X	unsigned size;
X} clrtable_type;
X
X#define MAX_CLRS				15
X
Xextern clrtable_type clrtable[MAX_CLRS];
X
Xvoid treasure_strproc(char *ptr, void (*proc)(char **str));
Xvoid creature_strproc(char *ptr, void (*proc)(char **str));
Xvoid race_strproc(char *ptr, void (*proc)(char **str));
Xvoid background_strproc(char *ptr, void (*proc)(char **str));
Xvoid owner_strproc(char *ptr, void (*proc)(char **str));
Xvoid char_ptr_strproc(char *ptr, void (*proc)(char **str));
END_OF_FILE
if test 1786 -ne `wc -c <'mac/macrsrc.h'`; then
    echo shar: \"'mac/macrsrc.h'\" unpacked with wrong size!
fi
# end of 'mac/macrsrc.h'
fi
if test -f 'mac/scrnmgr/ERRORS' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'mac/scrnmgr/ERRORS'\"
else
echo shar: Extracting \"'mac/scrnmgr/ERRORS'\" \(196 characters\)
sed "s/^X//" >'mac/scrnmgr/ERRORS' <<'END_OF_FILE'
Xthe file ScrnMgr.c was greater than 60K, so it was split into two parts,
XScrnMgr1.c and ScrnMgr2.c, so that it could be posted to comp.sources.games,
Xthe MakeFile needs to be fixed to handle this
END_OF_FILE
if test 196 -ne `wc -c <'mac/scrnmgr/ERRORS'`; then
    echo shar: \"'mac/scrnmgr/ERRORS'\" unpacked with wrong size!
fi
# end of 'mac/scrnmgr/ERRORS'
fi
if test -f 'mac/scrnmgr/ScrnTest.r' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'mac/scrnmgr/ScrnTest.r'\"
else
echo shar: Extracting \"'mac/scrnmgr/ScrnTest.r'\" \(1803 characters\)
sed "s/^X//" >'mac/scrnmgr/ScrnTest.r' <<'END_OF_FILE'
X/*	Copyright (C) Curtis McCauley, 1989.  All rights reserved.
X
X	You may copy this subroutine package freely, modify it as you desire,
X	and distribute it at will, as long as the copyright notice in the source
X	material is not disturbed, excepting that no one may use this package or
X	any part of it for commercial purposes of any kind without the express
X	written consent of its author. */
X	
X#include "Types.r"
X
Xinclude "ScrnMgr.rsrc";
X
Xresource 'STR ' (128, "About Title", purgeable) {
X	"About ScrnTest\311"
X};
X
Xresource 'DITL' (1024, "Dummy Alert", purgeable) {
X	{	/* array DITLarray: 2 elements */
X		/* [1] */
X		{88, 224, 108, 284},
X		Button {
X			enabled,
X			"Ok"
X		},
X		/* [2] */
X		{8, 64, 72, 288},
X		StaticText {
X			disabled,
X			"This is a dummy alert."
X		}
X	}
X};
X
Xresource 'ALRT' (1024, "Dummy Alert", purgeable) {
X	{40, 42, 158, 352},
X	1024,
X	{	/* array: 4 elements */
X		/* [1] */
X		OK, visible, sound1,
X		/* [2] */
X		OK, visible, sound1,
X		/* [3] */
X		OK, visible, sound1,
X		/* [4] */
X		OK, visible, sound1
X	}
X};
X
Xresource 'MENU' (133, "ScrnTest") {
X	133,
X	textMenuProc,
X	allEnabled,
X	enabled,
X	"ScrnTest",
X	{	/* array: 2 elements */
X		/* [1] */
X		"X Out", noIcon, "", "", plain,
X		/* [2] */
X		"Dummy Alert", noIcon, "A", "", plain
X	}
X};
X
Xresource 'MENU' (233, "ScrnTest (No Keys)") {
X	233,
X	textMenuProc,
X	allEnabled,
X	enabled,
X	"ScrnTest",
X	{	/* array: 2 elements */
X		/* [1] */
X		"X Out", noIcon, "", "", plain,
X		/* [2] */
X		"Dummy Alert", noIcon, "", "", plain
X	}
X};
X
Xresource 'SIZE' (-1) {
X	dontSaveScreen,
X	acceptSuspendResumeEvents,
X	enableOptionSwitch,
X	canBackground,
X	multiFinderAware,
X	backgroundAndForeground,
X	dontGetFrontClicks,
X	ignoreChildDiedEvents,
X	not32BitCompatible,
X	reserved,
X	reserved,
X	reserved,
X	reserved,
X	reserved,
X	reserved,
X	reserved,
X	128 * 1024,
X	128 * 1024	
X};
END_OF_FILE
if test 1803 -ne `wc -c <'mac/scrnmgr/ScrnTest.r'`; then
    echo shar: \"'mac/scrnmgr/ScrnTest.r'\" unpacked with wrong size!
fi
# end of 'mac/scrnmgr/ScrnTest.r'
fi
if test -f 'misc/flock.c' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'misc/flock.c'\"
else
echo shar: Extracting \"'misc/flock.c'\" \(1155 characters\)
sed "s/^X//" >'misc/flock.c' <<'END_OF_FILE'
X
X#ifdef USG
X
X/*                                                                    -CJS-
X// The following code is provided especially for systems which
X// have no flock system call. It has never been tested.
X*/
X
X#define L_SET 0
X
X#define LOCK_EX	1
X#define LOCK_SH	2
X#define LOCK_NB	4
X#define LOCK_UN	8
X
X/*
X// An flock HACK. LOCK_SH and LOCK_EX are not distinguished. DO NOT release a
X// lock which you failed to set! ALWAYS release a lock you set!
X*/
XSTATIC flock(f, l)
Xint f, l;
X{
X  struct stat sbuf;
X  char lockname[80];
X
X  if(fstat(f,  &sbuf) < 0)
X    return FALSE;
X  (void) sprintf(lockname, "/tmp/moria.%d", sbuf.st_ino);
X  if(l & LOCK_UN){
X    return unlink(lockname);
X    }
X  while(open(lockname, O_WRONLY|O_CREAT|O_EXCL, 0) < 0){
X    if(errno != EEXIST)
X      return FALSE;
X    if(stat(lockname, &sbuf) < 0)
X      return FALSE;
X/*
X// Log Locks which last more than 10 seconds get deleted.
X*/
X    if((f == logfile_fd || f == lstfile_fd)
X       && time((long *)0) - sbuf.st_mtime > 10) {
X      if (unlink(lockname) < 0)
X	return FALSE;
X      }
X    else if(l & LOCK_NB)
X      return FALSE;
X    else
X      (void) sleep(1);
X    }
X  return TRUE;
X}
X#endif
END_OF_FILE
if test 1155 -ne `wc -c <'misc/flock.c'`; then
    echo shar: \"'misc/flock.c'\" unpacked with wrong size!
fi
# end of 'misc/flock.c'
fi
if test -f 'misc/funckeys.h' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'misc/funckeys.h'\"
else
echo shar: Extracting \"'misc/funckeys.h'\" \(1110 characters\)
sed "s/^X//" >'misc/funckeys.h' <<'END_OF_FILE'
X/* funckeys.h*/
X/* default mappings for SUN-3 function keys */
X
X#define FCHAR '['
X
Xchar keyarray[50];
Xchar rkeys[] = {
X    INPUT_ERROR,			/* nothing */
X    INPUT_ERROR,			/* r1 */
X    INPUT_ERROR,			/* r2 */
X    INPUT_ERROR,			/* r3 */
X    '7',			/* r4 */
X    '8',			/* r5 */
X    '9',			/* r6 */
X    '4',			/* r7 */
X    '5',			/* r8 */
X    '6',			/* r9 */
X    '1',			/* r10 */
X    '2',			/* r11 */
X    '3',			/* r12 */
X    INPUT_ERROR,			/* r13 */
X    INPUT_ERROR,			/* r14 */
X    '.'				/* r15 */
X};
X
Xchar lkeys[] = {
X    INPUT_ERROR,
X    INPUT_ERROR,			/* l1 */
X    INPUT_ERROR,			/* l2 */
X    INPUT_ERROR,			/* l3 */
X    INPUT_ERROR,			/* l4 */
X    INPUT_ERROR,			/* l5 */
X    INPUT_ERROR,			/* l6 */
X    INPUT_ERROR,			/* l7 */
X    INPUT_ERROR,			/* l8 */
X    INPUT_ERROR,			/* l9 */
X    INPUT_ERROR				/* l10 */
X};
X
Xchar fkeys[] = {
X    INPUT_ERROR,
X    INPUT_ERROR,			/* f1 */
X    INPUT_ERROR,			/* f2 */
X    INPUT_ERROR,			/* f3 */
X    INPUT_ERROR,			/* f4 */
X    INPUT_ERROR,			/* f5 */
X    INPUT_ERROR,			/* f6 */
X    INPUT_ERROR,			/* f7 */
X    INPUT_ERROR,			/* f8 */
X    INPUT_ERROR,			/* f9 */
X};
END_OF_FILE
if test 1110 -ne `wc -c <'misc/funckeys.h'`; then
    echo shar: \"'misc/funckeys.h'\" unpacked with wrong size!
fi
# end of 'misc/funckeys.h'
fi
if test -f 'misc/mabbrev' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'misc/mabbrev'\"
else
echo shar: Extracting \"'misc/mabbrev'\" \(1326 characters\)
sed "s/^X//" >'misc/mabbrev' <<'END_OF_FILE'
Xglobal
X ESC-[-2-1-0-z	R3
X ESC-[-2-0-2-z	L8
X ESC-[-2-3-1-z	F5
X ESC-[-2-3-6-z	F8
X ESC-[-M-A	DoubleMouseLeft
X ESC-[-M-B	DoubleMouseMiddle
X ESC-[-M-C	DoubleMouseRight
X ESC-[-2-2-0-z	R13
X ESC-[-2-1-2-z	R5
X ESC-[-2-0-4-z	L9
X ESC-[-M-^A	MouseLeft
X ESC-[-2-3-3-z	F6
X ESC-[-M-^B	MouseMiddle
X ESC-[-2-2-5-z	F2
X ESC-[-M-^C	MouseRight
X ESC-[-2-0-9-z	R2
X ESC-[-M-^E	ShiftMouseLeft
X ESC-[-M-^F	ShiftMouseMiddle
X ESC-[-M-^G	ShiftMouseRight
X ESC-[-1-9-4-z	L2
X ESC-[-M-^I	CtrlMouseLeft
X ESC-[-M-^J	CtrlMouseMiddle
X ESC-[-M-^K	CtrlMouseRight
X ESC-[-2-0-1-z	L7
X ESC-[-M-^Q	MetaMouseLeft
X ESC-[-M-^R	MetaMouseMiddle
X ESC-[-M-^S	MetaMouseRight
X ESC-[-2-2-2-z	R15
X ESC-[-2-1-4-z	R7
X ESC-[-2-0-6-z	L10
X ESC-[-2-3-5-z	F7
X ESC-[-2-2-7-z	F4
X ESC-[-1-9-6-z	L4
X ESC-[-2-1-1-z	R4
X ESC-[-2-2-4-z	F1
X ESC-[-2-1-6-z	R9
X ESC-[-2-0-8-z	R1
X ESC-[-2-3-7-z	F9
X ESC-[-2-2-9-z	F4
X ESC-[-1-9-8-z	L5
X ESC-[-M-!	ModelineMouseLeft
X ESC-[-2-0-0-z	L6
X ESC-[-M-"	ModelineMouseMiddle
X ESC-[-M-#	ModelineMouseRight
X ESC-[-2-1-3-z	R6
X ESC-[-M-'	ShiftModelineMouseRight
X ESC-[-2-2-6-z	F3
X ESC-[-M-)	CtrlModelineMouseLeft
X ESC-[-A	R8
X ESC-[-2-1-8-z	R11
X ESC-[-B	R14
X ESC-[-C	R12
X ESC-[-D	R10
X ESC-[-1-9-5-z	L3
Xnormal-mode
Xtext-mode
Xelec-c
X main	main
X default	default
X do	do
X while	while
X else	else
X if	if
X switch	switch
X argc	argc
X for	for
X #d	#define
X #i	#include
X case	case
X
END_OF_FILE
if test 1326 -ne `wc -c <'misc/mabbrev'`; then
    echo shar: \"'misc/mabbrev'\" unpacked with wrong size!
fi
# end of 'misc/mabbrev'
fi
if test -f 'util/README' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'util/README'\"
else
echo shar: Extracting \"'util/README'\" \(722 characters\)
sed "s/^X//" >'util/README' <<'END_OF_FILE'
Xmap.c is obsolete print map to file code from 4.87
X
Xmc is the monster compiler by Joseph N Hall, eventually, this will be
Xused to generate the monster.c file, which should be more maintainable than
Xthe current method
X
Xmcheck.inf: my and David J. Grabiner's ideas on monster consistency, and
Xchecks that should be added to the monster compiler
X
Xmonster.cng: a list of some of the changes to the monster.c file, is this
Xstill needed?
X
Xprintit.c: some code which would pretty print item/monster descriptions for
Xumoria 4.87, by Carl Hommel, obsolete
X
Xshowmon.c: obsolete code from 4.87 for printing the monster dictionary,
Xsuperceded by the monster memories
X
Xweapons: a program which roughly indicates which weapons are best
END_OF_FILE
if test 722 -ne `wc -c <'util/README'`; then
    echo shar: \"'util/README'\" unpacked with wrong size!
fi
# end of 'util/README'
fi
if test -f 'util/mc/ERRORS' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'util/mc/ERRORS'\"
else
echo shar: Extracting \"'util/mc/ERRORS'\" \(334 characters\)
sed "s/^X//" >'util/mc/ERRORS' <<'END_OF_FILE'
Xbefore calling writecreatures in main(), should call a subroutine
Xverifycreatures, i.e. check to make sure no conflicting bits are set
X
Xwould prefer 'a' for cchar instead of "a"
X
Xprefer exp over xp
X
Xprefer 2d4 instead of 2 d 4
X
Xshould be able to specify none/void or similar for empty slots
X
Xneed descriptions for all of the monsters
END_OF_FILE
if test 334 -ne `wc -c <'util/mc/ERRORS'`; then
    echo shar: \"'util/mc/ERRORS'\" unpacked with wrong size!
fi
# end of 'util/mc/ERRORS'
fi
if test -f 'util/mc/generic.h' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'util/mc/generic.h'\"
else
echo shar: Extracting \"'util/mc/generic.h'\" \(529 characters\)
sed "s/^X//" >'util/mc/generic.h' <<'END_OF_FILE'
X/*
X * generic.h
X *
X * useful generic union type, used here and there
X *
X * Author:
X * Joseph Nathan Hall
X */
X
X#ifndef _GENERIC_H_
X#define _GENERIC_H_
X
Xtypedef union {
X	int	i;
X	long	l;
X	float	f;
X	double	d;
X	char	c;
X	char	*s;
X	char	**s_A;
X	char	*v;
X	} generic_t, *generic_Pt;
X
X#define GEN_TYPE_NONE 0
X#define GEN_TYPE_INT 1
X#define GEN_TYPE_LONG 2
X#define GEN_TYPE_FLOAT 3
X#define GEN_TYPE_DOUBLE 4
X#define GEN_TYPE_CHAR 5
X#define GEN_TYPE_STRING 6
X#define GEN_TYPE_STRING_A 7
X#define GEN_TYPE_VOID_PTR 8
X
X#endif /* _GENERIC_H_ */
END_OF_FILE
if test 529 -ne `wc -c <'util/mc/generic.h'`; then
    echo shar: \"'util/mc/generic.h'\" unpacked with wrong size!
fi
# end of 'util/mc/generic.h'
fi
if test -f 'util/mc/st.h' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'util/mc/st.h'\"
else
echo shar: Extracting \"'util/mc/st.h'\" \(1481 characters\)
sed "s/^X//" >'util/mc/st.h' <<'END_OF_FILE'
X/*
X * st.h
X *	
X * definitions for the symbol table module
X *
X * Author:
X * Joseph Nathan Hall
X */
X
X#ifndef _ST_H_
X#define	_ST_H_
X
X#ifndef TRUE
X#define TRUE 1
X#endif
X
X#ifndef FALSE
X#define FALSE 0
X#endif
X
X/*
X * Needs generic_t
X */
X
X#include "generic.h"
X
X/*
X * maximum length of symbol strings
X */
X
X#define ST_MAX_SYM_LEN		32
X
X/*
X * Struct for individual entries
X */
X
Xtypedef	struct st_EntryStruct {
X
X    char	name[ST_MAX_SYM_LEN];	/* symbol string		    */
X    int		type;			/* symbol type			    */
X    struct st_EntryStruct *next_P;	/* next entry in chain		    */
X    generic_t	gval;			/* symbol value			    */
X
X} st_Entry_t, *st_Entry_Pt;
X
X/*
X * Struct for table header
X */
X
Xtypedef struct {
X
X    char	name[ST_MAX_SYM_LEN];	
X				    /* table name			    */
X    int		size,		    /* size of table to be allocated	    */
X		entryCt;	    /* # of entries in table currently	    */
X    st_Entry_Pt	*tab_A;		    /* vector of ptrs to entries	    */
X
X} st_Table_t, *st_Table_Pt;
X
X#define	ST_SYM_FOUND	    0
X#define ST_OK		    0
X#define ST_SYM_NOT_FOUND    1
X#define ST_NULL_TABLE	    2
X
X#define ST_MAX_INPUT_LEN    256
X
X/*
X * functions defined in st_symtab.c
X */
X
Xextern st_Table_Pt St_NewTable();
Xextern void St_DelTable();
Xextern int St_GetSym();
Xextern int St_DefSym();
Xextern int St_ReplSym();
Xextern int St_DelSym();
Xextern st_Table_Pt St_GetTable();
Xextern void St_DumpTable();
Xextern char **St_ListTable();
Xextern char **St_SListTable();
Xextern int St_TableSize();
X
X#endif /* _ST_H_ */
X
END_OF_FILE
if test 1481 -ne `wc -c <'util/mc/st.h'`; then
    echo shar: \"'util/mc/st.h'\" unpacked with wrong size!
fi
# end of 'util/mc/st.h'
fi
if test -f 'util/weapons/ERRORS' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'util/weapons/ERRORS'\"
else
echo shar: Extracting \"'util/weapons/ERRORS'\" \(386 characters\)
sed "s/^X//" >'util/weapons/ERRORS' <<'END_OF_FILE'
Xthe program is a bit simplistic, as it does not consider monster AC,
Xand does not correctly handle weapons that are too heavy to wield properly
X
Xthe README, dragon.inf, and weapons.lst files are probably out of date,
Xand need to be updated
X
Xthe README and dragon.inf files contain info that doesn't belong here,
Xperhaps create a hints file in the doc directory that contains this info?
END_OF_FILE
if test 386 -ne `wc -c <'util/weapons/ERRORS'`; then
    echo shar: \"'util/weapons/ERRORS'\" unpacked with wrong size!
fi
# end of 'util/weapons/ERRORS'
fi
if test -f 'util/weapons/highchar.in' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'util/weapons/highchar.in'\"
else
echo shar: Extracting \"'util/weapons/highchar.in'\" \(858 characters\)
sed "s/^X//" >'util/weapons/highchar.in' <<'END_OF_FILE'
X36
X44
X160      1d8 10 10
X 95      1d9 10 10
X150      2d4 10 10
X140      3d4 10 10
X180      2d8 10 10
X170      3d4 10 10
X180      2d6 10 10
X160      2d6 10 10
X150      2d5 10 10
X 40      1d4 10 10
X110      1d7 10 10
X 20      1d4 10 10
X 30      1d5 10 10
X 15      1d4 10 10
X 12      1d4 10 10
X260      4d5 10 10
X170      1d10 10 10
X150      2d6 10 10
X 30      1d5 10 10
X190      2d6 10 10
X190      3d4 10 10
X 30      1d4 10 10
X120      3d4 10 10
X300      2d8 10 10
X130      1d10 10 10
X120      2d5 10 10
X120      2d4 10 10
X180      3d4 10 10
X150      2d6 10 10
X160      2d5 10 10
X 40      1d6 10 10
X 50      1d7 10 10
X 75      1d6 10 10
X 50      1d6 10 10
X100      1d7 10 10
X 80      1d6 10 10
X280      3d6 10 10
X200      3d6 10 10
X180      3d6 10 10
X240      4d5 10 10
X200      4d4 10 10
X280      4d6 10 10
X120      3d3 10 10
X100      1d3 10 10
X18/100 18/100
END_OF_FILE
if test 858 -ne `wc -c <'util/weapons/highchar.in'`; then
    echo shar: \"'util/weapons/highchar.in'\" unpacked with wrong size!
fi
# end of 'util/weapons/highchar.in'
fi
if test -f 'util/weapons/lowchar.in' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'util/weapons/lowchar.in'\"
else
echo shar: Extracting \"'util/weapons/lowchar.in'\" \(762 characters\)
sed "s/^X//" >'util/weapons/lowchar.in' <<'END_OF_FILE'
X10
X44
X160      1d8 3 3
X 95      1d9 3 3
X150      2d4 3 3
X140      3d4 3 3
X180      2d8 3 3
X170      3d4 3 3
X180      2d6 3 3
X160      2d6 3 3
X150      2d5 3 3
X 40      1d4 3 3
X110      1d7 3 3
X 20      1d4 3 3
X 30      1d5 3 3
X 15      1d4 3 3
X 12      1d4 3 3
X260      4d5 3 3
X170      1d10 3 3
X150      2d6 3 3
X 30      1d5 3 3
X190      2d6 3 3
X190      3d4 3 3
X 30      1d4 3 3
X120      3d4 3 3
X300      2d8 3 3
X130      1d10 3 3
X120      2d5 3 3
X120      2d4 3 3
X180      3d4 3 3
X150      2d6 3 3
X160      2d5 3 3
X 40      1d6 3 3
X 50      1d7 3 3
X 75      1d6 3 3
X 50      1d6 3 3
X100      1d7 3 3
X 80      1d6 3 3
X280      3d6 3 3
X200      3d6 3 3
X180      3d6 3 3
X240      4d5 3 3
X200      4d4 3 3
X280      4d6 3 3
X120      3d3 3 3
X100      1d3 3 3
X11 15
END_OF_FILE
if test 762 -ne `wc -c <'util/weapons/lowchar.in'`; then
    echo shar: \"'util/weapons/lowchar.in'\" unpacked with wrong size!
fi
# end of 'util/weapons/lowchar.in'
fi
if test -f 'util/weapons/medchar.in' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'util/weapons/medchar.in'\"
else
echo shar: Extracting \"'util/weapons/medchar.in'\" \(762 characters\)
sed "s/^X//" >'util/weapons/medchar.in' <<'END_OF_FILE'
X20
X44
X160      1d8 6 6
X 95      1d9 6 6
X150      2d4 6 6
X140      3d4 6 6
X180      2d8 6 6
X170      3d4 6 6
X180      2d6 6 6
X160      2d6 6 6
X150      2d5 6 6
X 40      1d4 6 6
X110      1d7 6 6
X 20      1d4 6 6
X 30      1d5 6 6
X 15      1d4 6 6
X 12      1d4 6 6
X260      4d5 6 6
X170      1d10 6 6
X150      2d6 6 6
X 30      1d5 6 6
X190      2d6 6 6
X190      3d4 6 6
X 30      1d4 6 6
X120      3d4 6 6
X300      2d8 6 6
X130      1d10 6 6
X120      2d5 6 6
X120      2d4 6 6
X180      3d4 6 6
X150      2d6 6 6
X160      2d5 6 6
X 40      1d6 6 6
X 50      1d7 6 6
X 75      1d6 6 6
X 50      1d6 6 6
X100      1d7 6 6
X 80      1d6 6 6
X280      3d6 6 6
X200      3d6 6 6
X180      3d6 6 6
X240      4d5 6 6
X200      4d4 6 6
X280      4d6 6 6
X120      3d3 6 6
X100      1d3 6 6
X18 18
END_OF_FILE
if test 762 -ne `wc -c <'util/weapons/medchar.in'`; then
    echo shar: \"'util/weapons/medchar.in'\" unpacked with wrong size!
fi
# end of 'util/weapons/medchar.in'
fi
if test -f 'util/weapons/mkallwpn' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'util/weapons/mkallwpn'\"
else
echo shar: Extracting \"'util/weapons/mkallwpn'\" \(369 characters\)
sed "s/^X//" >'util/weapons/mkallwpn' <<'END_OF_FILE'
X#!/bin/sh
X
X#
X# this shell script will generate a formated list of what all weapons will
X# do 
X
Xin=$1
Xout=`basename $in .in`.out
X
Xecho "          Name                | Mblow | Blows | wt ratio | dam | w/ critical |" >$out
X
Xcalchits <$in \ |
X   sed -n -e "2,45p" | cut -c10-10,14-17,19-30,35-45,49-53,57- | \
X   paste -d" " mkallwpn.lst - | sort -t"|" -bnr +5 -6 >>$out
X
END_OF_FILE
if test 369 -ne `wc -c <'util/weapons/mkallwpn'`; then
    echo shar: \"'util/weapons/mkallwpn'\" unpacked with wrong size!
fi
chmod +x 'util/weapons/mkallwpn'
# end of 'util/weapons/mkallwpn'
fi
if test -f 'util/weapons/mkallwpn.lst' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'util/weapons/mkallwpn.lst'\"
else
echo shar: Extracting \"'util/weapons/mkallwpn.lst'\" \(1320 characters\)
sed "s/^X//" >'util/weapons/mkallwpn.lst' <<'END_OF_FILE'
XAwl-Pike                     
XBacksword                    
XBall and Chain               
XBastard Sword                
XBattle Axe (Balestarius)     
XBattle Axe (European)        
XBeaked Axe                   
XBroad Axe                    
XBroadsword                   
XCat-O-Nine Tails             
XCutlass                      
XDagger (Bodkin)              
XDagger (Main Gauche)         
XDagger (Misercorde)          
XDagger (Stiletto)            
XExecutioner's Sword          
XFauchard                     
XFlail                        
XFoil                         
XGlaive                       
XHalberd                      
XJavelin                      
XKatana                       
XLance                        
XLongsword                    
XLucerne Hammer               
XMace                         
XMace (Lead filled)           
XMorningstar                  
XPike                         
XRapier                       
XSabre                        
XSmall Sword                  
XSpear                        
XThrusting Sword (Baselard)   
XThrusting Sword (Bilbo)      
XTwo Handed Great Flail       
XTwo Handed Sword (Claymore)  
XTwo Handed Sword (Espadon)   
XTwo Handed Sword (Flamberge) 
XTwo Handed Sword (No-Dachi)  
XTwo Handed Sword (Zweihander)
XWar Hammer                   
XWooden Club                  
END_OF_FILE
if test 1320 -ne `wc -c <'util/weapons/mkallwpn.lst'`; then
    echo shar: \"'util/weapons/mkallwpn.lst'\" unpacked with wrong size!
fi
# end of 'util/weapons/mkallwpn.lst'
fi
if test -f 'vms/ERRORS' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'vms/ERRORS'\"
else
echo shar: Extracting \"'vms/ERRORS'\" \(120 characters\)
sed "s/^X//" >'vms/ERRORS' <<'END_OF_FILE'
Xthe VMS support is incomplete
X
XMakefile is obsolete and needs to be updated, and other files are
Xprobably obsolete also
END_OF_FILE
if test 120 -ne `wc -c <'vms/ERRORS'`; then
    echo shar: \"'vms/ERRORS'\" unpacked with wrong size!
fi
# end of 'vms/ERRORS'
fi
if test -f 'vms/cbreak.c' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'vms/cbreak.c'\"
else
echo shar: Extracting \"'vms/cbreak.c'\" \(47 characters\)
sed "s/^X//" >'vms/cbreak.c' <<'END_OF_FILE'
Xcbreak()
X{
X	return;
X}
X
Xnocbreak()
X{
X	return;
X}
END_OF_FILE
if test 47 -ne `wc -c <'vms/cbreak.c'`; then
    echo shar: \"'vms/cbreak.c'\" unpacked with wrong size!
fi
# end of 'vms/cbreak.c'
fi
if test -f 'vms/uexit.c' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'vms/uexit.c'\"
else
echo shar: Extracting \"'vms/uexit.c'\" \(535 characters\)
sed "s/^X//" >'vms/uexit.c' <<'END_OF_FILE'
X/*	special exit command, to exit cleanly from VMS program.
X
X	Unix programs usually return 0 for "good execution",
X	and 1 for "some problem occured."  In VMS, we WANT the
X	program to return a 1, or else we get an ugly
X	"%NONAME-W-NOMSG, Message number 00000000"
X	message upon image exit (yeech!).
X
X	So, we convert 0 exit codes to 1's, leaving all others alone.
X*/
Xuexit(exitcode)
Xint exitcode;
X{
X	if(exitcode == 0)	/* On Unix, clean, on VMS, yeech! */
X		exit(1);	/* converted... */
X	else
X		exit(exitcode); /* returned unscathed... */
X}
END_OF_FILE
if test 535 -ne `wc -c <'vms/uexit.c'`; then
    echo shar: \"'vms/uexit.c'\" unpacked with wrong size!
fi
# end of 'vms/uexit.c'
fi
echo shar: End of archive 31 \(of 31\).
cp /dev/null ark31isdone
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 31 ; do
    if test ! -f ark${I}isdone ; then
	MISSING="${MISSING} ${I}"
    fi
done
if test "${MISSING}" = "" ; then
    echo You have unpacked all 31 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


