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

  1. Path: uunet!cs.utexas.edu!yale!mintaka!mit-eddie!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: v09i028:  NetHack3 -  display oriented dungeons & dragons (Ver. 3.0), Patch7bb
  5. Message-ID: <5242@tekred.CNA.TEK.COM>
  6. Date: 24 Feb 90 01:10:12 GMT
  7. Sender: news@tekred.CNA.TEK.COM
  8. Lines: 2289
  9. Approved: billr@saab.CNA.TEK.COM
  10.  
  11. Submitted-by: Izchak Miller <izchak@linc.cis.upenn.edu>
  12. Posting-number: Volume 9, Issue 28
  13. Archive-name: NetHack3/Patch7bb
  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 28 (of 30)."
  25. # Contents:  amiga/Makefile.ami others/msdos.c others/ovlmgr.uu
  26. # Wrapped by billr@saab on Wed Feb 21 10:04:52 1990
  27. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  28. if test -f 'amiga/Makefile.ami' -a "${1}" != "-c" ; then 
  29.   echo shar: Renaming existing file \"'amiga/Makefile.ami'\" to \"'amiga/Makefile.ami.orig'\"
  30.   mv -f 'amiga/Makefile.ami' 'amiga/Makefile.ami.orig'
  31. fi
  32. echo shar: Extracting \"'amiga/Makefile.ami'\" \(21125 characters\)
  33. sed "s/^X//" >'amiga/Makefile.ami' <<'END_OF_FILE'
  34. X#    Hack Makefile.
  35. X#    SCCS Id: @(#)Makefile.ami    3.0    90/02/13
  36. X
  37. X# This makefile is arranged for compiling for the Amiga with Lattice C but
  38. X# can be configured for compiling with Manx C 3.6 with simple changes.
  39. X# The appropriate changes are identified by #[LATTICE] and #[MANX3.6] in
  40. X# this makefile as should be set according to the compiler being used.
  41. X
  42. X# The following assignments should be made before using this makefile:
  43. X#
  44. X#   HackExe:    directory where final executable should go
  45. X#   NetHack:    directory where other runtime support files should go
  46. X#   Amiga:    "amiga" directory
  47. X#   Auxil:    "auxil" directory
  48. X#   Incl:    "include" directory
  49. X#   Others:    "others" directory
  50. X#   Src1:    "src" directory (a* through l*)
  51. X#   Src2:    "src" directory (m* through po*)
  52. X#   Src3:    "src" directory (pr* through z*)
  53. X#   O_Amiga:    destination for object files from Amiga:
  54. X#   O_Others:    destination for object files from Others:
  55. X#   O_Src1:    destination for object files from Src1:
  56. X#   O_Src2:    destination for object files from Src2:
  57. X#   O_Src3:    destination for object files from Src3:
  58. X#
  59. X# Startup makefile with:
  60. X#
  61. X#[LATTICE]
  62. X#    cd NetHack:
  63. X#    lmk -f Amiga:Makefile.ami
  64. X#
  65. X#[MANX3.6]
  66. X#    cd NetHack:
  67. X#    make -f Amiga:Makefile.ami
  68. X#
  69. X# May use following targets on lmk/make command line:
  70. X#   all        do it all (default)
  71. X#   link    just create $(GAME) from object files
  72. X#   obj1    just create O_Src1 object files
  73. X#   obj2    just create O_Src2 object files
  74. X#   obj3    just create O_Src3 object files
  75. X#   obja    just create O_Amiga object files
  76. X#   objo    just create O_Others object files
  77. X#   clean    deletes the object files
  78. X#   spotless    deletes the object files, $(GAME), and more
  79. X#
  80. X# Note:  We do NOT build the Guidebook here since it needs tbl
  81. X# (See the file Auxil:Makefile.auxil for more information)
  82. X
  83. X
  84. X# Precompiled header file:
  85. X#   $(HDEP) should appear in any dependency list for an object file where
  86. X#   we would want to make use of the precompiled version of Incl:hack.h,
  87. X#   while $(CSYM) should appear in the C compiler command line that creates
  88. X#   any such object file.  (Changes made here should agree with the $(HDEP):
  89. X#   target that appears later in this makefile.)
  90. X#
  91. X#   Notice that since this file would be created on Ram: that we would
  92. X#   end up recompiling everything if we followed the normal make sequence.
  93. X#   Thus, we could use:
  94. X#
  95. X#[LATTICE]
  96. X#    cd NetHack:
  97. X#    lmk -f Amiga:Makefile.ami Ram:hack.sym
  98. X#    setdate Ram:hack.sym {date & time of Incl:hack.h}
  99. X#    lmk -f Amiga:Makefile.ami
  100. X#
  101. X#[MANX3.6]
  102. X#    cd NetHack:
  103. X#    make -f Amiga:Makefile.ami Ram:hack.sym
  104. X#    setdate Ram:hack.sym {date & time of Incl:hack.h}
  105. X#    make -f Amiga:Makefile.ami
  106. X
  107. X#[LATTICE]
  108. X#   If we were to use the precompiled header file feature, we would uncomment
  109. X#   these following two lines.  However, there are still problems in the
  110. X#   behavior of this feature in version 5.04, so these lines are commented
  111. X#   out for now.
  112. X
  113. X#HDEP    = Ram:hack.sym
  114. X#CSYM    = -HRam:hack.sym
  115. X
  116. X#[LATTICE]
  117. X#   If we were to use the precompiled header file feature in a newer version
  118. X#   of Lattice, we would comment out these following two lines.
  119. X
  120. XHDEP    = Incl:hack.h
  121. XCSYM    =
  122. X
  123. X#[MANX3.6]
  124. X#   If we were compiling with Aztec 3.6 and wanted to use the symbol table
  125. X#   pre-loading feature, we would uncomment these following two lines.
  126. X
  127. X#HDEP    = Ram:hack.sym
  128. X#CSYM    = +IRam:hack.sym
  129. X
  130. X
  131. X# Pathname for (optional) uudecode program:
  132. X#   If uudecode is available for use by this makefile, give its name below.
  133. X#   Use a harmless command (like echo) otherwise.
  134. X
  135. XUUDEC    = echo
  136. X#UUDEC    = uudecode
  137. X
  138. X
  139. X# Pathname for the C compiler being used.
  140. X
  141. X#[LATTICE]
  142. X
  143. XCC    = lc
  144. X
  145. X#[MANX3.6]
  146. X
  147. X#CC    = cc
  148. X
  149. X
  150. X# Compilation flags for selected C Compiler:
  151. X#   $(CFLAGS) should appear before filename arguments of $(CC) command line.
  152. X
  153. X#[LATTICE]
  154. X#   Note: do not use -ms with Lattice 5.04 (Others:lev_lex.c fails)
  155. X
  156. XCFLAGS    = -b0 -cfi -d1 -iIncl: -ma
  157. X
  158. X#[MANX3.6]
  159. X
  160. X#CFLAGS    = +c +d -e300 -z8000 +q -iIncl:
  161. X
  162. X
  163. X# Components of varous link command lines:
  164. X#   $(LINK) should be the pathname of the linker being used (with any options
  165. X#   that should appear at the beginning of the command line).  The name of the
  166. X#   output file should appear immediately after $(LINK).  $(LIN) should appear
  167. X#   before the list of object files in each link command.  $(LLINK) should
  168. X#   appear as the list of object files in the link command line that creates
  169. X#   the NetHack executable.  $(LLIB) should appear at the end of each link
  170. X#   command line.
  171. X
  172. X#[LATTICE]
  173. X
  174. XLINK    = Blink to
  175. XLIN    = from Lib:catch.o
  176. XLLINK    = with Amiga:ami.lnk
  177. XLLIB    = lib Lib:lc.lib BATCH
  178. X
  179. X#[MANX3.6]
  180. X
  181. X#LINK    = ln +q +ss -o
  182. X#LIN    =
  183. X#LLINK    = -f Amiga:ami.lnk
  184. X#LLIB    = -lcl
  185. X
  186. X
  187. X# Name of the game:
  188. X
  189. XGAME    = HackExe:NetHack
  190. X
  191. X
  192. X# A more reasonable random number generator (recommended for the Amiga):
  193. X
  194. XRANDOBJ    = O_Others:random.o
  195. X
  196. X
  197. X.PRECIOUS:  Incl:config.h Incl:decl.h Incl:hack.h Incl:permonst.h Incl:you.h
  198. X
  199. X
  200. X# Almost nothing below this line should have to be changed.
  201. X# (Exceptions are marked by [LATTICE] and [MANX3.6].)
  202. X#
  203. X# Other things that have to be reconfigured are in config.h,
  204. X# (amiconf.h, pcconf.h), and possibly system.h, tradstdc.h.
  205. X
  206. X
  207. X# HSRC1 = \
  208. X#    Src1:allmain.c        Src1:alloc.c        Src1:apply.c \
  209. X#    Src1:artifact.c        Src1:attrib.c        Src1:bones.c \
  210. X#    Src1:cmd.c        Src1:dbridge.c        Src1:decl.c \
  211. X#    Src1:demon.c        Src1:do.c        Src1:do_name.c \
  212. X#    Src1:do_wear.c        Src1:dog.c        Src1:dogmove.c \
  213. X#    Src1:dokick.c        Src1:dothrow.c        Src1:eat.c \
  214. X#    Src1:end.c        Src1:engrave.c        Src1:exper.c \
  215. X#    Src1:extralev.c        Src1:fountain.c        Src1:getline.c \
  216. X#    Src1:hack.c        Src1:invent.c        Src1:lock.c
  217. X#
  218. X# HSRC2 = \
  219. X#    Src2:mail.c        Src2:makemon.c        Src2:mcastu.c \
  220. X#    Src2:mhitm.c        Src2:mhitu.c        Src2:mklev.c \
  221. X#    Src2:mkmaze.c        Src2:mkobj.c        Src2:mkroom.c \
  222. X#    Src2:mon.c        Src2:mondata.c        Src2:monmove.c \
  223. X#    Src2:monst.c        Src2:mthrowu.c        Src2:music.c \
  224. X#    Src2:o_init.c        Src2:objects.c        Src2:objnam.c \
  225. X#    Src2:options.c        Src2:pager.c        Src2:pickup.c \
  226. X#    Src2:polyself.c        Src2:potion.c
  227. X#
  228. X# HSRC3 = \
  229. X#    Src3:pray.c        Src3:pri.c        Src3:priest.c \
  230. X#    Src3:prisym.c        Src3:read.c        Src3:restore.c \
  231. X#    Src3:rip.c        Src3:rnd.c        Src3:rumors.c \
  232. X#    Src3:save.c        Src3:search.c        Src3:shk.c \
  233. X#    Src3:shknam.c        Src3:sit.c        Src3:sounds.c \
  234. X#    Src3:sp_lev.c        Src3:spell.c        Src3:steal.c \
  235. X#    Src3:timeout.c        Src3:topl.c        Src3:topten.c \
  236. X#    Src3:track.c        Src3:trap.c        Src3:u_init.c \
  237. X#    Src3:uhitm.c        Src3:vault.c        Src3:version.c \
  238. X#    Src3:weapon.c        Src3:were.c        Src3:wield.c \
  239. X#    Src3:wizard.c        Src3:worm.c        Src3:worn.c \
  240. X#    Src3:write.c        Src3:zap.c
  241. X
  242. X
  243. X# All .c that are part of the main NetHack program and not system specific:
  244. X
  245. X# HACKCSRC = $(HSRC1) $(HSRC2) $(HSRC3)
  246. X
  247. X
  248. X# Other .c files (duplicates commented out):
  249. X
  250. X# MAKESRC = \
  251. X#    Src2:makedefs.c #    Src2:monst.c        Src2:objects.c
  252. X#
  253. X# SPLEVSRC = \
  254. X#    Src1:lev_comp.c        Others:lev_lex.c    Src1:lev_main.c
  255. X#
  256. X# AMIGASRC = \
  257. X#    Amiga:amidos.c        Amiga:amitcap.c        Amiga:amitty.c \
  258. X#    Amiga:amiunix.c        Amiga:amiwbench.c    Amiga:amiwind.c
  259. X#
  260. X# OTHERSRC = \
  261. X#    Others:pcmain.c        Others:random.c
  262. X
  263. X
  264. X# All .c that are used:
  265. X
  266. X# CSOURCES = $(HACKCSRC) $(MAKESRC) $(SPLEVSRC) $(AMIGASRC) $(OTHERSRC)
  267. X
  268. X
  269. X# All .h files (except date.h, onames.h, pm.h, and trap.h, which would
  270. X# cause dependency loops in run through "make depend"):
  271. X
  272. X# HACKINCL = \
  273. X#    Incl:amiconf.h        Incl:anime.h        Incl:artifact.h \
  274. X#    Incl:attrib.h        Incl:color.h        Incl:config.h \
  275. X#    Incl:coord.h        Incl:decl.h        Incl:edog.h \
  276. X#    Incl:epri.h        Incl:eshk.h        Incl:extern.h \
  277. X#    Incl:flag.h        Incl:func_tab.h        Incl:global.h \
  278. X#    Incl:gold.h        Incl:hack.h        Incl:lev.h \
  279. X#    Incl:mfndpos.h        Incl:mkroom.h        Incl:monattk.h \
  280. X#    Incl:mondata.h        Incl:monflag.h        Incl:monst.h \
  281. X#    Incl:monsym.h        Incl:msdos.h        Incl:obj.h \
  282. X#    Incl:objclass.h        Incl:patchlevel.h    Incl:pcconf.h \
  283. X#    Incl:permonst.h        Incl:prop.h        Incl:rm.h \
  284. X#    Incl:sp_lev.h        Incl:spell.h        Incl:system.h \
  285. X#    Incl:tradstdc.h        Incl:vault.h        Incl:wseg.h \
  286. X#    Incl:you.h        Incl:youprop.h
  287. X
  288. X
  289. X# All .h files:
  290. X
  291. X# HSOURCES = \
  292. X#    $(HACKINCL)        Incl:date.h        Incl:onames.h \
  293. X#    Incl:pm.h        Incl:trap.h
  294. X
  295. X
  296. X# All source files:
  297. X
  298. X# SOURCES = $(CSOURCES) $(HSOURCES)
  299. X
  300. X
  301. X# Object files for makedefs:
  302. X
  303. XMAKEOBJS = \
  304. X    O_Src2:makedefs.o    O_Src2:monst.o        O_Src2:objects.o
  305. X
  306. X
  307. X# Object files for special levels compiler:
  308. X
  309. XSPLEVOBJS = \
  310. X    O_Src1:lev_comp.o    O_Others:lev_lex.o    O_Src1:lev_main.o \
  311. X    O_Src2:monst.o        O_Src2:objects.o
  312. X
  313. X
  314. X# Object files for NetHack:
  315. X
  316. XHOBJ1 = \
  317. X    O_Src1:allmain.o    O_Src1:alloc.o        O_Src1:apply.o \
  318. X    O_Src1:artifact.o    O_Src1:attrib.o        O_Src1:bones.o \
  319. X    O_Src1:cmd.o        O_Src1:dbridge.o    O_Src1:decl.o \
  320. X    O_Src1:demon.o        O_Src1:do.o        O_Src1:do_name.o \
  321. X    O_Src1:do_wear.o    O_Src1:dog.o        O_Src1:dogmove.o \
  322. X    O_Src1:dokick.o        O_Src1:dothrow.o    O_Src1:eat.o \
  323. X    O_Src1:end.o        O_Src1:engrave.o    O_Src1:exper.o \
  324. X    O_Src1:extralev.o    O_Src1:fountain.o    O_Src1:getline.o \
  325. X    O_Src1:hack.o        O_Src1:invent.o        O_Src1:lock.o
  326. X
  327. XHOBJ2 = \
  328. X    O_Src2:mail.o        O_Src2:makemon.o    O_Src2:mcastu.o \
  329. X    O_Src2:mhitm.o        O_Src2:mhitu.o        O_Src2:mklev.o \
  330. X    O_Src2:mkmaze.o        O_Src2:mkobj.o        O_Src2:mkroom.o \
  331. X    O_Src2:mon.o        O_Src2:mondata.o    O_Src2:monmove.o \
  332. X    O_Src2:monst.o        O_Src2:mthrowu.o    O_Src2:music.o \
  333. X    O_Src2:o_init.o        O_Src2:objects.o    O_Src2:objnam.o \
  334. X    O_Src2:options.o    O_Src2:pager.o        O_Src2:pickup.o \
  335. X    O_Src2:polyself.o    O_Src2:potion.o
  336. X
  337. XHOBJ3 = \
  338. X    O_Src3:pray.o        O_Src3:pri.o        O_Src3:priest.o \
  339. X    O_Src3:prisym.o        O_Src3:read.o        O_Src3:restore.o \
  340. X    O_Src3:rip.o        O_Src3:rnd.o        O_Src3:rumors.o \
  341. X    O_Src3:save.o        O_Src3:search.o        O_Src3:shk.o \
  342. X    O_Src3:shknam.o        O_Src3:sit.o        O_Src3:sounds.o \
  343. X    O_Src3:sp_lev.o        O_Src3:spell.o        O_Src3:steal.o \
  344. X    O_Src3:timeout.o    O_Src3:topl.o        O_Src3:topten.o \
  345. X    O_Src3:track.o        O_Src3:trap.o        O_Src3:u_init.o \
  346. X    O_Src3:uhitm.o        O_Src3:vault.o        O_Src3:version.o \
  347. X    O_Src3:weapon.o        O_Src3:were.o        O_Src3:wield.o \
  348. X    O_Src3:wizard.o        O_Src3:worm.o        O_Src3:worn.o \
  349. X    O_Src3:write.o        O_Src3:zap.o
  350. X
  351. XAMIGAOBJ = \
  352. X    O_Amiga:amidos.o    O_Amiga:amitcap.o    O_Amiga:amitty.o \
  353. X    O_Amiga:amiunix.o    O_Amiga:amiwbench.o    O_Amiga:amiwind.o
  354. X
  355. XOTHEROBJ = \
  356. X    O_Others:pcmain.o    $(RANDOBJ)
  357. X
  358. X
  359. X# All the object files for NetHack:
  360. X
  361. XHOBJ = $(HOBJ1) $(HOBJ2) $(HOBJ3) $(AMIGAOBJ) $(OTHEROBJ)
  362. X
  363. X
  364. X# The auxiliary runtime files:
  365. X
  366. XAUXFILES = \
  367. X    NetHack:data        NetHack:rumors        NetHack:castle \
  368. X    NetHack:endgame        NetHack:tower1        NetHack:cmdhelp \
  369. X    NetHack:help        NetHack:hh        NetHack:history \
  370. X    NetHack:license        NetHack:opthelp        NetHack:oracles \
  371. X    NetHack:perm        NetHack:record        NetHack:NetHack.cnf \
  372. X    NetHack:hack.font    NetHack:hack        NetHack:hack/8 \
  373. X    NetHack:default.icon    HackExe:NetHack.info    NetHack:NewGame.info \
  374. X    NetHack:NetHackScore.info
  375. X
  376. X
  377. X# Getting down to business:
  378. X
  379. Xall:  NetHack:lev_comp $(GAME) auxilstuff
  380. X
  381. X$(GAME):  $(HOBJ)
  382. X    $(LINK) $(GAME) $(LIN) $(LLINK) $(LLIB)
  383. X
  384. Xlink:
  385. X    $(LINK) $(GAME) $(LIN) $(LLINK) $(LLIB)
  386. X
  387. Xobj1:  $(HOBJ1)
  388. Xobj2:  $(HOBJ2)
  389. Xobj3:  $(HOBJ3)
  390. Xobja:  $(AMIGAOBJ)
  391. Xobjo:  $(OTHEROBJ)
  392. X
  393. X
  394. X# The default method for creating object files:
  395. X
  396. X#[LATTICE]
  397. X
  398. X.c.o:
  399. X    $(CC) $(CFLAGS) $(CSYM) -o$@ $<
  400. X
  401. X#[MANX3.6]
  402. X
  403. X#$(HOBJ1):
  404. X#    $(CC) $(CFLAGS) $(CSYM) -o$@ Src1:$*.c
  405. X
  406. X#$(HOBJ2):
  407. X#    $(CC) $(CFLAGS) $(CSYM) -o$@ Src2:$*.c
  408. X
  409. X#$(HOBJ3):
  410. X#    $(CC) $(CFLAGS) $(CSYM) -o$@ Src3:$*.c
  411. X
  412. X#$(AMIGAOBJ):
  413. X#    $(CC) $(CFLAGS) $(CSYM) -o$@ Amiga:$*.c
  414. X
  415. X#$(OTHEROBJ):
  416. X#    $(CC) $(CFLAGS) $(CSYM) -o$@ Others:$*.c
  417. X
  418. X
  419. Xclean:
  420. X    -delete O_Amiga:\#?.o O_Others:\#?.o
  421. X    -delete O_Src1:\#?.o O_Src2:\#?.o O_Src3:\#?.o
  422. X
  423. Xspotless:  clean
  424. X    -delete $(GAME) NetHack:lev_comp NetHack:makedefs
  425. X    -delete Auxil:data Auxil:rumors
  426. X    -delete NetHack:data NetHack:rumors
  427. X    -delete NetHack:castle NetHack:endgame
  428. X    -delete NetHack:tower1 NetHack:tower2 NetHack:tower3
  429. X    -delete Incl:onames.h Incl:pm.h
  430. X    -echo > Incl:onames.h "" noline
  431. X    -wait 2
  432. X    -echo > Incl:pm.h "" noline
  433. X    -wait 2
  434. X    -setdate Src2:makedefs.c
  435. X    -wait 2
  436. X# (Make sure files exist and have timestamps in the right order for
  437. X# next compile)
  438. X
  439. X
  440. X# Creating precompiled version of Incl:hack.h to save disk I/O.
  441. X
  442. X#[LATTICE]
  443. X#   If we were to use the precompiled header file feature of Lattice C, we
  444. X#   would uncomment the following lines.  However, there are still problems
  445. X#   in the behavior of this feature in version 5.04, so these lines are
  446. X#   commented out for now.  (Also see defines for HDEP and CSYM near the
  447. X#   beginning of this file, as these should be appropriately defined.)
  448. X
  449. X#$(HDEP):  Incl:hack.h NetHack:makedefs
  450. X#    echo > Ram:hackincl.c "#include <Incl:hack.h>"
  451. X#    $(CC) $(CFLAGS) -ph -o$@ Ram:hackincl.c
  452. X#    -delete Ram:hackincl.c
  453. X
  454. X#[MANX3.6]
  455. X#   If we were compiling with Aztec 3.6 and wanted to use the symbol table
  456. X#   pre-loading feature, we would uncomment these following two lines.
  457. X
  458. X#$(HDEP):  Incl:hack.h NetHack:makedefs
  459. X#    $(CC) $(CFLAGS) -a -oRam:hack.asm +h$@ Incl:hack.h
  460. X#    -delete Ram:hack.asm
  461. X
  462. X
  463. X#
  464. X#    Please note:    The dependency lines for the modules here are
  465. X#            deliberately incorrect.  Including "hack.h" in
  466. X#            the dependency list would cause a dependency
  467. X#            loop.
  468. X#
  469. X
  470. XNetHack:makedefs:  $(MAKEOBJS)
  471. X    $(LINK) NetHack:makedefs $(LIN) $(MAKEOBJS) $(LLIB)
  472. X
  473. XO_Src2:makedefs.o:  Src2:makedefs.c Incl:config.h Incl:permonst.h Incl:objclass.h
  474. X    $(CC) -dMAKEDEFS_C $(CFLAGS) -o$@ Src2:makedefs.c
  475. X
  476. XNetHack:lev_comp:  $(SPLEVOBJS)
  477. X    $(LINK) NetHack:lev_comp $(LIN) $(SPLEVOBJS) $(LLIB)
  478. X
  479. XO_Src1:lev_comp.o:  Src1:lev_comp.c $(HDEP) Incl:sp_lev.h
  480. X    $(CC) -dLEV_LEX_C $(CFLAGS) -o$@ Src1:lev_comp.c
  481. X
  482. XO_Others:lev_lex.o:  Others:lev_lex.c $(HDEP) Incl:lev_comp.h Incl:sp_lev.h
  483. X    $(CC) -dLEV_LEX_C $(CFLAGS) -o$@ Others:lev_lex.c
  484. X
  485. XO_Src1:lev_main.o:  Src1:lev_main.c $(HDEP) Incl:sp_lev.h
  486. X    $(CC) -dLEV_LEX_C -dAMIGA $(CFLAGS) -o$@ Src1:lev_main.c
  487. X
  488. X#
  489. X#    The following include files depend on makedefs to be created.
  490. X#    As a result, they are not defined in HACKINCL, instead, their
  491. X#    dependencies are explicitly outlined here.
  492. X#
  493. X
  494. X#
  495. X#    date.h should be remade any time any of the source or include code
  496. X#    is modified.  Unfortunately, this would make the contents of this
  497. X#    file far more complex.    Since "hack.h" depends on most of the include
  498. X#    files, we kludge around this by making date.h dependent on hack.h,
  499. X#    even though it doesn't include this file.
  500. X#
  501. X
  502. XIncl:date.h:  $(HDEP) NetHack:makedefs $(AMIGAOBJ)
  503. X    NetHack:makedefs -v
  504. X
  505. XIncl:trap.h:  Incl:config.h NetHack:makedefs
  506. X    NetHack:makedefs -t
  507. X    -copy makedefs.1 $@
  508. X
  509. XIncl:onames.h:  NetHack:makedefs
  510. X    NetHack:makedefs -o
  511. X
  512. XIncl:pm.h:  NetHack:makedefs
  513. X    NetHack:makedefs -p
  514. X
  515. X#
  516. X#    The following programs vary depending on what OS you are using.
  517. X#    As a result, they are not defined in HACKSRC and their dependancies
  518. X#    are explicitly outlined here.
  519. X#
  520. X
  521. XO_Amiga:amidos.o:  Amiga:amidos.c $(HDEP)
  522. X
  523. XO_Amiga:amitcap.o:  Amiga:amitcap.c $(HDEP)
  524. X
  525. XO_Amiga:amitty.o:  Amiga:amitty.c $(HDEP)
  526. X
  527. XO_Amiga:amiunix.o:  Amiga:amiunix.c $(HDEP)
  528. X
  529. XO_Amiga:amiwind.o:  Amiga:amiwind.c Amiga:amimenu.c $(HDEP)
  530. X
  531. XO_Amiga:amiwbench.o:  Amiga:amiwbench.c $(HDEP)
  532. X
  533. XO_Others:random.o:  Others:random.c
  534. X    $(CC) $(CFLAGS) -o$@ Others:random.c
  535. X
  536. XO_Others:pcmain.o:  Others:pcmain.c $(HDEP)
  537. X
  538. X
  539. X# Create/copy other stuff into NetHack: directory:
  540. X
  541. Xauxilstuff:  $(AUXFILES)
  542. X
  543. XNetHack:data:  Auxil:data
  544. X    copy Auxil:data $@
  545. X
  546. XAuxil:data:  Auxil:data.base Incl:config.h NetHack:makedefs
  547. X    NetHack:makedefs -d
  548. X
  549. XNetHack:rumors:  Auxil:rumors
  550. X    copy Auxil:rumors $@
  551. X
  552. XAuxil:rumors:  Auxil:rumors.tru Auxil:rumors.fal NetHack:makedefs
  553. X    NetHack:makedefs -r
  554. X
  555. XNetHack:castle:  Auxil:castle.des NetHack:lev_comp
  556. X    NetHack:lev_comp Auxil:castle.des
  557. X
  558. XNetHack:endgame:  Auxil:endgame.des NetHack:lev_comp
  559. X    NetHack:lev_comp Auxil:endgame.des
  560. X
  561. XNetHack:tower1:  Auxil:tower.des NetHack:lev_comp
  562. X    NetHack:lev_comp Auxil:tower.des
  563. X
  564. XNetHack:cmdhelp:  Auxil:cmdhelp
  565. X    copy Auxil:cmdhelp $@
  566. X
  567. XNetHack:help:  Auxil:help
  568. X    copy Auxil:help $@
  569. X
  570. XNetHack:hh:  Auxil:hh
  571. X    copy Auxil:hh $@
  572. X
  573. XNetHack:history:  Auxil:history
  574. X    copy Auxil:history $@
  575. X
  576. XNetHack:license:  Auxil:license
  577. X    copy Auxil:license $@
  578. X
  579. XNetHack:opthelp:  Auxil:opthelp
  580. X    copy Auxil:opthelp $@
  581. X
  582. XNetHack:oracles:  Auxil:oracles
  583. X    copy Auxil:oracles $@
  584. X
  585. XNetHack:perm:
  586. X    echo > $@ "" NOLINE
  587. X
  588. XNetHack:record:
  589. X    echo > $@ "" NOLINE
  590. X
  591. XNetHack:NetHack.cnf:  Amiga:NetHack.cnf
  592. X    copy Amiga:NetHack.cnf $@
  593. X
  594. XNetHack:hack.font:  Amiga:amifont.uu
  595. X    $(UUDEC) Amiga:amifont.uu
  596. X
  597. XNetHack:hack:
  598. X    makedir $@
  599. X
  600. XNetHack:hack/8:  Amiga:amifont8.uu NetHack:hack
  601. X    $(UUDEC) Amiga:amifont8.uu
  602. X    -rename 8 hack/8
  603. X
  604. XNetHack:default.icon:  Amiga:dflticon.uu
  605. X    $(UUDEC) Amiga:dflticon.uu
  606. X
  607. XHackExe:NetHack.info:  Amiga:NHinfo.uu
  608. X    $(UUDEC) Amiga:NHinfo.uu
  609. X
  610. XNetHack:NewGame.info:  Amiga:NewGame.uu
  611. X    $(UUDEC) Amiga:NewGame.uu
  612. X
  613. XNetHack:NetHackScore.info:  Amiga:NHScore.uu
  614. X    $(UUDEC) Amiga:NHScore.uu
  615. X
  616. X
  617. X# DO NOT DELETE THIS LINE
  618. X
  619. XO_Src1:allmain.o:  Src1:allmain.c $(HDEP)
  620. XO_Src1:alloc.o:  Src1:alloc.c Incl:config.h
  621. X    $(CC) $(CFLAGS) -o$@ Src1:alloc.c
  622. XO_Src1:apply.o:  Src1:apply.c $(HDEP) Incl:edog.h
  623. XO_Src1:artifact.o:  Src1:artifact.c $(HDEP) Incl:artifact.h
  624. XO_Src1:attrib.o:  Src1:attrib.c $(HDEP)
  625. XO_Src1:bones.o:  Src1:bones.c $(HDEP)
  626. XO_Src1:cmd.o:  Src1:cmd.c $(HDEP) Incl:func_tab.h
  627. XO_Src1:dbridge.o:  Src1:dbridge.c $(HDEP)
  628. XO_Src1:decl.o:  Src1:decl.c $(HDEP)
  629. XO_Src1:demon.o:  Src1:demon.c $(HDEP)
  630. XO_Src1:do.o:  Src1:do.c $(HDEP)
  631. XO_Src1:do_name.o:  Src1:do_name.c $(HDEP)
  632. XO_Src1:do_wear.o:  Src1:do_wear.c $(HDEP)
  633. XO_Src1:dog.o:  Src1:dog.c $(HDEP) Incl:edog.h
  634. XO_Src1:dogmove.o:  Src1:dogmove.c $(HDEP) Incl:mfndpos.h Incl:edog.h
  635. XO_Src1:dokick.o:  Src1:dokick.c $(HDEP)
  636. XO_Src1:dothrow.o:  Src1:dothrow.c $(HDEP)
  637. XO_Src1:eat.o:  Src1:eat.c $(HDEP)
  638. XO_Src1:end.o:  Src1:end.c $(HDEP) Incl:eshk.h
  639. XO_Src1:engrave.o:  Src1:engrave.c $(HDEP)
  640. XO_Src1:exper.o:  Src1:exper.c $(HDEP)
  641. XO_Src1:extralev.o:  Src1:extralev.c $(HDEP)
  642. XO_Src1:fountain.o:  Src1:fountain.c $(HDEP)
  643. XO_Src1:getline.o:  Src1:getline.c $(HDEP) Incl:func_tab.h
  644. XO_Src1:hack.o:  Src1:hack.c $(HDEP)
  645. XO_Src1:invent.o:  Src1:invent.c $(HDEP) Incl:lev.h Incl:wseg.h
  646. XO_Src1:lock.o:  Src1:lock.c $(HDEP)
  647. XO_Src2:mail.o:  Src2:mail.c $(HDEP)
  648. XO_Src2:makemon.o:  Src2:makemon.c $(HDEP)
  649. XO_Src2:mcastu.o:  Src2:mcastu.c $(HDEP)
  650. XO_Src2:mhitm.o:  Src2:mhitm.c $(HDEP) Incl:artifact.h
  651. XO_Src2:mhitu.o:  Src2:mhitu.c $(HDEP) Incl:artifact.h Incl:edog.h
  652. XO_Src2:mklev.o:  Src2:mklev.c $(HDEP)
  653. XO_Src2:mkmaze.o:  Src2:mkmaze.c $(HDEP)
  654. XO_Src2:mkobj.o:  Src2:mkobj.c $(HDEP)
  655. XO_Src2:mkroom.o:  Src2:mkroom.c $(HDEP)
  656. XO_Src2:mon.o:  Src2:mon.c $(HDEP) Incl:mfndpos.h Incl:artifact.h
  657. XO_Src2:mondata.o:  Src2:mondata.c $(HDEP) Incl:eshk.h Incl:epri.h
  658. XO_Src2:monmove.o:  Src2:monmove.c $(HDEP) Incl:mfndpos.h Incl:artifact.h
  659. XO_Src2:monst.o:  Src2:monst.c Incl:config.h Incl:permonst.h Incl:monsym.h Incl:eshk.h Incl:vault.h Incl:epri.h
  660. X    $(CC) $(CFLAGS) -o$@ Src2:monst.c
  661. XO_Src2:mthrowu.o:  Src2:mthrowu.c $(HDEP)
  662. XO_Src2:music.o:  Src2:music.c $(HDEP)
  663. XO_Src2:o_init.o:  Src2:o_init.c $(HDEP)
  664. XO_Src2:objects.o:  Src2:objects.c Incl:config.h Incl:obj.h Incl:objclass.h Incl:prop.h
  665. X    $(CC) $(CFLAGS) -o$@ Src2:objects.c
  666. XO_Src2:objnam.o:  Src2:objnam.c $(HDEP)
  667. XO_Src2:options.o:  Src2:options.c $(HDEP)
  668. XO_Src2:pager.o:  Src2:pager.c $(HDEP)
  669. XO_Src2:pickup.o:  Src2:pickup.c $(HDEP)
  670. XO_Src2:polyself.o:  Src2:polyself.c $(HDEP)
  671. XO_Src2:potion.o:  Src2:potion.c $(HDEP)
  672. XO_Src3:pray.o:  Src3:pray.c $(HDEP)
  673. XO_Src3:pri.o:  Src3:pri.c $(HDEP)
  674. XO_Src3:priest.o:  Src3:priest.c $(HDEP) Incl:mfndpos.h Incl:eshk.h Incl:epri.h
  675. XO_Src3:prisym.o:  Src3:prisym.c $(HDEP) Incl:wseg.h Incl:lev.h
  676. XO_Src3:read.o:  Src3:read.c $(HDEP)
  677. XO_Src3:restore.o:  Src3:restore.c $(HDEP) Incl:lev.h Incl:wseg.h
  678. XO_Src3:rip.o:  Src3:rip.c $(HDEP)
  679. XO_Src3:rnd.o:  Src3:rnd.c $(HDEP)
  680. XO_Src3:rumors.o:  Src3:rumors.c $(HDEP)
  681. XO_Src3:save.o:  Src3:save.c $(HDEP) Incl:lev.h Incl:wseg.h
  682. XO_Src3:search.o:  Src3:search.c $(HDEP) Incl:artifact.h
  683. XO_Src3:shk.o:  Src3:shk.c $(HDEP) Incl:eshk.h
  684. XO_Src3:shknam.o:  Src3:shknam.c $(HDEP) Incl:eshk.h
  685. XO_Src3:sit.o:  Src3:sit.c $(HDEP)
  686. XO_Src3:sounds.o:  Src3:sounds.c $(HDEP) Incl:edog.h Incl:eshk.h
  687. XO_Src3:sp_lev.o:  Src3:sp_lev.c $(HDEP) Incl:sp_lev.h
  688. XO_Src3:spell.o:  Src3:spell.c $(HDEP)
  689. XO_Src3:steal.o:  Src3:steal.c $(HDEP)
  690. XO_Src3:timeout.o:  Src3:timeout.c $(HDEP)
  691. XO_Src3:topl.o:  Src3:topl.c $(HDEP)
  692. XO_Src3:topten.o:  Src3:topten.c $(HDEP)
  693. XO_Src3:track.o:  Src3:track.c $(HDEP)
  694. XO_Src3:trap.o:  Src3:trap.c $(HDEP) Incl:edog.h
  695. XO_Src3:u_init.o:  Src3:u_init.c $(HDEP)
  696. XO_Src3:uhitm.o:  Src3:uhitm.c $(HDEP) Incl:artifact.h
  697. XO_Src3:vault.o:  Src3:vault.c $(HDEP) Incl:vault.h
  698. XO_Src3:version.o:  Src3:version.c $(HDEP) Incl:date.h
  699. XO_Src3:weapon.o:  Src3:weapon.c $(HDEP)
  700. XO_Src3:were.o:  Src3:were.c $(HDEP)
  701. XO_Src3:wield.o:  Src3:wield.c $(HDEP)
  702. XO_Src3:wizard.o:  Src3:wizard.c $(HDEP)
  703. XO_Src3:worm.o:  Src3:worm.c $(HDEP) Incl:wseg.h
  704. XO_Src3:worn.o:  Src3:worn.c $(HDEP)
  705. XO_Src3:write.o:  Src3:write.c $(HDEP)
  706. XO_Src3:zap.o:  Src3:zap.c $(HDEP)
  707. XIncl:config.h:  Incl:tradstdc.h Incl:global.h
  708. X    -setdate Incl:config.h
  709. X    -wait 2
  710. XIncl:decl.h:  Incl:spell.h Incl:obj.h Incl:you.h Incl:onames.h Incl:pm.h
  711. X    -setdate Incl:decl.h
  712. X    -wait 2
  713. XIncl:global.h:  Incl:coord.h Incl:unixconf.h Incl:pcconf.h Incl:tosconf.h Incl:amiconf.h
  714. X    -setdate Incl:global.h
  715. X    -wait 2
  716. XIncl:hack.h:  Incl:config.h Incl:decl.h Incl:monsym.h Incl:mkroom.h Incl:objclass.h Incl:gold.h Incl:trap.h Incl:flag.h Incl:rm.h
  717. X    -setdate Incl:hack.h
  718. X    -wait 2
  719. XIncl:permonst.h:  Incl:monattk.h Incl:monflag.h
  720. X    -setdate Incl:permonst.h
  721. X    -wait 2
  722. XIncl:you.h:  Incl:attrib.h Incl:monst.h Incl:youprop.h
  723. X    -setdate Incl:you.h
  724. X    -wait 2
  725. XIncl:youprop.h:  Incl:prop.h Incl:permonst.h Incl:mondata.h Incl:pm.h
  726. X    -setdate Incl:youprop.h
  727. X    -wait 2
  728. X# DEPENDENCIES MUST END AT END OF FILE
  729. X# IF YOU PUT STUFF HERE IT WILL GO AWAY
  730. X# see make depend above
  731. END_OF_FILE
  732. if test 21125 -ne `wc -c <'amiga/Makefile.ami'`; then
  733.     echo shar: \"'amiga/Makefile.ami'\" unpacked with wrong size!
  734. fi
  735. # end of 'amiga/Makefile.ami'
  736. if test -f 'others/msdos.c' -a "${1}" != "-c" ; then 
  737.   echo shar: Renaming existing file \"'others/msdos.c'\" to \"'others/msdos.c.orig'\"
  738.   mv -f 'others/msdos.c' 'others/msdos.c.orig'
  739. fi
  740. echo shar: Extracting \"'others/msdos.c'\" \(29447 characters\)
  741. sed "s/^X//" >'others/msdos.c' <<'END_OF_FILE'
  742. X/*    SCCS Id: @(#)msdos.c    3.0    89/12/26
  743. X/* NetHack may be freely redistributed.  See license for details. */
  744. X/* An assortment of MSDOS functions.
  745. X */
  746. X
  747. X#define NEED_VARARGS
  748. X#include "hack.h"
  749. X
  750. X#ifdef MSDOS
  751. X
  752. X# ifdef TOS
  753. X#  include <osbind.h>
  754. X#  ifndef WORD
  755. X#    define WORD short        /* 16 bits -- redefine if necessary */
  756. X#  endif
  757. X# else
  758. X#  ifdef __TURBOC__    /* avoid incompatible redeclaration */
  759. X#   undef getdate
  760. X#  endif
  761. X#  include <dos.h>
  762. X# endif
  763. X# ifdef OS2
  764. X#  include "def_os2.h"   /* OS2 definitions (Timo Hakulinen) */
  765. X# endif
  766. X
  767. X#include <ctype.h>
  768. X#include <fcntl.h>
  769. X#include <process.h>
  770. X
  771. Xstatic char DOSgetch();
  772. X# ifdef DGK
  773. Xstatic char BIOSgetch();
  774. X# endif
  775. X# ifdef TOS
  776. Xstatic void init_aline();
  777. Xchar *_a_line;            /* for Line A variables */
  778. X# else
  779. Xstatic unsigned int ioctl();
  780. X# endif
  781. X
  782. Xvoid
  783. Xflushout()
  784. X{
  785. X    (void) fflush(stdout);
  786. X    return;
  787. X}
  788. X
  789. Xint
  790. Xtgetch() {
  791. X    char ch;
  792. X
  793. X# ifdef DGK
  794. X    /* BIOSgetch can use the numeric key pad on IBM compatibles. */
  795. X    if (flags.IBMBIOS)
  796. X        ch = BIOSgetch();
  797. X    else
  798. X# endif
  799. X        ch = DOSgetch();
  800. X    return ((ch == '\r') ? '\n' : ch);
  801. X}
  802. X
  803. X# if !defined(OS2) && !defined(TOS)
  804. X/*
  805. X * MS-DOS functions
  806. X */
  807. X#define DIRECT_INPUT    0x07    /* Unfiltered Character Input Without Echo */
  808. X#define FATINFO     0x1B    /* Get Default Drive Data */
  809. X/* MS-DOS 2.0+: */
  810. X#define GETDTA        0x2F    /* Get DTA Address */
  811. X#define FREESPACE    0x36    /* Get Drive Allocation Info */
  812. X#define GETSWITCHAR    0x3700    /* Get Switch Character */
  813. X#define FINDFIRST    0x4E    /* Find First File */
  814. X#define FINDNEXT    0x4F    /* Find Next File */
  815. X#define SETFILETIME    0x5701    /* Set File Date & Time */
  816. X/*
  817. X * BIOS interrupts
  818. X */
  819. X#define KEYBRD_BIOS    0x16
  820. X#define VIDEO_BIOS    0x10
  821. X/*
  822. X * Keyboard BIOS functions
  823. X */
  824. X#define READCHAR    0x00    /* Read Character from Keyboard */
  825. X#define GETKEYFLAGS    0x02    /* Get Keyboard Flags */
  826. X/*
  827. X * Video BIOS functions
  828. X */
  829. X#define SETCURPOS    0x02    /* Set Cursor Position */
  830. X#define GETMODE     0x0f    /* Get Video Mode */
  831. X#define FONTINFO    0x1130    /* Get Font Info */
  832. X# endif
  833. X
  834. X
  835. X/*
  836. X *  Keyboard translation tables.
  837. X */
  838. X#  ifdef TOS
  839. X#define KEYPADLO    0x61
  840. X#define KEYPADHI    0x71
  841. X#  else
  842. X#define KEYPADLO    0x47
  843. X#define KEYPADHI    0x53
  844. X#  endif
  845. X
  846. X#define PADKEYS     (KEYPADHI - KEYPADLO + 1)
  847. X#define iskeypad(x)    (KEYPADLO <= (x) && (x) <= KEYPADHI)
  848. X
  849. X/*
  850. X * Keypad keys are translated to the normal values below.
  851. X * When IBM_BIOS is active, shifted keypad keys are translated to the
  852. X *    shift values below.
  853. X */
  854. Xstatic const struct pad {
  855. X    char normal, shift;
  856. X} keypad[PADKEYS] = {
  857. X#  ifdef TOS
  858. X            {C('['), 'Q'},        /* UNDO */
  859. X            {'?', '/'},        /* HELP */
  860. X            {'(', 'a'},        /* ( */
  861. X            {')', 'w'},        /* ) */
  862. X            {'/', '/'},        /* / */
  863. X            {C('p'), '$'},        /* * */
  864. X#  endif
  865. X            {'y', 'Y'},        /* 7 */
  866. X            {'k', 'K'},        /* 8 */
  867. X            {'u', 'U'},        /* 9 */
  868. X#  ifndef TOS
  869. X            {'m', C('p')},        /* - */
  870. X#  endif
  871. X            {'h', 'H'},        /* 4 */
  872. X#  ifdef TOS
  873. X            {'.', '.'},
  874. X#  else
  875. X            {'g', 'g'},        /* 5 */
  876. X#  endif
  877. X            {'l', 'L'},        /* 6 */
  878. X#  ifndef TOS
  879. X            {'p', 'P'},        /* + */
  880. X#  endif
  881. X            {'b', 'B'},        /* 1 */
  882. X            {'j', 'J'},        /* 2 */
  883. X            {'n', 'N'},        /* 3 */
  884. X            {'i', 'I'},        /* Ins */
  885. X            {'.', ':'}        /* Del */
  886. X}, numpad[PADKEYS] = {
  887. X#  ifdef TOS
  888. X            {C('['), 'Q'}    ,    /* UNDO */
  889. X            {'?', '/'},        /* HELP */
  890. X            {'(', 'a'},        /* ( */
  891. X            {')', 'w'},        /* ) */
  892. X            {'/', '/'},        /* / */
  893. X            {C('p'), '$'},        /* * */
  894. X#  endif
  895. X            {'7', M('7')},        /* 7 */
  896. X            {'8', M('8')},        /* 8 */
  897. X            {'9', M('9')},        /* 9 */
  898. X#  ifndef TOS
  899. X            {'m', C('p')},        /* - */
  900. X#  endif
  901. X            {'4', M('4')},        /* 4 */
  902. X#  ifdef TOS
  903. X            {'.', '.'},        /* 5 */
  904. X#  else
  905. X            {'g', 'G'},        /* 5 */
  906. X#  endif
  907. X            {'6', M('6')},        /* 6 */
  908. X#  ifndef TOS
  909. X            {'p', 'P'},        /* + */
  910. X#  endif
  911. X            {'1', M('1')},        /* 1 */
  912. X            {'2', M('2')},        /* 2 */
  913. X            {'3', M('3')},        /* 3 */
  914. X            {'i', 'I'},        /* Ins */
  915. X            {'.', ':'}        /* Del */
  916. X};
  917. X
  918. X/*
  919. X * Unlike Ctrl-letter, the Alt-letter keystrokes have no specific ASCII
  920. X * meaning unless assigned one by a keyboard conversion table, so the
  921. X * keyboard BIOS normally does not return a character code when Alt-letter
  922. X * is pressed.    So, to interpret unassigned Alt-letters, we must use a
  923. X * scan code table to translate the scan code into a letter, then set the
  924. X * "meta" bit for it.  -3.
  925. X */
  926. X#define SCANLO        0x10
  927. X#define SCANHI        0x32
  928. X#define SCANKEYS    (SCANHI - SCANLO + 1)
  929. X#define inmap(x)    (SCANLO <= (x) && (x) <= SCANHI)
  930. X
  931. Xstatic const char scanmap[SCANKEYS] = {     /* ... */
  932. X    'q','w','e','r','t','y','u','i','o','p','[',']', '\n',
  933. X    0, 'a','s','d','f','g','h','j','k','l',';','\'', '`',
  934. X    0, '\\', 'z','x','c','v','b','N','m'     /* ... */
  935. X};
  936. X
  937. X# ifdef DGK
  938. X/*
  939. X * BIOSgetch gets keys directly with a BIOS call.
  940. X */
  941. X#define SHIFT        (0x1 | 0x2)
  942. X#define CTRL        0x4
  943. X#define ALT        0x8
  944. X
  945. Xstatic char
  946. XBIOSgetch() {
  947. X    unsigned char scan, shift, ch;
  948. X    const struct pad *kpad;
  949. X
  950. X#  ifdef OS2
  951. X    KBDKEYINFO CharData;
  952. X    USHORT IOWait = 0;
  953. X    HKBD KbdHandle = 0;
  954. X
  955. X    KbdCharIn(&CharData,IOWait,KbdHandle);
  956. X    ch = CharData.chChar;
  957. X    scan = CharData.chScan;
  958. X    shift = CharData.fsState;
  959. X#  else /* OS2 */
  960. X#   ifdef TOS
  961. X    long  x;
  962. X#   else
  963. X    union REGS regs;
  964. X#   endif
  965. X
  966. X    /* Get scan code.
  967. X     */
  968. X#   ifdef TOS
  969. X    x = Crawcin();
  970. X    ch = x & 0x0ff;
  971. X    scan = (x & 0x00ff0000L) >> 16;
  972. X#   else
  973. X    regs.h.ah = READCHAR;
  974. X    int86(KEYBRD_BIOS, ®s, ®s);
  975. X    ch = regs.h.al;
  976. X    scan = regs.h.ah;
  977. X#   endif
  978. X    /* Get shift status.
  979. X     */
  980. X#   ifdef TOS
  981. X    shift = Kbshift(-1);
  982. X#   else
  983. X    regs.h.ah = GETKEYFLAGS;
  984. X    int86(KEYBRD_BIOS, ®s, ®s);
  985. X    shift = regs.h.al;
  986. X#   endif
  987. X#  endif /* OS2 */
  988. X
  989. X    /* Translate keypad keys */
  990. X    if (iskeypad(scan)) {
  991. X        kpad = flags.num_pad ? numpad : keypad;
  992. X        if (shift & SHIFT)
  993. X            ch = kpad[scan - KEYPADLO].shift;
  994. X        else
  995. X            ch = kpad[scan - KEYPADLO].normal;
  996. X    }
  997. X    /* Translate unassigned Alt-letters */
  998. X    if ((shift & ALT) && !ch) {
  999. X        if (inmap(scan))
  1000. X            ch = scanmap[scan - SCANLO];
  1001. X        return (isprint(ch) ? M(ch) : ch);
  1002. X    }
  1003. X    return ch;
  1004. X}
  1005. X
  1006. Xstatic char
  1007. XDOSgetch() {
  1008. X# ifdef TOS
  1009. X    return (Crawcin() & 0x007f);
  1010. X# else
  1011. X#  ifdef OS2
  1012. X    KBDKEYINFO CharData;
  1013. X    USHORT IOWait = 0;
  1014. X    HKBD KbdHandle = 0;
  1015. X
  1016. X    KbdCharIn(&CharData,IOWait,KbdHandle);
  1017. X    if (CharData.chChar == 0) {    /* an extended code -- not yet supported */
  1018. X        KbdCharIn(&CharData,IOWait,KbdHandle);       /* eat the next character */
  1019. X        CharData.chChar = 0;        /* and return a 0 */
  1020. X    }
  1021. X    return (CharData.chChar);
  1022. X#  else
  1023. X    union REGS regs;
  1024. X    char ch;
  1025. X    struct pad (*kpad)[PADKEYS];
  1026. X
  1027. X    regs.h.ah = DIRECT_INPUT;
  1028. X    intdos(®s, ®s);
  1029. X    ch = regs.h.al;
  1030. X
  1031. X    /*
  1032. X     * The extended codes for Alt-shifted letters, and unshifted keypad
  1033. X     * and function keys, correspond to the scan codes.  So we can still
  1034. X     * translate the unshifted cursor keys and Alt-letters.  -3.
  1035. X     */
  1036. X    if (ch == 0) {        /* an extended key */
  1037. X        regs.h.ah = DIRECT_INPUT;
  1038. X        intdos(®s, ®s);    /* get the extended key code */
  1039. X        ch = regs.h.al;
  1040. X
  1041. X        if (iskeypad(ch)) {    /* unshifted keypad keys */
  1042. X            kpad = (void *)(flags.num_pad ? numpad : keypad);
  1043. X            ch = (*kpad)[ch - KEYPADLO].normal;
  1044. X        } else if (inmap(ch)) { /* Alt-letters */
  1045. X            ch = scanmap[ch - SCANLO];
  1046. X            if (isprint(ch)) ch = M(ch);
  1047. X        } else ch = 0;        /* munch it */
  1048. X    }
  1049. X    return (ch);
  1050. X#  endif /* OS2 */
  1051. X# endif /* TOS */
  1052. X}
  1053. X
  1054. X
  1055. X#  ifndef TOS
  1056. X
  1057. X#   ifdef __TURBOC__
  1058. X#define switchar()    (char)getswitchar()
  1059. X#   else
  1060. X#    ifndef OS2
  1061. Xstatic char
  1062. Xswitchar()
  1063. X{
  1064. X    union REGS regs;
  1065. X
  1066. X    regs.x.ax = GETSWITCHAR;
  1067. X    intdos(®s, ®s);
  1068. X    return regs.h.dl;
  1069. X}
  1070. X#    endif /* OS2 */
  1071. X#   endif /* __TURBOC__ */
  1072. X# endif  /* TOS */
  1073. X
  1074. Xstatic const char *COMSPEC = 
  1075. X# ifdef TOS
  1076. X"SHELL";
  1077. X# else
  1078. X"COMSPEC";
  1079. X# endif
  1080. X
  1081. X#define getcomspec() getenv(COMSPEC)
  1082. X
  1083. X# ifdef SHELL
  1084. Xint
  1085. Xdosh() {
  1086. X    extern char orgdir[];
  1087. X    char *comspec;
  1088. X
  1089. X    if (comspec = getcomspec()) {
  1090. X#  if defined(DGK) && !defined(TOS)    /* TOS has a variety of shells */
  1091. X        settty("To return to NetHack, enter \"exit\" at the DOS prompt.\n");
  1092. X#  else
  1093. X        settty((char *)0);
  1094. X#  endif /* DGK */
  1095. X        chdirx(orgdir, 0);
  1096. X        if (spawnl(P_WAIT, comspec, comspec, NULL) < 0) {
  1097. X            Printf("\nCan't spawn \"%s\"!\n", comspec);
  1098. X            flags.toplin = 0;
  1099. X            more();
  1100. X        }
  1101. X#ifdef TOS
  1102. X/* Some shells (e.g. Gulam) turn the cursor off when they exit */
  1103. X        if (flags.IBMBIOS)
  1104. X            (void)Cursconf(1, -1);
  1105. X#endif
  1106. X        gettty(); /* ctrl-P might get turned back on (TH) */
  1107. X        chdirx(hackdir, 0);
  1108. X        start_screen();
  1109. X        docrt();
  1110. X    } else
  1111. X#  ifdef OS2
  1112. X        pline("Can't execute CMD.EXE");
  1113. X#  else
  1114. X#   ifdef TOS
  1115. X        pline("Can't find SHELL.");
  1116. X#   else
  1117. X        pline("Can't find COMSPEC.");
  1118. X#   endif
  1119. X#  endif /* OS2 */
  1120. X    return 0;
  1121. X}
  1122. X# endif /* SHELL */
  1123. X
  1124. X#ifndef TOS
  1125. X
  1126. Xlong
  1127. Xfreediskspace(path)
  1128. Xchar *path;
  1129. X{
  1130. X#   ifdef OS2
  1131. X    struct {
  1132. X        ULONG  idFileSystem;
  1133. X        ULONG  cSectorUnit;
  1134. X        ULONG  cUnit;
  1135. X        ULONG  cUnitAvail;
  1136. X        USHORT cbSector;
  1137. X    } FSInfoBuf;
  1138. X    USHORT DriveNumber, FSInfoLevel = 1, res;
  1139. X
  1140. X    if (path[0] && path[1] == ':')
  1141. X        DriveNumber = (toupper(path[0]) - 'A') + 1;
  1142. X    else
  1143. X        DriveNumber = 0;
  1144. X    res = DosQFSInfo(DriveNumber,FSInfoLevel,(PBYTE)&FSInfoBuf,sizeof(FSInfoBuf));
  1145. X    if (res)
  1146. X        return -1L;        /* error */
  1147. X    else
  1148. X        return ((long) FSInfoBuf.cSectorUnit * FSInfoBuf.cUnitAvail *
  1149. X                   FSInfoBuf.cbSector);
  1150. X#   else /* OS2 */
  1151. X    union REGS regs;
  1152. X
  1153. X    regs.h.ah = FREESPACE;
  1154. X    if (path[0] && path[1] == ':')
  1155. X        regs.h.dl = (toupper(path[0]) - 'A') + 1;
  1156. X    else
  1157. X        regs.h.dl = 0;
  1158. X    intdos(®s, ®s);
  1159. X    if (regs.x.ax == 0xFFFF)
  1160. X        return -1L;        /* bad drive number */
  1161. X    else
  1162. X        return ((long) regs.x.bx * regs.x.cx * regs.x.ax);
  1163. X#   endif /* OS2 */
  1164. X}
  1165. X
  1166. X#   ifdef OS2
  1167. XFILEFINDBUF ResultBuf;
  1168. XHDIR DirHandle;
  1169. X#   endif
  1170. X
  1171. X/* Functions to get filenames using wildcards
  1172. X */
  1173. Xstatic int
  1174. Xfindfirst(path)
  1175. Xchar *path;
  1176. X{
  1177. X#   ifdef OS2
  1178. X    USHORT res, SearchCount = 1;
  1179. X
  1180. X    DirHandle = 1;
  1181. X    res = DosFindFirst((PSZ)path,&DirHandle,0,&ResultBuf,sizeof(FILEFINDBUF),&SearchCount,0L);
  1182. X    return(!res);
  1183. X#   else
  1184. X    union REGS regs;
  1185. X    struct SREGS sregs;
  1186. X
  1187. X    regs.h.ah = FINDFIRST;
  1188. X    regs.x.cx = 0;        /* attribute: normal files */
  1189. X    regs.x.dx = FP_OFF(path);
  1190. X    sregs.ds = FP_SEG(path);
  1191. X    intdosx(®s, ®s, &sregs);
  1192. X    return !regs.x.cflag;
  1193. X#   endif /* OS2 */
  1194. X}
  1195. X
  1196. Xstatic int
  1197. Xfindnext() {
  1198. X#   ifdef OS2
  1199. X    USHORT res, SearchCount = 1;
  1200. X
  1201. X    res = DosFindNext(DirHandle,&ResultBuf,sizeof(FILEFINDBUF),&SearchCount);
  1202. X    return(!res);
  1203. X#   else
  1204. X    union REGS regs;
  1205. X
  1206. X    regs.h.ah = FINDNEXT;
  1207. X    intdos(®s, ®s);
  1208. X    return !regs.x.cflag;
  1209. X#   endif /* OS2 */
  1210. X}
  1211. X
  1212. X#   ifndef OS2
  1213. X/* Get disk transfer area, Turbo C already has getdta */
  1214. Xstatic char *
  1215. Xgetdta() {
  1216. X    union REGS regs;
  1217. X    struct SREGS sregs;
  1218. X    char *ret;
  1219. X
  1220. X    regs.h.ah = GETDTA;
  1221. X    intdosx(®s, ®s, &sregs);
  1222. X#    ifdef MK_FP
  1223. X    ret = MK_FP(sregs.es, regs.x.bx);
  1224. X#    else
  1225. X    FP_OFF(ret) = regs.x.bx;
  1226. X    FP_SEG(ret) = sregs.es;
  1227. X#    endif
  1228. X    return ret;
  1229. X}
  1230. X#   endif /* OS2 */
  1231. X
  1232. X#  else /* TOS */
  1233. X
  1234. Xlong
  1235. Xfreediskspace(path)
  1236. Xchar *path;
  1237. X{
  1238. X    int drive = 0;
  1239. X    struct {
  1240. X        long freal; /*free allocation units*/
  1241. X        long total; /*total number of allocation units*/
  1242. X        long bps;   /*bytes per sector*/
  1243. X        long pspal; /*physical sectors per allocation unit*/
  1244. X    } freespace;
  1245. X    if (path[0] && path[1] == ':')
  1246. X        drive = (toupper(path[0]) - 'A') + 1;
  1247. X    if (Dfree(&freespace,drive)<0) return -1;
  1248. X    return freespace.freal*freespace.bps*freespace.pspal;
  1249. X}
  1250. X
  1251. Xstatic int
  1252. Xfindfirst(path)
  1253. Xchar *path;
  1254. X{
  1255. X    return (Fsfirst(path, 0) == 0);
  1256. X}
  1257. X
  1258. Xstatic int findnext() {
  1259. X    return (Fsnext() == 0);
  1260. X}
  1261. X
  1262. Xstatic char *
  1263. Xgetdta() {
  1264. X    return (char *) Fgetdta();
  1265. X}
  1266. X
  1267. X#  endif /* TOS */
  1268. X
  1269. Xlong
  1270. Xfilesize(file)
  1271. Xchar *file;
  1272. X{
  1273. X#  ifndef OS2
  1274. X    char *dta;
  1275. X#  endif
  1276. X
  1277. X    if (findfirst(file)) {
  1278. X#  ifdef OS2
  1279. X        return  (* (long *) (ResultBuf.cbFileAlloc));
  1280. X#  else
  1281. X        dta = getdta();
  1282. X        return  (* (long *) (dta + 26));
  1283. X#  endif
  1284. X    } else
  1285. X        return -1L;
  1286. X}
  1287. X
  1288. Xvoid
  1289. Xeraseall(path, files)
  1290. Xconst char *path, *files;
  1291. X{
  1292. X#  ifndef OS2
  1293. X    char *dta;
  1294. X#  endif
  1295. X    char buf[PATHLEN];
  1296. X
  1297. X#  ifndef OS2
  1298. X    dta = getdta();
  1299. X#  endif
  1300. X    Sprintf(buf, "%s%s", path, files);
  1301. X    if (findfirst(buf))
  1302. X        do {
  1303. X            Sprintf(buf, "%s%s", path,
  1304. X#  ifdef OS2
  1305. X                ResultBuf.achName
  1306. X#  else
  1307. X                dta + 30
  1308. X#  endif
  1309. X                );
  1310. X            (void) unlink(buf);
  1311. X        } while (findnext());
  1312. X    return;
  1313. X}
  1314. X
  1315. X/* Rewritten for version 3.3 to be faster
  1316. X */
  1317. Xvoid
  1318. Xcopybones(mode)
  1319. Xint mode;
  1320. X{
  1321. X    char from[PATHLEN], to[PATHLEN], last[13];
  1322. X    char *frompath, *topath;
  1323. X#  ifndef OS2
  1324. X    char *dta;
  1325. X#  endif
  1326. X#  ifndef TOS
  1327. X    int status;
  1328. X    char copy[8], *comspec;
  1329. X    extern saveprompt;
  1330. X#  endif
  1331. X
  1332. X    if (!ramdisk)
  1333. X        return;
  1334. X
  1335. X    /* Find the name of the last file to be transferred
  1336. X     */
  1337. X    frompath = (mode != TOPERM) ? permbones : levels;
  1338. X#  ifndef OS2
  1339. X    dta = getdta();
  1340. X#  endif
  1341. X    last[0] = '\0';
  1342. X    Sprintf(from, "%s%s", frompath, allbones);
  1343. X    topath = (mode == TOPERM) ? permbones : levels;
  1344. X#  ifdef TOS
  1345. X    eraseall(topath, allbones);
  1346. X#  endif
  1347. X    if (findfirst(from))
  1348. X        do {
  1349. X#  ifdef TOS
  1350. X            Sprintf(from, "%s%s", frompath, dta+30); 
  1351. X            Sprintf(to, "%s%s", topath, dta+30);
  1352. X            if (_copyfile(from, to))
  1353. X                goto error_copying;
  1354. X#  endif
  1355. X            Strcpy(last,
  1356. X#  ifdef OS2
  1357. X                ResultBuf.achName
  1358. X#  else
  1359. X                dta + 30
  1360. X#  endif
  1361. X                );
  1362. X        } while (findnext());
  1363. X#  ifdef TOS
  1364. X    else
  1365. X        return;
  1366. X#  else
  1367. X    if (last[0]) {
  1368. X        Sprintf(copy, "%cC copy",
  1369. X#   ifdef OS2
  1370. X            '/'
  1371. X#   else
  1372. X            switchar()
  1373. X#   endif
  1374. X            );
  1375. X
  1376. X        /* Remove any bones files in `to' directory.
  1377. X         */
  1378. X        eraseall(topath, allbones);
  1379. X
  1380. X        /* Copy `from' to `to' */
  1381. X        Sprintf(to, "%s%s", topath, allbones);
  1382. X        comspec = getcomspec();
  1383. X        status =spawnl(P_WAIT, comspec, comspec, copy, from,
  1384. X            to, "> nul", NULL);
  1385. X    } else
  1386. X        return;
  1387. X#  endif /* TOS */
  1388. X
  1389. X    /* See if the last file got there.  If so, remove the ramdisk bones
  1390. X     * files.
  1391. X     */
  1392. X    Sprintf(to, "%s%s", topath, last);
  1393. X    if (findfirst(to)) {
  1394. X        if (mode == TOPERM)
  1395. X            eraseall(frompath, allbones);
  1396. X        return;
  1397. X    }
  1398. X
  1399. Xerror_copying:
  1400. X    /* Last file didn't get there.
  1401. X     */
  1402. X    Sprintf(to, "%s%s", topath, allbones);
  1403. X    msmsg("Can't copy \"%s\" to \"%s\" -- ", from, to);
  1404. X#  ifndef TOS
  1405. X    if (status < 0)
  1406. X        msmsg("can't spawn \"%s\"!", comspec);
  1407. X    else
  1408. X#  endif
  1409. X        msmsg((freediskspace(topath) < filesize(from)) ?
  1410. X            "insufficient disk space." : "bad path(s)?");
  1411. X    if (mode == TOPERM) {
  1412. X        msmsg("Bones will be left in \"%s\"\n",
  1413. X            *levels ? levels : hackdir);
  1414. X    } else {
  1415. X        /* Remove all bones files on the RAMdisk */
  1416. X        eraseall(levels, allbones);
  1417. X        playwoRAMdisk();
  1418. X    }
  1419. X    return;
  1420. X}
  1421. X
  1422. X#if 0 /* defined(MSDOS) && !defined(TOS) && !defined(OS2) */
  1423. Xboolean
  1424. Xremoveable_drive(drive)
  1425. Xchar drive;
  1426. X/* check whether current drive is a fixed disk,
  1427. X   so we don't ask the player to insert one */
  1428. X{
  1429. X    union REGS regs;
  1430. X    char *fat_id;
  1431. X
  1432. X    regs.h.ah = FATINFO;
  1433. X    intdos(®s, ®s);
  1434. X    /* also returns size info, as
  1435. X       AL (sectors/cluster) * CX (bytes/sector) * DX (clusters/disk) */
  1436. X#   ifdef MK_FP
  1437. X    fat_id = MK_FP(sregs.ds, regs.x.bx);
  1438. X#   else
  1439. X    FP_OFF(fat_id) = regs.x.bx;
  1440. X    FP_SEG(fat_id) = sregs.ds;
  1441. X#   endif
  1442. X    return (*fat_id != 0xF8);
  1443. X}
  1444. X#endif /* 0 */
  1445. X
  1446. Xvoid
  1447. XplaywoRAMdisk() {
  1448. X    msmsg("Do you wish to play without a RAMdisk? ");
  1449. X
  1450. X    /* Set ramdisk false *before* exit-ing (because msexit calls
  1451. X     * copybones)
  1452. X     */
  1453. X    ramdisk = FALSE;
  1454. X    if (yn() != 'y') {
  1455. X        settty("Be seeing you...\n");
  1456. X        exit(0);
  1457. X    }
  1458. X    set_lock_and_bones();
  1459. X    return;
  1460. X}
  1461. X
  1462. Xint
  1463. XsaveDiskPrompt(start)
  1464. Xint start;
  1465. X{
  1466. X    extern saveprompt;
  1467. X    char buf[BUFSIZ], *bp;
  1468. X    int fd;
  1469. X
  1470. X    if (saveprompt) {
  1471. X        /* Don't prompt if you can find the save file */
  1472. X        if ((fd = open(SAVEF, 0)) >= 0) {
  1473. X            (void) close(fd);
  1474. X            return 1;
  1475. X        }
  1476. X        remember_topl();
  1477. X        home();
  1478. X        cl_end();
  1479. X        msmsg("If save file is on a save disk, insert that disk now.\n");
  1480. X        cl_end();
  1481. X        msmsg("File name (default \"%s\"%s) ? ", SAVEF,
  1482. X            start ? "" : ", <Esc> cancels save");
  1483. X        getlin(buf);
  1484. X        home();
  1485. X        cl_end();
  1486. X        curs(1, 2);
  1487. X        cl_end();
  1488. X        if (!start && *buf == '\033')
  1489. X            return 0;
  1490. X
  1491. X        /* Strip any whitespace. Also, if nothing was entered except
  1492. X         * whitespace, do not change the value of SAVEF.
  1493. X         */
  1494. X        for (bp = buf; *bp; bp++)
  1495. X            if (!isspace(*bp)) {
  1496. X                strncpy(SAVEF, bp, PATHLEN);
  1497. X                break;
  1498. X            }
  1499. X    }
  1500. X    return 1;
  1501. X}
  1502. X
  1503. X/* Return 1 if the record file was found */
  1504. Xstatic boolean
  1505. Xrecord_exists() {
  1506. X    int fd;
  1507. X#  ifdef OS2_CODEVIEW
  1508. X    char tmp[PATHLEN];
  1509. X
  1510. X    Strcpy(tmp,hackdir);
  1511. X    append_slash(tmp);
  1512. X    Strcat(tmp,RECORD);
  1513. X    if ((fd = open(tmp, 0)) >= 0) {
  1514. X#  else
  1515. X    if ((fd = open(RECORD, 0)) >= 0) {
  1516. X#  endif
  1517. X        (void) close(fd);
  1518. X        return TRUE;
  1519. X    }
  1520. X    return FALSE;
  1521. X}
  1522. X
  1523. X#  ifdef TOS
  1524. X#define comspec_exists() 1
  1525. X#  else
  1526. X/* Return 1 if the comspec was found */
  1527. Xstatic boolean
  1528. Xcomspec_exists() {
  1529. X    int fd;
  1530. X    char *comspec;
  1531. X
  1532. X    if (comspec = getcomspec())
  1533. X        if ((fd = open(comspec, 0)) >= 0) {
  1534. X            (void) close(fd);
  1535. X            return TRUE;
  1536. X        }
  1537. X    return FALSE;
  1538. X}
  1539. X#  endif
  1540. X
  1541. X/* Prompt for game disk, then check for record file.
  1542. X */
  1543. Xvoid
  1544. XgameDiskPrompt() {
  1545. X    extern int saveprompt;
  1546. X
  1547. X    if (saveprompt) {
  1548. X        if (record_exists() && comspec_exists())
  1549. X            return;
  1550. X        (void) putchar('\n');
  1551. X        getreturn("when the game disk has been inserted");
  1552. X    }
  1553. X    if (comspec_exists() && record_exists())
  1554. X        return;
  1555. X
  1556. X    if (!comspec_exists())
  1557. X        msmsg("\n\nWARNING: can't find command processor \"%s\"!\n", getcomspec());
  1558. X        if (!record_exists())
  1559. X        msmsg("\n\nWARNING: can't find record file \"%s\"!\n", RECORD);
  1560. X    msmsg("If the game disk is not in, insert it now.\n");
  1561. X    getreturn("to continue");
  1562. X    return;
  1563. X}
  1564. X
  1565. X# endif /* DGK */
  1566. X
  1567. X/* Read configuration */
  1568. Xvoid
  1569. Xread_config_file() {
  1570. X# ifdef DGK
  1571. X    char    tmp_ramdisk[PATHLEN];
  1572. X    extern    int saveprompt;
  1573. X# else
  1574. X#define fopenp fopen
  1575. X# endif
  1576. X    char    tmp_levels[PATHLEN];
  1577. X    char    buf[BUFSZ], *bufp;
  1578. X    FILE    *fp;
  1579. X    extern    char plname[];
  1580. X
  1581. X# ifdef DGK
  1582. X    tmp_ramdisk[0] = 0;
  1583. X# endif
  1584. X    tmp_levels[0] = 0;
  1585. X    if ((fp = fopenp(configfile, "r")) == (FILE *)0) {
  1586. X        msmsg("Warning: no configuration file!\n");
  1587. X        getreturn("to continue");
  1588. X        return;
  1589. X    }
  1590. X    while (fgets(buf, BUFSZ, fp)) {
  1591. X        if (*buf == '#')
  1592. X            continue;
  1593. X
  1594. X        /* remove trailing whitespace
  1595. X         */
  1596. X        bufp = index(buf, '\n');
  1597. X        while (bufp > buf && isspace(*bufp))
  1598. X            bufp--;
  1599. X        if (bufp == buf)
  1600. X            continue;        /* skip all-blank lines */
  1601. X        else
  1602. X            *(bufp + 1) = 0;    /* 0 terminate line */
  1603. X
  1604. X        /* find the '=' */
  1605. X        if (!(bufp = strchr(buf, '='))) {
  1606. X            msmsg("Bad option line: \"%s\"\n", buf);
  1607. X            getreturn("to continue");
  1608. X            continue;
  1609. X        }
  1610. X        
  1611. X        /* skip  whitespace between '=' and value */
  1612. X        while (isspace(*++bufp))
  1613. X            ;
  1614. X
  1615. X        /* Go through possible variables */
  1616. X        if (!strncmp(buf, "HACKDIR", 4)) {
  1617. X            strncpy(hackdir, bufp, PATHLEN);
  1618. X        
  1619. X# ifdef DGK
  1620. X        } else if (!strncmp(buf, "RAMDISK", 3)) {
  1621. X            strncpy(tmp_ramdisk, bufp, PATHLEN);
  1622. X# endif
  1623. X
  1624. X        } else if (!strncmp(buf, "LEVELS", 4)) {
  1625. X            strncpy(tmp_levels, bufp, PATHLEN);
  1626. X
  1627. X        } else if (!strncmp(buf, "OPTIONS", 4)) {
  1628. X            parseoptions(bufp, TRUE);
  1629. X            if (plname[0])        /* If a name was given */
  1630. X                plnamesuffix();    /* set the character class */
  1631. X
  1632. X        } else if (!strncmp(buf, "SAVE", 4)) {
  1633. X# ifdef DGK
  1634. X            char *ptr;
  1635. X            if (ptr = index(bufp, ';')) {
  1636. X                *ptr = '\0';
  1637. X                if (*(ptr+1) == 'n' || *(ptr+1) == 'N')
  1638. X                    saveprompt = FALSE;
  1639. X            }
  1640. X# endif /* DGK */
  1641. X            (void) strncpy(SAVEF, bufp, PATHLEN);
  1642. X            (void) strncpy(SAVEP, bufp, PATHLEN);
  1643. X            append_slash(SAVEF);
  1644. X            append_slash(SAVEP);
  1645. X        } else if (!strncmp(buf, "GRAPHICS", 4)) {
  1646. X            unsigned int translate[MAXPCHARS+1];
  1647. X            int lth;
  1648. X#ifdef OVERLAY
  1649. X            /* THIS is what I call a stupid hack, but MSC cannot survive
  1650. X               the overlays without it (TH) */
  1651. X            lth = sscanf(bufp,
  1652. X    "%d%d%d%d%d%d%d%d%d%d%d%d",
  1653. X                &translate[0], &translate[1], &translate[2],
  1654. X                &translate[3], &translate[4], &translate[5],
  1655. X                &translate[6], &translate[7], &translate[8],
  1656. X                &translate[9], &translate[10], &translate[11]);
  1657. X            lth += sscanf(bufp,
  1658. X    "%*d%*d%*d%*d%*d%*d%*d%*d%*d%*d%*d%*d%d%d%d%d%d%d%d%d%d%d%d%d",
  1659. X                &translate[12], &translate[13], &translate[14],
  1660. X                &translate[15], &translate[16], &translate[17],
  1661. X                &translate[18], &translate[19], &translate[20],
  1662. X                &translate[21], &translate[22], &translate[23]);
  1663. X            lth += sscanf(bufp,
  1664. X    "%*d%*d%*d%*d%*d%*d%*d%*d%*d%*d%*d%*d%*d%*d%*d%*d%*d%*d%*d%*d%*d%*d%*d%*d%d%d%d%d%d%d%d%d%d%d%d",
  1665. X                &translate[24], &translate[25], &translate[26],
  1666. X                &translate[27], &translate[28], &translate[29],
  1667. X                &translate[30], &translate[31], &translate[32],
  1668. X                &translate[33], &translate[34]);
  1669. X#else
  1670. X             lth = sscanf(bufp,
  1671. X    "%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d",
  1672. X                &translate[0], &translate[1], &translate[2],
  1673. X                &translate[3], &translate[4], &translate[5],
  1674. X                &translate[6], &translate[7], &translate[8],
  1675. X                &translate[9], &translate[10], &translate[11],
  1676. X                &translate[12], &translate[13], &translate[14],
  1677. X                &translate[15], &translate[16], &translate[17],
  1678. X                &translate[18], &translate[19], &translate[20],
  1679. X                &translate[21], &translate[22], &translate[23],
  1680. X                &translate[24], &translate[25], &translate[26],
  1681. X                &translate[27], &translate[28], &translate[29],
  1682. X                &translate[30], &translate[31], &translate[32],
  1683. X                &translate[33], &translate[34]);
  1684. X#endif /* OVERLAY */
  1685. X            if (lth <= 0) {
  1686. X                msmsg ("Syntax error in GRAPHICS\n");
  1687. X                getreturn("to continue");
  1688. X            }
  1689. X            assign_graphics(translate, lth);
  1690. X        } else {
  1691. X            msmsg("Bad option line: \"%s\"\n", buf);
  1692. X            getreturn("to continue");
  1693. X        }
  1694. X    }
  1695. X    (void) fclose(fp);
  1696. X
  1697. X# ifdef DGK
  1698. X    Strcpy(permbones, tmp_levels);
  1699. X    if (tmp_ramdisk[0]) {
  1700. X        Strcpy(levels, tmp_ramdisk);
  1701. X        if (strcmp(permbones, levels))        /* if not identical */
  1702. X            ramdisk = TRUE;
  1703. X    } else
  1704. X# endif /* DGK */
  1705. X        Strcpy(levels, tmp_levels);
  1706. X    Strcpy(bones, levels);
  1707. X    return;
  1708. X}
  1709. X
  1710. X# ifdef DGK
  1711. X/* Set names for bones[] and lock[]
  1712. X */
  1713. Xvoid
  1714. Xset_lock_and_bones() {
  1715. X    if (!ramdisk) {
  1716. X        Strcpy(levels, permbones);
  1717. X        Strcpy(bones, permbones);
  1718. X    }
  1719. X    append_slash(permbones);
  1720. X    append_slash(levels);
  1721. X    append_slash(bones);
  1722. X    Strcat(bones, allbones);
  1723. X    Strcpy(lock, levels);
  1724. X    Strcat(lock, alllevels);
  1725. X    return;
  1726. X}
  1727. X# endif /* DGK */
  1728. X
  1729. X/* Add a backslash to any name not ending in /, \ or :   There must
  1730. X * be room for the \
  1731. X */
  1732. Xvoid
  1733. Xappend_slash(name)
  1734. Xchar *name;
  1735. X{
  1736. X    char *ptr;
  1737. X
  1738. X    if (!*name)
  1739. X        return;
  1740. X    ptr = name + (strlen(name) - 1);
  1741. X    if (*ptr != '\\' && *ptr != '/' && *ptr != ':') {
  1742. X        *++ptr = '\\';
  1743. X        *++ptr = '\0';
  1744. X    }
  1745. X    return;
  1746. X}
  1747. X
  1748. Xvoid
  1749. Xgetreturn(str)
  1750. Xconst char *str;
  1751. X{
  1752. X# ifdef TOS
  1753. X    msmsg("Hit <Return> %s.", str);
  1754. X# else
  1755. X    msmsg("Hit <Enter> %s.", str);
  1756. X# endif
  1757. X    while (Getchar() != '\n') ;
  1758. X    return;
  1759. X}
  1760. X
  1761. Xvoid
  1762. Xmsmsg VA_DECL(const char *, fmt)
  1763. X    VA_START(fmt);
  1764. X    VA_INIT(fmt, const char *);
  1765. X    Vprintf(fmt, VA_ARGS);
  1766. X    flushout();
  1767. X    VA_END();
  1768. X    return;
  1769. X}
  1770. X
  1771. X/* Chdrive() changes the default drive.
  1772. X */
  1773. X# ifndef __TURBOC__
  1774. X#  ifndef OS2
  1775. X#define SELECTDISK    0x0E
  1776. X#  endif
  1777. Xvoid
  1778. Xchdrive(str)
  1779. Xchar *str;
  1780. X{
  1781. X    char *ptr;
  1782. X#  ifndef TOS
  1783. X#   ifndef OS2
  1784. X    union REGS inregs;
  1785. X#   endif
  1786. X#  endif
  1787. X    char drive;
  1788. X
  1789. X    if ((ptr = index(str, ':')) != NULL) {
  1790. X        drive = toupper(*(ptr - 1));
  1791. X#  ifdef TOS
  1792. X        (void)Dsetdrv(drive - 'A');
  1793. X#  else
  1794. X#   ifdef OS2
  1795. X        DosSelectDisk((USHORT)(drive - 'A' + 1));
  1796. X#   else
  1797. X        inregs.h.ah = SELECTDISK;
  1798. X        inregs.h.dl = drive - 'A';
  1799. X        intdos(&inregs, &inregs);
  1800. X#   endif
  1801. X#  endif
  1802. X    }
  1803. X    return;
  1804. X}
  1805. X# else
  1806. Xextern int setdisk(int);
  1807. X
  1808. Xvoid
  1809. Xchdrive(str)
  1810. Xchar *str;
  1811. X{
  1812. X    if (str[1] == ':')
  1813. X        (void)setdisk((int)(toupper(str[0]) - 'A'));
  1814. X    return;
  1815. X}
  1816. X# endif
  1817. X
  1818. X# ifndef TOS
  1819. X/* Use the IOCTL DOS function call to change stdin and stdout to raw
  1820. X * mode.  For stdin, this prevents MSDOS from trapping ^P, thus
  1821. X * freeing us of ^P toggling 'echo to printer'.
  1822. X * Thanks to Mark Zbikowski (markz@microsoft.UUCP).
  1823. X */
  1824. X
  1825. X#  ifndef OS2
  1826. X#define DEVICE        0x80
  1827. X#define RAW        0x20
  1828. X#define IOCTL        0x44
  1829. X#define STDIN        fileno(stdin)
  1830. X#define STDOUT        fileno(stdout)
  1831. X#define GETBITS        0
  1832. X#define SETBITS        1
  1833. X#  endif
  1834. X
  1835. Xstatic unsigned    int old_stdin, old_stdout;
  1836. X
  1837. Xvoid
  1838. Xdisable_ctrlP() {
  1839. X#  ifdef OS2
  1840. X    KBDINFO KbdInfo;
  1841. X    HKBD KbdHandle = 0;
  1842. X#  endif
  1843. X
  1844. X#  ifdef DGK
  1845. X    if (!flags.rawio) return;
  1846. X#  endif
  1847. X#  ifdef OS2
  1848. X    KbdInfo.cb = sizeof(KbdInfo);
  1849. X    KbdGetStatus(&KbdInfo,KbdHandle);
  1850. X    KbdInfo.fsMask &= 0xFFF7; /* ASCII off */
  1851. X    KbdInfo.fsMask |= 0x0004; /* BINARY on */
  1852. X    KbdSetStatus(&KbdInfo,KbdHandle);
  1853. X#  else
  1854. X    old_stdin = ioctl(STDIN, GETBITS, 0);
  1855. X    old_stdout = ioctl(STDOUT, GETBITS, 0);
  1856. X    if (old_stdin & DEVICE)
  1857. X        ioctl(STDIN, SETBITS, old_stdin | RAW);
  1858. X    if (old_stdout & DEVICE)
  1859. X        ioctl(STDOUT, SETBITS, old_stdout | RAW);
  1860. X#  endif /* OS2 */
  1861. X    return;
  1862. X}
  1863. X
  1864. Xvoid
  1865. Xenable_ctrlP() {
  1866. X#  ifdef OS2
  1867. X    KBDINFO KbdInfo;
  1868. X    HKBD KbdHandle = 0;
  1869. X#  endif
  1870. X
  1871. X#  ifdef DGK
  1872. X    if (!flags.rawio) return;
  1873. X#  endif
  1874. X#  ifdef OS2
  1875. X    KbdInfo.cb = sizeof(KbdInfo);
  1876. X    KbdGetStatus(&KbdInfo,KbdHandle);
  1877. X    KbdInfo.fsMask &= 0xFFFB; /* BINARY off */
  1878. X    KbdInfo.fsMask |= 0x0008; /* ASCII on */
  1879. X    KbdSetStatus(&KbdInfo,KbdHandle);
  1880. X#  else
  1881. X    if (old_stdin)
  1882. X        (void) ioctl(STDIN, SETBITS, old_stdin);
  1883. X    if (old_stdout)
  1884. X        (void) ioctl(STDOUT, SETBITS, old_stdout);
  1885. X#  endif
  1886. X    return;
  1887. X}
  1888. X
  1889. X#  ifndef OS2
  1890. Xstatic unsigned int
  1891. Xioctl(handle, mode, setvalue)
  1892. Xint handle, mode;
  1893. Xunsigned setvalue;
  1894. X{
  1895. X    union REGS regs;
  1896. X
  1897. X    regs.h.ah = IOCTL;
  1898. X    regs.h.al = mode;
  1899. X    regs.x.bx = handle;
  1900. X    regs.h.dl = setvalue;
  1901. X    regs.h.dh = 0;            /* Zero out dh */
  1902. X    intdos(®s, ®s);
  1903. X    return (regs.x.dx);
  1904. X}
  1905. X#  endif /* OS2 */
  1906. X# endif /* TOS */
  1907. X
  1908. X# ifdef DGK
  1909. X/* Follow the PATH, trying to fopen the file.
  1910. X */
  1911. X#  ifdef TOS
  1912. X#define PATHSEP    ','
  1913. X#  else
  1914. X#define PATHSEP    ';'
  1915. X#  endif
  1916. X
  1917. XFILE *
  1918. Xfopenp(name, mode)
  1919. Xconst char *name, *mode;
  1920. X{
  1921. X    char buf[BUFSIZ], *bp, *pp, lastch = 0;
  1922. X    FILE *fp;
  1923. X
  1924. X    /* Try the default directory first.  Then look along PATH.
  1925. X     */
  1926. X    Strcpy(buf, name);
  1927. X    if (fp = fopen(buf, mode))
  1928. X        return fp;
  1929. X    else {
  1930. X        pp = getenv("PATH");
  1931. X        while (pp && *pp) {
  1932. X            bp = buf;
  1933. X            while (*pp && *pp != PATHSEP)
  1934. X                lastch = *bp++ = *pp++;
  1935. X            if (lastch != '\\' && lastch != '/')
  1936. X                *bp++ = '\\';
  1937. X            Strcpy(bp, name);
  1938. X            if (fp = fopen(buf, mode))
  1939. X                return fp;
  1940. X            if (*pp)
  1941. X                pp++;
  1942. X        }
  1943. X    }
  1944. X#  ifdef OS2_CODEVIEW /* one more try for hackdir */
  1945. X    Strcpy(buf,hackdir);
  1946. X    append_slash(buf);
  1947. X    Strcat(buf,name);
  1948. X    if(fp = fopen(buf,mode))
  1949. X        return fp;
  1950. X#  endif
  1951. X    return (FILE *)0;
  1952. X}
  1953. X# endif /* DGK */
  1954. X
  1955. X/* Chdir back to original directory
  1956. X */
  1957. X#undef exit
  1958. X# ifdef TOS
  1959. Xextern boolean run_from_desktop;    /* set in pcmain.c */
  1960. X# endif
  1961. X
  1962. Xvoid exit(int);
  1963. Xvoid
  1964. Xmsexit(code)
  1965. Xint code;
  1966. X{
  1967. X# ifdef CHDIR
  1968. X    extern char orgdir[];
  1969. X# endif
  1970. X
  1971. X    flushout();
  1972. X# ifndef TOS
  1973. X    enable_ctrlP();        /* in case this wasn't done */
  1974. X# endif
  1975. X# ifdef DGK
  1976. X    if (ramdisk) copybones(TOPERM);
  1977. X# endif
  1978. X# ifdef CHDIR
  1979. X    chdir(orgdir);        /* chdir, not chdirx */
  1980. X    chdrive(orgdir);
  1981. X# endif
  1982. X# ifdef TOS
  1983. X    if (run_from_desktop)
  1984. X        getreturn("to continue"); /* so the user can read the score list */
  1985. X#  ifdef TEXTCOLOR
  1986. X    if (flags.IBMBIOS && flags.use_color)
  1987. X        restore_colors();
  1988. X#  endif
  1989. X# endif
  1990. X    exit(code);
  1991. X    return;
  1992. X}
  1993. X
  1994. X#  ifdef DGK        /* for flags.IBMBIOS */
  1995. Xvoid
  1996. Xget_scr_size()
  1997. X{
  1998. X#   ifdef OS2
  1999. X    VIOMODEINFO ModeInfo;
  2000. X    HVIO VideoHandle = 0;
  2001. X
  2002. X    ModeInfo.cb = sizeof(ModeInfo);
  2003. X
  2004. X    (void) VioGetMode(&ModeInfo,VideoHandle);
  2005. X
  2006. X    CO = ModeInfo.col;
  2007. X    LI = ModeInfo.row;
  2008. X#   else
  2009. X#    ifndef TOS
  2010. X    union REGS regs;
  2011. X
  2012. X    if (!flags.IBMBIOS) {        /* assume standard screen size */
  2013. X        CO = 80;
  2014. X        LI = 24;
  2015. X        return;
  2016. X    }
  2017. X
  2018. X    regs.x.ax = FONTINFO;
  2019. X    regs.x.bx = 0;            /* current ROM BIOS font */
  2020. X    regs.h.dl = 24;            /* default row count */
  2021. X                    /* in case no EGA/MCGA/VGA */
  2022. X    int86(VIDEO_BIOS, ®s, ®s); /* Get Font Information */
  2023. X
  2024. X    /* MDA/CGA/PCjr ignore INT 10h, Function 11h, but since we
  2025. X     * cleverly loaded up DL with the default, everything's fine.
  2026. X     *
  2027. X     * Otherwise, DL now contains rows - 1.  Also, CX contains the
  2028. X     * points (bytes per character) and ES:BP points to the font
  2029. X     * table.  -3.
  2030. X     */
  2031. X
  2032. X    regs.h.ah = GETMODE;
  2033. X    int86(VIDEO_BIOS, ®s, ®s); /* Get Video Mode */
  2034. X
  2035. X    /* This goes back all the way to the original PC.  Completely
  2036. X     * safe.  AH contains # of columns, AL contains display mode,
  2037. X     * and BH contains the active display page.
  2038. X     */
  2039. X
  2040. X    LI = regs.h.dl + 1;
  2041. X    CO = regs.h.ah;
  2042. X#    else  /* TOS */
  2043. X    init_aline();
  2044. X    LI = (*((WORD  *)(_a_line + -42L))) + 1;
  2045. X    CO = (*((WORD  *)(_a_line + -44L))) + 1;
  2046. X#    endif /* TOS */
  2047. X#   endif /* OS2 */
  2048. X}
  2049. X
  2050. X#   ifndef TOS
  2051. Xvoid
  2052. Xgotoxy(x,y)
  2053. Xint x,y;
  2054. X{
  2055. X#    ifdef OS2
  2056. X    HVIO VideoHandle = 0;
  2057. X
  2058. X    x--; y--;            /* (0,0) is upper right corner */
  2059. X
  2060. X    (void) VioSetCurPos(x, y, VideoHandle);
  2061. X#    else
  2062. X    union REGS regs;
  2063. X
  2064. X    x--; y--;            /* (0,0) is upper right corner */
  2065. X
  2066. X    regs.h.ah = SETCURPOS;
  2067. X    regs.h.bh = 0;            /* display page */
  2068. X    regs.h.dh = y;            /* row */
  2069. X    regs.h.dl = x;            /* column */
  2070. X    int86(VIDEO_BIOS, ®s, ®s); /* Set Cursor Position */
  2071. X
  2072. X    /* This, too, goes back all the way to the original PC.  If
  2073. X     * we ever get so fancy as to swap display pages (i doubt it),
  2074. X     * then we'll need to set BH appropriately.  This function
  2075. X     * returns nothing.  -3.
  2076. X     */
  2077. X#    endif /* OS2 */
  2078. X}
  2079. X#   endif /* TOS */
  2080. X#  endif /* DGK */
  2081. X
  2082. X#endif /* MSDOS */
  2083. X
  2084. X
  2085. X#ifdef TOS
  2086. X# define BIGBUF  8192
  2087. X
  2088. Xint
  2089. X_copyfile(from, to)
  2090. Xchar *from, *to;
  2091. X{
  2092. X    int fromfd, tofd, r;
  2093. X    char *buf;
  2094. X
  2095. X    if ((fromfd = open(from, O_RDONLY|O_BINARY, 0)) < 0)
  2096. X        return -1;
  2097. X    if ((tofd = open(to, O_WRONLY|O_CREAT|O_TRUNC|O_BINARY, FCMASK)) < 0)
  2098. X        return -1;
  2099. X    if (!(buf = (char *)malloc((size_t)BIGBUF)))
  2100. X        return -1;
  2101. X    while ( (r = read(fromfd, buf, BIGBUF)) > 0)
  2102. X        write(tofd, buf, r);
  2103. X    close(fromfd);
  2104. X    close(tofd);
  2105. X    free(buf);
  2106. X    return 0;    /* successful */
  2107. X}
  2108. X
  2109. Xint kbhit()
  2110. X{
  2111. X    return Cconis();
  2112. X}
  2113. X
  2114. Xstatic void
  2115. Xinit_aline()
  2116. X{
  2117. X# ifdef __GNUC__
  2118. X    asm(" .word 0xa000; movel d0, __a_line");
  2119. X# else
  2120. X    asm(" .dc.w 0xa000");    /* tweak as necessary for your compiler */
  2121. X    asm(" move.l d0, __a_line");
  2122. X# endif
  2123. X}
  2124. X
  2125. X# ifdef TEXTCOLOR
  2126. Xstatic unsigned orig_color[4] = {-1, -1, -1, -1};
  2127. Xstatic unsigned new_color[4] = { 0x0, 0x730, 0x047, 0x555 };
  2128. Xstatic int numcolors = 2;
  2129. X
  2130. Xvoid set_colors()
  2131. X{
  2132. X    int i;
  2133. X    char *s;
  2134. X    static char newhe[] = "\033q\033b\017\033c0";
  2135. X
  2136. X    init_aline();
  2137. X    numcolors = 1 << (((unsigned char *) _a_line)[1]);
  2138. X    if (numcolors == 2) {            /* mono */
  2139. X        flags.use_color = FALSE;
  2140. X        return;
  2141. X    }
  2142. X    else if (numcolors == 4) {
  2143. X        for (i = 0; i < 4; i++)
  2144. X            orig_color[i] = Setcolor(i, new_color[i]);
  2145. X    }
  2146. X    else {
  2147. X        orig_color[0] = Setcolor(0, new_color[0]);
  2148. X        orig_color[1] = Setcolor(15, 0x777);
  2149. X        hilites[0] = "";
  2150. X        for (i = 1; i < 16; i++) {
  2151. X            s = (char *) alloc(sizeof("\033b0"));
  2152. X            sprintf(s, "\033b%c", '0'+i);
  2153. X            hilites[i] = s;
  2154. X        }
  2155. X        HE = newhe;
  2156. X    }
  2157. X}
  2158. X
  2159. Xvoid restore_colors()
  2160. X{
  2161. X    int i;
  2162. X
  2163. X    if (numcolors == 2)
  2164. X        return;
  2165. X    else if (numcolors == 4)
  2166. X        for (i = 0; i < 4; i++)
  2167. X            (void) Setcolor(i, orig_color[i]);
  2168. X    else {
  2169. X        (void) Setcolor(0, orig_color[0]);
  2170. X        (void) Setcolor(15, orig_color[1]);
  2171. X    }
  2172. X}
  2173. X# endif /* TEXTCOLOR */
  2174. X#endif /* TOS */
  2175. END_OF_FILE
  2176. if test 29447 -ne `wc -c <'others/msdos.c'`; then
  2177.     echo shar: \"'others/msdos.c'\" unpacked with wrong size!
  2178. fi
  2179. # end of 'others/msdos.c'
  2180. if test -f 'others/ovlmgr.uu' -a "${1}" != "-c" ; then 
  2181.   echo shar: Renaming existing file \"'others/ovlmgr.uu'\" to \"'others/ovlmgr.uu.orig'\"
  2182.   mv -f 'others/ovlmgr.uu' 'others/ovlmgr.uu.orig'
  2183. fi
  2184. echo shar: Extracting \"'others/ovlmgr.uu'\" \(5497 characters\)
  2185. sed "s/^X//" >'others/ovlmgr.uu' <<'END_OF_FILE'
  2186. Xbegin 660 ovlmgr.obj
  2187. XM@ P "F]V;&UG<BYA<VUDEA4   904U!314<&3U9,5$),!$-/1$6%F H     
  2188. XM "P  @$!+I@*       0  ,! 4F8!P!HHPX$ 0%"C$8 !R0D24Y43D\ "20D
  2189. XM3U9,0D%310 *)"1-4$=33D]63  +)"1-4$=33D)!4T4 !B0D34%)3@ &)"1#
  2190. XM1U-.  8D)$-/5DP T9 0   #"20D3U9,24Y)5' & '&(!   H@'1H!(  @  
  2191. XM                  !,H"@  P            #_______________\     
  2192. XM                0: &  ,D!   +YP( ,0   ,#)@1HHF8  Z8% 0    )-
  2193. XM6@$    "   !     @   0    (   $    "   !     @   0    (   $ 
  2194. XM   "   !     @   0    (   $    "   !     @   0    (   $    "
  2195. XM  !YH  $ \(%  T*3F]T(&5N;W5G:"!M96UO<GD@=&\@<G5N('1H:7,@<')O
  2196. XM9W)A;2X@5&EM92!T;R!G;R!T;R!T:&4@<W1O<F4N#0H') T*66]U<B!D;V<@
  2197. XM96%T<R!A;&P@>6]U<B!R96UA:6YI;F<@;65M;W)Y(2!9;W4@9&EE+@T*!R0-
  2198. XM"E1H92!.>6UP:"!S=&]L92!Y;W5R("Y%6$4@9FEL92$@66]U(&1I92X-"@<D
  2199. XM#0HD4%-14E9751X&C-@%$  NHP  CAX  +[__T:#/ !U^H/&!+  M#V+ULTA
  2200. XM<PBP!;H  .D  "ZC  "X   NHP  NP )M$C-(7,#Z0  CL"T2+O__\TAM$C-
  2201. XM(7,#Z0  +J,  +@  ([8BPX  "Z)#@  BPX  "Z)#@  *]ES ^D  %.T2<TA
  2202. XM<P/I   S[3/_,_;H   NH0  +@,&  ".P#/ )J,  ":C   FHP  )J(  "ZA
  2203. XM  #1X-'@T>#1X-'@+HL6   +TG0.T>K1ZM'JT>I"+2   \(FHP  +BL&   N
  2204. XM@SX   !T"SO'<@>+^":+-@  )HDN   N RX  (O5BLZ*\C+M,M+1XM'1L "T
  2205. XM0LTA+J$  $@N.P8  '0#Z0  5BZA  ".P"Z+-@  +@,V   FQ@8    FB38"
  2206. XM ";'!@0    FB3X(  /X+HD^  ".QB;&!@   ";'!@(    FHP0 7ELFB1X(
  2207. XM "ZC   NQP8     +L<&     +@  "ZC  "+^"['!?__@\<&+J$  "Z)!2Z)
  2208. XM/@  CL FQ@8   =&.]YS"+ %N@  Z0  N   CMBT-:   "ZB  #-(2Z)'@  
  2209. XM+HP&  "T-; AS2$NB1X  "Z,!@  M"4NH   C,N.V[H  ,TAM"6P(8S+CMNZ
  2210. XM  #-(2Z+#@  N   CL",R([8NP  O@  OP  )HH$,N0#!@  B04FBP<K!@  
  2211. XMB44"@\<$@\,"1N+B!Q]=7UY:65M8Z@     NB1X  "Z,!@  6P=05B:+1P$N
  2212. XMHP  ,N0FB@>#PP,NBS8  "Z,1 (NB5P$B]C1X]'C@<,  "Z.!RZ+1P(NC$0&
  2213. XM+H,&   &+HLV  !&+HDV   FB38  "Z+-@  ='LFB38  ";V!@   71W)@,&
  2214. XM   NHP  +HL>   NC@8  %Y8G2[_'@  G"Z,!@  +HD>   NBQX  "Z.1_HN
  2215. XM_W?\+O]W_E$NBPX  $$NB0X  ":)#@  +HL.  !T+2:)#@  )O8&   !="@N
  2216. XM@RX   8NBQX  "Z.!@  6<]&+HDV  #I  #H  #KA$$NB0X  .O+Z   Z]-0
  2217. XM4U%25E=5'@;H   F]@8   1U"B:A  #H  #K!)#H   FHP  !0$ )IS& L2^
  2218. XM  ,#'@#$P@ ! 2P Q-T  P,_!H3@  ,#2 [$Y  # Q  R.<F @+$ZP # Q@ 
  2219. XMA/<  P,2"(4)  ,#$@C%#0 # Q( R1 F!P?%%B8&!L4;  ,#%@#%'R8'!\4D
  2220. XM  ,#% "%*P # Q((A34  P,2"(4^  ,#) [%0@ # Q( Q4<  P/ !<5/  ("
  2221. XM! #%4P " @8 Q5<  @(( ,5;! ("Q5\  P.J!<5N  ,#J 7%A  " @P Q8D 
  2222. XM P.N!<6.  ,#P 7%G  " @P Q:$  @(* ,6F  ,#J@7%O@ # Q0 Q<0  P/ 
  2223. XM!87)  ,#_P;%S@ # Q@ Q=4  P,2 ,7:  ,#% #%^  # QH QA8  P,< ,8;
  2224. XM! ,#QB(  P," ,8G  ,#)@3&*P # R0$QCD  P,2 ,9!  ,#) 3&2 0" L93
  2225. XM  ,#PP6&5@ # T@.REDF 0'&8"8! <9D  ,#P@7&:P # P@ QG   P,* ,9[
  2226. XM  ,## #&@  # PX QH8  P/"!<:-  ,#HPC&F@ # _@*QJ$  P,6 ,JD)@0$
  2227. XMQJTF! 3&L"8# \:S  ,#) #&O  # Q( QL4  P,8 ,[=)@4%QN0  P,@ ,;I
  2228. XM  ,#(@#&]0 # P0 QP(  P,D!,<4  ,#) #')  # R0$QRH$ P/', 0# \<U
  2229. XM  ("! #'.@ # P( QT$  @(& ,=&! ("QTX  @(( ,=2  ,#!@#'5P # R  
  2230. XMQUP  P,B ,=D  ,#! #':@ # R( QV\  P,@ ,=T  ,#) 3'A@0# \>,! ,#
  2231. XMQY$  @($ ,>6  ,# @#'G0 " @8 QZ($ @+'J@ # R0$Q[   P,@ ,>U  ,#
  2232. XM(@#'O0 # P( A\   P, "8?#  ,#E@G'RP # P( A]   P.6"8?>  ,#P@K'
  2233. XMXP0" L?J  ("# "'[0 # Z$,A_,  P,Q#,?W  (" @!6H/\# [X)CM@FBQ8 
  2234. XM (K.BO(R[3+2T>+1T;1"L  NBQX  ,TA<B@STB:+#@  T>'1X='AT>&T/\TA
  2235. XM<A/H   ')H .   !'UU?7EI96UC#L 6Z  #I  "+#@8 C-@#!@@ )J,  (OX
  2236. XM+BL^  "+-A@ XRJMB]BM+@,&   #QX[ )HL'+@,&   N.P8  '()+CL&  !S
  2237. XM @/')HD'XM;#4U%25E=5'BZ.'@  ,\"+T(OHB]@NBPX  /:'   !="GVAP  
  2238. XM G4B+HLV   NBSX  "NW   ;OP  .]=R!G4*.\9S!HO&B]>+ZX/#$.++"^UU
  2239. XM"+ %N@  Z0  T>W1[='MT>V,V /%'UU?7EI96\,&+HX&   NBPX  #/;)H"G
  2240. XM  #[@\,0XO4NBQX  (/K!NL,D"Z.'X .   $@^L&+H,__W7O!\. _$MT%8#\
  2241. XM3'0%+O\N  !86%BP +H  .D   K =>Q04U%25E=5!AXNH0  ZQV.V"X[!@  
  2242. XM<A'V!@   70*C@8& ": )@  _J$"  O ==\NH0  +@,&  ".P";'!@@  @ F
  2243. XMQP8"    )L8&    +HL6   NCAX  +0EL"'-(2Z+%@  +HX>  "T)2Z@  #-
  2244. XM(2Z.!@  +HL>  "#PP*T2LTAB^S_=A:='P==7UY:65M8S2%04U%25E=5!AZ+
  2245. XM[)R/1A;H  "T-; AS2$NB1X  "Z,!@  M"6P(8S+CMNZ  #-(;0U+J   ,TA
  2246. XM+HD>   NC 8  +0E+J   (S+CMNZ  #-(1\'75]>6EE;6,\&M$HNC@8  +O_
  2247. XM_\TAM$HNC@8  %/-(2ZA   N P8  ([ 6"XK!@  )J,(  ?#)HL>   NH0  
  2248. XMZU>0CM@[V',4B],F Q8  (/" 3O"<S_H  #K#) #!@@ .]AS,>@  (S8.]AR
  2249. XM*(O3)@,6  "#P@$#!@@ .\)R%HS8B\LKR'0#Z   )HL.  "#P0'K+9"A @ +
  2250. XMP'0"ZZ2P!;H  .D  (O(@\$!Z   .]%S#.@  .@  #D." !R].L!D : #@  
  2251. XM 8S8 \&.P*$( "O!/0$ <C6)#@@ )J,( *$" ":C @",!@( )HP>!  FQ@8 
  2252. XM   >)J$"  O = :.V(P&! ",P([8Z   'P>,!@8 C-C#!HS8 \&.P*$( "O!
  2253. XMB0X( ":C" "A @ FHP( C 8" ":,'@0 Q@8    F@ X   $FH0( "\!T"!Z.
  2254. XMV(P&!  ?Z   C,".V >,!@8 C-C#+J$  #/2ZQB0CMCV!@   74+.0X( '(%
  2255. XMBQ8( ,.A @ +P'7EP_8&   != P&C@8& ": )@  _@?K$)".V( F  #^H0  
  2256. XMCMCK 9 &@"8  /ZA!  +P'0RCL F]@:WG ,"Q 4  @(* ,0:  ,#$ #$)0 "
  2257. XM @P A#8  P,."L0\! ("Q$L  P,_!H1.  ,#2 [$7  " @@ Q&,  P,8 ,1R
  2258. XM  ,#'@#$?@ # QX Q(,  P,8 ,2*  ,#&@#$H  # Q( Q*T  P,4 ,2Q! ("
  2259. XMQ+@$ @+$P 0# \3%  ,# @#$R0 " @0 Q,T  @(& ,3K  ,#" :$[@ # T@.
  2260. XMQ0@  P,2 ,4-  ,#% #%% 0" L4?  ,#) 3%+ 0" L5'  ,## #%3P # VT&
  2261. XMA5(  P-(#L5C  ,#' #%;  # Q( Q7X$ @+%B@ # Q( Q8\  P,4 ,6J  ,#
  2262. XM# #%KP # PX Q;H  P,( ,6_  ,#"@#%Q0 # \(%Q<P  P,2 ,71  ,#% "%
  2263. XM^P # P,,Q@8  P,, ,8+  ,##@#&%@ # _@*QAX  P/"!<8E  ,#" #&*@ #
  2264. XM PH QC   P/"!<8W  ,#HPC&2P # Q( QE<  P,2 ,9>  ,#$@#&8P # Q0 
  2265. XMQFL  P,4 ,9V  (" @#&>@ # QP QHH  @(, (:4  ,#@@V&H@ # X(-QJ\ 
  2266. XM @(, (;%  ,##PW&R@ " @P QMX  P,(!H;A  ,#2 Z&Z0 # UT-AO   P-4
  2267. XM"H;S  ,#F V'1@ # Z<-AY$  P.G#<>A  ,#' #'TP0" L?>! ("Q^(  @("
  2268. XM &6@[@ #N0T   %U*"8#!@@ C-H[T'4=H0@ )@$&" "A @ FHP( "\!T!H[8
  2269. XMC 8$ (S CMBA @ +P'0PCL F]@8   %U)HS8 P8( (S".\)U&B:A"  !!@@ 
  2270. XM)J$" *,"  O = >.P":,'@0 @"8  /X'PU&,R([8N@  +HL>  "Y' "T/\TA
  2271. XM<@8[P74"6<.P!;H  .L!D%",R([8M G-(2Z+%@  @_K_= \>+HX>  "T)2Z@
  2272. XM  #-(1\NBQ8  (/Z_W0-'BZ.'@  M"6P(<TA'RZA   ]__]T!H[ M$G-(2Z+
  2273. XM'@  @_O_= 2T/LTA6+1,S2%FG$< Q'$  P.F!<1V  ,#$ #$B@ # S\&Q)L 
  2274. XM P,( ,2F  ,#"@#$K  # \(%Q+0  P,, ,2_  ,##@#$R@ # Q( Q-H  P,0
  2275. X' *^* @  = ,#
  2276. Xend
  2277. END_OF_FILE
  2278. if test 5497 -ne `wc -c <'others/ovlmgr.uu'`; then
  2279.     echo shar: \"'others/ovlmgr.uu'\" unpacked with wrong size!
  2280. fi
  2281. # end of 'others/ovlmgr.uu'
  2282. echo shar: End of archive 28 \(of 30\).
  2283. cp /dev/null ark28isdone
  2284. MISSING=""
  2285. 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
  2286.     if test ! -f ark${I}isdone ; then
  2287.     MISSING="${MISSING} ${I}"
  2288.     fi
  2289. done
  2290. if test "${MISSING}" = "" ; then
  2291.     echo You have unpacked all 30 archives.
  2292.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  2293. else
  2294.     echo You still need to unpack the following archives:
  2295.     echo "        " ${MISSING}
  2296. fi
  2297. ##  End of shell archive.
  2298. exit 0
  2299.