home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / games / volume16 / nethack31 / part105 < prev    next >
Internet Message Format  |  1993-02-06  |  62KB

  1. Path: uunet!news.tek.com!master!saab!billr
  2. From: billr@saab.CNA.TEK.COM (Bill Randle)
  3. Newsgroups: comp.sources.games
  4. Subject: v16i113:  nethack31 - display oriented dungeons & dragons (Ver. 3.1), Part105/108
  5. Message-ID: <4478@master.CNA.TEK.COM>
  6. Date: 5 Feb 93 22:04:01 GMT
  7. Sender: news@master.CNA.TEK.COM
  8. Lines: 1935
  9. Approved: billr@saab.CNA.TEK.COM
  10. Xref: uunet comp.sources.games:1664
  11.  
  12. Submitted-by: izchak@linc.cis.upenn.edu (Izchak Miller)
  13. Posting-number: Volume 16, Issue 113
  14. Archive-name: nethack31/Part105
  15. Supersedes: nethack3p9: Volume 10, Issue 46-108
  16. Environment: Amiga, Atari, Mac, MS-DOS, OS2, Unix, VMS, X11
  17.  
  18.  
  19.  
  20. #! /bin/sh
  21. # This is a shell archive.  Remove anything before this line, then unpack
  22. # it by saving it into a file and typing "sh file".  To overwrite existing
  23. # files, type "sh file -c".  You can also feed this as standard input via
  24. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  25. # will see the following message at the end:
  26. #        "End of archive 105 (of 108)."
  27. # Contents:  doc/recover.6 include/Window.h include/amiconf.h
  28. #   include/pcconf.h src/were.c sys/amiga/NetHack.cnf
  29. #   sys/amiga/amifont8.uu sys/amiga/charwin.uu
  30. #   sys/amiga/splitter/amiout.h sys/atari/atari.cnf sys/unix/ioctl.c
  31. #   sys/vms/Makefile.dat sys/vms/spec_lev.com util/dgn_main.c
  32. #   win/X11/NetHack.ad win/X11/winval.c
  33. # Wrapped by billr@saab on Wed Jan 27 16:09:32 1993
  34. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  35. if test -f 'doc/recover.6' -a "${1}" != "-c" ; then 
  36.   echo shar: Will not clobber existing file \"'doc/recover.6'\"
  37. else
  38. echo shar: Extracting \"'doc/recover.6'\" \(3631 characters\)
  39. sed "s/^X//" >'doc/recover.6' <<'END_OF_FILE'
  40. X.TH RECOVER 6 "9 January 1993"
  41. X.UC 4
  42. X.SH NAME
  43. Xrecover \- recover a NetHack game interrupted by disaster
  44. X.SH SYNOPSIS
  45. X.B recover
  46. X[
  47. X.B \-d
  48. X.I directory
  49. X]
  50. X.I "base1 base2" ...
  51. X.SH DESCRIPTION
  52. X.PP
  53. XOccasionally, a NetHack game will be interrupted by disaster
  54. Xwhen the game or the system crashes.
  55. XPrior to NetHack v3.1, these games were lost because various information
  56. Xlike the player's inventory was kept only in memory.
  57. XNow, all pertinent information can be written out to disk,
  58. Xso such games can be recovered at the point of the last level change.
  59. X.PP
  60. XThe
  61. X.I base
  62. Xoptions tell
  63. X.I recover
  64. Xwhich files to process.
  65. XEach base option specifies recovery of a separate game.
  66. X.PP
  67. XThe
  68. X.B \-d
  69. Xoption, which must be the first argument if it appears,
  70. Xsupplies a directory which is the NetHack playground.
  71. XIt overrides the value from NETHACKDIR, HACKDIR, or the directory
  72. Xspecified by the game administrator during compilation
  73. X(usually /usr/games/lib/nethackdir).
  74. X.PP
  75. XFor recovery to be possible,
  76. X.I nethack
  77. Xmust have been compiled with the INSURANCE option, and the run-time option
  78. X.I checkpoint
  79. Xmust also have been on.
  80. XNetHack normally writes out files for levels as the player leaves them,
  81. Xso they will be ready for return visits.
  82. XWhen checkpointing, NetHack also writes out the level entered and
  83. Xthe current game state on every level change.
  84. XThis naturally slows level changes down somewhat.
  85. X.PP
  86. XThe level file names are of the form base.nn, where nn is an internal
  87. Xbookkeeping number for the level.
  88. XThe file base.0 is used for game identity, locking, and, when checkpointing,
  89. Xfor the game state.
  90. XVarious OSes use different strategies for constructing the base name.
  91. XMicrocomputers use the character name, possibly truncated and modified
  92. Xto be a legal filename on that system.
  93. XMulti-user systems use the (modified) character name prefixed
  94. Xby a user number to avoid conflicts,
  95. Xor "xlock" if the number of concurrent players is being limited.
  96. XIt may be necessary to look in the playground to find the correct
  97. Xbase name of the interrupted game.
  98. X.I recover
  99. Xwill transform these level files into a save file of the same name as
  100. X.I nethack would have used.
  101. X.PP
  102. XSince
  103. X.I recover
  104. Xmust be able to read and delete files from the playground
  105. Xand create files in the save directory,
  106. Xit has interesting interactions with game security.
  107. XGiving ordinary players access to
  108. X.I recover
  109. Xthrough setuid or setgid is tantamount to leaving the playground
  110. Xworld-writable,
  111. Xwith respect to both cheating and messing up other players.
  112. XFor a single-user system, this of course does not change anything,
  113. Xso some of the microcomputer ports install
  114. X.I recover
  115. Xby default.
  116. X.PP
  117. XFor a multi-user system,
  118. Xthe game administrator may want to arrange for all .0 files in the
  119. Xplayground to be fed to recover when the host machine boots,
  120. Xand handle game crashes individually.
  121. XIf the user population is sufficiently trustworthy,
  122. X.I recover
  123. Xcan be installed with the same permissions the
  124. X.I nethack
  125. Xexecutable has.
  126. XIn either case,
  127. X.I recover
  128. Xis easily compiled from the distribution utility directory.
  129. X.SH NOTES
  130. X.PP
  131. XLike
  132. X.I nethack
  133. Xitself,
  134. X.I recover
  135. Xwill overwrite existing savefiles of the same name.
  136. XSavefiles created by
  137. X.I recover
  138. Xare uncompressed;
  139. Xthey may be compressed afterwards if desired,
  140. Xbut even a compression-using
  141. X.I nethack
  142. Xwill find them in the uncompressed form.
  143. X.SH "SEE ALSO"
  144. Xnethack(6)
  145. X.SH BUGS
  146. X.PP
  147. X.I recover
  148. Xmakes no attempt to find out if a base name specifies a game in progress.
  149. XIf multiple machines share a playground, this would be impossible to
  150. Xdetermine.
  151. X.PP
  152. X.I recover
  153. Xshould be taught to use the nethack playground locking mechanism to
  154. Xavoid conflicts.
  155. END_OF_FILE
  156. if test 3631 -ne `wc -c <'doc/recover.6'`; then
  157.     echo shar: \"'doc/recover.6'\" unpacked with wrong size!
  158. fi
  159. # end of 'doc/recover.6'
  160. fi
  161. if test -f 'include/Window.h' -a "${1}" != "-c" ; then 
  162.   echo shar: Will not clobber existing file \"'include/Window.h'\"
  163. else
  164. echo shar: Extracting \"'include/Window.h'\" \(2851 characters\)
  165. sed "s/^X//" >'include/Window.h' <<'END_OF_FILE'
  166. X/*    SCCS Id: @(#)Window.h    3.1    92/3/7    */
  167. X/* Copyright (c) Dean Luick, 1992                  */
  168. X/* NetHack may be freely redistributed.  See license for details. */
  169. X
  170. X#ifndef _Window_h
  171. X#define _Window_h
  172. X
  173. X/****************************************************************
  174. X *
  175. X * Window widget
  176. X *
  177. X ****************************************************************/
  178. X
  179. X/* Resources:
  180. X
  181. X Name             Class        RepType        Default Value
  182. X ----             -----        -------        -------------
  183. X background         Background        Pixel        XtDefaultBackground
  184. X border             BorderColor    Pixel        XtDefaultForeground
  185. X borderWidth         BorderWidth    Dimension    1
  186. X destroyCallback     Callback        Pointer        NULL
  187. X height             Height        Dimension    0
  188. X mappedWhenManaged   MappedWhenManaged    Boolean        True
  189. X sensitive         Sensitive        Boolean        True
  190. X width             Width        Dimension    0
  191. X x             Position        Position    0
  192. X y             Position        Position    0
  193. X
  194. X rows             Width        Dimension    21
  195. X columns         Height        Dimension    80
  196. X foreground         Color        Pixel        XtDefaultForeground
  197. X
  198. X black             Color        Pixel        "black"
  199. X red             Color        Pixel        "red"
  200. X green             Color        Pixel        "pale green"
  201. X brown             Color        Pixel        "brown"
  202. X blue             Color        Pixel        "blue"
  203. X magenta         Color        Pixel        "magenta"
  204. X cyan             Color        Pixel        "light cyan"
  205. X gray             Color        Pixel        "gray"
  206. X //no color//
  207. X orange             Color        Pixel        "orange"
  208. X bright_green         Color        Pixel        "green"
  209. X yellow             Color        Pixel        "yellow"
  210. X bright_blue         Color        Pixel        "royal blue"
  211. X bright_magenta         Color        Pixel        "violet"
  212. X bright_cyan         Color        Pixel        "cyan"
  213. X white             Color        Pixel        "white"
  214. X
  215. X font             Font        XFontStruct*    XtDefaultFont
  216. X exposeCallback         Callback        Callback    NULL
  217. X callback         Callback        Callback    NULL
  218. X resizeCallback         Callback        Callback    NULL
  219. X*/
  220. X
  221. X/* define any special resource names here that are not in <X11/StringDefs.h> */
  222. X
  223. X#define XtNrows            "rows"
  224. X#define XtNcolumns        "columns"
  225. X#define XtNblack        "black"
  226. X#define XtNred            "red"
  227. X#define XtNgreen        "green"
  228. X#define XtNbrown        "brown"
  229. X#define XtNblue            "blue"
  230. X#define XtNmagenta        "magenta"
  231. X#define XtNcyan            "cyan"
  232. X#define XtNgray            "gray"
  233. X#define XtNorange        "orange"
  234. X#define XtNbright_green        "bright_green"
  235. X#define XtNyellow        "yellow"
  236. X#define XtNbright_blue        "bright_blue"
  237. X#define XtNbright_magenta    "bright_magenta"
  238. X#define XtNbright_cyan        "bright_cyan"
  239. X#define XtNwhite        "white"
  240. X#define XtNexposeCallback    "exposeCallback"
  241. X#define XtNresizeCallback    "resizeCallback"
  242. X
  243. X
  244. Xextern XFontStruct *WindowFontStruct(/* Widget */);
  245. Xextern Font WindowFont(/* Widget */);
  246. X
  247. X#define XtCWindowResource "WindowResource"
  248. X#define XtCRows            "Rows"
  249. X#define XtCColumns        "Columns"
  250. X
  251. X/* declare specific WindowWidget class and instance datatypes */
  252. X
  253. Xtypedef struct _WindowClassRec    *WindowWidgetClass;
  254. Xtypedef struct _WindowRec    *WindowWidget;
  255. X
  256. X/* declare the class constant */
  257. X
  258. Xextern WidgetClass windowWidgetClass;
  259. X
  260. X#endif /* _Window_h */
  261. END_OF_FILE
  262. if test 2851 -ne `wc -c <'include/Window.h'`; then
  263.     echo shar: \"'include/Window.h'\" unpacked with wrong size!
  264. fi
  265. # end of 'include/Window.h'
  266. fi
  267. if test -f 'include/amiconf.h' -a "${1}" != "-c" ; then 
  268.   echo shar: Will not clobber existing file \"'include/amiconf.h'\"
  269. else
  270. echo shar: Extracting \"'include/amiconf.h'\" \(3146 characters\)
  271. sed "s/^X//" >'include/amiconf.h' <<'END_OF_FILE'
  272. X/*    SCCS Id: @(#)amiconf.h    3.1    93/01/17    */
  273. X/* Copyright (c) Kenneth Lorber, Bethesda, Maryland, 1990, 1991, 1992, 1993. */
  274. X/* NetHack may be freely redistributed.  See license for details. */
  275. X
  276. X#ifndef AMICONF_H
  277. X#define AMICONF_H
  278. X
  279. X#undef abs        /* avoid using macro form of abs */
  280. X#undef min        /* this gets redefined */
  281. X#undef max        /* this gets redefined */
  282. X
  283. X#include <time.h>    /* get time_t defined before use! */
  284. X
  285. X#ifdef LATTICE        /* since Lattice can prevent re-inclusion */
  286. X# include <stdlib.h>    /* and other things, including builtins */
  287. X#endif
  288. X
  289. X#ifdef AZTEC_50
  290. X# include <stdlib.h>
  291. X# define AZTEC_C_WORKAROUND /* Bug which turns up in sounds.c. Bummer... */
  292. X# define NO_SIGNAL    /* 5.0 signal handling doesn't like SIGINT...   */
  293. X#endif
  294. X
  295. X#ifdef LATTICE        /* Lattice defines DEBUG when you use -d1 which */
  296. X# ifdef DEBUG        /* we need for useful SnapShots, but DEBUG is   */
  297. X#  undef DEBUG        /* used in several files to turn on things we   */
  298. X# endif            /* don't want (e.g. eat.c), so we get rid of    */
  299. X#endif            /* DEBUG unless asked for in a particular file  */
  300. X
  301. X#ifdef _DCC
  302. X# include <stdlib.h>
  303. X# define _SIZE_T
  304. X#endif
  305. X
  306. Xtypedef long off_t;
  307. X
  308. X#define MICRO        /* must be defined to allow some inclusions */
  309. X
  310. X#ifndef    __SASC_60
  311. X# define O_BINARY    0
  312. X#endif
  313. X
  314. X/* Compile in New Intuition look for 2.0 */
  315. X#ifdef    IDCMP_CLOSEWINDOW
  316. X# define    INTUI_NEW_LOOK    1
  317. X#endif
  318. X
  319. X#define MFLOPPY         /* You'll probably want this; provides assistance
  320. X             * for typical personal computer configurations
  321. X             */
  322. X#define RANDOM
  323. X
  324. Xextern void FDECL(exit, (int));
  325. Xextern void NDECL(CleanUp);
  326. Xextern void FDECL(Abort, (long));
  327. Xextern int NDECL(getpid);
  328. Xextern char *FDECL(CopyFile, (const char *, const char *));
  329. Xextern int NDECL(WindowGetchar);
  330. X
  331. Xextern boolean FromWBench;    /* how were we run? */
  332. Xextern int ami_argc;
  333. Xextern char **ami_argv;
  334. X
  335. X#ifndef MICRO_H
  336. X# include "micro.h"
  337. X#endif
  338. X
  339. X#ifndef PCCONF_H
  340. X# include "pcconf.h"     /* remainder of stuff is almost same as the PC */
  341. X# undef    OVERLAY
  342. X#endif
  343. X
  344. X#define remove(x)       unlink(x)
  345. X
  346. X#ifdef LATTICE
  347. X#define FFLUSH(fp) _flsbf(-1, fp)    /* Was fflush */
  348. X#endif
  349. X
  350. X#ifdef AZTEC_C
  351. X#define FFLUSH(fp) flsh_(fp, -1)     /* Was fflush */
  352. Xextern FILE *FDECL(freopen, (const char *, const char *, FILE *));
  353. Xextern char *FDECL(gets, (char *));
  354. X#endif
  355. X
  356. X#ifdef _DCC
  357. X#define FFLUSH(fp) fflush(fp)
  358. X#endif
  359. X
  360. X#define msmsg        raw_printf
  361. X
  362. X/*
  363. X * If AZTEC_C  we can't use the long cpath in vision.c....
  364. X */
  365. X#ifdef AZTEC_C
  366. X# undef MACRO_CPATH
  367. X#endif
  368. X
  369. X/*
  370. X *  (Possibly) configurable Amiga options:
  371. X */
  372. X
  373. X#define TEXTCOLOR        /* Use colored monsters and objects */
  374. X#define HACKFONT        /* Use special hack.font */
  375. X#define SHELL            /* Have a shell escape command (!) */
  376. X#define MAIL            /* Get mail at unexpected occasions */
  377. X#define DEFAULT_ICON "NetHack:default.icon"    /* private icon */
  378. X#define AMIFLUSH        /* toss typeahead (select flush in .cnf) */
  379. X/*#define AMIGA_WINDOWED_CORNLINE /* Use windows for pager, inventory, etc */
  380. X
  381. X/* new window system options */
  382. X#define AMIGA_INTUITION        /* high power graphics interface */
  383. X
  384. X#ifdef    TEXTCOLOR
  385. X# define    DEPTH    3
  386. X#else
  387. X# define    DEPTH    2
  388. X#endif
  389. X
  390. X#define PORT_HELP    "nethack:amii.hlp"
  391. X
  392. X#undef    TERMLIB
  393. X
  394. X#endif /* AMICONF_H */
  395. END_OF_FILE
  396. if test 3146 -ne `wc -c <'include/amiconf.h'`; then
  397.     echo shar: \"'include/amiconf.h'\" unpacked with wrong size!
  398. fi
  399. # end of 'include/amiconf.h'
  400. fi
  401. if test -f 'include/pcconf.h' -a "${1}" != "-c" ; then 
  402.   echo shar: Will not clobber existing file \"'include/pcconf.h'\"
  403. else
  404. echo shar: Extracting \"'include/pcconf.h'\" \(2387 characters\)
  405. sed "s/^X//" >'include/pcconf.h' <<'END_OF_FILE'
  406. X/*    SCCS Id: @(#)pcconf.h    3.1    92/10/23    */
  407. X/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  408. X/* NetHack may be freely redistributed.  See license for details. */
  409. X
  410. X#ifndef PCCONF_H
  411. X#define PCCONF_H
  412. X
  413. X#define MICRO        /* always define this! */
  414. X
  415. X#ifdef MSDOS        /* some of this material is MS-DOS specific */
  416. X
  417. X/*
  418. X *  The following options are somewhat configurable depending on
  419. X *  your compiler.
  420. X *  __GO32__ is defined automatically by the djgpp port of gcc.
  421. X *  Manually define MOVERLAY if you are using Microsoft C version 7
  422. X *  or greater.
  423. X */
  424. X
  425. X#if !defined (__GO32__) && !defined(__BORLANDC__) && !defined(AMIGA)
  426. X#define OVERLAY         /* MS DOS overlay manager - PGM */
  427. X/* #define MOVERLAY /* Microsoft's MOVE overlay system (MSC >= 7.0) */
  428. X#endif
  429. X
  430. X
  431. X#ifndef __GO32__
  432. X#define MFLOPPY         /* Support for floppy drives and ramdisks by dgk */
  433. X#define SHELL           /* via exec of COMMAND.COM */
  434. X#endif
  435. X
  436. X# define TERMLIB        /* enable use of termcap file /etc/termcap */
  437. X            /* or ./termcap for MSDOS (SAC) */
  438. X            /* compile and link in Fred Fish's termcap library, */
  439. X            /* enclosed in TERMCAP.ARC, to use this */
  440. X
  441. X#define ANSI_DEFAULT    /* allows NetHack to run without a ./termcap */
  442. X
  443. X#define RANDOM        /* have Berkeley random(3) */
  444. X
  445. X#endif /* MSDOS configuration stuff */
  446. X
  447. X
  448. X#define PATHLEN        64    /* maximum pathlength */
  449. X#define FILENAME    80    /* maximum filename length (conservative) */
  450. X#ifndef MICRO_H
  451. X#include "micro.h"      /* contains necessary externs for [os_name].c */
  452. X#endif
  453. X
  454. X#ifdef MFLOPPY
  455. X#define FROMPERM        1      /* for ramdisk use */
  456. X#define TOPERM          2      /* for ramdisk use */
  457. X#define ACTIVE          1
  458. X#define SWAPPED         2
  459. X
  460. Xstruct finfo {
  461. X    int    where;
  462. X    long    time;
  463. X    long    size;
  464. X};
  465. Xextern struct finfo fileinfo[];
  466. X#define ZFINFO  { 0, 0L, 0L }
  467. X
  468. X#endif /* MFLOPPY */
  469. X
  470. X/*
  471. X *  The remaining code shouldn't need modification.
  472. X */
  473. X
  474. X#ifndef SYSTEM_H
  475. X#include "system.h"
  476. X#endif
  477. X#define index    strchr
  478. X#define rindex    strrchr
  479. X
  480. X#ifndef AMIGA
  481. X#include <time.h>
  482. X#endif
  483. X
  484. X#ifdef RANDOM
  485. X/* Use the high quality random number routines. */
  486. X#define Rand()    random()
  487. X#else
  488. X#define Rand()    rand()
  489. X#endif
  490. X
  491. X#ifndef TOS
  492. X#define FCMASK    0660    /* file creation mask */
  493. X#endif
  494. X
  495. X#include <fcntl.h>
  496. X
  497. X#define exit    msexit        /* do chdir first */
  498. X
  499. X#ifndef REDO
  500. X#undef    Getchar
  501. X#define Getchar nhgetch
  502. X#endif
  503. X
  504. X#ifdef MSDOS
  505. X#  define TEXTCOLOR /* */
  506. X#endif
  507. X
  508. X#endif /* PCCONF_H */
  509. END_OF_FILE
  510. if test 2387 -ne `wc -c <'include/pcconf.h'`; then
  511.     echo shar: \"'include/pcconf.h'\" unpacked with wrong size!
  512. fi
  513. # end of 'include/pcconf.h'
  514. fi
  515. if test -f 'src/were.c' -a "${1}" != "-c" ; then 
  516.   echo shar: Will not clobber existing file \"'src/were.c'\"
  517. else
  518. echo shar: Extracting \"'src/were.c'\" \(3100 characters\)
  519. sed "s/^X//" >'src/were.c' <<'END_OF_FILE'
  520. X/*    SCCS Id: @(#)were.c    3.1    93/01/17    */
  521. X/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  522. X/* NetHack may be freely redistributed.  See license for details. */
  523. X
  524. X#include "hack.h"
  525. X
  526. X#ifdef OVL0
  527. X
  528. Xvoid
  529. Xwere_change(mon)
  530. Xregister struct monst *mon;
  531. X{
  532. X    register int pm = monsndx(mon->data);
  533. X
  534. X    if(is_were(mon->data))
  535. X        if(is_human(mon->data)) {
  536. X        if(Protection_from_shape_changers) return;
  537. X        if(!rn2(50-(night()*20)) || flags.moonphase == FULL_MOON) {
  538. X            new_were(mon);
  539. X            if(mons[pm].msound == MS_BARK && flags.soundok)
  540. X            You("hear a %s howling at the moon.",
  541. X                pm == PM_HUMAN_WEREJACKAL ? "jackal" : "wolf");
  542. X        }
  543. X        } else if(!rn2(30) || Protection_from_shape_changers) new_were(mon);
  544. X}
  545. X
  546. X#endif /* OVL0 */
  547. X#ifdef OVLB
  548. X
  549. Xstatic int FDECL(counter_were,(int));
  550. X
  551. Xstatic int
  552. Xcounter_were(pm)
  553. Xint pm;
  554. X{
  555. X    switch(pm) {
  556. X        case PM_WEREWOLF:          return(PM_HUMAN_WEREWOLF);
  557. X        case PM_HUMAN_WEREWOLF:   return(PM_WEREWOLF);
  558. X        case PM_WEREJACKAL:          return(PM_HUMAN_WEREJACKAL);
  559. X        case PM_HUMAN_WEREJACKAL: return(PM_WEREJACKAL);
  560. X        case PM_WERERAT:          return(PM_HUMAN_WERERAT);
  561. X        case PM_HUMAN_WERERAT:    return(PM_WERERAT);
  562. X        default:              return(0);
  563. X    }
  564. X}
  565. X
  566. Xvoid
  567. Xnew_were(mon)
  568. Xregister struct monst *mon;
  569. X{
  570. X    register int pm;
  571. X
  572. X    pm = counter_were(monsndx(mon->data));
  573. X    if(!pm) {
  574. X        impossible("unknown lycanthrope %s.", mon->data->mname);
  575. X        return;
  576. X    }
  577. X
  578. X    if(canseemon(mon))
  579. X        pline("%s changes into a %s.", Monnam(mon),
  580. X            Hallucination ? rndmonnam() :
  581. X            is_human(&mons[pm]) ? "human" :
  582. X            mons[pm].mname+4);
  583. X
  584. X    mon->data = &mons[pm];
  585. X    if (mon->msleep || !mon->mcanmove) {
  586. X        /* transformation wakens and/or revitalizes */
  587. X        mon->msleep = 0;
  588. X        mon->mfrozen = 0;    /* not asleep or paralyzed */
  589. X        mon->mcanmove = 1;
  590. X    }
  591. X    /* regenerate by 1/4 of the lost hit points */
  592. X    mon->mhp += (mon->mhpmax - mon->mhp) / 4;
  593. X    newsym(mon->mx,mon->my);
  594. X#ifdef MUSE
  595. X    mon_break_armor(mon);
  596. X    possibly_unwield(mon);
  597. X#endif
  598. X}
  599. X
  600. Xboolean
  601. Xwere_summon(ptr,yours)    /* were-creature (even you) summons a horde */
  602. Xregister struct permonst *ptr;
  603. Xregister boolean yours;
  604. X{
  605. X    register int i, typ, pm = monsndx(ptr);
  606. X    register struct monst *mtmp;
  607. X    boolean success = FALSE;
  608. X
  609. X    if(Protection_from_shape_changers && !yours)
  610. X        return FALSE;
  611. X    for(i = rnd(5); i > 0; i--) {
  612. X       switch(pm) {
  613. X
  614. X        case PM_WERERAT:
  615. X        case PM_HUMAN_WERERAT:
  616. X            typ = rn2(3) ? PM_SEWER_RAT : rn2(3) ? PM_GIANT_RAT : PM_RABID_RAT ;
  617. X            break;
  618. X        case PM_WEREJACKAL:
  619. X        case PM_HUMAN_WEREJACKAL:
  620. X            typ = PM_JACKAL;
  621. X            break;
  622. X        case PM_WEREWOLF:
  623. X        case PM_HUMAN_WEREWOLF:
  624. X            typ = rn2(5) ? PM_WOLF : PM_WINTER_WOLF ;
  625. X            break;
  626. X        default:
  627. X            continue;
  628. X        }
  629. X        mtmp = makemon(&mons[typ], u.ux, u.uy);
  630. X        if (mtmp) success = TRUE;
  631. X        if (yours && mtmp)
  632. X        (void) tamedog(mtmp, (struct obj *) 0);
  633. X    }
  634. X    return success;
  635. X}
  636. X
  637. X#ifdef POLYSELF
  638. Xvoid
  639. Xyou_were() {
  640. X    char qbuf[80];
  641. X    if(u.umonnum == u.ulycn) return;
  642. X    if(Polymorph_control) {
  643. X        Sprintf(qbuf,"Do you want to change into a %s? ", mons[u.ulycn].mname+4);
  644. X        if(yn(qbuf) == 'n') return;
  645. X    }
  646. X    (void) polymon(u.ulycn);
  647. X}
  648. X#endif
  649. X
  650. X#endif /* OVLB */
  651. X
  652. X/*were.c*/
  653. END_OF_FILE
  654. if test 3100 -ne `wc -c <'src/were.c'`; then
  655.     echo shar: \"'src/were.c'\" unpacked with wrong size!
  656. fi
  657. # end of 'src/were.c'
  658. fi
  659. if test -f 'sys/amiga/NetHack.cnf' -a "${1}" != "-c" ; then 
  660.   echo shar: Will not clobber existing file \"'sys/amiga/NetHack.cnf'\"
  661. else
  662. echo shar: Extracting \"'sys/amiga/NetHack.cnf'\" \(3224 characters\)
  663. sed "s/^X//" >'sys/amiga/NetHack.cnf' <<'END_OF_FILE'
  664. X# A '#' at the beginning of a line means the rest of the line is a comment.
  665. X
  666. X# This configuration file is set up for two cases, a person with a hard
  667. X# disk as drive DH0:, and 1 person with two floppy disks.  If several people
  668. X# are to use it, don't specify "name" or personal prefences like "dogname"
  669. X# or "packorder" in OPTIONS.
  670. X
  671. X# To change configuration, comment out the unwanted configurations, and
  672. X# remove the comment from the configuration you want.
  673. X
  674. X# Some options to set personal preferences.  If several people are to
  675. X# use it, options like these should not be set here - use the command line
  676. X# (if playing from CLI) or ToolTypes (if playing from WorkBench)
  677. X#OPTIONS=name:Janet-V,female,dogname:Fido,fruit:apricot
  678. X#OPTIONS=packorder:")[%?+/=!(*0_`,scores:10t/2a,noverbose
  679. X
  680. X# Other general options
  681. X#OPTIONS=time,rest_on_space,nopickup
  682. X
  683. X# The search path for files like record, help, opthelp, etc.
  684. X#PATH=NetHack:
  685. XPATH=NetHack:playground
  686. X
  687. X# My own setup
  688. X#OPTIONS=name:Rhialto,catname:Killie,time,nopickup
  689. X
  690. X# A hard disk configuration.
  691. X#
  692. X#HACKDIR=DH0:/games/hack
  693. X# The ";n" means don't prompt to insert a disk.
  694. X#SAVE=;n
  695. X#LEVELS=DH0:games/hack/bones
  696. X#SAVE=DH0:/games/hack/bones;n
  697. X
  698. X# A development HD configuration
  699. X#
  700. X#HACKDIR=NetHack:
  701. X#LEVELS=NetHack:levels
  702. X#SAVE=NetHack:save;n
  703. X
  704. X# A 2-floppy, 2-megabyte configuration.
  705. X#
  706. X#HACKDIR=NetHack:
  707. X#LEVELS=df1:
  708. X#SAVE=df1:save
  709. X
  710. X# A minimal configuration
  711. XHACKDIR=NetHack:
  712. XLEVELS=Nethack:levels
  713. XSAVE=Nethack:save
  714. X
  715. X# *** CHARACTER GRAPHICS ***
  716. X#
  717. X# The 69 GRAPHICS characters (0-68) are:
  718. X#
  719. X# stone,
  720. X# walls: vertical, horizontal,
  721. X#     4 corners: top left, top right, bottom left, bottom right,
  722. X#     cross wall,
  723. X#     4 T walls: upward, downward, left, right,
  724. X# doors: no door,
  725. X#     open doors: vertical, horizontal,
  726. X#     closed doors: vertical, horizontal,
  727. X# floor,
  728. X# corridors: unlit, lit,
  729. X# stairs up, stairs down, ladder up, ladder down,
  730. X# trap, web, altar, throne, sink, fountain, pool/moat, ice, lava,
  731. X# lowered drawbridge: vertical, horizontal,
  732. X# raised drawbridge: vertical, horizontal,
  733. X# air, cloud, water,
  734. X# 4 beams: vertical, horizontal, left slant, right slant,
  735. X# digging beam, camera flash beam, left boomerang, right boomerang,
  736. X# 4 magic shield display symbols,
  737. X# 8 swallowed: top left/middle/right, mid left/right, bottom left/mid/right,
  738. X# 9 explosion: [3 rows (top, middle, bottom) of 3 characters]
  739. X#
  740. X# If you specify fewer than 69 ASCII values, the remaining characters will be
  741. X# set to their respective defaults:
  742. X#       ' '  |   -   -   -   -   -   -   -   -
  743. X#           |   |   .   -   |   +   +   .   #   #
  744. X#        <   >   <   >   ^   "   _   \   #   {
  745. X#        }   .   }   .   .   #   #  ' '  #   }
  746. X#        |   -   \   /   *   !   )   (   0   #
  747. X#        @   *   /   -   \   |   |   \   -   /
  748. X#        /   -   \   |  ' '  |   \   -   /
  749. X#
  750. X# Note that the hack.font has special graphics characters from 192 on.
  751. X
  752. X# An example using the hack.font graphics character set:
  753. XGRAPHICS = 032 192 193 194 195 196 197 198 216 214 \
  754. X       215 213 046 193 192 198 198 046 229 035 \
  755. X       060 062 060 062 094 034 095 092 035 123 \
  756. X       125 042 125 042 042 035 035 046 035 125 \
  757. X       192 193 092 047 042 033 123 125 064 038 \
  758. X       042 035 047 201 092 200 200 092 201 047 \
  759. X       230 234 231 236 212 237 232 235 233
  760. END_OF_FILE
  761. if test 3224 -ne `wc -c <'sys/amiga/NetHack.cnf'`; then
  762.     echo shar: \"'sys/amiga/NetHack.cnf'\" unpacked with wrong size!
  763. fi
  764. # end of 'sys/amiga/NetHack.cnf'
  765. fi
  766. if test -f 'sys/amiga/amifont8.uu' -a "${1}" != "-c" ; then 
  767.   echo shar: Will not clobber existing file \"'sys/amiga/amifont8.uu'\"
  768. else
  769. echo shar: Extracting \"'sys/amiga/amifont8.uu'\" \(3008 characters\)
  770. sed "s/^X//" >'sys/amiga/amifont8.uu' <<'END_OF_FILE'
  771. Xbegin 777 8
  772. XM```#\P`````````!``````````````(-```#Z0```@UP_TYU```````````,
  773. XM`````!H/@``!``````````````````````````````````````````!&140`
  774. XM```````````,`````!H`````!\0`"`!```@`!@`!```@_P```&X`B```!*X`
  775. XM```````````8;&P8`#@8##````````,\&#P\''X<?CP\```,`#`\?!C\//C^
  776. XM_CQF?@[F\(+&./PX_#Q^9L/&P\/^/,`\$``8`.``#@`<`.`8!N`X````````
  777. XM``@````````.&'!RS,'_9@```&9F9A@8````&!@8```8&&+`9@!F9A@`&!@`
  778. XMJ!7!@Z+!J!4`/&QL/L9L&!@89A@````&9CAF9CQ@,&9F9A@8&``89L8\9F9L
  779. XM9F9F9A@&9F#&YFQF;&9F6F;#QF;#QC!@##@`&`!@``8`-@!@``!@&```````
  780. XM```8````````&!@8G#-C_V8```!F9F8\&````!@8&```&#QE8V8`9F88`!@8
  781. XM`"/$`\`C+"O4`#P`_F#,:#`P##P8````#&X8!@9L?&`&9F88&#!^#`;>/&;`
  782. XM9F!@P&88!FQ@[O;&9L9F<!AF9L8\9HPP,`QL``P\;#PV/#`[;#@&9AAF?#S<
  783. XM/>P^/F9F8V-F?A@8&`#,-O]F_W_^9^;G/!@````8&!@``!AF8#9G_^;G&``8
  784. XM&&QJ5B9D:3QIE@`8`&P\&'8`,`S_?@!^`!A^&!P<S`9\##P^``!@``8,WF9\
  785. XMP&9X>,Y^&`9X8/[>QGS&?#@89F;6&#P8,!@,Q@``!G9F;F9X9G88!FP8=V9F
  786. XM9F9V8!AF9FLV9DQP&`X`,QS_9@!@!F`&`&88_Q_X'_C_``#;PWX;8``&`!__
  787. XM^/\`G#EKUO@KVEL`&`#^!C#<`#`,/!@````P=A@P!OX&9AAF!@``,``,&-Y^
  788. XM9L!F8&#&9AAF;&+6SL9@QFP.&&8\_CP8,C`,#````!YF8&9^,&9F&`9X&&MF
  789. XM9F9F9CP89F9K'&88&!@8`,P<_V8`8`9@!@!F&``8&```&```P]MF[&``!@`8
  790. XM&!@`;&O6G#DK^#?L````;'QFS``8&&88&``88&889F8,9F889@P8&!A^&`#`
  791. XMPV9F;&9@9F889F9FQL9L8&QF9AAF/.YF&&8P!@P```!F9F9F8#`\9A@&;!AC
  792. XM9F9\/F`&&F8\-C8\,A@8&``S-O]F_V?F?_[GPQ@`&!@``!AS`&889C9GY^;_
  793. XM&!@8```F9&I6/&FT+0`8`&P8QG8`##```!@`&,`\?GX\'CP\&#PX&!@,`#`8
  794. XM>,/\//C^\#YF?CSF_L;&./`\XSP\/AC&PSS^/`,\````.SP\.SQXQN8\9N8\
  795. XM8V8\8`;P?`P[ C&'X.&'``S&/_9@!F9@``9L,8`!@8```8G!@\&&9C9F9F
  796. XM`!@8&````\`CQ"PC08(````````````````P```````````````````P````
  797. XM````````````````````````!@````````````````#^`````````'P``#P`
  798. XM`````/`'`````````'```````#/!_V8`9F8``&8`&``8&```&```&!@`P&9F
  799. XM9@`8&!@``,&#J!7!HL&#````"``(``@`$``(`!@`"``@``@`*``(`#``"``X
  800. XM``@`0``(`$@`"`!0``@`6``(`&``"`!H``@`<``(`'@`"`"```@`B``(`)``
  801. XM"`"8``@`H``(`*@`"`"P``@`N``(`,``"`#(``@`T``(`-@`"`#@``@`Z``(
  802. XM`/``"`#X``@!```(`0@`"`$0``@!&``(`2``"`$H``@!,``(`3@`"`%```@!
  803. XM2``(`5``"`%8``@!8``(`6@`"`%P``@!>``(`8``"`&(``@!D``(`9@`"`&@
  804. XM``@!J``(`;``"`&X``@!P``(`<@`"`'0``@!V``(`>``"`'H``@!\``(`?@`
  805. XM"`(```@""``(`A``"`(8``@"(``(`B@`"`(P``@".``(`D``"`)(``@"4``(
  806. XM`E@`"`)@``@":``(`G``"`)X``@"@``(`H@`"`*0``@"F``(`J``"`*H``@"
  807. XML``(`K@`"`+```@"R``(`M``"`+8``@"X``(`N@`"`+P``@"^``(`P``"`,`
  808. XM``@#```(`P``"`,```@#```(`P``"`,```@#```(`P``"`,```@#```(`P``
  809. XM"`,```@#```(`P``"`,(``@#```(`P``"`,```@#```(`P``"`,```@#```(
  810. XM`P``"`,```@#```(`P``"`,```@#```(`P``"`,```@#```(``@`"``0``@`
  811. XM&``(`"``"``H``@`,``(`#@`"`!```@`2``(`%``"`!8``@`8``(`&@`"`!P
  812. XM``@`>``(`(``"`"(``@`D``(`)@`"`"@``@`J``(`+``"`"X``@`P``(`,@`
  813. XM"`#0``@`V``(`.``"`#H``@`\``(`/@`"`,0``@#&``(`R``"`,H``@#,``(
  814. XM`S@`"`-```@#2``(`U``"`-8``@#8``(`V@`"`-P``@#>``(`X``"`.(``@#
  815. XMD``(`Y@`"`.@``@#J``(`[``"`.X``@#P``(`\@`"`/0``@#```(`P``"`'8
  816. XM``@!X``(`>@`"`'P``@!^``(`@``"`/8``@#X``(`^@`"`/P``@#^``(!```
  817. XM"`0(``@$$``(!!@`"`0@``@$*``(!#``"`0X``@#```(`P``"`,```@#```(
  818. XM`P``"`,```@#```(`P``"`,```@#```(`P``"`,```@#```(`M@`"`+@``@"
  819. XMZ``(`O``"`+X``@````(``````/L````!``````````.````1````%P```!B
  820. X(`````````_+X
  821. X`
  822. Xend
  823. END_OF_FILE
  824. if test 3008 -ne `wc -c <'sys/amiga/amifont8.uu'`; then
  825.     echo shar: \"'sys/amiga/amifont8.uu'\" unpacked with wrong size!
  826. fi
  827. # end of 'sys/amiga/amifont8.uu'
  828. fi
  829. if test -f 'sys/amiga/charwin.uu' -a "${1}" != "-c" ; then 
  830.   echo shar: Will not clobber existing file \"'sys/amiga/charwin.uu'\"
  831. else
  832. echo shar: Extracting \"'sys/amiga/charwin.uu'\" \(3696 characters\)
  833. sed "s/^X//" >'sys/amiga/charwin.uu' <<'END_OF_FILE'
  834. Xbegin 777 char.pw
  835. XM4&]W97)7:6YD;W=S('8R+C5C(*DQ.3@W+"`Q.3@X(&)Y($E.3U9!5%)/3DE#
  836. XM4RP@24Y#+B`@("`@("`@("`@("`@("`@("`@("`@```"K`````E```#\````
  837. XM`0`````!``````=C:&%R+F,``"FPH``````"@`#(``,``8````\``````"3A
  838. XM^````````````````@````$``````0`````!`````!@```#@X.#0<%#``(``
  839. XML`#P`(!04/#P```````!``(0"``@`D``!0`%_____P``````````````````
  840. XM```````````````-`"7D6```````!E1Y<&5?```!`)L`&`$+`&P`!0`%____
  841. XM_P```!%0:6-K(&$@0VAA<F%C=&5R```IOK@`B0`.`'H`"@````,``0`IO(0`
  842. XM`````"=*H`````````````$`*"8H_____P,```4`*;R4````````````>P``
  843. XM`'L`"P````L```````````,``0``&P`!```````E\6@`````````"D)A<F)A
  844. XM<FEA;@`````*`````0`EY:``)>@X`"7K0``G.C``)U7@`"=Z<`````$`````
  845. XM`0`````!``````0G0B<``````0`````!```IP!``B0`;`'H`"@````,``0`I
  846. XMON0``````"?8.`````````````(`*"9X_____P,```4`*;[T````````````
  847. XM>P```'L`"P````L```````````,``0``,``!```````GVV``````````!$5L
  848. XM9@`````*`````0`GW7``)^5@`"@$*``H(5``*"-0`"FRZ`````$``````0``
  849. XM```!``````0G12<``````0`````!```IP&@`B0`H`'H`"@````,``0`IP#P`
  850. XM`````"FS(`````````````,`*;S`_____P,```4`*<!,````````````>P``
  851. XM`'L`"P````L```````````,``0``)``!```````IO+``````````!TMN:6=H
  852. XM=``````*`````0`IO.@`*;\0`"F_(``IOS``*;]``"F_4`````$``````0``
  853. XM```!``````0G2R<``````0`````!```IP8``"0`.`'H`"@````,``0`IP)0`
  854. XM`````"G`P`````````````0`*<#X_____P,```4`*<"D````````````>P``
  855. XM`'L`"P````L```````````,``0``$``!```````IP.``````````#4%R8VAE
  856. XM;VQO9VES=``````*`````0`IP2``*<$P`"G!0``IP5``*<%@`"G!<`````$`
  857. XM`````0`````!``````0G02<``````0`````!```IPI``"0`;`'H`"@````,`
  858. XM`0`IP:P``````"G!V`````````````4`*<((_____P,```4`*<&\````````
  859. XM````>P```'L`"P````L```````````,``0``(0`!```````IP?@`````````
  860. XM"$-A=F5M86X`````"@````$`*<(P`"G"0``IPE``*<)@`"G"<``IPH`````!
  861. XM``````$``````0`````$)T,G``````$``````0``*<.@``D`*`!Z``H````#
  862. XM``$`*<*\```````IPN@````````````&`"G#&/____\#```%`"G"S```````
  863. XM`````'L```![``L````+```````````#``$``",``0``````*<,(````````
  864. XM``=(96%L97(`````"@````$`*<-``"G#4``IPV``*<-P`"G#@``IPY`````!
  865. XM``````$``````0`````$)T@G``````$``````0``*<2P``D`-0!Z``H````#
  866. XM``$`*</,```````IP_@````````````'`"G$*/____\#```%`"G#W```````
  867. XM`````'L```![``L````+```````````#``$``"0``0``````*<08````````
  868. XM``=0<FEE<W0`````"@````$`*<10`"G$8``IQ'``*<2``"G$D``IQ*`````!
  869. XM``````$``````0`````$)U`G``````$``````0``*<7``(D`-0!Z``H````#
  870. XM``$`*<3<```````IQ0@````````````(`"G%./____\#```%`"G$[```````
  871. XM`````'L```![``L````+```````````#``$``"@``0``````*<4H````````
  872. XM``92;V=U90`````*`````0`IQ6``*<5P`"G%@``IQ9``*<6@`"G%L`````$`
  873. XM`````0`````!``````0G4B<``````0`````!```IQM``B0!"`'H`"@````,`
  874. XM`0`IQ>P``````"G&&`````````````D`*<9(_____P,```4`*<7\````````
  875. XM````>P```'L`"P````L```````````,``0``(@`!```````IQC@`````````
  876. XM"%1O=7)I<W0`````"@````$`*<9P`"G&@``IQI``*<:@`"G&L``IQL`````!
  877. XM``````$``````0`````$)U0G``````$``````0``*<?@``D`0@!Z``H````#
  878. XM``$`*<;\```````IQR@````````````*`"G'6/____\#```%`"G'#```````
  879. XM`````'L```![``L````+```````````#``$``"$``0``````*<=(````````
  880. XM``A386UU<F%I``````H````!`"G'@``IQY``*<>@`"G'L``IQ\``*<?0````
  881. XM`0`````!``````$`````!"=3)P`````!``````$``"G)"``)`%X`^@`*````
  882. XM`P`!`"G(#```````*<@X```````````````IR(#_____`0``!0`IR!P`````
  883. XM``````#[````^P`+````"P```````````0`!```.``$``````"G(6```````
  884. XM```=4&EC:R!A(%)A;F1O;2!#:&%R86-T97(@5'EP90`````*`````0`IR*@`
  885. XM*<BX`"G(R``IR-@`*<CH`"G(^`````$``````0`````!``````(Q``````$`
  886. XM`````0``*<H@``D`3P!Z``H````#``$`*<DT```````IR6`````````````,
  887. XM`"G)F/____\#```%`"G)1````````````'L```![``L````+```````````#
  888. XM``$``!T``0``````*<F```````````E686QK>7)I90`````*`````0`IR<``
  889. XM*<G0`"G)X``IR?``*<H``"G*$`````$``````0`````!``````0G5B<`````
  890. XM`0`````!````````B0!/`'H`"@````,``0`IRDP``````"G*>```````````
  891. XM``T`*<JH_____P,```4`*<I<````````````>P```'L`"P````L`````````
  892. XM``,``0``)@`!```````IRI@`````````!U=I>F%R9``````*`````0`IRM``
  893. XM*<K@`"G*\``IRP``*<L0`"G+(`````$``````0`````!``````0G5R<`````
  894. X'`0`````!```I
  895. X`
  896. Xend
  897. END_OF_FILE
  898. if test 3696 -ne `wc -c <'sys/amiga/charwin.uu'`; then
  899.     echo shar: \"'sys/amiga/charwin.uu'\" unpacked with wrong size!
  900. fi
  901. # end of 'sys/amiga/charwin.uu'
  902. fi
  903. if test -f 'sys/amiga/splitter/amiout.h' -a "${1}" != "-c" ; then 
  904.   echo shar: Will not clobber existing file \"'sys/amiga/splitter/amiout.h'\"
  905. else
  906. echo shar: Extracting \"'sys/amiga/splitter/amiout.h'\" \(2842 characters\)
  907. sed "s/^X//" >'sys/amiga/splitter/amiout.h' <<'END_OF_FILE'
  908. X/*    SCCS Id: @(#)amiout.h        3.1   91/15/09
  909. X/*    Copyright (c) Kenneth Lorber, Bethesda, Maryland, 1990      */
  910. X/* NetHack may be freely redistributed.  See license for details. */
  911. X/* This version: $Revision: 1.2 $ */
  912. X/* Last edit: $Date: 92/02/09 12:38:04 $ */
  913. X
  914. X/*
  915. X * This is essentially a.out.h for the Amiga object and load file format,
  916. X * as extended by Lattice (now SAS, then adopted by CBM, and extended again).
  917. X */
  918. X/* object file structure */
  919. X    
  920. X    /* these blocks are of the form: ID,N,N data longs */
  921. X#define HUNK_UNIT    999
  922. X#define HUNK_NAME    1000
  923. X#define HUNK_DEBUG    1009
  924. X    /* these blocks are of the form: ID,N*,N data longs. */
  925. X    /* If (N* && 0xc0000000 == 0xc0000000) then an additional long appears*/
  926. X#define HUNK_CODE    1001
  927. X#define HUNK_DATA    1002
  928. X#define HUNK_BSS    1003
  929. X# define MEM_OBJ_ANY     0
  930. X# define MEM_OBJ_FAST    (1<<31)
  931. X# define MEM_OBJ_CHIP    (1<<30)
  932. X# define MEM_OBJ_EXTEND 0xc0000000
  933. X    /* these blocks are of the form: ID, (N!=0,long,N data longs)*, 0 */
  934. X#define HUNK_RELOC32    1004
  935. X#define HUNK_RELOC16    1005
  936. X#define HUNK_RELOC8    1006
  937. X/*#define HUNK_RELOC32s ???        /* ADOS 2.0 */
  938. X#define HUNK_DRELOC32    0x3f7        /* Lattice & ADOS 2.0 */
  939. X#define HUNK_DRELOC16    0x3f8        /* Lattice & ADOS 2.0 */
  940. X#define HUNK_DRELOC8    0x3f9        /* Lattice & ADOS 2.0 */
  941. X    /* these blocks are of the form: ID,(symbol data unit)*,0 */
  942. X#define HUNK_EXT    1007
  943. X#define        EXT_SYMB    0    /* SDU format 0 */
  944. X#define        EXT_DEF        1    /* SDU format 1 */
  945. X#define        EXT_ABS        2    /* SDU format 1 */
  946. X#define        EXT_RES        3    /* SDU format 1 */
  947. X#define        EXT_REF32    129    /* SDU format 2 */
  948. X#define        EXT_COMMON    130    /* SDU format 3 */
  949. X#define        EXT_REF16    131    /* SDU format 2 */
  950. X#define        EXT_REF8    132    /* SDU format 2 */
  951. X#define        EXT_DREF32    133    /* ADOS 2.0 */
  952. X#define        EXT_DREF16    0x86    /* SDU format 2 Lattice - data ref */
  953. X#define        EXT_DREF8    135    /* ADOS 2.0 */
  954. X#define    HUNK_SYMBOL    1008
  955. X    /* these blocks are of the form: ID */
  956. X#define HUNK_END    1010
  957. X
  958. X/* load file structure */
  959. X    /* these blocks are of the form:
  960. X     * ID,(N!=0,X,X longs)*,0,SZ,first,last,last-first+1 sizes
  961. X     */
  962. X#define HUNK_HEADER    1011
  963. X    /* these blocks are of the form:
  964. X     * ID,SZ,M+2,M+1 longs of 0,overlay data table [(O+1)*8+M+1 longs]
  965. X     * where M=tree depth (root=0), O=# overlays-1 [zero base]
  966. X     */
  967. X#define HUNK_OVERLAY    1013
  968. X    /* these blocks are of the form: ID */
  969. X#define HUNK_BREAK    1014
  970. X
  971. X/* link library structure */
  972. X        /* NB - this is a Lattice extension.  It is perfectly
  973. X         * legal to concatenate .o files and call it a library.
  974. X         * Now adopted by ADOS 2.0
  975. X         */
  976. X    /* these blocks are of the form:
  977. X     * ID, size in longs of the code/data/etc following
  978. X     */
  979. X#define LIB_HUNK    1018
  980. X    /* these blocks are of the form:
  981. X     * ID, size, 16-bit size of string table, string table, reloc info
  982. X     */
  983. X#define LIB_INDEX    1019
  984. X    /* the ADOS 2.0 book defines them this way -
  985. X     * it's wrong, right?
  986. X     */
  987. X/* #define HUNK_LIB 1019 */
  988. X/* #define HUNK_INDEX 1020 */
  989. END_OF_FILE
  990. if test 2842 -ne `wc -c <'sys/amiga/splitter/amiout.h'`; then
  991.     echo shar: \"'sys/amiga/splitter/amiout.h'\" unpacked with wrong size!
  992. fi
  993. # end of 'sys/amiga/splitter/amiout.h'
  994. fi
  995. if test -f 'sys/atari/atari.cnf' -a "${1}" != "-c" ; then 
  996.   echo shar: Will not clobber existing file \"'sys/atari/atari.cnf'\"
  997. else
  998. echo shar: Extracting \"'sys/atari/atari.cnf'\" \(3327 characters\)
  999. sed "s/^X//" >'sys/atari/atari.cnf' <<'END_OF_FILE'
  1000. X# A '#' at the beginning of a line means the rest of the line is a comment.
  1001. X#
  1002. X# This configuration file is set up for two cases, for a hard disk
  1003. X# (as drive C:), and for one (double sided) floppy disk.
  1004. X#
  1005. X# To change the configuration, comment out the unwanted lines, and
  1006. X# uncomment the configuration you want.
  1007. X
  1008. X
  1009. X# *** OPTIONS ***
  1010. X#
  1011. X# If you want people to play NetHack over the modem, you should probably
  1012. X# uncomment the following line:
  1013. X#
  1014. X#OPTIONS=!BIOS,number_pad,nocolor
  1015. X#
  1016. X# Some options to set personal preferences.  Uncomment and change these to
  1017. X# suit your personal preference.  If several people are to use the same
  1018. X# configuration, options like these should not be set.
  1019. X#
  1020. X#OPTIONS=name:Janet-V,female,dogname:Fido,catname:Morris,fruit:apricot
  1021. X#OPTIONS=packorder:")[%?+/=!(*0_`,scores:10 top/2 around/own
  1022. X#
  1023. X#
  1024. X# Other general options.  You might also set "silent" so as not to attract
  1025. X# the boss's attention.
  1026. X#
  1027. XOPTIONS=BIOS,time,rest_on_space,nopickup
  1028. X
  1029. X# Color: if you have a color monitor and *don't* want colors, 
  1030. X# comment out the following line. (Mono users don't get color no matter what.)
  1031. X#
  1032. X#OPTIONS=nocolor
  1033. X
  1034. X# *** HARD DISK CONFIGURATION ***
  1035. X#
  1036. XHACKDIR=c:\nh31\games
  1037. X#
  1038. X#   LEVELS and SAVE default to HACKDIR
  1039. X#
  1040. XLEVELS=c:\nh31\games
  1041. X#   appending a ";n" to SAVE means don't prompt to insert a disk.
  1042. XSAVE=c:\nh31\games;n
  1043. X#
  1044. X# Using a ramdisk speeds things up.
  1045. X#
  1046. X# NOTE: the RAMDISK *must* be on a different drive from HACKDIR, LEVELS, and
  1047. X# SAVE. If you're already keeping your LEVELS on a ramdisk, the RAMDISK=
  1048. X# variable is redundant.
  1049. X#
  1050. X#RAMDISK=m:
  1051. X
  1052. X
  1053. X# *** 1-FLOPPY CONFIGURATION ***
  1054. X#
  1055. X#HACKDIR=a:
  1056. X#LEVELS=a:
  1057. X#SAVE=a:
  1058. X#RAMDISK=m:
  1059. X
  1060. X
  1061. X# *** CHARACTER GRAPHICS ***
  1062. X#
  1063. X# The 69 GRAPHICS characters (0-68) are:
  1064. X#
  1065. X# stone,
  1066. X# walls: vertical, horizontal,
  1067. X#     4 corners: top left, top right, bottom left, bottom right,
  1068. X#     cross wall,
  1069. X#     4 T walls: upward, downward, left, right,
  1070. X# doors: no door,
  1071. X#     open doors: vertical, horizontal,
  1072. X#     closed doors: vertical, horizontal,
  1073. X# floor,
  1074. X# corridors: unlit, lit,
  1075. X# stairs up, stairs down, ladder up, ladder down,
  1076. X# trap, web, altar, throne, sink, fountain, pool/moat, ice, lava,
  1077. X# lowered drawbridge: vertical, horizontal,
  1078. X# raised drawbridge: vertical, horizontal,
  1079. X# air, cloud, water,
  1080. X# 4 beams: vertical, horizontal, left slant, right slant,
  1081. X# digging beam, camera flash beam, left boomerang, right boomerang,
  1082. X# 4 magic shield display symbols,
  1083. X# 8 swallowed: top left/middle/right, mid left/right, bottom left/mid/right,
  1084. X# 9 explosion: [3 rows (top, middle, bottom) of 3 characters]
  1085. X#
  1086. X# If you specify fewer than 69 ASCII values, the remaining characters will be
  1087. X# set to their respective defaults:
  1088. X#       ' '  |   -   -   -   -   -   -   -   -
  1089. X#           |   |   .   -   |   +   +   .   #   #
  1090. X#        <   >   <   >   ^   "   _   \   #   {
  1091. X#        }   .   }   .   .   #   #  ' '  #   }
  1092. X#        |   -   \   /   *   !   )   (   0   #
  1093. X#        @   *   /   -   \   |   |   \   -   /
  1094. X#        /   -   \   |  ' '  |   \   -   /
  1095. X#
  1096. X# An example using the hackfnt.prg font:
  1097. X#GRAPHICS= 032 217 218 194 195 192 193 216 197 196 \
  1098. X#       199 198 202 201 201 200 200 202 203 203 \
  1099. X#       210 211 212 213 207 206 209 208 205 204 \
  1100. X#       214 202 214 042 042 215 215 046 035 214 \
  1101. X#       058 045 092 047 042 033 041 040 048 035 \
  1102. X#       064 042 194 218 195 217 217 192 218 193 \
  1103. X#       047 045 092 058 032 058 092 045 047
  1104. END_OF_FILE
  1105. if test 3327 -ne `wc -c <'sys/atari/atari.cnf'`; then
  1106.     echo shar: \"'sys/atari/atari.cnf'\" unpacked with wrong size!
  1107. fi
  1108. # end of 'sys/atari/atari.cnf'
  1109. fi
  1110. if test -f 'sys/unix/ioctl.c' -a "${1}" != "-c" ; then 
  1111.   echo shar: Will not clobber existing file \"'sys/unix/ioctl.c'\"
  1112. else
  1113. echo shar: Extracting \"'sys/unix/ioctl.c'\" \(3582 characters\)
  1114. sed "s/^X//" >'sys/unix/ioctl.c' <<'END_OF_FILE'
  1115. X/*    SCCS Id: @(#)ioctl.c    3.1    90/22/02
  1116. X/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  1117. X/* NetHack may be freely redistributed.  See license for details. */
  1118. X
  1119. X/* This cannot be part of hack.tty.c (as it was earlier) since on some
  1120. X   systems (e.g. MUNIX) the include files <termio.h> and <sgtty.h>
  1121. X   define the same constants, and the C preprocessor complains. */
  1122. X
  1123. X#include "hack.h"
  1124. X
  1125. X#if defined(BSD_JOB_CONTROL) || defined(_BULL_SOURCE)
  1126. X# ifdef HPUX
  1127. X#include <bsdtty.h>
  1128. X# else
  1129. X#  if defined(AIX_31) && !defined(_ALL_SOURCE)
  1130. X#   define _ALL_SOURCE    /* causes struct winsize to be present */
  1131. X#  endif
  1132. X#  if defined(_BULL_SOURCE)
  1133. X#   include <termios.h>
  1134. Xstruct termios termio;
  1135. X#   undef TIMEOUT        /* defined in you.h and sys/tty.h */
  1136. X#   include <sys/tty.h>        /* define winsize */
  1137. X#   include <sys/ttold.h>    /* define struct ltchars */
  1138. X#   include <sys/bsdioctl.h>    /* define TIOGWINSZ */
  1139. X#  else
  1140. X#   include <sgtty.h>
  1141. X#  endif
  1142. X# endif
  1143. Xstruct ltchars ltchars;
  1144. Xstruct ltchars ltchars0 = { -1, -1, -1, -1, -1, -1 }; /* turn all off */
  1145. X#else
  1146. X
  1147. X# ifdef POSIX_TYPES
  1148. X#include <termios.h>
  1149. Xstruct termios termio;
  1150. X#  ifdef BSD
  1151. X#include <sys/ioctl.h>
  1152. X#  endif
  1153. X# else
  1154. X#include <termio.h>    /* also includes part of <sgtty.h> */
  1155. X#  if defined(TCSETS) && !defined(AIX_31)
  1156. Xstruct termios termio;
  1157. X#  else
  1158. Xstruct termio termio;
  1159. X#  endif
  1160. X# endif
  1161. X# ifdef AMIX
  1162. X#include <sys/ioctl.h>
  1163. X# endif /* AMIX */
  1164. X#endif
  1165. X
  1166. X#ifdef SUSPEND    /* BSD isn't alone anymore... */
  1167. X#include    <signal.h>
  1168. X#endif
  1169. X
  1170. X#if defined(TIOCGWINSZ) && (defined(BSD) || defined(ULTRIX) || defined(AIX_31) || defined(_BULL_SOURCE) || defined(SVR4))
  1171. X#define USE_WIN_IOCTL
  1172. X#include "termcap.h"    /* for LI and CO */
  1173. X#endif
  1174. X
  1175. X#ifdef AUX
  1176. Xvoid *
  1177. Xcatch_stp ( )
  1178. X{
  1179. X    signal ( SIGTSTP , SIG_DFL ) ;
  1180. X    dosuspend ( ) ;
  1181. X}
  1182. X#endif /* AUX */
  1183. X
  1184. X#ifdef USE_WIN_IOCTL
  1185. Xvoid
  1186. Xgetwindowsz()
  1187. X{
  1188. X    /*
  1189. X     * ttysize is found on Suns and BSD
  1190. X     * winsize is found on Suns, BSD, and Ultrix
  1191. X     */
  1192. X    struct winsize ttsz;
  1193. X
  1194. X    if (ioctl(fileno(stdin), (int)TIOCGWINSZ, (char *)&ttsz) != -1) {
  1195. X    /*
  1196. X     * Use the kernel's values for lines and columns if it has
  1197. X     * any idea.
  1198. X     */
  1199. X    if (ttsz.ws_row)
  1200. X        LI = ttsz.ws_row;
  1201. X    if (ttsz.ws_col)
  1202. X        CO = ttsz.ws_col;
  1203. X    }
  1204. X}
  1205. X#endif
  1206. X
  1207. Xvoid
  1208. Xgetioctls()
  1209. X{
  1210. X#ifdef BSD_JOB_CONTROL
  1211. X    (void) ioctl(fileno(stdin), (int) TIOCGLTC, (char *) <chars);
  1212. X    (void) ioctl(fileno(stdin), (int) TIOCSLTC, (char *) <chars0);
  1213. X#else
  1214. X# ifdef POSIX_TYPES
  1215. X    (void) tcgetattr(fileno(stdin), &termio);
  1216. X# else
  1217. X#  if defined(TCSETS) && !defined(AIX_31)
  1218. X    (void) ioctl(fileno(stdin), (int) TCGETS, &termio);
  1219. X#  else
  1220. X    (void) ioctl(fileno(stdin), (int) TCGETA, &termio);
  1221. X#  endif
  1222. X# endif
  1223. X#endif
  1224. X#ifdef USE_WIN_IOCTL
  1225. X    getwindowsz();
  1226. X#endif
  1227. X#ifdef AUX
  1228. X    ( void ) signal ( SIGTSTP , catch_stp ) ;
  1229. X#endif
  1230. X}
  1231. X
  1232. Xvoid
  1233. Xsetioctls()
  1234. X{
  1235. X#ifdef BSD_JOB_CONTROL
  1236. X    (void) ioctl(fileno(stdin), (int) TIOCSLTC, (char *) <chars);
  1237. X#else
  1238. X# ifdef POSIX_TYPES
  1239. X    (void) tcsetattr(fileno(stdin), TCSADRAIN, &termio);
  1240. X# else
  1241. X#  if defined(TCSETS) && !defined(AIX_31)
  1242. X    (void) ioctl(fileno(stdin), (int) TCSETSW, &termio);
  1243. X#  else
  1244. X    (void) ioctl(fileno(stdin), (int) TCSETAW, &termio);
  1245. X#  endif
  1246. X# endif
  1247. X#endif
  1248. X}
  1249. X
  1250. X#ifdef SUSPEND        /* Does not imply BSD */
  1251. Xint
  1252. Xdosuspend()
  1253. X{
  1254. X#ifdef SIGTSTP
  1255. X    if(signal(SIGTSTP, SIG_IGN) == SIG_DFL) {
  1256. X        suspend_nhwindows(NULL);
  1257. X        (void) signal(SIGTSTP, SIG_DFL);
  1258. X#ifdef AUX
  1259. X        ( void ) kill ( 0 , SIGSTOP ) ;
  1260. X#else
  1261. X        (void) kill(0, SIGTSTP);
  1262. X#endif
  1263. X        resume_nhwindows();
  1264. X    } else {
  1265. X        pline("I don't think your shell has job control.");
  1266. X    }
  1267. X#else
  1268. X    pline("Sorry, it seems we have no SIGTSTP here.  Try ! or S.");
  1269. X#endif
  1270. X    return(0);
  1271. X}
  1272. X#endif /* SUSPEND */
  1273. END_OF_FILE
  1274. if test 3582 -ne `wc -c <'sys/unix/ioctl.c'`; then
  1275.     echo shar: \"'sys/unix/ioctl.c'\" unpacked with wrong size!
  1276. fi
  1277. # end of 'sys/unix/ioctl.c'
  1278. fi
  1279. if test -f 'sys/vms/Makefile.dat' -a "${1}" != "-c" ; then 
  1280.   echo shar: Will not clobber existing file \"'sys/vms/Makefile.dat'\"
  1281. else
  1282. echo shar: Extracting \"'sys/vms/Makefile.dat'\" \(3011 characters\)
  1283. sed "s/^X//" >'sys/vms/Makefile.dat' <<'END_OF_FILE'
  1284. X#    NetHack Makefile (VMS) - data files: special levels and other data.
  1285. X#    SCCS Id: @(#)Makefile.dat    3.1    93/01/06
  1286. X
  1287. X#  Copy this file to [.dat]Makefile.; no editing needed.
  1288. X
  1289. XMAKE    = mms
  1290. XCD    = set default
  1291. XECHO    = write sys$output
  1292. XNOOP    = !            # don't do anything
  1293. XRUN    = mcr            # simplest way to pass command line args
  1294. XTOUCH    = append/New _NLA0:    # only one file per $(TOUCH)
  1295. X# support directories, relative to each other and to 'src'
  1296. XDAT = [-.dat]
  1297. XUTL = [-.util]
  1298. X# utilities; must match Makefile.utl in spelling and punctuation
  1299. XMAKEDEFS = $(UTL)makedefs.exe;
  1300. XLEVCOMP  = $(UTL)lev_comp.exe;
  1301. XDGNCOMP  = $(UTL)dgn_comp.exe;
  1302. X
  1303. X# note: filespecs have enough punctuation to satisfy DELETE
  1304. XMARKERS = spec_levs.timestamp;,quest_levs.timestamp;
  1305. XVARDAT    = data.;,rumors.;,quest.dat;,oracles.;,options.;
  1306. XDUNGEON = dungeon.;
  1307. X# note: the level lists need to be space separated
  1308. XQUESTLEVS = Arch.des Barb.des Caveman.des Elf.des Healer.des Knight.des \
  1309. X    Priest.des Rogue.des Samurai.des Tourist.des Valkyrie.des Wizard.des
  1310. XSPECLEVS  = bigroom.des castle.des endgame.des gehennom.des knox.des \
  1311. X    medusa.des mines.des oracle.des tower.des yendor.des
  1312. X
  1313. Xall :    $(VARDAT) $(DUNGEON) $(MARKERS)
  1314. X      @ $(ECHO) "data files are up to date."
  1315. X
  1316. X# these are convenience targets for "manual" interactive use
  1317. Xspec_levs :    spev_levs.timestamp
  1318. X      @ $(ECHO) "special levels are up to date."
  1319. Xquest_levs :    quest_levs.timestamp
  1320. X      @ $(ECHO) "quest levels are up to date."
  1321. Xdungeon :    $(DUNGEON)
  1322. X      @ $(ECHO) "dungeon is up to date."
  1323. Xdata :        data.;
  1324. X      @ $(NOOP)
  1325. Xrumors :    rumors.;
  1326. X      @ $(NOOP)
  1327. Xquest.dat :    quest.dat;
  1328. X      @ $(NOOP)
  1329. Xoracles :    oracles.;
  1330. X      @ $(NOOP)
  1331. Xoptions :    options.;
  1332. X      @ $(NOOP)
  1333. X
  1334. X$(MAKEDEFS) :
  1335. X    $(CD) $(UTL)
  1336. X    $(MAKE)$(MAKEFLAGS) $(MAKEDEFS)
  1337. X      @ $(CD) $(DAT)
  1338. X
  1339. X$(DGNCOMP) :
  1340. X    $(CD) $(UTL)
  1341. X    $(MAKE)$(MAKEFLAGS) $(DGNCOMP)
  1342. X      @ $(CD) $(DAT)
  1343. X
  1344. X$(LEVCOMP) :
  1345. X    $(CD) $(UTL)
  1346. X    $(MAKE)$(MAKEFLAGS) $(LEVCOMP)
  1347. X      @ $(CD) $(DAT)
  1348. X
  1349. Xdata.; :    data.base $(MAKEDEFS)
  1350. X    $(RUN) $(MAKEDEFS) -d
  1351. X
  1352. Xrumors.; :    rumors.tru rumors.fal $(MAKEDEFS)
  1353. X    $(RUN) $(MAKEDEFS) -r
  1354. X
  1355. Xquest.dat; :    quest.txt $(MAKEDEFS)
  1356. X    $(RUN) $(MAKEDEFS) -q
  1357. X
  1358. Xoracles.; :    oracles.txt $(MAKEDEFS)
  1359. X    $(RUN) $(MAKEDEFS) -h
  1360. X
  1361. X# note: 'options' should have already been made when include/date.h was created
  1362. Xoptions.; :    $(MAKEDEFS)
  1363. X    $(RUN) $(MAKEDEFS) -v
  1364. X
  1365. Xspec_levs.timestamp; :    $(SPECLEVS) $(LEVCOMP)
  1366. X    $(RUN) $(LEVCOMP) $(SPECLEVS)
  1367. X    $(TOUCH) spec_levs.timestamp;
  1368. X
  1369. Xquest_levs.timestamp; : $(QUESTLEVS) $(LEVCOMP)
  1370. X    $(RUN) $(LEVCOMP) $(QUESTLEVS)
  1371. X    $(TOUCH) quest_levs.timestamp;
  1372. X
  1373. X$(DUNGEON) :    dungeon.def $(MAKEDEFS) $(DGNCOMP)
  1374. X    $(RUN) $(MAKEDEFS) -e        !dungeon.def -> dungeon.pdf
  1375. X    $(RUN) $(DGNCOMP) dungeon.pdf    !dungeon.pdr -> dungeon
  1376. X
  1377. Xclean :
  1378. X      - if f$search("*.*;-1").nes."" then  purge
  1379. X      - if f$search("dungeon.pdf").nes."" then    delete dungeon.pdf;
  1380. X      - if f$search("*.timestamp").nes."" then    delete $(MARKERS)
  1381. X      - delete $(VARDAT)
  1382. X
  1383. Xspotless :    clean
  1384. X      - if f$search("$(DUNGEON)").nes."" then  delete $(DUNGEON)
  1385. X      - if f$search("*.lev").nes."" then  delete *.lev;
  1386. END_OF_FILE
  1387. if test 3011 -ne `wc -c <'sys/vms/Makefile.dat'`; then
  1388.     echo shar: \"'sys/vms/Makefile.dat'\" unpacked with wrong size!
  1389. fi
  1390. # end of 'sys/vms/Makefile.dat'
  1391. fi
  1392. if test -f 'sys/vms/spec_lev.com' -a "${1}" != "-c" ; then 
  1393.   echo shar: Will not clobber existing file \"'sys/vms/spec_lev.com'\"
  1394. else
  1395. echo shar: Extracting \"'sys/vms/spec_lev.com'\" \(3015 characters\)
  1396. sed "s/^X//" >'sys/vms/spec_lev.com' <<'END_OF_FILE'
  1397. X$ ! sys/vms/spec_lev.com -- preprocess nethack's special level compiler code
  1398. X$ !
  1399. X$ ! This operation needs to be performed prior to executing vmsbuild.com.
  1400. X$ ! Process the scanning and parsing code for NetHack's special level
  1401. X$ ! and dungeon compilers.  *.l and *.y are converted into *'.c and *.h.
  1402. X$ !
  1403. X$
  1404. X$ ! setup yacc/bison and lex/flex;
  1405. X$ !      (Uncomment the alternatives appropriate for your site;
  1406. X$ !       if yacc and lex are not defined, the pre-processed files
  1407. X$ !       distributed in sys/share will be copied and used.)
  1408. X$     ! yacc := bison /Define            !native bison (w/ DCL CLD)
  1409. X$     ! yacc := $bison$dir:bison -y -d        !'foreign' bison (w/o CLD)
  1410. X$     ! yacc := posix /Run/Input=nl: posix$bin:yacc. """-d 
  1411. X$     ! yacc := $shell$exe:yacc -d        !yacc from DECshell
  1412. X$     ! lex  := $flex$dir:flex            !flex
  1413. X$     ! lex  := posix /Run/Input=nl: posix$bin:lex. """
  1414. X$     ! lex  := $shell$exe:lex
  1415. X$ !      (Nothing below this line should need to be changed.)
  1416. X$ ! additional setup
  1417. X$    rename    := rename/New_Vers
  1418. X$    mung    := call mung    ! not to be confused with teco :-)
  1419. X$    delete    := delete/noConfirm
  1420. X$    copy    := copy/noConcat
  1421. X$    ! start from a known location -- [.sys.vms], then move to [-.-.util]
  1422. X$    cur_dir = f$environment("DEFAULT")
  1423. X$    set default 'f$parse(f$environment("PROCEDURE"),,,"DIRECTORY")'
  1424. X$    set default [-.-.util]    !move to utility directory
  1425. X$
  1426. X$mung: subroutine
  1427. X$ ! kludge to strip bogus #module directives from POSIX-processed files
  1428. X$ !   in lieu of $ rename 'p1' 'p2'
  1429. X$    search/Exact/Match=NOR 'p1' "#module" /Output='p2'
  1430. X$    delete 'p1';*
  1431. X$ endsubroutine !mung
  1432. X$
  1433. X$ ! first some cleanup (to keep things safe for unknown yacc vs bison)
  1434. X$  if f$search("y_tab.%").nes."" then  delete y_tab.%;* !old yacc
  1435. X$  if f$search("ytab.%") .nes."" then  delete ytab.%;*    !VMS POSIX yacc
  1436. X$
  1437. X$ ! process lev_comp.y into lev_yacc.c and ../include/lev_comp.h
  1438. X$ if f$type(yacc).eqs."STRING"
  1439. X$ then
  1440. X$  yacc lev_comp.y
  1441. X$  if f$search("y_tab.%").nes."" then  rename y_tab.% lev_comp.*
  1442. X$  if f$search("ytab.%") .nes."" then  rename ytab.% lev_comp.*
  1443. X$ else        ! use preprocessed files
  1444. X$  copy [-.sys.share]lev_yacc.c,lev_comp.h []lev_comp.*
  1445. X$ endif
  1446. X$  mung   lev_comp.c lev_yacc.c
  1447. X$  rename lev_comp.h [-.include]lev_comp.h
  1448. X$
  1449. X$ ! process lev_comp.l into lev_lex.c
  1450. X$ if f$type(lex).eqs."STRING"
  1451. X$ then
  1452. X$  lex lev_comp.l
  1453. X$ else        ! use preprocessed file
  1454. X$  copy [-.sys.share]lev_lex.c []lex_yy.*
  1455. X$ endif
  1456. X$  mung   lex_yy.c lev_lex.c
  1457. X$
  1458. X$ ! process dgn_comp.y into dgn_yacc.c and ../include/dgn_comp.h
  1459. X$ if f$type(yacc).eqs."STRING"
  1460. X$ then
  1461. X$  yacc dgn_comp.y
  1462. X$  if f$search("y_tab.%").nes."" then  rename y_tab.% dgn_comp.*
  1463. X$  if f$search("ytab.%") .nes."" then  rename ytab.% dgn_comp.*
  1464. X$ else
  1465. X$  copy [-.sys.share]dgn_yacc.c,dgn_comp.h []dgn_comp.*
  1466. X$ endif
  1467. X$  mung   dgn_comp.c dgn_yacc.c
  1468. X$  rename dgn_comp.h [-.include]dgn_comp.h
  1469. X$
  1470. X$ ! process dgn_comp.l into dgn_lex.c
  1471. X$ if f$type(lex).eqs."STRING"
  1472. X$ then
  1473. X$  lex dgn_comp.l
  1474. X$ else
  1475. X$  copy [-.sys.share]dgn_lex.c []lex_yy.*
  1476. X$ endif
  1477. X$  mung   lex_yy.c dgn_lex.c
  1478. X$
  1479. X$ ! done
  1480. X$  set default 'cur_dir'
  1481. X$ exit
  1482. END_OF_FILE
  1483. if test 3015 -ne `wc -c <'sys/vms/spec_lev.com'`; then
  1484.     echo shar: \"'sys/vms/spec_lev.com'\" unpacked with wrong size!
  1485. fi
  1486. # end of 'sys/vms/spec_lev.com'
  1487. fi
  1488. if test -f 'util/dgn_main.c' -a "${1}" != "-c" ; then 
  1489.   echo shar: Will not clobber existing file \"'util/dgn_main.c'\"
  1490. else
  1491. echo shar: Extracting \"'util/dgn_main.c'\" \(3203 characters\)
  1492. sed "s/^X//" >'util/dgn_main.c' <<'END_OF_FILE'
  1493. X/*    SCCS Id: @(#)dgn_main.c 3.1    92/03/10    */
  1494. X/*    Copyright (c) 1989 by Jean-Christophe Collet    */
  1495. X/*    Copyright (c) 1990 by M. Stephenson        */
  1496. X/* NetHack may be freely redistributed.  See license for details. */
  1497. X
  1498. X/*
  1499. X * This file contains the main function for the parser
  1500. X * and some useful functions needed by yacc
  1501. X */
  1502. X
  1503. X#include "config.h"
  1504. X
  1505. X#ifdef MICRO
  1506. X# undef exit
  1507. X# ifndef AMIGA
  1508. Xextern void FDECL(exit, (int));
  1509. X# endif
  1510. X#endif
  1511. X
  1512. X#if defined(MICRO) && !defined(AMIGA)
  1513. X# define WRMODE "w+b"
  1514. X#else
  1515. X# define WRMODE "w+"
  1516. X#endif
  1517. X
  1518. X#ifdef MAC
  1519. X# ifdef applec
  1520. X#  define MPWTOOL
  1521. X#  include <CursorCtl.h>
  1522. X# endif
  1523. X#endif
  1524. X
  1525. X#ifndef MPWTOOL
  1526. X# define SpinCursor(x)
  1527. X#endif
  1528. X
  1529. X#define MAX_ERRORS    25
  1530. X
  1531. Xextern int line_number;
  1532. Xchar *fname = "(stdin)";
  1533. Xint fatal_error = 0;
  1534. X
  1535. Xint  FDECL (main, (int, char **));
  1536. Xint  NDECL (yyparse);
  1537. Xvoid FDECL (yyerror, (char *));
  1538. Xvoid FDECL (yywarning, (char *));
  1539. Xint  NDECL (yywrap);
  1540. Xvoid FDECL (init_yyin, (FILE *));
  1541. Xvoid FDECL (init_yyout, (FILE *));
  1542. X
  1543. X#ifdef AZTEC_36
  1544. XFILE *FDECL (freopen, (char *, char *, FILE *));
  1545. X#endif
  1546. X
  1547. Xint
  1548. Xmain(argc, argv)
  1549. Xint argc;
  1550. Xchar **argv;
  1551. X{
  1552. X    char    infile[64], outfile[64];
  1553. X    FILE    *fin, *fout;
  1554. X    int    i, len;
  1555. X#ifdef MAC_THINKC5
  1556. X    static char *mac_argv[] = {    "dgn_comp",    /* dummy argv[0] */
  1557. X                ":dat:dungeon.pdf"
  1558. X                };
  1559. X
  1560. X    argc = SIZE(mac_argv);
  1561. X    argv = mac_argv;
  1562. X#endif
  1563. X
  1564. X    if (argc == 1) {    /* Read standard input */
  1565. X        init_yyin(stdin);
  1566. X        init_yyout(stdout);
  1567. X        yyparse();
  1568. X    } else            /* Otherwise every argument is a filename */
  1569. X        for(i=1; i<argc; i++) {
  1570. X            fname = strcpy(infile, argv[i]);
  1571. X            len = strlen(fname) - 4;    /* length excluding suffix */
  1572. X            if (len < 0 || strncmp(".pdf", fname + len, 4)) {
  1573. X            fprintf(stderr,
  1574. X                "Error - file name \"%s\" in wrong format.\n",
  1575. X                fname);
  1576. X            continue;
  1577. X            }
  1578. X#ifdef VMS    /* make sure to avoid possible interaction with logical name */
  1579. X            len++;    /* retain "." as trailing punctuation */
  1580. X#endif
  1581. X            (void) strncpy(outfile, infile, len);
  1582. X            outfile[len] = '\0';
  1583. X
  1584. X            fin = freopen(infile, "r", stdin);
  1585. X            if (!fin) {
  1586. X            fprintf(stderr,"Can't open %s for input\n", infile);
  1587. X            perror(infile);
  1588. X            continue;
  1589. X            }
  1590. X            fout = freopen(outfile, WRMODE, stdout);
  1591. X            if (!fout) {
  1592. X            fprintf(stderr,"Can't open %s for output\n", outfile);
  1593. X            perror(outfile);
  1594. X            continue;
  1595. X            }
  1596. X            init_yyin(fin);
  1597. X            init_yyout(fout);
  1598. X            yyparse();
  1599. X            line_number = 1;
  1600. X            fatal_error = 0;
  1601. X        }
  1602. X#ifndef VMS
  1603. X    return 0;
  1604. X#else
  1605. X    return 1;       /* vms success */
  1606. X#endif /*VMS*/
  1607. X}
  1608. X
  1609. X/*
  1610. X * Each time the parser detects an error, it uses this function.
  1611. X * Here we take count of the errors. To continue farther than
  1612. X * MAX_ERRORS wouldn't be reasonable.
  1613. X */
  1614. X
  1615. Xvoid yyerror(s)
  1616. Xchar *s;
  1617. X{
  1618. X    fprintf(stderr,"%s : line %d : %s\n",fname,line_number, s);
  1619. X    if (++fatal_error > MAX_ERRORS) {
  1620. X        fprintf(stderr,"Too many errors, good bye!\n");
  1621. X        exit(1);
  1622. X    }
  1623. X}
  1624. X
  1625. X/*
  1626. X * Just display a warning (that is : a non fatal error)
  1627. X */
  1628. X
  1629. Xvoid yywarning(s)
  1630. Xchar *s;
  1631. X{
  1632. X    fprintf(stderr,"%s : line %d : WARNING : %s\n",fname,line_number,s);
  1633. X}
  1634. X
  1635. Xint yywrap()
  1636. X{
  1637. X    SpinCursor(3); /*    Don't know if this is a good place to put it ?
  1638. X                        Is it called for our grammar ? Often enough ?
  1639. X                        Too often ? -- h+ */
  1640. X       return 1;
  1641. X}
  1642. X
  1643. X/*dgn_main.c*/
  1644. END_OF_FILE
  1645. if test 3203 -ne `wc -c <'util/dgn_main.c'`; then
  1646.     echo shar: \"'util/dgn_main.c'\" unpacked with wrong size!
  1647. fi
  1648. # end of 'util/dgn_main.c'
  1649. fi
  1650. if test -f 'win/X11/NetHack.ad' -a "${1}" != "-c" ; then 
  1651.   echo shar: Will not clobber existing file \"'win/X11/NetHack.ad'\"
  1652. else
  1653. echo shar: Extracting \"'win/X11/NetHack.ad'\" \(3353 characters\)
  1654. sed "s/^X//" >'win/X11/NetHack.ad' <<'END_OF_FILE'
  1655. X! The display_file and tombstone windows should use a fixed width font ---
  1656. X! the text they display is formatted for a tty terminal.  For the same
  1657. X! reason, you may also also want a fixed-width font for the menu and text
  1658. X! windows.  However, the formatting is not nearly as critical.
  1659. X!
  1660. XNetHack*font:                variable
  1661. XNetHack*display_file*font:        fixed
  1662. XNetHack*tombstone*font:            fixed
  1663. X!NetHack*menu*font:            fixed
  1664. X!NetHack*text*font:            fixed
  1665. XNetHack*map*font:            nh10
  1666. X
  1667. X! The icon to use; supported values are nh72, nh56, and nh32; nh72 is the
  1668. X! default.  Some window managers may not support the larger icon sizes.
  1669. X! It is not guaranteed that the window manager will honor the icon selection.
  1670. X!NetHack*icon: nh56
  1671. X!
  1672. X! If True, a popup for y/n questions is _not_ used.
  1673. X!NetHack*slow: True
  1674. X!
  1675. X! If True, the message window has a line that seperates old and new messages.
  1676. X!NetHack*message_line: True
  1677. X!
  1678. X! If True, force keyboard to attach to popup windows.  Some window managers
  1679. X! enforce a click-to-focus-keyboard policy (e.g. the DECwindows wm).  NetHack
  1680. X! has a lot of popups and is almost unplayable without some kind of autofocus.
  1681. X!NetHack*autofocus: True
  1682. X!
  1683. X! Specify the number of rows and columns of the map window.  The default
  1684. X! is the standard 80x21 window.  Note: this _does_not_ change nethack's
  1685. X! level size, only what you see of it.
  1686. X!NetHack*map*rows:    21
  1687. X!NetHack*map*columns:    80
  1688. X
  1689. X! Parts of the fancy status display.
  1690. X!
  1691. XNetHack*status_condition.borderWidth:    0
  1692. XNetHack*status_info*borderWidth:    0
  1693. X
  1694. X! Sample color screen entries.
  1695. X!
  1696. XNetHack*nethack.background:     wheat
  1697. XNetHack*map*yellow:        gold
  1698. XNetHack*map*brown:        tan
  1699. XNetHack*map*grey:        grey85
  1700. XNetHack*map*foreground:        wheat
  1701. XNetHack*map*background:        grey40
  1702. X
  1703. XNetHack*fancy_status.background:    wheat
  1704. XNetHack*status_info*foreground:        Sienna
  1705. XNetHack*status_info*background:        wheat
  1706. XNetHack*status_info.background:        wheat
  1707. XNetHack*status_attributes*foreground:    black
  1708. XNetHack*status_attributes*background:    white
  1709. XNetHack*status_condition*foreground:    red
  1710. XNetHack*status_condition*background:    wheat
  1711. XNetHack*Scrollbar*foreground:        Sienna
  1712. XNetHack*Scrollbar*background:        wheat
  1713. X
  1714. XNetHack*player_selection*random.borderColor:    blue
  1715. XNetHack*player_selection*random.foreground:    blue
  1716. XNetHack*player_selection*quit.borderColor:    blue
  1717. XNetHack*player_selection*quit.foreground:    blue
  1718. XNetHack*player_selection*Command.borderColor:    red
  1719. XNetHack*player_selection*Command.foreground:    red
  1720. X
  1721. XNetHack*extended_commands*dismiss.borderColor:    blue
  1722. XNetHack*extended_commands*dismiss.foreground:    blue
  1723. XNetHack*extended_commands*help.borderColor:    blue
  1724. XNetHack*extended_commands*help.foreground:    blue
  1725. XNetHack*extended_commands*Command.borderColor:    red
  1726. XNetHack*extended_commands*Command.foreground:    red
  1727. X!
  1728. X!
  1729. X! The following are the default 15 colors that the nethack map uses.
  1730. X! If they don't look good on your screen, change them.
  1731. X!
  1732. X! The foreground color is used as "no color".
  1733. X!
  1734. X!NetHack*map*black:        "black"
  1735. X!NetHack*map*red:        "red"
  1736. X!NetHack*map*green:        "pale green"
  1737. X!NetHack*map*brown:        "brown"
  1738. X!NetHack*map*blue:        "blue"
  1739. X!NetHack*map*magenta:        "magenta"
  1740. X!NetHack*map*cyan:        "light cyan"
  1741. X!NetHack*map*gray:        "gray"
  1742. X!NetHack*map*orange:        "orange"
  1743. X!NetHack*map*bright_green:    "green"
  1744. X!NetHack*map*yellow:        "yellow"
  1745. X!NetHack*map*bright_blue:    "royal blue"
  1746. X!NetHack*map*bright_magenta:    "violet"
  1747. X!NetHack*map*bright_cyan:    "cyan"
  1748. X!NetHack*map*white:        "white"
  1749. END_OF_FILE
  1750. if test 3353 -ne `wc -c <'win/X11/NetHack.ad'`; then
  1751.     echo shar: \"'win/X11/NetHack.ad'\" unpacked with wrong size!
  1752. fi
  1753. # end of 'win/X11/NetHack.ad'
  1754. fi
  1755. if test -f 'win/X11/winval.c' -a "${1}" != "-c" ; then 
  1756.   echo shar: Will not clobber existing file \"'win/X11/winval.c'\"
  1757. else
  1758. echo shar: Extracting \"'win/X11/winval.c'\" \(3531 characters\)
  1759. sed "s/^X//" >'win/X11/winval.c' <<'END_OF_FILE'
  1760. X/*    SCCS Id: @(#)winval.c    3.1    92/3/7
  1761. X/* Copyright (c) Dean Luick, 1992                  */
  1762. X/* NetHack may be freely redistributed.  See license for details. */
  1763. X
  1764. X/*
  1765. X * Routines that define a name-value label widget pair that fit inside a
  1766. X * form widget.
  1767. X */
  1768. X#include <stdio.h>
  1769. X#include <X11/Intrinsic.h>
  1770. X#include <X11/StringDefs.h>
  1771. X#include <X11/Xaw/Label.h>
  1772. X#include <X11/Xaw/Form.h>
  1773. X#include <X11/Xaw/Cardinals.h>
  1774. X
  1775. X#include "config.h"    /* #define for const for non __STDC__ compilers */
  1776. X
  1777. X#define NAME "name"
  1778. X#define VALUE "value"
  1779. X
  1780. X
  1781. XWidget
  1782. Xcreate_value(parent, name_value)
  1783. X    Widget parent;
  1784. X    const char *name_value;
  1785. X{
  1786. X    Widget form, name;
  1787. X    Arg args[8];
  1788. X    Cardinal num_args;
  1789. X
  1790. X    num_args = 0;
  1791. X    XtSetArg(args[num_args], XtNborderWidth, 0);        num_args++;
  1792. X    XtSetArg(args[num_args], XtNdefaultDistance, 0);        num_args++;
  1793. X    form = XtCreateManagedWidget(name_value,
  1794. X                formWidgetClass,
  1795. X                parent, args, num_args);
  1796. X
  1797. X    num_args = 0;
  1798. X    XtSetArg(args[num_args], XtNjustify, XtJustifyRight);    num_args++;
  1799. X    XtSetArg(args[num_args], XtNborderWidth, 0);        num_args++;
  1800. X    XtSetArg(args[num_args], XtNlabel, name_value);        num_args++;
  1801. X    XtSetArg(args[num_args], XtNinternalHeight, 0);        num_args++;
  1802. X    name = XtCreateManagedWidget(NAME,
  1803. X                labelWidgetClass,
  1804. X                form, args, num_args);
  1805. X
  1806. X    num_args = 0;
  1807. X    XtSetArg(args[num_args], XtNjustify, XtJustifyRight);    num_args++;
  1808. X    XtSetArg(args[num_args], XtNborderWidth, 0);        num_args++;
  1809. X    XtSetArg(args[num_args], XtNfromHoriz, name);        num_args++;
  1810. X    XtSetArg(args[num_args], XtNinternalHeight, 0);        num_args++;
  1811. X    (void) XtCreateManagedWidget(VALUE,
  1812. X                labelWidgetClass,
  1813. X                form, args, num_args);
  1814. X    return form;
  1815. X}
  1816. X
  1817. Xvoid
  1818. Xset_name(w, new_label)
  1819. X    Widget w;
  1820. X    char *new_label;
  1821. X{
  1822. X    Arg args[1];
  1823. X    Widget name;
  1824. X
  1825. X    name = XtNameToWidget(w, NAME);
  1826. X    XtSetArg(args[0], XtNlabel, new_label);
  1827. X    XtSetValues(name, args, ONE);
  1828. X}
  1829. X
  1830. Xvoid
  1831. Xset_name_width(w, new_width)
  1832. X    Widget w;
  1833. X    int new_width;
  1834. X{
  1835. X    Arg args[1];
  1836. X    Widget name;
  1837. X
  1838. X    name = XtNameToWidget(w, NAME);
  1839. X    XtSetArg(args[0], XtNwidth, new_width);
  1840. X    XtSetValues(name, args, ONE);
  1841. X}
  1842. X
  1843. Xint
  1844. Xget_name_width(w)
  1845. X    Widget w;
  1846. X{
  1847. X    Arg args[1];
  1848. X    Dimension width;
  1849. X    Widget name;
  1850. X
  1851. X    name = XtNameToWidget(w, NAME);
  1852. X    XtSetArg(args[0], XtNwidth, &width);
  1853. X    XtGetValues(name, args, ONE);
  1854. X    return (int) width;
  1855. X}
  1856. X
  1857. X
  1858. Xvoid
  1859. Xset_value(w, new_value)
  1860. X    Widget w;
  1861. X    const char *new_value;
  1862. X{
  1863. X    Arg args[1];
  1864. X    Widget val;
  1865. X    
  1866. X    val = XtNameToWidget(w, VALUE);
  1867. X    XtSetArg(args[0], XtNlabel, new_value);
  1868. X    XtSetValues(val, args, ONE);
  1869. X}
  1870. X
  1871. Xvoid
  1872. Xset_value_width(w, new_width)
  1873. X    Widget w;
  1874. X    int new_width;
  1875. X{
  1876. X    Arg args[1];
  1877. X    Widget val;
  1878. X    
  1879. X    val = XtNameToWidget(w, VALUE);
  1880. X    XtSetArg(args[0], XtNwidth, new_width);
  1881. X    XtSetValues(val, args, ONE);
  1882. X}
  1883. X
  1884. Xint
  1885. Xget_value_width(w)
  1886. X    Widget w;
  1887. X{
  1888. X    Arg args[1];
  1889. X    Widget val;
  1890. X    Dimension width;
  1891. X
  1892. X    val = XtNameToWidget(w, VALUE);
  1893. X    XtSetArg(args[0], XtNwidth, &width);
  1894. X    XtGetValues(val, args, ONE);
  1895. X    return (int) width;
  1896. X}
  1897. X
  1898. X/* Swap foreground and background colors (this is the best I can do with */
  1899. X/* a label widget, unless I can get some init hook in there).         */
  1900. Xvoid
  1901. Xhilight_value(w)
  1902. X    Widget w;
  1903. X{
  1904. X    Arg args[2];
  1905. X    Widget val;
  1906. X    Pixel fg, bg;
  1907. X
  1908. X    val = XtNameToWidget(w, VALUE);
  1909. X    XtSetArg(args[0], XtNforeground, &fg);
  1910. X    XtSetArg(args[1], XtNbackground, &bg);
  1911. X    XtGetValues(val, args, TWO);
  1912. X
  1913. X    XtSetArg(args[0], XtNforeground, bg);
  1914. X    XtSetArg(args[1], XtNbackground, fg);
  1915. X    XtSetValues(val, args, TWO);
  1916. X}
  1917. X
  1918. END_OF_FILE
  1919. if test 3531 -ne `wc -c <'win/X11/winval.c'`; then
  1920.     echo shar: \"'win/X11/winval.c'\" unpacked with wrong size!
  1921. fi
  1922. # end of 'win/X11/winval.c'
  1923. fi
  1924. echo shar: End of archive 105 \(of 108\).
  1925. cp /dev/null ark105isdone
  1926. MISSING=""
  1927. for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 \
  1928. 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 \
  1929. 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 \
  1930. 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 \
  1931. 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 \
  1932. 101 102 103 104 105 106 107 108 ; do
  1933.     if test ! -f ark${I}isdone ; then
  1934.     MISSING="${MISSING} ${I}"
  1935.     fi
  1936. done
  1937. if test "${MISSING}" = "" ; then
  1938.     echo You have unpacked all 108 archives.
  1939.     echo "Now execute 'rebuild.sh'"
  1940.     rm -f ark10[0-8]isdone ark[1-9]isdone ark[1-9][0-9]isdone
  1941. else
  1942.     echo You still need to unpack the following archives:
  1943.     echo "        " ${MISSING}
  1944. fi
  1945. ##  End of shell archive.
  1946. exit 0
  1947.