home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / games / volume10 / nethack3p9 / part33 < prev    next >
Internet Message Format  |  1990-07-27  |  61KB

  1. Path: uunet!mailrus!cornell!uw-beaver!zephyr.ens.tek.com!tekred!saab!billr
  2. From: billr@saab.CNA.TEK.COM (Bill Randle)
  3. Newsgroups: comp.sources.games
  4. Subject: v10i078:  nethack3p9 -  display oriented dungeons & dragons (Ver. 3.0i), Part33/56
  5. Message-ID: <5936@tekred.CNA.TEK.COM>
  6. Date: 12 Jul 90 16:07:08 GMT
  7. Sender: news@tekred.CNA.TEK.COM
  8. Lines: 2081
  9. Approved: billr@saab.CNA.TEK.COM
  10.  
  11. Submitted-by: Izchak Miller <izchak@linc.cis.upenn.edu>
  12. Posting-number: Volume 10, Issue 78
  13. Archive-name: nethack3p9/Part33
  14. Supersedes: NetHack3: Volume 7, Issue 56-93
  15.  
  16.  
  17.  
  18. #! /bin/sh
  19. # This is a shell archive.  Remove anything before this line, then unpack
  20. # it by saving it into a file and typing "sh file".  To overwrite existing
  21. # files, type "sh file -c".  You can also feed this as standard input via
  22. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  23. # will see the following message at the end:
  24. #        "End of archive 33 (of 56)."
  25. # Contents:  include/def_os2.h mac/mac.c others/Makefile.ovl
  26. # Wrapped by billr@saab on Wed Jul 11 17:11:41 1990
  27. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  28. if test -f 'include/def_os2.h' -a "${1}" != "-c" ; then 
  29.   echo shar: Will not clobber existing file \"'include/def_os2.h'\"
  30. else
  31. echo shar: Extracting \"'include/def_os2.h'\" \(2615 characters\)
  32. sed "s/^X//" >'include/def_os2.h' <<'END_OF_FILE'
  33. X/*    SCCS Id: @(#)def_os2.h    3.0    89/08/13
  34. X
  35. X/*  OS/2 defines based on MSC 5.1 OS/2 include files.
  36. X    Only a small portion of all OS/2 defines are needed,
  37. X    so the actual include files are not used.
  38. X
  39. X    Timo Hakulinen
  40. X */
  41. X
  42. X#define APIENTRY pascal far
  43. X
  44. X#define CHAR    char        /* ch  */
  45. X#define SHORT    int        /* s   */
  46. X#define LONG    long        /* l   */
  47. X#define INT    int        /* i   */
  48. X
  49. Xtypedef unsigned char UCHAR;    /* uch */
  50. Xtypedef unsigned int  USHORT;    /* us  */
  51. Xtypedef unsigned long ULONG;    /* ul  */
  52. Xtypedef unsigned int  UINT;    /* ui  */
  53. X
  54. Xtypedef unsigned char BYTE;    /* b   */
  55. Xtypedef BYTE   far *PBYTE;
  56. X
  57. Xtypedef unsigned short    SHANDLE;
  58. Xtypedef SHANDLE     HKBD;
  59. Xtypedef SHANDLE     HVIO;
  60. Xtypedef SHANDLE     HDIR;    /* hdir */
  61. Xtypedef HDIR far *PHDIR;
  62. X
  63. Xtypedef USHORT far *PUSHORT;
  64. Xtypedef char far *PSZ;
  65. X
  66. Xtypedef struct {
  67. X    UCHAR  chChar;
  68. X    UCHAR  chScan;
  69. X    UCHAR  fbStatus;
  70. X    UCHAR  bNlsShift;
  71. X    USHORT fsState;
  72. X    ULONG  time;
  73. X} KBDKEYINFO;
  74. Xtypedef KBDKEYINFO far *PKBDKEYINFO;
  75. X
  76. X/* File time and date types */
  77. X
  78. Xtypedef struct _FTIME {     /* ftime */
  79. X    unsigned twosecs : 5;
  80. X    unsigned minutes : 6;
  81. X    unsigned hours   : 5;
  82. X} FTIME;
  83. Xtypedef FTIME far *PFTIME;
  84. X
  85. Xtypedef struct _FDATE {     /* fdate */
  86. X    unsigned day     : 5;
  87. X    unsigned month   : 4;
  88. X    unsigned year    : 7;
  89. X} FDATE;
  90. Xtypedef FDATE far *PFDATE;
  91. X
  92. Xtypedef struct _FILEFINDBUF {    /* findbuf */
  93. X    FDATE  fdateCreation;
  94. X    FTIME  ftimeCreation;
  95. X    FDATE  fdateLastAccess;
  96. X    FTIME  ftimeLastAccess;
  97. X    FDATE  fdateLastWrite;
  98. X    FTIME  ftimeLastWrite;
  99. X    ULONG  cbFile;
  100. X    ULONG  cbFileAlloc;
  101. X    USHORT attrFile;
  102. X    UCHAR  cchName;
  103. X    CHAR   achName[13];
  104. X} FILEFINDBUF;
  105. Xtypedef FILEFINDBUF far *PFILEFINDBUF;
  106. X
  107. X/* KBDINFO structure, for KbdSet/GetStatus */
  108. Xtypedef struct _KBDINFO {    /* kbst */
  109. X    USHORT cb;
  110. X    USHORT fsMask;
  111. X    USHORT chTurnAround;
  112. X    USHORT fsInterim;
  113. X    USHORT fsState;
  114. X} KBDINFO;
  115. Xtypedef KBDINFO far *PKBDINFO;
  116. X
  117. X/* VIOMODEINFO structure, for VioGetMode */
  118. Xtypedef struct _VIOMODEINFO {
  119. X    USHORT cb;
  120. X    UCHAR  fbType;
  121. X    UCHAR  color;
  122. X    USHORT col;
  123. X    USHORT row;
  124. X    USHORT hres;
  125. X    USHORT vres;
  126. X    UCHAR  fmt_ID;
  127. X    UCHAR  attrib;
  128. X} VIOMODEINFO;
  129. Xtypedef VIOMODEINFO far *PVIOMODEINFO;
  130. X
  131. X/* OS2 API functions */
  132. X
  133. XUSHORT APIENTRY KbdGetStatus(PKBDINFO, HKBD);
  134. XUSHORT APIENTRY KbdSetStatus(PKBDINFO, HKBD);
  135. XUSHORT APIENTRY KbdCharIn(PKBDKEYINFO, USHORT, HKBD );
  136. XUSHORT APIENTRY DosQFSInfo(USHORT, USHORT, PBYTE, USHORT);
  137. XUSHORT APIENTRY DosFindFirst(PSZ, PHDIR, USHORT, PFILEFINDBUF, USHORT, PUSHORT, ULONG);
  138. XUSHORT APIENTRY DosFindNext(HDIR, PFILEFINDBUF, USHORT, PUSHORT);
  139. XUSHORT APIENTRY DosSelectDisk(USHORT);
  140. XUSHORT APIENTRY VioGetMode(PVIOMODEINFO, HVIO);
  141. XUSHORT APIENTRY VioSetCurPos(USHORT, USHORT, HVIO);
  142. END_OF_FILE
  143. if test 2615 -ne `wc -c <'include/def_os2.h'`; then
  144.     echo shar: \"'include/def_os2.h'\" unpacked with wrong size!
  145. fi
  146. # end of 'include/def_os2.h'
  147. fi
  148. if test -f 'mac/mac.c' -a "${1}" != "-c" ; then 
  149.   echo shar: Will not clobber existing file \"'mac/mac.c'\"
  150. else
  151. echo shar: Extracting \"'mac/mac.c'\" \(28936 characters\)
  152. sed "s/^X//" >'mac/mac.c' <<'END_OF_FILE'
  153. X/*    SCCS Id: @(#)mac.c    3.0    88/08/05
  154. X/*      Copyright (c) Johnny Lee  1989    */ 
  155. X/* NetHack may be freely redistributed.  See license for details. */
  156. X
  157. X/*    Source file for character I/O and miscellaneous */
  158. X/*    user interface routines for the macintosh */
  159. X
  160. X#include    "hack.h"
  161. X
  162. X/* Global variables */
  163. XWindowPtr    HackWindow;    /* points to Hack's window */
  164. Xextern char    *keys[8];
  165. Xextern short macflags;
  166. Xextern long lowMemLimit;
  167. Xshort cursorPos=0;
  168. Xshort repDelay;
  169. Xlong lastMD;
  170. Xlong segments = SEG_DO;
  171. Xextern short altCurs; /* should be a macflag */
  172. X
  173. Xint
  174. Xtgetch()
  175. X
  176. X{
  177. X    char    ch;
  178. X    EventRecord    theEvent;
  179. X    Rect cursorRect,box,windowRect;
  180. X    long    message,cursorTime,start;
  181. X    MenuHandle    theMenu;
  182. X    register short    keyCode;
  183. X    short    temp;
  184. X    term_info    *t;
  185. X    GrafPtr    oldPort,oldPort1;
  186. X    static char nextCommand;
  187. X    short aboutBox();
  188. X    char mButtonDown();
  189. X    Point    mouseLoc;
  190. X    WindowPtr    theWindow;
  191. X    void    doUpdate();
  192. X#define    clearKey    0x47
  193. X#define ESCAPEkey    0x1B
  194. X    static int see, saw = 0;
  195. X    int eye, cursOff = 100;
  196. X    boolean cursRectInv;    /* should be a macflag */
  197. X    short    fInFront = TRUE;
  198. X
  199. X    t = (term_info *)GetWRefCon(HackWindow);
  200. X    mouseLoc.h = (macflags & fMoveWRTMouse) ? t->tcur_x : (u.ux-1);
  201. X    mouseLoc.v = (macflags & fMoveWRTMouse) ? t->tcur_y : (u.uy+1);
  202. X    cursorRect.left = t->tcur_x * t->charWidth + Screen_Border;
  203. X    cursorRect.right = cursorRect.left + t->charWidth - 1;
  204. X    cursorRect.top = t->height * t->tcur_y + Screen_Border;
  205. X    cursorRect.bottom = cursorRect.top + t->height - 1;
  206. X    cursorTime = GetCaretTime();
  207. X    box.left = mouseLoc.h * t->charWidth + Screen_Border - 1;
  208. X    box.right = box.left + t->charWidth + 2;
  209. X    box.top = mouseLoc.v * t->height + Screen_Border - 1;
  210. X    box.bottom = box.top + t->height + 2;
  211. X    /* permit use of cursor keys and numeric keypad */
  212. X    /* does the same translation as in msdos.c but includes cursor keys */
  213. X    ch = '\0';
  214. X    /* handle extended command from menu */
  215. X    if (nextCommand && (macflags & (fExtCmdSeq1 | fExtCmdSeq2 | fExtCmdSeq3))) {
  216. X        if (macflags & fExtCmdSeq1) {
  217. X        ch = '#';
  218. X        macflags = macflags ^ (fExtCmdSeq1 | fExtCmdSeq2);
  219. X        } else if (macflags & fExtCmdSeq2) {
  220. X        ch = nextCommand;
  221. X        macflags = macflags ^ (fExtCmdSeq2 | fExtCmdSeq3);
  222. X        if (!(macflags & fExtCmdSeq3))
  223. X            nextCommand = '\0';
  224. X        } else if (macflags & fExtCmdSeq3) {
  225. X        ch = '\r';
  226. X        macflags &= ~fExtCmdSeq3;
  227. X        }
  228. X    }
  229. X    GetPort(&oldPort);
  230. X    SetPort(HackWindow);
  231. X    if (!(macflags & fDoNonKeyEvt)) {
  232. X        cursorPos = -1;
  233. X        if (! flags.wantspace) SetCursor(&ARROW_CURSOR);
  234. X    }
  235. X    /* initialize cursor blinking */
  236. X    message = TickCount();
  237. X    cursRectInv = FALSE;
  238. X    while (!ch) {
  239. X        (void)WaitNextEvent(everyEvent, &theEvent, (fInFront) ? 0L : 50L, 0L);
  240. X        if (theEvent.what == keyDown || theEvent.what == autoKey) {
  241. X            ch = 0;
  242. X            ObscureCursor();
  243. X            /* use raw key codes */
  244. X            keyCode = (LoWord(theEvent.message) & keyCodeMask)>>8;
  245. X             if (keyCode == clearKey) {
  246. X                macflags = macflags ^ fToggleNumPad;
  247. X                SetWTitle(HackWindow,
  248. X                    (macflags & fToggleNumPad)    ? "\016NetHack [MOVE]"
  249. X                                                : "\015NetHack [NUM]");
  250. X                ch = 0;
  251. X                continue;
  252. X            }
  253. X            if ((macflags & fToggleNumPad) && (keyCode>0x40 &&keyCode < 0x5D) 
  254. X                || (keyCode > 0x7A && keyCode<0x7F)) {
  255. X                ch = t->keyMap[keyCode-65];
  256. X                if ((theEvent.modifiers & shiftKey) && (ch)) {
  257. X                    ch = (ch == '.') ? ':' : (char)toupper(ch);
  258. X                }
  259. X                if (ch)
  260. X                    break;
  261. X            }
  262. X            if (t->system.keyBoardType < 4 && keyCode == 50) {
  263. X                ch = (char)ESCAPEkey;    /* ESC */
  264. X                break;
  265. X            }            /* make the command key = control key on all non-adb keyboards
  266. X                         Now, LEAVE it this way ! Otherwise you'll render non-us
  267. Xkeyboards useless, since here is where "<" and ">" are located */
  268. X            if ((theEvent.message & 0xFF) == 0x60) {
  269. X                ch = (char)ESCAPEkey;
  270. X                break;
  271. X            } /* This is the way to fix backquote->esc for all macs */
  272. X            if (theEvent.modifiers & cmdKey) {
  273. X                ch = (char)(theEvent.message & 0x1F);
  274. X                if(ch == ('Q' & 0x1F)) ch = 'Q'; /* For Quit */
  275. X                break;
  276. X            }
  277. X            if (theEvent.modifiers & optionKey) {
  278. X                for(start = 43; start < 56; start++) {
  279. X                    if (t->keyMap[start] == (char)(theEvent.message & 0xFFL)) {
  280. X                        ch = t->keyMap[start - 13];
  281. X                        break;
  282. X                    }
  283. X                }
  284. X            }
  285. X            /* not a cursor key or from the numeric keypad */
  286. X            if (!ch) {
  287. X                ch = (char)(theEvent.message & 0xFF);
  288. X            }
  289. X        } else {
  290. X        /* what other events to handle */
  291. X            switch (theEvent.what) {        
  292. X            case nullEvent:
  293. X                if (!fInFront)
  294. X                    break;
  295. X                GetPort(&oldPort1);
  296. X                SetPort((GrafPtr)HackWindow);
  297. X                /* wait until something occurs */
  298. X                if ((TickCount() > message) && (FrontWindow() == HackWindow)) {
  299. X                    message = TickCount() + cursorTime;
  300. X                    InvertRect(&cursorRect);
  301. X                    cursRectInv = !cursRectInv;
  302. X                }
  303. X                if (FrontWindow() == HackWindow && (macflags & fDoNonKeyEvt)) {
  304. X                    if ((FindWindow(theEvent.where,&theWindow) == inContent)
  305. X                        && (macflags & fDoUpdate) && (HackWindow == theWindow)) {
  306. X                        
  307. X                        GetMouse(&mouseLoc);
  308. X                        if (PtInRect(mouseLoc,&box)) {
  309. X                            temp = 8;
  310. X                        } else {
  311. X                            PtToAngle(&box,mouseLoc,&temp);
  312. X                            temp = ((temp + 22) / 45) % 8;    /* 0=N, 1=NE ... 7=NW */
  313. X                        }
  314. X                        /* since we're not doing anything let's look at the cursor */
  315. X                        if (altCurs) {    /* this list is prioritized! */
  316. X                            if (Sick) {
  317. X                                cursOff = 130;    /* offset for CURS resource set */
  318. X                                see = SICK;
  319. X                            } else if (Blind) {
  320. X                                cursOff = 120;
  321. X                                see = BLINDED;
  322. X                            } else if (Hallucination) {
  323. X                                cursOff = 110;
  324. X                                see = HALLUC;
  325. X                            } else if (Confusion || Stunned) {
  326. X                                see = CONFUSION;
  327. X                            } else {
  328. X                                cursOff = 100;
  329. X                                see = 0;
  330. X                            }
  331. X                        } else {
  332. X                            see = (Confusion || Stunned) ? CONFUSION : 0;
  333. X                            cursOff = 100;
  334. X                        }
  335. X                        if ((cursorPos != temp) || (see != saw)) {
  336. X                            if (see != saw) {
  337. X                                switch(see) {
  338. X                                case CONFUSION:
  339. X                                    break;
  340. X                                default:    /* hmm, a bit much for !altCurs */
  341. X                                    for (eye=0; eye<=8; eye++) {
  342. X                                        EmptyHandle(t->cursor[eye]);
  343. X                                        t->cursor[eye] = GetCursor(eye+cursOff);
  344. X                                        HNoPurge(t->cursor[eye]);
  345. X                                    }
  346. X                                    break;
  347. X                                }
  348. X                                saw = see;
  349. X                            }
  350. X                            cursorPos = temp;
  351. X                            eye = (Confusion || Stunned) ? rn2(9) : temp;
  352. X                            SetCursor(*t->cursor[eye]);
  353. X                        }
  354. X                    } else if (cursorPos>=0) {
  355. X                        cursorPos = -1;
  356. X                        SetCursor(&ARROW_CURSOR);
  357. X                    }
  358. X                }
  359. X                if (StillDown() && cursorPos>=0 && cursorPos < 8
  360. X                    && TickCount() > lastMD+repDelay) {
  361. X                    ch = mButtonDown(theEvent, t, &nextCommand);
  362. X                    if (repDelay) {
  363. X#ifdef THINK_C
  364. X                        repDelay = KeyRepThresh;
  365. X#else
  366. X                        repDelay /= 3;
  367. X#endif
  368. X                    }
  369. X                    lastMD = TickCount();
  370. X                    /*return ch;*/
  371. X                }            
  372. X                SetPort(oldPort1);
  373. X                break;
  374. X            case app4Evt:
  375. X#define    kSuspendResumeMessage    1        /* high byte of suspend/resume event message */
  376. X#define    kMouseMovedMessage        0xFA    /* high byte of mouse-moved event message */
  377. X#define    SuspResIsResume(evtMessage)        ((evtMessage) & 0x00000001)
  378. X
  379. X                switch (theEvent.message >> 24) {
  380. X                    case kSuspendResumeMessage:
  381. X                        if (!SuspResIsResume(theEvent.message)) {
  382. X                        /* ---------- SUSPEND EVENT ------------ */
  383. X                            fInFront = FALSE;
  384. X                            if (macflags & fZoomOnContextSwitch
  385. X                                && !EmptyRect(&(**(HackWindow)->visRgn).rgnBBox))
  386. X                            {
  387. X                                InvalRect(&HackWindow->portRect);
  388. X                                SizeWindow(HackWindow,60,60,FALSE);
  389. X                            }
  390. X                        } else {
  391. X                        /* ---------- RESUME EVENT ------------- */
  392. X                            fInFront = TRUE;
  393. X                            if (macflags & fZoomOnContextSwitch) {
  394. X                                SizeWindow(HackWindow,
  395. X                                 (t->maxCol * t->charWidth) + 2 * Screen_Border,
  396. X                                 (t->maxRow * t->height) + 2 * Screen_Border,
  397. X                                 TRUE);
  398. X                                SetPort(HackWindow);
  399. X                                InvalRect(&HackWindow->portRect);
  400. X                                if ((int) (theMenu = GetMHandle(editMenu))
  401. X                                    && FrontWindow() == HackWindow) {
  402. X                                    SetMenuBar(t->fullMBarHandle);
  403. X                                    for (temp = fileMenu;temp <= extendMenu;temp++) {
  404. X                                    if (temp != editMenu)
  405. X                                        EnableItem(GetMHandle(temp), 0);
  406. X                                    }
  407. X                                    EnableItem(GetMHandle(appleMenu), 1);
  408. X                                    DisableItem(theMenu, 0);
  409. X                                    DrawMenuBar();
  410. X                                }
  411. X                            }
  412. X                        }
  413. X                        break;
  414. X                }
  415. X                break;
  416. X        
  417. X            case updateEvt:
  418. X                if (HackWindow == (WindowPtr)theEvent.message) {
  419. X                    doUpdate(t);
  420. X                    if (cursRectInv) InvertRect(&cursorRect);    /* restore cursor */
  421. X                }
  422. X                break;
  423. X                
  424. X            case activateEvt:
  425. X                if (HackWindow == (WindowPtr)theEvent.message) {
  426. X                    if (theMenu = GetMHandle(editMenu)) {
  427. X                        if (theEvent.modifiers & activeFlag) {
  428. X                            if (macflags & fDoUpdate) {
  429. X                                SetMenuBar(t->fullMBarHandle);
  430. X                                for (temp = fileMenu;temp <= extendMenu;temp++) {
  431. X                                    if (temp != editMenu)
  432. X                                        EnableItem(GetMHandle(temp), 0);
  433. X                                }
  434. X                                EnableItem(GetMHandle(appleMenu), 1);
  435. X                            }
  436. X                            DisableItem(theMenu, 0);
  437. X                        } else {
  438. X                            EnableItem(theMenu, 0);
  439. X                            if (macflags & fDoUpdate) {
  440. X                                SetMenuBar(t->shortMBarHandle);
  441. X                                for (temp = fileMenu;temp <= extendMenu;temp++) {
  442. X                                    if (temp != editMenu)
  443. X                                        DisableItem(GetMHandle(temp), 0);
  444. X                                }
  445. X                                DisableItem(GetMHandle(appleMenu), 1);
  446. X                            }
  447. X                        }
  448. X                        DrawMenuBar();
  449. X                    }
  450. X                }
  451. X                break;
  452. X                
  453. X            case mouseDown:
  454. X                ch = mButtonDown(theEvent, t, &nextCommand);
  455. X#ifdef THINK_C
  456. X                repDelay = KeyThresh;
  457. X#else
  458. X                repDelay = 42;
  459. X#endif
  460. X                lastMD = theEvent.when;
  461. X                break;
  462. X            }
  463. X        }        
  464. X    }
  465. X    if (cursRectInv) InvertRect(&cursorRect);
  466. X
  467. X    SetPort(oldPort);
  468. X    return ((ch == '\r') ? '\n' : ch);
  469. X}
  470. X
  471. Xvoid
  472. XdoUpdate(t)
  473. Xterm_info    *t;
  474. X{
  475. X    register short    temp;
  476. X    GrafPtr    oldPort;
  477. X    register    short i,j;
  478. X    register char    attr, *p;
  479. X#ifdef TEXTCOLOR
  480. X    if (t->system.hasColorQD) {
  481. X        Rect    r;
  482. X        GDHandle    gd;
  483. X        
  484. X        r = (**(*(WindowPeek)HackWindow).contRgn).rgnBBox;
  485. X        LocalToGlobal(&r.top);
  486. X        LocalToGlobal(&r.bottom);
  487. X        gd = GetMaxDevice(&r);
  488. X        HLock((Handle)gd);
  489. X        t->inColor = (**(**gd).gdPMap).pixelSize > 1;
  490. X        HUnlock((Handle)gd);
  491. X    }
  492. X#endif
  493. X    GetPort(&oldPort);
  494. X    SetPort((GrafPtr)HackWindow);
  495. X    BeginUpdate(HackWindow);
  496. X    ForeColor(t->color[0]);
  497. X    BackColor(t->color[7]);
  498. X    for (i = 0; i<t->maxRow; i++) {
  499. X        p = t->scrAttr[i];
  500. X        for (j = temp = 0, attr = *p; j<t->maxCol; j +=1, p++) {
  501. X            if (*p != attr) {
  502. X                MoveTo(Screen_Border + temp*t->charWidth,
  503. X                    t->ascent + (i * t->height) +
  504. X                    Screen_Border);
  505. X                if (attr & 0x80) {
  506. X                    ForeColor(t->color[7]);
  507. X                    BackColor(t->color[0]);
  508. X                } else if (t->inColor) {
  509. X                    ForeColor(t->color[attr]);
  510. X                     /* yellow fgnd hard to see on white bgnd */
  511. X                     /* so change to green background */
  512. X                    switch(attr) {
  513. X                    case BROWN:
  514. X                        BackColor(t->color[GREEN]);
  515. X                        break;
  516. X                    case BLUE:
  517. X                        BackColor(t->color[CYAN]);
  518. X                        break;
  519. X                    case CYAN:
  520. X                        BackColor(t->color[BLUE]);
  521. X                        break;
  522. X                    default:
  523. X                        BackColor(t->color[7]);
  524. X                           break;
  525. X                    }
  526. X                } else {
  527. X                    ForeColor(t->color[0]);
  528. X                    BackColor(t->color[7]);
  529. X                }
  530. X                DrawText(&(t->screen[i][temp]), 0, j - temp);
  531. X                temp = j;
  532. X                attr = *p;
  533. X            } /* if */
  534. X        } /* for j */
  535. X        if (temp != t->maxCol) {
  536. X            MoveTo(Screen_Border + temp*t->charWidth,
  537. X                t->ascent + (i * t->height) +
  538. X                Screen_Border);
  539. X            if (attr & 0x80) {
  540. X                ForeColor(t->color[7]);
  541. X                BackColor(t->color[0]);
  542. X            } else if (t->inColor) {
  543. X                ForeColor(t->color[attr]);
  544. X                 /* yellow fgnd hard to see on white bgnd */
  545. X                 /* so change to green background */
  546. X                switch(attr) {
  547. X                case BROWN:
  548. X                    BackColor(t->color[GREEN]);
  549. X                    break;
  550. X                case BLUE:
  551. X                    BackColor(t->color[CYAN]);
  552. X                    break;
  553. X                case CYAN:
  554. X                    BackColor(t->color[BLUE]);
  555. X                    break;
  556. X                default:
  557. X                    BackColor(t->color[7]);
  558. X                       break;
  559. X                }
  560. X            } else {
  561. X                ForeColor(t->color[0]);
  562. X                BackColor(t->color[7]);
  563. X            }
  564. X            DrawText(&(t->screen[i][temp]), 0, j - temp);
  565. X        } /* if */
  566. X    } /* for i */
  567. X    EndUpdate(HackWindow);
  568. X    SetPort(oldPort);
  569. X}
  570. X
  571. Xchar
  572. XmButtonDown(theEvent, t, nextCommand)
  573. XEventRecord    theEvent;
  574. Xterm_info    *t;
  575. Xchar    *nextCommand;
  576. X{
  577. X    Rect    boundsRect;
  578. X    WindowPtr    theWindow;
  579. X    long    message;
  580. X    char    deskacc[256];
  581. X    MenuHandle    theMenu;
  582. X    char    ch;
  583. X    short    menuBar;
  584. X    GrafPtr    oldPort;
  585. X
  586. X    ch = '\0';
  587. X    if (macflags & fDoNonKeyEvt) {
  588. X        switch (FindWindow(theEvent.where,&theWindow)) {
  589. X        case inMenuBar:
  590. X        if (!(macflags & fDoMenus))
  591. X            break;
  592. X        SetCursor(&ARROW_CURSOR);
  593. X        message = MenuSelect(theEvent.where);
  594. X
  595. X        if (!HiWord(message))
  596. X            break;
  597. X
  598. X        switch (HiWord(message)) {
  599. X            case editMenu:
  600. X            (void)SystemEdit((short)message - 1);
  601. X            break;
  602. X            case appleMenu:
  603. X            if (LoWord(message) > 1) {
  604. X                GetItem(GetMHandle(HiWord(message)),LoWord(message),
  605. X                    deskacc);
  606. X                SetMenuBar(t->shortMBarHandle);
  607. X                DrawMenuBar();
  608. X                (void)OpenDeskAcc(deskacc);
  609. X                if (theMenu = GetMHandle(editMenu))
  610. X                    EnableItem(theMenu, 0);
  611. X            } else
  612. X                if (aboutBox(1))
  613. X                    ch = '?';
  614. X            break;
  615. X            case fileMenu:
  616. X            case inventMenu:
  617. X            case prepMenu:
  618. X            case actionMenu:
  619. X            case moveMenu:
  620. X            *nextCommand =
  621. X                keys[HiWord(message)-appleMenu][LoWord(message)-1];
  622. X            ch = (!(*nextCommand)) ? '\0' : (char)ESCAPEkey;
  623. X            macflags |= (fExtCmdSeq2 | fExtCmdSeq3);
  624. X#ifdef TEXTCOLOR
  625. X#define    MAC_BLACK    0
  626. X#define    MAC_WHITE    7
  627. X            if(HiWord(message) == fileMenu && LoWord(message) == 3) {
  628. X                theMenu = GetMHandle(HiWord(message));
  629. X                macflags = macflags ^ fInvertedScreen;
  630. X                CheckItem(theMenu, 3,
  631. X                    (boolean)(macflags & fInvertedScreen));
  632. X
  633. X                /* switch black & white */
  634. X                message = t->color[BLACK];
  635. X                t->color[MAC_BLACK] = t->color[MAC_WHITE];
  636. X                t->color[MAC_WHITE] = message;
  637. X
  638. X                /* switch light blue & dark blue */
  639. X                message = t->color[BLUE];
  640. X                t->color[BLUE] = t->color[CYAN];
  641. X                t->color[CYAN] = message;
  642. X
  643. X                ForeColor(t->color[MAC_BLACK]);
  644. X                BackColor(t->color[MAC_WHITE]);
  645. X                /* refresh screen without prompting 'More' */
  646. X                message = flags.toplin;
  647. X                flags.toplin = 0;
  648. X                docrt();
  649. X                flags.toplin = message;
  650. X            }
  651. X#endif
  652. X            break;
  653. X            case extendMenu:
  654. X            ch = (char)ESCAPEkey;
  655. X            *nextCommand =
  656. X             keys[HiWord(message) - appleMenu][LoWord(message) - 1];
  657. X            macflags |= fExtCmdSeq1;
  658. X            break;
  659. X        }
  660. X        HiliteMenu(0);
  661. X        break;
  662. X        
  663. X        case inSysWindow:
  664. X        SystemClick(&theEvent, theWindow);
  665. X        break;
  666. X
  667. X        case inDrag:
  668. X        if (!(theEvent.modifiers & cmdKey)) {
  669. X            if (theWindow != FrontWindow()) {
  670. X                SelectWindow(theWindow);
  671. X                break;
  672. X            }
  673. X        }
  674. X        menuBar = (ROM85 == -1) ? 20 : GetMBarHeight();
  675. X
  676. X        {
  677. X        RgnHandle fooRgn = GetGrayRgn();
  678. X            boundsRect = (*fooRgn)->rgnBBox;
  679. X        }
  680. X        SetCursor(&ARROW_CURSOR);
  681. X        DragWindow(theWindow, theEvent.where, &boundsRect);
  682. X        break;
  683. X    
  684. X    case inContent:
  685. X        if (theWindow != FrontWindow()) {
  686. X            SelectWindow(theWindow);
  687. X        } else if (theWindow == HackWindow) {
  688. X            Point    mouseLoc;
  689. X            Rect    box;
  690. X            short    temp;
  691. X
  692. X            if(flags.wantspace) {
  693. X                ch = 0x20;
  694. X            } else {
  695. X                box.left = (u.ux-1) * t->charWidth + Screen_Border + (t->charWidth/2);
  696. X                box.right = box.left + 1;
  697. X                box.top = (u.uy+1) * t->height + Screen_Border + t->height/2;
  698. X                box.bottom = box.top + 1;
  699. X                GetMouse(&mouseLoc);
  700. X                PtToAngle(&box,mouseLoc,&temp);
  701. X                temp = ((temp + 22) / 45) % 8;    /* ~same as above */
  702. X                switch(cursorPos) {
  703. X                    case 0:
  704. X                        ch = 'k';
  705. X                        break;
  706. X                    case 1:
  707. X                        ch = 'u';
  708. X                        break;
  709. X                    case 2:
  710. X                        ch = 'l';
  711. X                        break;
  712. X                    case 3:
  713. X                        ch = 'n';
  714. X                        break;
  715. X                    case 4:
  716. X                        ch = 'j';
  717. X                        break;
  718. X                    case 5:
  719. X                        ch = 'b';
  720. X                        break;
  721. X                    case 6:
  722. X                        ch = 'h';
  723. X                        break;
  724. X                    case 7:
  725. X                        ch ='y';
  726. X                        break;
  727. X                    case 8:
  728. X                        ch = '.';
  729. X                        break;
  730. X                }
  731. X                if ((theEvent.modifiers & shiftKey) && (ch)) {
  732. X                    ch = (ch == '.') ? ':' : (char)toupper(ch);
  733. X                }
  734. X            }
  735. X        }            
  736. X        break;
  737. X        }
  738. X    } else {
  739. X        switch (FindWindow(theEvent.where,&theWindow)) {
  740. X        case inContent:
  741. X            if(flags.wantspace) ch = 0x20;
  742. X            break;
  743. X        default:
  744. X            break;
  745. X        }
  746. X    }
  747. X    return ch;
  748. X}
  749. X
  750. Xvoid
  751. Xgethdate(name) char *name;
  752. X{
  753. X/*end gethdate*/}
  754. X
  755. Xint
  756. Xuptodate(fd)
  757. X{
  758. X    return(1);
  759. X}
  760. X
  761. X#ifndef THINKC4
  762. Xchar *
  763. Xgetenv(s)
  764. Xchar *s;
  765. X{
  766. X    return((char *)NULL);
  767. X}
  768. X
  769. Xint
  770. Xmemcmp(x,y,n)
  771. Xchar *x,*y;
  772. Xint    n;
  773. X
  774. X{
  775. X    int i;
  776. X    
  777. X    i = 0;
  778. X    while (i++< n && (*x++) == (*y++)) {
  779. X        /*x++; y++; i++*/
  780. X        ;
  781. X    }
  782. X    if (i != n)
  783. X        return ((*x > *y) ? -1 : 1);
  784. X    else
  785. X        return (0);
  786. X}
  787. X#else
  788. Xint
  789. Xkbhit()
  790. X{    
  791. X    EventRecord    theEvent;
  792. X    
  793. X    SystemTask();
  794. X    return (EventAvail(keyDownMask | mDownMask, &theEvent));
  795. X}
  796. X#endif
  797. X
  798. X#ifdef AZTEC
  799. X
  800. Xsleep(x)
  801. Xint    x;
  802. X{
  803. X    long t;
  804. X    
  805. X    Delay((long)x, &t);
  806. X}
  807. X#endif
  808. X    
  809. X
  810. Xint
  811. Xmcurs(col,row)
  812. Xshort    col,row;
  813. X
  814. X{
  815. X    term_info    *t;
  816. X    
  817. X    t = (term_info *)GetWRefCon(HackWindow);
  818. X    t->tcur_y = row;
  819. X    t->tcur_x = col;
  820. X    return 1;
  821. X}
  822. X
  823. Xstatic void
  824. XcheckScroll(t)
  825. Xterm_info *t;
  826. X{
  827. X    if (t->tcur_y >= t->maxRow-1) {
  828. X        short    temp;
  829. X        char    *s, *s1;
  830. X
  831. X        BlockMove((Ptr)t->screen[1], (Ptr)t->screen[0],
  832. X            (Size)((t->maxRow - 1) * t->maxCol));
  833. X        BlockMove((Ptr)t->scrAttr[1], (Ptr)t->scrAttr[0],
  834. X            (Size)((t->maxRow - 1) * t->maxCol));
  835. X        for (temp = 0, s = t->screen[t->maxRow - 1], s1 = t->scrAttr[t->maxRow - 1];
  836. X                temp < t->maxCol; temp++, s++, s1++) {
  837. X            *s = ' ';
  838. X            *s1 = 0;
  839. X        }
  840. X        {
  841. X            Pattern p, o;
  842. X            Rect    window;
  843. X            
  844. X            if (macflags & fInvertedScreen) {
  845. X                BlockMove((Ptr)&((GrafPtr)HackWindow)->bkPat, (Ptr)&o,
  846. X                        sizeof(Pattern));
  847. X                GetIndPattern(&p, sysPatListID,1);
  848. X                BackPat(p);
  849. X            }
  850. X            window = HackWindow->portRect;
  851. X            InsetRect(&window, 4,4);
  852. X            window.top += t->height;
  853. X            ScrollRect(&window, 0, -t->height,
  854. X                    ((WindowPeek)HackWindow)->updateRgn);
  855. X            ValidRect(&window);
  856. X            if (macflags & fInvertedScreen) {
  857. X                BackPat(o);
  858. X            }
  859. X        }
  860. X        t->tcur_y = t->maxRow - 1;
  861. X    }
  862. X}
  863. X
  864. Xvoid
  865. Xmput(s)
  866. Xchar    *s;
  867. X{
  868. X    unsigned short    sLen,temp;
  869. X    GrafPtr        prevPort;
  870. X    register term_info    *t;
  871. X    Point        cur;
  872. X    register short        x,y;
  873. X    Rect        eraseRect;
  874. X    register char        *stmp,*c,*c1;
  875. X    char    savech;
  876. X    
  877. X    t = (term_info *)GetWRefCon(HackWindow);
  878. X    sLen = strlen(s);
  879. X    
  880. X    x = t->tcur_x;
  881. X    y = t->tcur_y;
  882. X    if (y >= t->maxRow)
  883. X        panic("mput - incorrect cursor position\n");
  884. X    cur.h = (x * t->charWidth) + Screen_Border;
  885. X    cur.v = t->ascent + (y * t->height) + Screen_Border;
  886. X    GetPort(&prevPort);
  887. X    SetPort((GrafPtr)HackWindow);
  888. X    TextFont(t->fontNum);
  889. X    TextSize(t->fontSize);
  890. X    TextMode(srcCopy);
  891. X    /* a termcap-type escape string */
  892. X    if (!strncmp(s, "\033[", 2)) {
  893. X        switch(*(s + 2)) {
  894. X        case 'c':    /* color kluge */
  895. X            temp = (short)(*(s + 3) - 'a');
  896. X            t->curAttr = temp;
  897. X            if (temp >= BLACK && temp < MAXCOLORS &&
  898. X                (temp % (MAXCOLORS / 2) != GRAY)) /* set colour */
  899. X                t->curAttr = temp % (MAXCOLORS / 2);
  900. X            if ((temp & 0x07) == GRAY)
  901. X                t->curAttr = 0;
  902. X            if (t->inColor) {
  903. X            if (temp >= BLACK && temp < MAXCOLORS &&
  904. X                (temp % (MAXCOLORS / 2) != GRAY)) /* set colour */
  905. X                ForeColor(t->color[temp % (MAXCOLORS / 2)]);
  906. X            if (temp == GRAY)
  907. X                        ForeColor(t->color[0]);
  908. X             /* yellow fgnd hard to see on white bgnd */
  909. X             /* so change to green background */
  910. X            if (temp == YELLOW || temp == BROWN)
  911. X                BackColor(t->color[GREEN]);
  912. X            if (temp == BLUE)
  913. X                BackColor(t->color[CYAN]);
  914. X            if (temp == CYAN)
  915. X                BackColor(t->color[BLUE]);
  916. X            }
  917. X            break;
  918. X        case '0':    /* normal video begin */
  919. X            if (*(s + 3) == 'm') {
  920. X                ForeColor(t->color[0]);
  921. X                BackColor(t->color[7]);
  922. X                t->curHilite = FALSE;
  923. X                t->curAttr = 0;
  924. X            }
  925. X            break;
  926. X        case '1':    /* inverse video begin */
  927. X            if (*(s + 3) == 'm') {
  928. X                ForeColor(t->color[7]);
  929. X                BackColor(t->color[0]);
  930. X                t->curHilite = TRUE;
  931. X                t->curAttr = 0;
  932. X            }
  933. X            break;
  934. X        case 'A':    /* cursor up */
  935. X            if (y > 0) {
  936. X                t->tcur_y--;
  937. X                cur.v -= t->height;
  938. X            }
  939. X            break;
  940. X        case 'B':    /* cursor down */
  941. X            if (y < t->maxRow) {
  942. X                t->tcur_y++;
  943. X                cur.v += t->height;
  944. X            }
  945. X            break;
  946. X        case 'C':    /* cursor right */
  947. X            if (x < t->maxCol) {
  948. X                t->tcur_x++;
  949. X                cur.h += t->charWidth;
  950. X            }
  951. X            break;
  952. X        case 'D':    /* cursor left */
  953. X            if (x > 0) {
  954. X                t->tcur_x--;
  955. X                cur.h -= t->charWidth;
  956. X            }
  957. X            break;
  958. X        case 'H':    /* home cursor */
  959. X            t->tcur_x = t->tcur_y = 0;
  960. X            cur.h = Screen_Border;
  961. X            cur.v = t->ascent + Screen_Border;
  962. X            break;
  963. X        case 'K':    /* clear to end of line */
  964. X            eraseRect.top = cur.v - (t->ascent);
  965. X            eraseRect.left = cur.h;
  966. X            eraseRect.bottom = eraseRect.top + t->height;
  967. X            eraseRect.right = (t->maxCol*t->charWidth) + Screen_Border;
  968. X            EraseRect(&eraseRect);
  969. X            for (temp = x, c = &(t->screen[y][x]), c1 = &(t->scrAttr[y][x]);
  970. X                temp < t->maxCol; temp++) {
  971. X                *c++ = ' ';
  972. X                *c1++ = 0;
  973. X            }
  974. X            break;
  975. X        case '2':
  976. X            if (*(s+3) == 'J') {    /* clear screen */
  977. X            x = y = t->tcur_x = t->tcur_y = 0;
  978. X            eraseRect.top = eraseRect.left = Screen_Border;
  979. X            eraseRect.bottom = t->maxRow*t->height + Screen_Border;
  980. X            eraseRect.right = t->charWidth*t->maxCol + Screen_Border;
  981. X            EraseRect(&eraseRect);
  982. X            for (y = 0, c = t->screen[0], c1 = t->scrAttr[0];
  983. X                y < t->maxCol * t->maxRow; y++) {
  984. X                    *c++ = ' ';
  985. X                    *c1++ = 0;
  986. X            }
  987. X            cur.h = Screen_Border;
  988. X            cur.v = t->ascent + Screen_Border;
  989. X            }
  990. X            break;
  991. X        }
  992. X        MoveTo(cur.h, cur.v);
  993. X    } else {
  994. X        short    charleft = sLen;
  995. X        
  996. X        MoveTo(cur.h, cur.v);
  997. X        stmp = s;
  998. X        
  999. X        if (sLen) {
  1000. X        while (stmp < (s + sLen)) {
  1001. X            temp = (x + charleft - 1 < t->maxCol - 1) ? charleft : t->maxCol - x;
  1002. X            savech = '\0';
  1003. X            c1 = stmp + temp;    /* point to the char after the end */
  1004. X            c = index(stmp, '\n');
  1005. X            if (c && c < c1) {
  1006. X                c1 = c;
  1007. X                savech = '\n';
  1008. X                temp = (short)(c - stmp);
  1009. X                /* don't want to include '\n' in print */
  1010. X            }
  1011. X            c = index(stmp, '\r');
  1012. X            if (c && c < c1) {
  1013. X                c1 = c;
  1014. X                savech = '\r';
  1015. X                temp = (short)(c - stmp);
  1016. X                /* don't want to include '\r' in print */
  1017. X            }
  1018. X            DrawText((Ptr)stmp, 0, temp);
  1019. X            BlockMove((Ptr)stmp, (Ptr)&(t->screen[y][x]), (long)temp);
  1020. X            memset(&(t->scrAttr[y][x]), ((t->curHilite) ? 128 : 0) + t->curAttr,
  1021. X                temp);
  1022. X            stmp += temp + 1;
  1023. X            charleft -= temp + 1;
  1024. X            if (!savech) {
  1025. X                t->tcur_x += temp;
  1026. X            }
  1027. X
  1028. X            if (t->tcur_x >= t->maxCol-1 || savech) {
  1029. X                if (savech != '\r') {
  1030. X                    if (t->tcur_y >= t->maxRow-1) {
  1031. X                        checkScroll(t);
  1032. X                    } else {
  1033. X                        y = (++t->tcur_y);
  1034. X                    }
  1035. X                }
  1036. X    
  1037. X                x = t->tcur_x = 0;
  1038. X                cur.h = Screen_Border;
  1039. X                cur.v = y * t->height + t->ascent + Screen_Border;
  1040. X                MoveTo(cur.h,cur.v);
  1041. X            }
  1042. X        }
  1043. X    }
  1044. X    }
  1045. X    if (t->tcur_x >= t->maxCol-1) {
  1046. X        t->tcur_x = t->tcur_x % t->maxCol;
  1047. X        t->tcur_y++;
  1048. X        checkScroll(t);
  1049. X    }
  1050. X    SetPort(prevPort);
  1051. X}
  1052. X
  1053. Xint
  1054. Xmputc(c)
  1055. Xchar    c;
  1056. X{
  1057. X    GrafPtr        prevPort;
  1058. X    register term_info    *t;
  1059. X    Point        cur;
  1060. X    register short        x,y;
  1061. X    Rect        eraseRect;
  1062. X    char        savech;
  1063. X    PenState    pnState;
  1064. X    
  1065. X    t = (term_info *)GetWRefCon(HackWindow);
  1066. X    
  1067. X    x = t->tcur_x;
  1068. X    y = t->tcur_y;
  1069. X    cur.h = (x * t->charWidth) + Screen_Border;
  1070. X    cur.v = t->ascent + (y * t->height) + Screen_Border;
  1071. X    GetPort(&prevPort);
  1072. X    SetPort((GrafPtr)HackWindow);
  1073. X    TextFont(t->fontNum);
  1074. X    TextSize(t->fontSize);
  1075. X    TextMode(srcCopy);
  1076. X    
  1077. X    MoveTo(cur.h, cur.v);
  1078. X    savech = '\0';
  1079. X    if (c == '\b') {
  1080. X        if (x > 0) {
  1081. X            c = ' ';
  1082. X            x = (--t->tcur_x);
  1083. X            cur.h = (x * t->charWidth) + Screen_Border;
  1084. X            Move(-t->charWidth,0);
  1085. X            savech = '\b';
  1086. X        } else if (y > 0) {
  1087. X                c = ' ';
  1088. X                x = t->tcur_x = (t->maxCol - 1);
  1089. X                y = (--t->tcur_y);
  1090. X                cur.h = (x * t->charWidth) + Screen_Border;
  1091. X                cur.v -= t->height;
  1092. X                MoveTo(cur.h, cur.v);
  1093. X                savech = '\b';
  1094. X        }
  1095. X    }
  1096. X    if (c == '\007') {
  1097. X        SysBeep(1);
  1098. X    } else if ((c == '\n') || (c == '\r')) {
  1099. X        t->tcur_x = 0;
  1100. X        if (t->tcur_y >= t->maxRow && c == '\r') {
  1101. X            t->tcur_y = t->maxRow - 1;
  1102. X        } else if (c == '\n') {
  1103. X            if (t->tcur_y >= t->maxRow-1) {
  1104. X                checkScroll(t);
  1105. X            } else {
  1106. X                t->tcur_y++;
  1107. X            }
  1108. X        }
  1109. X    } else {
  1110. X        t->screen[y][x] = c;
  1111. X        t->scrAttr[y][x] = ((t->curHilite) ? 128 : 0) + t->curAttr;
  1112. X        DrawText(&c, 0, 1);
  1113. X        if (!savech) {
  1114. X            t->tcur_x++;
  1115. X            if (t->tcur_x >= t->maxCol)
  1116. X            {
  1117. X                t->tcur_x = 0;
  1118. X                t->tcur_y++;
  1119. X                checkScroll(t);
  1120. X            }
  1121. X        }
  1122. X    }
  1123. X    cur.h = (t->tcur_x * t->charWidth) + Screen_Border;
  1124. X    cur.v = t->ascent + (t->tcur_y * t->height) + Screen_Border;
  1125. X    MoveTo(cur.h,cur.v);
  1126. X
  1127. X    SetPort(prevPort);    
  1128. X    return 1;
  1129. X}
  1130. X
  1131. Xint
  1132. Xmputs(s)
  1133. Xchar    *s;
  1134. X{
  1135. X    mput(s);
  1136. X    return 1;
  1137. X}
  1138. X        
  1139. X        
  1140. X        
  1141. Xint
  1142. Xmprintf(fstr)
  1143. Xchar    *fstr;
  1144. X{
  1145. X#define    Bufsz    14        
  1146. X    char        numAsStr[Bufsz];
  1147. X    short        numsz;
  1148. X    char        *ps;
  1149. X    unsigned long    num;
  1150. X
  1151. X    boolean        convchar;
  1152. X    boolean        islong;
  1153. X    char        c;
  1154. X    char        *s;
  1155. X    char        prBuffer[128];
  1156. X    register char        *pb;
  1157. X    
  1158. X    prBuffer[0] = '\0';
  1159. X    pb = &prBuffer[0];
  1160. X    ps = (char *)&fstr;    /* convert to pointer to params */
  1161. X    ps += sizeof(char *);    /* skip over format string ptr */
  1162. X    while (*fstr)    {
  1163. X        s = index(fstr, '%');
  1164. X        if (s) {
  1165. X        num = (short)(s - fstr);
  1166. X        strncpy(pb, fstr, (short)num);
  1167. X        pb += num;
  1168. X        fstr = s;
  1169. X        } else {
  1170. X        Strcpy(pb, fstr);
  1171. X        fstr += strlen(fstr)-1;
  1172. X        }
  1173. X        switch (*fstr) {
  1174. X        case '%':
  1175. X            fstr++;
  1176. X            convchar = FALSE;
  1177. X            islong = FALSE;
  1178. X            do {
  1179. X            switch (*fstr) {
  1180. X                case 'l':    /* long */
  1181. X                islong = TRUE;
  1182. X                fstr++;
  1183. X                break;
  1184. X                case 'u':    /* unsigned decimal */
  1185. X                case 'd':    /* signed decimal */
  1186. X                num = (islong) ? *(unsigned long *)ps
  1187. X                           : *(unsigned short *)ps;
  1188. X                numsz = (islong) ? sizeof(long) : sizeof(short);
  1189. X                ps += numsz;
  1190. X                s = (islong) ? fstr - 2 : fstr - 1;
  1191. X                c = *(fstr + 1);
  1192. X                *(fstr + 1) = '\0';
  1193. X                if (islong)
  1194. X                    Sprintf(numAsStr, s, num);
  1195. X                else
  1196. X                    Sprintf(numAsStr, s, (short)num);
  1197. X                *(fstr + 1) = c;
  1198. X                Strcpy(pb, numAsStr);
  1199. X                pb = (char *)(pb + strlen(numAsStr));
  1200. X                convchar = TRUE;
  1201. X                break;
  1202. X                case 's':
  1203. X                s = *(char **)ps;
  1204. X                Strcpy(pb, s);
  1205. X                pb = (char *)(pb + strlen(s));
  1206. X                ps += sizeof(char *);
  1207. X                convchar = TRUE;
  1208. X                break;
  1209. X                case 'c':
  1210. X                c = *(unsigned short *)ps;
  1211. X                numsz = sizeof(short);
  1212. X                (*pb++) = (char)c;
  1213. X                (*pb) = '\0';
  1214. X                convchar = TRUE;
  1215. X                ps += numsz;
  1216. X                break;
  1217. X                default:
  1218. X                convchar = TRUE;
  1219. X            }
  1220. X            } while (!convchar);
  1221. X            break;
  1222. X        default:
  1223. X            break;
  1224. X        }
  1225. X        fstr++;
  1226. X    }
  1227. X    if (prBuffer[0])
  1228. X        mput(&prBuffer[0]);
  1229. X        
  1230. X    return 1;
  1231. X}
  1232. X
  1233. XDialogTHndl
  1234. XcentreDlgBox(resNum, clip)
  1235. Xshort    resNum;
  1236. XBoolean    clip;
  1237. X{
  1238. X    DialogTHndl    th = (DialogTHndl) GetResource('DLOG', resNum);
  1239. X    Rect    rect;
  1240. X    short    dv, dh;
  1241. X
  1242. X    /* centre dialog box on screen */
  1243. X    if (th) {
  1244. X        rect = SCREEN_BITS.bounds;
  1245. X        HLock((Handle)th);
  1246. X        dv = ((**th).boundsRect.bottom - (**th).boundsRect.top)/2;
  1247. X        dv -= (clip) ? 20 : 0;
  1248. X        dh = ((**th).boundsRect.right - (**th).boundsRect.left)/2;
  1249. X    
  1250. X        (**th).boundsRect.bottom =
  1251. X                (rect.bottom + rect.top + MBarHeight)/2 + dv;
  1252. X        (**th).boundsRect.top     =
  1253. X                (rect.bottom + rect.top + MBarHeight)/2 - dv;
  1254. X        (**th).boundsRect.right     = (rect.right + rect.left)/2 + dh;
  1255. X        (**th).boundsRect.left     = (rect.right + rect.left)/2 - dh;
  1256. X        HUnlock((Handle)th);
  1257. X    } else
  1258. X        panic("Couldn't load dialog resource");    
  1259. X
  1260. X    return th;
  1261. X}
  1262. X
  1263. Xshort
  1264. XaboutBox(prompt)
  1265. Xshort    prompt;
  1266. X{
  1267. X#define    OK_BUTTON    1
  1268. X#define    MORE_INFO_BUTTON    2
  1269. X
  1270. X    DialogPtr    theDialog;
  1271. X    Rect    rect;
  1272. X    Handle    theControl;
  1273. X    short    type,itemHit;
  1274. X    GrafPtr    oldPort;
  1275. X    EventRecord    theEvent;
  1276. X    term_info    *t;
  1277. X    DialogTHndl    th;
  1278. X
  1279. X    /* if about box on startup, centre about box on screen */
  1280. X    if (!prompt) {
  1281. X        th = centreDlgBox(129, TRUE);
  1282. X    }
  1283. X
  1284. X    GetPort(&oldPort);
  1285. X    theDialog = GetNewDialog(129, (Ptr)NULL,(WindowPtr)-1);
  1286. X    if (!prompt) {
  1287. X        HideDItem(theDialog, OK_BUTTON);
  1288. X        HideDItem(theDialog, MORE_INFO_BUTTON);
  1289. X    } else
  1290. X        MoveWindow((WindowPtr)theDialog, LEFT_OFFSET, TOP_OFFSET, TRUE);
  1291. X
  1292. X    ShowWindow((WindowPtr)theDialog);
  1293. X    SetPort(theDialog);
  1294. X    TextFont(1);    /* 9 pt. Geneva */
  1295. X    TextSize(9);
  1296. X    DrawDialog(theDialog);
  1297. X    itemHit = 0;
  1298. X    if (prompt) {
  1299. X        /* BOLD the OK button */
  1300. X        GetDItem(theDialog, OK_BUTTON, &type, &theControl, &rect);
  1301. X        PenSize(3,3);    
  1302. X        InsetRect(&rect,-4,-4);
  1303. X        FrameRoundRect(&rect,16,16);
  1304. X        PenSize(1,1);
  1305. X        while ((itemHit != OK_BUTTON) && (itemHit != MORE_INFO_BUTTON)) {
  1306. X            ModalDialog(NULL, &itemHit);
  1307. X        }
  1308. X    } else {
  1309. X        long    tickNum;
  1310. X
  1311. X        tickNum = TickCount() + 180;    /* 3 second wait max */
  1312. X        while (!itemHit && TickCount()<tickNum) {
  1313. X        /*    SystemTask();*/
  1314. X            if (GetNextEvent(everyEvent,&theEvent))
  1315. X                if (theEvent.what == mouseDown ||
  1316. X                          theEvent.what == keyDown ||
  1317. X                      theEvent.what == autoKey)
  1318. X                    itemHit = OK_BUTTON;
  1319. X        }
  1320. X    }
  1321. X    DisposDialog(theDialog);
  1322. X    ReleaseResource((Handle)th);
  1323. X    SetPort(oldPort);
  1324. X    return (itemHit == MORE_INFO_BUTTON);
  1325. X}
  1326. X
  1327. Xvoid
  1328. XfreeSegs(segs)
  1329. Xlong    *segs;
  1330. X{
  1331. X    register long s;
  1332. X    
  1333. X    s = (segs == (long *)0) ? 0L : (*segs);
  1334. X    
  1335. X    UnloadSeg(dothrow);
  1336. X    UnloadSeg(dowear);
  1337. X    UnloadSeg(ddocall);
  1338. X    UnloadSeg(castmu);
  1339. X    UnloadSeg(doforce);
  1340. X    if (!(s & SEG_EAT))
  1341. X        UnloadSeg(doeat);
  1342. X    if (!(s & SEG_ZAP))
  1343. X        UnloadSeg(dozap);
  1344. X    UnloadSeg(initterm);
  1345. X    if (!(s & SEG_APPLY))
  1346. X        UnloadSeg(doapply);
  1347. X    UnloadSeg(dokick);
  1348. X    UnloadSeg(outrumor);
  1349. X    if (!(s & SEG_DO))
  1350. X        UnloadSeg(steal);
  1351. X    UnloadSeg(done1);
  1352. X    if (!(s & SEG_POTION))
  1353. X        UnloadSeg(dodrink);
  1354. X    UnloadSeg(doturn);
  1355. X#ifdef REINCARNATION
  1356. X    UnloadSeg(makeroguerooms);
  1357. X#endif
  1358. X#ifdef STRONGHOLD
  1359. X    UnloadSeg(load_special);
  1360. X#endif
  1361. X    UnloadSeg(mklev);
  1362. X#ifdef MUSIC
  1363. X    if (!(s & SEG_SPELL))
  1364. X        UnloadSeg(do_play_instrument);
  1365. X#endif
  1366. X#ifdef SPELLS
  1367. X    if (!(s & SEG_SPELL))
  1368. X        UnloadSeg(docast);
  1369. X#endif
  1370. X    UnloadSeg(savebones);
  1371. X    UnloadSeg(expels);
  1372. X    UnloadSeg(attack);
  1373. X    UnloadSeg(doname);
  1374. X    if (FreeMem() < lowMemLimit)
  1375. X    {
  1376. X        long    space;
  1377. X        
  1378. X        space = 0x7FFFFFFFL;
  1379. X        MaxMem(&space);
  1380. X    }
  1381. X
  1382. X}
  1383. X
  1384. END_OF_FILE
  1385. if test 28936 -ne `wc -c <'mac/mac.c'`; then
  1386.     echo shar: \"'mac/mac.c'\" unpacked with wrong size!
  1387. fi
  1388. # end of 'mac/mac.c'
  1389. fi
  1390. if test -f 'others/Makefile.ovl' -a "${1}" != "-c" ; then 
  1391.   echo shar: Will not clobber existing file \"'others/Makefile.ovl'\"
  1392. else
  1393. echo shar: Extracting \"'others/Makefile.ovl'\" \(24533 characters\)
  1394. sed "s/^X//" >'others/Makefile.ovl' <<'END_OF_FILE'
  1395. X#    SCCS Id: @(#)Makefile.ovl    3.0    90/06/03
  1396. X#    PC NetHack 3.0 Makefile for Microsoft(tm) "C" 5.1 -- Pierre Martineau
  1397. X#    Overlay Arrangement -- Stephen Spackman, Pierre Martineau, Norm Meluch
  1398. X#    Multiple Compilation Hack and so forth -- Stephen Spackman
  1399. X#    Additional editing -- Kevin Smolkowski
  1400. X#
  1401. X#    Other things that have to be reconfigured are in config.h, pcconf.h,
  1402. X#    and possibly system.h.
  1403. X#
  1404. X#    Nota Bene: OVERLAY *must* be defined in pcconf.h to use this makefile!
  1405. X#    Also: Rename this file to "makefile", some targets rely on it.
  1406. X# -----------------------------------------------------------------------------
  1407. X#    In addition to your C compiler,
  1408. X#
  1409. X#    if you want to change        you will need a
  1410. X#    files with suffix        workalike for
  1411. X#           .y                yacc
  1412. X#           .l                lex
  1413. X#           .asm                masm
  1414. X# -----------------------------------------------------------------------------
  1415. X#    As it is set up, this makefile requires that exesmurf (the
  1416. X#    NetHack overlay-aware .exe header editor) be on your path or in the
  1417. X#    $(SRC) directory. If you wish to change the path or use Microsoft
  1418. X#    EXEMOD instead, see the symbols EXEPATCH and EXEFLAGS.
  1419. X#
  1420. X# *****************************************************************************
  1421. X# ************************ Compiler Info **************************************
  1422. X# *****************************************************************************
  1423. XCC     = cl /c
  1424. XLINK     = link
  1425. XMODEL     = L
  1426. XASM     = masm
  1427. XEXEPATCH = exesmurf
  1428. X# $(MAKE) macro is often predefined, so we use $(MAKEBIN) instead.
  1429. XMAKEBIN = make
  1430. X# For those of us who have these on PC.
  1431. X# YACC     = yacc
  1432. X# LEX     = lex
  1433. XYACC    = bison -y
  1434. XLEX    = flex
  1435. X# Standard file names may vary in PC installations.
  1436. XYTABC    = y_tab.c
  1437. XYTABH    = y_tab.h
  1438. XLEXYYC    = lexyy.c
  1439. X# Register bug, remove stack probes...
  1440. X# /Gt22 is currently about the largest value that keeps the initialised data
  1441. X# segment below 64K (and keeps the linker happy).
  1442. X# 286 or higher machines can use the /G2 CFLAG option for better performance.
  1443. XCFLAGS    = /A$(MODEL) /Oa /Gs /Gt22 /Zp1 /W0 /I$(INCL)
  1444. XCOSPACE = /Os
  1445. XCOSPEED = /Os  # MSC 5.1 seems to be broken, or maybe it's the NetHack code.
  1446. X#              # Either way, setting COSPEED to /Ot wreaked jolly flaming havoc.
  1447. X#
  1448. XLFLAGS    = /noi /seg:512 /map /st:4096
  1449. X#
  1450. X# Available assembler flags:
  1451. X#    /Di386    = Use 386 specific enhancements
  1452. X#    /DNOEMS = Do not use EMS memory
  1453. X#    /DDEBUG = Report memory usage on startup
  1454. XAFLAGS    = /MX
  1455. X#
  1456. X###############################################################################
  1457. X# Use the first line if you are using EXESMURF or the second for EXEMOD.
  1458. XEXEFLAGS = /max4500 /min4500
  1459. X# EXEFLAGS = /max 1194 /min 1194
  1460. X###############################################################################
  1461. X#
  1462. X# *****************************************************************************
  1463. X# ********* Directories (makedefs hardcodes these, don't change them) *********
  1464. X# *****************************************************************************
  1465. X#
  1466. XINCL    = ..\include
  1467. XAUX    = ..\auxil
  1468. XSRC    = ..\src
  1469. XOTHERS    = ..\others
  1470. XOBJ    = $(SRC)\o
  1471. X#
  1472. X# *****************************************************************************
  1473. X# ************************ Local Variables ************************************
  1474. X# *****************************************************************************
  1475. X#
  1476. X# The game name
  1477. XGAME     = NetHack
  1478. X#
  1479. X# The default make target (so just typing 'make' is useful)
  1480. XDEFAULT  : $(GAME)
  1481. X#
  1482. X# The game directory
  1483. X# make sure GAMEDIR exists!
  1484. XGAMEDIR  = ..
  1485. X#
  1486. X# The game filename
  1487. XGAMEFILE = $(GAMEDIR)\$(GAME).exe
  1488. X#
  1489. X# Target environment prefix
  1490. XTARG     = pc
  1491. X#
  1492. X# Overlay manager object file.
  1493. XOVLMGR     = ovlmgr.obj
  1494. X#
  1495. X# Termcap routines.
  1496. XTERMCAPS = $(SRC)\termlib.lib
  1497. X#
  1498. X###############################################################################
  1499. X# Switch the following lines if you have a MASM compatible assembler.
  1500. X# $(OBJ)\$(OVLMGR):
  1501. X$(OBJ)\$(OVLMGR): ; copy $(OTHERS)\$(OVLMGR) $(OBJ)\$(OVLMGR)
  1502. X###############################################################################
  1503. X# If you have yacc and lex programs and make any changes, comment out the
  1504. X# upper two targets and uncomment the lower two.
  1505. Xdo_yacc: yacc_msg
  1506. Xdo_lex:  lex_msg
  1507. X# do_yacc: yacc_act
  1508. X# do_lex:  lex_act
  1509. X###############################################################################
  1510. X# Optional high-quality BSD random number generation routines (see pcconf.h).
  1511. X# Set to nothing if not used.
  1512. XRANDOM     = $(OBJ)\random.o
  1513. X# RANDOM =
  1514. X###############################################################################
  1515. X# Optional C library specifier for those with non-standard libraries or
  1516. X# a multiple-target library setup.
  1517. X# CLIB       = llibcer /nod
  1518. XCLIB     =
  1519. X###############################################################################
  1520. X# If TERMLIB is NOT #defined in the source, comment out the lower line and
  1521. X# uncomment the upper. Don't forget to copy the $(TERMCAPS) file to the
  1522. X# $(SRC) directory if you have uncommented the lower line.
  1523. X# TERMLIB  =
  1524. XTERMLIB  = $(TERMCAPS)
  1525. X###############################################################################
  1526. X#
  1527. X# nothing below this line should have to be changed
  1528. X
  1529. XROOT =  $(OBJ)\$(OVLMGR) $(OBJ)\trampoli.o $(OBJ)\main.o $(OBJ)\msdos.o \
  1530. X    $(OBJ)\alloc.o $(OBJ)\random.o $(OBJ)\decl.o $(OBJ)\monst.o \
  1531. X    $(OBJ)\objects.o $(OBJ)\invent.0 $(OBJ)\mkobj.0 $(OBJ)\mkroom.0 \
  1532. X    $(OBJ)\rnd.0 $(OBJ)\termcap.0
  1533. X# main monster code
  1534. XOVL01 = $(OBJ)\cmd.0 $(OBJ)\dbridge.0 $(OBJ)\dog.0 $(OBJ)\engrave.0-1 \
  1535. X    $(OBJ)\hack.0 $(OBJ)\mon.0-1 $(OBJ)\mondata.0-1 $(OBJ)\monmove.0-1 \
  1536. X    $(OBJ)\mthrowu.0 $(OBJ)\priest.0 $(OBJ)\shk.0 $(OBJ)\track.0 \
  1537. X    $(OBJ)\trap.0-1 $(OBJ)\were.0
  1538. X# pet code
  1539. XOVL02 = $(OBJ)\apply.0 $(OBJ)\dog.1 $(OBJ)\dogmove.o
  1540. X# advanced monsters
  1541. XOVL03 = $(OBJ)\demon.o $(OBJ)\mcastu.o
  1542. XOVL04 = $(OBJ)\priest.1-b
  1543. XOVL05 = $(OBJ)\shk.1-b
  1544. XOVL06 = $(OBJ)\were.1-b
  1545. XOVL07 = $(OBJ)\wizard.1-b
  1546. XOVL08 = $(OBJ)\worm.o
  1547. X# main people things: you take your turn
  1548. XOVL09 = $(OBJ)\allmain.0 $(OBJ)\artifact.0 $(OBJ)\attrib.1 $(OBJ)\cmd.1 \
  1549. X    $(OBJ)\do.1 $(OBJ)\do.3 $(OBJ)\eat.0 $(OBJ)\engrave.2 \
  1550. X    $(OBJ)\getline.0-1 $(OBJ)\hack.1 $(OBJ)\lock.0 $(OBJ)\mail.0 \
  1551. X    $(OBJ)\pickup.1 $(OBJ)\pri.1 $(OBJ)\prisym.1 $(OBJ)\sounds.0 \
  1552. X    $(OBJ)\timeout.0 $(OBJ)\track.1 $(OBJ)\vault.0 $(OBJ)\wizard.0
  1553. XOVL10 = $(OBJ)\attrib.0
  1554. XOVL11 = $(OBJ)\attrib.2-b $(OBJ)\exper.o
  1555. XOVL12 = $(OBJ)\artifact.2 $(OBJ)\eat.1 $(OBJ)\invent.1
  1556. XOVL13 = $(OBJ)\makemon.0-2 $(OBJ)\mkobj.1
  1557. XOVL14 = $(OBJ)\makemon.b
  1558. XOVL15 = $(OBJ)\mkobj.2-b
  1559. XOVL16 = $(OBJ)\hack.2
  1560. XOVL17 = $(OBJ)\mhitm.1-b
  1561. XOVL18 = $(OBJ)\mthrowu.1
  1562. XOVL19 = $(OBJ)\mthrowu.2-b
  1563. XOVL20 = $(OBJ)\allmain.1 $(OBJ)\mhitm.0 $(OBJ)\mhitu.0-1 $(OBJ)\rnd.1 \
  1564. X    $(OBJ)\weapon.0-1
  1565. XOVL21 = $(OBJ)\mon.2-b $(OBJ)\trap.2
  1566. XOVL22 = $(OBJ)\artifact.1 $(OBJ)\search.0 $(OBJ)\uhitm.o $(OBJ)\weapon.2-b
  1567. XOVL23 = $(OBJ)\do_wear.0-1 $(OBJ)\mhitu.2-b
  1568. XOVL24 = $(OBJ)\steal.0-1
  1569. XOVL25 = $(OBJ)\monmove.2-b $(OBJ)\steal.2-b
  1570. XOVL26 = $(OBJ)\rnd.2-b
  1571. XOVL27 = $(OBJ)\do_wear.2 $(OBJ)\getline.b $(OBJ)\mondata.2 $(OBJ)\objnam.0-1 \
  1572. X    $(OBJ)\pager.0 $(OBJ)\polyself.0-1
  1573. XOVL28 = $(OBJ)\do_name.0
  1574. XOVL29 = $(OBJ)\objnam.2-b
  1575. XOVL30 = $(OBJ)\pager.1-b
  1576. XOVL31 = $(OBJ)\pri.0 $(OBJ)\prisym.0 $(OBJ)\topl.0
  1577. XOVL32 = $(OBJ)\pri.b $(OBJ)\topl.1-2
  1578. XOVL33 = $(OBJ)\prisym.2
  1579. XOVL34 = $(OBJ)\prisym.b
  1580. XOVL35 = $(OBJ)\topl.b
  1581. XOVL36 = $(OBJ)\termcap.1 $(OBJ)\unix.0
  1582. XOVL37 = $(OBJ)\termcap.2-b
  1583. XOVL38 = $(OBJ)\dog.b $(OBJ)\sounds.1-b
  1584. XOVL39 = $(OBJ)\read.0
  1585. XOVL40 = $(OBJ)\invent.b
  1586. XOVL41 = $(OBJ)\hack.b
  1587. XOVL42 = $(OBJ)\mondata.b $(OBJ)\timeout.1-b
  1588. XOVL43 = $(OBJ)\do.0 $(OBJ)\invent.3
  1589. XOVL44 = $(OBJ)\cmd.2-b $(OBJ)\getline.2 $(OBJ)\write.o
  1590. XOVL45 = $(OBJ)\apply.2-b
  1591. XOVL46 = $(OBJ)\do.b
  1592. XOVL47 = $(OBJ)\dokick.o
  1593. XOVL48 = $(OBJ)\dothrow.o
  1594. XOVL49 = $(OBJ)\eat.2-b
  1595. XOVL50 = $(OBJ)\invent.2 $(OBJ)\pickup.0 $(OBJ)\pickup.2-b
  1596. XOVL51 = $(OBJ)\lock.1-b
  1597. XOVL52 = $(OBJ)\polyself.2-b
  1598. XOVL53 = $(OBJ)\potion.o
  1599. XOVL54 = $(OBJ)\pray.o
  1600. XOVL55 = $(OBJ)\read.1-b $(OBJ)\spell.o
  1601. XOVL56 = $(OBJ)\search.1-b
  1602. X# clothing stuff
  1603. XOVL57 = $(OBJ)\do_wear.b $(OBJ)\wield.o $(OBJ)\worn.o
  1604. X# Zappage
  1605. XOVL58 = $(OBJ)\pri.2 $(OBJ)\zap.o
  1606. XOVL59 = $(OBJ)\dbridge.1-b
  1607. XOVL60 = $(OBJ)\trap.b
  1608. X# Unusual circumstances
  1609. XOVL61 = $(OBJ)\artifact.b $(OBJ)\do_name.1-b $(OBJ)\fountain.o $(OBJ)\music.o \
  1610. X    $(OBJ)\rumors.o $(OBJ)\shknam.0 $(OBJ)\sit.o $(OBJ)\vault.1-b
  1611. X# Uppers and Downers
  1612. X# Note: version.o is in OVL62, but in a special way.  See below.
  1613. XOVL62 = $(OBJ)\allmain.2-b $(OBJ)\end.o $(OBJ)\engrave.b $(OBJ)\mail.1-b \
  1614. X    $(OBJ)\o_init.o $(OBJ)\options.o $(OBJ)\restore.o $(OBJ)\rip.o \
  1615. X    $(OBJ)\save.o $(OBJ)\shknam.1-b $(OBJ)\topten.o $(OBJ)\tty.o \
  1616. X    $(OBJ)\u_init.o $(OBJ)\unix.1-b
  1617. X# Levelling
  1618. XOVL63 = $(OBJ)\apply.1 $(OBJ)\bones.o $(OBJ)\do.2 $(OBJ)\dog.2 \
  1619. X    $(OBJ)\extralev.o $(OBJ)\mklev.o $(OBJ)\mkmaze.o $(OBJ)\mkroom.1-b \
  1620. X    $(OBJ)\sp_lev.o $(OBJ)\track.2-b
  1621. X
  1622. X
  1623. X# *****************************************************************************
  1624. X# ************************* Make Objects **************************************
  1625. X# *****************************************************************************
  1626. X
  1627. XMOBJ = $(OVL01) $(OVL02) $(OVL03) $(OVL04) $(OVL05) $(OVL06) $(OVL07) $(OVL08)\
  1628. X       $(OVL09) $(OVL10) $(OVL11) $(OVL12) $(OVL13) $(OVL14) $(OVL15) $(OVL16)\
  1629. X       $(OVL17) $(OVL18) $(OVL19) $(OVL20) $(OVL21) $(OVL22) $(OVL23) $(OVL24)\
  1630. X       $(OVL25) $(OVL26) $(OVL27) $(OVL28) $(OVL29) $(OVL30) $(OVL31) $(OVL32)\
  1631. X       $(OVL33) $(OVL34) $(OVL35) $(OVL36) $(OVL37) $(OVL38) $(OVL39) $(OVL40)\
  1632. X       $(OVL41) $(OVL42) $(OVL43) $(OVL44) $(OVL45) $(OVL46) $(OVL47) $(OVL48)\
  1633. X       $(OVL49) $(OVL50) $(OVL51) $(OVL52) $(OVL53) $(OVL54) $(OVL55) $(OVL56)\
  1634. X       $(OVL57) $(OVL58) $(OVL59) $(OVL60) $(OVL61) $(OVL62) $(OVL63)
  1635. X
  1636. XVOBJ =    $(ROOT) $(MOBJ)
  1637. X
  1638. XHOBJ =    $(VOBJ) $(OBJ)\version.o
  1639. X
  1640. X# object files for makedefs
  1641. XMAKEOBJS    =    $(OBJ)\makedefs.o $(OBJ)\alloc.o    $(OBJ)\monst.o    \
  1642. X        $(OBJ)\objects.o  $(OBJ)\panic.o
  1643. X
  1644. XOVERLAYS = ($(OVL01)) ($(OVL02)) ($(OVL03)) ($(OVL04)) ($(OVL05)) ($(OVL06)) \
  1645. X       ($(OVL07)) ($(OVL08)) ($(OVL09)) ($(OVL10)) ($(OVL11)) ($(OVL12)) \
  1646. X       ($(OVL13)) ($(OVL14)) ($(OVL15)) ($(OVL16)) ($(OVL17)) ($(OVL18)) \
  1647. X       ($(OVL19)) ($(OVL20)) ($(OVL21)) ($(OVL22)) ($(OVL23)) ($(OVL24)) \
  1648. X       ($(OVL25)) ($(OVL26)) ($(OVL27)) ($(OVL28)) ($(OVL29)) ($(OVL30)) \
  1649. X       ($(OVL31)) ($(OVL32)) ($(OVL33)) ($(OVL34)) ($(OVL35)) ($(OVL36)) \
  1650. X       ($(OVL37)) ($(OVL38)) ($(OVL39)) ($(OVL40)) ($(OVL41)) ($(OVL42)) \
  1651. X       ($(OVL43)) ($(OVL44)) ($(OVL45)) ($(OVL46)) ($(OVL47)) ($(OVL48)) \
  1652. X       ($(OVL49)) ($(OVL50)) ($(OVL51)) ($(OVL52)) ($(OVL53)) ($(OVL54)) \
  1653. X       ($(OVL55)) ($(OVL56)) ($(OVL57)) ($(OVL58)) ($(OVL59)) ($(OVL60)) \
  1654. X       ($(OVL61)) ($(OVL62)      $(OBJ)\version.o) ($(OVL63))
  1655. X
  1656. X# object files for special levels compiler
  1657. XSPLEVOBJS   =    $(OBJ)\lev_comp.o $(OBJ)\lev_lex.o  $(OBJ)\lev_main.o \
  1658. X        $(OBJ)\alloc.o      $(OBJ)\monst.o    $(OBJ)\objects.o  \
  1659. X        $(OBJ)\panic.o
  1660. X
  1661. X# *****************************************************************************
  1662. X# ************************** Header Objects ***********************************
  1663. X# *****************************************************************************
  1664. X
  1665. XPCCONF_H   = $(INCL)\$(TARG)conf.h $(INCL)\msdos.h    $(INCL)\system.h
  1666. XGLOBAL_H   = $(PCCONF_H)       $(INCL)\coord.h    $(INCL)\global.h
  1667. XCONFIG_H   = $(GLOBAL_H)       $(INCL)\config.h   $(INCL)\tradstdc.h
  1668. XPERMONST_H = $(INCL)\permonst.h    $(INCL)\monattk.h  $(INCL)\monflag.h
  1669. XYOUPROP_H  = $(PERMONST_H)       $(INCL)\prop.h     $(INCL)\mondata.h \
  1670. X         $(INCL)\pm.h       $(INCL)\youprop.h
  1671. XYOU_H       = $(YOUPROP_H)       $(INCL)\attrib.h   $(INCL)\monst.h \
  1672. X         $(INCL)\you.h
  1673. XDECL_H       = $(YOU_H)           $(INCL)\decl.h     $(INCL)\obj.h \
  1674. X         $(INCL)\onames.h       $(INCL)\spell.h    $(INCL)\color.h
  1675. XHACK_H       = $(CONFIG_H)       $(DECL_H)          $(INCL)\trap.h \
  1676. X         $(INCL)\flag.h       $(INCL)\gold.h     $(INCL)\mkroom.h \
  1677. X         $(INCL)\monsym.h       $(INCL)\objclass.h $(INCL)\rm.h \
  1678. X         $(INCL)\trampoli.h    $(INCL)\hack.h
  1679. X
  1680. X# *****************************************************************************
  1681. X# ************************ File Dependencies **********************************
  1682. X# *****************************************************************************
  1683. X
  1684. X# Due to an NDMake inadequacy these must accord with a topological sort of the
  1685. X# generated-from relation... output on the left, input on the right. Trust me.
  1686. X.SUFFIXES:  .exe .0 .0-1 .0-2 .0-3 .1 .1-2 .1-3 .1-b .2 .2-3 .2-b .3 .3-b .b \
  1687. X        .o .c .y .l .obj .asm
  1688. X
  1689. X.c.o:
  1690. X    $(CC) $(CFLAGS) $(COSPACE) /Fo$(OBJ)\$*.o $*.c
  1691. X.c.0:
  1692. X    $(CC) $(CFLAGS) $(COSPEED) /DOVL0 /NT$*.0 /Fo$(OBJ)\$*.0 $*.c
  1693. X.c.0-1:
  1694. X    $(CC) $(CFLAGS) $(COSPEED) /DOVL0 /DOVL1 /NT$*.0-1 /Fo$(OBJ)\$*.0-1 $*.c
  1695. X.c.0-2:
  1696. X    $(CC) $(CFLAGS) $(COSPACE) /DOVL0 /DOVL1 /DOVL2 /NT$*.0-2 /Fo$(OBJ)\$*.0-2 $*.c
  1697. X.c.0-3:
  1698. X    $(CC) $(CFLAGS) $(COSPACE) /DOVL0 /DOVL1 /DOVL2 /DOVL3 /NT$*.0-3 /Fo$(OBJ)\$*.0-3 $*.c
  1699. X.c.1:
  1700. X    $(CC) $(CFLAGS) $(COSPACE) /DOVL1 /NT$*.1 /Fo$(OBJ)\$*.1 $*.c
  1701. X.c.1-2:
  1702. X    $(CC) $(CFLAGS) $(COSPACE) /DOVL1 /DOVL2 /NT$*.1-2 /Fo$(OBJ)\$*.1-2 $*.c
  1703. X.c.1-3:
  1704. X    $(CC) $(CFLAGS) $(COSPACE) /DOVL1 /DOVL2 /DOVL3 /NT$*.1-3 /Fo$(OBJ)\$*.1-3 $*.c
  1705. X.c.1-b:
  1706. X    $(CC) $(CFLAGS) $(COSPACE) /DOVL1 /DOVL2 /DOVL3 /DOVLB /NT$*.1-b /Fo$(OBJ)\$*.1-b $*.c
  1707. X.c.2:
  1708. X    $(CC) $(CFLAGS) $(COSPACE) /DOVL2 /NT$*.2 /Fo$(OBJ)\$*.2 $*.c
  1709. X.c.2-3:
  1710. X    $(CC) $(CFLAGS) $(COSPACE) /DOVL2 /DOVL3 /NT$*.2-3 /Fo$(OBJ)\$*.2-3 $*.c
  1711. X.c.2-b:
  1712. X    $(CC) $(CFLAGS) $(COSPACE) /DOVL2 /DOVL3 /DOVLB /NT$*.2-b /Fo$(OBJ)\$*.2-b $*.c
  1713. X.c.3:
  1714. X    $(CC) $(CFLAGS) $(COSPACE) /DOVL3 /NT$*.3 /Fo$(OBJ)\$*.3 $*.c
  1715. X.c.3-b:
  1716. X    $(CC) $(CFLAGS) $(COSPACE) /DOVL3 /DOVLB /NT$*.3-b /Fo$(OBJ)\$*.3-b $*.c
  1717. X.c.b:
  1718. X    $(CC) $(CFLAGS) $(COSPACE) /DOVLB /NT$*.b /Fo$(OBJ)\$*.b $*.c
  1719. X.asm.obj:
  1720. X    $(ASM) $(AFLAGS) $*.asm,$(OBJ)\$*.obj ;
  1721. X
  1722. X$(GAME): $(GAMEFILE)
  1723. X
  1724. X$(GAME).exe: $(GAMEFILE)
  1725. X
  1726. X$(GAMEFILE): $(OBJ) $(HOBJ)
  1727. X    @echo Loading....
  1728. X    $(LINK) $(ROOT) $(OVERLAYS),$(GAMEFILE),$(GAME),$(CLIB) $(TERMLIB) $(LFLAGS) ;
  1729. X    $(EXEPATCH) $(GAMEFILE) $(EXEFLAGS)
  1730. X    @echo NetHack is up to date.
  1731. X
  1732. X$(OBJ):
  1733. X    if not exist .\$(OBJ)\*.* mkdir $(OBJ)
  1734. X
  1735. X#    The following 3 modules vary depending on what OS you are using.
  1736. X
  1737. X$(OBJ)\main.o:    $(HACK_H) $(TARG)main.c
  1738. X    $(CC) $(CFLAGS) $(COSPACE)  /Fo.\$(OBJ)\main.o $(TARG)main.c
  1739. X
  1740. X$(OBJ)\tty.o:    $(HACK_H) $(INCL)\func_tab.h $(TARG)tty.c
  1741. X    $(CC) $(CFLAGS) $(COSPACE)  /Fo.\$(OBJ)\tty.o  $(TARG)tty.c
  1742. X
  1743. X$(OBJ)\unix.0:    $(HACK_H) $(TARG)unix.c
  1744. X    $(CC) $(CFLAGS) $(COSPEED)  /DOVL0 /Fo.\$(OBJ)\unix.0 $(TARG)unix.c
  1745. X$(OBJ)\unix.1-b:    $(HACK_H) $(TARG)unix.c
  1746. X    $(CC) $(CFLAGS) $(COSPACE)  /DOVL1 /DOVL2 /DOVL3 /DOVLB /Fo.\$(OBJ)\unix.1-b $(TARG)unix.c
  1747. X
  1748. X$(OBJ)\makedefs.o:    $(INCL)\config.h $(INCL)\permonst.h $(INCL)\objclass.h
  1749. X
  1750. Xmakedefs.exe:    $(MAKEOBJS)
  1751. X    $(LINK) $(LFLAGS) $(MAKEOBJS), makedefs.exe,, $(CLIB);
  1752. X
  1753. X#    Targets for the special levels compiler
  1754. X
  1755. Xlev_comp.c: lev_comp.y
  1756. X    $(MAKEBIN) do_yacc
  1757. X
  1758. Xlev_lex.c:  lev_comp.l
  1759. X    $(MAKEBIN) do_lex
  1760. X
  1761. Xyacc_msg:
  1762. X    @echo lev_comp.y has changed. To update lev_comp.c and lev_comp.h run YACC.
  1763. X
  1764. Xyacc_act:
  1765. X    $(YACC) -d lev_comp.y
  1766. X    copy $(YTABC) lev_comp.c
  1767. X    copy $(YTABH) $(INCL)\lev_comp.h
  1768. X    del $(YTABC)
  1769. X    del $(YTABH)
  1770. X
  1771. Xlex_msg:
  1772. X    @echo lev_comp.l has changed. To update lev_lex.c run LEX.
  1773. X
  1774. Xlex_act:
  1775. X    $(LEX) lev_comp.l
  1776. X    copy $(LEXYYC) lev_lex.c
  1777. X    del $(LEXYYC)
  1778. X
  1779. X#    This is stupid but since the default rule does not work here ...
  1780. X
  1781. X$(OBJ)\lev_comp.o:    $(HACK_H)   $(INCL)\sp_lev.h    lev_comp.c
  1782. X    $(CC) $(CFLAGS) /Fo$(OBJ)\$*.o $*.c
  1783. X$(OBJ)\lev_lex.o:    $(HACK_H)   $(INCL)\sp_lev.h    $(INCL)\lev_comp.h \
  1784. X            lev_lex.c
  1785. X    $(CC) $(CFLAGS) /Fo$(OBJ)\$*.o $*.c
  1786. X
  1787. Xlev_comp.exe:    $(SPLEVOBJS)
  1788. X    $(LINK) $(LFLAGS) $(SPLEVOBJS),lev_comp.exe,, $(CLIB);
  1789. X
  1790. X# *****************************************************************************
  1791. X# *************************  Makedefs Stuff ***********************************
  1792. X# *****************************************************************************
  1793. X#    The following include files depend on makedefs to be created.
  1794. X#    date.h should be remade any time any of the source or include code
  1795. X#    is modified.
  1796. X
  1797. X$(INCL)\date.h: $(VOBJ) makedefs.exe
  1798. X    .\makedefs -v
  1799. X
  1800. X$(INCL)\onames.h: makedefs.exe
  1801. X    .\makedefs -o
  1802. X
  1803. X$(INCL)\pm.h: makedefs.exe
  1804. X    .\makedefs -p
  1805. X
  1806. X$(INCL)\trap.h: makedefs.exe
  1807. X    .\makedefs -t
  1808. X
  1809. Xdata:    $(AUX)\data.bas makedefs.exe
  1810. X    .\makedefs -d
  1811. X
  1812. Xrumors: $(AUX)\rumors.tru $(AUX)\rumors.fal makedefs.exe
  1813. X    .\makedefs -r
  1814. X
  1815. X# *****************************************************************************
  1816. X# ************************ Secondary targets **********************************
  1817. X# *****************************************************************************
  1818. X
  1819. Xall:    install
  1820. X
  1821. Xinstall:    $(OBJ) lev_comp.exe $(GAMEFILE) auxil.tag install.tag
  1822. X    @echo Don't forget to check HACKDIR in NetHack.cnf.
  1823. X    @echo Done.
  1824. X
  1825. Xinstall.tag:
  1826. X    copy $(OTHERS)\termcap        $(GAMEDIR)
  1827. X    copy $(AUX)\*.            $(GAMEDIR)
  1828. X    del  $(GAMEDIR)\MacHelp
  1829. X    copy $(OTHERS)\NetHack.cnf    $(GAMEDIR)
  1830. X    echo install done > install.tag
  1831. X
  1832. Xspec_lev.tag: lev_comp.exe $(AUX)\castle.des $(AUX)\endgame.des $(AUX)\tower.des
  1833. X    lev_comp $(AUX)\castle.des
  1834. X    lev_comp $(AUX)\endgame.des
  1835. X    lev_comp $(AUX)\tower.des
  1836. X    copy castle $(GAMEDIR)
  1837. X    copy endgame $(GAMEDIR)
  1838. X    copy tower? $(GAMEDIR)
  1839. X    del castle
  1840. X    del endgame
  1841. X    del tower?
  1842. X    echo spec_lev done > spec_lev.tag
  1843. X
  1844. Xauxil.tag:    spec_lev.tag    data    rumors
  1845. X    echo special levels created > auxil.tag
  1846. X
  1847. Xclean:
  1848. X    del $(OBJ)\*.o
  1849. X    del $(OBJ)\*.0
  1850. X    del $(OBJ)\*.0-1
  1851. X    del $(OBJ)\*.0-2
  1852. X    del $(OBJ)\*.0-3
  1853. X    del $(OBJ)\*.1
  1854. X    del $(OBJ)\*.1-2
  1855. X    del $(OBJ)\*.1-3
  1856. X    del $(OBJ)\*.1-b
  1857. X    del $(OBJ)\*.2
  1858. X    del $(OBJ)\*.2-3
  1859. X    del $(OBJ)\*.2-b
  1860. X    del $(OBJ)\*.3
  1861. X    del $(OBJ)\*.3-b
  1862. X    del $(OBJ)\*.b
  1863. X    del $(OBJ)\*.obj
  1864. X    rmdir $(OBJ)
  1865. X
  1866. Xspotless: clean
  1867. X    del $(INCL)\date.h
  1868. X    del $(INCL)\onames.h
  1869. X    del $(INCL)\pm.h
  1870. X    if exist makedefs.exe del makedefs.exe
  1871. X    if exist lev_comp.exe del lev_comp.exe
  1872. X    del castle
  1873. X    del endgame
  1874. X    del tower?
  1875. X    del *.bak
  1876. X    del *.tag
  1877. X    del *.map
  1878. X    del *.obj
  1879. X    del *.lib
  1880. X    del *.txt
  1881. X    del $(AUX)\data
  1882. X    del $(AUX)\rumors
  1883. X
  1884. X# *****************************************************************************
  1885. X# ************************* Other dependencies ********************************
  1886. X# *****************************************************************************
  1887. X# Other dependencies
  1888. X#
  1889. X# I deleted that line.    ;-}
  1890. X
  1891. X$(OBJ)\allmain.0:    $(HACK_H)
  1892. X$(OBJ)\allmain.1:    $(HACK_H)
  1893. X$(OBJ)\allmain.2-b:    $(HACK_H)
  1894. X$(OBJ)\alloc.o:     $(CONFIG_H)
  1895. X$(OBJ)\apply.0:     $(HACK_H)   $(INCL)\edog.h
  1896. X$(OBJ)\apply.1:     $(HACK_H)   $(INCL)\edog.h
  1897. X$(OBJ)\apply.2-b:    $(HACK_H)   $(INCL)\edog.h
  1898. X$(OBJ)\artifact.0:    $(HACK_H)   $(INCL)\artifact.h
  1899. X$(OBJ)\artifact.1:    $(HACK_H)   $(INCL)\artifact.h
  1900. X$(OBJ)\artifact.2:    $(HACK_H)   $(INCL)\artifact.h
  1901. X$(OBJ)\artifact.b:    $(HACK_H)   $(INCL)\artifact.h
  1902. X$(OBJ)\attrib.0:    $(HACK_H)
  1903. X$(OBJ)\attrib.1:    $(HACK_H)
  1904. X$(OBJ)\attrib.2-b:    $(HACK_H)
  1905. X$(OBJ)\bones.o:     $(HACK_H)
  1906. X$(OBJ)\cmd.0:        $(HACK_H)   $(INCL)\func_tab.h
  1907. X$(OBJ)\cmd.1:        $(HACK_H)   $(INCL)\func_tab.h
  1908. X$(OBJ)\cmd.2-b:     $(HACK_H)   $(INCL)\func_tab.h
  1909. X$(OBJ)\dbridge.0:    $(HACK_H)
  1910. X$(OBJ)\dbridge.1-b:    $(HACK_H)
  1911. X$(OBJ)\decl.o:        $(HACK_H)
  1912. X$(OBJ)\demon.o:     $(HACK_H)
  1913. X$(OBJ)\do.0:        $(HACK_H)
  1914. X$(OBJ)\do.1:        $(HACK_H)
  1915. X$(OBJ)\do.2:        $(HACK_H)
  1916. X$(OBJ)\do.3:        $(HACK_H)
  1917. X$(OBJ)\do.b:        $(HACK_H)
  1918. X$(OBJ)\do_name.0:    $(HACK_H)
  1919. X$(OBJ)\do_name.1-b:    $(HACK_H)
  1920. X$(OBJ)\do_wear.0-1:    $(HACK_H)
  1921. X$(OBJ)\do_wear.2:    $(HACK_H)
  1922. X$(OBJ)\do_wear.b:    $(HACK_H)
  1923. X$(OBJ)\dog.0:        $(HACK_H)   $(INCL)\edog.h
  1924. X$(OBJ)\dog.1:        $(HACK_H)   $(INCL)\edog.h
  1925. X$(OBJ)\dog.2:        $(HACK_H)   $(INCL)\edog.h
  1926. X$(OBJ)\dog.b:        $(HACK_H)   $(INCL)\edog.h
  1927. X$(OBJ)\dogmove.o:    $(HACK_H)   $(INCL)\mfndpos.h     $(INCL)\edog.h
  1928. X$(OBJ)\dokick.o:    $(HACK_H)   $(INCL)\eshk.h
  1929. X$(OBJ)\dothrow.o:    $(HACK_H)
  1930. X$(OBJ)\eat.0:        $(HACK_H)
  1931. X$(OBJ)\eat.1:        $(HACK_H)
  1932. X$(OBJ)\eat.2-b:     $(HACK_H)
  1933. X$(OBJ)\end.o:        $(HACK_H)   $(INCL)\eshk.h
  1934. X$(OBJ)\engrave.0-1:    $(HACK_H)
  1935. X$(OBJ)\engrave.2:    $(HACK_H)
  1936. X$(OBJ)\engrave.b:    $(HACK_H)
  1937. X$(OBJ)\exper.o:     $(HACK_H)
  1938. X$(OBJ)\extralev.o:    $(HACK_H)
  1939. X$(OBJ)\fountain.o:    $(HACK_H)
  1940. X$(OBJ)\getline.0-1:    $(HACK_H)   $(INCL)\func_tab.h
  1941. X$(OBJ)\getline.2:    $(HACK_H)   $(INCL)\func_tab.h
  1942. X$(OBJ)\getline.b:    $(HACK_H)   $(INCL)\func_tab.h
  1943. X$(OBJ)\hack.0:        $(HACK_H)
  1944. X$(OBJ)\hack.1:        $(HACK_H)
  1945. X$(OBJ)\hack.2:        $(HACK_H)
  1946. X$(OBJ)\hack.b:        $(HACK_H)
  1947. X$(OBJ)\invent.0:    $(HACK_H)   $(INCL)\lev.h     $(INCL)\wseg.h
  1948. X$(OBJ)\invent.1:    $(HACK_H)   $(INCL)\lev.h     $(INCL)\wseg.h
  1949. X$(OBJ)\invent.2:    $(HACK_H)   $(INCL)\lev.h     $(INCL)\wseg.h
  1950. X$(OBJ)\invent.3:    $(HACK_H)   $(INCL)\lev.h     $(INCL)\wseg.h
  1951. X$(OBJ)\invent.b:    $(HACK_H)   $(INCL)\lev.h     $(INCL)\wseg.h
  1952. X$(OBJ)\ioctl.o:     $(HACK_H)
  1953. X$(OBJ)\lev_main.o:    $(HACK_H)   $(INCL)\sp_lev.h
  1954. X$(OBJ)\lock.0:        $(HACK_H)
  1955. X$(OBJ)\lock.1-b:    $(HACK_H)
  1956. X$(OBJ)\mail.0:        $(HACK_H)
  1957. X$(OBJ)\mail.1-b:    $(HACK_H)
  1958. X$(OBJ)\makemon.0-2:    $(HACK_H)
  1959. X$(OBJ)\makemon.b:    $(HACK_H)
  1960. X$(OBJ)\mcastu.o:    $(HACK_H)
  1961. X$(OBJ)\mhitm.0:     $(HACK_H)   $(INCL)\artifact.h
  1962. X$(OBJ)\mhitm.1-b:    $(HACK_H)   $(INCL)\artifact.h
  1963. X$(OBJ)\mhitu.0-1:    $(HACK_H)   $(INCL)\artifact.h     $(INCL)\edog.h
  1964. X$(OBJ)\mhitu.2-b:    $(HACK_H)   $(INCL)\artifact.h     $(INCL)\edog.h
  1965. X$(OBJ)\mklev.o:     $(HACK_H)
  1966. X$(OBJ)\mkmaze.o:    $(HACK_H)
  1967. X$(OBJ)\mkobj.0:     $(HACK_H)
  1968. X$(OBJ)\mkobj.1:     $(HACK_H)
  1969. X$(OBJ)\mkobj.2-b:    $(HACK_H)
  1970. X$(OBJ)\mkroom.0:    $(HACK_H)
  1971. X$(OBJ)\mkroom.1-b:    $(HACK_H)
  1972. X$(OBJ)\mon.0-1:     $(HACK_H)   $(INCL)\mfndpos.h     $(INCL)\wseg.h
  1973. X$(OBJ)\mon.2-b:     $(HACK_H)   $(INCL)\mfndpos.h     $(INCL)\wseg.h
  1974. X$(OBJ)\mondata.0-1:    $(HACK_H)   $(INCL)\eshk.h     $(INCL)\epri.h
  1975. X$(OBJ)\mondata.2:    $(HACK_H)   $(INCL)\eshk.h     $(INCL)\epri.h
  1976. X$(OBJ)\mondata.b:    $(HACK_H)   $(INCL)\eshk.h     $(INCL)\epri.h
  1977. X$(OBJ)\monmove.0-1:    $(HACK_H)   $(INCL)\mfndpos.h     $(INCL)\artifact.h
  1978. X$(OBJ)\monmove.2-b:    $(HACK_H)   $(INCL)\mfndpos.h     $(INCL)\artifact.h
  1979. X$(OBJ)\monst.o:     $(CONFIG_H) $(PERMONST_H)     $(INCL)\eshk.h \
  1980. X            $(INCL)\vault.h $(INCL)\epri.h     $(INCL)\color.h
  1981. X$(OBJ)\msdos.o:     $(HACK_H)
  1982. X$(OBJ)\mthrowu.0:    $(HACK_H)
  1983. X$(OBJ)\mthrowu.1:    $(HACK_H)
  1984. X$(OBJ)\mthrowu.2-b:    $(HACK_H)
  1985. X$(OBJ)\music.o:     $(HACK_H)
  1986. X$(OBJ)\o_init.o:    $(HACK_H)
  1987. X$(OBJ)\objects.o:    $(CONFIG_H) $(INCL)\obj.h     $(INCL)\objclass.h \
  1988. X            $(INCL)\prop.h    $(INCL)\color.h
  1989. X$(OBJ)\objnam.0-1:    $(HACK_H)
  1990. X$(OBJ)\objnam.2-b:    $(HACK_H)
  1991. X$(OBJ)\options.o:    $(HACK_H)
  1992. X$(OBJ)\pager.0:     $(HACK_H)
  1993. X$(OBJ)\pager.1-b:    $(HACK_H)
  1994. X$(OBJ)\panic.o:     $(CONFIG_H)
  1995. X$(OBJ)\pickup.0:    $(HACK_H)
  1996. X$(OBJ)\pickup.1:    $(HACK_H)
  1997. X$(OBJ)\pickup.2-b:    $(HACK_H)
  1998. X$(OBJ)\polyself.0-1:    $(HACK_H)
  1999. X$(OBJ)\polyself.2-b:    $(HACK_H)
  2000. X$(OBJ)\potion.o:    $(HACK_H)
  2001. X$(OBJ)\pray.o:        $(HACK_H)
  2002. X$(OBJ)\pri.0:        $(HACK_H)   $(INCL)\epri.h     $(INCL)\termcap.h
  2003. X$(OBJ)\pri.1:        $(HACK_H)   $(INCL)\epri.h     $(INCL)\termcap.h
  2004. X$(OBJ)\pri.2:        $(HACK_H)   $(INCL)\epri.h     $(INCL)\termcap.h
  2005. X$(OBJ)\pri.b:        $(HACK_H)   $(INCL)\epri.h     $(INCL)\termcap.h
  2006. X$(OBJ)\priest.0:    $(HACK_H)   $(INCL)\mfndpos.h     $(INCL)\eshk.h \
  2007. X            $(INCL)\epri.h
  2008. X$(OBJ)\priest.1-b:    $(HACK_H)   $(INCL)\mfndpos.h     $(INCL)\eshk.h \
  2009. X            $(INCL)\epri.h
  2010. X$(OBJ)\prisym.0:    $(HACK_H)   $(INCL)\lev.h     $(INCL)\wseg.h
  2011. X$(OBJ)\prisym.1:    $(HACK_H)   $(INCL)\lev.h     $(INCL)\wseg.h
  2012. X$(OBJ)\prisym.2:    $(HACK_H)   $(INCL)\lev.h     $(INCL)\wseg.h
  2013. X$(OBJ)\prisym.b:    $(HACK_H)   $(INCL)\lev.h     $(INCL)\wseg.h
  2014. X$(OBJ)\random.o:
  2015. X$(OBJ)\read.0:        $(HACK_H)
  2016. X$(OBJ)\read.1-b:    $(HACK_H)
  2017. X$(OBJ)\restore.o:    $(HACK_H)   $(INCL)\lev.h     $(INCL)\wseg.h
  2018. X$(OBJ)\rip.o:        $(HACK_H)
  2019. X$(OBJ)\rnd.0:        $(HACK_H)
  2020. X$(OBJ)\rnd.1:        $(HACK_H)
  2021. X$(OBJ)\rnd.2-b:     $(HACK_H)
  2022. X$(OBJ)\rumors.o:    $(HACK_H)
  2023. X$(OBJ)\save.o:        $(HACK_H)   $(INCL)\lev.h     $(INCL)\wseg.h
  2024. X$(OBJ)\search.0:    $(HACK_H)   $(INCL)\artifact.h
  2025. X$(OBJ)\search.1-b:    $(HACK_H)   $(INCL)\artifact.h
  2026. X$(OBJ)\shk.0:        $(HACK_H)   $(INCL)\eshk.h
  2027. X$(OBJ)\shk.1-b:     $(HACK_H)   $(INCL)\eshk.h
  2028. X$(OBJ)\shknam.0:    $(HACK_H)   $(INCL)\eshk.h
  2029. X$(OBJ)\shknam.1-b:    $(HACK_H)   $(INCL)\eshk.h
  2030. X$(OBJ)\sit.o:        $(HACK_H)
  2031. X$(OBJ)\sounds.0:    $(HACK_H)   $(INCL)\edog.h     $(INCL)\eshk.h
  2032. X$(OBJ)\sounds.1-b:    $(HACK_H)   $(INCL)\edog.h     $(INCL)\eshk.h
  2033. X$(OBJ)\sp_lev.o:    $(HACK_H)   $(INCL)\sp_lev.h
  2034. X$(OBJ)\spell.o:     $(HACK_H)
  2035. X$(OBJ)\steal.0-1:    $(HACK_H)
  2036. X$(OBJ)\steal.2-b:    $(HACK_H)
  2037. X$(OBJ)\termcap.0:    $(HACK_H)   $(INCL)\termcap.h
  2038. X$(OBJ)\termcap.1:    $(HACK_H)   $(INCL)\termcap.h
  2039. X$(OBJ)\termcap.2-b:    $(HACK_H)   $(INCL)\termcap.h
  2040. X$(OBJ)\timeout.0:    $(HACK_H)
  2041. X$(OBJ)\timeout.1-b:    $(HACK_H)
  2042. X$(OBJ)\topl.0:        $(HACK_H)
  2043. X$(OBJ)\topl.1-2:    $(HACK_H)
  2044. X$(OBJ)\topl.b:        $(HACK_H)
  2045. X$(OBJ)\topten.o:    $(HACK_H)
  2046. X$(OBJ)\track.0:     $(HACK_H)
  2047. X$(OBJ)\track.1:     $(HACK_H)
  2048. X$(OBJ)\track.2-b:    $(HACK_H)
  2049. X$(OBJ)\trampoli.o:    $(HACK_H)
  2050. X$(OBJ)\trap.0-1:    $(HACK_H)   $(INCL)\edog.h
  2051. X$(OBJ)\trap.2:        $(HACK_H)   $(INCL)\edog.h
  2052. X$(OBJ)\trap.b:        $(HACK_H)   $(INCL)\edog.h
  2053. X$(OBJ)\u_init.o:    $(HACK_H)
  2054. X$(OBJ)\uhitm.o:     $(HACK_H)   $(INCL)\artifact.h
  2055. X$(OBJ)\vault.0:     $(HACK_H)   $(INCL)\vault.h
  2056. X$(OBJ)\vault.1-b:    $(HACK_H)   $(INCL)\vault.h
  2057. X$(OBJ)\version.o:    $(HACK_H)   $(INCL)\date.h     $(INCL)\patchlev.h
  2058. X$(OBJ)\weapon.0-1:    $(HACK_H)
  2059. X$(OBJ)\weapon.2-b:    $(HACK_H)
  2060. X$(OBJ)\were.0:        $(HACK_H)
  2061. X$(OBJ)\were.1-b:    $(HACK_H)
  2062. X$(OBJ)\wield.o:     $(HACK_H)
  2063. X$(OBJ)\wizard.0:    $(HACK_H)
  2064. X$(OBJ)\wizard.1-b:    $(HACK_H)
  2065. X$(OBJ)\worm.o:        $(HACK_H)   $(INCL)\wseg.h
  2066. X$(OBJ)\worn.o:        $(HACK_H)
  2067. X$(OBJ)\write.o:     $(HACK_H)
  2068. X$(OBJ)\zap.o:        $(HACK_H)
  2069. END_OF_FILE
  2070. if test 24533 -ne `wc -c <'others/Makefile.ovl'`; then
  2071.     echo shar: \"'others/Makefile.ovl'\" unpacked with wrong size!
  2072. fi
  2073. # end of 'others/Makefile.ovl'
  2074. fi
  2075. echo shar: End of archive 33 \(of 56\).
  2076. cp /dev/null ark33isdone
  2077. MISSING=""
  2078. 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 ; do
  2079.     if test ! -f ark${I}isdone ; then
  2080.     MISSING="${MISSING} ${I}"
  2081.     fi
  2082. done
  2083. if test "${MISSING}" = "" ; then
  2084.     echo You have unpacked all 56 archives.
  2085.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  2086. else
  2087.     echo You still need to unpack the following archives:
  2088.     echo "        " ${MISSING}
  2089. fi
  2090. ##  End of shell archive.
  2091. exit 0
  2092.