home *** CD-ROM | disk | FTP | other *** search
/ Giga Games 1 / Giga Games.iso / net / usenet / volume7 / nethack3 / patch7h < prev    next >
Encoding:
Internet Message Format  |  1990-02-26  |  59.0 KB

  1. Path: uunet!cs.utexas.edu!usc!brutus.cs.uiuc.edu!uakari!caesar.cs.montana.edu!milton!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: v09i008:  NetHack3 -  display oriented dungeons & dragons (Ver. 3.0), Patch7h
  5. Message-ID: <5222@tekred.CNA.TEK.COM>
  6. Date: 24 Feb 90 00:34:39 GMT
  7. Sender: news@tekred.CNA.TEK.COM
  8. Lines: 2354
  9. Approved: billr@saab.CNA.TEK.COM
  10.  
  11. Submitted-by: Izchak Miller <izchak@linc.cis.upenn.edu>
  12. Posting-number: Volume 9, Issue 8
  13. Archive-name: NetHack3/Patch7h
  14. Patch-To: 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 8 (of 30)."
  25. # Contents:  patch7.04
  26. # Wrapped by billr@saab on Wed Feb 21 10:04:29 1990
  27. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  28. if test -f 'patch7.04' -a "${1}" != "-c" ; then 
  29.   echo shar: Renaming existing file \"'patch7.04'\" to \"'patch7.04.orig'\"
  30.   mv -f 'patch7.04' 'patch7.04.orig'
  31. fi
  32. echo shar: Extracting \"'patch7.04'\" \(56054 characters\)
  33. sed "s/^X//" >'patch7.04' <<'END_OF_FILE'
  34. X*** src/Old/end.c    Mon Feb 19 18:02:33 1990
  35. X--- src/end.c    Mon Feb 19 13:40:25 1990
  36. X***************
  37. X*** 2,10 ****
  38. X  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  39. X  /* NetHack may be freely redistributed.  See license for details. */
  40. X  
  41. X  /* block some unused #defines to avoid overloading some cpp's */
  42. X- #define MONATTK_H
  43. X- #define NEED_VARARGS
  44. X  
  45. X  #include "hack.h"
  46. X  #ifndef NO_SIGNAL
  47. X--- 2,10 ----
  48. X  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  49. X  /* NetHack may be freely redistributed.  See license for details. */
  50. X  
  51. X+ #define MONATTK_H    /* comment line for pre-compiled headers */
  52. X+ #define NEED_VARARGS    /* comment line for pre-compiled headers */
  53. X  /* block some unused #defines to avoid overloading some cpp's */
  54. X  
  55. X  #include "hack.h"
  56. X  #ifndef NO_SIGNAL
  57. X***************
  58. X*** 13,19 ****
  59. X  
  60. X  #include "eshk.h"
  61. X  
  62. X! void end_box_display();
  63. X  
  64. X  static const char *deaths[] = {        /* the array of death */
  65. X      "died", "choked", "poisoned", "starvation", "drowning",
  66. X--- 13,20 ----
  67. X  
  68. X  #include "eshk.h"
  69. X  
  70. X! void NDECL(end_box_display);
  71. X! static int NDECL(done_intr);
  72. X  
  73. X  static const char *deaths[] = {        /* the array of death */
  74. X      "died", "choked", "poisoned", "starvation", "drowning",
  75. X***************
  76. X*** 49,56 ****
  77. X--- 50,62 ----
  78. X  int
  79. X  done2()
  80. X  {
  81. X+ #ifdef MACOS
  82. X+     if(!flags.silent) SysBeep(1);
  83. X+     if(UseMacAlert(128) != 1) {
  84. X+ #else
  85. X      pline("Really quit? ");
  86. X      if(yn() == 'n') {
  87. X+ #endif
  88. X  #ifndef NO_SIGNAL
  89. X          (void) signal(SIGINT, (SIG_RET_TYPE) done1);
  90. X  #endif
  91. X***************
  92. X*** 61,80 ****
  93. X          multi = 0;
  94. X          return 0;
  95. X      }
  96. X! #if defined(WIZARD) && (defined(UNIX) || defined(VMS))
  97. X      if(wizard) {
  98. X! #ifdef VMS
  99. X          pline("Enter debugger? ");
  100. X! #else
  101. X          pline("Dump core? ");
  102. X! #endif
  103. X          if(yn() == 'y') {
  104. X          (void) signal(SIGINT, (SIG_RET_TYPE) done1);
  105. X          settty(NULL);
  106. X! #ifdef SYSV
  107. X          (void)
  108. X! #endif
  109. X              abort();
  110. X          }
  111. X      }
  112. X  #endif
  113. X--- 67,95 ----
  114. X          multi = 0;
  115. X          return 0;
  116. X      }
  117. X! #if defined(WIZARD) && (defined(UNIX) || defined(VMS) || defined(LATTICE))
  118. X      if(wizard) {
  119. X! # ifdef VMS
  120. X          pline("Enter debugger? ");
  121. X! # else
  122. X! #  ifdef LATTICE
  123. X!         pline("Create SnapShot? ");
  124. X! #  else
  125. X          pline("Dump core? ");
  126. X! #  endif
  127. X! # endif
  128. X! /* KL - do I need to change the next 3 lines? */
  129. X          if(yn() == 'y') {
  130. X          (void) signal(SIGINT, (SIG_RET_TYPE) done1);
  131. X          settty(NULL);
  132. X! #ifdef AMIGA
  133. X!         Abort(0);
  134. X! #else
  135. X! # ifdef SYSV
  136. X          (void)
  137. X! # endif
  138. X              abort();
  139. X+ #endif
  140. X          }
  141. X      }
  142. X  #endif
  143. X***************
  144. X*** 90,99 ****
  145. X      done_stopprint++;
  146. X  #ifndef NO_SIGNAL
  147. X      (void) signal(SIGINT, SIG_IGN);
  148. X! #if defined(UNIX) || defined(VMS)
  149. X      (void) signal(SIGQUIT, SIG_IGN);
  150. X! #endif
  151. X! #endif /* TOS /* */
  152. X      return 0;
  153. X  }
  154. X  
  155. X--- 105,114 ----
  156. X      done_stopprint++;
  157. X  #ifndef NO_SIGNAL
  158. X      (void) signal(SIGINT, SIG_IGN);
  159. X! # if defined(UNIX) || defined(VMS)
  160. X      (void) signal(SIGQUIT, SIG_IGN);
  161. X! # endif
  162. X! #endif /* NO_SIGNAL /* */
  163. X      return 0;
  164. X  }
  165. X  
  166. X***************
  167. X*** 116,123 ****
  168. X  
  169. X      You("die...");
  170. X      buf[0] = '\0';
  171. X!     if (mtmp->iswiz)
  172. X          Strcat(buf, "the ");
  173. X      if (mtmp->minvis)
  174. X          Strcat(buf, "invisible ");
  175. X      if (Hallucination)
  176. X--- 131,140 ----
  177. X  
  178. X      You("die...");
  179. X      buf[0] = '\0';
  180. X!     if (mtmp->iswiz) {
  181. X          Strcat(buf, "the ");
  182. X+         killer_format = KILLED_BY;
  183. X+     }
  184. X      if (mtmp->minvis)
  185. X          Strcat(buf, "invisible ");
  186. X      if (Hallucination)
  187. X***************
  188. X*** 125,136 ****
  189. X  
  190. X      if(mtmp->data->mlet == S_GHOST) {
  191. X          register char *gn = (char *) mtmp->mextra;
  192. X!         if (!Hallucination && !mtmp->minvis && *gn)
  193. X              Strcat(buf, "the ");
  194. X          Sprintf(eos(buf), (*gn ? "ghost of %s" : "ghost%s"), gn);
  195. X      } else if(mtmp->isshk) {
  196. X          Sprintf(eos(buf), "%s %s, the shopkeeper",
  197. X              (ESHK(mtmp)->ismale ? "Mr." : "Ms."), shkname(mtmp));
  198. X      } else Strcat(buf, mtmp->data->mname);
  199. X      if (mtmp->mnamelth) Sprintf(eos(buf), " called %s", NAME(mtmp));
  200. X      killer = buf;
  201. X--- 142,156 ----
  202. X  
  203. X      if(mtmp->data->mlet == S_GHOST) {
  204. X          register char *gn = (char *) mtmp->mextra;
  205. X!         if (!Hallucination && !mtmp->minvis && *gn) {
  206. X              Strcat(buf, "the ");
  207. X+             killer_format = KILLED_BY;
  208. X+         }
  209. X          Sprintf(eos(buf), (*gn ? "ghost of %s" : "ghost%s"), gn);
  210. X      } else if(mtmp->isshk) {
  211. X          Sprintf(eos(buf), "%s %s, the shopkeeper",
  212. X              (ESHK(mtmp)->ismale ? "Mr." : "Ms."), shkname(mtmp));
  213. X+         killer_format = KILLED_BY;
  214. X      } else Strcat(buf, mtmp->data->mname);
  215. X      if (mtmp->mnamelth) Sprintf(eos(buf), " called %s", NAME(mtmp));
  216. X      killer = buf;
  217. X***************
  218. X*** 155,174 ****
  219. X  extern boolean hu;    /* from save.c */
  220. X  
  221. X  void
  222. X! panic VA_DECL(char *, str)
  223. X      VA_START(str);
  224. X      VA_INIT(str, char *);
  225. X- #ifdef MACOS
  226. X-     puts(str);
  227. X-     more();
  228. X- #endif
  229. X  
  230. X      if(panicking++)
  231. X! #ifdef SYSV
  232. X          (void)
  233. X! #endif
  234. X          abort();    /* avoid loops - this should never happen*/
  235. X                      /* was exit(1) */
  236. X      home(); cls();
  237. X      (void) puts(" Suddenly, the dungeon collapses.");
  238. X  #if defined(WIZARD) && !defined(MSDOS)
  239. X--- 175,194 ----
  240. X  extern boolean hu;    /* from save.c */
  241. X  
  242. X  void
  243. X! panic VA_DECL(const char *, str)
  244. X      VA_START(str);
  245. X      VA_INIT(str, char *);
  246. X  
  247. X      if(panicking++)
  248. X! #ifdef AMIGA
  249. X!         Abort(0);
  250. X! #else
  251. X! # ifdef SYSV
  252. X          (void)
  253. X! # endif
  254. X          abort();    /* avoid loops - this should never happen*/
  255. X                      /* was exit(1) */
  256. X+ #endif
  257. X      home(); cls();
  258. X      (void) puts(" Suddenly, the dungeon collapses.");
  259. X  #if defined(WIZARD) && !defined(MSDOS)
  260. X***************
  261. X*** 195,208 ****
  262. X  #else
  263. X      (void) fputs(" ERROR:  ", stdout);
  264. X  #endif
  265. X      Vprintf(str,VA_ARGS);
  266. X      more();                /* contains a fflush() */
  267. X! #if defined(WIZARD) && (defined(UNIX) || defined(VMS))
  268. X      if (wizard)
  269. X! # ifdef SYSV
  270. X          (void)
  271. X! # endif
  272. X              abort();    /* generate core dump */
  273. X  #endif
  274. X      VA_END();
  275. X      done(PANICKED);
  276. X--- 215,240 ----
  277. X  #else
  278. X      (void) fputs(" ERROR:  ", stdout);
  279. X  #endif
  280. X+ #ifdef LATTICE
  281. X+     {
  282. X+     char pbuf[100];
  283. X+     vsprintf(pbuf,str,VA_ARGS);
  284. X+     (void)puts(pbuf);
  285. X+     }
  286. X+ #else
  287. X      Vprintf(str,VA_ARGS);
  288. X+ #endif
  289. X      more();                /* contains a fflush() */
  290. X! #if defined(WIZARD) && (defined(UNIX) || defined(VMS) || defined(LATTICE))
  291. X      if (wizard)
  292. X! # ifdef AMIGA
  293. X!         Abort(0);
  294. X! # else
  295. X! #  ifdef SYSV
  296. X          (void)
  297. X! #  endif
  298. X              abort();    /* generate core dump */
  299. X+ # endif
  300. X  #endif
  301. X      VA_END();
  302. X      done(PANICKED);
  303. X***************
  304. X*** 213,231 ****
  305. X  done(how)
  306. X  int how;
  307. X  {
  308. X      struct permonst *upmon;
  309. X!     char buf[BUFSZ], buf2[BUFSZ], buf3[BUFSZ];
  310. X!     /* buf: used if killer gets changed
  311. X       * buf2: same as player name, except it is capitalized
  312. X-      * buf3: used to copy killer in case it comes from something like
  313. X-         xname(), which would otherwise get overwritten when we call
  314. X-         xname() when listing possessions
  315. X       */
  316. X      char    c;
  317. X      boolean taken;
  318. X! 
  319. X!     Strcpy(buf3, (!killer || how >= PANICKED ? deaths[how] : killer));
  320. X!     killer = buf3;
  321. X  #ifdef WIZARD
  322. X      if (wizard && how == TRICKED) {
  323. X          You("are a very tricky wizard, it seems.");
  324. X--- 245,272 ----
  325. X  done(how)
  326. X  int how;
  327. X  {
  328. X+ #ifdef MACOS
  329. X+     int see_c;
  330. X+     char mac_buf[80];
  331. X+ #endif
  332. X      struct permonst *upmon;
  333. X!     char kilbuf[BUFSZ], buf2[BUFSZ];
  334. X!     /* kilbuf: used to copy killer in case it comes from something like
  335. X!      *    xname(), which would otherwise get overwritten when we call
  336. X!      *    xname() when listing possessions
  337. X       * buf2: same as player name, except it is capitalized
  338. X       */
  339. X      char    c;
  340. X      boolean taken;
  341. X! #ifdef ENDGAME
  342. X!     if (how == ASCENDED)
  343. X!         killer_format = NO_KILLER_PREFIX;
  344. X! #endif
  345. X!     /* Avoid killed by "a" burning or "a" starvation */
  346. X!     if (!killer && (how == STARVING || how == BURNING))
  347. X!         killer_format = KILLED_BY;
  348. X!     Strcpy(kilbuf, (!killer || how >= PANICKED ? deaths[how] : killer));
  349. X!     killer = kilbuf;
  350. X  #ifdef WIZARD
  351. X      if (wizard && how == TRICKED) {
  352. X          You("are a very tricky wizard, it seems.");
  353. X***************
  354. X*** 280,289 ****
  355. X  die:
  356. X  #ifndef NO_SIGNAL
  357. X      (void) signal(SIGINT, (SIG_RET_TYPE) done_intr);
  358. X! #if defined(UNIX) || defined(VMS)
  359. X      (void) signal(SIGQUIT, (SIG_RET_TYPE) done_intr);
  360. X      (void) signal(SIGHUP, (SIG_RET_TYPE) done_hangup);
  361. X! #endif
  362. X  #endif /* NO_SIGNAL /* */
  363. X      upmon = player_mon();
  364. X      if(u.ugrave_arise > -1) /* create no corpse */ ;
  365. X--- 321,330 ----
  366. X  die:
  367. X  #ifndef NO_SIGNAL
  368. X      (void) signal(SIGINT, (SIG_RET_TYPE) done_intr);
  369. X! # if defined(UNIX) || defined(VMS)
  370. X      (void) signal(SIGQUIT, (SIG_RET_TYPE) done_intr);
  371. X      (void) signal(SIGHUP, (SIG_RET_TYPE) done_hangup);
  372. X! # endif
  373. X  #endif /* NO_SIGNAL /* */
  374. X      upmon = player_mon();
  375. X      if(u.ugrave_arise > -1) /* create no corpse */ ;
  376. X***************
  377. X*** 297,307 ****
  378. X          (void) mk_named_object(CORPSE, upmon, u.ux, u.uy, plname,
  379. X                              strlen(plname));
  380. X  
  381. X!     if(how == QUIT && u.uhp < 1) {
  382. X!         how = DIED;
  383. X!         Strcpy(buf, "quit while already on Charon's boat");
  384. X!         killer = buf;
  385. X      }
  386. X      taken = paybill();
  387. X      paygd();
  388. X      clearlocks();
  389. X--- 338,352 ----
  390. X          (void) mk_named_object(CORPSE, upmon, u.ux, u.uy, plname,
  391. X                              strlen(plname));
  392. X  
  393. X!     if (how == QUIT) {
  394. X!         killer_format = NO_KILLER_PREFIX;
  395. X!         if (u.uhp < 1) {
  396. X!             how = DIED;
  397. X! /* note that killer is pointing at kilbuf */
  398. X!             Strcpy(kilbuf, "quit while already on Charon's boat");
  399. X!         }
  400. X      }
  401. X+     if (how == ESCAPED) killer_format = NO_KILLER_PREFIX;
  402. X      taken = paybill();
  403. X      paygd();
  404. X      clearlocks();
  405. X***************
  406. X*** 308,320 ****
  407. X      if(flags.toplin == 1) more();
  408. X  
  409. X      if(invent) {
  410. X          if(taken)
  411. X          pline("Do you want to see what you had when you %s? ",
  412. X              (how == QUIT) ? "quit" : "died");
  413. X          else
  414. X          pline("Do you want your possessions identified? ");
  415. X-         /* New dump format by maartenj@cs.vu.nl */
  416. X          if ((c = yn_function(ynqchars,'y')) == 'y') {
  417. X          struct obj *obj;
  418. X  
  419. X          for(obj = invent; obj && !done_stopprint; obj = obj->nobj) {
  420. X--- 353,381 ----
  421. X      if(flags.toplin == 1) more();
  422. X  
  423. X      if(invent) {
  424. X+ #ifndef MACOS
  425. X          if(taken)
  426. X          pline("Do you want to see what you had when you %s? ",
  427. X              (how == QUIT) ? "quit" : "died");
  428. X          else
  429. X          pline("Do you want your possessions identified? ");
  430. X          if ((c = yn_function(ynqchars,'y')) == 'y') {
  431. X+ #else
  432. X+         {
  433. X+             extern short macflags;
  434. X+         
  435. X+             /* stop user from using menus, etc. */
  436. X+             macflags &= ~(fDoNonKeyEvt | fDoUpdate);
  437. X+         }
  438. X+         if(taken)
  439. X+         sprintf(mac_buf, "Do you want to see what you had when you %s? ",
  440. X+             (how == QUIT) ? "quit" : "died");
  441. X+         else
  442. X+         sprintf(mac_buf, "Do you want your possessions identified? ");
  443. X+         if(!flags.silent) SysBeep(1);
  444. X+         if ((c = "qqynq"[UseMacAlertText(129,mac_buf)+1]) == 'y') {
  445. X+ #endif
  446. X+         /* New dump format by maartenj@cs.vu.nl */
  447. X          struct obj *obj;
  448. X  
  449. X          for(obj = invent; obj && !done_stopprint; obj = obj->nobj) {
  450. X***************
  451. X*** 339,361 ****
  452. X          }
  453. X      }
  454. X  
  455. X      if(how < GENOCIDED) {
  456. X  #ifdef WIZARD
  457. X          if(wizard) {
  458. X          pline("Save bones? ");
  459. X          if(yn() == 'y') savebones();
  460. X          }  else
  461. X  #endif
  462. X!         savebones();
  463. X          if(!flags.notombstone) outrip();
  464. X      }
  465. X!     if(how == STONING) {
  466. X!         Strcpy(buf, "turned to stone by ");
  467. X!         Strcat(buf, killer);
  468. X!         /* No a or an; topten.c will do that. */
  469. X!         killer = buf;
  470. X!     }
  471. X!     if(u.uhave_amulet) Strcat(killer, " (with the Amulet)");
  472. X      settty(NULL);    /* does a clear_screen() */
  473. X      Strcpy(buf2, plname);
  474. X      if('a' <= buf2[0] && buf2[0] <= 'z') buf2[0] += 'A'-'a';
  475. X--- 400,437 ----
  476. X          }
  477. X      }
  478. X  
  479. X+     if (!done_stopprint) {
  480. X+ #ifdef MACOS
  481. X+         c = "qqynq"[UseMacAlertText(129, "Do you want to see your instrinsics ?")+1];
  482. X+ #else
  483. X+         pline("Do you want to see your intrinsics? ");
  484. X+         c = yn_function(ynqchars, 'y');
  485. X+ #endif
  486. X+         if (c == 'y') enlightenment();
  487. X+         if (c == 'q') done_stopprint++;
  488. X+     }
  489. X+ 
  490. X      if(how < GENOCIDED) {
  491. X  #ifdef WIZARD
  492. X          if(wizard) {
  493. X+ #ifdef MACOS
  494. X+         if(!flags.silent) SysBeep(20);
  495. X+         if(UseMacAlertText(128, "Save bones ?") == 1) savebones();
  496. X+ #else
  497. X          pline("Save bones? ");
  498. X          if(yn() == 'y') savebones();
  499. X+ #endif
  500. X          }  else
  501. X  #endif
  502. X!         if (how != PANICKED && how !=TRICKED)
  503. X!             savebones();
  504. X          if(!flags.notombstone) outrip();
  505. X      }
  506. X! 
  507. X! /* changing kilbuf really changes killer. we do it this way because
  508. X!    killer is declared a (const char *)
  509. X! */
  510. X!     if(u.uhave_amulet) Strcat(kilbuf, " (with the Amulet)");
  511. X      settty(NULL);    /* does a clear_screen() */
  512. X      Strcpy(buf2, plname);
  513. X      if('a' <= buf2[0] && buf2[0] <= 'z') buf2[0] += 'A'-'a';
  514. X***************
  515. X*** 362,369 ****
  516. X      if(!done_stopprint)
  517. X          Printf("Goodbye %s the %s...\n\n", buf2,
  518. X  #ifdef ENDGAME
  519. X!            how != ASCENDED ? pl_character :
  520. X!            flags.female ? "Demigoddess" : "Demigod");
  521. X  #else
  522. X             pl_character);
  523. X  #endif
  524. X--- 438,446 ----
  525. X      if(!done_stopprint)
  526. X          Printf("Goodbye %s the %s...\n\n", buf2,
  527. X  #ifdef ENDGAME
  528. X!            how != ASCENDED ? (const char *)pl_character :
  529. X!            flags.female ? (const char *)"Demigoddess" : 
  530. X!             (const char *)"Demigod");
  531. X  #else
  532. X             pl_character);
  533. X  #endif
  534. X***************
  535. X*** 467,484 ****
  536. X      if(!done_stopprint)
  537. X    Printf("You were level %u with a maximum of %d hit points when you %s.\n",
  538. X          u.ulevel, u.uhpmax, ends[how]);
  539. X!     if(how == ESCAPED && !done_stopprint){
  540. X!         getret();    /* all those pieces of colored glass ... */
  541. X!         cls();
  542. X!     }
  543. X! #if (defined(WIZARD) || defined(EXPLORE_MODE)) && !defined(LOGFILE)
  544. X      if(wizard || discover)
  545. X          Printf("\nSince you were in %s mode, the score list \
  546. X  will not be checked.\n", wizard ? "wizard" : "discover");
  547. X      else
  548. X  #endif
  549. X!         topten();
  550. X  /* "So when I die, the first thing I will see in Heaven is a score list?" */
  551. X      if(done_stopprint) Printf("\n\n");
  552. X  #if defined(APOLLO) || defined(MACOS)
  553. X      getret();
  554. X--- 544,565 ----
  555. X      if(!done_stopprint)
  556. X    Printf("You were level %u with a maximum of %d hit points when you %s.\n",
  557. X          u.ulevel, u.uhpmax, ends[how]);
  558. X! #if (defined(WIZARD) || defined(EXPLORE_MODE))
  559. X! # ifndef LOGFILE
  560. X      if(wizard || discover)
  561. X          Printf("\nSince you were in %s mode, the score list \
  562. X  will not be checked.\n", wizard ? "wizard" : "discover");
  563. X      else
  564. X+ # endif
  565. X  #endif
  566. X!     {
  567. X!         if (!done_stopprint) {
  568. X!             getret();
  569. X!             cls();
  570. X!         }
  571. X  /* "So when I die, the first thing I will see in Heaven is a score list?" */
  572. X+         topten(how);
  573. X+     }
  574. X      if(done_stopprint) Printf("\n\n");
  575. X  #if defined(APOLLO) || defined(MACOS)
  576. X      getret();
  577. X***************
  578. X*** 488,499 ****
  579. X  
  580. X  void
  581. X  clearlocks(){
  582. X! #if defined(DGK) && !defined(OLD_TOS)
  583. X      eraseall(levels, alllevels);
  584. X      if (ramdisk)
  585. X          eraseall(permbones, alllevels);
  586. X  #else
  587. X! # if defined(UNIX) || (defined(MSDOS) && !defined(OLD_TOS)) || defined(VMS) || defined(MACOS)
  588. X      register int x;
  589. X  #  if defined(UNIX) || defined(VMS)
  590. X      (void) signal(SIGHUP,SIG_IGN);
  591. X--- 569,580 ----
  592. X  
  593. X  void
  594. X  clearlocks(){
  595. X! #if defined(DGK)
  596. X      eraseall(levels, alllevels);
  597. X      if (ramdisk)
  598. X          eraseall(permbones, alllevels);
  599. X  #else
  600. X! # if defined(UNIX) || defined(MSDOS) || defined(VMS) || defined(MACOS)
  601. X      register int x;
  602. X  #  if defined(UNIX) || defined(VMS)
  603. X      (void) signal(SIGHUP,SIG_IGN);
  604. X*** src/Old/engrave.c    Mon Feb 19 18:03:09 1990
  605. X--- src/engrave.c    Wed Feb 14 18:38:01 1990
  606. X***************
  607. X*** 4,10 ****
  608. X  
  609. X  #include    "hack.h"
  610. X  
  611. X! struct engr {
  612. X      struct engr *nxt_engr;
  613. X      char *engr_txt;
  614. X      xchar engr_x, engr_y;
  615. X--- 4,10 ----
  616. X  
  617. X  #include    "hack.h"
  618. X  
  619. X! VSTATIC struct engr {
  620. X      struct engr *nxt_engr;
  621. X      char *engr_txt;
  622. X      xchar engr_x, engr_y;
  623. X***************
  624. X*** 18,25 ****
  625. X  #define POLY    5    /* temporary type - for polymorphing engraving */
  626. X  } *head_engr;
  627. X  
  628. X! static void FDECL(del_engr, (struct engr *));
  629. X  
  630. X  /* random engravings */
  631. X  const char *random_engr[] =
  632. X               {"Elbereth", "ad ae?ar um",
  633. X--- 18,27 ----
  634. X  #define POLY    5    /* temporary type - for polymorphing engraving */
  635. X  } *head_engr;
  636. X  
  637. X! OSTATIC void FDECL(del_engr, (struct engr *));
  638. X! OSTATIC struct engr * FDECL(engr_at,(XCHAR_P,XCHAR_P));
  639. X  
  640. X+ #ifdef OVLB
  641. X  /* random engravings */
  642. X  const char *random_engr[] =
  643. X               {"Elbereth", "ad ae?ar um",
  644. X***************
  645. X*** 32,38 ****
  646. X               "Y?u won?t get i? up ?he ste?s",
  647. X               "A.S. ->"};
  648. X  
  649. X! static struct engr *
  650. X  engr_at(x,y) register xchar x,y; {
  651. X  register struct engr *ep = head_engr;
  652. X      while(ep) {
  653. X--- 34,43 ----
  654. X               "Y?u won?t get i? up ?he ste?s",
  655. X               "A.S. ->"};
  656. X  
  657. X! #endif /* OVLB */
  658. X! #ifdef OVL0
  659. X! 
  660. X! XSTATIC struct engr *
  661. X  engr_at(x,y) register xchar x,y; {
  662. X  register struct engr *ep = head_engr;
  663. X      while(ep) {
  664. X***************
  665. X*** 46,52 ****
  666. X  #ifdef ELBERETH
  667. X  int
  668. X  sengr_at(s,x,y)
  669. X!     register char *s;
  670. X      register xchar x,y;
  671. X  {
  672. X      register struct engr *ep = engr_at(x,y);
  673. X--- 51,57 ----
  674. X  #ifdef ELBERETH
  675. X  int
  676. X  sengr_at(s,x,y)
  677. X!     register const char *s;
  678. X      register xchar x,y;
  679. X  {
  680. X      register struct engr *ep = engr_at(x,y);
  681. X***************
  682. X*** 68,73 ****
  683. X--- 73,81 ----
  684. X  }
  685. X  #endif
  686. X  
  687. X+ #endif /* OVL0 */
  688. X+ #ifdef OVL2
  689. X+ 
  690. X  void
  691. X  u_wipe_engr(cnt)
  692. X  register int cnt;
  693. X***************
  694. X*** 76,81 ****
  695. X--- 84,92 ----
  696. X          wipe_engr_at(u.ux, u.uy, cnt);
  697. X  }
  698. X  
  699. X+ #endif /* OVL2 */
  700. X+ #ifdef OVL1
  701. X+ 
  702. X  void
  703. X  wipe_engr_at(x,y,cnt) register xchar x,y,cnt; {
  704. X  register struct engr *ep = engr_at(x,y);
  705. X***************
  706. X*** 104,109 ****
  707. X--- 115,123 ----
  708. X      }
  709. X  }
  710. X  
  711. X+ #endif /* OVL1 */
  712. X+ #ifdef OVL2
  713. X+ 
  714. X  void
  715. X  read_engr_at(x,y) register int x,y; {
  716. X  register struct engr *ep = engr_at(x,y);
  717. X***************
  718. X*** 136,145 ****
  719. X      }
  720. X  }
  721. X  
  722. X  void
  723. X  make_engr_at(x,y,s)
  724. X  register int x,y;
  725. X! register char *s;
  726. X  {
  727. X      register struct engr *ep;
  728. X  
  729. X--- 150,162 ----
  730. X      }
  731. X  }
  732. X  
  733. X+ #endif /* OVL2 */
  734. X+ #ifdef OVLB
  735. X+ 
  736. X  void
  737. X  make_engr_at(x,y,s)
  738. X  register int x,y;
  739. X! register const char *s;
  740. X  {
  741. X      register struct engr *ep;
  742. X  
  743. X***************
  744. X*** 163,169 ****
  745. X   */
  746. X  int
  747. X  freehand(){
  748. X- 
  749. X      return(!uwep ||
  750. X         !uwep->cursed ||
  751. X         (!bimanual(uwep) && (!uarms || !uarms->cursed)));
  752. X--- 180,185 ----
  753. X***************
  754. X*** 188,193 ****
  755. X--- 204,210 ----
  756. X  register char *sp, *sptmp;
  757. X  register struct engr *ep, *oep = engr_at(u.ux,u.uy);
  758. X  char buf[BUFSZ];
  759. X+ boolean jello = FALSE;
  760. X  xchar type, polytype = 0;
  761. X  int spct;        /* number of leading spaces */
  762. X  register struct obj *otmp;
  763. X***************
  764. X*** 194,201 ****
  765. X      multi = 0;
  766. X  
  767. X      if(u.uswallow) {
  768. X!         pline("What would you write?  \"Jonah was here\"?");
  769. X!         return(0);
  770. X      }
  771. X  
  772. X      /* one may write with finger, weapon or wand */
  773. X--- 211,225 ----
  774. X      multi = 0;
  775. X  
  776. X      if(u.uswallow) {
  777. X!         if (is_animal(u.ustuck->data)) {
  778. X!             pline("What would you write?  \"Jonah was here\"?");
  779. X!             return(0);
  780. X!         } else
  781. X!             if (is_whirly(u.ustuck->data)) {
  782. X!                 You("can't reach the ground.");
  783. X!                 return(0);
  784. X!             } else 
  785. X!                 jello = TRUE;
  786. X      }
  787. X  
  788. X      /* one may write with finger, weapon or wand */
  789. X***************
  790. X*** 225,230 ****
  791. X--- 249,262 ----
  792. X      if(otmp != &zeroobj && index(too_large,otmp->olet)) {
  793. X          You("can't engrave with such a large object!");
  794. X          return(1);
  795. X+        }
  796. X+ 
  797. X+     if (jello) {
  798. X+         You("tickle %s with your %s.", mon_nam(u.ustuck), 
  799. X+             (otmp == &zeroobj) ? makeplural(body_part(FINGER)) :
  800. X+             xname(otmp));
  801. X+         Your("message dissolves...");
  802. X+         return(0);
  803. X      }
  804. X  
  805. X      if(otmp != &zeroobj && index(paper,otmp->olet)) {
  806. X***************
  807. X*** 452,458 ****
  808. X              nomovemsg = "You finish writing.";
  809. X              if(type != MARK)
  810. X              nomovemsg = "You finish engraving.";
  811. X!             if(otmp->olet != WAND_SYM && otmp->otyp != ATHAME)  {
  812. X                  if(otmp->olet == WEAPON_SYM)
  813. X                      Your("%s dull.",
  814. X                             aobjnam(otmp, "get"));
  815. X--- 484,491 ----
  816. X              nomovemsg = "You finish writing.";
  817. X              if(type != MARK)
  818. X              nomovemsg = "You finish engraving.";
  819. X!             if(otmp->olet != WAND_SYM && (otmp->otyp != ATHAME
  820. X!                     || otmp->cursed))  {
  821. X                  if(otmp->olet == WEAPON_SYM)
  822. X                      Your("%s dull.",
  823. X                             aobjnam(otmp, "get"));
  824. X***************
  825. X*** 535,540 ****
  826. X--- 568,576 ----
  827. X  save_engravings(fd) int fd; {
  828. X  register struct engr *ep = head_engr;
  829. X  register struct engr *ep2;
  830. X+ #ifdef __GNULINT__
  831. X+ static long nulls[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
  832. X+ #endif
  833. X      while(ep) {
  834. X          ep2 = ep->nxt_engr;
  835. X          if(ep->engr_lth && ep->engr_txt[0]){
  836. X***************
  837. X*** 541,554 ****
  838. X          bwrite(fd, (genericptr_t)&(ep->engr_lth), sizeof(ep->engr_lth));
  839. X          bwrite(fd, (genericptr_t)ep, sizeof(struct engr) + ep->engr_lth);
  840. X          }
  841. X! #if defined(DGK) && !defined(OLD_TOS)
  842. X          if (!count_only)
  843. X  #endif
  844. X          free((genericptr_t) ep);
  845. X          ep = ep2;
  846. X      }
  847. X      bwrite(fd, (genericptr_t)nul, sizeof(unsigned));
  848. X! #if defined(DGK) && !defined(OLD_TOS)
  849. X      if (!count_only)
  850. X  #endif
  851. X          head_engr = 0;
  852. X--- 577,596 ----
  853. X          bwrite(fd, (genericptr_t)&(ep->engr_lth), sizeof(ep->engr_lth));
  854. X          bwrite(fd, (genericptr_t)ep, sizeof(struct engr) + ep->engr_lth);
  855. X          }
  856. X! #if defined(DGK)
  857. X          if (!count_only)
  858. X  #endif
  859. X          free((genericptr_t) ep);
  860. X          ep = ep2;
  861. X      }
  862. X+ 
  863. X+ #ifdef __GNULINT__
  864. X+     bwrite(fd, (genericptr_t)nulls, sizeof(unsigned));
  865. X+ #else
  866. X      bwrite(fd, (genericptr_t)nul, sizeof(unsigned));
  867. X! #endif
  868. X! 
  869. X! #if defined(DGK)
  870. X      if (!count_only)
  871. X  #endif
  872. X          head_engr = 0;
  873. X***************
  874. X*** 570,576 ****
  875. X      }
  876. X  }
  877. X  
  878. X! static void
  879. X  del_engr(ep) register struct engr *ep; {
  880. X  register struct engr *ept;
  881. X      if(ep == head_engr)
  882. X--- 612,618 ----
  883. X      }
  884. X  }
  885. X  
  886. X! XSTATIC void
  887. X  del_engr(ep) register struct engr *ep; {
  888. X  register struct engr *ept;
  889. X      if(ep == head_engr)
  890. X***************
  891. X*** 588,590 ****
  892. X--- 630,634 ----
  893. X      }
  894. X      free((genericptr_t) ep);
  895. X  }
  896. X+ 
  897. X+ #endif /* OVLB */
  898. X*** src/Old/exper.c    Mon Feb 19 18:03:38 1990
  899. X--- src/exper.c    Wed Nov 29 19:29:16 1989
  900. X***************
  901. X*** 117,123 ****
  902. X  
  903. X      if(u.ulevel > 1) {
  904. X          pline("Goodbye level %u.", u.ulevel--);
  905. X!         adjabil(-1);    /* remove intrinsic abilities */
  906. X      } else
  907. X          u.uhp = -1;
  908. X      num = newhp();
  909. X--- 117,124 ----
  910. X  
  911. X      if(u.ulevel > 1) {
  912. X          pline("Goodbye level %u.", u.ulevel--);
  913. X!         /* remove intrinsic abilities */
  914. X!         adjabil((int)u.ulevel+1, (int)u.ulevel);
  915. X      } else
  916. X          u.uhp = -1;
  917. X      num = newhp();
  918. X***************
  919. X*** 151,157 ****
  920. X          if (u.uexp >= newuexp(u.ulevel)) u.uexp = newuexp(u.ulevel) - 1;
  921. X          pline("Welcome to experience level %u.", u.ulevel);
  922. X          set_uasmon();    /* set up for the new level. */
  923. X!         adjabil(1);    /* give new intrinsic abilities */
  924. X          tmp = newhp();
  925. X          u.uhpmax += tmp;
  926. X          u.uhp += tmp;
  927. X--- 152,159 ----
  928. X          if (u.uexp >= newuexp(u.ulevel)) u.uexp = newuexp(u.ulevel) - 1;
  929. X          pline("Welcome to experience level %u.", u.ulevel);
  930. X          set_uasmon();    /* set up for the new level. */
  931. X!         /* give new intrinsics */
  932. X!         adjabil((int)u.ulevel-1, (int)u.ulevel);
  933. X          tmp = newhp();
  934. X          u.uhpmax += tmp;
  935. X          u.uhp += tmp;
  936. X***************
  937. X*** 180,186 ****
  938. X      if(u.ulevel < MAXULEV) {
  939. X          u.uexp = newuexp(u.ulevel);
  940. X          pline("Welcome to experience level %u.", ++u.ulevel);
  941. X!         adjabil(1);
  942. X      }
  943. X      flags.botl = 1;
  944. X  }
  945. X--- 182,188 ----
  946. X      if(u.ulevel < MAXULEV) {
  947. X          u.uexp = newuexp(u.ulevel);
  948. X          pline("Welcome to experience level %u.", ++u.ulevel);
  949. X!         adjabil((int)u.ulevel-1, (int)u.ulevel);
  950. X      }
  951. X      flags.botl = 1;
  952. X  }
  953. X*** src/Old/extralev.c    Mon Feb 19 18:03:58 1990
  954. X--- src/extralev.c    Thu Jan 25 22:04:06 1990
  955. X***************
  956. X*** 2,9 ****
  957. X  /*    Copyright 1988, 1989 by Ken Arromdee                */
  958. X  /* NetHack may be freely redistributed.  See license for details. */
  959. X  
  960. X  /* block some unused #defines to avoid overloading some cpp's */
  961. X- #define MONATTK_H
  962. X  #include "hack.h"
  963. X  
  964. X  #ifdef REINCARNATION
  965. X--- 2,9 ----
  966. X  /*    Copyright 1988, 1989 by Ken Arromdee                */
  967. X  /* NetHack may be freely redistributed.  See license for details. */
  968. X  
  969. X+ #define MONATTK_H    /* comment line for pre-compiled headers */
  970. X  /* block some unused #defines to avoid overloading some cpp's */
  971. X  #include "hack.h"
  972. X  
  973. X  #ifdef REINCARNATION
  974. X***************
  975. X*** 21,26 ****
  976. X--- 21,29 ----
  977. X  #define RIGHT 8
  978. X  
  979. X  static struct rogueroom r[3][3];
  980. X+ static void FDECL(roguejoin,(int,int,int,int,int));
  981. X+ static void FDECL(roguecorr,(int,int,int));
  982. X+ static void FDECL(miniwalk,(int,int));
  983. X  
  984. X  static
  985. X  void
  986. X*** src/Old/fountain.c    Mon Feb 19 18:04:25 1990
  987. X--- src/fountain.c    Wed Feb  7 18:37:42 1990
  988. X***************
  989. X*** 6,11 ****
  990. X--- 6,16 ----
  991. X  #include "hack.h"
  992. X  
  993. X  #ifdef FOUNTAINS
  994. X+ static void NDECL(dowatersnakes);
  995. X+ static void NDECL(dowaterdemon);
  996. X+ static void NDECL(dowaternymph);
  997. X+ static void FDECL(dogushforth,(int));    
  998. X+ static void NDECL(dofindgem);
  999. X  
  1000. X  static
  1001. X  void
  1002. X***************
  1003. X*** 12,18 ****
  1004. X  dowatersnakes() /* Fountain of snakes! */ {
  1005. X      register int num = rnd(6);
  1006. X      if (!(mons[PM_WATER_MOCCASIN].geno & G_GENOD)) {
  1007. X!         pline("An endless stream of snakes pours forth!");
  1008. X          while(num-- > 0) (void) makemon(&mons[PM_WATER_MOCCASIN],u.ux,u.uy);
  1009. X      } else
  1010. X          pline("The fountain bubbles furiously for a moment, then calms.");
  1011. X--- 17,26 ----
  1012. X  dowatersnakes() /* Fountain of snakes! */ {
  1013. X      register int num = rnd(6);
  1014. X      if (!(mons[PM_WATER_MOCCASIN].geno & G_GENOD)) {
  1015. X!         if (!Blind)
  1016. X!             pline("An endless stream of snakes pours forth!");
  1017. X!         else
  1018. X!             You("hear something hissing!");
  1019. X          while(num-- > 0) (void) makemon(&mons[PM_WATER_MOCCASIN],u.ux,u.uy);
  1020. X      } else
  1021. X          pline("The fountain bubbles furiously for a moment, then calms.");
  1022. X***************
  1023. X*** 24,34 ****
  1024. X  register struct monst *mtmp;
  1025. X  
  1026. X      if((mtmp = makemon(&mons[PM_WATER_DEMON],u.ux,u.uy))) {
  1027. X!         You("have unleashed %s!", defmonnam(mtmp));
  1028. X  
  1029. X      /* Give those on low levels a (slightly) better chance of survival */
  1030. X          if ( rnd(100) > (80 + dlevel)) {
  1031. X!         pline("Grateful for his release, he grants you a wish!");
  1032. X          makewish();
  1033. X          mongone(mtmp);
  1034. X          }
  1035. X--- 32,46 ----
  1036. X  register struct monst *mtmp;
  1037. X  
  1038. X      if((mtmp = makemon(&mons[PM_WATER_DEMON],u.ux,u.uy))) {
  1039. X!         if (!Blind)
  1040. X!             You("have unleashed %s!", defmonnam(mtmp));
  1041. X!         else
  1042. X!         You("feel the presence of evil.");
  1043. X  
  1044. X      /* Give those on low levels a (slightly) better chance of survival */
  1045. X          if ( rnd(100) > (80 + dlevel)) {
  1046. X!         pline("Grateful for %s release, %s grants you a wish!",
  1047. X!             Blind ? "its" : "his", Blind ? "it" : "he" );
  1048. X          makewish();
  1049. X          mongone(mtmp);
  1050. X          }
  1051. X***************
  1052. X*** 40,50 ****
  1053. X  dowaternymph() /* Water Nymph */ {
  1054. X      register struct monst *mtmp;
  1055. X      if((mtmp = makemon(&mons[PM_WATER_NYMPH],u.ux,u.uy))) {
  1056. X! 
  1057. X!         You("have attracted %s!", defmonnam(mtmp));
  1058. X          mtmp->msleep = 0;
  1059. X      } else
  1060. X!         pline("A large bubble rises to the surface and pops.");
  1061. X  }
  1062. X  
  1063. X  
  1064. X--- 52,67 ----
  1065. X  dowaternymph() /* Water Nymph */ {
  1066. X      register struct monst *mtmp;
  1067. X      if((mtmp = makemon(&mons[PM_WATER_NYMPH],u.ux,u.uy))) {
  1068. X!         if (!Blind)
  1069. X!            You("have attracted %s!", defmonnam(mtmp));
  1070. X!         else
  1071. X!            You("hear a seductive voice.");
  1072. X          mtmp->msleep = 0;
  1073. X      } else
  1074. X!         if (!Blind)
  1075. X!            pline("A large bubble rises to the surface and pops.");
  1076. X!         else
  1077. X!            You("hear a loud pop.");
  1078. X  }
  1079. X  
  1080. X  
  1081. X***************
  1082. X*** 106,112 ****
  1083. X  void
  1084. X  dryup(){
  1085. X      if (!rn2(3) && IS_FOUNTAIN(levl[u.ux][u.uy].typ)) {
  1086. X!         pline("The fountain dries up!");
  1087. X          levl[u.ux][u.uy].typ = ROOM;
  1088. X          levl[u.ux][u.uy].looted = 0;
  1089. X          if(Invisible) newsym(u.ux, u.uy);
  1090. X--- 123,129 ----
  1091. X  void
  1092. X  dryup(){
  1093. X      if (!rn2(3) && IS_FOUNTAIN(levl[u.ux][u.uy].typ)) {
  1094. X!         if (!Blind) pline("The fountain dries up!");
  1095. X          levl[u.ux][u.uy].typ = ROOM;
  1096. X          levl[u.ux][u.uy].looted = 0;
  1097. X          if(Invisible) newsym(u.ux, u.uy);
  1098. X***************
  1099. X*** 154,164 ****
  1100. X  #else
  1101. X         pline("Perhaps it is runoff from the nearby orange farm.");
  1102. X  #endif
  1103. X!                losehp(rnd(4),"unrefrigerated sip of juice");
  1104. X                 break;
  1105. X              }
  1106. X              losestr(rn1(4,3));
  1107. X!             losehp(rnd(10),"contaminated water");
  1108. X              break;
  1109. X      
  1110. X          case 22: /* Fountain of snakes! */
  1111. X--- 171,182 ----
  1112. X  #else
  1113. X         pline("Perhaps it is runoff from the nearby orange farm.");
  1114. X  #endif
  1115. X!                losehp(rnd(4),"unrefrigerated sip of juice",
  1116. X!                 KILLED_BY_AN);
  1117. X                 break;
  1118. X              }
  1119. X              losestr(rn1(4,3));
  1120. X!             losehp(rnd(10),"contaminated water", KILLED_BY);
  1121. X              break;
  1122. X      
  1123. X          case 22: /* Fountain of snakes! */
  1124. X***************
  1125. X*** 237,243 ****
  1126. X      }
  1127. X  
  1128. X      if (obj->otyp == LONG_SWORD && u.ulevel >= 5 && !rn2(6)
  1129. X! #ifndef NAMED_ITEMS
  1130. X          && !strcmp(ONAME(obj), "Excalibur")
  1131. X  #endif
  1132. X         ) {
  1133. X--- 255,263 ----
  1134. X      }
  1135. X  
  1136. X      if (obj->otyp == LONG_SWORD && u.ulevel >= 5 && !rn2(6)
  1137. X! #ifdef NAMED_ITEMS
  1138. X!         && !is_artifact(obj) && !exist_artifact(obj, "Excalibur")
  1139. X! #else
  1140. X          && !strcmp(ONAME(obj), "Excalibur")
  1141. X  #endif
  1142. X         ) {
  1143. X***************
  1144. X*** 314,319 ****
  1145. X--- 334,340 ----
  1146. X           * by.    Just like a shopping mall!  Chris Woodbury  */
  1147. X  
  1148. X              mkgold((long)(rnd((MAXLEVEL-dlevel)*2)+5), u.ux, u.uy);
  1149. X+             if (!Blind)
  1150. X          pline("Far below you, you see coins glistening in the water.");
  1151. X              break;
  1152. X      }
  1153. X***************
  1154. X*** 339,345 ****
  1155. X          case 2: You("take a sip of scalding hot water.");
  1156. X              if (Fire_resistance)
  1157. X                  pline("It seems quite tasty.");
  1158. X!             else losehp(rnd(6), "sip of boiling water");
  1159. X              break;
  1160. X          case 3: if (mons[PM_SEWER_RAT].geno & G_GENOD)
  1161. X                  pline("The sink seems quite dirty.");
  1162. X--- 360,366 ----
  1163. X          case 2: You("take a sip of scalding hot water.");
  1164. X              if (Fire_resistance)
  1165. X                  pline("It seems quite tasty.");
  1166. X!             else losehp(rnd(6), "sipping boiling water", KILLED_BY);
  1167. X              break;
  1168. X          case 3: if (mons[PM_SEWER_RAT].geno & G_GENOD)
  1169. X                  pline("The sink seems quite dirty.");
  1170. X*** src/Old/hack.c    Mon Feb 19 18:05:17 1990
  1171. X--- src/hack.c    Fri Feb 16 22:10:43 1990
  1172. X***************
  1173. X*** 4,12 ****
  1174. X  #include "hack.h"
  1175. X  
  1176. X  #if defined(UNIX) && !defined(LINT)
  1177. X! static    const char    SCCS_Id[] = "@(#)hack.c    3.0\t89/11/03";
  1178. X  #endif
  1179. X  
  1180. X  /* called on movement:
  1181. X      1. when throwing ball+chain far away
  1182. X      2. when teleporting
  1183. X--- 4,21 ----
  1184. X  #include "hack.h"
  1185. X  
  1186. X  #if defined(UNIX) && !defined(LINT)
  1187. X! static    const char    SCCS_Id[] = "@(#)hack.c    3.0\t89/11/20";
  1188. X  #endif
  1189. X  
  1190. X+ OSTATIC int NDECL(moverock);
  1191. X+ #ifdef SINKS
  1192. X+ OSTATIC void NDECL(dosinkfall);
  1193. X+ #endif
  1194. X+ static boolean FDECL(is_edge,(XCHAR_P,XCHAR_P));
  1195. X+ static boolean FDECL(bad_rock,(XCHAR_P,XCHAR_P));
  1196. X+ 
  1197. X+ #ifdef OVLB
  1198. X+ 
  1199. X  /* called on movement:
  1200. X      1. when throwing ball+chain far away
  1201. X      2. when teleporting
  1202. X***************
  1203. X*** 24,30 ****
  1204. X          for(y = u.uy-1; y < u.uy+2; y++) {
  1205. X          if(!isok(x, y)) continue;
  1206. X          lev = &levl[x][y];
  1207. X!         if(!lev->lit && IS_FLOOR(lev->typ)){
  1208. X              lev->scrsym = STONE_SYM;
  1209. X              lev->new = 1;
  1210. X              on_scr(x,y);
  1211. X--- 33,39 ----
  1212. X          for(y = u.uy-1; y < u.uy+2; y++) {
  1213. X          if(!isok(x, y)) continue;
  1214. X          lev = &levl[x][y];
  1215. X!         if(!lev->lit && lev->scrsym == ROOM_SYM) {
  1216. X              lev->scrsym = STONE_SYM;
  1217. X              lev->new = 1;
  1218. X              on_scr(x,y);
  1219. X***************
  1220. X*** 42,49 ****
  1221. X      in mhitu.c:  seeoff(1)    - swallowed
  1222. X      in mthrow.c: seeoff(0)    - hit by a cream pie.
  1223. X      in potion.c: seeoff(0)    - quaffing or sniffing a potion of blindness
  1224. X!     in spell.c:  seeoff(0)    - due to a cursed spellbook
  1225. X!     in trap.c:   seeoff(1)    - fall through trapdoor
  1226. X   */
  1227. X  void
  1228. X  seeoff(mode)
  1229. X--- 51,58 ----
  1230. X      in mhitu.c:  seeoff(1)    - swallowed
  1231. X      in mthrow.c: seeoff(0)    - hit by a cream pie.
  1232. X      in potion.c: seeoff(0)    - quaffing or sniffing a potion of blindness
  1233. X!     in spell.c:  seeoff(0)    - due to a cursed spell book
  1234. X!     in trap.c:   seeoff(1)    - fall through trap door
  1235. X   */
  1236. X  void
  1237. X  seeoff(mode)
  1238. X***************
  1239. X*** 67,73 ****
  1240. X              lev = &levl[x][y];
  1241. X              if(MON_AT(x, y))
  1242. X                  unpmon(m_at(x,y));
  1243. X!             if(!lev->lit && IS_FLOOR(lev->typ)) {
  1244. X                  lev->seen = 0;
  1245. X                  atl(x, y, (char)STONE_SYM);
  1246. X              }
  1247. X--- 76,82 ----
  1248. X              lev = &levl[x][y];
  1249. X              if(MON_AT(x, y))
  1250. X                  unpmon(m_at(x,y));
  1251. X!             if(!lev->lit && lev->scrsym == ROOM_SYM) {
  1252. X                  lev->seen = 0;
  1253. X                  atl(x, y, (char)STONE_SYM);
  1254. X              }
  1255. X***************
  1256. X*** 75,81 ****
  1257. X          }
  1258. X  }
  1259. X  
  1260. X! static int
  1261. X  moverock() {
  1262. X      register xchar rx, ry;
  1263. X      register struct obj *otmp;
  1264. X--- 84,93 ----
  1265. X          }
  1266. X  }
  1267. X  
  1268. X! #endif /* OVLB */
  1269. X! #ifdef OVL2
  1270. X! 
  1271. X! XSTATIC int
  1272. X  moverock() {
  1273. X      register xchar rx, ry;
  1274. X      register struct obj *otmp;
  1275. X***************
  1276. X*** 143,150 ****
  1277. X                  rloco(otmp);
  1278. X                  continue;
  1279. X                  }
  1280. X!             if(levl[rx][ry].typ == DOOR &&
  1281. X!                 (levl[rx][ry].doormask & (D_LOCKED | D_CLOSED)))
  1282. X                  goto nopushmsg;
  1283. X              if(is_pool(rx,ry)) {
  1284. X  #ifdef STRONGHOLD
  1285. X--- 155,161 ----
  1286. X                  rloco(otmp);
  1287. X                  continue;
  1288. X                  }
  1289. X!             if(closed_door(rx, ry))
  1290. X                  goto nopushmsg;
  1291. X              if(is_pool(rx,ry)) {
  1292. X  #ifdef STRONGHOLD
  1293. X***************
  1294. X*** 209,229 ****
  1295. X      return (0);
  1296. X  }
  1297. X  
  1298. X  void
  1299. X  movobj(obj, ox, oy)
  1300. X  register struct obj *obj;
  1301. X  register xchar ox, oy;
  1302. X  {
  1303. X!     /* Some dirty programming to get display right */
  1304. X!     freeobj(obj);
  1305. X!     unpobj(obj);
  1306. X!     obj->nobj = fobj;
  1307. X!     fobj = obj;
  1308. X!     move_object(obj, ox, oy);
  1309. X  }
  1310. X  
  1311. X  #ifdef SINKS
  1312. X! static
  1313. X  void
  1314. X  dosinkfall() {
  1315. X      register struct obj *obj;
  1316. X--- 220,241 ----
  1317. X      return (0);
  1318. X  }
  1319. X  
  1320. X+ #endif /* OVL2 */
  1321. X+ #ifdef OVLB
  1322. X+ 
  1323. X  void
  1324. X  movobj(obj, ox, oy)
  1325. X  register struct obj *obj;
  1326. X  register xchar ox, oy;
  1327. X  {
  1328. X!     remove_object(obj);
  1329. X!     newsym(obj->ox, obj->oy);
  1330. X!     place_object(obj, ox, oy);
  1331. X!     newsym(ox, oy);
  1332. X  }
  1333. X  
  1334. X  #ifdef SINKS
  1335. X! XSTATIC
  1336. X  void
  1337. X  dosinkfall() {
  1338. X      register struct obj *obj;
  1339. X***************
  1340. X*** 234,244 ****
  1341. X      } else {
  1342. X  # endif
  1343. X          You("crash to the floor!");
  1344. X!         losehp((rn1(10, 20 - (int)ACURR(A_CON))),"fall onto a sink");
  1345. X          for(obj = level.objects[u.ux][u.uy]; obj; obj = obj->nexthere)
  1346. X              if(obj->olet == WEAPON_SYM) {
  1347. X              You("fell on %s.",doname(obj));
  1348. X!             losehp(rn2(3),"fall onto a sink");
  1349. X              }
  1350. X  # ifdef POLYSELF
  1351. X      }
  1352. X--- 246,257 ----
  1353. X      } else {
  1354. X  # endif
  1355. X          You("crash to the floor!");
  1356. X!         losehp((rn1(10, 20 - (int)ACURR(A_CON))),
  1357. X!             "fell onto a sink", NO_KILLER_PREFIX);
  1358. X          for(obj = level.objects[u.ux][u.uy]; obj; obj = obj->nexthere)
  1359. X              if(obj->olet == WEAPON_SYM) {
  1360. X              You("fell on %s.",doname(obj));
  1361. X!             losehp(rn2(3),"fell onto a sink", NO_KILLER_PREFIX);
  1362. X              }
  1363. X  # ifdef POLYSELF
  1364. X      }
  1365. X***************
  1366. X*** 264,269 ****
  1367. X--- 277,285 ----
  1368. X  }
  1369. X  #endif
  1370. X  
  1371. X+ #endif /* OVLB */
  1372. X+ #ifdef OVL1
  1373. X+ 
  1374. X  static boolean
  1375. X  is_edge(x,y)
  1376. X  register xchar x,y;
  1377. X***************
  1378. X*** 279,284 ****
  1379. X--- 295,303 ----
  1380. X             (y == rooms[roomno].ly - 1) || (y == rooms[roomno].hy + 1));
  1381. X  }
  1382. X  
  1383. X+ #endif /* OVL1 */
  1384. X+ #ifdef OVLB
  1385. X+ 
  1386. X  boolean
  1387. X  may_dig(x,y)
  1388. X  register xchar x,y;
  1389. X***************
  1390. X*** 287,292 ****
  1391. X--- 306,314 ----
  1392. X  return (!(IS_STWALL(levl[x][y].typ) && (levl[x][y].diggable & W_NONDIGGABLE)));
  1393. X  }
  1394. X  
  1395. X+ #endif /* OVLB */
  1396. X+ #ifdef OVL1
  1397. X+ 
  1398. X  static boolean
  1399. X  bad_rock(x,y)
  1400. X  register xchar x,y;
  1401. X***************
  1402. X*** 348,354 ****
  1403. X          if(u.ustuck && (x != u.ustuck->mx ||
  1404. X                  y != u.ustuck->my)) {
  1405. X              if(dist(u.ustuck->mx, u.ustuck->my) > 2) {
  1406. X!                 /* perhaps it fled (or was teleported or ... ) */
  1407. X                  u.ustuck = 0;
  1408. X              } else {
  1409. X  #ifdef POLYSELF
  1410. X--- 370,376 ----
  1411. X          if(u.ustuck && (x != u.ustuck->mx ||
  1412. X                  y != u.ustuck->my)) {
  1413. X              if(dist(u.ustuck->mx, u.ustuck->my) > 2) {
  1414. X!             /* perhaps it fled (or was teleported or ... ) */
  1415. X                  u.ustuck = 0;
  1416. X              } else {
  1417. X  #ifdef POLYSELF
  1418. X***************
  1419. X*** 376,382 ****
  1420. X              /* Don't attack if you're running */
  1421. X              if (flags.run && !mtmp->mimic &&
  1422. X                      (Blind ? Telepat :
  1423. X!                         (!mtmp->minvis || See_invisible))) {
  1424. X                  nomul(0);
  1425. X                  flags.move = 0;
  1426. X                  return;
  1427. X--- 398,404 ----
  1428. X              /* Don't attack if you're running */
  1429. X              if (flags.run && !mtmp->mimic &&
  1430. X                      (Blind ? Telepat :
  1431. X!                      (!mtmp->minvis || See_invisible))) {
  1432. X                  nomul(0);
  1433. X                  flags.move = 0;
  1434. X                  return;
  1435. X***************
  1436. X*** 434,471 ****
  1437. X              return;
  1438. X          }
  1439. X  #endif
  1440. X!         if(IS_DOOR(tmpr->typ) && (tmpr->doormask & (D_LOCKED | D_CLOSED))
  1441. X  #ifdef POLYSELF
  1442. X!            && !amorphous(uasmon)
  1443. X  #endif
  1444. X-           ){
  1445. X              flags.move = 0;
  1446. X              if(x == u.ux || y == u.uy) {
  1447. X                  if (Blind || Stunned || ACURR(A_DEX) < 10 || Fumbling)
  1448. X                  pline("Ouch!  You bump into a door.");
  1449. X!                 else pline("That door is closed.");
  1450. X              }
  1451. X              nomul(0);
  1452. X              return;
  1453. X          }
  1454. X  #ifdef POLYSELF
  1455. X      }
  1456. X  #endif
  1457. X      ust = &levl[u.ux][u.uy];
  1458. X      if(bad_rock(x,y) ||
  1459. X         (u.dx && u.dy
  1460. X  #ifdef POLYSELF
  1461. X!             && !passes_walls(uasmon)
  1462. X  #endif
  1463. X  #ifdef REINCARNATION
  1464. X!             && (((IS_DOOR(tmpr->typ) && ((tmpr->doormask & ~D_BROKEN)
  1465. X!                 || dlevel == rogue_level)) ||
  1466. X!                 ((IS_DOOR(ust->typ) && ((ust->doormask & ~D_BROKEN)
  1467. X!                 || dlevel == rogue_level))))))) {
  1468. X  #else
  1469. X!             && (((IS_DOOR(tmpr->typ) && (tmpr->doormask & ~D_BROKEN)) ||
  1470. X!               ((IS_DOOR(ust->typ) && (ust->doormask & ~D_BROKEN))))))){
  1471. X  #endif
  1472. X          flags.move = 0;
  1473. X          nomul(0);
  1474. X          return;
  1475. X--- 456,505 ----
  1476. X              return;
  1477. X          }
  1478. X  #endif
  1479. X!         if(closed_door(x, y)) {
  1480. X  #ifdef POLYSELF
  1481. X!         if(amorphous(uasmon))
  1482. X!             You("ooze under the door.");
  1483. X!         else {
  1484. X  #endif
  1485. X              flags.move = 0;
  1486. X              if(x == u.ux || y == u.uy) {
  1487. X                  if (Blind || Stunned || ACURR(A_DEX) < 10 || Fumbling)
  1488. X                  pline("Ouch!  You bump into a door.");
  1489. X!                  else pline("That door is closed.");
  1490. X              }
  1491. X              nomul(0);
  1492. X              return;
  1493. X+ #ifdef POLYSELF
  1494. X+         }
  1495. X+ #endif
  1496. X          }
  1497. X  #ifdef POLYSELF
  1498. X      }
  1499. X  #endif
  1500. X      ust = &levl[u.ux][u.uy];
  1501. X+ 
  1502. X      if(bad_rock(x,y) ||
  1503. X         (u.dx && u.dy
  1504. X  #ifdef POLYSELF
  1505. X!          && !passes_walls(uasmon)
  1506. X  #endif
  1507. X+          && ( (IS_DOOR(ust->typ) && block_entry(x, y)) ||
  1508. X  #ifdef REINCARNATION
  1509. X!             (IS_DOOR(tmpr->typ) &&
  1510. X!              ((tmpr->doormask & ~D_BROKEN) 
  1511. X!                || dlevel == rogue_level || block_door(x, y))
  1512. X!                         )  
  1513. X!              || (IS_DOOR(ust->typ) &&
  1514. X!              ((ust->doormask & ~D_BROKEN) || dlevel == rogue_level)
  1515. X!                         )
  1516. X  #else
  1517. X!             (IS_DOOR(tmpr->typ) &&
  1518. X!              ((tmpr->doormask & ~D_BROKEN) || block_door(x, y))) ||
  1519. X!             (IS_DOOR(ust->typ) && (ust->doormask & ~D_BROKEN))
  1520. X  #endif
  1521. X+             )
  1522. X+        )) {
  1523. X          flags.move = 0;
  1524. X          nomul(0);
  1525. X          return;
  1526. X***************
  1527. X*** 507,514 ****
  1528. X          }
  1529. X  
  1530. X          movobj(uball, uchain->ox, uchain->oy);
  1531. X!         unpobj(uball);        /* BAH %% */
  1532. X!         move_object(uchain, u.ux, u.uy);
  1533. X          nomul(-2);
  1534. X          nomovemsg = "";
  1535. X      nodrag:    ;
  1536. X--- 541,547 ----
  1537. X          }
  1538. X  
  1539. X          movobj(uball, uchain->ox, uchain->oy);
  1540. X!         movobj(uchain, u.ux, u.uy);
  1541. X          nomul(-2);
  1542. X          nomovemsg = "";
  1543. X      nodrag:    ;
  1544. X***************
  1545. X*** 515,521 ****
  1546. X      }
  1547. X  #ifdef POLYSELF
  1548. X      if (tunnels(uasmon) && !needspick(uasmon) && IS_ROCK(tmpr->typ)) {
  1549. X!         static char *digtxt;
  1550. X  
  1551. X          if(dig_pos.x != x || dig_pos.y != y
  1552. X              || dig_level != dlevel || dig_down) {
  1553. X--- 548,554 ----
  1554. X      }
  1555. X  #ifdef POLYSELF
  1556. X      if (tunnels(uasmon) && !needspick(uasmon) && IS_ROCK(tmpr->typ)) {
  1557. X!         static const char *digtxt;
  1558. X  
  1559. X          if(dig_pos.x != x || dig_pos.y != y
  1560. X              || dig_level != dlevel || dig_down) {
  1561. X***************
  1562. X*** 649,654 ****
  1563. X--- 682,690 ----
  1564. X      spoteffects();
  1565. X  }
  1566. X  
  1567. X+ #endif /* OVL1 */
  1568. X+ #ifdef OVL2
  1569. X+ 
  1570. X  void
  1571. X  spoteffects()
  1572. X  {
  1573. X***************
  1574. X*** 676,681 ****
  1575. X--- 712,720 ----
  1576. X  
  1577. X  }
  1578. X  
  1579. X+ #endif /* OVL2 */
  1580. X+ #ifdef OVLB
  1581. X+ 
  1582. X  int
  1583. X  dopickup() {
  1584. X      /* uswallow case added by GAN 01/29/87 */
  1585. X***************
  1586. X*** 684,690 ****
  1587. X              You("pick up %s's tongue.", mon_nam(u.ustuck));
  1588. X              pline("But it's kind of slimy, so you drop it.");
  1589. X          } else
  1590. X!             pline("You don't %s anything in here to pick up.",
  1591. X                Blind ? "feel" : "see");
  1592. X          return(1);
  1593. X      }
  1594. X--- 723,729 ----
  1595. X              You("pick up %s's tongue.", mon_nam(u.ustuck));
  1596. X              pline("But it's kind of slimy, so you drop it.");
  1597. X          } else
  1598. X!             You("don't %s anything in here to pick up.",
  1599. X                Blind ? "feel" : "see");
  1600. X          return(1);
  1601. X      }
  1602. X***************
  1603. X*** 700,705 ****
  1604. X--- 739,747 ----
  1605. X      return(1);
  1606. X  }
  1607. X  
  1608. X+ #endif /* OVLB */
  1609. X+ #ifdef OVL2
  1610. X+ 
  1611. X  /* stop running if we see something interesting */
  1612. X  /* turn around a corner if that is the only way we can proceed */
  1613. X  /* do not turn left or right twice */
  1614. X***************
  1615. X*** 707,715 ****
  1616. X  lookaround() {
  1617. X      register int x, y, i, x0, y0, m0, i0 = 9, corrct = 0, noturn = 0;
  1618. X      register struct monst *mtmp;
  1619. X! #ifdef LINT
  1620. X      /* suppress "used before set" message */
  1621. X!     x0 = y0 = 0;
  1622. X  #endif
  1623. X      if(Blind || flags.run == 0) return;
  1624. X      for(x = u.ux-1; x <= u.ux+1; x++) for(y = u.uy-1; y <= u.uy+1; y++) {
  1625. X--- 749,757 ----
  1626. X  lookaround() {
  1627. X      register int x, y, i, x0, y0, m0, i0 = 9, corrct = 0, noturn = 0;
  1628. X      register struct monst *mtmp;
  1629. X! #if defined(LINT) || defined(__GNULINT__)
  1630. X      /* suppress "used before set" message */
  1631. X!     x0 = y0 = m0 = 0;
  1632. X  #endif
  1633. X      if(Blind || flags.run == 0) return;
  1634. X      for(x = u.ux-1; x <= u.ux+1; x++) for(y = u.uy-1; y <= u.uy+1; y++) {
  1635. X***************
  1636. X*** 823,829 ****
  1637. X          if(MON_AT(x, y) && (mtmp = m_at(x,y)) && !mtmp->mimic &&
  1638. X             !mtmp->mtame && !mtmp->mpeaceful &&
  1639. X             !noattacks(mtmp->data) &&
  1640. X!            !mtmp->mfroz && !mtmp->msleep &&  /* aplvax!jcn */
  1641. X             (!mtmp->minvis || See_invisible) &&
  1642. X             !onscary(u.ux, u.uy, mtmp))
  1643. X              return(1);
  1644. X--- 865,871 ----
  1645. X          if(MON_AT(x, y) && (mtmp = m_at(x,y)) && !mtmp->mimic &&
  1646. X             !mtmp->mtame && !mtmp->mpeaceful &&
  1647. X             !noattacks(mtmp->data) &&
  1648. X!            mtmp->mcanmove && !mtmp->msleep &&  /* aplvax!jcn */
  1649. X             (!mtmp->minvis || See_invisible) &&
  1650. X             !onscary(u.ux, u.uy, mtmp))
  1651. X              return(1);
  1652. X***************
  1653. X*** 831,836 ****
  1654. X--- 873,881 ----
  1655. X      return(0);
  1656. X  }
  1657. X  
  1658. X+ #endif /* OVL2 */
  1659. X+ #ifdef OVL0
  1660. X+ 
  1661. X  int
  1662. X  cansee(x,y)
  1663. X  xchar x,y;
  1664. X***************
  1665. X*** 847,852 ****
  1666. X--- 892,900 ----
  1667. X      return(0);
  1668. X  }
  1669. X  
  1670. X+ #endif /* OVL0 */
  1671. X+ #ifdef OVL1
  1672. X+ 
  1673. X  int
  1674. X  sgn(a)
  1675. X      register int a;
  1676. X***************
  1677. X*** 854,859 ****
  1678. X--- 902,910 ----
  1679. X      return((a > 0) ? 1 : (a == 0) ? 0 : -1);
  1680. X  }
  1681. X  
  1682. X+ #endif /* OVL1 */
  1683. X+ #ifdef OVL2
  1684. X+ 
  1685. X  void
  1686. X  getcorners(lx1,hx1,ly1,hy1,lx2,hx2,ly2,hy2)
  1687. X  xchar *lx1,*hx1,*ly1,*hy1,*lx2,*hx2,*ly2,*hy2;
  1688. X***************
  1689. X*** 901,906 ****
  1690. X--- 952,960 ----
  1691. X      }
  1692. X  }
  1693. X  
  1694. X+ #endif /* OVL2 */
  1695. X+ #ifdef OVL1
  1696. X+ 
  1697. X  void
  1698. X  setsee() {
  1699. X      register int x, y;
  1700. X***************
  1701. X*** 937,942 ****
  1702. X--- 991,999 ----
  1703. X      }
  1704. X  }
  1705. X  
  1706. X+ #endif /* OVL1 */
  1707. X+ #ifdef OVL2
  1708. X+ 
  1709. X  void
  1710. X  nomul(nval)
  1711. X      register int nval;
  1712. X***************
  1713. X*** 946,955 ****
  1714. X      flags.mv = flags.run = 0;
  1715. X  }
  1716. X  
  1717. X  void
  1718. X! losehp(n, knam)
  1719. X!     register int n;
  1720. X!     register const char *knam;
  1721. X  {
  1722. X  #ifdef POLYSELF
  1723. X      if (u.mtimedone) {
  1724. X--- 1003,1016 ----
  1725. X      flags.mv = flags.run = 0;
  1726. X  }
  1727. X  
  1728. X+ #endif /* OVL2 */
  1729. X+ #ifdef OVL1
  1730. X+ 
  1731. X  void
  1732. X! losehp(n, knam, k_format)
  1733. X! register int n;
  1734. X! register const char *knam;
  1735. X! boolean k_format;
  1736. X  {
  1737. X  #ifdef POLYSELF
  1738. X      if (u.mtimedone) {
  1739. X***************
  1740. X*** 965,971 ****
  1741. X          u.uhpmax = u.uhp;    /* perhaps n was negative */
  1742. X      flags.botl = 1;
  1743. X      if(u.uhp < 1) {
  1744. X!         killer = (char *)knam;    /* the thing that killed you */
  1745. X          You("die...");
  1746. X          done(DIED);
  1747. X      } else if(u.uhp*10 < u.uhpmax && moves-wailmsg > 50 && n > 0){
  1748. X--- 1026,1033 ----
  1749. X          u.uhpmax = u.uhp;    /* perhaps n was negative */
  1750. X      flags.botl = 1;
  1751. X      if(u.uhp < 1) {
  1752. X!         killer_format = k_format;
  1753. X!         killer = knam;        /* the thing that killed you */
  1754. X          You("die...");
  1755. X          done(DIED);
  1756. X      } else if(u.uhp*10 < u.uhpmax && moves-wailmsg > 50 && n > 0){
  1757. X***************
  1758. X*** 1052,1057 ****
  1759. X--- 1114,1122 ----
  1760. X      return(wt - weight_cap());
  1761. X  }
  1762. X  
  1763. X+ #endif /* OVL1 */
  1764. X+ #ifdef OVLB
  1765. X+ 
  1766. X  int
  1767. X  inv_cnt() {
  1768. X      register struct obj *otmp = invent;
  1769. X***************
  1770. X*** 1115,1117 ****
  1771. X--- 1180,1184 ----
  1772. X      objects[x].oc_name_known = 1;
  1773. X  }
  1774. X  #endif /* STUPID_CPP */
  1775. X+ 
  1776. X+ #endif /* OVLB */
  1777. X*** src/Old/invent.c    Mon Feb 19 18:06:12 1990
  1778. X--- src/invent.c    Mon Feb 19 10:18:41 1990
  1779. X***************
  1780. X*** 11,20 ****
  1781. X  
  1782. X  #define    NOINVSYM    '#'
  1783. X  
  1784. X! static boolean mergable();
  1785. X  
  1786. X  int lastinvnr = 51;    /* 0 ... 51 */
  1787. X- static char *xprname();
  1788. X  
  1789. X  char inv_order[] = {
  1790. X      AMULET_SYM, WEAPON_SYM, ARMOR_SYM, FOOD_SYM, SCROLL_SYM,
  1791. X--- 11,34 ----
  1792. X  
  1793. X  #define    NOINVSYM    '#'
  1794. X  
  1795. X! static boolean FDECL(mergable,(struct obj *,struct obj *));
  1796. X! OSTATIC void FDECL(assigninvlet,(struct obj *));
  1797. X! static int FDECL(merged,(struct obj *,struct obj *,int));
  1798. X! OSTATIC struct obj *FDECL(mkgoldobj,(long));
  1799. X! #ifndef OVERLAY
  1800. X! static int FDECL(ckunpaid,(struct obj *));
  1801. X! #else
  1802. X! int FDECL(ckunpaid,(struct obj *));
  1803. X! #endif
  1804. X! static boolean NDECL(wearing_armor);
  1805. X! static boolean FDECL(is_worn,(struct obj *));
  1806. X! static char FDECL(obj_to_let,(struct obj *));
  1807. X! 
  1808. X! OSTATIC char *FDECL(xprname,(struct obj *,CHAR_P,BOOLEAN_P));
  1809. X  
  1810. X+ #ifdef OVLB
  1811. X+ 
  1812. X  int lastinvnr = 51;    /* 0 ... 51 */
  1813. X  
  1814. X  char inv_order[] = {
  1815. X      AMULET_SYM, WEAPON_SYM, ARMOR_SYM, FOOD_SYM, SCROLL_SYM,
  1816. X***************
  1817. X*** 24,30 ****
  1818. X      POTION_SYM, RING_SYM, WAND_SYM, TOOL_SYM, GEM_SYM,
  1819. X      ROCK_SYM, BALL_SYM, CHAIN_SYM, 0 };
  1820. X  
  1821. X! static void
  1822. X  assigninvlet(otmp)
  1823. X  register struct obj *otmp;
  1824. X  {
  1825. X--- 38,44 ----
  1826. X      POTION_SYM, RING_SYM, WAND_SYM, TOOL_SYM, GEM_SYM,
  1827. X      ROCK_SYM, BALL_SYM, CHAIN_SYM, 0 };
  1828. X  
  1829. X! XSTATIC void
  1830. X  assigninvlet(otmp)
  1831. X  register struct obj *otmp;
  1832. X  {
  1833. X***************
  1834. X*** 51,56 ****
  1835. X--- 65,73 ----
  1836. X      lastinvnr = i;
  1837. X  }
  1838. X  
  1839. X+ #endif /* OVLB */
  1840. X+ #ifdef OVL1
  1841. X+ 
  1842. X  /* merge obj with otmp and delete obj if types agree */
  1843. X  static int
  1844. X  merged(otmp, obj, lose)
  1845. X***************
  1846. X*** 67,72 ****
  1847. X--- 84,91 ----
  1848. X              / (otmp->quan + obj->quan);
  1849. X          otmp->quan += obj->quan;
  1850. X          otmp->owt += obj->owt;
  1851. X+         if(!otmp->onamelth && obj->onamelth)
  1852. X+             (void)oname(otmp, ONAME(obj), 1);
  1853. X          if(lose) freeobj(obj);
  1854. X          obfree(obj,otmp);    /* free(obj), bill->otmp */
  1855. X          return(1);
  1856. X***************
  1857. X*** 130,140 ****
  1858. X           * for correct calculation */
  1859. X          if (stone_luck(TRUE) >= 0) u.moreluck = LUCKADD;
  1860. X          else u.moreluck = -LUCKADD;
  1861. X-         flags.botl = 1;
  1862. X      }
  1863. X      return(obj);
  1864. X  }
  1865. X  
  1866. X  void
  1867. X  useup(obj)
  1868. X  register struct obj *obj;
  1869. X--- 149,161 ----
  1870. X           * for correct calculation */
  1871. X          if (stone_luck(TRUE) >= 0) u.moreluck = LUCKADD;
  1872. X          else u.moreluck = -LUCKADD;
  1873. X      }
  1874. X      return(obj);
  1875. X  }
  1876. X  
  1877. X+ #endif /* OVL1 */
  1878. X+ #ifdef OVLB
  1879. X+ 
  1880. X  void
  1881. X  useup(obj)
  1882. X  register struct obj *obj;
  1883. X***************
  1884. X*** 146,151 ****
  1885. X--- 167,173 ----
  1886. X          obj->quan--;
  1887. X          obj->owt = weight(obj);
  1888. X      } else {
  1889. X+         if(obj->otyp == CORPSE) food_disappears(obj);
  1890. X          setnotworn(obj);
  1891. X          freeinv(obj);
  1892. X          delete_contents(obj);
  1893. X***************
  1894. X*** 188,193 ****
  1895. X--- 210,217 ----
  1896. X  #ifdef WALKIES
  1897. X      if(obj->otyp == LEASH && obj->leashmon != 0) o_unleash(obj);
  1898. X  #endif
  1899. X+     if(obj->otyp == CORPSE) food_disappears(obj);
  1900. X+ 
  1901. X      freeobj(obj);
  1902. X      unpobj(obj);
  1903. X  
  1904. X***************
  1905. X*** 248,253 ****
  1906. X--- 272,280 ----
  1907. X  #endif
  1908. X  }
  1909. X  
  1910. X+ #endif /* OVLB */
  1911. X+ #ifdef OVL0
  1912. X+ 
  1913. X  struct obj *
  1914. X  sobj_at(n,x,y)
  1915. X  register int n, x, y;
  1916. X***************
  1917. X*** 260,265 ****
  1918. X--- 287,295 ----
  1919. X      return((struct obj *)0);
  1920. X  }
  1921. X  
  1922. X+ #endif /* OVL0 */
  1923. X+ #ifdef OVLB
  1924. X+ 
  1925. X  int
  1926. X  carried(obj)
  1927. X  register struct obj *obj;
  1928. X***************
  1929. X*** 331,337 ****
  1930. X  }
  1931. X  
  1932. X  /* make dummy object structure containing gold - for temporary use only */
  1933. X! static
  1934. X  struct obj *
  1935. X  mkgoldobj(q)
  1936. X  register long q;
  1937. X--- 361,367 ----
  1938. X  }
  1939. X  
  1940. X  /* make dummy object structure containing gold - for temporary use only */
  1941. X! XSTATIC
  1942. X  struct obj *
  1943. X  mkgoldobj(q)
  1944. X  register long q;
  1945. X***************
  1946. X*** 341,346 ****
  1947. X--- 371,379 ----
  1948. X      otmp = newobj(0);
  1949. X      /* should set o_id etc. but otmp will be freed soon */
  1950. X      otmp->olet = GOLD_SYM;
  1951. X+ #ifdef POLYSELF
  1952. X+     otmp->ox = 0; /* necessary for eating gold */
  1953. X+ #endif
  1954. X      u.ugold -= q;
  1955. X      OGOLD(otmp) = q;
  1956. X      flags.botl = 1;
  1957. X***************
  1958. X*** 347,352 ****
  1959. X--- 380,388 ----
  1960. X      return(otmp);
  1961. X  }
  1962. X  
  1963. X+ #endif /* OVLB */
  1964. X+ #ifdef OVL1
  1965. X+ 
  1966. X  /*
  1967. X   * getobj returns:
  1968. X   *    struct obj *xxx:    object to do something with.
  1969. X***************
  1970. X*** 378,383 ****
  1971. X--- 414,424 ----
  1972. X      if(*let == '0') let++, allowcnt = 1;
  1973. X      if(*let == GOLD_SYM) let++,
  1974. X          usegold = TRUE, allowgold = (u.ugold ? TRUE : FALSE);
  1975. X+ #ifdef POLYSELF
  1976. X+     /* Equivalent of an "ugly check" for gold */
  1977. X+     if (usegold && !strcmp(word, "eat") && !metallivorous(uasmon))
  1978. X+         usegold = allowgold = FALSE;
  1979. X+ #endif
  1980. X      if(*let == '#') let++, allowall = TRUE;
  1981. X      if(*let == '-') let++, allownone = TRUE;
  1982. X      if(allownone) *bp++ = '-';
  1983. X***************
  1984. X*** 410,417 ****
  1985. X          /* Second ugly check; unlike the first it won't trigger an
  1986. X           * "else" in "you don't have anything else to ___".
  1987. X           */
  1988. X!         if ((!strcmp(word, "wear") &&
  1989. X              (otmp->olet == TOOL_SYM && otmp->otyp != BLINDFOLD))
  1990. X          || (!strcmp(word, "can") &&
  1991. X              (otmp->otyp != CORPSE))
  1992. X          || (!strcmp(word, "write with") &&
  1993. X--- 451,461 ----
  1994. X          /* Second ugly check; unlike the first it won't trigger an
  1995. X           * "else" in "you don't have anything else to ___".
  1996. X           */
  1997. X!         else if ((!strcmp(word, "wear") &&
  1998. X              (otmp->olet == TOOL_SYM && otmp->otyp != BLINDFOLD))
  1999. X+ #ifdef POLYSELF
  2000. X+         || (!strcmp(word, "eat") && !is_edible(otmp))
  2001. X+ #endif
  2002. X          || (!strcmp(word, "can") &&
  2003. X              (otmp->otyp != CORPSE))
  2004. X          || (!strcmp(word, "write with") &&
  2005. X***************
  2006. X*** 508,514 ****
  2007. X              allowcnt = 1;
  2008. X              if(cnt == 0 && prezero) return((struct obj *)0);
  2009. X              if(cnt > 1) {
  2010. X!                 pline("You can only throw one item at a time.");
  2011. X                  continue;
  2012. X              }
  2013. X          }
  2014. X--- 552,558 ----
  2015. X              allowcnt = 1;
  2016. X              if(cnt == 0 && prezero) return((struct obj *)0);
  2017. X              if(cnt > 1) {
  2018. X!                 You("can only throw one item at a time.");
  2019. X                  continue;
  2020. X              }
  2021. X          }
  2022. X***************
  2023. X*** 552,557 ****
  2024. X--- 596,602 ----
  2025. X          if(cnt == 0) return (struct obj *)0;
  2026. X          if(cnt != otmp->quan) {
  2027. X              register struct obj *obj;
  2028. X+             
  2029. X  #ifdef LINT    /*splitobj for (long )cnt > 30000 && sizeof(int) == 2*/
  2030. X              obj = (struct obj *)0;
  2031. X  #else
  2032. X***************
  2033. X*** 561,566 ****
  2034. X--- 606,620 ----
  2035. X              else
  2036. X                  obj = splitobj(otmp, (int) cnt);
  2037. X  #endif
  2038. X+         /* Very ugly kludge necessary to prevent someone from trying
  2039. X+          * to drop one of several loadstones and having the loadstone
  2040. X+          * now be separate.  If putting items in containers is ever
  2041. X+          * changed to allow putting in counts of individual items, a
  2042. X+          * similar kludge will be needed.
  2043. X+          */
  2044. X+             if (!strcmp(word, "drop") && obj->otyp == LOADSTONE
  2045. X+                     && obj->cursed)
  2046. X+                 otmp->corpsenm = obj->invlet;
  2047. X              if(otmp == uwep) setuwep(obj);
  2048. X          }
  2049. X      }
  2050. X***************
  2051. X*** 567,572 ****
  2052. X--- 621,629 ----
  2053. X      return(otmp);
  2054. X  }
  2055. X  
  2056. X+ #endif /* OVL1 */
  2057. X+ #ifdef OVLB
  2058. X+ 
  2059. X  #ifndef OVERLAY
  2060. X  static 
  2061. X  #endif
  2062. X***************
  2063. X*** 600,607 ****
  2064. X  /* Takeoff (A). Return the number of times fn was called successfully */
  2065. X  int
  2066. X  ggetobj(word, fn, mx)
  2067. X! register char *word;
  2068. X! register int (*fn)(), mx;
  2069. X  {
  2070. X      char buf[BUFSZ];
  2071. X      register char *ip;
  2072. X--- 657,664 ----
  2073. X  /* Takeoff (A). Return the number of times fn was called successfully */
  2074. X  int
  2075. X  ggetobj(word, fn, mx)
  2076. X! register const char *word;
  2077. X! register int FDECL((*fn),(struct obj *)), mx;
  2078. X  {
  2079. X      char buf[BUFSZ];
  2080. X      register char *ip;
  2081. X***************
  2082. X*** 609,615 ****
  2083. X      register int oletct = 0, iletct = 0;
  2084. X      register boolean allflag = FALSE;
  2085. X      char olets[20], ilets[20];
  2086. X!     int (*ckfn)() = (int (*)()) 0;
  2087. X      xchar allowgold = (u.ugold && !strcmp(word, "drop")) ? 1 : 0; /* BAH */
  2088. X      register boolean takeoff = !strcmp(word, "take off");
  2089. X  
  2090. X--- 666,672 ----
  2091. X      register int oletct = 0, iletct = 0;
  2092. X      register boolean allflag = FALSE;
  2093. X      char olets[20], ilets[20];
  2094. X!     int FDECL((*ckfn),(struct obj *)) = (int (*)()) 0;
  2095. X      xchar allowgold = (u.ugold && !strcmp(word, "drop")) ? 1 : 0; /* BAH */
  2096. X      register boolean takeoff = !strcmp(word, "take off");
  2097. X  
  2098. X***************
  2099. X*** 708,715 ****
  2100. X  askchain(objchn, ininv, olets, allflag, fn, ckfn, mx, word)
  2101. X  register struct obj *objchn;
  2102. X  register int ininv, allflag, mx;
  2103. X! register char *olets, *word;
  2104. X! register int (*fn)(), (*ckfn)();
  2105. X  {
  2106. X      register struct obj *otmp, *otmp2;
  2107. X      register char sym, ilet;
  2108. X--- 765,772 ----
  2109. X  askchain(objchn, ininv, olets, allflag, fn, ckfn, mx, word)
  2110. X  register struct obj *objchn;
  2111. X  register int ininv, allflag, mx;
  2112. X! register const char *olets, *word;
  2113. X! register int FDECL((*fn),(struct obj *)), FDECL((*ckfn),(struct obj *));
  2114. X  {
  2115. X      register struct obj *otmp, *otmp2;
  2116. X      register char sym, ilet;
  2117. X***************
  2118. X*** 732,742 ****
  2119. X          if(takeoff && !is_worn(otmp)) continue;
  2120. X          if(ckfn && !(*ckfn)(otmp)) continue;
  2121. X          if(!allflag) {
  2122. X!             if(ininv) {
  2123. X!                 if (nodot)
  2124. X!                  pline(xprname(otmp, ilet, FALSE));
  2125. X!                 else pline(xprname(otmp, ilet, TRUE));
  2126. X!             }
  2127. X              else
  2128. X                  pline(doname(otmp));
  2129. X              addtopl("? ");
  2130. X--- 789,797 ----
  2131. X          if(takeoff && !is_worn(otmp)) continue;
  2132. X          if(ckfn && !(*ckfn)(otmp)) continue;
  2133. X          if(!allflag) {
  2134. X!             if(ininv)
  2135. X!                 pline("%s", xprname(otmp, ilet,
  2136. X!                             nodot ? FALSE : TRUE));
  2137. X              else
  2138. X                  pline(doname(otmp));
  2139. X              addtopl("? ");
  2140. X***************
  2141. X*** 788,794 ****
  2142. X      pline(xprname(obj, obj_to_let(obj), TRUE));
  2143. X  }
  2144. X  
  2145. X! static char *
  2146. X  xprname(obj,let,dot)
  2147. X  register struct obj *obj;
  2148. X  register char let;
  2149. X--- 843,852 ----
  2150. X      pline(xprname(obj, obj_to_let(obj), TRUE));
  2151. X  }
  2152. X  
  2153. X! #endif /* OVLB */
  2154. X! #ifdef OVL1
  2155. X! 
  2156. X! XSTATIC char *
  2157. X  xprname(obj,let,dot)
  2158. X  register struct obj *obj;
  2159. X  register char let;
  2160. X***************
  2161. X*** 807,812 ****
  2162. X--- 865,873 ----
  2163. X      return(li);
  2164. X  }
  2165. X  
  2166. X+ #endif /* OVL1 */
  2167. X+ #ifdef OVLB
  2168. X+ 
  2169. X  int
  2170. X  ddoinv()
  2171. X  {
  2172. X***************
  2173. X*** 814,824 ****
  2174. X      return 0;
  2175. X  }
  2176. X  
  2177. X  /* called with 0 or "": all objects in inventory */
  2178. X  /* otherwise: all objects with (serial) letter in lets */
  2179. X  void
  2180. X  doinv(lets)
  2181. X! register char *lets;
  2182. X  {
  2183. X      register struct obj *otmp;
  2184. X      register char ilet;
  2185. X--- 875,888 ----
  2186. X      return 0;
  2187. X  }
  2188. X  
  2189. X+ #endif /* OVLB */
  2190. X+ #ifdef OVL1
  2191. X+ 
  2192. X  /* called with 0 or "": all objects in inventory */
  2193. X  /* otherwise: all objects with (serial) letter in lets */
  2194. X  void
  2195. X  doinv(lets)
  2196. X! register const char *lets;
  2197. X  {
  2198. X      register struct obj *otmp;
  2199. X      register char ilet;
  2200. X***************
  2201. X*** 879,884 ****
  2202. X--- 943,951 ----
  2203. X      cornline(2, any);
  2204. X  }
  2205. X  
  2206. X+ #endif /* OVL1 */
  2207. X+ #ifdef OVLB
  2208. X+ 
  2209. X  int
  2210. X  dotypeinv()                /* free after Robert Viduya */
  2211. X  /* Changed to one type only, so he doesn't have to type cr */
  2212. X***************
  2213. X*** 965,971 ****
  2214. X  dolook() {
  2215. X          register struct obj *otmp, *otmp0;
  2216. X          register struct gold *gold;
  2217. X!         char *verb = Blind ? "feel" : "see";
  2218. X          int ct = 0;
  2219. X          int fd = 0;
  2220. X  
  2221. X--- 1032,1038 ----
  2222. X  dolook() {
  2223. X          register struct obj *otmp, *otmp0;
  2224. X          register struct gold *gold;
  2225. X!         const char *verb = Blind ? "feel" : "see";
  2226. X          int ct = 0;
  2227. X          int fd = 0;
  2228. X  
  2229. X***************
  2230. X*** 1012,1018 ****
  2231. X  #endif
  2232. X  #ifdef ALTARS
  2233. X          if(IS_ALTAR(levl[u.ux][u.uy].typ))  {
  2234. X!         char *al;
  2235. X  
  2236. X          fd++;
  2237. X          switch (levl[u.ux][u.uy].altarmask & ~A_SHRINE) {
  2238. X--- 1079,1085 ----
  2239. X  #endif
  2240. X  #ifdef ALTARS
  2241. X          if(IS_ALTAR(levl[u.ux][u.uy].typ))  {
  2242. X!         const char *al;
  2243. X  
  2244. X          fd++;
  2245. X          switch (levl[u.ux][u.uy].altarmask & ~A_SHRINE) {
  2246. X***************
  2247. X*** 1073,1078 ****
  2248. X--- 1140,1146 ----
  2249. X              (otmp->otyp == CORPSE && otmp->corpsenm == PM_COCKATRICE)) {
  2250. X              pline("Touching the dead cockatrice is a fatal mistake...");
  2251. X              You("turn to stone...");
  2252. X+             killer_format = KILLED_BY_AN;
  2253. X              killer = "cockatrice corpse";
  2254. X              done(STONING);
  2255. X          }
  2256. X***************
  2257. X*** 1098,1103 ****
  2258. X--- 1166,1174 ----
  2259. X          return(!!Blind);
  2260. X  }
  2261. X  
  2262. X+ #endif /* OVLB */
  2263. X+ #ifdef OVL1
  2264. X+ 
  2265. X  void
  2266. X  stackobj(obj)
  2267. X  register struct obj *obj;
  2268. X***************
  2269. X*** 1122,1144 ****
  2270. X         obj->otrapped != otmp->otrapped)
  2271. X          return(FALSE);
  2272. X  
  2273. X!     else if((obj->olet==WEAPON_SYM || obj->olet==ARMOR_SYM) &&
  2274. X          obj->rustfree != otmp->rustfree) return FALSE;
  2275. X  
  2276. X!     else if(obj->olet == FOOD_SYM && (obj->oeaten != otmp->oeaten ||
  2277. X          obj->orotten != otmp->orotten))
  2278. X          return(FALSE);
  2279. X  
  2280. X!     else if(obj->otyp == CORPSE || obj->otyp == EGG || obj->otyp == TIN)
  2281. X!         return( (obj->corpsenm == otmp->corpsenm) &&
  2282. X!             (!ONAME(obj) || !strcmp(ONAME(obj), ONAME(otmp))) );
  2283. X  
  2284. X!     else if(obj->known == otmp->known || 
  2285. X          !objects[otmp->otyp].oc_uses_known) {
  2286. X          return(objects[obj->otyp].oc_merge);
  2287. X      } else return(FALSE);
  2288. X  }
  2289. X  
  2290. X  int
  2291. X  doprgold(){
  2292. X      if(!u.ugold)
  2293. X--- 1193,1232 ----
  2294. X         obj->otrapped != otmp->otrapped)
  2295. X          return(FALSE);
  2296. X  
  2297. X!     if((obj->olet==WEAPON_SYM || obj->olet==ARMOR_SYM) &&
  2298. X          obj->rustfree != otmp->rustfree) return FALSE;
  2299. X  
  2300. X!     if(obj->olet == FOOD_SYM && (obj->oeaten != otmp->oeaten ||
  2301. X          obj->orotten != otmp->orotten))
  2302. X          return(FALSE);
  2303. X  
  2304. X!     if(obj->otyp == CORPSE || obj->otyp == EGG || obj->otyp == TIN) {
  2305. X!         if((obj->corpsenm != otmp->corpsenm) ||
  2306. X!             (ONAME(obj) && strcmp(ONAME(obj), ONAME(otmp))))
  2307. X!                 return FALSE;
  2308. X!     }
  2309. X! 
  2310. X! /* if they have names, make sure they're the same */
  2311. X!     if ( (obj->onamelth != otmp->onamelth &&
  2312. X!         ((obj->onamelth && otmp->onamelth) || obj->otyp == CORPSE)
  2313. X!          ) ||
  2314. X!         (obj->onamelth && 
  2315. X!             strncmp(ONAME(obj), ONAME(otmp), (int)obj->onamelth)))
  2316. X!         return FALSE;
  2317. X! 
  2318. X! #ifdef NAMED_ITEMS
  2319. X!     if(is_artifact(obj) != is_artifact(otmp)) return FALSE;
  2320. X! #endif
  2321. X  
  2322. X!     if(obj->known == otmp->known || 
  2323. X          !objects[otmp->otyp].oc_uses_known) {
  2324. X          return(objects[obj->otyp].oc_merge);
  2325. X      } else return(FALSE);
  2326. X  }
  2327. X  
  2328. X+ #endif /* OVL1 */
  2329. X+ #ifdef OVLB
  2330. X+ 
  2331. X  int
  2332. X  doprgold(){
  2333. X      if(!u.ugold)
  2334. X***************
  2335. X*** 1305,1307 ****
  2336. X--- 1393,1397 ----
  2337. X          obj->invlet = (i < 26) ? ('a'+i) : ('A'+i-26);
  2338. X      lastinvnr = i;
  2339. X  }
  2340. X+ 
  2341. X+ #endif /* OVLB */
  2342. X
  2343. END_OF_FILE
  2344. if test 56054 -ne `wc -c <'patch7.04'`; then
  2345.     echo shar: \"'patch7.04'\" unpacked with wrong size!
  2346. fi
  2347. # end of 'patch7.04'
  2348. echo shar: End of archive 8 \(of 30\).
  2349. cp /dev/null ark8isdone
  2350. MISSING=""
  2351. for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 ; do
  2352.     if test ! -f ark${I}isdone ; then
  2353.     MISSING="${MISSING} ${I}"
  2354.     fi
  2355. done
  2356. if test "${MISSING}" = "" ; then
  2357.     echo You have unpacked all 30 archives.
  2358.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  2359. else
  2360.     echo You still need to unpack the following archives:
  2361.     echo "        " ${MISSING}
  2362. fi
  2363. ##  End of shell archive.
  2364. exit 0
  2365.