home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Usenet 1994 January
/
usenetsourcesnewsgroupsinfomagicjanuary1994.iso
/
sources
/
games
/
volume16
/
nethack31
/
part107
< prev
next >
Wrap
Internet Message Format
|
1993-02-06
|
53KB
Path: uunet!news.tek.com!master!saab!billr
From: billr@saab.CNA.TEK.COM (Bill Randle)
Newsgroups: comp.sources.games
Subject: v16i115: nethack31 - display oriented dungeons & dragons (Ver. 3.1), Part107/108
Message-ID: <4480@master.CNA.TEK.COM>
Date: 5 Feb 93 22:04:14 GMT
Sender: news@master.CNA.TEK.COM
Lines: 1755
Approved: billr@saab.CNA.TEK.COM
Xref: uunet comp.sources.games:1666
Submitted-by: izchak@linc.cis.upenn.edu (Izchak Miller)
Posting-number: Volume 16, Issue 115
Archive-name: nethack31/Part107
Supersedes: nethack3p9: Volume 10, Issue 46-108
Environment: Amiga, Atari, Mac, MS-DOS, OS2, Unix, VMS, X11
#! /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 107 (of 108)."
# Contents: include/WindowP.h include/align.h include/coord.h
# include/edog.h include/engrave.h include/epri.h include/eshk.h
# include/func_tab.h include/mail.h include/mfndpos.h
# include/micro.h include/prop.h include/rect.h include/vault.h
# src/alloc.c src/track.c sys/amiga/HackWB.uu sys/amiga/amidos.p
# sys/amiga/amifont.uu sys/amiga/amigst.c sys/amiga/amiwind.p
# sys/amiga/ifchange sys/amiga/randwin.uu sys/amiga/splitter/arg.h
# sys/amiga/splitter/multi.h sys/amiga/string.uu
# sys/atari/nethack.mnu sys/mac/macunix.c sys/mac/mstring.c
# sys/msdos/nhico.uu sys/msdos/nhpif.uu sys/share/Makefile.lib
# sys/share/dgn_comp.h sys/share/pctty.c sys/unix/nethack.sh
# sys/unix/setup.sh sys/vms/vmsmisc.c win/X11/nh32icon
# Wrapped by billr@saab on Wed Jan 27 16:09:34 1993
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f 'include/WindowP.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'include/WindowP.h'\"
else
echo shar: Extracting \"'include/WindowP.h'\" \(1340 characters\)
sed "s/^X//" >'include/WindowP.h' <<'END_OF_FILE'
X/* SCCS Id: @(#)WindowP.h 3.1 92/3/7 */
X/* Copyright (c) Dean Luick, 1992 */
X/* NetHack may be freely redistributed. See license for details. */
X
X#ifndef _WindowP_h
X#define _WindowP_h
X
X#include "Window.h"
X/* include superclass private header file */
X#include <X11/CoreP.h>
X
X/* define unique representation types not found in <X11/StringDefs.h> */
X
X#define XtRWindowResource "WindowResource"
X
Xtypedef struct {
X int empty;
X} WindowClassPart;
X
Xtypedef struct _WindowClassRec {
X CoreClassPart core_class;
X WindowClassPart window_class;
X} WindowClassRec;
X
Xextern WindowClassRec windowClassRec;
X
Xtypedef struct {
X /* resources */
X Dimension rows;
X Dimension columns;
X Pixel foreground;
X Pixel black;
X Pixel red;
X Pixel green;
X Pixel brown;
X Pixel blue;
X Pixel magenta;
X Pixel cyan;
X Pixel gray;
X Pixel orange;
X Pixel bright_green;
X Pixel yellow;
X Pixel bright_blue;
X Pixel bright_magenta;
X Pixel bright_cyan;
X Pixel white;
X XFontStruct *font;
X XtCallbackList expose_callback;
X XtCallbackList input_callback;
X XtCallbackList resize_callback;
X /* private state */
X /* (none) */
X} WindowPart;
X
Xtypedef struct _WindowRec {
X CorePart core;
X WindowPart window;
X} WindowRec;
X
X#endif /* _WindowP_h */
END_OF_FILE
if test 1340 -ne `wc -c <'include/WindowP.h'`; then
echo shar: \"'include/WindowP.h'\" unpacked with wrong size!
fi
# end of 'include/WindowP.h'
fi
if test -f 'include/align.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'include/align.h'\"
else
echo shar: Extracting \"'include/align.h'\" \(912 characters\)
sed "s/^X//" >'include/align.h' <<'END_OF_FILE'
X/* SCCS Id: @(#)align.h 3.1 91/12/29 */
X/* Copyright (c) Mike Stephenson, Izchak Miller 1991. */
X/* NetHack may be freely redistributed. See license for details. */
X
X#ifndef ALIGN_H
X#define ALIGN_H
X
Xtypedef schar aligntyp; /* basic alignment type */
X
Xtypedef struct align { /* alignment & record */
X aligntyp type;
X int record;
X} align;
X
X#define ALIGNLIM (5L + (moves/200L)) /* bounds for "record" */
X
X#define A_NONE (-128) /* the value range of type */
X
X#define A_CHAOTIC (-1)
X#define A_NEUTRAL 0
X#define A_LAWFUL 1
X
X#define A_COALIGNED 1
X#define A_OPALIGNED (-1)
X
X#define AM_NONE 0
X#define AM_CHAOTIC 1
X#define AM_NEUTRAL 2
X#define AM_LAWFUL 4
X
X#define AM_MASK 7
X
X#define Amask2align(x) ((aligntyp) ((!(x)) ? A_NONE \
X : ((x) == AM_LAWFUL) ? A_LAWFUL : (x) - 2))
X#define Align2amask(x) (((x) == A_NONE) ? AM_NONE \
X : ((x) == A_LAWFUL) ? AM_LAWFUL : (x) + 2)
X
X#endif /* ALIGN_H */
END_OF_FILE
if test 912 -ne `wc -c <'include/align.h'`; then
echo shar: \"'include/align.h'\" unpacked with wrong size!
fi
# end of 'include/align.h'
fi
if test -f 'include/coord.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'include/coord.h'\"
else
echo shar: Extracting \"'include/coord.h'\" \(272 characters\)
sed "s/^X//" >'include/coord.h' <<'END_OF_FILE'
X/* SCCS Id: @(#)coord.h 3.1 90/22/02 */
X/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
X/* NetHack may be freely redistributed. See license for details. */
X
X#ifndef COORD_H
X#define COORD_H
X
Xtypedef struct {
X xchar x,y;
X} coord;
X
X#endif /* COORD_H */
END_OF_FILE
if test 272 -ne `wc -c <'include/coord.h'`; then
echo shar: \"'include/coord.h'\" unpacked with wrong size!
fi
# end of 'include/coord.h'
fi
if test -f 'include/edog.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'include/edog.h'\"
else
echo shar: Extracting \"'include/edog.h'\" \(791 characters\)
sed "s/^X//" >'include/edog.h' <<'END_OF_FILE'
X/* SCCS Id: @(#)edog.h 3.1 93/01/16 */
X/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
X/* NetHack may be freely redistributed. See license for details. */
X
X#ifndef EDOG_H
X#define EDOG_H
X
X/* various types of food, the lower, the better liked. */
X
X#define DOGFOOD 0
X#define CADAVER 1
X#define ACCFOOD 2
X#define MANFOOD 3
X#define APPORT 4
X#define POISON 5
X#define UNDEF 6
X#define TABU 7
X
Xstruct edog {
X long droptime; /* moment dog dropped object */
X unsigned dropdist; /* dist of drpped obj from @ */
X unsigned apport; /* amount of training */
X long whistletime; /* last time he whistled */
X long hungrytime; /* will get hungry at this time */
X coord ogoal; /* previous goal location */
X};
X#define EDOG(mon) ((struct edog *)&(mon)->mextra[0])
X
X#endif /* EDOG_H */
END_OF_FILE
if test 791 -ne `wc -c <'include/edog.h'`; then
echo shar: \"'include/edog.h'\" unpacked with wrong size!
fi
# end of 'include/edog.h'
fi
if test -f 'include/engrave.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'include/engrave.h'\"
else
echo shar: Extracting \"'include/engrave.h'\" \(716 characters\)
sed "s/^X//" >'include/engrave.h' <<'END_OF_FILE'
X/* SCCS Id: @(#)engrave.h 3.1 91/07/31 */
X/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
X/* NetHack may be freely redistributed. See license for details. */
X
X#ifndef ENGRAVE_H
X#define ENGRAVE_H
X
Xstruct engr {
X struct engr *nxt_engr;
X char *engr_txt;
X xchar engr_x, engr_y;
X unsigned engr_lth; /* for save & restore; not length of text */
X long engr_time; /* moment engraving was (will be) finished */
X xchar engr_type;
X#define DUST 1
X#define ENGRAVE 2
X#define BURN 3
X#define MARK 4
X#define BLOOD 5
X#define N_ENGRAVE 5
X};
X
X#define newengr(lth) (struct engr *)alloc((unsigned)(lth) + sizeof(struct engr))
X#define dealloc_engr(engr) free((genericptr_t) (engr))
X
X#endif /* ENGRAVE_H */
END_OF_FILE
if test 716 -ne `wc -c <'include/engrave.h'`; then
echo shar: \"'include/engrave.h'\" unpacked with wrong size!
fi
# end of 'include/engrave.h'
fi
if test -f 'include/epri.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'include/epri.h'\"
else
echo shar: Extracting \"'include/epri.h'\" \(750 characters\)
sed "s/^X//" >'include/epri.h' <<'END_OF_FILE'
X/* SCCS Id: @(#)epri.h 3.1 90/22/02 */
X/* Copyright (c) Izchak Miller, 1989. */
X/* NetHack may be freely redistributed. See license for details. */
X
X#ifndef EPRI_H
X#define EPRI_H
X
X#include "dungeon.h"
X#include "align.h"
X
Xstruct epri {
X aligntyp shralign; /* alignment of priest's shrine */
X /* leave as first field to match emin */
X schar shroom; /* index in rooms */
X coord shrpos; /* position of shrine */
X d_level shrlevel; /* level (& dungeon) of shrine */
X};
X
X#define EPRI(mon) ((struct epri *)&(mon)->mextra[0])
X
X/* A priest without ispriest is a roaming priest without a shrine, so
X * the fields (except shralign, which becomes only the priest alignment)
X * are available for reuse.
X */
X#define renegade shroom
X
X#endif /* EPRI_H */
END_OF_FILE
if test 750 -ne `wc -c <'include/epri.h'`; then
echo shar: \"'include/epri.h'\" unpacked with wrong size!
fi
# end of 'include/epri.h'
fi
if test -f 'include/eshk.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'include/eshk.h'\"
else
echo shar: Extracting \"'include/eshk.h'\" \(1444 characters\)
sed "s/^X//" >'include/eshk.h' <<'END_OF_FILE'
X/* SCCS Id: @(#)eshk.h 3.1 93/01/06 */
X/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
X/* NetHack may be freely redistributed. See license for details. */
X
X#ifndef ESHK_H
X#define ESHK_H
X
X#define REPAIR_DELAY 5 /* minimum delay between shop damage & repair */
X
X#define BILLSZ 200
X
Xstruct bill_x {
X unsigned bo_id;
X boolean useup;
X long price; /* price per unit */
X long bquan; /* amount used up */
X};
X
X#include "dungeon.h"
X
Xstruct eshk {
X long robbed; /* amount stolen by most recent customer */
X long credit; /* amount credited to customer */
X long debit; /* amount of debt for using unpaid items */
X long loan; /* shop-gold picked (part of debit) */
X int shoptype; /* the value of rooms[shoproom].rtype */
X schar shoproom; /* index in rooms; set by inshop() */
X boolean following; /* following customer since he owes us sth */
X boolean surcharge; /* angry shk inflates prices */
X coord shk; /* usual position shopkeeper */
X coord shd; /* position shop door */
X d_level shoplevel; /* level (& dungeon) of his shop */
X int billct; /* no. of entries of bill[] in use */
X struct bill_x bill[BILLSZ];
X struct bill_x *bill_p;
X int visitct; /* nr of visits by most recent customer */
X char customer[PL_NSIZ]; /* most recent customer */
X char shknam[PL_NSIZ];
X};
X
X#define ESHK(mon) ((struct eshk *)&(mon)->mextra[0])
X
X#define NOTANGRY(mon) ((mon)->mpeaceful)
X#define ANGRY(mon) (!NOTANGRY(mon))
X
X#endif /* ESHK_H */
END_OF_FILE
if test 1444 -ne `wc -c <'include/eshk.h'`; then
echo shar: \"'include/eshk.h'\" unpacked with wrong size!
fi
# end of 'include/eshk.h'
fi
if test -f 'include/func_tab.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'include/func_tab.h'\"
else
echo shar: Extracting \"'include/func_tab.h'\" \(456 characters\)
sed "s/^X//" >'include/func_tab.h' <<'END_OF_FILE'
X/* SCCS Id: @(#)func_tab.h 3.1 92/04/03 */
X/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
X/* NetHack may be freely redistributed. See license for details. */
X
X#ifndef FUNC_TAB_H
X#define FUNC_TAB_H
X
Xstruct func_tab {
X char f_char;
X int NDECL((*f_funct));
X const char *f_text;
X};
X
Xstruct ext_func_tab {
X const char *ef_txt, *ef_desc;
X int NDECL((*ef_funct));
X};
X
Xextern const struct ext_func_tab extcmdlist[];
X
X#endif /* FUNC_TAB_H */
END_OF_FILE
if test 456 -ne `wc -c <'include/func_tab.h'`; then
echo shar: \"'include/func_tab.h'\" unpacked with wrong size!
fi
# end of 'include/func_tab.h'
fi
if test -f 'include/mail.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'include/mail.h'\"
else
echo shar: Extracting \"'include/mail.h'\" \(682 characters\)
sed "s/^X//" >'include/mail.h' <<'END_OF_FILE'
X/* SCCS Id: @(#)mail.h 3.1 91/10/11 */
X/* NetHack may be freely redistributed. See license for details. */
X
X/* used by ckmailstatus() to pass information to the mail-daemon in newmail() */
X
X#ifndef MAIL_H
X#define MAIL_H
X
X#define MSG_OTHER 0 /* catch-all; none of the below... */
X#define MSG_MAIL 1 /* unimportant, uninteresting mail message */
X#define MSG_CALL 2 /* annoying phone/talk/chat-type interruption */
X
Xstruct mail_info {
X int message_typ; /* MSG_foo value */
X const char *display_txt; /* text for daemon to verbalize */
X const char *object_nam; /* text to tag object with */
X const char *response_cmd; /* command to eventually execute */
X};
X
X#endif /* MAIL_H */
END_OF_FILE
if test 682 -ne `wc -c <'include/mail.h'`; then
echo shar: \"'include/mail.h'\" unpacked with wrong size!
fi
# end of 'include/mail.h'
fi
if test -f 'include/mfndpos.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'include/mfndpos.h'\"
else
echo shar: Extracting \"'include/mfndpos.h'\" \(1073 characters\)
sed "s/^X//" >'include/mfndpos.h' <<'END_OF_FILE'
X/* SCCS Id: @(#)mfndpos.h 3.1 90/22/02 */
X/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
X/* NetHack may be freely redistributed. See license for details. */
X
X#ifndef MFNDPOS_H
X#define MFNDPOS_H
X
X#define ALLOW_TRAPS 0x0002FFFFL /* can enter 18 kinds of traps */
X#define ALLOW_U 0x00040000L /* can attack you */
X#define ALLOW_M 0x00080000L /* can attack other monsters */
X#define ALLOW_TM 0x00100000L /* can attack tame monsters */
X#define ALLOW_ALL (ALLOW_U | ALLOW_M | ALLOW_TM | ALLOW_TRAPS)
X#define NOTONL 0x00200000L /* avoids direct line to player */
X#define OPENDOOR 0x00400000L /* opens closed doors */
X#define UNLOCKDOOR 0x00800000L /* unlocks locked doors */
X#define BUSTDOOR 0x01000000L /* breaks any doors */
X#define ALLOW_ROCK 0x02000000L /* pushes rocks */
X#define ALLOW_WALL 0x04000000L /* walks thru walls */
X#define ALLOW_DIG 0x08000000L /* digs */
X#define ALLOW_SANCT 0x20000000L /* enters temples */
X#define ALLOW_SSM 0x40000000L /* ignores scare monster */
X#define NOGARLIC 0x80000000L /* hates garlic */
X
X#endif /* MFNDPOS_H */
END_OF_FILE
if test 1073 -ne `wc -c <'include/mfndpos.h'`; then
echo shar: \"'include/mfndpos.h'\" unpacked with wrong size!
fi
# end of 'include/mfndpos.h'
fi
if test -f 'include/micro.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'include/micro.h'\"
else
echo shar: Extracting \"'include/micro.h'\" \(421 characters\)
sed "s/^X//" >'include/micro.h' <<'END_OF_FILE'
X/* SCCS Id: @(#)micro.h 3.1 90/22/02 */
X/* micro.h - function declarations for various microcomputers */
X/* NetHack may be freely redistributed. See license for details. */
X
X#ifndef MICRO_H
X#define MICRO_H
X
Xextern const char *alllevels, *allbones;
Xextern char levels[], bones[], permbones[], hackdir[];
X
Xextern int ramdisk;
X
X#define C(c) (0x1f & (c))
X#define M(c) (0x80 | (c))
X#define ABORT C('a')
X
X#endif /* MICRO_H */
END_OF_FILE
if test 421 -ne `wc -c <'include/micro.h'`; then
echo shar: \"'include/micro.h'\" unpacked with wrong size!
fi
# end of 'include/micro.h'
fi
if test -f 'include/prop.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'include/prop.h'\"
else
echo shar: Extracting \"'include/prop.h'\" \(1363 characters\)
sed "s/^X//" >'include/prop.h' <<'END_OF_FILE'
X/* SCCS Id: @(#)prop.h 3.1 92/11/01 */
X/* Copyright (c) 1989 Mike Threepoint */
X/* NetHack may be freely redistributed. See license for details. */
X
X#ifndef PROP_H
X#define PROP_H
X
X#define FIRE_RES 1
X#define COLD_RES 2
X#define SLEEP_RES 3
X#define DISINT_RES 4
X#define SHOCK_RES 5
X#define POISON_RES 6
X#define ADORNED 7
X#define REGENERATION 8
X#define SEARCHING 9
X#define SEE_INVIS 10
X#define INVIS 11
X#define TELEPORT 12
X#define TELEPORT_CONTROL 13
X#define POLYMORPH 14
X#define POLYMORPH_CONTROL 15
X#define LEVITATION 16
X#define STEALTH 17
X#define AGGRAVATE_MONSTER 18
X#define CONFLICT 19
X#define PROTECTION 20
X#define PROT_FROM_SHAPE_CHANGERS 21
X#define WARNING 22
X#define TELEPAT 23
X#define FAST 24
X#define STUNNED 25
X#define CONFUSION 26
X#define SICK 27
X#define BLINDED 28
X#define SLEEPING 29
X#define WOUNDED_LEGS 30
X#define STONED 31
X#define STRANGLED 32
X#define HALLUC 33
X#define HALLUC_RES 34
X#define FUMBLING 35
X#define JUMPING 36
X#define WWALKING 37
X#define HUNGER 38
X#define GLIB 39
X#define REFLECTING 40
X#define LIFESAVED 41
X#define ANTIMAGIC 42
X#define DISPLACED 43
X#define CLAIRVOYANT 44
X#define VOMITING 45
X#define ENERGY_REGENERATION 46
X#define MAGICAL_BREATHING 47
X#define HALF_SPDAM 48
X#define HALF_PHDAM 49
X#define LAST_PROP (HALF_PHDAM) /* the last property */
X
X#endif /* PROP_H */
END_OF_FILE
if test 1363 -ne `wc -c <'include/prop.h'`; then
echo shar: \"'include/prop.h'\" unpacked with wrong size!
fi
# end of 'include/prop.h'
fi
if test -f 'include/rect.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'include/rect.h'\"
else
echo shar: Extracting \"'include/rect.h'\" \(271 characters\)
sed "s/^X//" >'include/rect.h' <<'END_OF_FILE'
X/* SCCS Id: @(#)rect.h 3.1 90/22/02 */
X/* Copyright (c) 1990 by Jean-Christophe Collet */
X/* NetHack may be freely redistributed. See license for details. */
X
X#ifndef RECT_H
X#define RECT_H
X
Xtypedef struct {
X xchar lx,ly;
X xchar hx,hy;
X} NhRect;
X
X#endif /* RECT_H */
END_OF_FILE
if test 271 -ne `wc -c <'include/rect.h'`; then
echo shar: \"'include/rect.h'\" unpacked with wrong size!
fi
# end of 'include/rect.h'
fi
if test -f 'include/vault.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'include/vault.h'\"
else
echo shar: Extracting \"'include/vault.h'\" \(817 characters\)
sed "s/^X//" >'include/vault.h' <<'END_OF_FILE'
X/* SCCS Id: @(#)vault.h 3.1 92/04/18 */
X/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
X/* NetHack may be freely redistributed. See license for details. */
X
X#ifndef VAULT_H
X#define VAULT_H
X
X#define FCSIZ (ROWNO+COLNO)
Xstruct fakecorridor {
X xchar fx,fy,ftyp;
X};
X
X#include "dungeon.h"
X
Xstruct egd {
X int fcbeg, fcend; /* fcend: first unused pos */
X xchar gdx, gdy; /* goal of guard's walk */
X xchar ogx, ogy; /* guard's last position */
X d_level gdlevel; /* level (& dungeon) guard was created in */
X xchar warncnt; /* number of warnings to follow */
X int vroom; /* room number of the vault */
X Bitfield(gddone,1); /* true iff guard has released player */
X Bitfield(unused,7);
X struct fakecorridor fakecorr[FCSIZ];
X};
X
X#define EGD(mon) ((struct egd *)&(mon)->mextra[0])
X
X#endif /* VAULT_H */
END_OF_FILE
if test 817 -ne `wc -c <'include/vault.h'`; then
echo shar: \"'include/vault.h'\" unpacked with wrong size!
fi
# end of 'include/vault.h'
fi
if test -f 'src/alloc.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'src/alloc.c'\"
else
echo shar: Extracting \"'src/alloc.c'\" \(1080 characters\)
sed "s/^X//" >'src/alloc.c' <<'END_OF_FILE'
X/* SCCS Id: @(#)alloc.c 3.1 90/22/02
X/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
X/* NetHack may be freely redistributed. See license for details. */
X
X/* to get the malloc() prototype from system.h */
X#define ALLOC_C /* comment line for pre-compiled headers */
X/* since this file is also used in auxiliary programs, don't include all the
X * function declarations for all of nethack
X */
X#define EXTERN_H /* comment line for pre-compiled headers */
X#include "config.h"
Xlong *FDECL(alloc,(unsigned int));
X
X#ifdef LINT
X/*
X a ridiculous definition, suppressing
X "possible pointer alignment problem" for (long *) malloc()
X from lint
X*/
Xlong *
Xalloc(n) unsigned int n; {
Xlong dummy = ftell(stderr);
X if(n) dummy = 0; /* make sure arg is used */
X return(&dummy);
X}
X
X#else
X#ifndef __TURBOC__
Xextern void VDECL(panic, (const char *,...)) PRINTF_F(1,2);
X
Xlong *
Xalloc(lth)
Xregister unsigned int lth;
X{
X register genericptr_t ptr;
X
X if(!(ptr = malloc(lth)))
X panic("Cannot get %d bytes", lth);
X return((long *) ptr);
X}
X#endif
X
X#endif /* LINT /**/
X
X/*alloc.c*/
END_OF_FILE
if test 1080 -ne `wc -c <'src/alloc.c'`; then
echo shar: \"'src/alloc.c'\" unpacked with wrong size!
fi
# end of 'src/alloc.c'
fi
if test -f 'src/track.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'src/track.c'\"
else
echo shar: Extracting \"'src/track.c'\" \(1276 characters\)
sed "s/^X//" >'src/track.c' <<'END_OF_FILE'
X/* SCCS Id: @(#)track.c 3.1 87/08/08
X/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
X/* NetHack may be freely redistributed. See license for details. */
X/* track.c - version 1.0.2 */
X
X#include "hack.h"
X
X#define UTSZ 50
X
XSTATIC_VAR int NEARDATA utcnt, NEARDATA utpnt;
XSTATIC_VAR coord NEARDATA utrack[UTSZ];
X
X#ifdef OVLB
Xvoid
Xinitrack(){
X utcnt = utpnt = 0;
X}
X#endif /* OVLB */
X
X#ifdef OVL1
X
X/* add to track */
Xvoid
Xsettrack(){
X if(utcnt < UTSZ) utcnt++;
X if(utpnt == UTSZ) utpnt = 0;
X utrack[utpnt].x = u.ux;
X utrack[utpnt].y = u.uy;
X utpnt++;
X}
X
X#endif /* OVL1 */
X#ifdef OVL0
X
Xcoord *
Xgettrack(x, y)
Xregister int x, y;
X{
X register int cnt, ndist;
X register coord *tc;
X cnt = utcnt;
X for(tc = &utrack[utpnt]; cnt--; ){
X if(tc == utrack) tc = &utrack[UTSZ-1];
X else tc--;
X ndist = distmin(x,y,tc->x,tc->y);
X
X /* if far away, skip track entries til we're closer */
X if(ndist > 2) {
X ndist -= 2; /* be careful due to extra decrement at top of loop */
X cnt -= ndist;
X if(cnt <= 0)
X return (coord *) 0; /* too far away, no matches possible */
X if(tc < &utrack[ndist])
X tc += (UTSZ-ndist);
X else
X tc -= ndist;
X } else if(ndist <= 1)
X return(ndist ? tc : 0);
X }
X return (coord *)0;
X}
X
X#endif /* OVL0 */
X
X/*track.c*/
END_OF_FILE
if test 1276 -ne `wc -c <'src/track.c'`; then
echo shar: \"'src/track.c'\" unpacked with wrong size!
fi
# end of 'src/track.c'
fi
if test -f 'sys/amiga/HackWB.uu' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'sys/amiga/HackWB.uu'\"
else
echo shar: Extracting \"'sys/amiga/HackWB.uu'\" \(1186 characters\)
sed "s/^X//" >'sys/amiga/HackWB.uu' <<'END_OF_FILE'
Xbegin 777 HackWB.info
XMXQ```0``````$0`/`%``$P`&``,``0`F":@`)F<(````````````````````
XM```!`P````````````````T````$`````````````$X@``````!0`!(``@`!
XM3B`#```````````````````!`````````````P````````````,```"```!`
XM```C```!@```P```8P!]\8"Y[L`;VF,```&```#```!C``>!@___P?__XP``
XM`8````````,`^]V```!````C!___@```P```8P````'6Y<!\FF,```````#`
XM``!C`````___P?__XP````````````,````````````#`````````````W__
XM_______________________^P````````````,````````````#/__\'__^#
XM___`S```!@```P```,Q]\`:Y[@,;V@#,```&```#````S`>`!````@```,P`
XM``````````#,^]P'__^#___`R```!@```P```,````?6Y0-\F@#````&```#
XM````P```!````@```,````````````#`````````````P````````````(``
XM`````````````````%``$@`"``%/B`,``````/____________[`````````
XM````P````````````,___P```$```"#/__X```#```!@SX(.`+GNP!O:8,__
XM_@```,```/^'X#___!___@S__^`````````,\$(@```$```"#(``````#`
XM``!@P````=;EP'R:8,```````,```````#___!___@P````````````,``
XM``````````#`````````````@`````````````````````````$`````````
XM```#`````````````P```(?__X/__\,#__^&```#```#`X(/AKGN`QO:`P/_
XM_X8```,```,#^'^$```"```#`___@````````P,$(X?__X/__\,'__^&```#
XM```#````!];E`WR:`P````8```,```,````$```"```#`````````````P``
X<``````````,````````````#?____________P`"
X`
Xend
END_OF_FILE
if test 1186 -ne `wc -c <'sys/amiga/HackWB.uu'`; then
echo shar: \"'sys/amiga/HackWB.uu'\" unpacked with wrong size!
fi
# end of 'sys/amiga/HackWB.uu'
fi
if test -f 'sys/amiga/amidos.p' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'sys/amiga/amidos.p'\"
else
echo shar: Extracting \"'sys/amiga/amidos.p'\" \(1157 characters\)
sed "s/^X//" >'sys/amiga/amidos.p' <<'END_OF_FILE'
X/* SCCS Id: @(#)amidos.p 3.1 93/01/08
X/* Copyright (c) Kenneth Lorber, Bethesda, Maryland, 1992, 1993. */
X/* NetHack may be freely redistributed. See license for details. */
X
X/* amidos.c */
Xvoid NDECL(flushout );
X#ifndef getuid
Xint NDECL(getuid );
X#endif
X#ifndef getpid
Xint NDECL(getpid );
X#endif
X#ifndef getlogin
Xchar *NDECL(getlogin );
X#endif
X#ifndef abs
Xint FDECL(abs, (int ));
X#endif
Xint NDECL(tgetch );
Xint NDECL(dosh );
Xlong FDECL(freediskspace, (char *));
Xlong FDECL(filesize, (char *));
Xvoid FDECL(eraseall, (const char * , const char *));
Xchar *FDECL(CopyFile, (const char * , const char *));
Xvoid FDECL(copybones, (int ));
Xvoid NDECL(playwoRAMdisk );
Xint FDECL(saveDiskPrompt, (int ));
Xvoid NDECL(gameDiskPrompt );
Xvoid FDECL(append_slash, (char *));
Xvoid FDECL(getreturn, (const char *));
Xvoid FDECL(msmsg, ( const char *, ... ));
XFILE *FDECL(fopenp, (const char * , const char *));
X#ifndef __SASC_60
Xint FDECL(chdir, (char *));
X#endif
Xvoid FDECL(msexit, (int ));
X#ifndef strcmpi
Xint FDECL(strcmpi, (char * , char *));
X#endif
X#if !defined(memcmp) && !defined(AZTEC_C)
Xint FDECL(memcmp, (unsigned char * , unsigned char * , int ));
X#endif
END_OF_FILE
if test 1157 -ne `wc -c <'sys/amiga/amidos.p'`; then
echo shar: \"'sys/amiga/amidos.p'\" unpacked with wrong size!
fi
# end of 'sys/amiga/amidos.p'
fi
if test -f 'sys/amiga/amifont.uu' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'sys/amiga/amifont.uu'\"
else
echo shar: Extracting \"'sys/amiga/amifont.uu'\" \(390 characters\)
sed "s/^X//" >'sys/amiga/amifont.uu' <<'END_OF_FILE'
Xbegin 777 hack.font
XM#P```6AA8VLO.```````````````````````````````````````````````
XM````````````````````````````````````````````````````````````
XM````````````````````````````````````````````````````````````
XM````````````````````````````````````````````````````````````
XM````````````````````````````````````````````````````````````
XG````````````````````````````````````````````````"`!`
X`
Xend
END_OF_FILE
if test 390 -ne `wc -c <'sys/amiga/amifont.uu'`; then
echo shar: \"'sys/amiga/amifont.uu'\" unpacked with wrong size!
fi
# end of 'sys/amiga/amifont.uu'
fi
if test -f 'sys/amiga/amigst.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'sys/amiga/amigst.c'\"
else
echo shar: Extracting \"'sys/amiga/amigst.c'\" \(976 characters\)
sed "s/^X//" >'sys/amiga/amigst.c' <<'END_OF_FILE'
X/* SCCS Id: @(#)amigst.c 3.1 93/01/08
X/* Copyright (c) Gregg Wonderly, Naperville, IL, 1992, 1993 */
X/* NetHack may be freely redistributed. See license for details. */
X
X#include <stdio.h>
X#include <exec/types.h>
X#include <exec/io.h>
X#include <exec/alerts.h>
X#include <exec/devices.h>
X#include <devices/console.h>
X#include <devices/conunit.h>
X#include <graphics/gfxbase.h>
X#include <intuition/intuition.h>
X#include <libraries/dosextens.h>
X#include <ctype.h>
X#undef strcmpi
X#include <string.h>
X#include <errno.h>
X
X#ifdef __SASC
X#include <dos.h> /* for __emit */
X#include <string.h>
X#include <proto/dos.h>
X#include <proto/exec.h>
X#include <proto/graphics.h>
X#include <proto/intuition.h>
X#include <proto/diskfont.h>
X#include <proto/console.h>
X#endif
X
X#include "hack.h"
X#include "winprocs.h"
X#include "winami.h"
X
X#ifdef AZTEC
X#include <functions.h>
X#endif
X
X#include "Amiga:winami.p"
X#include "Amiga:amiwind.p"
X#include "Amiga:amidos.p"
X
X/* end amigst.c */
END_OF_FILE
if test 976 -ne `wc -c <'sys/amiga/amigst.c'`; then
echo shar: \"'sys/amiga/amigst.c'\" unpacked with wrong size!
fi
# end of 'sys/amiga/amigst.c'
fi
if test -f 'sys/amiga/amiwind.p' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'sys/amiga/amiwind.p'\"
else
echo shar: Extracting \"'sys/amiga/amiwind.p'\" \(1292 characters\)
sed "s/^X//" >'sys/amiga/amiwind.p' <<'END_OF_FILE'
X/* SCCS Id: @(#)amiwind.p 3.1 93/01/08 */
X/* Copyright (c) Gregg Wonderly, Naperville, IL, 1992, 1993 */
X/* NetHack may be freely redistributed. See license for details. */
X/* amiwind.c */
X#ifdef INTUI_NEW_LOOK
Xstruct Window *FDECL(OpenShWindow, (struct ExtNewWindow *));
X#else
Xstruct Window *FDECL(OpenShWindow, (struct NewWindow *));
X#endif
Xvoid FDECL(CloseShWindow, (struct Window *));
Xint NDECL(kbhit );
Xint NDECL(WindowGetchar );
XWETYPE NDECL(WindowGetevent );
Xvoid NDECL(WindowFlush );
Xvoid FDECL(WindowPutchar, (char ));
Xvoid FDECL(WindowFPuts, (const char *));
Xvoid FDECL(WindowPuts, (const char *));
Xvoid FDECL( WindowPrintf, ( char *,... ));
Xvoid NDECL(CleanUp );
Xint FDECL(ConvertKey, ( struct IntuiMessage * ));
Xvoid FDECL(Abort, (long ));
Xvoid FDECL(flush_glyph_buffer, (struct Window *));
Xvoid FDECL(amiga_print_glyph, (winid , int , int ));
Xvoid FDECL(start_glyphout, (winid ));
Xvoid FDECL(end_glyphout, (winid ));
X#ifdef INTUI_NEW_LOOK
Xstruct ExtNewWindow *FDECL(DupNewWindow, (struct ExtNewWindow *));
Xvoid FDECL(FreeNewWindow, (struct ExtNewWindow *));
X#else
Xstruct NewWindow *FDECL(DupNewWindow, (struct NewWindow *));
Xvoid FDECL(FreeNewWindow, (struct NewWindow *));
X#endif
Xvoid NDECL(bell );
Xvoid NDECL(amii_delay_output );
Xvoid FDECL(amii_number_pad, (int ));
END_OF_FILE
if test 1292 -ne `wc -c <'sys/amiga/amiwind.p'`; then
echo shar: \"'sys/amiga/amiwind.p'\" unpacked with wrong size!
fi
# end of 'sys/amiga/amiwind.p'
fi
if test -f 'sys/amiga/ifchange' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'sys/amiga/ifchange'\"
else
echo shar: Extracting \"'sys/amiga/ifchange'\" \(1161 characters\)
sed "s/^X//" >'sys/amiga/ifchange' <<'END_OF_FILE'
X.KEY oper/a,tmp/a,real/a,f1,f2,f3,f4,f5
X
X. ; miscellaneous script functions for the Amiga
X. ; SCCS Id: @(#)ifchange 3.1 93/01/08
X. ; Copyright (c) Kenneth Lorber, Bethesda, Maryland, 1992, 1993.
X. ; NetHack mat be freely redistributed. See license for details.
X
XFAILAT 6
XIF <oper> EQ "MOVE"
X IF EXISTS <real>
X diff >T:mic -c <tmp> <real>
X search from T:mic SEARCH "---" QUIET
X IF WARN
X echo "MOVE: no change"
X delete <tmp>
X ELSE
X echo "MOVE: copy"
X copy <tmp> <real> clone
X delete <tmp>
X ENDIF
X ELSE
X echo "MOVE: copy2"
X copy <tmp> <real> clone
X delete <tmp>
X ENDIF
X QUIT
XENDIF
X
XIF <oper> EQ "TOUCH"
X IF EXISTS <real>
X diff >T:mic -c <tmp> <real>
X search from T:mic SEARCH "---" QUIET
X IF NOT WARN
X echo "TOUCH: touch"
X IF NOT <f1$@> EQ "@"
X setdate <f1>
X ENDIF
X IF NOT <f2$@> EQ "@"
X setdate <f2>
X ENDIF
X IF NOT <f3$@> EQ "@"
X setdate <f3>
X ENDIF
X IF NOT <f4$@> EQ "@"
X setdate <f4>
X ENDIF
X IF NOT <f5$@> EQ "@"
X setdate <f5>
X ENDIF
X ENDIF
X ENDIF
X QUIT
XENDIF
X
Xecho "ifchange: '<oper>' not recognized"
Xquit 10
END_OF_FILE
if test 1161 -ne `wc -c <'sys/amiga/ifchange'`; then
echo shar: \"'sys/amiga/ifchange'\" unpacked with wrong size!
fi
# end of 'sys/amiga/ifchange'
fi
if test -f 'sys/amiga/randwin.uu' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'sys/amiga/randwin.uu'\"
else
echo shar: Extracting \"'sys/amiga/randwin.uu'\" \(963 characters\)
sed "s/^X//" >'sys/amiga/randwin.uu' <<'END_OF_FILE'
Xbegin 777 randwin.pw
XM4&]W97)7:6YD;W=S('8R+C5C(*DQ.3@W+"`Q.3@X(&)Y($E.3U9!5%)/3DE#
XM4RP@24Y#+B`@("`@("`@("`@("`@("`@("`@("`@```"[`````E```#\````
XM`0`````!`````!!A;6EG83IR86YD=VEN+F,``$H+```````"@`#(``(``8``
XM``\``````",4B````````````````@````$``````0`````!``````R@H*``
XM``#P\/"00'`````!``(0``!(`D``!0`%_____P``````)'[P````````````
XM```````````!`"-:2```````!5)N9%\```$`K@`Z`/D`6@`%``7_____````
XM`0```````&,`00`P`!$````#``$`2B<\```````C^'@``````````````"4,
XMX/____\#```%`$HG3````````````#$````Q`!(````2```````````#``$`
XM``@`!0``````(V%@``````````5/2T%9``````H````!`"-O0``C<$@`(\&P
XM`"/#B``CP^``(_@@`````0`````!``````$``````C$``````0`````!``,`
XM`0``!P`&```````E&J``)1KX````(EEO=2!A<VME9"!F;W(@82!R86YD;VT@
XM0VAA<F%C=&5R+``#``$```\`$@``````)1W0`"4?&````!Y)('1H:6YK('1H
XM870@>6]U('=I;&P@:&%V92!A;@`#``$``!D`'0``````)288`"57:````!EE
XM>&-I=&EN9R!G86UE('!L87EI;F<@87,``0`!``!#`"\``````"57N``FB"@`
XM```10VAA<F%C=&5R($-H;VEC90`#``$``,8`'0``````)./0``````````)A
X!```1
X`
Xend
END_OF_FILE
if test 963 -ne `wc -c <'sys/amiga/randwin.uu'`; then
echo shar: \"'sys/amiga/randwin.uu'\" unpacked with wrong size!
fi
# end of 'sys/amiga/randwin.uu'
fi
if test -f 'sys/amiga/splitter/arg.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'sys/amiga/splitter/arg.h'\"
else
echo shar: Extracting \"'sys/amiga/splitter/arg.h'\" \(485 characters\)
sed "s/^X//" >'sys/amiga/splitter/arg.h' <<'END_OF_FILE'
X/* SCCS Id: @(#)arg.h 3.1 93/01/08
X/* Copyright (c) Kenneth Lorber, Bethesda, Maryland, 1992, 1993 */
X/* NetHack may be freely redistributed. See license for details. */
X
X/*
X * arg.h
X * external interface for argument parsing
X */
X
Xint arg_next(void);
Xvoid arg_init(char *,int, char **);
X
Xextern char *argarg;
X
X#define ARG_ERROR (-2) /* no such arg, bad file, etc. */
X#define ARG_DONE (-1) /* ok, but nothing left */
X#define ARG_FREE 0 /* a name not associated with an arg */
END_OF_FILE
if test 485 -ne `wc -c <'sys/amiga/splitter/arg.h'`; then
echo shar: \"'sys/amiga/splitter/arg.h'\" unpacked with wrong size!
fi
# end of 'sys/amiga/splitter/arg.h'
fi
if test -f 'sys/amiga/splitter/multi.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'sys/amiga/splitter/multi.h'\"
else
echo shar: Extracting \"'sys/amiga/splitter/multi.h'\" \(1005 characters\)
sed "s/^X//" >'sys/amiga/splitter/multi.h' <<'END_OF_FILE'
X/* SCCS Id: @(#)multi.h 3.1 93/01/08
X/* Copyright (c) Kenneth Lorber, Bethesda, Maryland, 1992, 1993 */
X/* NetHack may be freely redistributed. See license for details. */
X
X/*
X * external definitions for multi-file file handling package.
X * NB - internal structure under development. End users should NOT
X * get too creative!
X */
X
Xunion multiopts {
X struct mo_read {
X char mor_tag; /* tag character for this open */
X }r;
X struct mo_write {
X char dummy; /* (no write in this version) */
X }w;
X};
X
Xstruct multifh {
X unsigned long mfh_fh; /* AmigaDOS file handle of current segment */
X unsigned long mfh_dirfh;/* AmigaDOS file handle of direction file */
X union multiopts mfh_mo; /* copy from MultiOpen */
X struct mfh_flags {
X int version:8; /* not used yet */
X int flags:24; /* not used yet */
X };
X};
X
Xtypedef union multiopts multiopts;
Xtypedef struct multifh multifh;
X
Xextern BPTR MultiOpen(char *, ULONG, multiopts *);
Xextern ULONG MultiRead(BPTR, void *, ULONG);
Xextern void MultiClose(BPTR);
END_OF_FILE
if test 1005 -ne `wc -c <'sys/amiga/splitter/multi.h'`; then
echo shar: \"'sys/amiga/splitter/multi.h'\" unpacked with wrong size!
fi
# end of 'sys/amiga/splitter/multi.h'
fi
if test -f 'sys/amiga/string.uu' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'sys/amiga/string.uu'\"
else
echo shar: Extracting \"'sys/amiga/string.uu'\" \(900 characters\)
sed "s/^X//" >'sys/amiga/string.uu' <<'END_OF_FILE'
Xbegin 777 string.pw
XM4&]W97)7:6YD;W=S('8R+C5C(*DQ.3@W+"`Q.3@X(&)Y($E.3U9!5%)/3DE#
XM4RP@24Y#+B`@("`@("`@("`@("`@("`@("`@("`@```"K`````E``8#_````
XM`0`````!``````ES=')I;F<N8P```````````0`"$`X```)```4`!?____\`
XM`````````````````````````````````@`@A=````````$```$`.0!``@X`
XM'P`%``7_____`````0``*JB8`$T`#P&V``H```(#``0`*J;<````````````
XM`````"JG"````"=RP/____\#```%`"JF[````````````;<```&W``L````+
XM``````````````!D`"`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@(#@`````
XM>*H`*>)`````0@`IXM@`U``/`!@``````0H```(!`")TT``B<6@`(G)(`")^
XMJ``D+0``)"T0````"E-T<E-T<FEN9P`````!``````$``````RTQ``````$`
XM`````0````````D`#P`X``H````#``$`*JC$```````G1$@`````````````
XM`"JH\/____\#```%`"JHU````````````#D````Y``L````+```````````#
XM``$```0``0``````)=@H``````````=#86YC96P`````"@````$`)=PH`"7<
XML``G1=``)VD8`"=N8``JIS@````!``````$``````0`````",0`````!````
X#``$`
X`
Xend
END_OF_FILE
if test 900 -ne `wc -c <'sys/amiga/string.uu'`; then
echo shar: \"'sys/amiga/string.uu'\" unpacked with wrong size!
fi
# end of 'sys/amiga/string.uu'
fi
if test -f 'sys/atari/nethack.mnu' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'sys/atari/nethack.mnu'\"
else
echo shar: Extracting \"'sys/atari/nethack.mnu'\" \(766 characters\)
sed "s/^X//" >'sys/atari/nethack.mnu' <<'END_OF_FILE'
X# Sample .mnu file for NetHack
X# This will work only with MINIWIN v1.1
X# or TOSWIN v2.0 (or better)
X
X#%title "NetHack"
X#%about "About NetHack" "v"
X
XFile
X "Shell" "!"
X "Options" "O"
X ---
X "Save Game" "S"
X ---
X "Quit" ?"[1][Really quit?][ Yes | No ]":%A"Qy":!
XEdit
X "Copy" %C
X "Paste" %P
X "Paste Options..." %O
X ---
X "Set Font..." %F
XInventory
X "Show Inventory" "i"
X --
X "Put on jewelry" "P"
X "Remove jewelry" "R"
X "Wear armor" "W"
X "Take off armor" "T"
X "Wield weapon" "w"
X ---
X "Eat" "e"
X "Quaff potion" "q"
X ---
X "Drop" "d"
X "Throw" "t"
XMove
X "North" "k" 4800
X "South" "j" 5000
X "East" "l" 4d00
X "West" "h" 4b00
X ---
X "Rest" "."
X ---
X "Open door" "o"
X "Close door" "c"
XMisc
X "Help" "?" 6200
X "List known spells" "x"
X "Cast spell" "Z"
X ---
X "Abort" 001b 6100
END_OF_FILE
if test 766 -ne `wc -c <'sys/atari/nethack.mnu'`; then
echo shar: \"'sys/atari/nethack.mnu'\" unpacked with wrong size!
fi
# end of 'sys/atari/nethack.mnu'
fi
if test -f 'sys/mac/macunix.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'sys/mac/macunix.c'\"
else
echo shar: Extracting \"'sys/mac/macunix.c'\" \(992 characters\)
sed "s/^X//" >'sys/mac/macunix.c' <<'END_OF_FILE'
X/* SCCS Id: @(#)macunix.c 3.1 90/22/02
X/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
X/* NetHack may be freely redistributed. See license for details. */
X
X/* This file collects some Unix dependencies */
X
X#include "hack.h"
X#include <fcntl.h>
X
Xint FDECL(uptodate, (int));
Xvoid FDECL(regularize,(char *));
Xvoid NDECL(getlock);
X
X
Xint
Xuptodate(int fd)
X{
X return(1);
X}
X
X
Xvoid
Xregularize(char *s)
X{
X register char *lp;
X
X while((lp=index(s, '.')) || (lp=index(s, ':')) )
X *lp = '_';
X}
X
X
Xvoid
Xgetlock( void )
X{
X int fd ;
X int pid = getpid() ; /* Process Serial Number ? */
X
X set_levelfile_name ( lock , 0 ) ;
X
X if ( ( fd = open ( lock , O_RDWR | O_EXCL | O_CREAT , LEVL_TYPE ) ) == -1 ) {
X raw_printf ( "Could not lock the game %s." , lock ) ;
X panic ( "Another game in progress ?" ) ;
X }
X
X if ( write ( fd , ( char * ) & pid , sizeof ( pid ) ) != sizeof ( pid ) ) {
X raw_printf ( "Could not lock the game %s." , lock ) ;
X panic ( "Disk Locked ?" ) ;
X }
X
X close ( fd ) ;
X}
END_OF_FILE
if test 992 -ne `wc -c <'sys/mac/macunix.c'`; then
echo shar: \"'sys/mac/macunix.c'\" unpacked with wrong size!
fi
# end of 'sys/mac/macunix.c'
fi
if test -f 'sys/mac/mstring.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'sys/mac/mstring.c'\"
else
echo shar: Extracting \"'sys/mac/mstring.c'\" \(651 characters\)
sed "s/^X//" >'sys/mac/mstring.c' <<'END_OF_FILE'
X/* SCCS Id: @(#)mstring.c 3.1 93/01/24 */
X/* Copyright (c) Jon W{tte */
X/* NetHack may be freely redistributed. See license for details. */
X
X#ifdef applec
X
Xextern int strlen ( char * ) ;
Xchar * PtoCstr ( unsigned char * ) ;
Xunsigned char * PtoCstr ( char * ) ;
X
Xchar *
XPtoCstr ( unsigned char * p )
X{
X int len = * p ;
X char * ret = ( char * ) p ;
X
X while ( len -- ) {
X
X * p = p [ 1 ] ;
X p ++ ;
X }
X * p = 0 ;
X
X return ret ;
X}
X
X
Xunsigned char *
XCtoPstr ( char * p )
X{
X int len = strlen ( p ) ;
X unsigned char * ret = ( unsigned char * ) p ;
X
X p += len ;
X while ( p > ret ) {
X
X * p = p [ -1 ] ;
X p -- ;
X }
X * ret = len ;
X
X return ret ;
X}
X
X#endif
END_OF_FILE
if test 651 -ne `wc -c <'sys/mac/mstring.c'`; then
echo shar: \"'sys/mac/mstring.c'\" unpacked with wrong size!
fi
# end of 'sys/mac/mstring.c'
fi
if test -f 'sys/msdos/nhico.uu' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'sys/msdos/nhico.uu'\"
else
echo shar: Extracting \"'sys/msdos/nhico.uu'\" \(1263 characters\)
sed "s/^X//" >'sys/msdos/nhico.uu' <<'END_OF_FILE'
Xsection 1 of uuencode 4.13 of file NETHACK.ICO by R.E.M.
X
Xbegin 644 NETHACK.ICO
XM```!``$`("`0``````#H`@``%@```"@````@````0`````$`!```````@`(`.
XM``````````````````````````````"```"`````@(``@````(``@`"`@```6
XM@("``,#`P````/\``/\```#__P#_````_P#_`/__``#___\`]F9F9F9F9F9F*
XM9F9F9F9F9O]F9F9F9F9F9F9F9F9F9F;_B(B(B(B(B(B(B(B(B&9F_XB(B(B(D
XMB(B(B(B(B(AF9O^(B(B(A555B(B(B(B(9F;_B(B(B`!5!8B(B(B(B&9F_XB('
XMB(@```6(B(B(B(AF9O^(B%554`!56(B(B(B(9F;_B(N[N[`.XU6(B(B(B&9F[
XM_XB[N[L`ONXU6(B(B(AF9O^+N[N[N[ONXUB(B(B(9F;_B[N[N[N[ONY3B(B(N
XMB&9F_XN[NYF9F[ONXSB(B(AF9O^+N[F9F9F[ONXSB(B(9F;_B[N9F9F9F[ON?
XMXSB(B&9F_XNYF9F9F9F[7NXSB(AF9O^+N9F9F9F9NUCNXSB(9F;_B[F9F9F9J
XMF;M8CNXSB&9F_XNYF9F9F9F[6(CNXXAF9O^+N9F9F9F9NUB(CNZ(9F;_B[N9]
XMF9F9F[M8B(CNB&9F_XN[N9F9F;N[6(B(B(AF9O^+N[N9F9N[NUB(B(B(9F;_R
XMB[N[N[N[N[M8B(B(B&9F_XN[N[N[N[N[B(B(B(AF9O^+NXB(B(B+NXB(B(B(F
XM9F;_B[B(B(B(B+N(B(B(B&9F_XB(B(B(B(B(B(B(B(AF9O^(B(B(B(B(B(B(J
XMB(B(9F;_B(B(B(B(B(B(B(B(B&9F___________________V9O__________%
XM__________\`````````````````````````````````````````````````R
XM`````````````````````````````````````````````````````````````
XM`````````````````````````````````````````````````````````````
X!`````
X``
Xend
Xsum -r/size 23881/1107 section (from "begin" to "end")
Xsum -r/size 55184/766 entire input file
END_OF_FILE
if test 1263 -ne `wc -c <'sys/msdos/nhico.uu'`; then
echo shar: \"'sys/msdos/nhico.uu'\" unpacked with wrong size!
fi
chmod +x 'sys/msdos/nhico.uu'
# end of 'sys/msdos/nhico.uu'
fi
if test -f 'sys/msdos/nhpif.uu' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'sys/msdos/nhpif.uu'\"
else
echo shar: Extracting \"'sys/msdos/nhpif.uu'\" \(782 characters\)
sed "s/^X//" >'sys/msdos/nhpif.uu' <<'END_OF_FILE'
Xbegin 666 nethack.pif
XM`%M00R!.971H86-K(#,N,2`@("`@("`@("`@("`@(""``(``0SI<3D542$%#
XM2UQ.151(04-++D5810`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
XM("`@("`@("`@$`!#.EQ.151(04-+`"`@("`@("`@("`@("`@("`@("`@("`@
XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@````````````````````
XM````````````````````````````````````````````````````````````
XM```````!`/\94```!P``````````````````````````````````````````
XM````````````````````````````````````````````````````````````
XM````````````````````````````````````````````````````````````
XM`````````.`@34E#4D]33T94(%!)1D58`(<!``!Q`5=)3D1/5U,@,S@V(#,N
XM,``%`IT!:`"``@`"9``R`/__``#__P```!`"`!\`````````````````````
XM```````@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
XM("`@("`@("`@("`@("`@("`@("`@(%=)3D1/5U,@,C@V(#,N,`#__QL"!@``
X%```````@
X`
Xend
END_OF_FILE
if test 782 -ne `wc -c <'sys/msdos/nhpif.uu'`; then
echo shar: \"'sys/msdos/nhpif.uu'\" unpacked with wrong size!
fi
# end of 'sys/msdos/nhpif.uu'
fi
if test -f 'sys/share/Makefile.lib' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'sys/share/Makefile.lib'\"
else
echo shar: Extracting \"'sys/share/Makefile.lib'\" \(447 characters\)
sed "s/^X//" >'sys/share/Makefile.lib' <<'END_OF_FILE'
X# SCCS Id: @(#)Makefile.lib 3.1 90/22/02
X# Nethack makefile for Fred fish termlib -- Norman Meluch
X#
XCC = cl /c
XMODEL = L
XCFLAGS = /A$(MODEL) /Os /Oa /Gs /Zp1 /W0
X#
X# Termcap routines.
XTERMLIB = termlib.lib
X#
XTL_LOBJECTS = tgetent.o tgetflag.o tgetnum.o \
X tgetstr.o tgoto.o tputs.o \
X isdigit.o fgetlr.o
X#
X.SUFFIXES: .exe .o .c .obj .asm
X#
X.c.o:
X $(CC) $(CFLAGS) /Fo$*.o $*.c
X#
X$(TERMLIB): $(TL_LOBJECTS)
X lib $(TERMLIB) -+ $(TL_LOBJECTS);
X
END_OF_FILE
if test 447 -ne `wc -c <'sys/share/Makefile.lib'`; then
echo shar: \"'sys/share/Makefile.lib'\" unpacked with wrong size!
fi
# end of 'sys/share/Makefile.lib'
fi
if test -f 'sys/share/dgn_comp.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'sys/share/dgn_comp.h'\"
else
echo shar: Extracting \"'sys/share/dgn_comp.h'\" \(526 characters\)
sed "s/^X//" >'sys/share/dgn_comp.h' <<'END_OF_FILE'
X
Xtypedef union
X{
X int i;
X char* str;
X} YYSTYPE;
Xextern YYSTYPE yylval;
X# define INTEGER 257
X# define A_DUNGEON 258
X# define BRANCH 259
X# define CHBRANCH 260
X# define LEVEL 261
X# define RNDLEVEL 262
X# define CHLEVEL 263
X# define RNDCHLEVEL 264
X# define UP_OR_DOWN 265
X# define PROTOFILE 266
X# define DESCRIPTION 267
X# define DESCRIPTOR 268
X# define LEVELDESC 269
X# define ALIGNMENT 270
X# define LEVALIGN 271
X# define ENTRY 272
X# define STAIR 273
X# define NO_UP 274
X# define NO_DOWN 275
X# define PORTAL 276
X# define STRING 277
END_OF_FILE
if test 526 -ne `wc -c <'sys/share/dgn_comp.h'`; then
echo shar: \"'sys/share/dgn_comp.h'\" unpacked with wrong size!
fi
# end of 'sys/share/dgn_comp.h'
fi
if test -f 'sys/share/pctty.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'sys/share/pctty.c'\"
else
echo shar: Extracting \"'sys/share/pctty.c'\" \(1272 characters\)
sed "s/^X//" >'sys/share/pctty.c' <<'END_OF_FILE'
X/* SCCS Id: @(#)pctty.c 3.1 90/22/02
X/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
X/* NetHack may be freely redistributed. See license for details. */
X
X/* tty.c - (PC) version */
X
X#define NEED_VARARGS /* Uses ... */ /* comment line for pre-compiled headers */
X#include "hack.h"
X#include "wintty.h"
X
Xchar erase_char, kill_char;
X
X/*
X * Get initial state of terminal, set ospeed (for termcap routines)
X * and switch off tab expansion if necessary.
X * Called by startup() in termcap.c and after returning from ! or ^Z
X */
Xvoid
Xgettty(){
X erase_char = '\b';
X kill_char = 21; /* cntl-U */
X flags.cbreak = TRUE;
X#if !defined(TOS)
X disable_ctrlP(); /* turn off ^P processing */
X#endif
X}
X
X/* reset terminal to original state */
Xvoid
Xsettty(s)
Xconst char *s;
X{
X end_screen();
X if(s) raw_print(s);
X#if !defined(TOS)
X enable_ctrlP(); /* turn on ^P processing */
X#endif
X}
X
X/* called by init_nhwindows() and resume_nhwindows() */
Xvoid
Xsetftty()
X{
X start_screen();
X}
X
X/* fatal error */
X/*VARARGS1*/
X
Xvoid
Xerror VA_DECL(const char *,s)
X VA_START(s);
X VA_INIT(s, const char *);
X /* error() may get called before tty is initialized */
X if (flags.window_inited) end_screen();
X putchar('\n');
X Vprintf(s,VA_ARGS);
X putchar('\n');
X VA_END();
X exit(1);
X}
X
X/*pctty.c*/
END_OF_FILE
if test 1272 -ne `wc -c <'sys/share/pctty.c'`; then
echo shar: \"'sys/share/pctty.c'\" unpacked with wrong size!
fi
# end of 'sys/share/pctty.c'
fi
if test -f 'sys/unix/nethack.sh' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'sys/unix/nethack.sh'\"
else
echo shar: Extracting \"'sys/unix/nethack.sh'\" \(1115 characters\)
sed "s/^X//" >'sys/unix/nethack.sh' <<'END_OF_FILE'
X#!/bin/sh
X# SCCS Id: @(#)nethack.sh 3.1 90/02/26
X
XHACKDIR=/usr/games/lib/nethackdir
XHACK=$HACKDIR/nethack
XMAXNROFPLAYERS=4
X
X# see if we can find the full path name of PAGER, so help files work properly
X# assume that if someone sets up a special variable (HACKPAGER) for NetHack,
X# it will already be in a form acceptable to NetHack
X# ideas from brian@radio.astro.utoronto.ca
Xif test \( "xxx$PAGER" != xxx \) -a \( "xxx$HACKPAGER" = xxx \)
Xthen
X
X HACKPAGER=$PAGER
X
X# use only the first word of the pager variable
X# this prevents problems when looking for file names with trailing
X# options, but also makes the options unavailable for later use from
X# NetHack
X for i in $HACKPAGER
X do
X HACKPAGER=$i
X break
X done
X
X if test ! -f $HACKPAGER
X then
X IFS=:
X for i in $PATH
X do
X if test -f $i/$HACKPAGER
X then
X HACKPAGER=$i/$HACKPAGER
X export HACKPAGER
X break
X fi
X done
X IFS=' '
X fi
X if test ! -f $HACKPAGER
X then
X echo Cannot find $PAGER -- unsetting PAGER.
X unset HACKPAGER
X unset PAGER
X fi
Xfi
X
X
Xcd $HACKDIR
Xcase $1 in
X -s*)
X exec $HACK "$@"
X ;;
X *)
X exec $HACK "$@" $MAXNROFPLAYERS
X ;;
Xesac
END_OF_FILE
if test 1115 -ne `wc -c <'sys/unix/nethack.sh'`; then
echo shar: \"'sys/unix/nethack.sh'\" unpacked with wrong size!
fi
# end of 'sys/unix/nethack.sh'
fi
if test -f 'sys/unix/setup.sh' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'sys/unix/setup.sh'\"
else
echo shar: Extracting \"'sys/unix/setup.sh'\" \(1090 characters\)
sed "s/^X//" >'sys/unix/setup.sh' <<'END_OF_FILE'
X#!/bin/sh
X# Copy files to their correct locations.
X#
X# If arguments are given, try symbolic link first. This is not the default
X# so that most people will have the distribution versions stay around for
X# so subsequent patches can apply. People who pay enough attention to
X# know there's a non-default behavior are assumed to pay enough attention
X# to keep distribution versions if they modify things.
X
Xif [ $# -gt 0 ] ; then
X# First, try to make a symbolic link.
X#
X ln -s Makefile.top Makefile >/dev/null 2>&1
X if [ $? -eq 0 ] ; then
X
X echo "Lucky you! Symbolic links."
X rm -f Makefile
X
X umask 0
X ln -s sys/unix/Makefile.top ../../Makefile
X ln -s ../sys/unix/Makefile.dat ../../dat/Makefile
X ln -s ../sys/unix/Makefile.doc ../../doc/Makefile
X ln -s ../sys/unix/Makefile.src ../../src/Makefile
X ln -s ../sys/unix/Makefile.utl ../../util/Makefile
X exit 0
X fi
Xfi
X
X#
X# Otherwise...
X
Xecho "Copying Makefiles."
X
Xcp Makefile.top ../../Makefile
Xcp Makefile.dat ../../dat/Makefile
Xcp Makefile.doc ../../doc/Makefile
Xcp Makefile.src ../../src/Makefile
Xcp Makefile.utl ../../util/Makefile
END_OF_FILE
if test 1090 -ne `wc -c <'sys/unix/setup.sh'`; then
echo shar: \"'sys/unix/setup.sh'\" unpacked with wrong size!
fi
# end of 'sys/unix/setup.sh'
fi
if test -f 'sys/vms/vmsmisc.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'sys/vms/vmsmisc.c'\"
else
echo shar: Extracting \"'sys/vms/vmsmisc.c'\" \(728 characters\)
sed "s/^X//" >'sys/vms/vmsmisc.c' <<'END_OF_FILE'
X/* SCCS Id: @(#)vmsmisc.c 3.1 93/01/07 */
X/* NetHack may be freely redistributed. See license for details. */
X
X#include <ssdef.h>
X#include <stsdef.h>
X
Xextern void exit( /*_ int _*/ );
Xextern void LIB$SIGNAL( /*_ unsigned long,... _*/ );
X
Xvoid
Xvms_exit(status)
Xint status;
X{
X exit(status ? (SS$_ABORT | STS$M_INHIB_MSG) : SS$_NORMAL);
X}
X
Xvoid
Xvms_abort()
X{
X LIB$SIGNAL(SS$_DEBUG);
X}
X
X#ifndef __GNUC__
X# ifndef bcopy
X/* needed by gnutermcap.c, possibly by bison generated foo_yacc.c */
Xvoid
Xbcopy(src, dst, cnt)
Xconst char *src;
Xchar *dst;
Xunsigned cnt;
X{
X while (cnt-- > 0) *dst++ = *src++;
X}
X# endif
X#endif /* !__GNUC__ */
X
X#ifdef VERYOLD_VMS
X#include "oldcrtl.c" /* "[-.vms]oldcrtl.c" */
X#endif
X
X/*vmsmisc.c*/
END_OF_FILE
if test 728 -ne `wc -c <'sys/vms/vmsmisc.c'`; then
echo shar: \"'sys/vms/vmsmisc.c'\" unpacked with wrong size!
fi
# end of 'sys/vms/vmsmisc.c'
fi
if test -f 'win/X11/nh32icon' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'win/X11/nh32icon'\"
else
echo shar: Extracting \"'win/X11/nh32icon'\" \(1092 characters\)
sed "s/^X//" >'win/X11/nh32icon' <<'END_OF_FILE'
X/* SCCS Id: @(#)nh32icon 3.1 93/01/24 */
X/* Copyright (C) 1993 by Robert Patrick Rankin */
X/* NetHack may be freely redistributed. See license for details. */
X
X/* 32x32 X11 icon for NetHack. */
X
X#define nh32icon_width 32
X#define nh32icon_height 32
Xstatic char nh32icon_bits[] = {
X 0xff, 0x7f, 0xfe, 0xff, 0x01, 0xc0, 0x03, 0x80, 0x01, 0x00, 0x40, 0x82,
X 0x91, 0x12, 0xc0, 0x83, 0xb1, 0x12, 0x80, 0x81, 0xf1, 0x1e, 0x80, 0x81,
X 0xd1, 0x12, 0x80, 0x81, 0x91, 0x12, 0x80, 0x81, 0x01, 0x00, 0xe0, 0x87,
X 0x71, 0x10, 0x90, 0x89, 0x81, 0x18, 0x80, 0x81, 0x61, 0x10, 0x80, 0x81,
X 0x81, 0x10, 0x80, 0x81, 0x71, 0x3a, 0x84, 0x81, 0x03, 0x00, 0x8a, 0xc1,
X 0x02, 0x00, 0x84, 0x41, 0x32, 0x33, 0x80, 0x41, 0xf3, 0x3f, 0x80, 0xc1,
X 0xf1, 0x3f, 0x84, 0x81, 0x71, 0x3b, 0x8a, 0x81, 0xb1, 0x34, 0x84, 0x81,
X 0x71, 0x3b, 0x80, 0x81, 0x71, 0x3b, 0x80, 0x81, 0xb1, 0x34, 0x84, 0x81,
X 0x71, 0x3b, 0x8a, 0x81, 0xf1, 0x3f, 0x84, 0x81, 0xe1, 0x1f, 0x80, 0x81,
X 0xc1, 0x0f, 0x80, 0x81, 0x81, 0x07, 0x80, 0x81, 0x01, 0x03, 0x00, 0x81,
X 0x01, 0xc0, 0x03, 0x80, 0xff, 0x7f, 0xfe, 0xff};
END_OF_FILE
if test 1092 -ne `wc -c <'win/X11/nh32icon'`; then
echo shar: \"'win/X11/nh32icon'\" unpacked with wrong size!
fi
# end of 'win/X11/nh32icon'
fi
echo shar: End of archive 107 \(of 108\).
cp /dev/null ark107isdone
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 32 33 34 35 36 37 38 39 40 \
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 \
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 \
81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 \
101 102 103 104 105 106 107 108 ; do
if test ! -f ark${I}isdone ; then
MISSING="${MISSING} ${I}"
fi
done
if test "${MISSING}" = "" ; then
echo You have unpacked all 108 archives.
echo "Now execute 'rebuild.sh'"
rm -f ark10[0-8]isdone 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