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

  1. Path: uunet!gatech!news-feed-1.peachnet.edu!emory!ogicse!news.tek.com!saab!billr
  2. From: billr@saab.CNA.TEK.COM (Bill Randle)
  3. Newsgroups: comp.sources.games
  4. Subject: v17i100:  nethack31 - display oriented dungeons & dragons (Ver. 3.1), Patch2y/33
  5. Message-ID: <1v8itv$j7r@ying.cna.tek.com>
  6. Date: 11 Jun 93 00:17:03 GMT
  7. Article-I.D.: ying.1v8itv$j7r
  8. Organization: Tektronix, Inc, Redmond, OR, USA
  9. Lines: 2169
  10. Approved: billr@saab.CNA.TEK.COM
  11. NNTP-Posting-Host: saab.cna.tek.com
  12. Xref: uunet comp.sources.games:1763
  13.  
  14. Submitted-by: izchak@linc.cis.upenn.edu (Izchak Miller)
  15. Posting-number: Volume 17, Issue 100
  16. Archive-name: nethack31/Patch2y
  17. Patch-To: nethack31: Volume 16, Issue 1-116
  18. Environment: Amiga, Atari, Mac, MS-DOS, Windows-NT, OS2, Unix, VMS, X11
  19.  
  20.  
  21.  
  22. #! /bin/sh
  23. # This is a shell archive.  Remove anything before this line, then unpack
  24. # it by saving it into a file and typing "sh file".  To overwrite existing
  25. # files, type "sh file -c".  You can also feed this as standard input via
  26. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  27. # will see the following message at the end:
  28. #        "End of archive 25 (of 33)."
  29. # Contents:  patches02p.2 sys/share/dgn_lex.c
  30. # Wrapped by billr@saab on Thu Jun 10 16:55:06 1993
  31. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  32. if test -f 'patches02p.2' -a "${1}" != "-c" ; then 
  33.   echo shar: Renaming existing file \"'patches02p.2'\" to \"'patches02p.2.orig'\"
  34.   mv -f 'patches02p.2' 'patches02p.2.orig'
  35. fi
  36. echo shar: Extracting \"'patches02p.2'\" \(23123 characters\)
  37. sed "s/^X//" >'patches02p.2' <<'END_OF_FILE'
  38. X***************
  39. X*** 2031,2037 ****
  40. X  {
  41. X      Rect r = theWindow -> portRect ;
  42. X      Rect r2 = r ;
  43. X!     NhWindow * aWin = ( NhWindow * ) GetWRefCon ( theWindow ) ;
  44. X      RgnHandle h ;
  45. X      Boolean vis ;
  46. X  
  47. X--- 2020,2026 ----
  48. X  {
  49. X      Rect r = theWindow -> portRect ;
  50. X      Rect r2 = r ;
  51. X!     NhWindow * aWin = GetNhWin ( theWindow ) ;
  52. X      RgnHandle h ;
  53. X      Boolean vis ;
  54. X  
  55. X***************
  56. X*** 2077,2082 ****
  57. X--- 2066,2074 ----
  58. X  static void
  59. X  macCursorNull ( EventRecord * theEvent , WindowPtr theWindow , RgnHandle mouseRgn )
  60. X  {
  61. X+ #if defined(applec)
  62. X+ # pragma unused(theWindow)
  63. X+ #endif
  64. X      Rect r = { -1 , -1 , 2 , 2 } ;
  65. X  
  66. X      InitCursor ( ) ;
  67. X***************
  68. X*** 2088,2093 ****
  69. X--- 2080,2088 ----
  70. X  static void
  71. X  macCursorMessage ( EventRecord * theEvent , WindowPtr theWindow , RgnHandle mouseRgn )
  72. X  {
  73. X+ #if defined(applec)
  74. X+ # pragma unused(theWindow)
  75. X+ #endif
  76. X      Rect r = { -1 , -1 , 2 , 2 } ;
  77. X  
  78. X      InitCursor ( ) ;
  79. X***************
  80. X*** 2097,2120 ****
  81. X  
  82. X  
  83. X  static void
  84. X! macCursorStatus ( EventRecord * theEvent , WindowPtr theWindow , RgnHandle mouseRgn )
  85. X  {
  86. X-     Rect r = { -1 , -1 , 2 , 2 } ;
  87. X- 
  88. X-     InitCursor ( ) ;
  89. X-     OffsetRect ( & r , theEvent -> where . h , theEvent -> where . v ) ;
  90. X-     RectRgn ( mouseRgn , & r ) ;
  91. X- }
  92. X- 
  93. X- 
  94. X- static void
  95. X- macCursorMap ( EventRecord * theEvent , WindowPtr theWindow , RgnHandle mouseRgn )
  96. X- {
  97. X      Point where ;
  98. X      char * dir_bas , * dir ;
  99. X      CursHandle ch ;
  100. X      GrafPtr gp ;
  101. X!     NhWindow * nhw = ( NhWindow * ) GetWRefCon ( theWindow ) ;
  102. X      Rect r = { 0 , 0 , 1 , 1 } ;
  103. X  
  104. X      GetPort ( & gp ) ;
  105. X--- 2092,2104 ----
  106. X  
  107. X  
  108. X  static void
  109. X! macCursorTerm ( EventRecord * theEvent , WindowPtr theWindow , RgnHandle mouseRgn )
  110. X  {
  111. X      Point where ;
  112. X      char * dir_bas , * dir ;
  113. X      CursHandle ch ;
  114. X      GrafPtr gp ;
  115. X!     NhWindow * nhw = GetNhWin ( theWindow ) ;
  116. X      Rect r = { 0 , 0 , 1 , 1 } ;
  117. X  
  118. X      GetPort ( & gp ) ;
  119. X***************
  120. X*** 2127,2133 ****
  121. X          dir = NULL ;
  122. X      else {
  123. X          dir_bas = flags . num_pad ? ndir : sdir ;
  124. X!         dir = strchr ( dir_bas , click_to_cmd ( where . h / nhw -> charWidth ,
  125. X                                                  where . v / nhw -> charHeight ,
  126. X                                                  CLICK_1 ) ) ;
  127. X      }
  128. X--- 2111,2117 ----
  129. X          dir = NULL ;
  130. X      else {
  131. X          dir_bas = flags . num_pad ? ndir : sdir ;
  132. X!         dir = strchr ( dir_bas , click_to_cmd ( where . h / nhw -> charWidth + 1 ,
  133. X                                                  where . v / nhw -> charHeight ,
  134. X                                                  CLICK_1 ) ) ;
  135. X      }
  136. X***************
  137. X*** 2152,2157 ****
  138. X--- 2136,2144 ----
  139. X  static void
  140. X  macCursorMenu ( EventRecord * theEvent , WindowPtr theWindow , RgnHandle mouseRgn )
  141. X  {
  142. X+ #if defined(applec)
  143. X+ # pragma unused(theWindow)
  144. X+ #endif
  145. X      Rect r = { -1 , -1 , 2 , 2 } ;
  146. X  
  147. X      InitCursor ( ) ;
  148. X***************
  149. X*** 2163,2168 ****
  150. X--- 2150,2158 ----
  151. X  static void
  152. X  macCursorText ( EventRecord * theEvent , WindowPtr theWindow , RgnHandle mouseRgn )
  153. X  {
  154. X+ #if defined(applec)
  155. X+ # pragma unused(theWindow)
  156. X+ #endif
  157. X      Rect r = { -1 , -1 , 2 , 2 } ;
  158. X  
  159. X      InitCursor ( ) ;
  160. X***************
  161. X*** 2174,2179 ****
  162. X--- 2164,2174 ----
  163. X  void
  164. X  UpdateMenus ( void )
  165. X  {
  166. X+ #if 1    /* see macmenu.c:AdjustMenus */
  167. X+     extern void AdjustMenus(short);
  168. X+ 
  169. X+     AdjustMenus(0);
  170. X+ #else
  171. X      WindowPeek w = ( WindowPeek ) FrontWindow ( ) ;
  172. X      Boolean enable = FALSE ;
  173. X      int i ;
  174. X***************
  175. X*** 2192,2197 ****
  176. X--- 2187,2193 ----
  177. X              DisableItem ( editMenu , i ) ;
  178. X          }
  179. X      }
  180. X+ #endif    /* see macmenu.c:AdjustMenus */
  181. X  }
  182. X  
  183. X  
  184. X***************
  185. X*** 2198,2203 ****
  186. X--- 2194,2204 ----
  187. X  void
  188. X  DoMenu ( long choise )
  189. X  {
  190. X+ #if 1    /* see macmenu.c:DoMenuEvt */
  191. X+     extern void DoMenuEvt(long);
  192. X+ 
  193. X+     DoMenuEvt(choise);
  194. X+ #else
  195. X      WindowPeek w = ( WindowPeek ) FrontWindow ( ) ;
  196. X      short menu = choise >> 16 ;
  197. X      short item = choise & 0xffff ;
  198. X***************
  199. X*** 2223,2233 ****
  200. X              str [ 0 ] = QUEUE_LEN ;
  201. X          }
  202. X          for ( i = 1 ; i <= str [ 0 ] ; i ++ ) {
  203. X!             addToKeyQueue ( str [ i ] , 0 ) ;
  204. X          }
  205. X      }
  206. X  
  207. X      HiliteMenu ( 0 ) ;
  208. X  }
  209. X  
  210. X  
  211. X--- 2224,2235 ----
  212. X              str [ 0 ] = QUEUE_LEN ;
  213. X          }
  214. X          for ( i = 1 ; i <= str [ 0 ] ; i ++ ) {
  215. X!             AddToKeyQueue ( str [ i ] , 0 ) ;
  216. X          }
  217. X      }
  218. X  
  219. X      HiliteMenu ( 0 ) ;
  220. X+ #endif    /* see macmenu.c:DoMenuEvt */
  221. X  }
  222. X  
  223. X  
  224. X***************
  225. X*** 2253,2260 ****
  226. X  
  227. X  dispatchKey :
  228. X          if ( theWindow ) {
  229. X!             ( ( NhWindow * ) GetWRefCon ( theWindow ) ) -> keyFunc ( theEvent ,
  230. X!                 theWindow ) ;
  231. X          } else {
  232. X              GeneralKey ( theEvent , (WindowPtr) NULL ) ;
  233. X          }
  234. X--- 2255,2261 ----
  235. X  
  236. X  dispatchKey :
  237. X          if ( theWindow ) {
  238. X!             GetNhWin ( theWindow ) -> keyFunc ( theEvent , theWindow ) ;
  239. X          } else {
  240. X              GeneralKey ( theEvent , (WindowPtr) NULL ) ;
  241. X          }
  242. X***************
  243. X*** 2274,2280 ****
  244. X      InsetRect ( & r , 4 , 4 ) ;
  245. X  
  246. X      code = FindWindow ( theEvent -> where , & theWindow ) ;
  247. X!     aWin = ( NhWindow * ) GetWRefCon ( theWindow ) ;
  248. X  
  249. X      if ( code != inContent ) {
  250. X          InitCursor ( ) ;
  251. X--- 2275,2281 ----
  252. X      InsetRect ( & r , 4 , 4 ) ;
  253. X  
  254. X      code = FindWindow ( theEvent -> where , & theWindow ) ;
  255. X!     aWin = GetNhWin ( theWindow ) ;
  256. X  
  257. X      if ( code != inContent ) {
  258. X          InitCursor ( ) ;
  259. X***************
  260. X*** 2287,2294 ****
  261. X          if ( inSelect == WIN_ERR || aWin - theWindows == inSelect ) {
  262. X              SelectWindow ( theWindow ) ;
  263. X              SetPort ( theWindow ) ;
  264. X!             ( ( NhWindow * ) GetWRefCon ( theWindow ) ) -> clickFunc ( theEvent ,
  265. X!                 theWindow ) ;
  266. X          } else {
  267. X              nhbell ( ) ;
  268. X          }
  269. X--- 2288,2294 ----
  270. X          if ( inSelect == WIN_ERR || aWin - theWindows == inSelect ) {
  271. X              SelectWindow ( theWindow ) ;
  272. X              SetPort ( theWindow ) ;
  273. X!             GetNhWin ( theWindow ) -> clickFunc ( theEvent , theWindow ) ;
  274. X          } else {
  275. X              nhbell ( ) ;
  276. X          }
  277. X***************
  278. X*** 2325,2343 ****
  279. X          break ;
  280. X  
  281. X      case inGoAway :
  282. X!         if ( TrackGoAway ( theWindow , theEvent -> where ) ) {
  283. X!             if ( aWin - theWindows == BASE_WINDOW && ! flags . window_inited ) {
  284. X!                 addToKeyQueue ( '\033' , 1 ) ;
  285. X!                 break ;
  286. X!             } else {
  287. X!                 HideWindow ( theWindow ) ;
  288. X!             }
  289. X!             if ( inSelect == WIN_ERR || aWin - theWindows != inSelect ) {
  290. X!                 destroy_nhwindow ( aWin - theWindows ) ;
  291. X!             } else {
  292. X!                 addToKeyQueue ( '\033' , 1 ) ;
  293. X!             }
  294. X!         }
  295. X          break ;
  296. X  
  297. X      case inMenuBar :
  298. X--- 2325,2331 ----
  299. X          break ;
  300. X  
  301. X      case inGoAway :
  302. X!         WindowGoAway(theEvent, theWindow);
  303. X          break ;
  304. X  
  305. X      case inMenuBar :
  306. X***************
  307. X*** 2363,2370 ****
  308. X      BeginUpdate ( theWindow ) ;
  309. X      SetPort ( theWindow ) ;
  310. X      EraseRect ( & ( theWindow -> portRect ) ) ;
  311. X!     ( ( NhWindow * ) GetWRefCon ( theWindow ) ) -> updateFunc ( theEvent ,
  312. X!         theWindow ) ;
  313. X      EndUpdate ( theWindow ) ;
  314. X  }
  315. X  
  316. X--- 2351,2357 ----
  317. X      BeginUpdate ( theWindow ) ;
  318. X      SetPort ( theWindow ) ;
  319. X      EraseRect ( & ( theWindow -> portRect ) ) ;
  320. X!     GetNhWin ( theWindow ) -> updateFunc ( theEvent , theWindow ) ;
  321. X      EndUpdate ( theWindow ) ;
  322. X  }
  323. X  
  324. X***************
  325. X*** 2388,2394 ****
  326. X  
  327. X          } else {
  328. X  
  329. X!             NhWindow * nhw = ( ( NhWindow * ) GetWRefCon ( wp ) ) ;
  330. X              if ( nhw ) {
  331. X                  nhw -> cursorFunc ( theEvent , wp , gMouseRgn ) ;
  332. X              }
  333. X--- 2375,2381 ----
  334. X  
  335. X          } else {
  336. X  
  337. X!             NhWindow * nhw = GetNhWin ( wp ) ;
  338. X              if ( nhw ) {
  339. X                  nhw -> cursorFunc ( theEvent , wp , gMouseRgn ) ;
  340. X              }
  341. X***************
  342. X*** 2440,2456 ****
  343. X  long doDawdle = 0L ;
  344. X  
  345. X  void
  346. X  DimMenuBar ( void )
  347. X  {
  348. X!     DisableItem ( appleMenu , 0 ) ;
  349. X!     DisableItem ( fileMenu , 0 ) ;
  350. X!     DisableItem ( editMenu , 0 ) ;
  351. X!     DisableItem ( actionMenu , 0 ) ;
  352. X!     DisableItem ( inventoryMenu , 0 ) ;
  353. X!     DisableItem ( thingsMenu , 0 ) ;
  354. X!     DisableItem ( extendedMenu , 0 ) ;
  355. X!     DisableItem ( infoMenu , 0 ) ;
  356. X!     DrawMenuBar ( ) ;
  357. X  }
  358. X  
  359. X  
  360. X--- 2427,2471 ----
  361. X  long doDawdle = 0L ;
  362. X  
  363. X  void
  364. X+ WindowGoAway ( EventRecord * theEvent, WindowPtr theWindow )
  365. X+ {
  366. X+     NhWindow * aWin = GetNhWin(theWindow);
  367. X+ 
  368. X+     if ( ! theEvent || TrackGoAway ( theWindow , theEvent -> where ) ) {
  369. X+         if ( aWin - theWindows == BASE_WINDOW && ! flags . window_inited ) {
  370. X+             AddToKeyQueue ( '\033' , 1 ) ;
  371. X+             return ;
  372. X+         } else {
  373. X+             HideWindow ( theWindow ) ;
  374. X+         }
  375. X+         if ( inSelect == WIN_ERR || aWin - theWindows != inSelect ) {
  376. X+             destroy_nhwindow ( aWin - theWindows ) ;
  377. X+         } else {
  378. X+             AddToKeyQueue ( '\033' , 1 ) ;
  379. X+         }
  380. X+     }
  381. X+ }
  382. X+ 
  383. X+ void
  384. X  DimMenuBar ( void )
  385. X  {
  386. X! #if 1    /* see macmenu.c:AdjustMenus */
  387. X!     extern void AdjustMenus(short);
  388. X! 
  389. X!     AdjustMenus(1);
  390. X! #else
  391. X!     if ( appleMenu ) {
  392. X!         DisableItem ( appleMenu , 0 ) ;
  393. X!         DisableItem ( fileMenu , 0 ) ;
  394. X!         DisableItem ( editMenu , 0 ) ;
  395. X!         DisableItem ( actionMenu , 0 ) ;
  396. X!         DisableItem ( inventoryMenu , 0 ) ;
  397. X!         DisableItem ( thingsMenu , 0 ) ;
  398. X!         DisableItem ( extendedMenu , 0 ) ;
  399. X!         DisableItem ( infoMenu , 0 ) ;
  400. X!         DrawMenuBar ( ) ;
  401. X!     }
  402. X! #endif    /* see macmenu.c:AdjustMenus */
  403. X  }
  404. X  
  405. X  
  406. X***************
  407. X*** 2457,2471 ****
  408. X  void
  409. X  UndimMenuBar ( void )
  410. X  {
  411. X!     EnableItem ( appleMenu , 0 ) ;
  412. X!     EnableItem ( fileMenu , 0 ) ;
  413. X!     EnableItem ( editMenu , 0 ) ;
  414. X!     EnableItem ( actionMenu , 0 ) ;
  415. X!     EnableItem ( inventoryMenu , 0 ) ;
  416. X!     EnableItem ( thingsMenu , 0 ) ;
  417. X!     EnableItem ( extendedMenu , 0 ) ;
  418. X!     EnableItem ( infoMenu , 0 ) ;
  419. X!     DrawMenuBar ( ) ;
  420. X  }
  421. X  
  422. X  static int mBarDimmed = 0 ;
  423. X--- 2472,2494 ----
  424. X  void
  425. X  UndimMenuBar ( void )
  426. X  {
  427. X! #if 1    /* see macmenu.c:AdjustMenus */
  428. X!     extern void AdjustMenus(short);
  429. X! 
  430. X!     AdjustMenus(0);
  431. X! #else
  432. X!     if ( appleMenu ) {
  433. X!         EnableItem ( appleMenu , 0 ) ;
  434. X!         EnableItem ( fileMenu , 0 ) ;
  435. X!         EnableItem ( editMenu , 0 ) ;
  436. X!         EnableItem ( actionMenu , 0 ) ;
  437. X!         EnableItem ( inventoryMenu , 0 ) ;
  438. X!         EnableItem ( thingsMenu , 0 ) ;
  439. X!         EnableItem ( extendedMenu , 0 ) ;
  440. X!         EnableItem ( infoMenu , 0 ) ;
  441. X!         DrawMenuBar ( ) ;
  442. X!     }
  443. X! #endif    /* see macmenu.c:AdjustMenus */
  444. X  }
  445. X  
  446. X  static int mBarDimmed = 0 ;
  447. X***************
  448. X*** 2499,2505 ****
  449. X          anEvent . what = nullEvent ;
  450. X      }
  451. X      doDawdle = 0L ;
  452. X!     HandleEvent ( & anEvent ) ;
  453. X  
  454. X      if (top_line && theWindows) {
  455. X          WindowPeek win = (WindowPeek)theWindows[WIN_MESSAGE].theWindow;
  456. X--- 2522,2532 ----
  457. X          anEvent . what = nullEvent ;
  458. X      }
  459. X      doDawdle = 0L ;
  460. X! #if 0
  461. X!     /* I don't want to make the tty cursor blinking. */
  462. X!     if ( handle_tty_event ( _mt_window , & anEvent ) )    
  463. X! #endif
  464. X!         HandleEvent ( & anEvent ) ;
  465. X  
  466. X      if (top_line && theWindows) {
  467. X          WindowPeek win = (WindowPeek)theWindows[WIN_MESSAGE].theWindow;
  468. X***************
  469. X*** 2510,2534 ****
  470. X  
  471. X  
  472. X  int
  473. X! mac_nhgetch( void )
  474. X! {
  475. X!     int ch ;
  476. X!     register int i ;
  477. X!     NhWindow * nhw = flags . window_inited ? theWindows + WIN_MAP : nil ;
  478. X  
  479. X      if ( theWindows ) {
  480. X!         NhWindow * aWin = theWindows + WIN_MESSAGE ;
  481. X!         if ( aWin )
  482. X              aWin -> last_more_lin = aWin -> lin ;
  483. X      }
  484. X  
  485. X      wait_synch ( ) ;
  486. X  
  487. X-     if ( nhw && ! nhw -> cursorDrawn && nhw -> theWindow ) {
  488. X-         SetPort ( nhw -> theWindow ) ;
  489. X-         DrawMapCursor ( nhw ) ;
  490. X-     }
  491. X- 
  492. X      if ( ! keyQueue [ 0 ] ) {
  493. X          long total , contig ;
  494. X          static char warn = 0 ;
  495. X--- 2537,2570 ----
  496. X  
  497. X  
  498. X  int
  499. X! GetFromKeyQueue ( void ) {
  500. X! int ix , ret ;
  501. X  
  502. X+     ret = keyQueue [ 0 ] ;
  503. X+     for ( ix = 0 ; ix < QUEUE_LEN - 1 ; ix ++ ) {
  504. X+         keyQueue [ ix ] = keyQueue [ ix + 1 ] ;
  505. X+     }
  506. X+     keyQueue [ ix ] = 0 ;
  507. X+ 
  508. X+     return ret ;
  509. X+ }
  510. X+ 
  511. X+ 
  512. X+ int
  513. X+ mac_nhgetch( void ) {
  514. X+ int ch ;
  515. X+ NhWindow * nhw = flags . window_inited ? theWindows + WIN_MAP : nil ;
  516. X+ 
  517. X      if ( theWindows ) {
  518. X!     NhWindow * aWin = theWindows + WIN_MESSAGE ;
  519. X! 
  520. X!         if ( WIN_MESSAGE > 0 ) {
  521. X              aWin -> last_more_lin = aWin -> lin ;
  522. X+         }
  523. X      }
  524. X  
  525. X      wait_synch ( ) ;
  526. X  
  527. X      if ( ! keyQueue [ 0 ] ) {
  528. X          long total , contig ;
  529. X          static char warn = 0 ;
  530. X***************
  531. X*** 2550,2558 ****
  532. X          if ( nhw ) {
  533. X              SetPort ( nhw -> theWindow ) ;
  534. X              if ( WaitMouseUp ( ) ) {
  535. X!                 unsigned long tick = TickCount ( ) ;
  536. X                  if ( tick >= gNextClickRepeat ) {
  537. X!                     Point where ;
  538. X                      GetMouse ( & where ) ;
  539. X                      SetPt ( & clicked_pos , where . h / nhw -> charWidth ,
  540. X                                              where . v / nhw -> charHeight ) ;
  541. X--- 2586,2596 ----
  542. X          if ( nhw ) {
  543. X              SetPort ( nhw -> theWindow ) ;
  544. X              if ( WaitMouseUp ( ) ) {
  545. X!             unsigned long tick = TickCount ( ) ;
  546. X! 
  547. X                  if ( tick >= gNextClickRepeat ) {
  548. X!                 Point where ;
  549. X! 
  550. X                      GetMouse ( & where ) ;
  551. X                      SetPt ( & clicked_pos , where . h / nhw -> charWidth ,
  552. X                                              where . v / nhw -> charHeight ) ;
  553. X***************
  554. X*** 2559,2572 ****
  555. X                      gClickedToMove = TRUE ;
  556. X                      gNextClickRepeat = tick + * ( short * ) KeyRepThresh ;
  557. X                  }
  558. X!                 if ( doDawdle > * ( short * ) KeyRepThresh )
  559. X                      doDawdle = * ( short * ) KeyRepThresh ;
  560. X!             } else
  561. X                  gNextClickRepeat = 0xffffffff ;
  562. X          }
  563. X  
  564. X          get_nh_event ( ) ;
  565. X!         ch = keyQueue [ 0 ] ;
  566. X      } while ( ! ch && ! gClickedToMove ) ;
  567. X  
  568. X      if ( ! gClickedToMove ) {
  569. X--- 2597,2612 ----
  570. X                      gClickedToMove = TRUE ;
  571. X                      gNextClickRepeat = tick + * ( short * ) KeyRepThresh ;
  572. X                  }
  573. X!                 if ( doDawdle > * ( short * ) KeyRepThresh ) {
  574. X                      doDawdle = * ( short * ) KeyRepThresh ;
  575. X!                 }
  576. X!             } else {
  577. X                  gNextClickRepeat = 0xffffffff ;
  578. X+             }
  579. X          }
  580. X  
  581. X          get_nh_event ( ) ;
  582. X!         ch = GetFromKeyQueue ( ) ;
  583. X      } while ( ! ch && ! gClickedToMove ) ;
  584. X  
  585. X      if ( ! gClickedToMove ) {
  586. X***************
  587. X*** 2574,2583 ****
  588. X      } else {
  589. X          gClickedToMove = 0 ;
  590. X      }
  591. X-     for ( i = 0 ; i < QUEUE_LEN - 1 ; i ++ ) {
  592. X-         keyQueue [ i ] = keyQueue [ i + 1 ] ;
  593. X-     }
  594. X-     keyQueue [ i ] = 0 ;
  595. X  
  596. X  #ifdef MAC_THINKC5
  597. X      if (ch == '\r') ch = '\n';
  598. X--- 2614,2619 ----
  599. X***************
  600. X*** 2625,2647 ****
  601. X  void
  602. X  mac_raw_print ( const char * str )
  603. X  {
  604. X!     /* Here and in mac_raw_print_bold I assume that once theWindows got
  605. X!        allocated by mac_init_nhwindows we can safely do putstr on BASE_WINDOW,
  606. X!        even after mac_exit_nhwindows is called or flags.window_inited is reset
  607. X!        to zero.  Is this assumption correct?
  608. X!        Also add a space or a bullet before each line to indicate the bold face
  609. X!        before we really implement the text attributes */
  610. X!     if ( theWindows ) {
  611. X!         char lstr [ 200 ] = " " ;
  612. X!         strcat ( lstr , str ) ;
  613. X! 
  614. X!         ShowWindow ( theWindows [ BASE_WINDOW ] . theWindow ) ;
  615. X!         SelectWindow ( theWindows [ BASE_WINDOW ] . theWindow ) ;
  616. X! 
  617. X!         putstr ( BASE_WINDOW , 0 , lstr ) ;
  618. X! 
  619. X!     } else
  620. X!         showerror ( str , NULL ) ;
  621. X  }
  622. X  
  623. X  
  624. X--- 2661,2667 ----
  625. X  void
  626. X  mac_raw_print ( const char * str )
  627. X  {
  628. X!     tty_raw_print(str);
  629. X  }
  630. X  
  631. X  
  632. X***************
  633. X*** 2648,2666 ****
  634. X  void
  635. X  mac_raw_print_bold ( const char * str )
  636. X  {
  637. X!     if ( theWindows ) {
  638. X!         char lstr [ 200 ] = "\xA5"/*bullet*/ ;
  639. X!         strcat ( lstr , str ) ;
  640. X! 
  641. X!         ShowWindow ( theWindows [ BASE_WINDOW ] . theWindow ) ;
  642. X!         SelectWindow ( theWindows [ BASE_WINDOW ] . theWindow ) ;
  643. X! 
  644. X!         putstr ( BASE_WINDOW , ATR_BOLD , lstr ) ;
  645. X! 
  646. X!     } else {
  647. X!         nhbell ( ) ;
  648. X!         showerror ( str , NULL ) ;
  649. X!     }
  650. X  }
  651. X  
  652. X  
  653. X--- 2668,2674 ----
  654. X  void
  655. X  mac_raw_print_bold ( const char * str )
  656. X  {
  657. X!     tty_raw_print_bold(str);
  658. X  }
  659. X  
  660. X  
  661. X***************
  662. X*** 2667,2682 ****
  663. X  void
  664. X  mac_exit_nhwindows ( const char * s )
  665. X  {
  666. X!     if ( s ) {
  667. X!         raw_print ( s ) ;
  668. X!         display_nhwindow ( BASE_WINDOW , TRUE ) ;
  669. X!     }
  670. X! 
  671. X!     clear_nhwindow ( BASE_WINDOW ) ;
  672. X!     flags . window_inited = 0 ;
  673. X!     destroy_nhwindow ( WIN_MAP ) ;
  674. X      destroy_nhwindow ( WIN_MESSAGE ) ;
  675. X-     destroy_nhwindow ( WIN_STATUS ) ;
  676. X      destroy_nhwindow ( WIN_INVEN ) ;
  677. X  }
  678. X  
  679. X--- 2675,2683 ----
  680. X  void
  681. X  mac_exit_nhwindows ( const char * s )
  682. X  {
  683. X!     clear_screen ( ) ;
  684. X!     tty_exit_nhwindows ( s ) ;
  685. X      destroy_nhwindow ( WIN_MESSAGE ) ;
  686. X      destroy_nhwindow ( WIN_INVEN ) ;
  687. X  }
  688. X  
  689. X***************
  690. X*** 2694,2700 ****
  691. X      Rect r ;
  692. X  
  693. X      if ( in_putstr > 3 ) {
  694. X!         DebugStr ( ( ConstStr255Param ) "\pRecursion!" ) ;
  695. X          return ;
  696. X      }
  697. X      if ( win < 0 || win >= NUM_MACWINDOWS ) {
  698. X--- 2695,2701 ----
  699. X      Rect r ;
  700. X  
  701. X      if ( in_putstr > 3 ) {
  702. X!         /* DebugStr ( ( ConstStr255Param ) "\pRecursion!" ) ; */
  703. X          return ;
  704. X      }
  705. X      if ( win < 0 || win >= NUM_MACWINDOWS ) {
  706. X***************
  707. X*** 2707,2735 ****
  708. X          return ;
  709. X      }
  710. X  
  711. X      in_putstr ++ ;
  712. X      kind = ( ( WindowPeek ) ( aWin -> theWindow ) ) -> windowKind -
  713. X          WIN_BASE_KIND ;
  714. X      slen = strlen ( str ) ;
  715. X  
  716. X!     if ( kind == NHW_MAP || kind == NHW_STATUS ) {
  717. X!         char *row;
  718. X!         r.right     = aWin->theWindow->portRect.right;
  719. X!         r.left     = aWin->charWidth    * aWin->cursor.h;
  720. X!         r.bottom = aWin->charHeight *(aWin->cursor.v + 1);
  721. X!         r.top     = r.bottom - aWin->charHeight;
  722. X!         EraseRect(&r);
  723. X!         MoveTo(r.left, r.bottom - aWin->leading);
  724. X!         DrawText(str, 0, slen);
  725. X! 
  726. X!         if (slen > NUM_COLS - aWin->cursor.h)
  727. X!             slen = NUM_COLS - aWin->cursor.h;
  728. X!         row = &((MapData *)*aWin->windowText)->map[aWin->cursor.v][aWin->cursor.h];
  729. X!         strncpy(row, str, slen);
  730. X!         memset(row + slen, CHAR_BLANK, NUM_COLS - slen - aWin->cursor.h);
  731. X!         curs(win, NUM_COLS, aWin->cursor.v);
  732. X! 
  733. X!     } else {
  734. X          char * sr , * ds ;
  735. X  
  736. X          r = aWin->theWindow->portRect;
  737. X--- 2708,2724 ----
  738. X          return ;
  739. X      }
  740. X  
  741. X+     if (aWin->theWindow == _mt_window) {
  742. X+         tty_putstr(win, attr, str);
  743. X+         return;
  744. X+     }
  745. X+ 
  746. X      in_putstr ++ ;
  747. X      kind = ( ( WindowPeek ) ( aWin -> theWindow ) ) -> windowKind -
  748. X          WIN_BASE_KIND ;
  749. X      slen = strlen ( str ) ;
  750. X  
  751. X!     {
  752. X          char * sr , * ds ;
  753. X  
  754. X          r = aWin->theWindow->portRect;
  755. X***************
  756. X*** 2798,2861 ****
  757. X  
  758. X  
  759. X  void
  760. X- putsym ( winid win , int x , int y , CHAR_P sym )
  761. X- {
  762. X-     NhWindow * aWin = & theWindows [ win ] ;
  763. X-     int kind = ( ( WindowPeek ) ( aWin -> theWindow ) ) -> windowKind
  764. X-         - WIN_BASE_KIND ;
  765. X-     Rect update ;
  766. X- 
  767. X-     aWin -> clear = 0 ;
  768. X-     /*
  769. X-      * We don't need to invalidate the old position or set the window,
  770. X-      * since curs() will do that.
  771. X-      */
  772. X-     curs ( win , x , y ) ;
  773. X-     x = aWin -> cursor . h ;
  774. X-     y = aWin -> cursor . v ;
  775. X- 
  776. X-     if ( kind == NHW_MAP || kind == NHW_STATUS) {
  777. X-         switch ( sym ) {
  778. X-         case CHAR_LF :
  779. X-         case CHAR_CR :
  780. X-             curs ( win , 1 , y + 1 ) ;
  781. X-             break ;
  782. X-         case CHAR_BS :
  783. X-             if ( x ) {
  784. X-                 curs ( win , x - 1 , y ) ;
  785. X-             }
  786. X-             break ;
  787. X-         default :
  788. X-             /*
  789. X-              * Curs() takes care of getting cursor . v within range even for
  790. X-              * the shorter status window - note; this assumes the status and
  791. X-              * the map windows have the same width !
  792. X-              */
  793. X-             update . top = y * aWin -> charHeight ;
  794. X-             update . bottom = ( y + 1 ) * aWin -> charHeight ;
  795. X-             update . left = x * aWin -> charWidth ;
  796. X-             update . right = ( x + 1 ) * aWin -> charWidth ;
  797. X-             EraseRect ( & update ) ;
  798. X-             MoveTo ( x * aWin -> charWidth , ( y + 1 ) * aWin -> charHeight -
  799. X-                 aWin -> leading ) ;
  800. X-             ( ( MapData * ) * aWin -> windowText ) -> map [ y ] [ x ] = sym ;
  801. X-             DrawChar ( sym ) ;
  802. X-             break ;
  803. X-         }
  804. X-     } else {
  805. X- #if 1
  806. X-         Debugger ( ) ;
  807. X- #else
  808. X-         char ss [ 2 ] ;
  809. X-         ss [ 0 ] = sym ;
  810. X-         ss [ 1 ] = 0 ;
  811. X-         putstr ( win , 0 , ss ) ;
  812. X- #endif
  813. X-     }
  814. X- }
  815. X- 
  816. X- 
  817. X- void
  818. X  mac_curs ( winid win , int x , int y )
  819. X  {
  820. X      NhWindow * aWin = & theWindows [ win ] ;
  821. X--- 2787,2792 ----
  822. X***************
  823. X*** 2862,2889 ****
  824. X      int kind = ( ( WindowPeek ) ( aWin -> theWindow ) ) -> windowKind -
  825. X          WIN_BASE_KIND ;
  826. X  
  827. X!     SetPort  ( aWin -> theWindow ) ;
  828. X!     if ( kind == NHW_MAP || kind == NHW_STATUS ) {
  829. X!         Rect update ;
  830. X!         if ( x >= NUM_COLS ) {
  831. X!             x = 1 ; y ++ ;
  832. X!         }
  833. X!         if ( y >= ( kind == NHW_STATUS ? NUM_STAT_ROWS : NUM_ROWS ) ) {
  834. X!             y = 0 ; x = 1 ;
  835. X!         }
  836. X!         if ( aWin -> cursorDrawn ) {
  837. X!             update . top = aWin -> cursor . v * aWin -> charHeight ;
  838. X!             update . bottom = ( aWin -> cursor . v + 1 ) * aWin -> charHeight ;
  839. X!             update . left = aWin -> cursor . h * aWin -> charWidth ;
  840. X!             update . right = ( aWin -> cursor . h + 1 ) * aWin -> charWidth ;
  841. X!             EraseRect ( & update ) ;
  842. X!             MoveTo ( aWin -> cursor . h * aWin -> charWidth , ( aWin ->
  843. X!                 cursor . v + 1 ) * aWin -> charHeight - aWin -> leading ) ;
  844. X!             DrawChar ( ( ( MapData * ) * ( aWin -> windowText ) ) -> map
  845. X!                 [ aWin -> cursor . v ] [ aWin -> cursor . h ] ) ;
  846. X!             aWin -> cursorDrawn = 0 ;
  847. X!         }
  848. X      }
  849. X      MoveTo ( x * aWin -> charWidth , ( y + 1 ) * aWin -> charHeight -
  850. X          aWin -> leading ) ;
  851. X      SetPt ( & ( aWin -> cursor ) , x , y ) ;
  852. X--- 2793,2804 ----
  853. X      int kind = ( ( WindowPeek ) ( aWin -> theWindow ) ) -> windowKind -
  854. X          WIN_BASE_KIND ;
  855. X  
  856. X!     if (aWin->theWindow == _mt_window) {
  857. X!         tty_curs(win, x, y);
  858. X!         return;
  859. X      }
  860. X+ 
  861. X+     SetPort  ( aWin -> theWindow ) ;
  862. X      MoveTo ( x * aWin -> charWidth , ( y + 1 ) * aWin -> charHeight -
  863. X          aWin -> leading ) ;
  864. X      SetPt ( & ( aWin -> cursor ) , x , y ) ;
  865. X***************
  866. X*** 2890,2976 ****
  867. X  }
  868. X  
  869. X  
  870. X- /*
  871. X-  *  print_glyph
  872. X-  *
  873. X-  *  Print the glyph to the output device.  Don't flush the output device.
  874. X-  *
  875. X-  *  Since this is only called from show_glyph(), it is assumed that the
  876. X-  *  position and glyph are always correct (checked there)!
  877. X-  */
  878. X  void
  879. X  mac_print_glyph ( winid window , XCHAR_P x , XCHAR_P y , int glyph )
  880. X  {
  881. X!     unsigned int    ch;
  882. X!     register int    offset;
  883. X! 
  884. X! #define zap_color(n)
  885. X! #define cmap_color(n)
  886. X! #define trap_color(n)
  887. X! #define obj_color(n)
  888. X! #define mon_color(n)
  889. X! #define pet_color(c)
  890. X! 
  891. X!     /*
  892. X!      *  Map the glyph back to a character.
  893. X!      *
  894. X!      *  Warning:  For speed, this makes an assumption on the order of
  895. X!      *          offsets.  The order is set in display.h.
  896. X!      */
  897. X!     if ((offset = (glyph - GLYPH_SWALLOW_OFF)) >= 0) {        /* swallow */
  898. X! 
  899. X!         /* see swallow_to_glyph() in display.c */
  900. X!         ch = (uchar) showsyms[S_sw_tl + (offset & 0x7)];
  901. X!         mon_color(offset >> 3);
  902. X! 
  903. X!     } else if ((offset = (glyph - GLYPH_ZAP_OFF)) >= 0) {    /* zap beam */
  904. X! 
  905. X!         /* see zapdir_to_glyph() in display.c */
  906. X!         ch = showsyms[S_vbeam + (offset & 0x3)];
  907. X!         zap_color((offset >> 2));
  908. X! 
  909. X!     } else if ((offset = (glyph - GLYPH_CMAP_OFF)) >= 0) {    /* cmap */
  910. X! 
  911. X!         ch = showsyms[offset];
  912. X!         cmap_color(offset);
  913. X! 
  914. X!     } else if ((offset = (glyph - GLYPH_TRAP_OFF)) >= 0) {    /* trap */
  915. X! 
  916. X!         ch = (offset == WEB) ? showsyms[S_web] : showsyms[S_trap];
  917. X!         trap_color(offset);
  918. X! 
  919. X!     } else if ((offset = (glyph - GLYPH_OBJ_OFF)) >= 0) {    /* object */
  920. X! 
  921. X!         ch = oc_syms[objects[offset].oc_class];
  922. X!         obj_color(offset);
  923. X! 
  924. X!     } else if ((offset = (glyph - GLYPH_BODY_OFF)) >= 0) {    /* a corpse */
  925. X! 
  926. X!         ch = oc_syms[objects[CORPSE].oc_class];
  927. X!         mon_color(offset);
  928. X! 
  929. X!     } else if ((offset = (glyph - GLYPH_PET_OFF)) >= 0) {    /* a pet */
  930. X! 
  931. X!         ch = monsyms[mons[offset].mlet];
  932. X!         pet_color(offset);
  933. X! 
  934. X!     } else {                            /* a monster */
  935. X! 
  936. X!         ch = monsyms[mons[glyph].mlet];
  937. X!         mon_color(glyph);
  938. X!     }
  939. X! 
  940. X!     if ( ch > 255 ) {
  941. X!         error ( "cicn plotting is not supported." ) ;
  942. X!         /*
  943. X!          * cicn plotting goes here
  944. X!          */
  945. X!     } else {
  946. X!         /*
  947. X!          * Print a char from the hack font.
  948. X!          */
  949. X!         putsym ( window , x , y , ch ) ;
  950. X!     }
  951. X  }
  952. X  
  953. X  
  954. X--- 2805,2816 ----
  955. X  }
  956. X  
  957. X  
  958. X  void
  959. X  mac_print_glyph ( winid window , XCHAR_P x , XCHAR_P y , int glyph )
  960. X  {
  961. X!     if (theWindows[window].theWindow != _mt_window)
  962. X!         Debugger();
  963. X!     tty_print_glyph(window, x, y, glyph);
  964. X  }
  965. X  
  966. X  
  967. X***************
  968. X*** 3262,3267 ****
  969. X--- 3102,3108 ----
  970. X  void
  971. X  mac_player_selection ( void )
  972. X  {
  973. X+ #if 0    /* see macmain.c:mac_askname() and macmenu.c:DialogAskName() */
  974. X      ControlHandle    ctrl;
  975. X      DialogPtr        characterDialog;
  976. X      short            itemHit, lastItemSelected, type;
  977. X***************
  978. X*** 3372,3377 ****
  979. X--- 3213,3219 ----
  980. X      }
  981. X      
  982. X      DisposDialog(characterDialog);
  983. X+ #endif
  984. X  }
  985. X  
  986. X  void
  987. X***************
  988. X*** 3462,3470 ****
  989. X--- 3304,3317 ----
  990. X  #endif /* COM_COMPL */
  991. X      mac_number_pad,
  992. X      mac_delay_output,
  993. X+ #ifdef CHANGE_COLOR
  994. X+     donull,
  995. X+     donull,
  996. X+ #endif
  997. X      /* other defs that really should go away (they're tty specific) */
  998. X      0,    //    mac_start_screen,
  999. X      0, //    mac_end_screen,
  1000. X+     genl_outrip,
  1001. X  } ;
  1002. X  
  1003. X  /*macwin.c*/
  1004. END_OF_FILE
  1005. if test 23123 -ne `wc -c <'patches02p.2'`; then
  1006.     echo shar: \"'patches02p.2'\" unpacked with wrong size!
  1007. fi
  1008. # end of 'patches02p.2'
  1009. if test -f 'sys/share/dgn_lex.c' -a "${1}" != "-c" ; then 
  1010.   echo shar: Renaming existing file \"'sys/share/dgn_lex.c'\" to \"'sys/share/dgn_lex.c.orig'\"
  1011.   mv -f 'sys/share/dgn_lex.c' 'sys/share/dgn_lex.c.orig'
  1012. fi
  1013. echo shar: Extracting \"'sys/share/dgn_lex.c'\" \(32050 characters\)
  1014. sed "s/^X//" >'sys/share/dgn_lex.c' <<'END_OF_FILE'
  1015. X/* A lexical scanner for NetHack generated by flex */
  1016. X
  1017. X/* scanner skeleton version:
  1018. X * flexhack.skel 3.1.2 (from .../flex/RCS/flex.skel,v 2.16 90/08/03 14:09:36)
  1019. X */
  1020. X#define FLEX_SCANNER
  1021. X
  1022. X/* amount of stuff to slurp up with each read */
  1023. X#ifndef YY_READ_BUF_SIZE
  1024. X#define YY_READ_BUF_SIZE 8192
  1025. X#endif
  1026. X
  1027. X/* returned upon end-of-file */
  1028. X#define YY_END_TOK 0
  1029. X
  1030. X/* copy whatever the last rule matched to the standard output */
  1031. X#define ECHO (void)fwrite((genericptr_t)yytext, yyleng, 1, yyout)
  1032. X
  1033. X/* gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
  1034. X * is returned in "result".
  1035. X */
  1036. X#define YY_INPUT(buf,result,max_size) \
  1037. X    if ((result = fread((genericptr_t)buf, 1, max_size, yyin)) <= 0 && \
  1038. X        !feof(yyin))  YY_FATAL_ERROR( "fread(yyin) in flex scanner failed" );
  1039. X#define YY_NULL 0
  1040. X
  1041. X/* no semi-colon after return; correct usage is to write "yyterminate();" */
  1042. X#define yyterminate() return ( YY_NULL )
  1043. X
  1044. X/* report a fatal error */
  1045. X#define YY_FATAL_ERROR(msg) \
  1046. X    do { \
  1047. X        (void) fputs( msg, stderr ); \
  1048. X        (void) putc( '\n', stderr ); \
  1049. X        exit( 1 ); \
  1050. X    } while ( 0 )
  1051. X
  1052. X/* default yywrap function - always treat EOF as an EOF */
  1053. X#define yywrap() 1
  1054. X
  1055. X/* enter a start condition.  This macro really ought to take a parameter,
  1056. X * but we do it the disgusting crufty way forced on us by the ()-less
  1057. X * definition of BEGIN
  1058. X */
  1059. X#define BEGIN yy_start = 1 + 2 *
  1060. X
  1061. X/* action number for EOF rule of a given start state */
  1062. X#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
  1063. X
  1064. X/* special action meaning "start processing a new file" */
  1065. X#define YY_NEW_FILE \
  1066. X    do { \
  1067. X        yy_init_buffer( yy_current_buffer, yyin ); \
  1068. X        yy_load_buffer_state(); \
  1069. X    } while ( 0 )
  1070. X
  1071. X/* default declaration of generated scanner - a define so the user can
  1072. X * easily add parameters
  1073. X */
  1074. X#define YY_DECL int NDECL(yylex)
  1075. X
  1076. X/* code executed at the end of each rule */
  1077. X#define YY_BREAK break;
  1078. X
  1079. X#define YY_END_OF_BUFFER_CHAR 0
  1080. X
  1081. X#ifndef YY_BUF_SIZE
  1082. X#define YY_BUF_SIZE (YY_READ_BUF_SIZE * 2) /* size of default input buffer */
  1083. X#endif
  1084. X
  1085. Xtypedef struct yy_buffer_state *YY_BUFFER_STATE;
  1086. X
  1087. X#define YY_CHAR char
  1088. X#define INITIAL 0
  1089. X/*    SCCS Id: @(#)dgn_lex.c    3.1    92/10/23    */
  1090. X/*    Copyright (c) 1989 by Jean-Christophe Collet */
  1091. X/*    Copyright (c) 1990 by M. Stephenson         */
  1092. X/* NetHack may be freely redistributed.  See license for details. */
  1093. X
  1094. X#define DGN_COMP
  1095. X
  1096. X#include "config.h"
  1097. X#include "dgn_comp.h"
  1098. X#include "dgn_file.h"
  1099. X
  1100. Xlong *FDECL(alloc, (unsigned int));
  1101. X/*
  1102. X * Most of these don't exist in flex, yywrap is macro and
  1103. X * yyunput is properly declared in flex.skel.
  1104. X */
  1105. X#ifndef FLEX_SCANNER
  1106. Xint FDECL (yyback, (int *, int));
  1107. Xint NDECL (yylook);
  1108. Xint NDECL (yyinput);
  1109. Xint NDECL (yywrap);
  1110. Xint NDECL (yylex);
  1111. X    /* Traditional lexes let yyunput() and yyoutput() default to int;
  1112. X     * newer ones may declare them as void since they don't return
  1113. X     * values.  For even more fun, the lex supplied as part of the
  1114. X     * newer unbundled compiler for SunOS 4.x adds the void declarations
  1115. X     * (under __STDC__ or _cplusplus ifdefs -- otherwise they remain
  1116. X     * int) while the bundled lex and the one with the older unbundled
  1117. X     * compiler do not.  To detect this, we need help from outside --
  1118. X     * sys/unix/Makefile.utl.
  1119. X     */
  1120. X# if defined(NeXT) || defined(SVR4)
  1121. X#  define VOIDYYPUT
  1122. X# endif
  1123. X# if !defined(VOIDYYPUT)
  1124. X#  if defined(POSIX_TYPES) && !defined(BOS) && !defined(HISX) && !defined(_M_UNIX)
  1125. X#   define VOIDYYPUT
  1126. X#  endif
  1127. X# endif
  1128. X# if !defined(VOIDYYPUT) && defined(WEIRD_LEX)
  1129. X#  if defined(SUNOS4) && defined(__STDC__) && (WEIRD_LEX > 1) 
  1130. X#   define VOIDYYPUT
  1131. X#  endif
  1132. X# endif
  1133. X# ifdef VOIDYYPUT
  1134. Xvoid FDECL (yyunput, (int));
  1135. Xvoid FDECL (yyoutput, (int));
  1136. X# else
  1137. Xint FDECL (yyunput, (int));
  1138. Xint FDECL (yyoutput, (int));
  1139. X# endif
  1140. X#endif    /* FLEX_SCANNER */
  1141. X
  1142. Xvoid FDECL (init_yyin, (FILE *));
  1143. Xvoid FDECL (init_yyout, (FILE *));
  1144. X
  1145. X#ifdef MICRO
  1146. X#undef exit
  1147. Xextern void FDECL(exit, (int));
  1148. X#endif
  1149. X
  1150. X/* this doesn't always get put in dgn_comp.h
  1151. X * (esp. when using older versions of bison)
  1152. X */
  1153. X
  1154. Xextern YYSTYPE yylval;
  1155. X
  1156. Xint line_number = 1;
  1157. X/*
  1158. X *    This is a hack required by Michael Hamel to get things
  1159. X *    working on the Mac.
  1160. X */
  1161. X#if defined(applec) && !defined(FLEX_SCANNER)
  1162. X#undef input
  1163. X#undef unput
  1164. X#define unput(c) { yytchar = (c); if (yytchar == 10) yylineno--; *yysptr++ = yytchar; }                  
  1165. X# ifndef YYNEWLINE
  1166. X# define YYNEWLINE 10
  1167. X# endif
  1168. X
  1169. Xchar
  1170. Xinput() {    /* Under MPW \n is chr(13)! Compensate for this. */
  1171. X
  1172. X    if (yysptr > yysbuf) return(*--yysptr);
  1173. X    else {
  1174. X        yytchar = getc(yyin);
  1175. X         if (yytchar == '\n') {
  1176. X            yylineno++;
  1177. X            return(YYNEWLINE);
  1178. X        }
  1179. X        if (yytchar == EOF) return(0);
  1180. X        else            return(yytchar);
  1181. X    }
  1182. X}
  1183. X#endif    /* applec && !FLEX_SCANNER */
  1184. X
  1185. X
  1186. X/* done after the current pattern has been matched and before the
  1187. X * corresponding action - sets up yytext
  1188. X */
  1189. X#define YY_DO_BEFORE_ACTION \
  1190. X    yytext = yy_bp; \
  1191. X    yyleng = yy_cp - yy_bp; \
  1192. X    yy_hold_char = *yy_cp; \
  1193. X    *yy_cp = '\0'; \
  1194. X    yy_c_buf_p = yy_cp;
  1195. X
  1196. X#define EOB_ACT_CONTINUE_SCAN 0
  1197. X#define EOB_ACT_END_OF_FILE 1
  1198. X#define EOB_ACT_LAST_MATCH 2
  1199. X
  1200. X/* return all but the first 'n' matched characters back to the input stream */
  1201. X#define yyless(n) \
  1202. X    do { \
  1203. X        /* undo effects of setting up yytext */ \
  1204. X        *yy_cp = yy_hold_char; \
  1205. X        yy_c_buf_p = yy_cp = yy_bp + n; \
  1206. X        YY_DO_BEFORE_ACTION; /* set up yytext again */ \
  1207. X    } while ( 0 )
  1208. X
  1209. X#define unput(c) yyunput((int)c, yytext)
  1210. X
  1211. X
  1212. Xstruct yy_buffer_state {
  1213. X    FILE *yy_input_file;
  1214. X
  1215. X    YY_CHAR *yy_ch_buf;        /* input buffer */
  1216. X    YY_CHAR *yy_buf_pos;    /* current position in input buffer */
  1217. X
  1218. X    /* size of input buffer in bytes, not including room for EOB characters */
  1219. X    int yy_buf_size;
  1220. X
  1221. X    /* number of characters read into yy_ch_buf, not including EOB characters */
  1222. X    int yy_n_chars;
  1223. X
  1224. X    int yy_eof_status;        /* whether we've seen an EOF on this buffer */
  1225. X#define EOF_NOT_SEEN 0
  1226. X    /* "pending" happens when the EOF has been seen but there's still
  1227. X     * some text process
  1228. X     */
  1229. X#define EOF_PENDING 1
  1230. X#define EOF_DONE 2
  1231. X};
  1232. X
  1233. Xstatic YY_BUFFER_STATE yy_current_buffer;
  1234. X
  1235. X/* we provide macros for accessing buffer states in case in the
  1236. X * future we want to put the buffer states in a more general
  1237. X * "scanner state"
  1238. X */
  1239. X#define YY_CURRENT_BUFFER yy_current_buffer
  1240. X
  1241. X
  1242. X/* yy_hold_char holds the character lost when yytext is formed */
  1243. Xstatic YY_CHAR yy_hold_char;
  1244. X
  1245. Xstatic int yy_n_chars;        /* number of characters read into yy_ch_buf */
  1246. X
  1247. X
  1248. X#ifndef YY_USER_ACTION
  1249. X#define YY_USER_ACTION
  1250. X#endif
  1251. X
  1252. X#ifndef YY_USER_INIT
  1253. X#define YY_USER_INIT
  1254. X#endif
  1255. X
  1256. Xextern YY_CHAR *yytext;
  1257. Xextern int yyleng;
  1258. Xextern FILE *yyin, *yyout;
  1259. X
  1260. XYY_CHAR *yytext;
  1261. Xint yyleng;
  1262. X
  1263. XFILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
  1264. X
  1265. X#define YY_END_OF_BUFFER 36
  1266. Xtypedef int yy_state_type;
  1267. Xstatic const short int yy_accept[194] =
  1268. X    {   0,
  1269. X        0,    0,   36,   34,   33,   32,   34,   29,   34,   34,
  1270. X       34,   34,   34,   34,   34,   34,   34,   34,   34,   34,
  1271. X       34,   34,   34,   34,   34,   34,   34,   34,   33,    0,
  1272. X       30,   29,    0,    0,    0,    0,    0,    0,    0,    0,
  1273. X        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
  1274. X        0,    0,    0,    2,    0,   31,    0,    0,    0,    0,
  1275. X        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
  1276. X        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
  1277. X        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
  1278. X        3,    0,    0,    0,    0,    0,    0,    0,    0,    0,
  1279. X
  1280. X        0,   14,    0,    0,    0,    0,    0,    0,    4,    0,
  1281. X       25,    0,    0,    0,    0,    0,    0,    0,    0,    0,
  1282. X        6,    0,    0,    0,    5,    0,    0,   23,    0,    0,
  1283. X        0,    0,    0,    0,    0,    0,    0,    0,    0,   20,
  1284. X        0,    0,    0,    0,    8,    0,    0,    0,    0,    0,
  1285. X        0,    1,    0,    0,    0,    0,    0,   22,   15,    0,
  1286. X       21,    7,   19,    0,    0,    0,    0,    0,    0,   13,
  1287. X        0,    0,    0,   26,   16,    0,    0,   12,    0,    0,
  1288. X        0,   11,    9,    0,   17,   18,    0,   27,    0,   28,
  1289. X       24,   10,    0
  1290. X
  1291. X    } ;
  1292. X
  1293. Xstatic const YY_CHAR yy_ec[128] =
  1294. X    {   0,
  1295. X        1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
  1296. X        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  1297. X        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  1298. X        1,    2,    1,    4,    5,    1,    1,    1,    1,    1,
  1299. X        1,    1,    1,    1,    6,    1,    1,    6,    6,    6,
  1300. X        6,    6,    6,    6,    6,    6,    6,    1,    1,    1,
  1301. X        1,    1,    1,    1,    7,    8,    9,   10,   11,   12,
  1302. X       13,   14,   15,    1,    1,   16,   17,   18,   19,   20,
  1303. X        1,   21,   22,   23,   24,   25,    1,    1,   26,    1,
  1304. X        1,    1,    1,    1,   27,    1,   28,    1,   29,   30,
  1305. X
  1306. X       31,   32,   33,   34,   35,    1,   36,   37,   38,   39,
  1307. X       40,   41,    1,   42,   43,   44,   45,    1,   46,    1,
  1308. X        1,   47,    1,    1,    1,    1,    1
  1309. X    } ;
  1310. X
  1311. Xstatic const YY_CHAR yy_meta[48] =
  1312. X    {   0,
  1313. X        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  1314. X        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  1315. X        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  1316. X        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  1317. X        1,    1,    1,    1,    1,    1,    1
  1318. X    } ;
  1319. X
  1320. Xstatic const short int yy_base[196] =
  1321. X    {   0,
  1322. X        0,  212,  216,  218,  213,  218,  210,  207,  196,  190,
  1323. X      196,   37,  191,  197,  186,  188,  171,  164,  172,  174,
  1324. X      173,   18,  160,  159,  154,  157,   11,  193,  193,  190,
  1325. X      218,  187,  177,  184,  183,  167,  170,  164,  161,  166,
  1326. X      174,  155,  136,  144,  134,  132,  133,   26,  135,  143,
  1327. X      147,  128,  145,  218,  169,  218,  158,  152,  154,  159,
  1328. X      154,  145,   44,  142,   47,  124,  124,  125,  129,  129,
  1329. X      115,   27,  121,  113,  111,  120,  115,  116,  134,  142,
  1330. X      132,  128,  137,  121,  130,  129,  125,  129,  131,   97,
  1331. X      218,  105,   94,  101,   95,   96,   94,   99,  105,  101,
  1332. X
  1333. X       89,  218,   95,  112,  114,   51,  112,  107,  218,  110,
  1334. X      114,  111,  106,   96,   85,   76,   81,   82,   88,   69,
  1335. X      218,   81,   76,   75,  218,   78,   99,  218,   88,   97,
  1336. X       87,   88,   92,   93,   88,   91,   90,   71,   65,  218,
  1337. X       62,   60,   57,   56,  218,   59,   54,   74,   84,   65,
  1338. X       66,  218,   70,   65,   70,   60,   68,  218,  218,   52,
  1339. X      218,  218,  218,   46,   50,   57,   61,   67,   62,  218,
  1340. X       67,   64,   63,  218,  218,   42,   41,  218,   61,   53,
  1341. X       49,  218,  218,   50,  218,  218,   51,  218,   46,  218,
  1342. X      218,  218,  218,   61,   59
  1343. X
  1344. X    } ;
  1345. X
  1346. Xstatic const short int yy_def[196] =
  1347. X    {   0,
  1348. X      193,    1,  193,  193,  193,  193,  194,  193,  193,  193,
  1349. X      193,  193,  193,  193,  193,  193,  193,  193,  193,  193,
  1350. X      193,  193,  193,  193,  193,  193,  193,  195,  193,  194,
  1351. X      193,  193,  193,  193,  193,  193,  193,  193,  193,  193,
  1352. X      193,  193,  193,  193,  193,  193,  193,  193,  193,  193,
  1353. X      193,  193,  193,  193,  195,  193,  193,  193,  193,  193,
  1354. X      193,  193,  193,  193,  193,  193,  193,  193,  193,  193,
  1355. X      193,  193,  193,  193,  193,  193,  193,  193,  193,  193,
  1356. X      193,  193,  193,  193,  193,  193,  193,  193,  193,  193,
  1357. X      193,  193,  193,  193,  193,  193,  193,  193,  193,  193,
  1358. X
  1359. X      193,  193,  193,  193,  193,  193,  193,  193,  193,  193,
  1360. X      193,  193,  193,  193,  193,  193,  193,  193,  193,  193,
  1361. X      193,  193,  193,  193,  193,  193,  193,  193,  193,  193,
  1362. X      193,  193,  193,  193,  193,  193,  193,  193,  193,  193,
  1363. X      193,  193,  193,  193,  193,  193,  193,  193,  193,  193,
  1364. X      193,  193,  193,  193,  193,  193,  193,  193,  193,  193,
  1365. X      193,  193,  193,  193,  193,  193,  193,  193,  193,  193,
  1366. X      193,  193,  193,  193,  193,  193,  193,  193,  193,  193,
  1367. X      193,  193,  193,  193,  193,  193,  193,  193,  193,  193,
  1368. X      193,  193,    0,  193,  193
  1369. X
  1370. X    } ;
  1371. X
  1372. Xstatic const short int yy_nxt[266] =
  1373. X    {   0,
  1374. X        4,    5,    6,    7,    4,    8,    9,   10,   11,   12,
  1375. X       13,    4,    4,    4,    4,   14,    4,    4,    4,   15,
  1376. X       16,    4,    4,    4,    4,    4,    4,    4,   17,   18,
  1377. X        4,    4,    4,   19,    4,    4,   20,   21,   22,    4,
  1378. X       23,   24,   25,   26,   27,    4,    4,   36,   47,   53,
  1379. X       85,   54,   72,   73,   86,   88,   96,   48,  129,   55,
  1380. X       37,   30,   89,  192,  191,  190,  130,  189,  188,  187,
  1381. X      186,   97,  185,  184,  183,  182,  181,  180,  179,  178,
  1382. X      177,  176,  175,  174,  173,  172,  171,  170,  169,  168,
  1383. X      167,  166,  165,  164,  163,  162,  161,  160,  159,  158,
  1384. X
  1385. X      157,  156,  155,  154,  153,  152,  151,  150,  149,  148,
  1386. X      147,  146,  145,  144,  143,  142,  141,  140,  139,  138,
  1387. X      137,  136,  135,  134,  133,  132,  131,  128,  127,  126,
  1388. X      125,  124,  123,  122,  121,  120,  119,  118,  117,  116,
  1389. X      115,  114,  113,  112,  111,  110,  109,  108,  107,  106,
  1390. X      105,  104,  103,  102,  101,  100,   99,   98,   95,   94,
  1391. X       93,   92,   91,   90,   87,   84,   83,   82,   81,   80,
  1392. X       79,   56,   78,   77,   76,   75,   74,   71,   70,   69,
  1393. X       68,   67,   66,   65,   64,   63,   62,   61,   60,   59,
  1394. X       58,   57,   32,   31,   29,   56,   52,   51,   50,   49,
  1395. X
  1396. X       46,   45,   44,   43,   42,   41,   40,   39,   38,   35,
  1397. X       34,   33,   32,   31,   29,  193,   28,    3,  193,  193,
  1398. X      193,  193,  193,  193,  193,  193,  193,  193,  193,  193,
  1399. X      193,  193,  193,  193,  193,  193,  193,  193,  193,  193,
  1400. X      193,  193,  193,  193,  193,  193,  193,  193,  193,  193,
  1401. X      193,  193,  193,  193,  193,  193,  193,  193,  193,  193,
  1402. X      193,  193,  193,  193,  193
  1403. X    } ;
  1404. X
  1405. Xstatic const short int yy_chk[266] =
  1406. X    {   0,
  1407. X        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  1408. X        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  1409. X        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  1410. X        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  1411. X        1,    1,    1,    1,    1,    1,    1,   12,   22,   27,
  1412. X       63,   27,   48,   48,   63,   65,   72,   22,  106,  195,
  1413. X       12,  194,   65,  189,  187,  184,  106,  181,  180,  179,
  1414. X      177,   72,  176,  173,  172,  171,  169,  168,  167,  166,
  1415. X      165,  164,  160,  157,  156,  155,  154,  153,  151,  150,
  1416. X      149,  148,  147,  146,  144,  143,  142,  141,  139,  138,
  1417. X
  1418. X      137,  136,  135,  134,  133,  132,  131,  130,  129,  127,
  1419. X      126,  124,  123,  122,  120,  119,  118,  117,  116,  115,
  1420. X      114,  113,  112,  111,  110,  108,  107,  105,  104,  103,
  1421. X      101,  100,   99,   98,   97,   96,   95,   94,   93,   92,
  1422. X       90,   89,   88,   87,   86,   85,   84,   83,   82,   81,
  1423. X       80,   79,   78,   77,   76,   75,   74,   73,   71,   70,
  1424. X       69,   68,   67,   66,   64,   62,   61,   60,   59,   58,
  1425. X       57,   55,   53,   52,   51,   50,   49,   47,   46,   45,
  1426. X       44,   43,   42,   41,   40,   39,   38,   37,   36,   35,
  1427. X       34,   33,   32,   30,   29,   28,   26,   25,   24,   23,
  1428. X
  1429. X       21,   20,   19,   18,   17,   16,   15,   14,   13,   11,
  1430. X       10,    9,    8,    7,    5,    3,    2,  193,  193,  193,
  1431. X      193,  193,  193,  193,  193,  193,  193,  193,  193,  193,
  1432. X      193,  193,  193,  193,  193,  193,  193,  193,  193,  193,
  1433. X      193,  193,  193,  193,  193,  193,  193,  193,  193,  193,
  1434. X      193,  193,  193,  193,  193,  193,  193,  193,  193,  193,
  1435. X      193,  193,  193,  193,  193
  1436. X    } ;
  1437. X
  1438. Xstatic yy_state_type yy_last_accepting_state;
  1439. Xstatic YY_CHAR *yy_last_accepting_cpos;
  1440. X
  1441. X/* the intent behind this definition is that it'll catch
  1442. X * any uses of REJECT which flex missed
  1443. X */
  1444. X#define REJECT reject_used_but_not_detected
  1445. X#define yymore() yymore_used_but_not_detected
  1446. X#define YY_MORE_ADJ 0
  1447. X
  1448. X/* these variables are all declared out here so that section 3 code can
  1449. X * manipulate them
  1450. X */
  1451. X/* points to current character in buffer */
  1452. Xstatic YY_CHAR *yy_c_buf_p = (YY_CHAR *) 0;
  1453. Xstatic int yy_init = 1;        /* whether we need to initialize */
  1454. Xstatic int yy_start = 0;    /* start state number */
  1455. X
  1456. X/* flag which is used to allow yywrap()'s to do buffer switches
  1457. X * instead of setting up a fresh yyin.  A bit of a hack ...
  1458. X */
  1459. Xstatic int yy_did_buffer_switch_on_eof;
  1460. X
  1461. Xstatic yy_state_type NDECL(yy_get_previous_state);
  1462. Xstatic yy_state_type FDECL(yy_try_NUL_trans, (yy_state_type));
  1463. Xstatic int NDECL(yy_get_next_buffer);
  1464. X#if 0        /* not needed for NetHack */
  1465. Xstatic int NDECL(yyinput);
  1466. Xstatic void FDECL(yyunput, (int,YY_CHAR *));
  1467. X#endif
  1468. Xvoid FDECL(yyrestart, (FILE *));
  1469. Xvoid FDECL(yy_switch_to_buffer, (YY_BUFFER_STATE));
  1470. Xvoid NDECL(yy_load_buffer_state);
  1471. XYY_BUFFER_STATE FDECL(yy_create_buffer, (FILE *,int));
  1472. Xvoid FDECL(yy_delete_buffer, (YY_BUFFER_STATE));
  1473. Xvoid FDECL(yy_init_buffer, (YY_BUFFER_STATE,FILE *));
  1474. X
  1475. X#define yy_new_buffer yy_create_buffer
  1476. X
  1477. XYY_DECL
  1478. X{
  1479. X    register yy_state_type yy_current_state;
  1480. X    register YY_CHAR *yy_cp, *yy_bp;
  1481. X    register int yy_act;
  1482. X
  1483. X
  1484. X
  1485. X    if ( yy_init )
  1486. X    {
  1487. X    YY_USER_INIT;
  1488. X
  1489. X    if ( ! yy_start )
  1490. X        yy_start = 1;    /* first start state */
  1491. X
  1492. X    if ( ! yyin )
  1493. X        yyin = stdin;
  1494. X
  1495. X    if ( ! yyout )
  1496. X        yyout = stdout;
  1497. X
  1498. X    if ( yy_current_buffer )
  1499. X        yy_init_buffer( yy_current_buffer, yyin );
  1500. X    else
  1501. X        yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
  1502. X
  1503. X    yy_load_buffer_state();
  1504. X
  1505. X    yy_init = 0;
  1506. X    }
  1507. X
  1508. X    while ( 1 )        /* loops until end-of-file is reached */
  1509. X    {
  1510. X    yy_cp = yy_c_buf_p;
  1511. X
  1512. X    /* support of yytext */
  1513. X    *yy_cp = yy_hold_char;
  1514. X
  1515. X    /* yy_bp points to the position in yy_ch_buf of the start of the
  1516. X     * current run.
  1517. X     */
  1518. X    yy_bp = yy_cp;
  1519. X
  1520. X    yy_current_state = yy_start;
  1521. X    if ( yy_bp[-1] == '\n' )
  1522. X        ++yy_current_state;
  1523. Xyy_match:
  1524. X    do
  1525. X        {
  1526. X        register YY_CHAR yy_c = yy_ec[*yy_cp];
  1527. X        if ( yy_accept[yy_current_state] )
  1528. X        {
  1529. X        yy_last_accepting_state = yy_current_state;
  1530. X        yy_last_accepting_cpos = yy_cp;
  1531. X        }
  1532. X        while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
  1533. X        {
  1534. X        yy_current_state = yy_def[yy_current_state];
  1535. X        if ( yy_current_state >= 194 )
  1536. X            yy_c = yy_meta[yy_c];
  1537. X        }
  1538. X        yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
  1539. X        ++yy_cp;
  1540. X        }
  1541. X    while ( yy_current_state != 193 );
  1542. X    yy_cp = yy_last_accepting_cpos;
  1543. X    yy_current_state = yy_last_accepting_state;
  1544. X
  1545. Xyy_find_action:
  1546. X    yy_act = yy_accept[yy_current_state];
  1547. X
  1548. X    YY_DO_BEFORE_ACTION;
  1549. X    YY_USER_ACTION;
  1550. X
  1551. Xdo_action:    /* this label is used only to access EOF actions */
  1552. X
  1553. X
  1554. X    switch ( yy_act )
  1555. X        {
  1556. X        case 0: /* must backtrack */
  1557. X        /* undo the effects of YY_DO_BEFORE_ACTION */
  1558. X        *yy_cp = yy_hold_char;
  1559. X        yy_cp = yy_last_accepting_cpos;
  1560. X        yy_current_state = yy_last_accepting_state;
  1561. X        goto yy_find_action;
  1562. X
  1563. Xcase 1:
  1564. Xreturn(A_DUNGEON);
  1565. X    YY_BREAK
  1566. Xcase 2:
  1567. X{ yylval.i=1; return(UP_OR_DOWN); }
  1568. X    YY_BREAK
  1569. Xcase 3:
  1570. X{ yylval.i=0; return(UP_OR_DOWN); }
  1571. X    YY_BREAK
  1572. Xcase 4:
  1573. Xreturn(ENTRY);
  1574. X    YY_BREAK
  1575. Xcase 5:
  1576. Xreturn(STAIR);
  1577. X    YY_BREAK
  1578. Xcase 6:
  1579. Xreturn(NO_UP);
  1580. X    YY_BREAK
  1581. Xcase 7:
  1582. Xreturn(NO_DOWN);
  1583. X    YY_BREAK
  1584. Xcase 8:
  1585. Xreturn(PORTAL);
  1586. X    YY_BREAK
  1587. Xcase 9:
  1588. Xreturn(PROTOFILE);
  1589. X    YY_BREAK
  1590. Xcase 10:
  1591. Xreturn(DESCRIPTION);
  1592. X    YY_BREAK
  1593. Xcase 11:
  1594. Xreturn(LEVELDESC);
  1595. X    YY_BREAK
  1596. Xcase 12:
  1597. Xreturn(ALIGNMENT);
  1598. X    YY_BREAK
  1599. Xcase 13:
  1600. Xreturn(LEVALIGN);
  1601. X    YY_BREAK
  1602. Xcase 14:
  1603. X{ yylval.i=TOWN ; return(DESCRIPTOR); }
  1604. X    YY_BREAK
  1605. Xcase 15:
  1606. X{ yylval.i=HELLISH ; return(DESCRIPTOR); }
  1607. X    YY_BREAK
  1608. Xcase 16:
  1609. X{ yylval.i=MAZELIKE ; return(DESCRIPTOR); }
  1610. X    YY_BREAK
  1611. Xcase 17:
  1612. X{ yylval.i=ROGUELIKE ; return(DESCRIPTOR); }
  1613. X    YY_BREAK
  1614. Xcase 18:
  1615. X{ yylval.i=D_ALIGN_NONE ; return(DESCRIPTOR); }
  1616. X    YY_BREAK
  1617. Xcase 19:
  1618. X{ yylval.i=D_ALIGN_NONE ; return(DESCRIPTOR); }
  1619. X    YY_BREAK
  1620. Xcase 20:
  1621. X{ yylval.i=D_ALIGN_LAWFUL ; return(DESCRIPTOR); }
  1622. X    YY_BREAK
  1623. Xcase 21:
  1624. X{ yylval.i=D_ALIGN_NEUTRAL ; return(DESCRIPTOR); }
  1625. X    YY_BREAK
  1626. Xcase 22:
  1627. X{ yylval.i=D_ALIGN_CHAOTIC ; return(DESCRIPTOR); }
  1628. X    YY_BREAK
  1629. Xcase 23:
  1630. Xreturn(BRANCH);
  1631. X    YY_BREAK
  1632. Xcase 24:
  1633. Xreturn(CHBRANCH);
  1634. X    YY_BREAK
  1635. Xcase 25:
  1636. Xreturn(LEVEL);
  1637. X    YY_BREAK
  1638. Xcase 26:
  1639. Xreturn(RNDLEVEL);
  1640. X    YY_BREAK
  1641. Xcase 27:
  1642. Xreturn(CHLEVEL);
  1643. X    YY_BREAK
  1644. Xcase 28:
  1645. Xreturn(RNDCHLEVEL);
  1646. X    YY_BREAK
  1647. Xcase 29:
  1648. X{ yylval.i=atoi(yytext); return(INTEGER); }
  1649. X    YY_BREAK
  1650. Xcase 30:
  1651. X{ yytext[yyleng-1] = 0; /* Discard the trailing \" */
  1652. X          yylval.str = (char *) alloc(strlen(yytext+1)+1);
  1653. X          strcpy(yylval.str, yytext+1); /* Discard the first \" */
  1654. X          return(STRING); }
  1655. X    YY_BREAK
  1656. Xcase 31:
  1657. X{ line_number++; }
  1658. X    YY_BREAK
  1659. Xcase 32:
  1660. X{ line_number++; }
  1661. X    YY_BREAK
  1662. Xcase 33:
  1663. X;    /* skip trailing tabs & spaces */
  1664. X    YY_BREAK
  1665. Xcase 34:
  1666. X{ return yytext[0]; }
  1667. X    YY_BREAK
  1668. Xcase 35:
  1669. XECHO;
  1670. X    YY_BREAK
  1671. Xcase YY_STATE_EOF(INITIAL):
  1672. X    yyterminate();
  1673. X
  1674. X        case YY_END_OF_BUFFER:
  1675. X        {
  1676. X        /* amount of text matched not including the EOB char */
  1677. X        int yy_amount_of_matched_text = yy_cp - yytext - 1;
  1678. X
  1679. X        /* undo the effects of YY_DO_BEFORE_ACTION */
  1680. X        *yy_cp = yy_hold_char;
  1681. X
  1682. X        /* note that here we test for yy_c_buf_p "<=" to the position
  1683. X         * of the first EOB in the buffer, since yy_c_buf_p will
  1684. X         * already have been incremented past the NUL character
  1685. X         * (since all states make transitions on EOB to the end-
  1686. X         * of-buffer state).  Contrast this with the test in yyinput().
  1687. X         */
  1688. X        if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
  1689. X            /* this was really a NUL */
  1690. X            {
  1691. X            yy_state_type yy_next_state;
  1692. X
  1693. X            yy_c_buf_p = yytext + yy_amount_of_matched_text;
  1694. X
  1695. X            yy_current_state = yy_get_previous_state();
  1696. X
  1697. X            /* okay, we're now positioned to make the
  1698. X             * NUL transition.  We couldn't have
  1699. X             * yy_get_previous_state() go ahead and do it
  1700. X             * for us because it doesn't know how to deal
  1701. X             * with the possibility of jamming (and we
  1702. X             * don't want to build jamming into it because
  1703. X             * then it will run more slowly)
  1704. X             */
  1705. X
  1706. X            yy_next_state = yy_try_NUL_trans( yy_current_state );
  1707. X
  1708. X            yy_bp = yytext + YY_MORE_ADJ;
  1709. X
  1710. X            if ( yy_next_state )
  1711. X            {
  1712. X            /* consume the NUL */
  1713. X            yy_cp = ++yy_c_buf_p;
  1714. X            yy_current_state = yy_next_state;
  1715. X            goto yy_match;
  1716. X            }
  1717. X
  1718. X            else
  1719. X            {
  1720. X                yy_cp = yy_last_accepting_cpos;
  1721. X                yy_current_state = yy_last_accepting_state;
  1722. X            goto yy_find_action;
  1723. X            }
  1724. X            }
  1725. X
  1726. X        else switch ( yy_get_next_buffer() )
  1727. X            {
  1728. X            case EOB_ACT_END_OF_FILE:
  1729. X            {
  1730. X            yy_did_buffer_switch_on_eof = 0;
  1731. X
  1732. X            if ( yywrap() )
  1733. X                {
  1734. X                /* note: because we've taken care in
  1735. X                 * yy_get_next_buffer() to have set up yytext,
  1736. X                 * we can now set up yy_c_buf_p so that if some
  1737. X                 * total hoser (like flex itself) wants
  1738. X                 * to call the scanner after we return the
  1739. X                 * YY_NULL, it'll still work - another YY_NULL
  1740. X                 * will get returned.
  1741. X                 */
  1742. X                yy_c_buf_p = yytext + YY_MORE_ADJ;
  1743. X
  1744. X                yy_act = YY_STATE_EOF((yy_start - 1) / 2);
  1745. X                goto do_action;
  1746. X                }
  1747. X
  1748. X            else
  1749. X                {
  1750. X                if ( ! yy_did_buffer_switch_on_eof )
  1751. X                YY_NEW_FILE;
  1752. X                }
  1753. X            }
  1754. X            break;
  1755. X
  1756. X            case EOB_ACT_CONTINUE_SCAN:
  1757. X            yy_c_buf_p = yytext + yy_amount_of_matched_text;
  1758. X
  1759. X            yy_current_state = yy_get_previous_state();
  1760. X
  1761. X            yy_cp = yy_c_buf_p;
  1762. X            yy_bp = yytext + YY_MORE_ADJ;
  1763. X            goto yy_match;
  1764. X
  1765. X            case EOB_ACT_LAST_MATCH:
  1766. X            yy_c_buf_p =
  1767. X                &yy_current_buffer->yy_ch_buf[yy_n_chars];
  1768. X
  1769. X            yy_current_state = yy_get_previous_state();
  1770. X
  1771. X            yy_cp = yy_c_buf_p;
  1772. X            yy_bp = yytext + YY_MORE_ADJ;
  1773. X            goto yy_find_action;
  1774. X            }
  1775. X        break;
  1776. X        }
  1777. X
  1778. X        default:
  1779. X#ifdef FLEX_DEBUG
  1780. X        printf( "action # %d\n", yy_act );
  1781. X#endif
  1782. X        YY_FATAL_ERROR(
  1783. X            "fatal flex scanner internal error--no action found" );
  1784. X        }
  1785. X    }
  1786. X}
  1787. X
  1788. X
  1789. X/* yy_get_next_buffer - try to read in a new buffer
  1790. X *
  1791. X * synopsis
  1792. X *     int yy_get_next_buffer();
  1793. X *
  1794. X * returns a code representing an action
  1795. X *     EOB_ACT_LAST_MATCH -
  1796. X *     EOB_ACT_CONTINUE_SCAN - continue scanning from current position
  1797. X *     EOB_ACT_END_OF_FILE - end of file
  1798. X */
  1799. X
  1800. Xstatic int yy_get_next_buffer()
  1801. X{
  1802. X    register YY_CHAR *dest = yy_current_buffer->yy_ch_buf;
  1803. X    register YY_CHAR *source = yytext - 1; /* copy prev. char, too */
  1804. X    register int number_to_move, i;
  1805. X    int ret_val;
  1806. X
  1807. X    if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
  1808. X    YY_FATAL_ERROR(
  1809. X        "fatal flex scanner internal error--end of buffer missed" );
  1810. X
  1811. X    /* try to read more data */
  1812. X
  1813. X    /* first move last chars to start of buffer */
  1814. X    number_to_move = yy_c_buf_p - yytext;
  1815. X
  1816. X    for ( i = 0; i < number_to_move; ++i )
  1817. X    *(dest++) = *(source++);
  1818. X
  1819. X    if ( yy_current_buffer->yy_eof_status != EOF_NOT_SEEN )
  1820. X    /* don't do the read, it's not guaranteed to return an EOF,
  1821. X     * just force an EOF
  1822. X     */
  1823. X    yy_n_chars = 0;
  1824. X
  1825. X    else
  1826. X    {
  1827. X    int num_to_read = yy_current_buffer->yy_buf_size - number_to_move - 1;
  1828. X
  1829. X    if ( num_to_read > YY_READ_BUF_SIZE )
  1830. X        num_to_read = YY_READ_BUF_SIZE;
  1831. X
  1832. X    else if ( num_to_read <= 0 )
  1833. X        YY_FATAL_ERROR( "fatal error - scanner input buffer overflow" );
  1834. X
  1835. X    /* read in more data */
  1836. X    YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
  1837. X          yy_n_chars, num_to_read );
  1838. X    }
  1839. X
  1840. X    if ( yy_n_chars == 0 )
  1841. X    {
  1842. X    if ( number_to_move - YY_MORE_ADJ == 1 )
  1843. X        {
  1844. X        ret_val = EOB_ACT_END_OF_FILE;
  1845. X        yy_current_buffer->yy_eof_status = EOF_DONE;
  1846. X        }
  1847. X
  1848. X    else
  1849. X        {
  1850. X        ret_val = EOB_ACT_LAST_MATCH;
  1851. X        yy_current_buffer->yy_eof_status = EOF_PENDING;
  1852. X        }
  1853. X    }
  1854. X
  1855. X    else
  1856. X    ret_val = EOB_ACT_CONTINUE_SCAN;
  1857. X
  1858. X    yy_n_chars += number_to_move;
  1859. X    yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
  1860. X    yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
  1861. X
  1862. X    /* yytext begins at the second character in yy_ch_buf; the first
  1863. X     * character is the one which preceded it before reading in the latest
  1864. X     * buffer; it needs to be kept around in case it's a newline, so
  1865. X     * yy_get_previous_state() will have with '^' rules active
  1866. X     */
  1867. X
  1868. X    yytext = &yy_current_buffer->yy_ch_buf[1];
  1869. X
  1870. X    return ( ret_val );
  1871. X}
  1872. X
  1873. X
  1874. X/* yy_get_previous_state - get the state just before the EOB char was reached
  1875. X *
  1876. X * synopsis
  1877. X *     yy_state_type yy_get_previous_state();
  1878. X */
  1879. X
  1880. Xstatic yy_state_type yy_get_previous_state()
  1881. X{
  1882. X    register yy_state_type yy_current_state;
  1883. X    register YY_CHAR *yy_cp;
  1884. X
  1885. X    register YY_CHAR *yy_bp = yytext;
  1886. X
  1887. X    yy_current_state = yy_start;
  1888. X    if ( yy_bp[-1] == '\n' )
  1889. X    ++yy_current_state;
  1890. X
  1891. X    for ( yy_cp = yytext + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
  1892. X    {
  1893. X    register YY_CHAR yy_c = (*yy_cp ? yy_ec[*yy_cp] : 1);
  1894. X    if ( yy_accept[yy_current_state] )
  1895. X        {
  1896. X        yy_last_accepting_state = yy_current_state;
  1897. X        yy_last_accepting_cpos = yy_cp;
  1898. X        }
  1899. X    while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
  1900. X        {
  1901. X        yy_current_state = yy_def[yy_current_state];
  1902. X        if ( yy_current_state >= 194 )
  1903. X        yy_c = yy_meta[yy_c];
  1904. X        }
  1905. X    yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
  1906. X    }
  1907. X
  1908. X    return ( yy_current_state );
  1909. X}
  1910. X
  1911. X
  1912. X/* yy_try_NUL_trans - try to make a transition on the NUL character
  1913. X *
  1914. X * synopsis
  1915. X *     next_state = yy_try_NUL_trans( current_state );
  1916. X */
  1917. X
  1918. Xstatic yy_state_type yy_try_NUL_trans( yy_current_state )
  1919. Xregister yy_state_type yy_current_state;
  1920. X{
  1921. X    register int yy_is_jam;
  1922. X    register YY_CHAR *yy_cp = yy_c_buf_p;
  1923. X
  1924. X    register YY_CHAR yy_c = 1;
  1925. X    if ( yy_accept[yy_current_state] )
  1926. X    {
  1927. X    yy_last_accepting_state = yy_current_state;
  1928. X    yy_last_accepting_cpos = yy_cp;
  1929. X    }
  1930. X    while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
  1931. X    {
  1932. X    yy_current_state = yy_def[yy_current_state];
  1933. X    if ( yy_current_state >= 194 )
  1934. X        yy_c = yy_meta[yy_c];
  1935. X    }
  1936. X    yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
  1937. X    yy_is_jam = (yy_current_state == 193);
  1938. X
  1939. X    return ( yy_is_jam ? 0 : yy_current_state );
  1940. X}
  1941. X
  1942. X
  1943. X#if 0        /* not needed for NetHack */
  1944. X
  1945. Xstatic void yyunput( in_c, yy_bp )
  1946. Xint in_c;        /* YY_CHAR c; */
  1947. Xregister YY_CHAR *yy_bp;
  1948. X{
  1949. X    register YY_CHAR *yy_cp = yy_c_buf_p;
  1950. X    YY_CHAR c = (YY_CHAR)in_c;
  1951. X
  1952. X    /* undo effects of setting up yytext */
  1953. X    *yy_cp = yy_hold_char;
  1954. X
  1955. X    if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
  1956. X    { /* need to shift things up to make room */
  1957. X    register int number_to_move = yy_n_chars + 2; /* +2 for EOB chars */
  1958. X    register YY_CHAR *dest =
  1959. X        &yy_current_buffer->yy_ch_buf[yy_current_buffer->yy_buf_size + 2];
  1960. X    register YY_CHAR *source =
  1961. X        &yy_current_buffer->yy_ch_buf[number_to_move];
  1962. X
  1963. X    while ( source > yy_current_buffer->yy_ch_buf )
  1964. X        *--dest = *--source;
  1965. X
  1966. X    yy_cp += dest - source;
  1967. X    yy_bp += dest - source;
  1968. X    yy_n_chars = yy_current_buffer->yy_buf_size;
  1969. X
  1970. X    if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
  1971. X        YY_FATAL_ERROR( "flex scanner push-back overflow" );
  1972. X    }
  1973. X
  1974. X    if ( yy_cp > yy_bp && yy_cp[-1] == '\n' )
  1975. X    yy_cp[-2] = '\n';
  1976. X
  1977. X    *--yy_cp = c;
  1978. X
  1979. X    /* note: the formal parameter *must* be called "yy_bp" for this
  1980. X     *       macro to now work correctly
  1981. X     */
  1982. X    YY_DO_BEFORE_ACTION; /* set up yytext again */
  1983. X}
  1984. X
  1985. X
  1986. Xstatic int yyinput()
  1987. X{
  1988. X    int c;
  1989. X    YY_CHAR *yy_cp = yy_c_buf_p;
  1990. X
  1991. X    *yy_cp = yy_hold_char;
  1992. X
  1993. X    if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
  1994. X    {
  1995. X    /* yy_c_buf_p now points to the character we want to return.
  1996. X     * If this occurs *before* the EOB characters, then it's a
  1997. X     * valid NUL; if not, then we've hit the end of the buffer.
  1998. X     */
  1999. X    if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
  2000. X        /* this was really a NUL */
  2001. X        *yy_c_buf_p = '\0';
  2002. X
  2003. X    else
  2004. X        { /* need more input */
  2005. X        yytext = yy_c_buf_p;
  2006. X        ++yy_c_buf_p;
  2007. X
  2008. X        switch ( yy_get_next_buffer() )
  2009. X        {
  2010. X        case EOB_ACT_END_OF_FILE:
  2011. X            {
  2012. X            if ( yywrap() )
  2013. X            {
  2014. X            yy_c_buf_p = yytext + YY_MORE_ADJ;
  2015. X            return ( EOF );
  2016. X            }
  2017. X
  2018. X            YY_NEW_FILE;
  2019. X
  2020. X            return ( yyinput() );
  2021. X            }
  2022. X            break;
  2023. X
  2024. X        case EOB_ACT_CONTINUE_SCAN:
  2025. X            yy_c_buf_p = yytext + YY_MORE_ADJ;
  2026. X            break;
  2027. X
  2028. X        case EOB_ACT_LAST_MATCH:
  2029. X            YY_FATAL_ERROR( "unexpected last match in yyinput()" );
  2030. X        }
  2031. X        }
  2032. X    }
  2033. X
  2034. X    c = *yy_c_buf_p;
  2035. X    yy_hold_char = *++yy_c_buf_p;
  2036. X
  2037. X    return ( c );
  2038. X}
  2039. X
  2040. X#endif    /* 0 */
  2041. X
  2042. X
  2043. Xvoid yyrestart( input_file )
  2044. XFILE *input_file;
  2045. X{
  2046. X    yy_init_buffer( yy_current_buffer, input_file );
  2047. X    yy_load_buffer_state();
  2048. X}
  2049. X
  2050. X
  2051. Xvoid yy_switch_to_buffer( new_buffer )
  2052. XYY_BUFFER_STATE new_buffer;
  2053. X{
  2054. X    if ( yy_current_buffer == new_buffer )
  2055. X    return;
  2056. X
  2057. X    if ( yy_current_buffer )
  2058. X    {
  2059. X    /* flush out information for old buffer */
  2060. X    *yy_c_buf_p = yy_hold_char;
  2061. X    yy_current_buffer->yy_buf_pos = yy_c_buf_p;
  2062. X    yy_current_buffer->yy_n_chars = yy_n_chars;
  2063. X    }
  2064. X
  2065. X    yy_current_buffer = new_buffer;
  2066. X    yy_load_buffer_state();
  2067. X
  2068. X    /* we don't actually know whether we did this switch during
  2069. X     * EOF (yywrap()) processing, but the only time this flag
  2070. X     * is looked at is after yywrap() is called, so it's safe
  2071. X     * to go ahead and always set it.
  2072. X     */
  2073. X    yy_did_buffer_switch_on_eof = 1;
  2074. X}
  2075. X
  2076. X
  2077. Xvoid yy_load_buffer_state()
  2078. X{
  2079. X    yy_n_chars = yy_current_buffer->yy_n_chars;
  2080. X    yytext = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
  2081. X    yyin = yy_current_buffer->yy_input_file;
  2082. X    yy_hold_char = *yy_c_buf_p;
  2083. X}
  2084. X
  2085. X
  2086. XYY_BUFFER_STATE yy_create_buffer( file, size )
  2087. XFILE *file;
  2088. Xint size;
  2089. X{
  2090. X    YY_BUFFER_STATE b;
  2091. X
  2092. X    b = (YY_BUFFER_STATE) alloc( sizeof( struct yy_buffer_state ) );
  2093. X    b->yy_buf_size = size;
  2094. X
  2095. X    /* yy_ch_buf has to be 2 characters longer than the size given because
  2096. X     * we need to put in 2 end-of-buffer characters.
  2097. X     */
  2098. X    b->yy_ch_buf = (YY_CHAR *) alloc( (unsigned) (b->yy_buf_size + 2) );
  2099. X    yy_init_buffer( b, file );
  2100. X
  2101. X    return ( b );
  2102. X}
  2103. X
  2104. X
  2105. Xvoid yy_delete_buffer( b )
  2106. XYY_BUFFER_STATE b;
  2107. X{
  2108. X    if ( b == yy_current_buffer )
  2109. X    yy_current_buffer = (YY_BUFFER_STATE) 0;
  2110. X
  2111. X    free((genericptr_t)b->yy_ch_buf);
  2112. X    free((genericptr_t)b);
  2113. X}
  2114. X
  2115. X
  2116. Xvoid yy_init_buffer( b, file )
  2117. XYY_BUFFER_STATE b;
  2118. XFILE *file;
  2119. X{
  2120. X    b->yy_input_file = file;
  2121. X
  2122. X    /* we put in the '\n' and start reading from [1] so that an
  2123. X     * initial match-at-newline will be true.
  2124. X     */
  2125. X
  2126. X    b->yy_ch_buf[0] = '\n';
  2127. X    b->yy_n_chars = 1;
  2128. X
  2129. X    /* we always need two end-of-buffer characters.  The first causes
  2130. X     * a transition to the end-of-buffer state.  The second causes
  2131. X     * a jam in that state.
  2132. X     */
  2133. X    b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
  2134. X    b->yy_ch_buf[2] = YY_END_OF_BUFFER_CHAR;
  2135. X
  2136. X    b->yy_buf_pos = &b->yy_ch_buf[1];
  2137. X
  2138. X    b->yy_eof_status = EOF_NOT_SEEN;
  2139. X}
  2140. X
  2141. X
  2142. X/* routine to switch to another input file; needed for flex */
  2143. Xvoid init_yyin( input_f )
  2144. XFILE *input_f;
  2145. X{
  2146. X#ifdef FLEX_SCANNER
  2147. X    if (yyin)
  2148. X        yyrestart(input_f);
  2149. X    else
  2150. X#endif
  2151. X        yyin = input_f;
  2152. X}
  2153. X/* analogous routine (for completeness) */
  2154. Xvoid init_yyout( output_f )
  2155. XFILE *output_f;
  2156. X{
  2157. X    yyout = output_f;
  2158. X}
  2159. X
  2160. END_OF_FILE
  2161. if test 32050 -ne `wc -c <'sys/share/dgn_lex.c'`; then
  2162.     echo shar: \"'sys/share/dgn_lex.c'\" unpacked with wrong size!
  2163. fi
  2164. # end of 'sys/share/dgn_lex.c'
  2165. echo shar: End of archive 25 \(of 33\).
  2166. cp /dev/null ark25isdone
  2167. MISSING=""
  2168. 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 ; do
  2169.     if test ! -f ark${I}isdone ; then
  2170.     MISSING="${MISSING} ${I}"
  2171.     fi
  2172. done
  2173. if test "${MISSING}" = "" ; then
  2174.     echo You have unpacked all 33 archives.
  2175.     echo "Now execute ./patchit.sh"
  2176.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  2177. else
  2178.     echo You still need to unpack the following archives:
  2179.     echo "        " ${MISSING}
  2180. fi
  2181. ##  End of shell archive.
  2182. exit 0
  2183.