home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1994 March / Source_Code_CD-ROM_Walnut_Creek_March_1994.iso / compsrcs / games / volume16 / nethck31 / patch3f < prev    next >
Encoding:
Internet Message Format  |  1993-07-23  |  60.8 KB

  1. Path: uunet!news.tek.com!saab!billr
  2. From: billr@saab.CNA.TEK.COM (Bill Randle)
  3. Newsgroups: comp.sources.games
  4. Subject: v18i039:  nethack31 - display oriented dungeons & dragons (Ver. 3.1), Patch3f/18
  5. Date: 20 Jul 1993 22:32:40 GMT
  6. Organization: Tektronix, Inc, Redmond, OR, USA
  7. Lines: 2195
  8. Approved: billr@saab.CNA.TEK.COM
  9. Message-ID: <22hrq8$9pt@ying.cna.tek.com>
  10. NNTP-Posting-Host: saab.cna.tek.com
  11. Xref: uunet comp.sources.games:1839
  12.  
  13. Submitted-by: izchak@linc.cis.upenn.edu (Izchak Miller)
  14. Posting-number: Volume 18, Issue 39
  15. Archive-name: nethack31/patch3f
  16. Patch-To: nethack31: Volume 16, Issue 1-116
  17. Environment: Amiga, Atari, Mac, MS-DOS, Windows-NT, OS2, Unix, VMS, X11
  18.  
  19.  
  20.  
  21. #! /bin/sh
  22. # This is a shell archive.  Remove anything before this line, then unpack
  23. # it by saving it into a file and typing "sh file".  To overwrite existing
  24. # files, type "sh file -c".  You can also feed this as standard input via
  25. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  26. # will see the following message at the end:
  27. #        "End of archive 6 (of 18)."
  28. # Contents:  include/unixconf.h patches03h sys/mac/NetHack.r
  29. # Wrapped by billr@saab on Tue Jul 20 14:57:20 1993
  30. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  31. if test -f 'include/unixconf.h' -a "${1}" != "-c" ; then 
  32.   echo shar: Renaming existing file \"'include/unixconf.h'\" to \"'include/unixconf.h.orig'\"
  33.   mv -f 'include/unixconf.h' 'include/unixconf.h.orig'
  34. fi
  35. echo shar: Extracting \"'include/unixconf.h'\" \(8118 characters\)
  36. sed "s/^X//" >'include/unixconf.h' <<'END_OF_FILE'
  37. X/*    SCCS Id: @(#)unixconf.h    3.1    90/22/02    */
  38. X/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  39. X/* NetHack may be freely redistributed.  See license for details. */
  40. X
  41. X#ifdef UNIX
  42. X#ifndef UNIXCONF_H
  43. X#define UNIXCONF_H
  44. X
  45. X/*
  46. X * Some include files are in a different place under SYSV
  47. X *    BSD           SYSV
  48. X * <sys/time.h>        <time.h>
  49. X * <sgtty.h>        <termio.h>
  50. X *
  51. X * Some routines are called differently
  52. X * index        strchr
  53. X * rindex        strrchr
  54. X *
  55. X */
  56. X
  57. X/* define exactly one of the following four choices */
  58. X#define BSD        /* define for 4.n BSD  */
  59. X            /* also for relatives like SunOS, Linux and DG/UX */
  60. X/* #define ULTRIX    /* define for Ultrix v3.0 or higher (but not lower) */
  61. X            /* Use BSD for < v3.0 */
  62. X            /* "ULTRIX" not to be confused with "ultrix" */
  63. X/* #define SYSV        /* define for System V */
  64. X/* #define HPUX        /* Hewlett-Packard's Unix, version 6.5 or higher */
  65. X            /* use SYSV for < v6.5 */
  66. X
  67. X
  68. X/* define any of the following that are appropriate */
  69. X/* #define SVR4        /* use in addition to SYSV for System V Release 4 */
  70. X#define NETWORK    /* if running on a networked system */
  71. X            /* e.g. Suns sharing a playground through NFS */
  72. X#define SUNOS4    /* SunOS 4.x */
  73. X/* #define LINUX  /* Another Unix clone running on Intel processors */
  74. X/* #define GENIX    /* Yet Another Unix Clone */
  75. X/* #define HISX        /* Bull Unix for XPS Machines */
  76. X/* #define BOS        /* Bull Open Software - Unix for DPX/2 Machines */
  77. X/* #define UNIXPC    /* use in addition to SYSV for AT&T 7300/3B1 */
  78. X/* #define AIX_31    /* In AIX 3.1 (IBM RS/6000) use BSD ioctl's to gain
  79. X               job control (note that AIX is SYSV otherwise) */
  80. X/* #define TEXTCOLOR    /* Use System V r3.2 terminfo color support */
  81. X            /* or ANSI color support on termcap systems */
  82. X            /* or X11 color    */
  83. X/* #define POSIX_JOB_CONTROL    /* use System V POSIX job control */
  84. X/* #define POSIX_TYPES    /* use POSIX types for system calls and termios */
  85. X                        /* define for platforms using the GNU libraries */
  86. X                        /* linux, etc .. */
  87. X
  88. X/* #define OPENWINBUG    /* avoid a problem using OpenWindows 3.0 for X11
  89. X               on SunOS 4.1.x, x>= 2 */
  90. X/* #define PYRAMID_BUG    /* avoid a bug on the Pyramid */
  91. X/* #define BSD_43_BUG    /* for real 4.3BSD cc's without schain botch fix */
  92. X/* #define MICROPORT_BUG /* problems with large arrays in structs */
  93. X/* #define MICROPORT_286_BUG /* Changes needed in termcap.c to get it to
  94. X               run with Microport Sys V/AT version 2.4.
  95. X               By Jay Maynard */
  96. X/* #define AIXPS_2BUG    /* avoid a problem with little_to_big() optimization */
  97. X
  98. X/* #define RANDOM    /* if neither random/srandom nor lrand48/srand48
  99. X               is available from your system */
  100. X
  101. X/* see sys/unix/snd86.shr for more information on these */
  102. X/* #define UNIX386MUSIC    /* Play real music through speaker on systems with
  103. X               music driver installed */
  104. X/* #define VPIX_MUSIC    /* Play real music through speaker on systems with
  105. X               built-in VPIX support */
  106. X
  107. X
  108. X/*
  109. X * The next two defines are intended mainly for the Andrew File System,
  110. X * which does not allow hard links.  If NO_FILE_LINKS is defined, lock files
  111. X * will be created in LOCKDIR using open() instead of in the playground using
  112. X * link().
  113. X *        Ralf Brown, 7/26/89 (from v2.3 hack of 10/10/88)
  114. X */
  115. X
  116. X/* #define NO_FILE_LINKS    /* if no hard links */
  117. X/* #define LOCKDIR "/usr/games/lib/nethackdir"    /* where to put locks */
  118. X
  119. X
  120. X/*
  121. X * Define DEF_PAGER as your default pager, e.g. "/bin/cat" or "/usr/ucb/more"
  122. X * If defined, it can be overridden by the environment variable PAGER.
  123. X * Hack will use its internal pager if DEF_PAGER is not defined.
  124. X * (This might be preferable for security reasons.)
  125. X * #define DEF_PAGER    ".../mydir/mypager"
  126. X */
  127. X
  128. X
  129. X
  130. X/*
  131. X * Define PORT_HELP to be the name of the port-specfic help file.
  132. X * This file is found in HACKDIR. 
  133. X * Normally, you shouldn't need to change this.
  134. X * There is currently no port-specific help for Unix systems.
  135. X */
  136. X/* #define PORT_HELP "Unixhelp" */
  137. X
  138. X/*
  139. X * If you define MAIL, then the player will be notified of new mail
  140. X * when it arrives.  If you also define DEF_MAILREADER then this will
  141. X * be the default mail reader, and can be overridden by the environment
  142. X * variable MAILREADER; otherwise an internal pager will be used.
  143. X * A stat system call is done on the mailbox every MAILCKFREQ moves.
  144. X */
  145. X
  146. X#define MAIL            /* Deliver mail during the game */
  147. X
  148. X/* The Andrew Message System does mail a little differently from normal
  149. X * UNIX.  Mail is deposited in the user's own directory in ~/Mailbox
  150. X * (another directory).  MAILBOX is the element that will be added on to
  151. X * the user's home directory path to generate the Mailbox path - just in
  152. X * case other Andrew sites do it differently from CMU.
  153. X *
  154. X *        dan lovinger
  155. X *        dl2n+@andrew.cmu.edu (dec 19 1989)
  156. X */
  157. X
  158. X/* #define AMS            /* use Andrew message system for mail */
  159. X
  160. X/* NO_MAILREADER is for kerberos authentcating filesystems where it is
  161. X * essentially impossible to securely exec child processes, like mail
  162. X * readers, when the game is running under a special token.
  163. X *
  164. X *             dan
  165. X */
  166. X
  167. X/* #define NO_MAILREADER    /* have mail daemon just tell player of mail */
  168. X
  169. X#ifdef    MAIL
  170. X# if defined(BSD) || defined(ULTRIX)
  171. X#  ifdef AMS
  172. X#define AMS_MAILBOX    "/Mailbox"
  173. X#  else
  174. X#define DEF_MAILREADER    "/usr/ucb/Mail"
  175. X#  endif
  176. X#else
  177. X# if defined(SYSV) || defined(DGUX) || defined(HPUX)
  178. X#  ifdef M_XENIX
  179. X#define DEF_MAILREADER    "/usr/bin/mail"
  180. X#  else
  181. X#define DEF_MAILREADER    "/usr/bin/mailx"
  182. X#  endif
  183. X# else
  184. X#define DEF_MAILREADER    "/bin/mail"
  185. X# endif
  186. X#endif
  187. X
  188. X#define MAILCKFREQ    50
  189. X#endif    /* MAIL */
  190. X
  191. X
  192. X
  193. X#ifdef COMPRESS
  194. X/* Some implementations of compress need a 'quiet' option.
  195. X * If you've got one of these versions, put -q here.
  196. X * You can also include any other strange options your compress needs.
  197. X * If you have a normal compress, just leave it commented out.
  198. X */
  199. X/* #define COMPRESS_OPTIONS    "-q"    /* */
  200. X#endif
  201. X
  202. X#define FCMASK    0660    /* file creation mask */
  203. X
  204. X
  205. X/*
  206. X * The remainder of the file should not need to be changed.
  207. X */
  208. X
  209. X#ifdef _AUX_SOURCE
  210. X# ifdef AUX /* gcc ? */
  211. X#  define _SYSV_SOURCE
  212. X#  define _BSD_SOURCE
  213. X#else
  214. X#  define AUX
  215. X# endif
  216. X#endif /* _AUX_SOURCE */
  217. X
  218. X/*
  219. X * BSD/ULTRIX systems are normally the only ones that can suspend processes.
  220. X * Suspending NetHack processes cleanly should be easy to add to other systems
  221. X * that have SIGTSTP in the Berkeley sense.  Currently the only such systems
  222. X * known to work are HPUX and AIX 3.1; other systems will probably require
  223. X * tweaks to unixtty.c and ioctl.c.
  224. X *
  225. X * POSIX defines a slightly different type of job control, which should be
  226. X * equivalent for NetHack's purposes.  POSIX_JOB_CONTROL should work on
  227. X * various recent SYSV versions (with possibly tweaks to unixtty.c again).
  228. X */
  229. X#ifndef POSIX_JOB_CONTROL
  230. X# if defined(BSD) || defined(ULTRIX) || defined(HPUX) || defined(AIX_31)
  231. X#  define BSD_JOB_CONTROL
  232. X# else
  233. X#  if defined(SVR4)
  234. X#   define POSIX_JOB_CONTROL
  235. X#  endif
  236. X# endif
  237. X#endif
  238. X#if defined(BSD_JOB_CONTROL) || defined(POSIX_JOB_CONTROL) || defined(AUX)
  239. X#define SUSPEND        /* let ^Z suspend the game */
  240. X#endif
  241. X
  242. X
  243. X#if defined(BSD) || defined(ULTRIX)
  244. X#include    <sys/time.h>
  245. X#else
  246. X#include    <time.h>
  247. X#endif
  248. X
  249. X#define HLOCK    "perm"    /* an empty file used for locking purposes */
  250. X
  251. X#ifndef REDO
  252. X#define Getchar nhgetch
  253. X#endif
  254. X#define tgetch getchar
  255. X
  256. X#define SHELL        /* do not delete the '!' command */
  257. X
  258. X#include "system.h"
  259. X
  260. X#if defined(BSD) || defined(ULTRIX)
  261. X# if !defined(DGUX) && !defined(SUNOS4)
  262. X#define memcpy(d, s, n)        bcopy(s, d, n)
  263. X#define memcmp(s1, s2, n)    bcmp(s2, s1, n)
  264. X# endif
  265. X#else    /* therefore SYSV */
  266. X# ifndef index    /* some systems seem to do this for you */
  267. X#define index    strchr
  268. X# endif
  269. X# ifndef rindex
  270. X#define rindex    strrchr
  271. X# endif
  272. X#endif
  273. X
  274. X/* A safety check for BOS and AUX */
  275. X#if (defined(BOS) || defined(AUX)) && defined(NHSTDC)
  276. X# if defined(VISION_TABLES) && defined(BRACES)
  277. X#  undef BRACES
  278. X# endif
  279. X#endif
  280. X
  281. X/* Use the high quality random number routines. */
  282. X#if defined(BSD) || defined(ULTRIX) || defined(RANDOM)
  283. X#define Rand()    random()
  284. X#else
  285. X#define Rand()    lrand48()
  286. X#endif
  287. X
  288. X#ifdef hc    /* older versions of the MetaWare High-C compiler define this */
  289. X# ifdef __HC__
  290. X#  undef __HC__
  291. X# endif
  292. X# define __HC__ hc
  293. X# undef hc
  294. X#endif
  295. X
  296. X#endif /* UNIXCONF_H */
  297. X#endif /* UNIX */
  298. END_OF_FILE
  299. if test 8118 -ne `wc -c <'include/unixconf.h'`; then
  300.     echo shar: \"'include/unixconf.h'\" unpacked with wrong size!
  301. fi
  302. # end of 'include/unixconf.h'
  303. if test -f 'patches03h' -a "${1}" != "-c" ; then 
  304.   echo shar: Renaming existing file \"'patches03h'\" to \"'patches03h.orig'\"
  305.   mv -f 'patches03h' 'patches03h.orig'
  306. fi
  307. echo shar: Extracting \"'patches03h'\" \(46114 characters\)
  308. sed "s/^X//" >'patches03h' <<'END_OF_FILE'
  309. X*** /tmp/da24021    Mon Jul 12 20:10:17 1993
  310. X--- sys/mac/MacHelp    Wed Jul  7 15:49:08 1993
  311. X***************
  312. X*** 45,60 ****
  313. X          the saved game in the Dungeon Folder.
  314. X  
  315. X  === Windows
  316. X!     Dungeon Map, Message and Status are the essential windows used
  317. X!         for play.  As needed, Info windows are generated and may be
  318. X!         dismissed (clicking the close box or hitting the space bar
  319. X!         when that window is frontmost) at any time.  Special inventory
  320. X!         and list windows also appear in the front from time to time
  321. X!         and are dismissed by hitting the space bar (or Return or
  322. X!         Enter keys).  Hitting the ESCape key will dismiss a window
  323. X!         without scrolling to the end.
  324. X  
  325. X!     The Extended command "Window Cleanup" may be used to restore the
  326. X          the startup sizes and locations of the various windows.  The
  327. X          window positions are saved in a file labelled "NetHack Windows"
  328. X          in the appropriate preferences folder.
  329. X--- 45,63 ----
  330. X          the saved game in the Dungeon Folder.
  331. X  
  332. X  === Windows
  333. X!     The Dungeon Map and Message windows are the essential windows used
  334. X!         during window-mode play.  During tty-mode play there is only one
  335. X!         window which displays the map, messages, lists and other info.
  336. X!         For window-mode play, lists (e.g. the list of objects that may
  337. X!         be wielded) and special info windows appear as needed.  Windows
  338. X!         may be closed in the normal ways (i.e. clicking their close box,
  339. X!         choosing 'Close' from the File menu or typing the command
  340. X!         equivalent for 'Close', cmd-W) and the list windows may also be
  341. X!         dismissed by hitting the space bar (or Return or Enter Keys).
  342. X!         Hitting the ESCape key will dismiss special windows without
  343. X!         scrolling to the end.
  344. X  
  345. X!     The command "Reposition" on the File menu may be used to restore the
  346. X          the startup sizes and locations of the various windows.  The
  347. X          window positions are saved in a file labelled "NetHack Windows"
  348. X          in the appropriate preferences folder.
  349. X***************
  350. X*** 67,73 ****
  351. X      page_wait    - display  --MORE--  after messages [TRUE]
  352. X  
  353. X      large_font is currently a pre-game option and has no effect
  354. X!         after the Dungeon Map, Message and Status windows are created.
  355. X  
  356. X      Default options may be set by editing the NetHack Defaults text
  357. X          file (possibly using TeachText or your favorite editor).
  358. X--- 70,76 ----
  359. X      page_wait    - display  --MORE--  after messages [TRUE]
  360. X  
  361. X      large_font is currently a pre-game option and has no effect
  362. X!         after the Dungeon Map window is created.
  363. X  
  364. X      Default options may be set by editing the NetHack Defaults text
  365. X          file (possibly using TeachText or your favorite editor).
  366. X***************
  367. X*** 74,79 ****
  368. X--- 77,88 ----
  369. X          Unix(tm)-style notation is used, as in:
  370. X      OPTIONS=name:Arnold,time,!tombstone
  371. X  
  372. X+     It should also be mentioned here that there are two graphic
  373. X+     interface modes available: 'mac' and 'tty'.  Choosing between
  374. X+     these interfaces is accomplished by the option:
  375. X+     window:mac - the default multi-window Macintosh(tm) interface.
  376. X+     window:tty - traditional Unix(tm)-style TTY window interface.
  377. X+ 
  378. X      See option help (?f or ?g) for more details.
  379. X  
  380. X  === Movement by mouse
  381. X***************
  382. X*** 89,100 ****
  383. X      The option "silent" [FALSE] controls whether or not a sound will
  384. X      be heard when an instrument is applied.
  385. X  
  386. X! === Debugging-Mode
  387. X!     Open NetHack and answer "wizard" to the "Who are you?" dialog.
  388. X!     The debug-mode (wizard-mode) commands are then listed in the
  389. X!     help menu, ?k.
  390. X  
  391. X!     WARNING: This mode is only intended for developers and others
  392. X      interested in characterizing bugs.  Using this mode for other
  393. X!     purposes will have confusing results and may significantly
  394. X!     decrease your enjoyment of the game!
  395. X--- 98,148 ----
  396. X      The option "silent" [FALSE] controls whether or not a sound will
  397. X      be heard when an instrument is applied.
  398. X  
  399. X! === Explore and Debug Modes
  400. X!     As of version 3.1.2, you can enter Discover (aka Explore) mode or
  401. X!     Wizard (aka Debug) mode by choosing the appropriate entries on the
  402. X!     'Mode' popup-menu section of the "Who are you?" startup dialog.
  403. X!     This same dialog allows you to specify your sex, role and name,
  404. X!     of course.
  405. X  
  406. X!     Starting in Discover mode is essentially the same as playing in
  407. X!     Regular mode except that if you are killed then you are given an
  408. X!     oppurtunity to override your death.  Because of this advantage,
  409. X!     your Discover mode scores are not entered on the scoreboard record.
  410. X!     You also get a wand of wishing in your starting inventory and can
  411. X!     see your intrinsic abilities using the command ctl-X (also available
  412. X!     on the 'Explore' submenu on the File menu).
  413. X! 
  414. X!     Starting in Wizard mode is only intended for developers and others
  415. X      interested in characterizing bugs.  Using this mode for other
  416. X!     purposes will have confusing results and eliminate your enjoyment
  417. X!     of the game!
  418. X! 
  419. X! === Menus
  420. X!     As of version 3.1.2, the menus have been reworked to provide access
  421. X!     to all the NetHack commands and a special 'Kbd' menu was added to
  422. X!     facilitate play using only the mouse.  In some cases, a command may
  423. X!     appear on more than one menu.  In general, the commands have been
  424. X!     grouped to appear on an appropriate menu:
  425. X!     File  - commands related to windows, start mode and play control.
  426. X!     Help  - info commands generally not related to a specific game (i.e.
  427. X!             (key descriptions, version info, internal option editor).
  428. X!     Info  - commands that are generally game-specific (i.e. inventory
  429. X!             related, describe features seen on the map or name things).
  430. X!     Equip - commands related to things you might wield or wear.
  431. X!     Act   - commands for actions that you might do alone (i.e. wait,
  432. X!             jump) or do with another dungeon denizen (i.e. pay, chat).
  433. X!     Magic - commands for things that you might do with items (drop,
  434. X!             eat, read) or spell-related.
  435. X!     Bits  - commands for things you might do to dungeon pieces (i.e.
  436. X!             open door, loot chest, engrave on the floor, climb stairs).
  437. X! 
  438. X!     The key related to a command generally appears to the left of the
  439. X!     menu entry for that command (i.e. w for wield and W for wear). A
  440. X!     leftmost # denotes an extended command (without a related key) and
  441. X!     a left cloverleaf or command symbol denotes a command that requires
  442. X!     either a control or command key modifier (i.e. holding down the
  443. X!     control or command key while hitting the related key).
  444. X! 
  445. X! ===
  446. X! The members of the Macintosh NetHack port team hope you enjoy this game.
  447. X*** /tmp/da24085    Mon Jul 12 20:10:44 1993
  448. X--- sys/mac/News    Tue Jul  6 15:33:26 1993
  449. X***************
  450. X*** 1,8 ****
  451. X  Welcome to NetHack 3.1 for the Macintosh
  452. X  
  453. X! This game is brought to you by Jon Watte, Hao-Yang Wang and the rest
  454. X! of the Macintosh Team (David Hairston, Jonathan Handler, Tim Lennan,
  455. X! Rob Menke, Chris Russo and Andy Swanson).
  456. X  
  457. X  Bug reports, suggestions, comments, etc., should be e-mailed to the
  458. X  Internet address: nethack-bugs@linc.cis.upenn.edu
  459. X--- 1,7 ----
  460. X  Welcome to NetHack 3.1 for the Macintosh
  461. X  
  462. X! This game is brought to you by Jon Watte, Hao-Yang Wang, Barton House,
  463. X! David Hairston, Jonathan Handler, Dean Luick, Rob Menke and Andy Swanson.
  464. X  
  465. X  Bug reports, suggestions, comments, etc., should be e-mailed to the
  466. X  Internet address: nethack-bugs@linc.cis.upenn.edu
  467. X*** /tmp/da24093    Mon Jul 12 20:10:46 1993
  468. X--- sys/mac/dprintf.c    Tue Jul  6 15:20:27 1993
  469. X***************
  470. X*** 7,13 ****
  471. X--- 7,15 ----
  472. X  #include <Types.h>
  473. X  #include <stdarg.h>
  474. X  #include <stdio.h>
  475. X+ #ifndef THINK_C
  476. X  #include <strings.h>
  477. X+ #endif
  478. X  #include <GestaltEqu.h>
  479. X  
  480. X  
  481. X***************
  482. X*** 48,54 ****
  483. X      buffer [ 0 ] = strlen ( & buffer [ 1 ] ) ;
  484. X      if ( trapAvailable ) {
  485. X          if ( KeyDown ( 0x39 ) ) {                                    /* Caps Lock */
  486. X!             DebugStr ( buffer ) ;
  487. X          } else if ( KeyDown ( 0x3B ) && flags . window_inited &&    /* Control */
  488. X              ( WIN_MESSAGE != -1 ) && theWindows [ WIN_MESSAGE ] . theWindow ) {
  489. X              pline ( "%s" , & buffer [ 1 ] ) ;
  490. X--- 50,56 ----
  491. X      buffer [ 0 ] = strlen ( & buffer [ 1 ] ) ;
  492. X      if ( trapAvailable ) {
  493. X          if ( KeyDown ( 0x39 ) ) {                                    /* Caps Lock */
  494. X!             DebugStr ( (uchar *) buffer ) ;
  495. X          } else if ( KeyDown ( 0x3B ) && flags . window_inited &&    /* Control */
  496. X              ( WIN_MESSAGE != -1 ) && theWindows [ WIN_MESSAGE ] . theWindow ) {
  497. X              pline ( "%s" , & buffer [ 1 ] ) ;
  498. X*** /tmp/da24117    Mon Jul 12 20:10:51 1993
  499. X--- sys/mac/macerrs.c    Mon Jul 12 13:38:42 1993
  500. X***************
  501. X*** 14,21 ****
  502. X  #ifdef MAC_MPW32
  503. X  #include <String.h>
  504. X  #include <Strings.h>
  505. X! #endif
  506. X! #ifdef MAC_THINKC5
  507. X  #include <pascal.h>
  508. X  #endif
  509. X  #include <Dialogs.h>
  510. X--- 14,20 ----
  511. X  #ifdef MAC_MPW32
  512. X  #include <String.h>
  513. X  #include <Strings.h>
  514. X! #else
  515. X  #include <pascal.h>
  516. X  #endif
  517. X  #include <Dialogs.h>
  518. X*** /tmp/da24133    Mon Jul 12 20:10:55 1993
  519. X--- sys/mac/macmain.c    Tue Jul  6 15:20:43 1993
  520. X***************
  521. X*** 13,26 ****
  522. X  #include <String.h>
  523. X  #include <Strings.h>
  524. X  #endif
  525. X- #ifdef MAC_THINKC5
  526. X- #include <pascal.h>
  527. X- #endif
  528. X  #include <Dialogs.h>
  529. X  #include <Packages.h>
  530. X  #include <ToolUtils.h>
  531. X  #include <Resources.h>
  532. X  #include <SysEqu.h>
  533. X  #include <Errors.h>
  534. X  
  535. X  #ifndef O_RDONLY
  536. X--- 13,25 ----
  537. X  #include <String.h>
  538. X  #include <Strings.h>
  539. X  #endif
  540. X  #include <Dialogs.h>
  541. X  #include <Packages.h>
  542. X  #include <ToolUtils.h>
  543. X  #include <Resources.h>
  544. X+ #ifndef THINK_C
  545. X  #include <SysEqu.h>
  546. X+ #endif
  547. X  #include <Errors.h>
  548. X  
  549. X  #ifndef O_RDONLY
  550. X***************
  551. X*** 540,546 ****
  552. X  pascal long GetA5(void) = { 0x2E8D };                    /* MOVE.L A5,(A7) */
  553. X  pascal short GetCurJTOffset(void) = { 0x3EB8, 0x934 };   /* MOVE.W CurJTOffset,(SP) */
  554. X  #endif
  555. X! #ifdef MAC_THINKC5
  556. X  pascal long GetA5(void) = { 0x2E8D };                    /* MOVE.L A5,(A7) */
  557. X  pascal short GetCurJTOffset(void) = { 0x3EB8, 0x934 };   /* MOVE.W CurJTOffset,(SP) */
  558. X  #endif
  559. X--- 539,545 ----
  560. X  pascal long GetA5(void) = { 0x2E8D };                    /* MOVE.L A5,(A7) */
  561. X  pascal short GetCurJTOffset(void) = { 0x3EB8, 0x934 };   /* MOVE.W CurJTOffset,(SP) */
  562. X  #endif
  563. X! #ifdef THINK_C
  564. X  pascal long GetA5(void) = { 0x2E8D };                    /* MOVE.L A5,(A7) */
  565. X  pascal short GetCurJTOffset(void) = { 0x3EB8, 0x934 };   /* MOVE.W CurJTOffset,(SP) */
  566. X  #endif
  567. X*** /tmp/da24165    Mon Jul 12 20:11:04 1993
  568. X--- sys/mac/mactty.c    Mon Jul 12 13:50:08 1993
  569. X***************
  570. X*** 210,216 ****
  571. X  static short
  572. X  allocate_offscreen_world ( tty_record * record ) {
  573. X  GWorldPtr gw = NULL ;
  574. X! GWorldFlags world_flags = clipPix ;
  575. X  long mem_here , mem_there , other , required_mem ;
  576. X  Point p = { 0 , 0 } ;
  577. X  Rect r_screen ;
  578. X--- 210,216 ----
  579. X  static short
  580. X  allocate_offscreen_world ( tty_record * record ) {
  581. X  GWorldPtr gw = NULL ;
  582. X! GWorldFlags world_flags = 0 ;
  583. X  long mem_here , mem_there , other , required_mem ;
  584. X  Point p = { 0 , 0 } ;
  585. X  Rect r_screen ;
  586. X***************
  587. X*** 239,249 ****
  588. X          }
  589. X          world_flags |= useTempMem ;
  590. X      }
  591. X!     s_err = NewGWorld ( & gw , 16 , & r_screen , NULL , NULL , world_flags ) ;
  592. X      if ( ! s_err ) {
  593. X          record -> offscreen_world = gw ;
  594. X          select_offscreen_port ( record ) ;
  595. X          SetOrigin ( 0 , 0 ) ;
  596. X          dprintf ( "New GWorld @ %lx;dm %lx CGrafPtr" , gw , gw ) ;
  597. X      }
  598. X      return s_err ;
  599. X--- 239,250 ----
  600. X          }
  601. X          world_flags |= useTempMem ;
  602. X      }
  603. X!     s_err = NewGWorld ( & gw , 0 , & r_screen , NULL , NULL , world_flags ) ;
  604. X      if ( ! s_err ) {
  605. X          record -> offscreen_world = gw ;
  606. X          select_offscreen_port ( record ) ;
  607. X          SetOrigin ( 0 , 0 ) ;
  608. X+         select_onscreen_window ( record ) ;
  609. X          dprintf ( "New GWorld @ %lx;dm %lx CGrafPtr" , gw , gw ) ;
  610. X      }
  611. X      return s_err ;
  612. X***************
  613. X*** 654,659 ****
  614. X--- 655,661 ----
  615. X  
  616. X      select_offscreen_port ( record ) ;
  617. X      do_set_port_font ( record ) ;
  618. X+     select_onscreen_window ( record ) ;
  619. X  }
  620. X  
  621. X  
  622. X***************
  623. X*** 703,708 ****
  624. X--- 705,711 ----
  625. X              NULL , NULL , stretchPix ) ;
  626. X          select_offscreen_port ( record ) ;
  627. X          SetOrigin ( 0 , 0 ) ;
  628. X+         select_onscreen_window ( record ) ;
  629. X      }
  630. X      return s_err ;
  631. X  }
  632. X***************
  633. X*** 919,924 ****
  634. X--- 922,928 ----
  635. X          copy_bits ( record , & r , srcCopy , NULL ) ;
  636. X      } else {
  637. X          accumulate_rect ( record , & r ) ;
  638. X+         select_onscreen_window ( record ) ;
  639. X      }
  640. X  }
  641. X  
  642. X***************
  643. X*** 1295,1301 ****
  644. X--- 1299,1312 ----
  645. X      case updateEvt :
  646. X          if ( event -> message == ( long ) window ) {
  647. X              BeginUpdate ( window ) ;
  648. X+             
  649. X+             /* Why do we have to erase the same area we are about to
  650. X+                 do a copy_bits to?
  651. X+                 
  652. X              erase_rect ( record , & ( record -> its_bits . bounds ) ) ;
  653. X+             
  654. X+             */
  655. X+             
  656. X              tty_environment_changed ( window ) ;
  657. X              s_err = image_tty ( window ) ;
  658. X              EndUpdate ( window ) ;
  659. X***************
  660. X*** 1444,1450 ****
  661. X      accumulate_rect ( record , & r ) ;
  662. X      if ( DRAW_DIRECT ) {
  663. X          update_tty ( window ) ;
  664. X!     }
  665. X  }
  666. X  
  667. X  
  668. X--- 1455,1462 ----
  669. X      accumulate_rect ( record , & r ) ;
  670. X      if ( DRAW_DIRECT ) {
  671. X          update_tty ( window ) ;
  672. X!     } else
  673. X!         select_onscreen_window ( record ) ;
  674. X  }
  675. X  
  676. X  
  677. X***************
  678. X*** 1468,1474 ****
  679. X      accumulate_rect ( record , & r ) ;
  680. X      if ( DRAW_DIRECT ) {
  681. X          update_tty ( window ) ;
  682. X!     }
  683. X  }
  684. X  
  685. X  
  686. X--- 1480,1487 ----
  687. X      accumulate_rect ( record , & r ) ;
  688. X      if ( DRAW_DIRECT ) {
  689. X          update_tty ( window ) ;
  690. X!     } else
  691. X!         select_onscreen_window ( record ) ;
  692. X  }
  693. X  
  694. X  
  695. X***************
  696. X*** 1490,1496 ****
  697. X      accumulate_rect ( record , & r ) ;
  698. X      if ( DRAW_DIRECT ) {
  699. X          update_tty ( window ) ;
  700. X!     }
  701. X  }
  702. X  
  703. X  
  704. X--- 1503,1510 ----
  705. X      accumulate_rect ( record , & r ) ;
  706. X      if ( DRAW_DIRECT ) {
  707. X          update_tty ( window ) ;
  708. X!     } else
  709. X!         select_onscreen_window ( record ) ;
  710. X  }
  711. X  
  712. X  
  713. X***************
  714. X*** 1528,1534 ****
  715. X      accumulate_rect ( record , & r ) ;
  716. X      if ( DRAW_DIRECT ) {
  717. X          update_tty ( window ) ;
  718. X!     }
  719. X  }
  720. X  
  721. X  
  722. X--- 1542,1549 ----
  723. X      accumulate_rect ( record , & r ) ;
  724. X      if ( DRAW_DIRECT ) {
  725. X          update_tty ( window ) ;
  726. X!     } else
  727. X!         select_onscreen_window ( record ) ;
  728. X  }
  729. X  
  730. X  
  731. X*** /tmp/da24189    Mon Jul 12 20:11:15 1993
  732. X--- sys/mac/mgetline.c    Mon Jul 12 13:14:15 1993
  733. X***************
  734. X*** 4,12 ****
  735. X  
  736. X  #include "hack.h"
  737. X  #include "Dialogs.h"
  738. X- #ifdef THINK_C
  739. X- #include "pascal.h"
  740. X- #endif
  741. X  #include <Packages.h>
  742. X  
  743. X  // void FDECL(getlin,(const char *, char *));
  744. X--- 4,9 ----
  745. X***************
  746. X*** 138,144 ****
  747. X      if ( get_line_from_key_queue ( bufp ) )
  748. X          return ;
  749. X  
  750. X!     enter_topl_mode(query);
  751. X      while ((*key)(nhgetch())) ;
  752. X      leave_topl_mode(bufp);
  753. X  }
  754. X--- 135,141 ----
  755. X      if ( get_line_from_key_queue ( bufp ) )
  756. X          return ;
  757. X  
  758. X!     enter_topl_mode((char *) query);
  759. X      while ((*key)(nhgetch())) ;
  760. X      leave_topl_mode(bufp);
  761. X  }
  762. X***************
  763. X*** 352,363 ****
  764. X  void
  765. X  mac_get_ext_cmd(char *bufp)
  766. X  {
  767. X! #if 0    /* already in error and then broken by macmenu.c */
  768. X!     if (flags.popup_dialog)
  769. X!         popup_get_ext_cmd(bufp);
  770. X!     else
  771. X! #endif
  772. X!         topl_getlin("# ", bufp, &topl_ext_key);
  773. X  }
  774. X  
  775. X  #endif /* COM_COMPL /* */
  776. X--- 349,355 ----
  777. X  void
  778. X  mac_get_ext_cmd(char *bufp)
  779. X  {
  780. X!     topl_getlin("# ", bufp, &topl_ext_key);
  781. X  }
  782. X  
  783. X  #endif /* COM_COMPL /* */
  784. X*** /tmp/da24963    Tue Jul 13 09:33:38 1993
  785. X--- sys/mac/maccurs.c    Tue Jul 13 09:29:25 1993
  786. X***************
  787. X*** 19,25 ****
  788. X  static unsigned char winFileName [ 32 ] ;
  789. X  static long winFileDir ;
  790. X  static short winFileVol ;
  791. X! static Handle winFileContents = NULL ;
  792. X  
  793. X  typedef struct WinPosSave {
  794. X      short            validPos ;
  795. X--- 19,25 ----
  796. X  static unsigned char winFileName [ 32 ] ;
  797. X  static long winFileDir ;
  798. X  static short winFileVol ;
  799. X! static Handle winFileContents = (Handle) NULL ;
  800. X  
  801. X  typedef struct WinPosSave {
  802. X      short            validPos ;
  803. X***************
  804. X*** 54,60 ****
  805. X      sh = GetString ( 128 ) ;
  806. X      if ( sh && * sh ) {
  807. X          BlockMove ( * sh , winFileName , * * sh + 1 ) ;
  808. X!         ReleaseResource ( sh ) ;
  809. X      } else {
  810. X          BlockMove ( "\PNetHack Windows" , winFileName , 16 ) ;
  811. X      }
  812. X--- 54,60 ----
  813. X      sh = GetString ( 128 ) ;
  814. X      if ( sh && * sh ) {
  815. X          BlockMove ( * sh , winFileName , * * sh + 1 ) ;
  816. X!         ReleaseResource ( (Handle) sh ) ;
  817. X      } else {
  818. X          BlockMove ( "\PNetHack Windows" , winFileName , 16 ) ;
  819. X      }
  820. X*** /tmp/da24984    Tue Jul 13 09:34:07 1993
  821. X--- sys/mac/macfile.c    Tue Jul 13 09:29:28 1993
  822. X***************
  823. X*** 294,300 ****
  824. X          if ( FSClose ( fd ) ) {
  825. X              return -1 ;
  826. X          }
  827. X!         FlushVol ( NULL , theDirs . dataRefNum ) ;
  828. X      }
  829. X      return 0 ;
  830. X  }
  831. X--- 294,300 ----
  832. X          if ( FSClose ( fd ) ) {
  833. X              return -1 ;
  834. X          }
  835. X!         FlushVol ( (StringPtr) NULL , theDirs . dataRefNum ) ;
  836. X      }
  837. X      return 0 ;
  838. X  }
  839. X***************
  840. X*** 330,344 ****
  841. X  char *
  842. X  macgets ( int fd , char * ptr , unsigned len )
  843. X  {
  844. X!     int idx = 0 ;
  845. X!     while ( -- len > 0 ) {
  846. X!         if ( macread ( fd , ptr + idx , 1 ) <= 0 )
  847. X!             return NULL ;
  848. X!         if ( ptr [ idx ++ ] == '\n' )
  849. X!             break ;
  850. X!     }
  851. X!     ptr [ idx ] = '\0' ;
  852. X!     return ptr ;
  853. X  }
  854. X  
  855. X  
  856. X--- 330,347 ----
  857. X  char *
  858. X  macgets ( int fd , char * ptr , unsigned len )
  859. X  {
  860. X!         int idx = 0 ;
  861. X!         char c;
  862. X! 
  863. X!         while ( -- len > 0 ) {
  864. X!                 if ( macread ( fd , ptr + idx , 1 ) <= 0 )
  865. X!                         return NULL ;
  866. X!                 c = ptr[ idx++ ];
  867. X!                 if ( c  == '\n' || c == '\r' )
  868. X!                         break ;
  869. X!         }
  870. X!         ptr [ idx ] = '\0' ;
  871. X!         return ptr ;
  872. X  }
  873. X  
  874. X  
  875. X*** /tmp/da25018    Tue Jul 13 09:34:38 1993
  876. X--- sys/mac/macsnd.c    Tue Jul 13 09:29:37 1993
  877. X***************
  878. X*** 26,32 ****
  879. X  void
  880. X  mac_speaker ( struct obj * instr , char * melody )
  881. X  {
  882. X!     SndChannelPtr theChannel = NULL ;
  883. X      SndCommand theCmd ;
  884. X      Handle theSound ;
  885. X      unsigned char theName [ 32 ] ;
  886. X--- 26,32 ----
  887. X  void
  888. X  mac_speaker ( struct obj * instr , char * melody )
  889. X  {
  890. X!     SndChannelPtr theChannel = (SndChannelPtr) NULL ;
  891. X      SndCommand theCmd ;
  892. X      Handle theSound ;
  893. X      unsigned char theName [ 32 ] ;
  894. X***************
  895. X*** 70,76 ****
  896. X  
  897. X          theCmd . cmd = soundCmd ;
  898. X          theCmd . param1 = 0 ;
  899. X!         theCmd . param2 = SND_BUFFER ( theSound ) ;
  900. X          err = SndDoCommand ( theChannel , & theCmd , false ) ;
  901. X  
  902. X      /*
  903. X--- 70,76 ----
  904. X  
  905. X          theCmd . cmd = soundCmd ;
  906. X          theCmd . param1 = 0 ;
  907. X!         theCmd . param2 = (long) SND_BUFFER ( theSound ) ;
  908. X          err = SndDoCommand ( theChannel , & theCmd , false ) ;
  909. X  
  910. X      /*
  911. X*** /tmp/da25035    Tue Jul 13 09:34:51 1993
  912. X--- sys/mac/mactopl.c    Tue Jul 13 09:29:41 1993
  913. X***************
  914. X*** 29,35 ****
  915. X  queued_resp(char *resp)
  916. X  {
  917. X      char buf[30];
  918. X!     if (try_key_queue(&buf)) {
  919. X          if (!resp || strchr(resp, buf[0]))
  920. X              return buf[0];
  921. X          if (digit(buf[0]) && strchr(resp, '#')) {
  922. X--- 29,35 ----
  923. X  queued_resp(char *resp)
  924. X  {
  925. X      char buf[30];
  926. X!     if (try_key_queue(buf)) {
  927. X          if (!resp || strchr(resp, buf[0]))
  928. X              return buf[0];
  929. X          if (digit(buf[0]) && strchr(resp, '#')) {
  930. X***************
  931. X*** 108,114 ****
  932. X  {
  933. X      unsigned char code ;
  934. X      char ch ;
  935. X!     char * re = gRespStr ;
  936. X  
  937. X      if ( ev -> what != keyDown ) {
  938. X  
  939. X--- 108,114 ----
  940. X  {
  941. X      unsigned char code ;
  942. X      char ch ;
  943. X!     char * re = (char *) gRespStr ;
  944. X  
  945. X      if ( ev -> what != keyDown ) {
  946. X  
  947. X***************
  948. X*** 192,204 ****
  949. X      DialogPtr dp ;
  950. X      short item ;
  951. X  
  952. X!     char c = queued_resp ( resp ) ;
  953. X      if ( c )
  954. X          return c ;
  955. X  
  956. X      dlogID = dlog ;
  957. X!     strcpy ( p , query ) ;
  958. X!     ParamText ( CtoPstr ( p ) , NULL , NULL , NULL ) ;
  959. X      dp = mv_get_new_dialog ( dlog ) ;
  960. X      if ( ! dp ) {
  961. X  
  962. X--- 192,204 ----
  963. X      DialogPtr dp ;
  964. X      short item ;
  965. X  
  966. X!     char c = queued_resp ( (char *) resp ) ;
  967. X      if ( c )
  968. X          return c ;
  969. X  
  970. X      dlogID = dlog ;
  971. X!     strcpy ( (char *) p , query ) ;
  972. X!     ParamText ( CtoPstr ( (char *) p ) , (uchar *) NULL , (uchar *) NULL , (uchar *) NULL ) ;
  973. X      dp = mv_get_new_dialog ( dlog ) ;
  974. X      if ( ! dp ) {
  975. X  
  976. X***************
  977. X*** 289,295 ****
  978. X      unsigned char com [ 32 ] = { 1 , 27 } ; // margin for getitext
  979. X      Str255 pQuery ;
  980. X  
  981. X!     char c = queued_resp ( resp ) ;
  982. X      if ( c )
  983. X          return c ;
  984. X  
  985. X--- 289,295 ----
  986. X      unsigned char com [ 32 ] = { 1 , 27 } ; // margin for getitext
  987. X      Str255 pQuery ;
  988. X  
  989. X!     char c = queued_resp ( (char *) resp ) ;
  990. X      if ( c )
  991. X          return c ;
  992. X  
  993. X***************
  994. X*** 313,319 ****
  995. X          strcat ( ( char * ) pQuery , resp ) ;
  996. X          strcat ( ( char * ) pQuery , ")" ) ;
  997. X      }
  998. X!     ParamText ( CtoPstr ( pQuery ) , NULL , NULL , NULL ) ;
  999. X      GetDItem ( dp , 4 , & k , & h , & r ) ;
  1000. X      SetIText ( h , com ) ;
  1001. X      SelIText ( dp , 4 , 0 , 0x7fff ) ;
  1002. X--- 313,319 ----
  1003. X          strcat ( ( char * ) pQuery , resp ) ;
  1004. X          strcat ( ( char * ) pQuery , ")" ) ;
  1005. X      }
  1006. X!     ParamText ( CtoPstr ( (char *) pQuery ) , (uchar *) NULL , (uchar *) NULL , (uchar *) NULL ) ;
  1007. X      GetDItem ( dp , 4 , & k , & h , & r ) ;
  1008. X      SetIText ( h , com ) ;
  1009. X      SelIText ( dp , 4 , 0 , 0x7fff ) ;
  1010. X***************
  1011. X*** 368,375 ****
  1012. X          return generic_yn_function ( query , resp , def ) ;
  1013. X      }
  1014. X  
  1015. X!     return do_question_dialog ( query , dia ,
  1016. X!         ( strchr ( resp , def ) - resp ) + 1 , resp ) ;
  1017. X  }
  1018. X  
  1019. X  
  1020. X--- 368,375 ----
  1021. X          return generic_yn_function ( query , resp , def ) ;
  1022. X      }
  1023. X  
  1024. X!     return do_question_dialog ( (char *) query , dia ,
  1025. X!         ( strchr ( resp , def ) - resp ) + 1 , (char *) resp ) ;
  1026. X  }
  1027. X  
  1028. X  
  1029. X***************
  1030. X*** 379,388 ****
  1031. X  char def;
  1032. X  {
  1033. X      char buf[30];
  1034. X!     char c = queued_resp(resp);
  1035. X      if (!c) {
  1036. X!         enter_topl_mode(query);
  1037. X!         topl_set_resp(resp, def);
  1038. X  
  1039. X          do {
  1040. X              c = readchar();
  1041. X--- 379,388 ----
  1042. X  char def;
  1043. X  {
  1044. X      char buf[30];
  1045. X!     char c = queued_resp((char *) resp);
  1046. X      if (!c) {
  1047. X!         enter_topl_mode((char *) query);
  1048. X!         topl_set_resp((char *) resp, def);
  1049. X  
  1050. X          do {
  1051. X              c = readchar();
  1052. X***************
  1053. X*** 393,399 ****
  1054. X          } while (!c);
  1055. X  
  1056. X          topl_set_resp("", '\0');
  1057. X!         leave_topl_mode(&buf);
  1058. X          if (c == '#')
  1059. X              yn_number = atoi(buf);
  1060. X      }
  1061. X--- 393,399 ----
  1062. X          } while (!c);
  1063. X  
  1064. X          topl_set_resp("", '\0');
  1065. X!         leave_topl_mode(buf);
  1066. X          if (c == '#')
  1067. X              yn_number = atoi(buf);
  1068. X      }
  1069. X*** /tmp/da25052    Tue Jul 13 09:35:05 1993
  1070. X--- sys/mac/macwin.c    Tue Jul 13 09:29:45 1993
  1071. X***************
  1072. X*** 1,4 ****
  1073. X! /*    SCCS Id: @(#)macwin.c    3.1    93/01/24          */
  1074. X  /* Copyright (c) Jon W{tte, Hao-Yang Wang, Jonathan Handler 1992. */
  1075. X  /* NetHack may be freely redistributed.  See license for details. */
  1076. X  
  1077. X--- 1,4 ----
  1078. X! /*    SCCS Id: @(#)macwin.c    3.1    93/07/09          */
  1079. X  /* Copyright (c) Jon W{tte, Hao-Yang Wang, Jonathan Handler 1992. */
  1080. X  /* NetHack may be freely redistributed.  See license for details. */
  1081. X  
  1082. X***************
  1083. X*** 24,31 ****
  1084. X  #include <dialogs.h>
  1085. X  #include <textedit.h>
  1086. X  #include <menus.h>
  1087. X! #ifndef MAC_THINKC5
  1088. X  #include <sysequ.h>
  1089. X  #endif
  1090. X  #include <resources.h>
  1091. X  #include <desk.h>
  1092. X--- 24,33 ----
  1093. X  #include <dialogs.h>
  1094. X  #include <textedit.h>
  1095. X  #include <menus.h>
  1096. X! #ifndef THINK_C
  1097. X  #include <sysequ.h>
  1098. X+ #else
  1099. X+ #include <LoMem.h>
  1100. X  #endif
  1101. X  #include <resources.h>
  1102. X  #include <desk.h>
  1103. X***************
  1104. X*** 38,43 ****
  1105. X--- 40,47 ----
  1106. X  #include <Sound.h>
  1107. X  #include <DiskInit.h>
  1108. X  
  1109. X+ static short kApplicInFront = 1;
  1110. X+ 
  1111. X  NhWindow * theWindows = (NhWindow *) NULL ;
  1112. X  
  1113. X  extern pascal short tty_environment_changed ( WindowPtr ) ;
  1114. X***************
  1115. X*** 61,67 ****
  1116. X   * response to a yn query, while topl_resp[topl_def_idx] is the
  1117. X   * default response to a yn query.
  1118. X   */
  1119. X! TEHandle top_line = nil;
  1120. X  int         topl_query_len;
  1121. X  int         topl_def_idx = -1;
  1122. X  char     topl_resp[10] = "";
  1123. X--- 65,71 ----
  1124. X   * response to a yn query, while topl_resp[topl_def_idx] is the
  1125. X   * default response to a yn query.
  1126. X   */
  1127. X! TEHandle top_line = (TEHandle) nil;
  1128. X  int         topl_query_len;
  1129. X  int         topl_def_idx = -1;
  1130. X  char     topl_resp[10] = "";
  1131. X***************
  1132. X*** 136,142 ****
  1133. X  /*
  1134. X   * Cursor movement
  1135. X   */
  1136. X! RgnHandle gMouseRgn = NULL ;
  1137. X  
  1138. X  /*
  1139. X   * _Gestalt madness - we rely heavily on the _Gestalt glue, since we
  1140. X--- 140,146 ----
  1141. X  /*
  1142. X   * Cursor movement
  1143. X   */
  1144. X! RgnHandle gMouseRgn = (RgnHandle) NULL ;
  1145. X  
  1146. X  /*
  1147. X   * _Gestalt madness - we rely heavily on the _Gestalt glue, since we
  1148. X***************
  1149. X*** 178,183 ****
  1150. X--- 182,190 ----
  1151. X  MenuHandle infoMenu ;
  1152. X  MenuHandle helpMenu ;
  1153. X  
  1154. X+ #ifdef NHW_BASE
  1155. X+ # undef NHW_BASE
  1156. X+ #endif
  1157. X  #define NHW_BASE 0
  1158. X  extern winid BASE_WINDOW ; // Was: , WIN_MAP , WIN_MESSAGE , WIN_INVEN , WIN_STATUS ;
  1159. X  
  1160. X***************
  1161. X*** 202,208 ****
  1162. X  
  1163. X  void trans_num_keys ( EventRecord * ) ;
  1164. X  
  1165. X! #ifndef MAC_THINKC5
  1166. X  /*
  1167. X   * Why aren't these declared when including hack.h - I thought
  1168. X   * they were...
  1169. X--- 209,215 ----
  1170. X  
  1171. X  void trans_num_keys ( EventRecord * ) ;
  1172. X  
  1173. X! #ifndef THINK_C
  1174. X  /*
  1175. X   * Why aren't these declared when including hack.h - I thought
  1176. X   * they were...
  1177. X***************
  1178. X*** 235,242 ****
  1179. X  static void FDECL(macCursorMenu, ( EventRecord * , WindowPtr , RgnHandle )) ;
  1180. X  static void FDECL(macCursorText, ( EventRecord * , WindowPtr , RgnHandle )) ;
  1181. X  
  1182. X! static void NDECL(UpdateMenus);
  1183. X! static void FDECL(DoMenu, (long choise));
  1184. X  
  1185. X  static void FDECL (DrawScrollbar, ( NhWindow * , WindowPtr ));
  1186. X  static void FDECL (InvalScrollBar, ( NhWindow * ));
  1187. X--- 242,249 ----
  1188. X  static void FDECL(macCursorMenu, ( EventRecord * , WindowPtr , RgnHandle )) ;
  1189. X  static void FDECL(macCursorText, ( EventRecord * , WindowPtr , RgnHandle )) ;
  1190. X  
  1191. X! void NDECL(UpdateMenus);
  1192. X! void FDECL(DoMenu, (long choise));
  1193. X  
  1194. X  static void FDECL (DrawScrollbar, ( NhWindow * , WindowPtr ));
  1195. X  static void FDECL (InvalScrollBar, ( NhWindow * ));
  1196. X***************
  1197. X*** 273,279 ****
  1198. X      for (ix = 0; ix < NUM_MACWINDOWS; ++ix)
  1199. X          if (mac_win == theWindows[ix].theWindow)
  1200. X              return theWindows + ix;
  1201. X!     return nil;
  1202. X  }
  1203. X  
  1204. X  
  1205. X--- 280,286 ----
  1206. X      for (ix = 0; ix < NUM_MACWINDOWS; ++ix)
  1207. X          if (mac_win == theWindows[ix].theWindow)
  1208. X              return theWindows + ix;
  1209. X!     return ((NhWindow *) nil) ;
  1210. X  }
  1211. X  
  1212. X  
  1213. X***************
  1214. X*** 290,295 ****
  1215. X--- 297,303 ----
  1216. X  {
  1217. X      int i ;
  1218. X      long l ;
  1219. X+     long applLimit;
  1220. X  
  1221. X  #ifdef applec
  1222. X      UnloadSeg((Ptr) _DataInit);
  1223. X***************
  1224. X*** 296,307 ****
  1225. X  #endif
  1226. X  
  1227. X      if ( * ( long * ) DefltStack < 50 * 1024L ) {
  1228. X!         SetApplLimit ( 
  1229. X!                     ( void * ) 
  1230. X!                     ( 
  1231. X!                     ( * ( long * ) CurStackBase ) - 50 * 1024L 
  1232. X!                     ) 
  1233. X!                  ) ;
  1234. X      }
  1235. X      MaxApplZone ( ) ;
  1236. X      for ( i = 0 ; i < 5 ; i ++ )
  1237. X--- 304,315 ----
  1238. X  #endif
  1239. X  
  1240. X      if ( * ( long * ) DefltStack < 50 * 1024L ) {
  1241. X! #ifdef THINK_C
  1242. X!         applLimit = (long) CurStackBase - (50 * 1024L);
  1243. X! #else
  1244. X!         applLimit = (* (long *) CurStackBase) - (50 * 1024L);
  1245. X! #endif
  1246. X!         SetApplLimit ( ( void * ) applLimit ) ;
  1247. X      }
  1248. X      MaxApplZone ( ) ;
  1249. X      for ( i = 0 ; i < 5 ; i ++ )
  1250. X***************
  1251. X*** 570,576 ****
  1252. X  /*HARDCODED*/
  1253. X  
  1254. X      SetPort ( aWin -> theWindow ) ;
  1255. X!     PenPat ( &qd . black ) ;
  1256. X  
  1257. X      switch ( type ) {
  1258. X          case NHW_MESSAGE :
  1259. X--- 578,584 ----
  1260. X  /*HARDCODED*/
  1261. X  
  1262. X      SetPort ( aWin -> theWindow ) ;
  1263. X!     PenPat ( (void *) &qd . black ) ;
  1264. X  
  1265. X      switch ( type ) {
  1266. X          case NHW_MESSAGE :
  1267. X***************
  1268. X*** 630,636 ****
  1269. X  mustGetMHandle(int menu_id)
  1270. X  {
  1271. X      MenuHandle menu = GetMHandle(menu_id);
  1272. X!     if (menu == nil) {
  1273. X          comment("Cannot find the menu.", menu_id);
  1274. X          ExitToShell();
  1275. X      }
  1276. X--- 638,644 ----
  1277. X  mustGetMHandle(int menu_id)
  1278. X  {
  1279. X      MenuHandle menu = GetMHandle(menu_id);
  1280. X!     if (menu == (MenuHandle)  nil) {
  1281. X          comment("Cannot find the menu.", menu_id);
  1282. X          ExitToShell();
  1283. X      }
  1284. X***************
  1285. X*** 650,656 ****
  1286. X      memset ( & fcb , 0 , sizeof ( fcb ) ) ;
  1287. X  
  1288. X      fcb . ioRefNum = CurResFile ( ) ;
  1289. X!     fcb . ioNamePtr = name ;
  1290. X      if ( PBGetFCBInfoSync ( & fcb ) ) {
  1291. X          return A_LOT ;
  1292. X      }
  1293. X--- 658,664 ----
  1294. X      memset ( & fcb , 0 , sizeof ( fcb ) ) ;
  1295. X  
  1296. X      fcb . ioRefNum = CurResFile ( ) ;
  1297. X!     fcb . ioNamePtr = (uchar *) name ;
  1298. X      if ( PBGetFCBInfoSync ( & fcb ) ) {
  1299. X          return A_LOT ;
  1300. X      }
  1301. X***************
  1302. X*** 663,755 ****
  1303. X  void
  1304. X  InitRes ( void )
  1305. X  {
  1306. X- #if 1    /* see macmenu.c:InitMenuRes */
  1307. X- # if 0
  1308. X- extern void InitMenuRes(void);
  1309. X- int resIDIndex ;
  1310. X- int resTypeIndex ;
  1311. X- ResType resType , infoType ;
  1312. X- Str255 name ;
  1313. X- short id ;
  1314. X- long spaceFree , totalContig ;
  1315. X- Handle theResource ;
  1316. X- static Boolean stuffLoaded = 0 ;
  1317. X- # endif
  1318. X- 
  1319. X      InitMenuRes();
  1320. X- 
  1321. X- # if 0
  1322. X- /*
  1323. X-  * For better performance (and powerbooks) we may want to load in the
  1324. X-  * entire game to avoid spinning the disk up.
  1325. X-  * This doesn't seem to be efficient, though. Better to just use whatever
  1326. X-  * memory is assigned for default resource caching.
  1327. X-  */
  1328. X-     if ( ! stuffLoaded ) {
  1329. X-         PurgeSpace ( & spaceFree , & totalContig ) ;
  1330. X-         if ( spaceFree > SpaceToLoad ( name ) ) {
  1331. X-             dprintf ( "Space now: %ld" , spaceFree ) ;
  1332. X-             SetResLoad ( 0 ) ;
  1333. X-             for ( resTypeIndex = Count1Types ( ) ; resTypeIndex > 0 ; resTypeIndex -- ) {
  1334. X-                 Get1IndType ( & resType , resTypeIndex ) ;
  1335. X-                 for ( resIDIndex = Count1Resources ( resType ) ; resIDIndex > 0 ; resIDIndex -- ) {
  1336. X-                     theResource = Get1IndResource ( resType , resIDIndex ) ;
  1337. X-                     if ( ! * theResource ) {
  1338. X-                         GetResInfo ( theResource , & id , & infoType , name ) ;
  1339. X- #  ifdef applec
  1340. X-                         if ( infoType != 'CODE'  || ! EqualString ( name , "\P%A5Init" , 0 , 0 ) ) {
  1341. X- #  else
  1342. X-                         if ( infotype != 'ZREF' && infoType != 'DATA' ) {
  1343. X- #  endif
  1344. X-                             LoadResource ( theResource ) ;
  1345. X-                             HUnlock ( theResource ) ;
  1346. X-                             MoveHHi ( theResource ) ;
  1347. X-                             HLock ( theResource ) ;
  1348. X-                         }
  1349. X-                     }
  1350. X-                 }
  1351. X-             }
  1352. X-             SetResLoad ( 1 ) ;
  1353. X-             stuffLoaded = 1 ;
  1354. X-         } else {
  1355. X-             dprintf ( "Space now: %ld" , spaceFree ) ;
  1356. X-         }
  1357. X-     }
  1358. X- # endif
  1359. X- 
  1360. X- #else
  1361. X- Str255 str ;
  1362. X- 
  1363. X-     mBar = GetNewMBar ( 128 ) ;
  1364. X-     mustwork(ResError());
  1365. X-     SetMenuBar ( mBar ) ;
  1366. X-     
  1367. X-     appleMenu = mustGetMHandle ( 128 ) ;
  1368. X-     AppendMenu ( appleMenu , ( ConstStr255Param ) "\002(-" ) ;
  1369. X-     AddResMenu ( appleMenu , 'DRVR' ) ;
  1370. X- 
  1371. X-     fileMenu = mustGetMHandle ( 129 ) ;
  1372. X-     editMenu = mustGetMHandle ( 130 ) ;
  1373. X-     actionMenu = mustGetMHandle ( 131 ) ;
  1374. X-     inventoryMenu = mustGetMHandle ( 132 ) ;
  1375. X-     thingsMenu = mustGetMHandle ( 133 ) ;
  1376. X-     extendedMenu = mustGetMHandle ( 134 ) ;
  1377. X-     infoMenu = mustGetMHandle ( 135 ) ;
  1378. X- 
  1379. X-     if ( macFlags . help ) {
  1380. X-         if ( HMGetHelpMenuHandle ( & helpMenu ) ) {
  1381. X-             helpMenu = (MenuHandle) NULL ;
  1382. X-         }
  1383. X-     }
  1384. X-     if ( helpMenu ) {
  1385. X-         GetIndString ( str , 128 , 1 ) ;
  1386. X-         AppendMenu ( helpMenu , str ) ;
  1387. X-     } else AppendMenu ( appleMenu , str ) ;
  1388. X-     
  1389. X-     DrawMenuBar ( ) ;
  1390. X- 
  1391. X-     return ;
  1392. X- #endif    /* see macmenu.c:InitMenuRes */
  1393. X  }
  1394. X  
  1395. X  
  1396. X--- 671,677 ----
  1397. X***************
  1398. X*** 1101,1107 ****
  1399. X                  oindex++;
  1400. X              }
  1401. X              if(com_index >= 0)
  1402. X!                 topl_replace(extcmdlist[com_index].ef_txt);
  1403. X              return true;
  1404. X          }
  1405. X      }
  1406. X--- 1023,1029 ----
  1407. X                  oindex++;
  1408. X              }
  1409. X              if(com_index >= 0)
  1410. X!                 topl_replace((char *) extcmdlist[com_index].ef_txt);
  1411. X              return true;
  1412. X          }
  1413. X      }
  1414. X***************
  1415. X*** 1144,1150 ****
  1416. X  
  1417. X      if (!resp) {
  1418. X          const char any_str[2] = { CHAR_ANY, '\0' };
  1419. X!         resp = any_str;
  1420. X          def = CHAR_ANY;
  1421. X      }
  1422. X  
  1423. X--- 1066,1072 ----
  1424. X  
  1425. X      if (!resp) {
  1426. X          const char any_str[2] = { CHAR_ANY, '\0' };
  1427. X!         resp = (char *) any_str;
  1428. X          def = CHAR_ANY;
  1429. X      }
  1430. X  
  1431. X***************
  1432. X*** 1226,1233 ****
  1433. X  void
  1434. X  adjust_window_pos(NhWindow *aWin, WindowPtr theWindow, short w)
  1435. X  {
  1436. X!     const Rect scr_r   = (*GetGrayRgn())->rgnBBox,
  1437. X!                win_ind = { 20, 2, 3, 3 };
  1438. X      const short    min_w = theWindow->portRect.right - theWindow->portRect.left,
  1439. X                  max_w = scr_r.right - scr_r.left - win_ind.left - win_ind.right;
  1440. X      Point pos;
  1441. X--- 1148,1158 ----
  1442. X  void
  1443. X  adjust_window_pos(NhWindow *aWin, WindowPtr theWindow, short w)
  1444. X  {
  1445. X! #ifdef THINK_C
  1446. X!     Rect scr_r   = (*GetGrayRgn())->rgnBBox, win_ind = { 20, 2, 3, 3 };
  1447. X! #else
  1448. X!     const Rect scr_r   = (*GetGrayRgn())->rgnBBox, win_ind = { 20, 2, 3, 3 };
  1449. X! #endif
  1450. X      const short    min_w = theWindow->portRect.right - theWindow->portRect.left,
  1451. X                  max_w = scr_r.right - scr_r.left - win_ind.left - win_ind.right;
  1452. X      Point pos;
  1453. X***************
  1454. X*** 1878,1884 ****
  1455. X              default:
  1456. X                  tmp[0] = 1;
  1457. X                  tmp[1] = topl_resp[l];
  1458. X!                 name = &tmp;
  1459. X                  break;
  1460. X          }
  1461. X          TextFont(geneva);
  1462. X--- 1803,1809 ----
  1463. X              default:
  1464. X                  tmp[0] = 1;
  1465. X                  tmp[1] = topl_resp[l];
  1466. X!                 name = tmp;
  1467. X                  break;
  1468. X          }
  1469. X          TextFont(geneva);
  1470. X***************
  1471. X*** 1948,1954 ****
  1472. X  #if 1
  1473. X      r.bottom = r.top + aWin->save_lin * aWin->charHeight;
  1474. X      r.top     = r.bottom - 1;
  1475. X!     FillRect(&r, &qd.gray);
  1476. X  #endif
  1477. X  
  1478. X      SetClip(org_clip);
  1479. X--- 1873,1879 ----
  1480. X  #if 1
  1481. X      r.bottom = r.top + aWin->save_lin * aWin->charHeight;
  1482. X      r.top     = r.bottom - 1;
  1483. X!     FillRect(&r, (void *) &qd.gray);
  1484. X  #endif
  1485. X  
  1486. X      SetClip(org_clip);
  1487. X***************
  1488. X*** 2110,2116 ****
  1489. X      if ( cursor_locked )
  1490. X          dir = NULL ;
  1491. X      else {
  1492. X!         dir_bas = flags . num_pad ? ndir : sdir ;
  1493. X          dir = strchr ( dir_bas , click_to_cmd ( where . h / nhw -> charWidth + 1 ,
  1494. X                                                  where . v / nhw -> charHeight ,
  1495. X                                                  CLICK_1 ) ) ;
  1496. X--- 2035,2041 ----
  1497. X      if ( cursor_locked )
  1498. X          dir = NULL ;
  1499. X      else {
  1500. X!         dir_bas = flags . num_pad ? (char *) ndir : (char *) sdir ;
  1501. X          dir = strchr ( dir_bas , click_to_cmd ( where . h / nhw -> charWidth + 1 ,
  1502. X                                                  where . v / nhw -> charHeight ,
  1503. X                                                  CLICK_1 ) ) ;
  1504. X***************
  1505. X*** 2164,2193 ****
  1506. X  void
  1507. X  UpdateMenus ( void )
  1508. X  {
  1509. X- #if 1    /* see macmenu.c:AdjustMenus */
  1510. X      extern void AdjustMenus(short);
  1511. X  
  1512. X      AdjustMenus(0);
  1513. X- #else
  1514. X-     WindowPeek w = ( WindowPeek ) FrontWindow ( ) ;
  1515. X-     Boolean enable = FALSE ;
  1516. X-     int i ;
  1517. X- 
  1518. X-     /* All menu items are OK, except the "edit" menu */
  1519. X- 
  1520. X-     if ( w && w -> windowKind < 0 ) {
  1521. X-         enable = TRUE ;
  1522. X-     }
  1523. X-     for ( i = 1 ; i < 7 ; i ++ ) {
  1524. X-         if ( i == 2 )
  1525. X-             continue ;
  1526. X-         if ( enable ) {
  1527. X-             EnableItem ( editMenu , i ) ;
  1528. X-         } else {
  1529. X-             DisableItem ( editMenu , i ) ;
  1530. X-         }
  1531. X-     }
  1532. X- #endif    /* see macmenu.c:AdjustMenus */
  1533. X  }
  1534. X  
  1535. X  
  1536. X--- 2089,2097 ----
  1537. X***************
  1538. X*** 2194,2235 ****
  1539. X  void
  1540. X  DoMenu ( long choise )
  1541. X  {
  1542. X- #if 1    /* see macmenu.c:DoMenuEvt */
  1543. X      extern void DoMenuEvt(long);
  1544. X  
  1545. X      DoMenuEvt(choise);
  1546. X- #else
  1547. X-     WindowPeek w = ( WindowPeek ) FrontWindow ( ) ;
  1548. X-     short menu = choise >> 16 ;
  1549. X-     short item = choise & 0xffff ;
  1550. X-     int i ;
  1551. X-     Str255 str ;
  1552. X- 
  1553. X-     HiliteMenu ( menu ) ;
  1554. X- 
  1555. X-     if ( menu == kHMHelpMenuID ) {
  1556. X-         menu = 128 ;
  1557. X-         item = 2 ;
  1558. X-     }
  1559. X- 
  1560. X-     if ( menu == 128 && item > 2 ) /* apple, DA */ {
  1561. X-         GetItem ( appleMenu , item , str ) ;
  1562. X-         OpenDeskAcc ( str ) ;
  1563. X-     } else if ( menu == 130 ) /* edit */ {
  1564. X-         SystemEdit ( item - 1 ) ;
  1565. X-     } else {
  1566. X-         GetIndString ( str , menu + 1 , item ) ;
  1567. X-         if ( str [ 0 ] > QUEUE_LEN ) {
  1568. X-             error ( "Too long command : menul %d item %d" , menu , item ) ;
  1569. X-             str [ 0 ] = QUEUE_LEN ;
  1570. X-         }
  1571. X-         for ( i = 1 ; i <= str [ 0 ] ; i ++ ) {
  1572. X-             AddToKeyQueue ( str [ i ] , 0 ) ;
  1573. X-         }
  1574. X-     }
  1575. X- 
  1576. X-     HiliteMenu ( 0 ) ;
  1577. X- #endif    /* see macmenu.c:DoMenuEvt */
  1578. X  }
  1579. X  
  1580. X  
  1581. X--- 2098,2106 ----
  1582. X***************
  1583. X*** 2383,2388 ****
  1584. X--- 2254,2261 ----
  1585. X      } else {
  1586. X  
  1587. X          /* Suspend/resume */
  1588. X+         if ( ( ( theEvent -> message & osEvtMessageMask) >> 24 ) == suspendResumeMessage )
  1589. X+             kApplicInFront = ( theEvent -> message & resumeFlag );
  1590. X      }
  1591. X  }
  1592. X  
  1593. X***************
  1594. X*** 2449,2471 ****
  1595. X  void
  1596. X  DimMenuBar ( void )
  1597. X  {
  1598. X- #if 1    /* see macmenu.c:AdjustMenus */
  1599. X      extern void AdjustMenus(short);
  1600. X  
  1601. X      AdjustMenus(1);
  1602. X- #else
  1603. X-     if ( appleMenu ) {
  1604. X-         DisableItem ( appleMenu , 0 ) ;
  1605. X-         DisableItem ( fileMenu , 0 ) ;
  1606. X-         DisableItem ( editMenu , 0 ) ;
  1607. X-         DisableItem ( actionMenu , 0 ) ;
  1608. X-         DisableItem ( inventoryMenu , 0 ) ;
  1609. X-         DisableItem ( thingsMenu , 0 ) ;
  1610. X-         DisableItem ( extendedMenu , 0 ) ;
  1611. X-         DisableItem ( infoMenu , 0 ) ;
  1612. X-         DrawMenuBar ( ) ;
  1613. X-     }
  1614. X- #endif    /* see macmenu.c:AdjustMenus */
  1615. X  }
  1616. X  
  1617. X  
  1618. X--- 2322,2330 ----
  1619. X***************
  1620. X*** 2472,2494 ****
  1621. X  void
  1622. X  UndimMenuBar ( void )
  1623. X  {
  1624. X- #if 1    /* see macmenu.c:AdjustMenus */
  1625. X      extern void AdjustMenus(short);
  1626. X  
  1627. X      AdjustMenus(0);
  1628. X- #else
  1629. X-     if ( appleMenu ) {
  1630. X-         EnableItem ( appleMenu , 0 ) ;
  1631. X-         EnableItem ( fileMenu , 0 ) ;
  1632. X-         EnableItem ( editMenu , 0 ) ;
  1633. X-         EnableItem ( actionMenu , 0 ) ;
  1634. X-         EnableItem ( inventoryMenu , 0 ) ;
  1635. X-         EnableItem ( thingsMenu , 0 ) ;
  1636. X-         EnableItem ( extendedMenu , 0 ) ;
  1637. X-         EnableItem ( infoMenu , 0 ) ;
  1638. X-         DrawMenuBar ( ) ;
  1639. X-     }
  1640. X- #endif    /* see macmenu.c:AdjustMenus */
  1641. X  }
  1642. X  
  1643. X  static int mBarDimmed = 0 ;
  1644. X--- 2331,2339 ----
  1645. X***************
  1646. X*** 2518,2526 ****
  1647. X          SetPort ( asyDSC -> theWindow ) ;
  1648. X          DrawScrollbar ( asyDSC , asyDSC -> theWindow ) ;
  1649. X      }
  1650. X!     if ( ! WaitNextEvent ( -1 , & anEvent , doDawdle , gMouseRgn ) ) {
  1651. X!         anEvent . what = nullEvent ;
  1652. X      }
  1653. X      doDawdle = 0L ;
  1654. X  #if 0
  1655. X      /* I don't want to make the tty cursor blinking. */
  1656. X--- 2363,2372 ----
  1657. X          SetPort ( asyDSC -> theWindow ) ;
  1658. X          DrawScrollbar ( asyDSC , asyDSC -> theWindow ) ;
  1659. X      }
  1660. X!     if ( kApplicInFront ) {
  1661. X!         AdjustMenus ( 0 ) ;
  1662. X      }
  1663. X+     (void) WaitNextEvent ( -1 , & anEvent , doDawdle , gMouseRgn ) ;
  1664. X      doDawdle = 0L ;
  1665. X  #if 0
  1666. X      /* I don't want to make the tty cursor blinking. */
  1667. X***************
  1668. X*** 2553,2559 ****
  1669. X  int
  1670. X  mac_nhgetch( void ) {
  1671. X  int ch ;
  1672. X! NhWindow * nhw = flags . window_inited ? theWindows + WIN_MAP : nil ;
  1673. X  
  1674. X      if ( theWindows ) {
  1675. X      NhWindow * aWin = theWindows + WIN_MESSAGE ;
  1676. X--- 2399,2405 ----
  1677. X  int
  1678. X  mac_nhgetch( void ) {
  1679. X  int ch ;
  1680. X! NhWindow * nhw = flags . window_inited ? theWindows + WIN_MAP : (NhWindow *) nil ;
  1681. X  
  1682. X      if ( theWindows ) {
  1683. X      NhWindow * aWin = theWindows + WIN_MESSAGE ;
  1684. X***************
  1685. X*** 2615,2621 ****
  1686. X          gClickedToMove = 0 ;
  1687. X      }
  1688. X  
  1689. X! #ifdef MAC_THINKC5
  1690. X      if (ch == '\r') ch = '\n';
  1691. X  #endif
  1692. X  
  1693. X--- 2461,2467 ----
  1694. X          gClickedToMove = 0 ;
  1695. X      }
  1696. X  
  1697. X! #ifdef THINK_C
  1698. X      if (ch == '\r') ch = '\n';
  1699. X  #endif
  1700. X  
  1701. X***************
  1702. X*** 3102,3219 ****
  1703. X  void
  1704. X  mac_player_selection ( void )
  1705. X  {
  1706. X! #if 0    /* see macmain.c:mac_askname() and macmenu.c:DialogAskName() */
  1707. X!     ControlHandle    ctrl;
  1708. X!     DialogPtr        characterDialog;
  1709. X!     short            itemHit, lastItemSelected, type;
  1710. X!     Rect            box;
  1711. X! 
  1712. X!     char pc;
  1713. X!     if ((pc = highc(pl_character[0])) != 0) {
  1714. X!         char pbuf[QBUFSZ];
  1715. X!         EventRecord update_evt;
  1716. X!         if(index(pl_classes, pc) != (char*) 0) {
  1717. X!             pl_character[0] = pc;
  1718. X!             return;
  1719. X!         }
  1720. X!         putstr(WIN_MESSAGE, 0, "");
  1721. X!         Sprintf(pbuf, "Unknown role: %c", pc);
  1722. X!         putstr(WIN_MESSAGE, 0, pbuf);
  1723. X!         while (CheckUpdate(&update_evt))
  1724. X!             HandleUpdate(&update_evt);
  1725. X!     }
  1726. X! 
  1727. X!     characterDialog = GetNewDialog(132, (Ptr) NULL, (WindowPtr) -1);
  1728. X!     
  1729. X!     /*
  1730. X!     ** Default selection is random, beginning at the first item after the "Cancel" button.
  1731. X!     */
  1732. X!     
  1733. X!     lastItemSelected = rn1(12, 3);
  1734. X! 
  1735. X!     /*
  1736. X!     ** Mark the default selection.
  1737. X!     */
  1738. X!     
  1739. X!     GetDItem(characterDialog, lastItemSelected, &type, (Handle *) &ctrl, &box);
  1740. X!     SetCtlValue(ctrl, 1);
  1741. X! 
  1742. X!     InitCursor ( ) ;
  1743. X!     SetFrameItem ( characterDialog , 15 , 1 ) ;
  1744. X!     do {
  1745. X!         ModalDialog((ModalFilterProcPtr) CharacterDialogFilter , &itemHit);
  1746. X!         if ((itemHit != 1) && (itemHit != 2)) {
  1747. X!             /*
  1748. X!             ** If OK and Cancel (items 1 and 2) weren't selected then a radio button 
  1749. X!             ** was pushed.  Unmark the previous selection.
  1750. X!             */
  1751. X!             
  1752. X!             GetDItem(characterDialog, lastItemSelected, &type, (Handle *) &ctrl, &box);
  1753. X!             SetCtlValue(ctrl, 0);
  1754. X!             
  1755. X!             /*
  1756. X!             ** Mark the current selection.
  1757. X!             */
  1758. X!             
  1759. X!             GetDItem(characterDialog, itemHit, &type, (Handle *) &ctrl, &box);
  1760. X!             SetCtlValue(ctrl, 1);
  1761. X! 
  1762. X!             /*
  1763. X!             ** Save the item number for use later.
  1764. X!             */
  1765. X!             
  1766. X!             lastItemSelected = itemHit;
  1767. X!         }
  1768. X!     } while ((itemHit != 1) && (itemHit != 2));
  1769. X!     
  1770. X!     if (itemHit == 2) {
  1771. X! 
  1772. X!         clearlocks();
  1773. X!         ExitToShell();
  1774. X! 
  1775. X!     } else {
  1776. X!         switch (lastItemSelected) {
  1777. X!         case 3:
  1778. X!             pl_character [ 0 ] = 'A';
  1779. X!             break;
  1780. X!         case 4:
  1781. X!             pl_character [ 0 ] = 'B';
  1782. X!             break;
  1783. X!         case 5:
  1784. X!             pl_character [ 0 ] = 'C';
  1785. X!             break;
  1786. X!         case 6:
  1787. X!             pl_character [ 0 ] = 'E';
  1788. X!             break;
  1789. X!         case 7:
  1790. X!             pl_character [ 0 ] = 'H';
  1791. X!             break;
  1792. X!         case 8:
  1793. X!             pl_character [ 0 ] = 'K';
  1794. X!             break;
  1795. X!         case 9:
  1796. X!             pl_character [ 0 ] = 'P';
  1797. X!             break;
  1798. X!         case 10:
  1799. X!             pl_character [ 0 ] = 'R';
  1800. X!             break;
  1801. X!         case 11:
  1802. X!             pl_character [ 0 ] = 'S';
  1803. X!             break;
  1804. X!         case 12:
  1805. X!             pl_character [ 0 ] = 'T';
  1806. X!             break;
  1807. X!         case 13:
  1808. X!             pl_character [ 0 ] = 'V';
  1809. X!             break;
  1810. X!         case 14:
  1811. X!             pl_character [ 0 ] = 'W';
  1812. X!             break;
  1813. X!         }
  1814. X!     }
  1815. X!     
  1816. X!     DisposDialog(characterDialog);
  1817. X! #endif
  1818. X  }
  1819. X  
  1820. X  void
  1821. X--- 2948,2954 ----
  1822. X  void
  1823. X  mac_player_selection ( void )
  1824. X  {
  1825. X! /* see macmain.c:mac_askname() and macmenu.c:DialogAskName() */
  1826. X  }
  1827. X  
  1828. X  void
  1829. X***************
  1830. X*** 3223,3229 ****
  1831. X  
  1832. X  
  1833. X  void
  1834. X! mac_suspend_nhwindows ( const char * )
  1835. X  {
  1836. X      /*    Can't relly do that :-)        */
  1837. X  }
  1838. X--- 2958,2964 ----
  1839. X  
  1840. X  
  1841. X  void
  1842. X! mac_suspend_nhwindows ( const char * foo)
  1843. X  {
  1844. X      /*    Can't relly do that :-)        */
  1845. X  }
  1846. X***************
  1847. X*** 3305,3312 ****
  1848. X      mac_number_pad,
  1849. X      mac_delay_output,
  1850. X  #ifdef CHANGE_COLOR
  1851. X!     donull,
  1852. X!     donull,
  1853. X  #endif
  1854. X      /* other defs that really should go away (they're tty specific) */
  1855. X      0,    //    mac_start_screen,
  1856. X--- 3040,3047 ----
  1857. X      mac_number_pad,
  1858. X      mac_delay_output,
  1859. X  #ifdef CHANGE_COLOR
  1860. X!     (void *) donull,
  1861. X!     (void *) donull,
  1862. X  #endif
  1863. X      /* other defs that really should go away (they're tty specific) */
  1864. X      0,    //    mac_start_screen,
  1865. X*** /tmp/da25069    Tue Jul 13 09:35:38 1993
  1866. X--- sys/mac/mmodal.c    Tue Jul 13 09:29:48 1993
  1867. X***************
  1868. X*** 122,128 ****
  1869. X          DialogPtr dialog = FrontWindow();
  1870. X          EventRecord evt;
  1871. X  
  1872. X!         WaitNextEvent(everyEvent, &evt, GetCaretTime(), nil);
  1873. X  
  1874. X          if (evt.what == keyDown)
  1875. X              if (evt.modifiers & cmdKey) {
  1876. X--- 122,128 ----
  1877. X          DialogPtr dialog = FrontWindow();
  1878. X          EventRecord evt;
  1879. X  
  1880. X!         WaitNextEvent(everyEvent, &evt, GetCaretTime(), (RgnHandle) nil);
  1881. X  
  1882. X          if (evt.what == keyDown)
  1883. X              if (evt.modifiers & cmdKey) {
  1884. X*** /tmp/da25086    Tue Jul 13 09:35:50 1993
  1885. X--- sys/mac/mttymain.c    Tue Jul 13 09:29:52 1993
  1886. X***************
  1887. X*** 188,194 ****
  1888. X  char kill_char = 27 ;
  1889. X  char erase_char = 8 ;
  1890. X  
  1891. X! WindowPtr _mt_window = NULL ;
  1892. X  static Boolean _mt_in_color = 0 ;
  1893. X  
  1894. X  
  1895. X--- 188,194 ----
  1896. X  char kill_char = 27 ;
  1897. X  char erase_char = 8 ;
  1898. X  
  1899. X! WindowPtr _mt_window = (WindowPtr) NULL ;
  1900. X  static Boolean _mt_in_color = 0 ;
  1901. X  
  1902. X  
  1903. X***************
  1904. X*** 201,207 ****
  1905. X  short hor , vert ;
  1906. X  
  1907. X  #if 1
  1908. X!     if ( windowprocs == mac_procs ) {
  1909. X          dprintf ( "Mac Windows" ) ;
  1910. X          MT_HEIGHT -= 1 ;
  1911. X      } else {
  1912. X--- 201,207 ----
  1913. X  short hor , vert ;
  1914. X  
  1915. X  #if 1
  1916. X!     if ( !strcmp(windowprocs.name, mac_procs.name) ) {
  1917. X          dprintf ( "Mac Windows" ) ;
  1918. X          MT_HEIGHT -= 1 ;
  1919. X      } else {
  1920. X***************
  1921. X*** 264,270 ****
  1922. X      SizeWindow ( _mt_window , win_width + 6 , win_height + 6 , 1 ) ;
  1923. X      dprintf ( "Checking for TTY window position" ) ;
  1924. X      if ( RetrievePosition ( kMapWindow , & vert , & hor ) ) {
  1925. X!         dprintf ( "\PMoving window to (%d,%d)" , hor , vert ) ;
  1926. X          MoveWindow ( _mt_window , hor , vert , 1 ) ;
  1927. X      }
  1928. X      ShowWindow ( _mt_window ) ;
  1929. X--- 264,270 ----
  1930. X      SizeWindow ( _mt_window , win_width + 6 , win_height + 6 , 1 ) ;
  1931. X      dprintf ( "Checking for TTY window position" ) ;
  1932. X      if ( RetrievePosition ( kMapWindow , & vert , & hor ) ) {
  1933. X!         dprintf ( "Moving window to (%d,%d)" , hor , vert ) ;
  1934. X          MoveWindow ( _mt_window , hor , vert , 1 ) ;
  1935. X      }
  1936. X      ShowWindow ( _mt_window ) ;
  1937. X***************
  1938. X*** 271,287 ****
  1939. X      SetPort ( _mt_window ) ;
  1940. X  
  1941. X      mustwork ( get_tty_attrib ( _mt_window , TTY_ATTRIB_FLAGS , & flag ) ) ;
  1942. X! /* Start in raw, always flushing mode */
  1943. X!     flag |= TA_ALWAYS_REFRESH ;
  1944. X      mustwork ( set_tty_attrib ( _mt_window , TTY_ATTRIB_FLAGS , flag ) ) ;
  1945. X  
  1946. X      mustwork ( get_tty_attrib ( _mt_window , TTY_ATTRIB_CURSOR , & flag ) ) ;
  1947. X!     flag |= TA_BLINKING_CURSOR | TA_WRAP_AROUND ;
  1948. X  #ifdef applec
  1949. X      flag &= ~ TA_CR_ADD_NL ;
  1950. X  #else
  1951. X!     flag |= ~ TA_NL_ADD_CR ;
  1952. X  #endif
  1953. X      mustwork ( set_tty_attrib ( _mt_window , TTY_ATTRIB_CURSOR , flag ) ) ;
  1954. X  
  1955. X      InitRes ( ) ;
  1956. X--- 271,292 ----
  1957. X      SetPort ( _mt_window ) ;
  1958. X  
  1959. X      mustwork ( get_tty_attrib ( _mt_window , TTY_ATTRIB_FLAGS , & flag ) ) ;
  1960. X!     
  1961. X!     /* Start in raw, always flushing mode */
  1962. X! 
  1963. X!     flag |= TA_ALWAYS_REFRESH | TA_WRAP_AROUND;
  1964. X      mustwork ( set_tty_attrib ( _mt_window , TTY_ATTRIB_FLAGS , flag ) ) ;
  1965. X  
  1966. X      mustwork ( get_tty_attrib ( _mt_window , TTY_ATTRIB_CURSOR , & flag ) ) ;
  1967. X!     
  1968. X!     flag |= TA_BLINKING_CURSOR;
  1969. X! 
  1970. X  #ifdef applec
  1971. X      flag &= ~ TA_CR_ADD_NL ;
  1972. X  #else
  1973. X!     flag &= ~ TA_NL_ADD_CR ;
  1974. X  #endif
  1975. X+ 
  1976. X      mustwork ( set_tty_attrib ( _mt_window , TTY_ATTRIB_CURSOR , flag ) ) ;
  1977. X  
  1978. X      InitRes ( ) ;
  1979. X***************
  1980. X*** 332,337 ****
  1981. X--- 337,343 ----
  1982. X  EventRecord event ;
  1983. X  long sleepTime = 0 ;
  1984. X  int ret ;
  1985. X+ int key ;
  1986. X  
  1987. X      while ( 1 ) {
  1988. X          update_tty ( _mt_window ) ;
  1989. X***************
  1990. X*** 346,352 ****
  1991. X          }
  1992. X          if ( event . what == keyDown || event . what == autoKey ) {
  1993. X              if ( ! ( event . modifiers & cmdKey ) ) {
  1994. X!                 return ( event . message & 0xff ) ;
  1995. X              } else {
  1996. X                  DoMenu ( MenuKey ( event . message & 0xff ) ) ;
  1997. X              }
  1998. X--- 352,360 ----
  1999. X          }
  2000. X          if ( event . what == keyDown || event . what == autoKey ) {
  2001. X              if ( ! ( event . modifiers & cmdKey ) ) {
  2002. X!                 key = event . message & 0xff;
  2003. X!                 if(key == '\r') key = '\n';
  2004. X!                 return ( key ) ;
  2005. X              } else {
  2006. X                  DoMenu ( MenuKey ( event . message & 0xff ) ) ;
  2007. X              }
  2008. X***************
  2009. X*** 495,501 ****
  2010. X  
  2011. X  
  2012. X  void
  2013. X! xputs ( char * str ) {
  2014. X  short err ;
  2015. X  
  2016. X      err = add_tty_string ( _mt_window , str ) ;
  2017. X--- 503,509 ----
  2018. X  
  2019. X  
  2020. X  void
  2021. X! xputs ( const char * str ) {
  2022. X  short err ;
  2023. X  
  2024. X      err = add_tty_string ( _mt_window , str ) ;
  2025. X***************
  2026. X*** 562,568 ****
  2027. X  void
  2028. X  msmsg ( const char * str , ... ) {
  2029. X  va_list args ;
  2030. X! char * buf = alloc ( 1000 ) ;
  2031. X  
  2032. X      va_start ( args , str ) ;
  2033. X      vsprintf ( buf , str , args ) ;
  2034. X--- 570,576 ----
  2035. X  void
  2036. X  msmsg ( const char * str , ... ) {
  2037. X  va_list args ;
  2038. X! char * buf = (char *) alloc ( 1000 ) ;
  2039. X  
  2040. X      va_start ( args , str ) ;
  2041. X      vsprintf ( buf , str , args ) ;
  2042. X***************
  2043. X*** 604,614 ****
  2044. X      mustwork ( set_tty_attrib ( _mt_window , TTY_ATTRIB_FLAGS , flag ) ) ;
  2045. X  
  2046. X      mustwork ( get_tty_attrib ( _mt_window , TTY_ATTRIB_CURSOR , & flag ) ) ;
  2047. X  #ifdef applec
  2048. X      flag &= ~ TA_CR_ADD_NL ;
  2049. X  #else
  2050. X!     flag |= ~ TA_NL_ADD_CR ;
  2051. X  #endif
  2052. X      mustwork ( set_tty_attrib ( _mt_window , TTY_ATTRIB_CURSOR , flag ) ) ;
  2053. X  
  2054. X      flags . cbreak = 1 ;
  2055. X--- 612,624 ----
  2056. X      mustwork ( set_tty_attrib ( _mt_window , TTY_ATTRIB_FLAGS , flag ) ) ;
  2057. X  
  2058. X      mustwork ( get_tty_attrib ( _mt_window , TTY_ATTRIB_CURSOR , & flag ) ) ;
  2059. X+ 
  2060. X  #ifdef applec
  2061. X      flag &= ~ TA_CR_ADD_NL ;
  2062. X  #else
  2063. X!     flag &= ~ TA_NL_ADD_CR ;
  2064. X  #endif
  2065. X+ 
  2066. X      mustwork ( set_tty_attrib ( _mt_window , TTY_ATTRIB_CURSOR , flag ) ) ;
  2067. X  
  2068. X      flags . cbreak = 1 ;
  2069. X***************
  2070. X*** 641,651 ****
  2071. X--- 651,663 ----
  2072. X      mustwork ( set_tty_attrib ( _mt_window , TTY_ATTRIB_FLAGS , flag ) ) ;
  2073. X  
  2074. X      mustwork ( get_tty_attrib ( _mt_window , TTY_ATTRIB_CURSOR , & flag ) ) ;
  2075. X+ 
  2076. X  #ifdef applec
  2077. X      flag |= TA_CR_ADD_NL ;
  2078. X  #else
  2079. X      flag |= TA_NL_ADD_CR ;
  2080. X  #endif
  2081. X+ 
  2082. X      mustwork ( set_tty_attrib ( _mt_window , TTY_ATTRIB_CURSOR , flag ) ) ;
  2083. X  
  2084. X      tty_raw_print ( "\n" ) ;
  2085. END_OF_FILE
  2086. if test 46114 -ne `wc -c <'patches03h'`; then
  2087.     echo shar: \"'patches03h'\" unpacked with wrong size!
  2088. fi
  2089. # end of 'patches03h'
  2090. if test -f 'sys/mac/NetHack.r' -a "${1}" != "-c" ; then 
  2091.   echo shar: Renaming existing file \"'sys/mac/NetHack.r'\" to \"'sys/mac/NetHack.r.orig'\"
  2092.   mv -f 'sys/mac/NetHack.r' 'sys/mac/NetHack.r.orig'
  2093. fi
  2094. echo shar: Extracting \"'sys/mac/NetHack.r'\" \(2834 characters\)
  2095. sed "s/^X//" >'sys/mac/NetHack.r' <<'END_OF_FILE'
  2096. X#ifndef THINK_Rez
  2097. XINCLUDE "NetHack.rsrc";            /* MENU, ALRT, WIND, ICN#, etc */
  2098. XINCLUDE "Sounds.rsrc";            /* Instruments as snd resources */
  2099. X#endif
  2100. X
  2101. X#include "Types.r"
  2102. X#include "SysTypes.r"
  2103. X#include "BalloonTypes.r"        /* Mac resource type definitions */
  2104. X
  2105. X#ifdef THINK_Rez
  2106. Xread 'TEXT' (1000,"Help")      "help";
  2107. Xread 'TEXT' (1001,"WizHelp") "wizhelp";
  2108. Xread 'TEXT' (1002,"OptHelp") "opthelp";
  2109. Xread 'TEXT' (1004,"MacHelp") "MacHelp";
  2110. Xread 'TEXT' (1005,"HH")      "hh";
  2111. Xread 'TEXT' (1006,"History") "history";
  2112. Xread 'TEXT' (1007,"License") "license";
  2113. Xread 'TEXT' (1008,"News")     "News";
  2114. Xread 'TEXT' (1009,"Options") "options";
  2115. X#else    /* MPW rez */
  2116. Xread 'TEXT' (1000,"Help")      $$Shell("Dat") "Help";
  2117. Xread 'TEXT' (1001,"WizHelp") $$Shell("Dat") "WizHelp";
  2118. Xread 'TEXT' (1002,"OptHelp") $$Shell("Dat") "OptHelp";
  2119. X/*
  2120. Xread 'TEXT' (1003,"CmdHelp") $$Shell("Dat") "CmdHelp";
  2121. X*/
  2122. Xread 'TEXT' (1004,"MacHelp") $$Shell("MacDir") "MacHelp";
  2123. X
  2124. Xread 'TEXT' (1005,"HH")      $$Shell("Dat") "HH";
  2125. Xread 'TEXT' (1006,"History") $$Shell("Dat") "History";
  2126. Xread 'TEXT' (1007,"License") $$Shell("Dat") "License";
  2127. X
  2128. Xread 'TEXT' (1008,"News")     $$Shell("MacDir") "News";
  2129. Xread 'TEXT' (1009,"Options") $$Shell("ObjDir") "Options";
  2130. X
  2131. X/*
  2132. Xread 'TEXT' (1010,"Rumors")  $$Shell("ObjDir") "Rumors";
  2133. Xread 'TEXT' (1011,"Data")    $$Shell("ObjDir") "Data";
  2134. X*/
  2135. X
  2136. X/* Think C generates a SIZE resource into NetHack.rsrc, MPW needs this */
  2137. Xresource 'SIZE' (-1) {
  2138. X    reserved,
  2139. X    acceptSuspendResumeEvents,
  2140. X    reserved,
  2141. X    canBackground,
  2142. X    doesActivateOnFGSwitch,
  2143. X    backgroundAndForeground,
  2144. X    dontGetFrontClicks,
  2145. X    ignoreAppDiedEvents,
  2146. X    is32BitCompatible,
  2147. X    notHighLevelEventAware,
  2148. X    onlyLocalHLEvents,
  2149. X    notStationeryAware,
  2150. X    dontUseTextEditServices,
  2151. X    reserved,
  2152. X    reserved,
  2153. X    reserved,
  2154. X    1500 * 1024,        /* recommended */
  2155. X    1000 * 1024        /* absolute minimum, to be determined */
  2156. X};
  2157. X#endif
  2158. X
  2159. X/* System 7 help balloon information */
  2160. Xresource 'hfdr' (-5696, purgeable) { 
  2161. X     HelpMgrVersion, hmDefaultOptions, 0, 0, /* header information */ 
  2162. X        { HMSTRResItem { /* use 'STR ' resource 2000 */ 2000 } 
  2163. X    } 
  2164. X};
  2165. X
  2166. Xresource 'STR ' (2000, purgeable) { /* Help message for app icon */
  2167. X   "NetHack 3.1\nThis is the famous Dungeons and Dragons*-like game ported to the Macintosh." 
  2168. X};
  2169. X
  2170. Xresource 'STR '(-16396, purgeable) {    /* Will be copied to the saved file. */
  2171. X    "NetHack"                            /* See Inside Mac VI, page 9-21.     */
  2172. X};
  2173. X
  2174. X
  2175. X/* Mac error decodes : 2000 - err# for common errors. Add your favorites below */
  2176. X
  2177. Xresource 'STR ' (2034) { "the disk is full"  };
  2178. Xresource 'STR ' (2036) { "there was an I/O error"  };
  2179. Xresource 'STR ' (2043) { "a file is missing"  };
  2180. Xresource 'STR ' (2044) { "the disk is write-protected"  };
  2181. Xresource 'STR ' (2047) { "the file is busy"  };
  2182. Xresource 'STR ' (2049) { "the file is already open"  };
  2183. Xresource 'STR ' (2108) { "there is not enough memory"  };
  2184. Xresource 'STR ' (2192) { "a resource is missing"  };
  2185. END_OF_FILE
  2186. if test 2834 -ne `wc -c <'sys/mac/NetHack.r'`; then
  2187.     echo shar: \"'sys/mac/NetHack.r'\" unpacked with wrong size!
  2188. fi
  2189. # end of 'sys/mac/NetHack.r'
  2190. echo shar: End of archive 6 \(of 18\).
  2191. cp /dev/null ark6isdone
  2192. MISSING=""
  2193. for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 ; do
  2194.     if test ! -f ark${I}isdone ; then
  2195.     MISSING="${MISSING} ${I}"
  2196.     fi
  2197. done
  2198. if test "${MISSING}" = "" ; then
  2199.     echo You have unpacked all 18 archives.
  2200.     echo "Now execute ./patchit3.sh"
  2201.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  2202. else
  2203.     echo You still need to unpack the following archives:
  2204.     echo "        " ${MISSING}
  2205. fi
  2206. ##  End of shell archive.
  2207. exit 0
  2208.