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

  1. Path: uunet!clyde.concordia.ca!news-server.csri.toronto.edu!cs.utexas.edu!rice!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: v10i070:  nethack3p9 -  display oriented dungeons & dragons (Ver. 3.0i), Part25/56
  5. Message-ID: <5928@tekred.CNA.TEK.COM>
  6. Date: 12 Jul 90 16:02:26 GMT
  7. Sender: news@tekred.CNA.TEK.COM
  8. Lines: 1934
  9. Approved: billr@saab.CNA.TEK.COM
  10.  
  11. Submitted-by: Izchak Miller <izchak@linc.cis.upenn.edu>
  12. Posting-number: Volume 10, Issue 70
  13. Archive-name: nethack3p9/Part25
  14. Supersedes: NetHack3: Volume 7, Issue 56-93
  15.  
  16.  
  17.  
  18. #! /bin/sh
  19. # This is a shell archive.  Remove anything before this line, then unpack
  20. # it by saving it into a file and typing "sh file".  To overwrite existing
  21. # files, type "sh file -c".  You can also feed this as standard input via
  22. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  23. # will see the following message at the end:
  24. #        "End of archive 25 (of 56)."
  25. # Contents:  auxil/tmac.n others/lev_lex.c
  26. # Wrapped by billr@saab on Wed Jul 11 17:11:28 1990
  27. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  28. if test -f 'auxil/tmac.n' -a "${1}" != "-c" ; then 
  29.   echo shar: Will not clobber existing file \"'auxil/tmac.n'\"
  30. else
  31. echo shar: Extracting \"'auxil/tmac.n'\" \(25078 characters\)
  32. sed "s/^X//" >'auxil/tmac.n' <<'END_OF_FILE'
  33. X\" @(#)$Id: tmac.n,v 2.6 89/04/19 10:39:59 syd Exp $
  34. X.\" The News macro package
  35. X.\"
  36. X.\" This  is  the macro package that is used to format news documents.  It
  37. X.\" was written because many sites do not have one of the -mm or -ms pack-
  38. X.\" ages that the documents use.   This is NOT compatible with EITHER, but
  39. X.\" (I hope) will become the standard for all news  documents  (man  pages
  40. X.\" excepted, since everyone seems to have -man.)
  41. X.\"
  42. X.\" This package was written using  only  the  "NROFF/TROFF Users' Guide",
  43. X.\" and  therefore  if  you  can run NROFF/TROFF, you can legitimately use
  44. X.\" this package.  However, because NROFF/TROFF are proprietary  programs,
  45. X.\" I  cannot  place  this  package in the public domain.  This should not
  46. X.\" matter, because if you legitimately have  NROFF/TROFF,  you  have  the
  47. X.\" documentation; if not, you can't run off the documentation anyway.
  48. X.\"
  49. X.\" This  package may be circulated freely with the news documentation; it
  50. X.\" may not be sold, but is to be distributed with  the  unformatted  news
  51. X.\" documents.  However,  the name of the author and the place at which it
  52. X.\" was written (in the author's own  time,  of  course)  are  not  to  be
  53. X.\" removed  from the package regardless of how it is modified or altered.
  54. X.\" Further, please do not distribute this package if you make any changes
  55. X.\" because  I  don't want to get bug reports of macros I haven't written;
  56. X.\" if you have a goodie you want me to add, send it to me and we'll talk.
  57. X.\" (I really do like feedback!)  I'd really appreciate your cooperation.
  58. X.\"
  59. X.\" Author:    Matt Bishop
  60. X.\"        Research Institute for Advanced Computer Science
  61. X.\"        Mail Stop 230-5
  62. X.\"         NASA Ames Research Center
  63. X.\"        Moffett Field, CA  94035
  64. X.\"
  65. X.\" version 1.0        September 28, 1985    mab@riacs.arpa
  66. X.\"     initial version
  67. X.\" version 1.1        October 25, 1985    mab@riacs.arpa
  68. X.\"    fixed an incredibly obscure footnote bug (that occurred twice in
  69. X.\"    the news documentation!) which put footnoted words on  one  page
  70. X.\"    and the footnote on the next if the word was in the next-to-last
  71. X.\"    or last line; commented it, and generally cleaned up
  72. X.\" Version 1.2        October 27, 1985    mab@riacs.arpa
  73. X.\"    Added a few more comments and a check to keep footnotes lined up
  74. X.\"    with the bottom margin.
  75. X.\" Version 1.3        February 12, 1986    mab@riacs.arpa
  76. X.\"    Added an error check to catch unmatched ef's and ed's
  77. X.\" Version 1.4        December 29, 1986    mab@riacs.edu
  78. X.\"    Changed footnote for ux, pd, and vx macros and  added  a  string
  79. X.\"    for rg ("Registered Trademark")
  80. X.\" Version 1.5        January 2, 1989        Matt.Bishop@dartmouth.edu
  81. X.\"    Minor modifications for nroff compatibility
  82. X.\" Version 1.6        March 15, 1989        Matt.Bishop@dartmouth.edu
  83. X.\"                        ..!bear.dartmouth.edu!bishop
  84. X.\"    Fixed a bug in footnote handling (again, sigh ...)  This one
  85. X.\"    occurred when the the "fo" trap position was reset just beneath
  86. X.\"    the current line; the footnote overflow trap would kick in and
  87. X.\"    never be closed.
  88. X.\"
  89. X.\"
  90. X.\" **********
  91. X.\" these preserve and restore various things
  92. X.\" they are used to shorten other macros
  93. X.de yf                    \" restore fonts
  94. X.ft \\n(f2                \" previous font
  95. X.ft \\n(f1                \" current font
  96. X..
  97. X.de yi                    \" restore indents
  98. X'in \\n(i2u                \" previous indent
  99. X'in \\n(i1u                \" current indent
  100. X..
  101. X.de ys                    \" restore point sizes
  102. X.ps \\n(s2                \" previous point size
  103. X.ps \\n(s1                \" current point size
  104. X..
  105. X.de yv                    \" restore vertical spacings
  106. X.vs \\n(v2u                \" previous vertical spacing
  107. X.vs \\n(v1u                \" current vertical spacing
  108. X..
  109. X.de ya                    \" restore everything
  110. X.yf                    \" restore fonts
  111. X.yi                    \" restore indents
  112. X.ys                    \" restore point sizes
  113. X.yv                    \" restore vertical spacing
  114. X..
  115. X.de zf                    \" preserve fonts
  116. X.nr f1 \\n(.f                \" current font
  117. X.ft                    \" switch to previous font
  118. X.nr f2 \\n(.f                \" previous font
  119. X.ft                    \" back to current font
  120. X..
  121. X.de zi                    \" preserve indents
  122. X.nr i1 \\n(.iu                \" current indent
  123. X'in                    \" switch to previous indent
  124. X.nr i2 \\n(.iu                \" previous indent
  125. X'in                    \" back to current indent
  126. X..
  127. X.de zs                    \" preserve point sizes
  128. X.nr s1 \\n(.su                \" current point size
  129. X.ps                    \" switch to previous point size
  130. X.nr s2 \\n(.su                \" previous point size
  131. X.ps                    \" back to current point size
  132. X..
  133. X.de zv                    \" preserve vertical spacings
  134. X.nr v1 \\n(.vu                \" current vertical spacing
  135. X.vs                    \" switch to previous vertical spacing
  136. X.nr v2 \\n(.vu                \" previous vertical spacing
  137. X.vs                    \" back to current vertical spacing
  138. X..
  139. X.de za                    \" save everything
  140. X.zf                    \" save fonts
  141. X.zi                    \" save indents
  142. X.zs                    \" save point sizes
  143. X.zv                    \" save vertical spacings
  144. X..
  145. X.\" **********
  146. X.\" these actually print the header and footer titles
  147. X.\" they are defined separately from the "hd" and "fo" macros
  148. X.\" to make user redefinition easy
  149. X.de pt                    \" print header title
  150. X.                    \" omit header on first page
  151. X.if \\n%>1 \{\
  152. X'    sp |\\$1u            \" move to proper position
  153. X.    ft 1                \" change to default font
  154. X.    ps \\n(ps            \" change to default point size
  155. X.    vs \\n(vs            \" change to default spacing
  156. X.    tl '\\*(h0'\\*(h1'\\*(h2'    \" center title
  157. X.    vs                \" restore current vertical spacing
  158. X.    ps                \" restore current point size
  159. X.    ft                \" restore current font
  160. X.\}
  161. X..
  162. X.de pf                    \" print footer title
  163. X.ft 1                    \" change to default font
  164. X.ps \\n(ps                \" change to default point size
  165. X.vs \\n(vs                \" change to default spacing
  166. X.ie \\n%=1 .tl '\\*(h0'\\*(h1'\\*(h2'    \" on first page, print the header here
  167. X.el        .tl '\\*(f0'\\*(f1'\\*(f2'    \" on other pages, print the footer
  168. X.vs                    \" restore current vertical spacing
  169. X.ps                    \" restore current point size
  170. X.ft                    \" restore current font
  171. X..
  172. X.\" **********
  173. X.\" these are the top of page (header) and bottom of page (footer) macros
  174. X.\" they don't actually print anything, just call the right macros
  175. X.de hd                    \" header -- do top of page processing
  176. X.if t .if \\n(cm .tl '\(rn'''        \" drop cut mark if needed
  177. X.pt \\n(ttu                \" print header
  178. X.nr fc 0 1                \" init footnote count
  179. X.nr fs \\n(.pu-\\n(bmu-1u        \" if any footnotes, start print here
  180. X.nr fp 0-\\n(bmu            \" reset current footer place
  181. X.ch fo -\\n(bmu                \" reset footer trap
  182. X.if \\n(dn .fz                \" put leftover footnotes st bottom
  183. X.ya                    \" restore font, etc.
  184. X'sp |\\n(tmu                \" move to top of body
  185. X.ns                    \" don't allow any more space
  186. X..
  187. X.de fo                    \" footer -- do bottom of page processing
  188. X.za                    \" save font, etc.
  189. X.rs                    \" you want motions here
  190. X.nr dn 0                \" clobber diversion size register
  191. X.if \\n(fc .fd                \" now print the footnotes, if any
  192. X'bp                    \" force out page
  193. X..
  194. X.\" **********
  195. X.\" these are the footnote macros
  196. X.\" here's an overview:
  197. X.\"    Footnotes are processed in environment #1, which is  initialized
  198. X.\"    at the bottom of this package.  When "fn" is called, nroff/troff
  199. X.\"    switches to this environment.  The body of the footnote is saved
  200. X.\"    in  the  diversion  "tf" (for "temporary footnote"), so you will
  201. X.\"    NEVER spring a trap during the first reading of a footnote. When
  202. X.\"    "ef" ("end footnote") is called,  the diversion  is  closed.  If
  203. X.\"    this  is the first footnote on the page (ie, the number register
  204. X.\"    "fc" is 1), and the footnote height (plus the height of 1  line)
  205. X.\"    crosses  the  bottom  margin,  you get the footnoted word on one
  206. X.\"    page and the footnote on the other.  In this case we  just  call
  207. X.\"    "fo"  manually  (taking case it cannot be re-invoked on the same
  208. X.\"    page!)  If this situation does not occur,  we  just  adjust  the
  209. X.\"    footer  trap's  position upwards (we'll get to how far in a min-
  210. X.\"    ute); if this puts the trap above the current line,  we  reposi-
  211. X.\"    tion  the trap just beneath the current line to be sure of trig-
  212. X.\"    triggering it once the current line is forced out.
  213. X.\"     To reposition the footer trap, we proceed as  follows.  Because
  214. X.\"    the  trap  may be sprung in the middle of a line, it is possible
  215. X.\"    that the footnote will not fit on the page (regardless of  where
  216. X.\"    on the page the footnoted word occurs -- really!) if we move the
  217. X.\"    trap up by the size of  the  footnote  diversion  "tf".  So,  we
  218. X.\"    fudge things a little bit -- for the first footnote on each page
  219. X.\"    we move the footer trap up 1 extra line ("line" being 1v in env-
  220. X.\"    ironment  #0).   Unless  the point size and vertical spacing are
  221. X.\"    increased between the first footnote and the footer trap's being
  222. X.\"    sprung,  this  will  keep  the footnotes on the same page as the
  223. X.\"    footnoted word.  But as there may be now as much as 1v of  space
  224. X.\"    between the footnote and the bottom margin, which looks HIDEOUS,
  225. X.\"    we use the number register "fs" to mark where  the  footer  trap
  226. X.\"    would  REALLY go, and just space to it when it comes time to put
  227. X.\"    out the footnotes.
  228. X.de fd                    \" dump footnotes
  229. X.nr gs 1v                \" get a measure of 1 line in env #0
  230. X.ev 1                    \" switch to footnote environment
  231. X.nr gs +2v                \" min of 2 lines of footnotes
  232. X.                    \" if the number register ns > 0,
  233. X.                    \" the last text line may contain a
  234. X.                    \" footnote that is too big to fit;
  235. X.                    \" this checks for such a note and
  236. X.                    \" if so, forces the footnote into
  237. X.                    \" the "fy" diversion that carries
  238. X.                    \" it onto the next text page
  239. X.ie (\\n(nsu>0)&(\\n(gsu>=\\n(.tu) 'sp \\n(gsu    \" be sure you can get it down
  240. X.el .if \\n(fsu>\\n(nlu 'sp \\n(fsu-\\n(nlu    \" move to footnote start position
  241. X'nf                    \" don't reprocess footnotes
  242. X'in 0                    \" don't indent them any more either
  243. X.tf                    \" drop text of footnotes
  244. X.rm tf
  245. X.if '\\n(.z'fy' .di            \" end overflow diversion, if any
  246. X.nr fc 0                \" re-init footnote count
  247. X.ev                    \" return to usual environment
  248. X..
  249. X.de fn                    \" start footnote
  250. X.                    \" look for nested footnotes -- ILLEGAL
  251. X.ie \\n(if>0 .er "footnote within footnote"
  252. X.el .da tf                \" append footnote to footnote diversion
  253. X.nr if +1                \" increment level of footnoting
  254. X.nr fc +1                \" one more footnote on this page
  255. X.if \\n(fc=1 .nr fp -1v            \" The reason for this "fudge factor"
  256. X.                    \" is that there is no way to force
  257. X.                    \" NROFF/TROFF to invoke a macro at
  258. X.                    \" the end of each line.  At times,
  259. X.                    \" the trap boundary will not match up
  260. X.                    \" with the bottom of a line, so the
  261. X.                    \" "fo" trap which is set at 2320 may
  262. X.                    \" not be triggered until 2340 -- and
  263. X.                    \" then the footnote won't fit.  This
  264. X.                    \" gives some slack so the footnote is
  265. X.                    \" more likely to fit. *sigh*
  266. X.ev 1                    \" enter footnote environment
  267. X.if \\n(fc=1 .fs            \" drop separator if first footnote
  268. X.br                    \" flush out any previous line in footnote
  269. X.fi                    \" process footnote in fill mode
  270. X..
  271. X.de ef                    \" end footnote
  272. X.br                    \" flush out the line in footnote
  273. X.ie \\n(if<=0 .er "end footnote has no corresponding begin footnote"
  274. X.el \{\
  275. X.    nr if -1            \" decrement level of footnoting
  276. X.    nr fg 2v            \" remember this for repositioning fo
  277. X.    ev                \" back to usual environment
  278. X.    if \\n(if=0 \{\
  279. X.        di            \" end of footnote proper
  280. X.        nr fp -\\n(dnu        \" "fo" will be moved at least up this far
  281. X.        nr fs -\\n(dnu        \" increase size of footnote
  282. X.        ch fo \\n(fpu        \" reposition "fo" trap (first guess)
  283. X.                    \" the first part of the "ie" clause
  284. X.                    \" is taken in the special case
  285. X.                    \" described above
  286. X.        ie (\\n(fc=1)&((\\n(nlu+1v+\\n(fgu)>=(\\n(.pu-\\n(bmu)) \{\
  287. X.            nr ns \\n(dnu    \" suppress footnote separator
  288. X.                    \" since this footnote contains it
  289. X.                    \" keep "fo" from being invoked twice
  290. X.            ch fo \\n(.pu+1i
  291. X.            fo        \" force the page out AT ONCE
  292. X.            nr ns 0        \" re-enable footnote separator
  293. X.        \}
  294. X.                    \" footnote won't fit completely
  295. X.                    \" invoke the footer trap but
  296. X.                    \" don't worry about the footnote
  297. X.                    \" separator (it's already there)
  298. X.        el .if (\\n(nlu+1v)>=(\\n(.pu+\\n(fpu) \{\
  299. X.                    \" as before we must reposition the
  300. X.                    \" "fo" trap to prevent "fo" from
  301. X.                    \" being invoked twice
  302. X.            ch fo \\n(.pu+1i
  303. X.            fo        \" force the page out AT ONCE
  304. X.        \}
  305. X.    \}
  306. X.\}
  307. X..
  308. X.de fs                    \" drop footnote separator
  309. X.                    \" only if not already dropped
  310. X.if \\n(ns=0 \l'1i'
  311. X.nr ns 0                \" in case footnotes are over 1 page long
  312. X..
  313. X.de fx                    \" process footnote overflow
  314. X.if \\n(fc .di fy            \" stuff them in the right place
  315. X..
  316. X.de fz                    \" deposit footnote overflow
  317. X.fn                    \" treat it as a footnote
  318. X.nf                    \" it's already been processed
  319. X.in 0                    \"   and indented
  320. X.fy                    \" "fx" put it here
  321. X.ef                    \" end the footnote
  322. X..
  323. X.\" **********
  324. X.\" the ones after here are user-invoked (like "fn" and "ef" above)
  325. X.\" title, author, etc.
  326. X.de mt                    \" main title
  327. X\&
  328. X.sp |\\n(mtu                \" space
  329. X.ft 3                    \" in bold
  330. X.ps \\n(ps+2p                \" large point size and
  331. X.vs \\n(vs+2p                \" vertical spacing
  332. X.ce 1000                \" center the title
  333. X.nr t2 1                \" space it
  334. X..
  335. X.de au                    \" author
  336. X.nr t2 0                \" spacing here
  337. X.sp 2v                    \" space
  338. X.ft 2                    \" in italics
  339. X.ps \\n(ps                \" usual point size and
  340. X.vs \\n(vs                \" vertical spacing
  341. X.ce 1000                \" center the name(s)
  342. X..
  343. X.de ai                    \" author's institution
  344. X.if \\n(t2 .sp 2v            \" space after a title
  345. X.nr t2 0                \" institution
  346. X.ft 2                    \" in italics
  347. X.ps \\n(ps                \" usual point size and
  348. X.vs \\n(vs                \" vertical spacing
  349. X.ce 1000                \" center the name(s)
  350. X..
  351. X.de bt                    \" begin text macro
  352. X.nr t2 0                \" hold it here
  353. X.nr it +1                \" mark as called
  354. X.ce 0                    \" end any centering
  355. X.sn 3v                    \" a little bit of space
  356. X..
  357. X.\" paragraph
  358. X.de si                    \" start indented section
  359. X.nr lo \\n(lm                \" remember the current level
  360. X.nr lm +1                \" go to the next level
  361. X.ie '\\$1'' .nr l\\n(lm \\n(l\\n(lo+5n    \" if no arg, indent 5n
  362. X.el         .nr l\\n(lm \\$1n        \" otherwise, indent that much
  363. X..
  364. X.de ei                    \" end indent
  365. X.nr lm -1                \" down one level
  366. X.if \\n(lm<0 .nr lm 0            \" make sure you don't go too far
  367. X..
  368. X.de pg                    \" plain old paragraph
  369. X.if !\\n(it .bt                \" end the title and such
  370. X.sn \\n(pdu                \" inter-paragraph spacing
  371. X.ft 1                    \" reset a few things (paranoia)
  372. X.                    \" these ONLY if not in footnote
  373. X.ie \\n(if=0 \{\
  374. X.    ps \\n(ps            \" reset point size
  375. X.    vs \\n(vs            \" reset vertical spacing
  376. X.    ne 1v+\\n(.Vu            \" slightly more than 1 line
  377. X.\}
  378. X.el \{\
  379. X.    ps \\n(ps-2p            \" reset point size
  380. X.    vs \\n(vs-2p            \" reset vertical spacing
  381. X.\}
  382. X.in \\n(l\\n(lmu            \" stop any indenting
  383. X.ce 0                    \" stop any centering
  384. X.if !'\\$1'L' .if !'\\$1'l' .ti +\\n(piu    \" indent the sucker
  385. X..
  386. X.de lp                    \" labelled paragraph
  387. X.pg l                    \" reset paragraph
  388. X.if \\n(.$>1 .nr li \\$2n        \" if indent given use it
  389. X.in +\\n(liu                \" indent for paragraph
  390. X.ti -\\n(liu                \" force first line NOT to indent
  391. X.ta +\\n(liu                \" for the label
  392. X\&\\$1\t\c
  393. X.if \\w'\\$1'u>=(\\n(l\\n(lmu+\\n(liu) .br    \" don't overwrite
  394. X..
  395. X.\" The following two macros (hu & hn) have been modified for ELM usage.
  396. X.\" If the macros have text as part of the macro call, the text will be
  397. X.\" increased in size by two points.  After printing the text, the font
  398. X.\" will be returned to normal, otherwise the font will be left bold.
  399. X.\"
  400. X.\" section
  401. X.de hu                    \" header, unnumbered
  402. X.                    \" format: .hu [text]
  403. X.if !\\n(it .bt                \" end the title and such
  404. X.br                    \" force out previous line
  405. X.b
  406. X.ie \\n(hP .ps \\n(hP
  407. X.el        .ps \\n(ps
  408. X.ie \\n(hv .vs \\n(hv
  409. X.el        .vs \\n(vs
  410. X.in \\n(l\\n(lmu            \" stop any indenting
  411. X.sn \\n(hsu                \" inter-section spacing
  412. X.ne 3v+\\n(.Vu                \" slightly more than 3 lines
  413. X.fi                    \" process the text, too
  414. X.if \\n(.$>=1 \{\
  415. X.ps +2
  416. X\\$1
  417. X.\}
  418. X.if \\n(.$>=2 \\$2
  419. X.if \\n(.$>=3 \\$3
  420. X.if \\n(.$>=4 \\$4
  421. X.if \\n(.$>=5 \\$5
  422. X.if \\n(.$>=6 \\$6
  423. X.if \\n(.$>=7 \\$7
  424. X.if \\n(.$>=8 \\$8
  425. X.if \\n(.$=9 \\$9
  426. X.if \\n(.$>=1 \{\
  427. X.ps -2
  428. X.br
  429. X.ft 1
  430. X.\}
  431. X..
  432. X.de hn                    \" header, numbered
  433. X.                    \" format: .hn [level] [text]
  434. X.if !\\n(it .bt                \" end the title and such
  435. X.br                    \" force out previous line
  436. X.b
  437. X.ie \\n(hP .ps \\n(hP
  438. X.el        .ps \\n(ps
  439. X.ie \\n(hv .vs \\n(hv
  440. X.el        .vs \\n(vs
  441. X.in \\n(l\\n(lmu            \" stop any indenting
  442. X.sn \\n(hsu                \" inter-section spacing
  443. X.ne 3v+\\n(.Vu                \" slightly more than 3 lines
  444. X.fi                    \" process the text, too
  445. X.ie !'\\$1'' .nr hn \\$1
  446. X.el          .nr hn 1
  447. X.ie \\n(hn>0 .nr hn -1
  448. X.el          .nr hn 0
  449. X.ie \\n(hn=0 \{\
  450. X.    nr h0 +1            \" add 1 to main section header
  451. X.    nr h1 0                \" zap remaining section numbers
  452. X.    nr h2 0                \" zap remaining section numbers
  453. X.    nr h3 0                \" zap remaining section numbers
  454. X.ie \\n(.$>=2 \{\
  455. X.ps +2
  456. X\\n(h0.
  457. X.ps -2
  458. X.\}
  459. X.el \\n(h0.
  460. X.\}
  461. X.el .ie \\n(hn=1 \{\
  462. X.    nr h1 +1            \" add 1 to the section header
  463. X.    nr h2 0                \" zap remaining section numbers
  464. X.    nr h3 0                \" zap remaining section numbers
  465. X.ie \\n(.$>=2 \{\
  466. X.ps +2
  467. X\\n(h0.\\n(h1.
  468. X.ps -2
  469. X.\}
  470. X.el \\n(h0.\\n(h1.
  471. X.\}
  472. X.el .ie \\n(hn=2 \{\
  473. X.    nr h2 +1            \" add 1 to the section header
  474. X.    nr h3 0                \" zap remaining section numbers
  475. X.ie \\n(.$>=2 \{\
  476. X.ps +2
  477. X\\n(h0.\\n(h1.\\n(h2.
  478. X.ps -2
  479. X.\}
  480. X.el \\n(h0.\\n(h1.\\n(h2.
  481. X.\}
  482. X.el \{\
  483. X.    nr h3 +1            \" add 1 to the section number
  484. X.ie \\n(.$>=2 \{\
  485. X.ps +2
  486. X\\n(h0.\\n(h1.\\n(h2.\\n(h3.
  487. X.ps -2
  488. X.\}
  489. X.el \\n(h0.\\n(h1.\\n(h2.\\n(h3.
  490. X.\}
  491. X.if \\n(.$>=2 \{\
  492. X.ps +2
  493. X\\$2
  494. X.\}
  495. X.if \\n(.$>=3 \\$3
  496. X.if \\n(.$>=4 \\$4
  497. X.if \\n(.$>=5 \\$5
  498. X.if \\n(.$>=6 \\$6
  499. X.if \\n(.$>=7 \\$7
  500. X.if \\n(.$>=8 \\$8
  501. X.if \\n(.$>=9 \\$9
  502. X.if \\n(.$>=2 \{\
  503. X.br
  504. X.ft 1
  505. X.ps -2
  506. X.\}
  507. X..
  508. X.\" displays (no floats, thank God!)
  509. X.de sd                    \" start display
  510. X.                    \" look for nested displays -- ILLEGAL
  511. X.ie \\n(id>0 .er "display within display"
  512. X.el \{\
  513. X.    ie '\\$1'c' .nr sf 1        \" center the sucker
  514. X.    el          .nr sf 0        \" don't center it
  515. X.\}
  516. X.sn \\n(pdu                \" a little bit of space
  517. X.ev 2                    \" switch to display environment
  518. X.nf                    \" what you type is what you get
  519. X.if \\n(id=0 .di dd            \" start saving text
  520. X.rs                    \" don't eat leading space
  521. X.nr id +1                \" increment level of display
  522. X..
  523. X.de ed                    \" end display
  524. X.br                    \" flush line
  525. X.ie \\n(id<=0 .er "end display has no corresponding begin display"
  526. X.el \{\
  527. X.    nr id -1            \" decrement level of display
  528. X.    if \\n(id=0 \{\
  529. X.        di            \" end diversion
  530. X.        fi            \" resume filling
  531. X.        in -\\n(piu        \" dedent
  532. X.        ev            \" pop environment
  533. X.        ne \\n(dnu        \" be sure you have room
  534. X.        nf            \" don't reprocess display
  535. X.        rs            \" don't eat leading space
  536. X.        zi            \" save indents
  537. X.        ie \\n(sf .in (\\n(llu-\\n(dlu)/2u    \" center on the line length
  538. X.        el .in +\\n(piu        \" indent the sucker
  539. X.        dd            \" drop display
  540. X.        yi            \" restore indents
  541. X.    \}
  542. X.\}
  543. X.fi                    \" resume filling
  544. X.sn \\n(pdu                \" a little bit of space
  545. X..
  546. X.\" **********
  547. X.\" fonts -- if argument(s), apply only to first
  548. X.de b                    \" bold (font 3)
  549. X.ie \\n(.$>0 \\&\\$3\\f3\\$1\\fP\\$2
  550. X.el .ft 3
  551. X..
  552. X.de i                    \" italics (font 2)
  553. X.ie \\n(.$>0 \\&\\$3\\f2\\$1\\fP\\$2
  554. X.el .ft 2
  555. X..
  556. X.de r                    \" roman (font 1)
  557. X.ft 1                    \" just restore it
  558. X..
  559. X.de bi                    \" bold italics (embolden font 2)
  560. X\\&\\$3\c
  561. X\\kb\\f2\\$1\\fP\\h'|\\nbu+2u'\\f2\\$1\\fP\\$2
  562. X..
  563. X.\" **********
  564. X.\" point sizes -- if argument(s), apply only to first
  565. X.de sm                    \" reduce point size by 2
  566. X.ie \\n(.$>0 \\&\\$3\\s-2\\$1\\s0\\$2
  567. X.el .ps -2
  568. X..
  569. X.de is                    \" increase point size by 2
  570. X.ie \\n(.$>0 \\&\\$3\\s+2\\$1\\s0\\$2
  571. X.el .ps +2
  572. X..
  573. X.de nl                    \" return to normal size
  574. X.ps \\n(ps                \" just reset the point size
  575. X..
  576. X.\" **********
  577. X.\" handy force space/inhibit more space macros
  578. X.de sn                    \" space, then turn on nospace mode
  579. X.sp \\$1                \" space
  580. X.ns                    \" ignore any more space requests
  581. X..
  582. X.de sr                    \" force out space
  583. X.rs                    \" turn on spacing mode
  584. X.sp \\$1                \" space
  585. X..
  586. X.\" **********
  587. X.\" end of text and error macros
  588. X.de et                    \" end of text macro
  589. X.                    \" this: (1) flushes rest of line
  590. X.                    \" (2) trips the footer, taking
  591. X.                    \" care of footnotes
  592. X.sp \\n(.pu
  593. X.                    \" check for open displays or footnotes
  594. X.if \\n(id>0 .er "unfinished display"
  595. X.if \\n(if>0 .er "unfinished footnote"
  596. X.                    \" this one means an -mn bug (*sigh*)
  597. X.if !'\\n(.z'' .er "diversion \\n(.z not closed"
  598. X..
  599. X.de er                    \" print error message
  600. X.                    \" flag it as an error
  601. X.ds ws "** ERROR **
  602. X.                    \" if you have it, give the file name
  603. X.if !'\\*(.f'' .as ws " file \\*(.f,
  604. X.                    \" put out the line number
  605. X.as ws " line \\n(.c
  606. X.                    \" and finally the error message
  607. X.tm \\*(ws: \\$1
  608. X..
  609. X.\" **********
  610. X.\" macros in this section are VERY specific to the news documentation
  611. X.de pa                    \" protocol appellation (darn names!)
  612. X\\&\\$3\\f2\\$1\\fP\\$2
  613. X..
  614. X.de ng                    \" news group name
  615. X\\&\\$3\\f3\\$1\\fP\\$2
  616. X..
  617. X.de cn                    \" computer name
  618. X\\&\\$3\\f2\\$1\\fP\\$2
  619. X..
  620. X.de hf                    \" header field
  621. X\\&\\$3\\*(lq\\$1\\*(rq\\$2
  622. X..
  623. X.de cf                    \" contents of field
  624. X\\&\\$3\\*(lq\\$1\\*(rq\\$2
  625. X..
  626. X.de qc                    \" quote control char (command)
  627. X\\&\\$3\\f3<\\s-2\\$1\\s0>\\fP\\$2
  628. X..
  629. X.de qp                    \" quote printing char (command)
  630. X\\&\\$3\\f3\\$1\\fP\\$2
  631. X..
  632. X.de op                    \" option
  633. X\\&\\$3\\f3\\$1\\fP\\$2
  634. X..
  635. X.\" **********
  636. X.\" trademarked names
  637. X.de pd                    \" print "PDP-11"
  638. X.ie \\n(p1 \\&\\$2\\s-1PDP\\s0-11\\$1
  639. X.el \{\
  640. X.    nr p1 +1            \" mark footnote as dropped
  641. X\\&\\$2\\s-1PDP\\s0-11\\*(rg\\$1
  642. X.    fn                \" put out the footnote
  643. X\\&\\*(rgPDP-11 is a registered trademark of Digital Equipment Corporation.
  644. X.    ef                \" short and sweet ...
  645. X.\}
  646. X..
  647. X.de ux                    \" print "UNIX"
  648. X.ie \\n(ux \\&\\$2\\s-1UNIX\\s0\\$1
  649. X.el \{\
  650. X.    nr ux +1            \" mark footnote as dropped
  651. X\\&\\$2\\s-1UNIX\\s0\\*(rg\\$1
  652. X.    fn                \" put out the footnote
  653. X\\&\\*(rgUNIX is a registered trademark of AT&T.
  654. X.    ef                \" short and sweet ...
  655. X.\}
  656. X..
  657. X.de vx                    \" print "VAX"
  658. X.ie \\n(vx \\&\\$2\\s-1VAX\\s0\\$1
  659. X.el \{\
  660. X.    nr vx +1            \" mark footnote as dropped
  661. X\\&\\$2\\s-1VAX\\s0\\*(rg\\$1
  662. X.    fn                \" put out the footnote
  663. X\\&\\*(rgVAX is a trademark of Digital Equipment Corporation.
  664. X.    ef                \" short and sweet ...
  665. X.\}
  666. X..
  667. X.\" **********
  668. X.\" set up string and number registers
  669. X.                    \" set up for the date
  670. X.if \n(mo=1  .ds mo January
  671. X.if \n(mo=2  .ds mo February
  672. X.if \n(mo=3  .ds mo March
  673. X.if \n(mo=4  .ds mo April
  674. X.if \n(mo=5  .ds mo May
  675. X.if \n(mo=6  .ds mo June
  676. X.if \n(mo=7  .ds mo July
  677. X.if \n(mo=8  .ds mo August
  678. X.if \n(mo=9  .ds mo September
  679. X.if \n(mo=10 .ds mo October
  680. X.if \n(mo=11 .ds mo November
  681. X.if \n(mo=12 .ds mo December
  682. X.ds dy "\*(mo \n(dy, 19\n(yr
  683. X.if \n(dw=1  .ds dw Sunday
  684. X.if \n(dw=2  .ds dw Monday
  685. X.if \n(dw=3  .ds dw Tuesday
  686. X.if \n(dw=4  .ds dw Wednesday
  687. X.if \n(dw=5  .ds dw Thursday
  688. X.if \n(dw=6  .ds dw Friday
  689. X.if \n(dw=7  .ds dw Saturday
  690. X.                    \" NROFF dependencies
  691. X.if n \{\
  692. X.                    \" string registers
  693. X.    ds rg (R)
  694. X.    ds lq ""
  695. X.    ds rq ""
  696. X.    ds f1 "\*(dy
  697. X.                    \" number registers
  698. X.    nr hs 1v            \" space before section header
  699. X.    nr pd 1v            \" inter-paragraph spacing
  700. X.    nr bm 1.0i            \" height of bottom margin
  701. X.\}
  702. X.                    \" NROFF dependencies
  703. X.if t \{\
  704. X.                    \" string registers
  705. X.    ds rg \\u\\s-2\\(rg\\s0\\d
  706. X.    ds lq ``
  707. X.    ds rq ''
  708. X.                    \" number registers
  709. X.    nr hs 1v            \" space before section header
  710. X.    nr pd 0.3v            \" inter-paragraph spacing
  711. X.    nr bm 1.0i+1v            \" height of bottom margin (wacky laser)
  712. X.\}
  713. X.                    \" these are the same for [NT]ROFF
  714. X.ds dg \(dg
  715. X.ds vr "News Version B2.11
  716. X.ds pv "News macros 1.5
  717. X.ds h1 - % -
  718. X.nr bt 0.5i+1v                \" bottom of page to footer
  719. X.nr cm 0                \" no cut marks
  720. X.nr fc 0 1                \" init footnote count
  721. X.nr fl 5.5i                \" footnote line length
  722. X.nr fp 0-\n(bmu                \" fo macro trap location
  723. X.nr h0 0                \" init section header level 0
  724. X.nr h1 0                \" init section header level 1
  725. X.nr h2 0                \" init section header level 2
  726. X.nr h3 0                \" init section header level 3
  727. X.nr id 0                \" 1 in display
  728. X.nr if 0                \" 1 in keep
  729. X.nr it 0                \" 1 when beyond title, etc.
  730. X.nr li 5n                \" indent for labelled paragraph
  731. X.nr ll 6.5i                \" line length
  732. X.nr lm 0                \" left margin
  733. X.nr l0 0                \" first indent level
  734. X.nr mt 1.5i+1v                \" title goes down this far
  735. X.nr pi 5n                \" regular paragraph indent
  736. X.nr po 1.0i                \" page offset
  737. X.nr ps 10                \" point size
  738. X.nr tm 1.0i                \" height of top margin
  739. X.nr tt 0.5i-0.5v            \" top of page to header
  740. X.nr p1 0                \" no PDP-TM message yet
  741. X.nr ux 0                \" no UNIX-TM message yet
  742. X.nr vx 0                \" no VAX-TM message yet
  743. X.nr vs 12                \" vertical spacing
  744. X.\" set things up
  745. X.\" DSINC changes for XROFF
  746. X.nr f1 1
  747. X.nr f2 1
  748. X.nr s1 10
  749. X.nr s2 10
  750. X.nr v1 12
  751. X.nr v2 12
  752. X.ps 10
  753. X.vs 12
  754. X.\" DSINC end changes for XROFF
  755. X.po \n(pou                \" set page offset
  756. X.ps \n(ps                \" set previous, current
  757. X.ps \n(ps                \"   point sizes
  758. X.vs \n(vs                \" set previous, current
  759. X.vs \n(vs                \"   vertical spacings
  760. X.ll \n(llu                \" set line length
  761. X.lt \n(llu                \" set title line length
  762. X.ev 1                    \" *** footnote environment
  763. X.ps \n(ps-2p                \" set previous, current
  764. X.ps \n(ps-2p                \"   point sizes
  765. X.vs \n(vs-2p                \" set previous, current
  766. X.vs \n(vs-2p                \"   vertical spacings
  767. X.ll \n(flu                \" set line length
  768. X.lt \n(flu                \" set title line length
  769. X.ev                    \" *** pop environment
  770. X.ev 2                    \" *** footnote environment
  771. X.ps \n(ps                \" set previous, current
  772. X.ps \n(ps                \"   point sizes
  773. X.vs \n(vs                \" set previous, current
  774. X.vs \n(vs                \"   vertical spacings
  775. X.ll \n(llu                \" set line length
  776. X.lt \n(llu                \" set title line length
  777. X.ev                    \" *** pop environment
  778. X.\" now set internal registers (for the first header section)
  779. X.nr f1 \n(.f                \" saved font #1
  780. X.nr f2 \n(.f                \" saved font #2
  781. X.nr s1 \n(.s                \" saved point size #1
  782. X.nr s2 \n(.s                \" saved point size #2
  783. X.nr v1 \n(.v                \" saved vertical spacing #1
  784. X.nr v2 \n(.v                \" saved vertical spacing #2
  785. X.\" install traps
  786. X.wh 0i hd                \" position header trap
  787. X.wh -\n(bmu fo                \" position footer trap
  788. X.wh \n(.pu+1i fx            \" put footnote overflow trap here
  789. X.ch fx -\n(bmu                \" move it over fo
  790. X.wh -\n(btu pf                \" print the bottom margin here
  791. X.em et                    \" at end of file, call et
  792. X.\" couple of miscellaneous requests
  793. X.bd S 3 3                \" embolden special font chars if B
  794. X.hy 2                    \" don't hyphenate last lines
  795. END_OF_FILE
  796. if test 25078 -ne `wc -c <'auxil/tmac.n'`; then
  797.     echo shar: \"'auxil/tmac.n'\" unpacked with wrong size!
  798. fi
  799. # end of 'auxil/tmac.n'
  800. fi
  801. if test -f 'others/lev_lex.c' -a "${1}" != "-c" ; then 
  802.   echo shar: Will not clobber existing file \"'others/lev_lex.c'\"
  803. else
  804. echo shar: Extracting \"'others/lev_lex.c'\" \(31273 characters\)
  805. sed "s/^X//" >'others/lev_lex.c' <<'END_OF_FILE'
  806. X#define FLEX_COMPRESSED
  807. X/* A lexical scanner generated by flex */
  808. X
  809. X/* scanner skeleton version:
  810. X * $Header: flex.skel,v 2.0 89/06/20 15:49:46 vern Locked $
  811. X */
  812. X
  813. X#include <stdio.h>
  814. X
  815. X#define FLEX_SCANNER
  816. X
  817. X/* amount of stuff to slurp up with each read */
  818. X#ifndef YY_READ_BUF_SIZE
  819. X#define YY_READ_BUF_SIZE 8192
  820. X#endif
  821. X
  822. X#ifndef YY_BUF_SIZE
  823. X#define YY_BUF_SIZE (YY_READ_BUF_SIZE * 2) /* size of input buffer */
  824. X#endif
  825. X
  826. X/* returned upon end-of-file */
  827. X#define YY_END_TOK 0
  828. X
  829. X/* copy whatever the last rule matched to the standard output */
  830. X
  831. X#define ECHO fputs( yytext, yyout )
  832. X
  833. X/* gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
  834. X * is returned in "result".
  835. X */
  836. X#ifdef atarist
  837. Xstatic __st_read(fd, buf, size)
  838. Xint fd; char *buf; int size;
  839. X{
  840. X    int r, num = 0;
  841. X    char *from;
  842. X
  843. X    if ((r = read(fd, buf, size)) < 0)
  844. X        return r;
  845. X    from = buf;
  846. X    while (r-- > 0) {
  847. X        if (*from == '\r')
  848. X            from++;
  849. X        else {
  850. X            *buf++ = *from++;
  851. X            num++;
  852. X        }
  853. X    }
  854. X    return num;
  855. X}
  856. X
  857. X#define YY_INPUT(buf,result,max_size) \
  858. X    if ( (result = __st_read( fileno(yyin), buf, max_size )) < 0 ) \
  859. X        YY_FATAL_ERROR( "read() in flex scanner failed" );
  860. X
  861. X#else
  862. X
  863. X#define YY_INPUT(buf,result,max_size) \
  864. X    if ( (result = read( fileno(yyin), buf, max_size )) < 0 ) \
  865. X        YY_FATAL_ERROR( "read() in flex scanner failed" );
  866. X#endif
  867. X
  868. X#define YY_NULL 0
  869. X#define yyterminate() return ( YY_NULL )
  870. X
  871. X/* report a fatal error */
  872. X#define YY_FATAL_ERROR(msg) \
  873. X    { \
  874. X    fputs( msg, stderr ); \
  875. X    putc( '\n', stderr ); \
  876. X    exit( 1 ); \
  877. X    }
  878. X
  879. X/* default yywrap function - always treat EOF as an EOF */
  880. X#define yywrap() 1
  881. X
  882. X/* enter a start condition.  This macro really ought to take a parameter,
  883. X * but we do it the disgusting crufty way forced on us by the ()-less
  884. X * definition of BEGIN
  885. X */
  886. X#define BEGIN yy_start = 1 + 2 *
  887. X
  888. X/* action number for EOF rule of a given start state */
  889. X#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
  890. X
  891. X/* special action meaning "start processing a new file" */
  892. X#define YY_NEW_FILE goto new_file
  893. X
  894. X/* default declaration of generated scanner - a define so the user can
  895. X * easily add parameters
  896. X */
  897. X#ifdef __STDC__
  898. X#define YY_DECL int yylex( void )
  899. X#else
  900. X#define YY_DECL int yylex()
  901. X#endif
  902. X
  903. X/* code executed at the end of each rule */
  904. X#define YY_BREAK break;
  905. X
  906. X#define YY_END_OF_BUFFER_CHAR 0
  907. X
  908. X/* done after the current pattern has been matched and before the
  909. X * corresponding action - sets up yytext
  910. X */
  911. X#define YY_DO_BEFORE_ACTION \
  912. X    yytext = yy_bp; \
  913. X    yy_hold_char = *yy_cp; \
  914. X    *yy_cp = '\0'; \
  915. X    yy_c_buf_p = yy_cp;
  916. X
  917. X/* returns the length of the matched text */
  918. X#define yyleng (int)(yy_cp - yy_bp)
  919. X
  920. X#define EOB_ACT_RESTART_SCAN 0
  921. X#define EOB_ACT_END_OF_FILE 1
  922. X#define EOB_ACT_LAST_MATCH 2
  923. X
  924. X/* return all but the first 'n' matched characters back to the input stream */
  925. X#define yyless(n) \
  926. X    { \
  927. X    *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ \
  928. X    yy_c_buf_p = yy_cp = yy_bp + n; \
  929. X    YY_DO_BEFORE_ACTION; /* set up yytext again */ \
  930. X    }
  931. X
  932. X#define unput(c) yyunput( c, yy_bp )
  933. X
  934. X#define YY_USER_ACTION
  935. X
  936. XFILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
  937. Xchar *yytext;
  938. X
  939. X#ifndef __STDC__
  940. X#define const
  941. X#endif
  942. X
  943. X# line 1 "lev_comp.l"
  944. X#define INITIAL 0
  945. X# line 2 "lev_comp.l"
  946. X/*    SCCS Id: @(#)lev_lex.c    3.0    90/01/04
  947. X/*    Copyright (c) 1989 by Jean-Christophe Collet */
  948. X/* NetHack may be freely redistributed.  See license for details. */
  949. X
  950. X#define LEV_LEX_C
  951. X
  952. X/* block some unused #defines to avoid overloading some cpp's */
  953. X#define MONDATA_H    /* comment this line for pre-compiled headers */
  954. X#define MONFLAG_H    /* comment this line for pre-compiled headers */
  955. X
  956. X#include "hack.h"
  957. X#include "lev_comp.h"
  958. X#include "sp_lev.h"
  959. X
  960. X/* Most of these don't exist in flex, yywrap is macro and
  961. X * yyunput is properly declared in flex.skel.
  962. X */
  963. X#ifndef FLEX_SCANNER
  964. Xint FDECL (yyback, (int *, int));
  965. Xint NDECL (yylook);
  966. Xint NDECL (yyinput);
  967. Xint NDECL (yywrap);
  968. Xint NDECL (yylex);
  969. Xint FDECL (yyunput, (int));
  970. Xint FDECL (yyoutput, (int));
  971. X#endif
  972. X
  973. X#ifdef MSDOS
  974. X#undef exit
  975. Xextern void FDECL(exit, (int));
  976. X#endif
  977. X
  978. X/* this doesn't always get put in lev_comp.h
  979. X * (esp. when using older versions of bison)
  980. X */
  981. X
  982. Xextern YYSTYPE yylval;
  983. X
  984. X#ifdef MACOS
  985. X#undef putchar
  986. X#undef putc
  987. X#undef printf
  988. X#undef Printf
  989. X#define Printf printf
  990. X# ifdef LSC
  991. X#define    putc(c,stream)    (fputc(c,stream))
  992. X#define    putchar(c)    (fputc(c,stdout))
  993. X# endif
  994. X#endif
  995. Xint line_number = 1;
  996. X
  997. X/* This is *** UGLY *** but I can't think a better way to do it
  998. X * I really need a huge buffer to scan maps...
  999. X */
  1000. X
  1001. X#undef YYLMAX
  1002. X#define YYLMAX    2048
  1003. X
  1004. X#define MAPC 1
  1005. X# line 62 "lev_comp.l"
  1006. X#define YY_END_OF_BUFFER 57
  1007. Xtypedef int yy_state_type;
  1008. Xstatic const short int yy_accept[274] =
  1009. X    {   0,
  1010. X        0,    0,    0,    0,   57,   55,   53,   52,   55,   55,
  1011. X       50,   55,   55,   55,   55,   55,   55,   55,   55,   55,
  1012. X       55,   55,   55,   55,   55,   55,   55,   55,   55,   55,
  1013. X       55,   55,   55,   55,   55,   55,   55,    1,   53,   55,
  1014. X       55,   55,   53,    0,   51,    0,   50,    0,    0,    0,
  1015. X        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
  1016. X        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
  1017. X        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
  1018. X        0,    0,    0,    0,    0,   48,    0,    0,    3,    0,
  1019. X        1,   53,    0,    0,    1,    0,   54,    0,    0,    0,
  1020. X
  1021. X        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
  1022. X        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
  1023. X       43,    0,   41,    0,    0,    0,    0,    0,    0,    0,
  1024. X        0,    0,    0,    0,    0,   39,    0,    0,    0,    0,
  1025. X        0,   11,    0,    0,    0,    0,    4,    0,    0,    0,
  1026. X        0,    0,   21,   10,    0,    0,    0,    0,    0,    0,
  1027. X        0,   49,   28,   36,    0,    0,    0,    0,    0,    0,
  1028. X       22,    0,    0,    0,    0,    0,    0,   30,    7,    0,
  1029. X       18,    0,    0,    0,    5,    0,    0,    0,    0,    0,
  1030. X        0,   35,   47,    0,    0,    0,   45,    0,    0,    0,
  1031. X
  1032. X        0,    0,   27,    0,   34,    0,   37,    0,   29,   42,
  1033. X        0,    0,    0,   19,    0,    0,    0,    8,    0,   14,
  1034. X       40,   26,   38,   23,   24,    0,    0,   25,   32,   31,
  1035. X       46,    0,    0,    0,    0,    9,    0,    0,   33,   44,
  1036. X        2,    0,    6,   13,    0,    0,    0,    0,    0,    0,
  1037. X        0,    0,    0,   12,    0,    0,    0,    0,    0,    0,
  1038. X        0,    0,   20,    0,    0,    0,    0,    0,   17,    0,
  1039. X       15,   16,    0
  1040. X    } ;
  1041. X
  1042. Xstatic const char yy_ec[128] =
  1043. X    {   0,
  1044. X        1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
  1045. X        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  1046. X        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  1047. X        1,    4,    1,    5,    6,    1,    1,    1,    7,    1,
  1048. X        1,    1,    8,    1,    8,    8,    1,    9,    9,    9,
  1049. X        9,    9,    9,    9,    9,    9,    9,    1,    1,    1,
  1050. X        1,    1,    1,    1,   10,   11,   12,   13,   14,    1,
  1051. X       15,    1,   16,   17,   18,   19,   20,   21,   22,   23,
  1052. X        1,   24,   25,   26,    1,   27,   28,    1,   29,   30,
  1053. X        1,    8,    1,    1,   31,    1,   32,   33,   34,   35,
  1054. X
  1055. X       36,   37,   38,   39,   40,   41,   42,   43,   44,   45,
  1056. X       46,   47,    1,   48,   49,   50,   51,    1,   52,    1,
  1057. X        1,    1,    8,    8,    8,    1,    1
  1058. X    } ;
  1059. X
  1060. Xstatic const char yy_meta[53] =
  1061. X    {   0,
  1062. X        1,    1,    2,    1,    1,    1,    1,    1,    1,    1,
  1063. X        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  1064. X        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  1065. X        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  1066. X        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  1067. X        1,    1
  1068. X    } ;
  1069. X
  1070. Xstatic const short int yy_base[277] =
  1071. X    {   0,
  1072. X        0,   47,   51,   74,  343,  344,   54,  344,  337,    0,
  1073. X      332,  321,   38,  325,   54,   51,  316,  326,   61,  312,
  1074. X      292,   24,   48,  288,  301,   49,  286,   50,   46,  288,
  1075. X       34,   51,  284,   53,  293,  325,   91,  344,  100,  106,
  1076. X      306,  124,  103,  321,  344,  318,  315,  297,  300,  311,
  1077. X      298,  306,  291,  287,  295,  294,  297,  292,  297,  289,
  1078. X      300,   71,  259,  262,  262,  274,  259,  252,  254,  250,
  1079. X      264,  250,  265,  253,  246,   81,  255,  259,  262,  248,
  1080. X      254,  243,  239,  242,  245,  344,  238,  283,  344,   92,
  1081. X      344,  132,  140,  272,  344,  148,  344,  274,  259,  254,
  1082. X
  1083. X      261,  267,  265,  264,  252,  245,  261,  261,  257,  252,
  1084. X      248,  232,  237,  218,  225,  216,  219,  215,  218,  212,
  1085. X      344,  211,  344,  218,  210,  208,  211,  206,  219,  209,
  1086. X      219,  217,  212,  210,  199,  344,  208,  197,  243,  225,
  1087. X      220,  344,  232,  228,  227,  221,  211,  212,  224,  224,
  1088. X      213,  212,  344,  344,  188,  184,  185,  194,  193,  179,
  1089. X      191,  344,  344,  344,  190,  175,  176,  177,  183,  187,
  1090. X      344,  184,  173,  168,  172,  177,  165,  344,  344,  204,
  1091. X      344,  189,  186,  187,  344,  200,  195,  192,  181,  186,
  1092. X      184,  344,  344,  160,  158,  154,  344,  166,  165,  163,
  1093. X
  1094. X      166,  149,  344,  146,  344,  151,  344,  158,  344,  344,
  1095. X      170,  176,  167,  344,  171,  165,  173,  344,  156,  344,
  1096. X      344,  344,  344,  344,  344,  138,  142,  344,  344,  344,
  1097. X      344,  181,  170,  153,  163,  344,  165,   97,  344,  344,
  1098. X      344,  164,  344,  344,  168,  150,  160,  151,  155,  157,
  1099. X      146,  147,  153,  344,  143,  136,  146,  147,  141,  127,
  1100. X      135,  131,  344,  127,  113,  112,  109,  101,  344,   98,
  1101. X      344,  344,  344,  173,   62,  175
  1102. X    } ;
  1103. X
  1104. Xstatic const short int yy_def[277] =
  1105. X    {   0,
  1106. X      273,    1,    1,    1,  273,  273,  273,  273,  274,  275,
  1107. X      273,  273,  273,  273,  273,  273,  273,  273,  273,  273,
  1108. X      273,  273,  273,  273,  273,  273,  273,  273,  273,  273,
  1109. X      273,  273,  273,  273,  273,  276,  273,  273,  273,  273,
  1110. X      273,  276,  273,  274,  273,  273,  273,  273,  273,  273,
  1111. X      273,  273,  273,  273,  273,  273,  273,  273,  273,  273,
  1112. X      273,  273,  273,  273,  273,  273,  273,  273,  273,  273,
  1113. X      273,  273,  273,  273,  273,  273,  273,  273,  273,  273,
  1114. X      273,  273,  273,  273,  273,  273,  273,  276,  273,  273,
  1115. X      273,  273,  273,  273,  273,  276,  273,  273,  273,  273,
  1116. X
  1117. X      273,  273,  273,  273,  273,  273,  273,  273,  273,  273,
  1118. X      273,  273,  273,  273,  273,  273,  273,  273,  273,  273,
  1119. X      273,  273,  273,  273,  273,  273,  273,  273,  273,  273,
  1120. X      273,  273,  273,  273,  273,  273,  273,  273,  273,  273,
  1121. X      273,  273,  273,  273,  273,  273,  273,  273,  273,  273,
  1122. X      273,  273,  273,  273,  273,  273,  273,  273,  273,  273,
  1123. X      273,  273,  273,  273,  273,  273,  273,  273,  273,  273,
  1124. X      273,  273,  273,  273,  273,  273,  273,  273,  273,  273,
  1125. X      273,  273,  273,  273,  273,  273,  273,  273,  273,  273,
  1126. X      273,  273,  273,  273,  273,  273,  273,  273,  273,  273,
  1127. X
  1128. X      273,  273,  273,  273,  273,  273,  273,  273,  273,  273,
  1129. X      273,  273,  273,  273,  273,  273,  273,  273,  273,  273,
  1130. X      273,  273,  273,  273,  273,  273,  273,  273,  273,  273,
  1131. X      273,  273,  273,  273,  273,  273,  273,  273,  273,  273,
  1132. X      273,  273,  273,  273,  273,  273,  273,  273,  273,  273,
  1133. X      273,  273,  273,  273,  273,  273,  273,  273,  273,  273,
  1134. X      273,  273,  273,  273,  273,  273,  273,  273,  273,  273,
  1135. X      273,  273,    0,  273,  273,  273
  1136. X    } ;
  1137. X
  1138. Xstatic const short int yy_nxt[397] =
  1139. X    {   0,
  1140. X        6,    7,    8,    7,    9,    6,   10,    6,   11,   12,
  1141. X        6,    6,   13,    6,   14,    6,    6,    6,   15,   16,
  1142. X       17,   18,    6,   19,    6,   20,    6,    6,    6,    6,
  1143. X        6,   21,   22,   23,   24,   25,    6,    6,    6,    6,
  1144. X        6,    6,   26,   27,   28,   29,   30,   31,   32,   33,
  1145. X       34,   35,   36,   38,   39,   43,   40,   43,   40,   49,
  1146. X       54,   50,   46,   52,   41,   80,   37,   53,   40,   63,
  1147. X       58,   64,   55,   81,   59,   40,   38,   39,   77,   42,
  1148. X       70,   40,   60,   65,   71,   75,   66,   41,   72,   82,
  1149. X       67,   40,   78,   37,   73,   76,   83,   85,   40,   86,
  1150. X
  1151. X       90,   43,   91,   92,   43,   93,   43,   93,   91,   93,
  1152. X      112,   93,   55,   93,  139,  127,  246,   93,  247,  248,
  1153. X      113,  104,  272,   93,   93,  271,   95,   96,  128,   96,
  1154. X       93,   96,  270,   43,   91,   92,  269,   93,  268,   93,
  1155. X      267,   96,   91,   93,  266,   93,  265,   93,   96,   93,
  1156. X       95,   96,  264,   96,  263,   96,   93,   93,  262,  261,
  1157. X      260,  259,  258,  257,   93,   96,  256,  255,  254,  253,
  1158. X      252,  251,   96,   44,   44,   88,   88,  250,  249,  245,
  1159. X      244,  243,  242,  241,  240,  239,  238,  237,  236,  235,
  1160. X      234,  233,  232,  231,  230,  229,  228,  227,  226,  225,
  1161. X
  1162. X      224,  223,  222,  221,  220,  219,  218,  217,  216,  215,
  1163. X      214,  213,  212,  211,  210,  209,  208,  207,  206,  205,
  1164. X      204,  203,  202,  201,  200,  199,  198,  197,  196,  195,
  1165. X      194,  193,  192,  191,  190,  189,  188,  187,  186,  185,
  1166. X      184,  183,  182,  181,  180,  179,  178,  177,  176,  175,
  1167. X      174,  173,  172,  171,  170,  169,  168,  167,  166,  165,
  1168. X      164,  163,  162,  161,  160,  159,  158,  157,  156,  155,
  1169. X      154,  153,  152,  151,  150,  149,  148,  147,  146,  145,
  1170. X      144,  143,  142,  141,  140,   89,  138,  137,  136,  135,
  1171. X      134,  133,  132,  131,  130,  129,  126,  125,  124,  123,
  1172. X
  1173. X      122,  121,  120,  119,  118,  117,  116,  115,  114,  111,
  1174. X      110,  109,  108,  107,  106,  105,  104,  103,  102,  101,
  1175. X      100,   99,   98,   47,   97,   45,   94,   89,   87,   84,
  1176. X       79,   74,   69,   68,   62,   61,   57,   56,   51,   48,
  1177. X       47,   45,  273,    5,  273,  273,  273,  273,  273,  273,
  1178. X      273,  273,  273,  273,  273,  273,  273,  273,  273,  273,
  1179. X      273,  273,  273,  273,  273,  273,  273,  273,  273,  273,
  1180. X      273,  273,  273,  273,  273,  273,  273,  273,  273,  273,
  1181. X      273,  273,  273,  273,  273,  273,  273,  273,  273,  273,
  1182. X      273,  273,  273,  273,  273,  273
  1183. X
  1184. X    } ;
  1185. X
  1186. Xstatic const short int yy_chk[397] =
  1187. X    {   0,
  1188. X        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  1189. X        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  1190. X        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  1191. X        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  1192. X        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  1193. X        1,    1,    2,    3,    3,    7,    3,    7,    3,   13,
  1194. X       16,   13,  275,   15,    3,   31,    2,   15,    3,   22,
  1195. X       19,   22,   16,   31,   19,    3,    4,    4,   29,    4,
  1196. X       26,    4,   19,   23,   26,   28,   23,    4,   26,   32,
  1197. X       23,    4,   29,    4,   26,   28,   32,   34,    4,   34,
  1198. X
  1199. X       37,   39,   39,   39,   43,   39,   43,   39,   40,   40,
  1200. X       62,   40,   37,   40,   90,   76,  238,   39,  238,  238,
  1201. X       62,   90,  270,   40,   39,  268,   42,   42,   76,   42,
  1202. X       40,   42,  267,   92,   92,   92,  266,   92,  265,   92,
  1203. X      264,   42,   93,   93,  262,   93,  261,   93,   42,   92,
  1204. X       96,   96,  260,   96,  259,   96,   92,   93,  258,  257,
  1205. X      256,  255,  253,  252,   93,   96,  251,  250,  249,  248,
  1206. X      247,  246,   96,  274,  274,  276,  276,  245,  242,  237,
  1207. X      235,  234,  233,  232,  227,  226,  219,  217,  216,  215,
  1208. X      213,  212,  211,  208,  206,  204,  202,  201,  200,  199,
  1209. X
  1210. X      198,  196,  195,  194,  191,  190,  189,  188,  187,  186,
  1211. X      184,  183,  182,  180,  177,  176,  175,  174,  173,  172,
  1212. X      170,  169,  168,  167,  166,  165,  161,  160,  159,  158,
  1213. X      157,  156,  155,  152,  151,  150,  149,  148,  147,  146,
  1214. X      145,  144,  143,  141,  140,  139,  138,  137,  135,  134,
  1215. X      133,  132,  131,  130,  129,  128,  127,  126,  125,  124,
  1216. X      122,  120,  119,  118,  117,  116,  115,  114,  113,  112,
  1217. X      111,  110,  109,  108,  107,  106,  105,  104,  103,  102,
  1218. X      101,  100,   99,   98,   94,   88,   87,   85,   84,   83,
  1219. X       82,   81,   80,   79,   78,   77,   75,   74,   73,   72,
  1220. X
  1221. X       71,   70,   69,   68,   67,   66,   65,   64,   63,   61,
  1222. X       60,   59,   58,   57,   56,   55,   54,   53,   52,   51,
  1223. X       50,   49,   48,   47,   46,   44,   41,   36,   35,   33,
  1224. X       30,   27,   25,   24,   21,   20,   18,   17,   14,   12,
  1225. X       11,    9,    5,  273,  273,  273,  273,  273,  273,  273,
  1226. X      273,  273,  273,  273,  273,  273,  273,  273,  273,  273,
  1227. X      273,  273,  273,  273,  273,  273,  273,  273,  273,  273,
  1228. X      273,  273,  273,  273,  273,  273,  273,  273,  273,  273,
  1229. X      273,  273,  273,  273,  273,  273,  273,  273,  273,  273,
  1230. X      273,  273,  273,  273,  273,  273
  1231. X
  1232. X    } ;
  1233. X
  1234. X/* the intent behind this definition is that it'll catch
  1235. X * any uses of REJECT which flex missed
  1236. X */
  1237. X#define REJECT reject_used_but_not_detected
  1238. Xstatic char *yy_more_pos = (char *) 0;
  1239. X#define yymore() (yy_more_pos = yy_bp)
  1240. X
  1241. X/* these variables are all declared out here so that section 3 code can
  1242. X * manipulate them
  1243. X */
  1244. Xstatic char *yy_c_buf_p;    /* points to current character in buffer */
  1245. Xstatic int yy_init = 1;        /* whether we need to initialize */
  1246. Xstatic int yy_start = 0;    /* start state number */
  1247. X
  1248. X/* true when we've seen an EOF for the current input file */
  1249. Xstatic int yy_eof_has_been_seen;
  1250. X
  1251. Xstatic int yy_n_chars;        /* number of characters read into yy_ch_buf */
  1252. X
  1253. X/* yy_ch_buf has to be 2 characters longer than YY_BUF_SIZE because we need
  1254. X * to put in 2 end-of-buffer characters (this is explained where it is
  1255. X * done) at the end of yy_ch_buf
  1256. X */
  1257. Xstatic char yy_ch_buf[YY_BUF_SIZE + 2];
  1258. X
  1259. X/* yy_hold_char holds the character lost when yytext is formed */
  1260. Xstatic char yy_hold_char;
  1261. X
  1262. Xstatic yy_state_type yy_last_accepting_state;
  1263. Xstatic char *yy_last_accepting_cpos;
  1264. X
  1265. X#ifdef __STDC__
  1266. Xstatic yy_state_type yy_get_previous_state( void );
  1267. Xstatic int yy_get_next_buffer( void );
  1268. Xstatic void yyunput( int c, char *buf_ptr );
  1269. Xstatic int input( void );
  1270. Xstatic void yyrestart( FILE *input_file );
  1271. X#else
  1272. Xstatic yy_state_type yy_get_previous_state();
  1273. Xstatic int yy_get_next_buffer();
  1274. Xstatic void yyunput();
  1275. Xstatic int input();
  1276. Xstatic void yyrestart();
  1277. X#endif
  1278. X
  1279. XYY_DECL
  1280. X    {
  1281. X    register yy_state_type yy_current_state;
  1282. X    register char *yy_cp, *yy_bp;
  1283. X    register int yy_act;
  1284. X
  1285. X
  1286. X
  1287. X    if ( yy_init )
  1288. X    {
  1289. X    if ( ! yy_start )
  1290. X        yy_start = 1;    /* first start state */
  1291. X
  1292. X    if ( ! yyin )
  1293. X        yyin = stdin;
  1294. X
  1295. X    if ( ! yyout )
  1296. X        yyout = stdout;
  1297. X
  1298. Xnew_file:
  1299. X    /* this is where we enter upon encountering an end-of-file and
  1300. X     * yywrap() indicating that we should continue processing
  1301. X     */
  1302. X
  1303. X    /* we put in the '\n' and start reading from [1] so that an
  1304. X     * initial match-at-newline will be true.
  1305. X     */
  1306. X
  1307. X    yy_ch_buf[0] = '\n';
  1308. X    yy_n_chars = 1;
  1309. X
  1310. X    /* we always need two end-of-buffer characters.  The first causes
  1311. X     * a transition to the end-of-buffer state.  The second causes
  1312. X     * a jam in that state.
  1313. X     */
  1314. X    yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
  1315. X    yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
  1316. X
  1317. X    yy_eof_has_been_seen = 0;
  1318. X
  1319. X    yytext = yy_c_buf_p = &yy_ch_buf[1];
  1320. X    yy_hold_char = *yy_c_buf_p;
  1321. X    yy_init = 0;
  1322. X    }
  1323. X
  1324. X    while ( 1 )        /* loops until end-of-file is reached */
  1325. X    {
  1326. X    yy_cp = yy_c_buf_p;
  1327. X
  1328. X    /* support of yytext */
  1329. X    *yy_cp = yy_hold_char;
  1330. X
  1331. X    /* yy_bp points to the position in yy_ch_buf of the start of the
  1332. X     * current run.
  1333. X     */
  1334. X    if ( yy_more_pos )
  1335. X        {
  1336. X        yy_bp = yy_more_pos;
  1337. X        yy_more_pos = (char *) 0;
  1338. X        }
  1339. X    else
  1340. X        yy_bp = yy_cp;
  1341. X
  1342. X    yy_current_state = yy_start;
  1343. X    if ( yy_bp[-1] == '\n' )
  1344. X        ++yy_current_state;
  1345. X    do
  1346. X        {
  1347. X        register char yy_c = yy_ec[*yy_cp];
  1348. X        if ( yy_accept[yy_current_state] )
  1349. X        {
  1350. X        yy_last_accepting_state = yy_current_state;
  1351. X        yy_last_accepting_cpos = yy_cp;
  1352. X        }
  1353. X        while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
  1354. X        {
  1355. X        yy_current_state = yy_def[yy_current_state];
  1356. X        if ( yy_current_state >= 274 )
  1357. X            yy_c = yy_meta[yy_c];
  1358. X        }
  1359. X        yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
  1360. X        ++yy_cp;
  1361. X        }
  1362. X    while ( yy_current_state != 273 );
  1363. X    yy_cp = yy_last_accepting_cpos;
  1364. X    yy_current_state = yy_last_accepting_state;
  1365. X
  1366. X    /* bogus while loop to let YY_BACK_TRACK, EOB_ACT_LAST_MATCH,
  1367. X     * and EOF actions branch here without introducing an optimizer-
  1368. X     * daunting goto
  1369. X     */
  1370. X    while ( 1 )
  1371. X        {
  1372. X        yy_act = yy_accept[yy_current_state];
  1373. X
  1374. X        YY_DO_BEFORE_ACTION;
  1375. X        YY_USER_ACTION;
  1376. X
  1377. X#ifdef FLEX_DEBUG
  1378. X        fprintf( stderr, "--accepting rule #%d (\"%s\")\n",
  1379. X             yy_act, yytext );
  1380. X#endif
  1381. X
  1382. Xdo_action:    /* this label is used only to access EOF actions */
  1383. X        switch ( yy_act )
  1384. X        {
  1385. X        case 0: /* must backtrack */
  1386. X        /* undo the effects of YY_DO_BEFORE_ACTION */
  1387. X        *yy_cp = yy_hold_char;
  1388. X        yy_cp = yy_last_accepting_cpos;
  1389. X        yy_current_state = yy_last_accepting_state;
  1390. X        continue; /* go to "YY_DO_BEFORE_ACTION" */
  1391. X
  1392. Xcase 1:
  1393. X# line 63 "lev_comp.l"
  1394. X{ line_number++; yymore(); }    
  1395. X    YY_BREAK
  1396. Xcase 2:
  1397. X# line 64 "lev_comp.l"
  1398. X{ BEGIN 0;
  1399. X          line_number++;
  1400. X          yytext[yyleng-7] = 0; /* Discard \nENDMAP */
  1401. X          yylval.map = (char *) alloc(strlen(yytext)+1);
  1402. X          strcpy(yylval.map, yytext);
  1403. X          return MAP_ID;
  1404. X        }
  1405. X    YY_BREAK
  1406. Xcase 3:
  1407. X# line 71 "lev_comp.l"
  1408. X{ line_number++; }
  1409. X    YY_BREAK
  1410. Xcase 4:
  1411. X# line 72 "lev_comp.l"
  1412. Xreturn MAZE_ID;
  1413. X    YY_BREAK
  1414. Xcase 5:
  1415. X# line 73 "lev_comp.l"
  1416. Xreturn LEVEL_ID;
  1417. X    YY_BREAK
  1418. Xcase 6:
  1419. X# line 74 "lev_comp.l"
  1420. Xreturn GEOMETRY_ID;
  1421. X    YY_BREAK
  1422. Xcase 7:
  1423. X# line 75 "lev_comp.l"
  1424. X{ BEGIN MAPC; line_number++; }
  1425. X    YY_BREAK
  1426. Xcase 8:
  1427. X# line 76 "lev_comp.l"
  1428. Xreturn OBJECT_ID;
  1429. X    YY_BREAK
  1430. Xcase 9:
  1431. X# line 77 "lev_comp.l"
  1432. Xreturn MONSTER_ID;
  1433. X    YY_BREAK
  1434. Xcase 10:
  1435. X# line 78 "lev_comp.l"
  1436. Xreturn TRAP_ID;
  1437. X    YY_BREAK
  1438. Xcase 11:
  1439. X# line 79 "lev_comp.l"
  1440. Xreturn DOOR_ID;
  1441. X    YY_BREAK
  1442. Xcase 12:
  1443. X# line 80 "lev_comp.l"
  1444. Xreturn DRAWBRIDGE_ID;
  1445. X    YY_BREAK
  1446. Xcase 13:
  1447. X# line 81 "lev_comp.l"
  1448. Xreturn MAZEWALK_ID;
  1449. X    YY_BREAK
  1450. Xcase 14:
  1451. X# line 82 "lev_comp.l"
  1452. Xreturn REGION_ID;
  1453. X    YY_BREAK
  1454. Xcase 15:
  1455. X# line 83 "lev_comp.l"
  1456. Xreturn RANDOM_OBJECTS_ID;
  1457. X    YY_BREAK
  1458. Xcase 16:
  1459. X# line 84 "lev_comp.l"
  1460. Xreturn RANDOM_MONSTERS_ID;
  1461. X    YY_BREAK
  1462. Xcase 17:
  1463. X# line 85 "lev_comp.l"
  1464. Xreturn RANDOM_PLACES_ID;
  1465. X    YY_BREAK
  1466. Xcase 18:
  1467. X# line 86 "lev_comp.l"
  1468. Xreturn ALTAR_ID;
  1469. X    YY_BREAK
  1470. Xcase 19:
  1471. X# line 87 "lev_comp.l"
  1472. Xreturn LADDER_ID;
  1473. X    YY_BREAK
  1474. Xcase 20:
  1475. X# line 88 "lev_comp.l"
  1476. Xreturn NON_DIGGABLE_ID;
  1477. X    YY_BREAK
  1478. Xcase 21:
  1479. X# line 89 "lev_comp.l"
  1480. Xreturn ROOM_ID;
  1481. X    YY_BREAK
  1482. Xcase 22:
  1483. X# line 90 "lev_comp.l"
  1484. X{ yylval.i=D_ISOPEN; return DOOR_STATE; }
  1485. X    YY_BREAK
  1486. Xcase 23:
  1487. X# line 91 "lev_comp.l"
  1488. X{ yylval.i=D_CLOSED; return DOOR_STATE; }
  1489. X    YY_BREAK
  1490. Xcase 24:
  1491. X# line 92 "lev_comp.l"
  1492. X{ yylval.i=D_LOCKED; return DOOR_STATE; }
  1493. X    YY_BREAK
  1494. Xcase 25:
  1495. X# line 93 "lev_comp.l"
  1496. X{ yylval.i=D_NODOOR; return DOOR_STATE; }
  1497. X    YY_BREAK
  1498. Xcase 26:
  1499. X# line 94 "lev_comp.l"
  1500. X{ yylval.i=D_BROKEN; return DOOR_STATE; }
  1501. X    YY_BREAK
  1502. Xcase 27:
  1503. X# line 95 "lev_comp.l"
  1504. X{ yylval.i=W_NORTH; return DIRECTION; }
  1505. X    YY_BREAK
  1506. Xcase 28:
  1507. X# line 96 "lev_comp.l"
  1508. X{ yylval.i=W_EAST; return DIRECTION; }
  1509. X    YY_BREAK
  1510. Xcase 29:
  1511. X# line 97 "lev_comp.l"
  1512. X{ yylval.i=W_SOUTH; return DIRECTION; }
  1513. X    YY_BREAK
  1514. Xcase 30:
  1515. X# line 98 "lev_comp.l"
  1516. X{ yylval.i=W_WEST; return DIRECTION; }
  1517. X    YY_BREAK
  1518. Xcase 31:
  1519. X# line 99 "lev_comp.l"
  1520. X{ yylval.i = -1; return RANDOM_TYPE; }
  1521. X    YY_BREAK
  1522. Xcase 32:
  1523. X# line 100 "lev_comp.l"
  1524. Xreturn O_REGISTER;
  1525. X    YY_BREAK
  1526. Xcase 33:
  1527. X# line 101 "lev_comp.l"
  1528. Xreturn M_REGISTER;
  1529. X    YY_BREAK
  1530. Xcase 34:
  1531. X# line 102 "lev_comp.l"
  1532. Xreturn P_REGISTER;
  1533. X    YY_BREAK
  1534. Xcase 35:
  1535. X# line 103 "lev_comp.l"
  1536. Xreturn A_REGISTER;
  1537. X    YY_BREAK
  1538. Xcase 36:
  1539. X# line 104 "lev_comp.l"
  1540. X{ yylval.i=1; return LEFT_OR_RIGHT; }
  1541. X    YY_BREAK
  1542. Xcase 37:
  1543. X# line 105 "lev_comp.l"
  1544. X{ yylval.i=3; return LEFT_OR_RIGHT; }
  1545. X    YY_BREAK
  1546. Xcase 38:
  1547. X# line 106 "lev_comp.l"
  1548. X{ yylval.i=2; return CENTER; }
  1549. X    YY_BREAK
  1550. Xcase 39:
  1551. X# line 107 "lev_comp.l"
  1552. X{ yylval.i=1; return TOP_OR_BOT; }
  1553. X    YY_BREAK
  1554. Xcase 40:
  1555. X# line 108 "lev_comp.l"
  1556. X{ yylval.i=3; return TOP_OR_BOT; }
  1557. X    YY_BREAK
  1558. Xcase 41:
  1559. X# line 109 "lev_comp.l"
  1560. X{ yylval.i=1; return LIGHT_STATE; }
  1561. X    YY_BREAK
  1562. Xcase 42:
  1563. X# line 110 "lev_comp.l"
  1564. X{ yylval.i=0; return LIGHT_STATE; }
  1565. X    YY_BREAK
  1566. Xcase 43:
  1567. X# line 111 "lev_comp.l"
  1568. X{ yylval.i=A_LAW; return ALIGNMENT; }
  1569. X    YY_BREAK
  1570. Xcase 44:
  1571. X# line 112 "lev_comp.l"
  1572. X{ yylval.i=A_NEUTRAL; return ALIGNMENT; }
  1573. X    YY_BREAK
  1574. Xcase 45:
  1575. X# line 113 "lev_comp.l"
  1576. X{ yylval.i=A_CHAOS; return ALIGNMENT; }
  1577. X    YY_BREAK
  1578. Xcase 46:
  1579. X# line 114 "lev_comp.l"
  1580. X{ yylval.i=1; return ALTAR_TYPE; }
  1581. X    YY_BREAK
  1582. Xcase 47:
  1583. X# line 115 "lev_comp.l"
  1584. X{ yylval.i=0; return ALTAR_TYPE; }
  1585. X    YY_BREAK
  1586. Xcase 48:
  1587. X# line 116 "lev_comp.l"
  1588. X{ yylval.i=1; return UP_OR_DOWN; }
  1589. X    YY_BREAK
  1590. Xcase 49:
  1591. X# line 117 "lev_comp.l"
  1592. X{ yylval.i=0; return UP_OR_DOWN; }
  1593. X    YY_BREAK
  1594. Xcase 50:
  1595. X# line 118 "lev_comp.l"
  1596. X{ yylval.i=atoi(yytext); return INTEGER; }
  1597. X    YY_BREAK
  1598. Xcase 51:
  1599. X# line 119 "lev_comp.l"
  1600. X{ yytext[yyleng-1] = 0; /* Discard the trailing \" */
  1601. X          yylval.map = (char *) alloc(strlen(yytext+1)+1);
  1602. X          strcpy(yylval.map, yytext+1); /* Discard the first \" */
  1603. X          return STRING; }
  1604. X    YY_BREAK
  1605. Xcase 52:
  1606. X# line 123 "lev_comp.l"
  1607. X{ line_number++; }
  1608. X    YY_BREAK
  1609. Xcase 53:
  1610. X# line 124 "lev_comp.l"
  1611. X;
  1612. X    YY_BREAK
  1613. Xcase 54:
  1614. X# line 125 "lev_comp.l"
  1615. X{ yylval.i = yytext[1]; return CHAR; }
  1616. X    YY_BREAK
  1617. Xcase 55:
  1618. X# line 126 "lev_comp.l"
  1619. X{ return yytext[0]; }
  1620. X    YY_BREAK
  1621. Xcase 56:
  1622. X# line 127 "lev_comp.l"
  1623. XECHO;
  1624. X    YY_BREAK
  1625. Xcase YY_STATE_EOF(INITIAL):
  1626. Xcase YY_STATE_EOF(MAPC):
  1627. X    yyterminate();
  1628. X
  1629. X        case YY_END_OF_BUFFER:
  1630. X            /* undo the effects of YY_DO_BEFORE_ACTION */
  1631. X            *yy_cp = yy_hold_char;
  1632. X
  1633. X            yytext = yy_bp;
  1634. X
  1635. X            switch ( yy_get_next_buffer() )
  1636. X            {
  1637. X            case EOB_ACT_END_OF_FILE:
  1638. X                {
  1639. X                if ( yywrap() )
  1640. X                {
  1641. X                /* note: because we've taken care in
  1642. X                 * yy_get_next_buffer() to have set up yytext,
  1643. X                 * we can now set up yy_c_buf_p so that if some
  1644. X                 * total hoser (like flex itself) wants
  1645. X                 * to call the scanner after we return the
  1646. X                 * YY_NULL, it'll still work - another YY_NULL
  1647. X                 * will get returned.
  1648. X                 */
  1649. X                yy_c_buf_p = yytext;
  1650. X
  1651. X                yy_act = YY_STATE_EOF((yy_start - 1) / 2);
  1652. X                goto do_action;
  1653. X                }
  1654. X
  1655. X                else
  1656. X                YY_NEW_FILE;
  1657. X                }
  1658. X                break;
  1659. X
  1660. X            case EOB_ACT_RESTART_SCAN:
  1661. X                yy_c_buf_p = yytext;
  1662. X                yy_hold_char = *yy_c_buf_p;
  1663. X                break;
  1664. X
  1665. X            case EOB_ACT_LAST_MATCH:
  1666. X                yy_c_buf_p = &yy_ch_buf[yy_n_chars];
  1667. X
  1668. X                yy_current_state = yy_get_previous_state();
  1669. X
  1670. X                yy_cp = yy_c_buf_p;
  1671. X                yy_bp = yytext;
  1672. X                continue; /* go to "YY_DO_BEFORE_ACTION" */
  1673. X            }
  1674. X            break;
  1675. X
  1676. X        default:
  1677. X            printf( "action # %d\n", yy_act );
  1678. X            YY_FATAL_ERROR( "fatal flex scanner internal error" );
  1679. X        }
  1680. X
  1681. X        break; /* exit bogus while loop */
  1682. X        }
  1683. X    }
  1684. X    }
  1685. X
  1686. X
  1687. X/* yy_get_next_buffer - try to read in new buffer
  1688. X *
  1689. X * synopsis
  1690. X *     int yy_get_next_buffer();
  1691. X *     
  1692. X * returns a code representing an action
  1693. X *     EOB_ACT_LAST_MATCH - 
  1694. X *     EOB_ACT_RESTART_SCAN - restart the scanner
  1695. X *     EOB_ACT_END_OF_FILE - end of file
  1696. X */
  1697. X
  1698. Xstatic int yy_get_next_buffer()
  1699. X
  1700. X    {
  1701. X    register char *dest = yy_ch_buf;
  1702. X    register char *source = yytext - 1; /* copy prev. char, too */
  1703. X    register int number_to_move, i;
  1704. X    int ret_val;
  1705. X    
  1706. X    if ( yy_c_buf_p != &yy_ch_buf[yy_n_chars + 1] )
  1707. X    {
  1708. X    YY_FATAL_ERROR( "NULL in input" );
  1709. X    /*NOTREACHED*/
  1710. X    }
  1711. X
  1712. X    /* try to read more data */
  1713. X
  1714. X    /* first move last chars to start of buffer */
  1715. X    number_to_move = yy_c_buf_p - yytext;
  1716. X
  1717. X    for ( i = 0; i < number_to_move; ++i )
  1718. X    *(dest++) = *(source++);
  1719. X
  1720. X    if ( yy_eof_has_been_seen )
  1721. X    /* don't do the read, it's not guaranteed to return an EOF,
  1722. X     * just force an EOF
  1723. X     */
  1724. X    yy_n_chars = 0;
  1725. X
  1726. X    else
  1727. X    {
  1728. X    int num_to_read = YY_BUF_SIZE - number_to_move - 1;
  1729. X
  1730. X    if ( num_to_read > YY_READ_BUF_SIZE )
  1731. X        num_to_read = YY_READ_BUF_SIZE;
  1732. X
  1733. X    /* read in more data */
  1734. X    YY_INPUT( (&yy_ch_buf[number_to_move]), yy_n_chars, num_to_read );
  1735. X    }
  1736. X
  1737. X    if ( yy_n_chars == 0 )
  1738. X    {
  1739. X    if ( number_to_move == 1 )
  1740. X        ret_val = EOB_ACT_END_OF_FILE;
  1741. X    else
  1742. X        ret_val = EOB_ACT_LAST_MATCH;
  1743. X
  1744. X    yy_eof_has_been_seen = 1;
  1745. X    }
  1746. X
  1747. X    else
  1748. X    ret_val = EOB_ACT_RESTART_SCAN;
  1749. X
  1750. X    yy_n_chars += number_to_move;
  1751. X    yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
  1752. X    yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
  1753. X
  1754. X    /* yytext begins at the second character in
  1755. X     * yy_ch_buf; the first character is the one which
  1756. X     * preceded it before reading in the latest buffer;
  1757. X     * it needs to be kept around in case it's a
  1758. X     * newline, so yy_get_previous_state() will have
  1759. X     * with '^' rules active
  1760. X     */
  1761. X
  1762. X    yytext = &yy_ch_buf[1];
  1763. X
  1764. X    return ( ret_val );
  1765. X    }
  1766. X
  1767. X
  1768. X/* yy_get_previous_state - get the state just before the EOB char was reached
  1769. X *
  1770. X * synopsis
  1771. X *     yy_state_type yy_get_previous_state();
  1772. X */
  1773. X
  1774. Xstatic yy_state_type yy_get_previous_state()
  1775. X
  1776. X    {
  1777. X    register yy_state_type yy_current_state;
  1778. X    register char *yy_cp;
  1779. X
  1780. X    register char *yy_bp = yytext;
  1781. X
  1782. X    yy_current_state = yy_start;
  1783. X    if ( yy_bp[-1] == '\n' )
  1784. X    ++yy_current_state;
  1785. X
  1786. X    for ( yy_cp = yytext; yy_cp < yy_c_buf_p; ++yy_cp )
  1787. X    {
  1788. X    register char yy_c = yy_ec[*yy_cp];
  1789. X    if ( yy_accept[yy_current_state] )
  1790. X        {
  1791. X        yy_last_accepting_state = yy_current_state;
  1792. X        yy_last_accepting_cpos = yy_cp;
  1793. X        }
  1794. X    while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
  1795. X        {
  1796. X        yy_current_state = yy_def[yy_current_state];
  1797. X        if ( yy_current_state >= 274 )
  1798. X        yy_c = yy_meta[yy_c];
  1799. X        }
  1800. X    yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
  1801. X    }
  1802. X
  1803. X    return ( yy_current_state );
  1804. X    }
  1805. X
  1806. X
  1807. X#ifdef __STDC__
  1808. Xstatic void yyunput( int c, register char *yy_bp )
  1809. X#else
  1810. Xstatic void yyunput( c, yy_bp )
  1811. Xint c;
  1812. Xregister char *yy_bp;
  1813. X#endif
  1814. X
  1815. X    {
  1816. X    register char *yy_cp = yy_c_buf_p;
  1817. X
  1818. X    *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
  1819. X
  1820. X    if ( yy_cp < yy_ch_buf + 2 )
  1821. X    { /* need to shift things up to make room */
  1822. X    register int number_to_move = yy_n_chars + 2; /* +2 for EOB chars */
  1823. X    register char *dest = &yy_ch_buf[YY_BUF_SIZE + 2];
  1824. X    register char *source = &yy_ch_buf[number_to_move];
  1825. X
  1826. X    while ( source > yy_ch_buf )
  1827. X        *--dest = *--source;
  1828. X
  1829. X    yy_cp += dest - source;
  1830. X    yy_bp += dest - source;
  1831. X
  1832. X    if ( yy_cp < yy_ch_buf + 2 )
  1833. X        YY_FATAL_ERROR( "flex scanner push-back overflow" );
  1834. X    }
  1835. X
  1836. X    if ( yy_cp > yy_bp && yy_cp[-1] == '\n' )
  1837. X    yy_cp[-2] = '\n';
  1838. X
  1839. X    *--yy_cp = c;
  1840. X
  1841. X    YY_DO_BEFORE_ACTION; /* set up yytext again */
  1842. X    }
  1843. X
  1844. X
  1845. Xstatic int input()
  1846. X
  1847. X    {
  1848. X    int c;
  1849. X    char *yy_cp = yy_c_buf_p;
  1850. X
  1851. X    *yy_cp = yy_hold_char;
  1852. X
  1853. X    if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
  1854. X    { /* need more input */
  1855. X    yytext = yy_c_buf_p;
  1856. X    ++yy_c_buf_p;
  1857. X
  1858. X    switch ( yy_get_next_buffer() )
  1859. X        {
  1860. X        /* this code, unfortunately, is somewhat redundant with
  1861. X         * that above
  1862. X         */
  1863. X        case EOB_ACT_END_OF_FILE:
  1864. X        {
  1865. X        if ( yywrap() )
  1866. X            {
  1867. X            yy_c_buf_p = yytext;
  1868. X            return ( EOF );
  1869. X            }
  1870. X
  1871. X        yy_ch_buf[0] = '\n';
  1872. X        yy_n_chars = 1;
  1873. X        yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
  1874. X        yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
  1875. X        yy_eof_has_been_seen = 0;
  1876. X        yytext = yy_c_buf_p = &yy_ch_buf[1];
  1877. X        yy_hold_char = *yy_c_buf_p;
  1878. X
  1879. X        return ( input() );
  1880. X        }
  1881. X        break;
  1882. X
  1883. X        case EOB_ACT_RESTART_SCAN:
  1884. X        yy_c_buf_p = yytext;
  1885. X        break;
  1886. X
  1887. X        case EOB_ACT_LAST_MATCH:
  1888. X        YY_FATAL_ERROR( "unexpected last match in input()" );
  1889. X        }
  1890. X    }
  1891. X
  1892. X    c = *yy_c_buf_p;
  1893. X    yy_hold_char = *++yy_c_buf_p;
  1894. X
  1895. X    return ( c );
  1896. X    }
  1897. X
  1898. X
  1899. X#ifdef __STDC__
  1900. Xstatic void yyrestart( FILE *input_file )
  1901. X#else
  1902. Xstatic void yyrestart( input_file )
  1903. XFILE *input_file;
  1904. X#endif
  1905. X
  1906. X    {
  1907. X    if ( yyin != stdin )
  1908. X    fclose( yyin );
  1909. X
  1910. X    yyin = input_file;
  1911. X    yy_init = 1;
  1912. X    }
  1913. X# line 127 "lev_comp.l"
  1914. X
  1915. X#ifdef    AMIGA
  1916. Xlong *alloc(n)
  1917. X    unsigned n;
  1918. X{
  1919. X    return ((long *)malloc (n));
  1920. X}
  1921. X#endif
  1922. END_OF_FILE
  1923. if test 31273 -ne `wc -c <'others/lev_lex.c'`; then
  1924.     echo shar: \"'others/lev_lex.c'\" unpacked with wrong size!
  1925. fi
  1926. # end of 'others/lev_lex.c'
  1927. fi
  1928. echo shar: End of archive 25 \(of 56\).
  1929. cp /dev/null ark25isdone
  1930. MISSING=""
  1931. for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 ; do
  1932.     if test ! -f ark${I}isdone ; then
  1933.     MISSING="${MISSING} ${I}"
  1934.     fi
  1935. done
  1936. if test "${MISSING}" = "" ; then
  1937.     echo You have unpacked all 56 archives.
  1938.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  1939. else
  1940.     echo You still need to unpack the following archives:
  1941.     echo "        " ${MISSING}
  1942. fi
  1943. ##  End of shell archive.
  1944. exit 0
  1945.