home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1994 March / Source_Code_CD-ROM_Walnut_Creek_March_1994.iso / compsrcs / games / volume16 / nethck31 / patch1o < prev    next >
Encoding:
Text File  |  1993-03-04  |  55.4 KB  |  2,072 lines

  1. Subject:  v17i056:  nethack31 - display oriented dungeons & dragons (Ver. 3.1), Patch1o/31
  2. Newsgroups: comp.sources.games
  3. Approved: billr@saab.CNA.TEK.COM
  4.  
  5. Submitted-by: izchak@linc.cis.upenn.edu (Izchak Miller)
  6. Posting-number: Volume 17, Issue 56
  7. Archive-name: nethack31/Patch1o
  8. Patch-To: nethack31: Volume 16, Issue 1-116
  9. Environment: Amiga, Atari, Mac, MS-DOS, Windows-NT, OS2, Unix, VMS, X11
  10.  
  11.  
  12.  
  13. #! /bin/sh
  14. # This is a shell archive.  Remove anything before this line, then unpack
  15. # it by saving it into a file and typing "sh file".  To overwrite existing
  16. # files, type "sh file -c".  You can also feed this as standard input via
  17. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  18. # will see the following message at the end:
  19. #        "End of archive 15 (of 31)."
  20. # Contents:  patches01r
  21. # Wrapped by billr@saab on Fri Mar  5 10:50:45 1993
  22. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  23. if test -f 'patches01r' -a "${1}" != "-c" ; then 
  24.   echo shar: Renaming existing file \"'patches01r'\" to \"'patches01r.orig'\"
  25.   mv -f 'patches01r' 'patches01r.orig'
  26. fi
  27. echo shar: Extracting \"'patches01r'\" \(52863 characters\)
  28. sed "s/^X//" >'patches01r' <<'END_OF_FILE'
  29. X*** /tmp/da09102    Thu Feb 25 10:27:36 1993
  30. X--- sys/amiga/wb.c    Wed Feb 24 20:25:19 1993
  31. X***************
  32. X*** 87,93 ****
  33. X      ZapOptions( curopts );
  34. X      InitWB( argc, argv );
  35. X      SetupWB( ); /* open window, build menus */
  36. X!     errmsg( NO_FLASH, "Welcome to NetHack Version 3.1!" );
  37. X      CopyRight( );
  38. X  
  39. X      ReadConfig( );
  40. X--- 87,93 ----
  41. X      ZapOptions( curopts );
  42. X      InitWB( argc, argv );
  43. X      SetupWB( ); /* open window, build menus */
  44. X!     errmsg( NO_FLASH, "Welcome to NetHack Version 3.1.1!" );
  45. X      CopyRight( );
  46. X  
  47. X      ReadConfig( );
  48. X***************
  49. X*** 151,156 ****
  50. X--- 151,157 ----
  51. X  
  52. X          case MENUPICK:
  53. X          do_menu( mimsg.Code );
  54. X+         flushIDCMP( win->UserPort );
  55. X          break;
  56. X  
  57. X          case RAWKEY:
  58. X***************
  59. X*** 169,174 ****
  60. X--- 170,176 ----
  61. X                  &Help2_IntuiTextList8 );
  62. X              }
  63. X          }
  64. X+         flushIDCMP( win->UserPort );
  65. X          break;
  66. X  
  67. X          case CLOSEWINDOW:
  68. X***************
  69. X*** 190,195 ****
  70. X--- 192,198 ----
  71. X  
  72. X          case MOUSEBUTTONS:
  73. X          do_buttons( &mimsg );
  74. X+         flushIDCMP( win->UserPort );
  75. X          break;
  76. X          }
  77. X      }
  78. X***************
  79. X*** 250,255 ****
  80. X--- 253,267 ----
  81. X      cleanup( 0 );
  82. X  }
  83. X  
  84. X+ void
  85. X+ flushIDCMP( port )
  86. X+     struct MsgPort *port;
  87. X+ {
  88. X+     struct Message *msg;
  89. X+     while( msg = GetMsg( port ) )
  90. X+         ReplyMsg( msg );
  91. X+ }
  92. X+ 
  93. X  void CopyRight( )
  94. X  {
  95. X      extern char *copyright_text[];
  96. X***************
  97. X*** 325,331 ****
  98. X          case 'c':       /* Configuration to load */
  99. X              if( i + 1 < argc && argv[i][j+1] == 0 )
  100. X              {
  101. X!             strcpy( NetHackCnf, argv[ ++i ] );
  102. X              goto nextargv;
  103. X              }
  104. X              else
  105. X--- 337,343 ----
  106. X          case 'c':       /* Configuration to load */
  107. X              if( i + 1 < argc && argv[i][j+1] == 0 )
  108. X              {
  109. X!             strcpy( StrConf, argv[ ++i ] );
  110. X              goto nextargv;
  111. X              }
  112. X              else
  113. X***************
  114. X*** 371,377 ****
  115. X              fprintf( stderr, "%s: invalid option %c\n",
  116. X              argv[0], c );
  117. X              fprintf( stderr,
  118. X!             "usage: %s [-m] [-f name] [-c name][ -N screen] \n",
  119. X              argv[ 0 ] );
  120. X              cleanup( 1 );
  121. X          }
  122. X--- 383,389 ----
  123. X              fprintf( stderr, "%s: invalid option %c\n",
  124. X              argv[0], c );
  125. X              fprintf( stderr,
  126. X! "usage: %s [-m] [-f .def filename] [-c config filename] [ -N screen]\n",
  127. X              argv[ 0 ] );
  128. X              cleanup( 1 );
  129. X          }
  130. X***************
  131. X*** 402,408 ****
  132. X  
  133. X          if( s = FindToolType( tools, "CONFIG" ) )
  134. X          {
  135. X!         strcpy( NetHackCnf, s );
  136. X          }
  137. X  
  138. X          /* A different set of defaults then 'wbdefaults.def' */
  139. X--- 414,420 ----
  140. X  
  141. X          if( s = FindToolType( tools, "CONFIG" ) )
  142. X          {
  143. X!         strcpy( StrConf, s );
  144. X          }
  145. X  
  146. X          /* A different set of defaults then 'wbdefaults.def' */
  147. X***************
  148. X*** 445,453 ****
  149. X  
  150. X      /* If the file is not there, can't load it */
  151. X  
  152. X!     if( ( fp = fopen( NetHackCnf, "r" ) ) == NULL )
  153. X      {
  154. X!     errmsg( FLASH, "Can't load config file %s", NetHackCnf );
  155. X      free( buf );
  156. X      return;
  157. X      }
  158. X--- 457,465 ----
  159. X  
  160. X      /* If the file is not there, can't load it */
  161. X  
  162. X!     if( ( fp = fopen( StrConf, "r" ) ) == NULL )
  163. X      {
  164. X!     errmsg( FLASH, "Can't load config file %s", StrConf );
  165. X      free( buf );
  166. X      return;
  167. X      }
  168. X***************
  169. X*** 468,474 ****
  170. X      }
  171. X      else if( strnicmp( buf, "PENS=", 4 ) == 0 )
  172. X      {
  173. X!         setoneopt( PENS_IDX, buf + 4 );
  174. X      }
  175. X      else if( strnicmp( buf, "OPTIONS=", 8 ) == 0 )
  176. X      {
  177. X--- 480,486 ----
  178. X      }
  179. X      else if( strnicmp( buf, "PENS=", 4 ) == 0 )
  180. X      {
  181. X!         setoneopt( PENS_IDX, buf + 5 );
  182. X      }
  183. X      else if( strnicmp( buf, "OPTIONS=", 8 ) == 0 )
  184. X      {
  185. X***************
  186. X*** 545,550 ****
  187. X--- 557,564 ----
  188. X      NewScreenStructure.Width = GfxBase->NormalDisplayColumns;
  189. X      NewScreenStructure.Height = GfxBase->NormalDisplayRows;
  190. X  
  191. X+     NewScreenStructure.DefaultTitle = "WorkBench for V3.1.1 of NetHack";
  192. X+ 
  193. X  #ifdef  INTUI_NEW_LOOK
  194. X      if( IntuitionBase->LibNode.lib_Version < 37 )
  195. X      {
  196. X***************
  197. X*** 630,636 ****
  198. X  
  199. X  #ifdef  INTUI_NEW_LOOK
  200. X      if( scrlocked )
  201. X!     strcpy( mytitle, "NetHack WB 3.1 - Select a GAME or press HELP" );
  202. X      else
  203. X      strcpy( mytitle, "Select a GAME or press HELP" );
  204. X  
  205. X--- 644,650 ----
  206. X  
  207. X  #ifdef  INTUI_NEW_LOOK
  208. X      if( scrlocked )
  209. X!     strcpy( mytitle, "NetHack WB 3.1.1 - Select a GAME or press HELP" );
  210. X      else
  211. X      strcpy( mytitle, "Select a GAME or press HELP" );
  212. X  
  213. X***************
  214. X*** 1056,1061 ****
  215. X--- 1070,1076 ----
  216. X      Help3_NewWindowStructure10.Height += txtdiff;
  217. X      }
  218. X  
  219. X+     Help3_NewWindowStructure10.Title = "Help for NetHack WorkBench V3.1.1";
  220. X      Help3_NewWindowStructure10.Screen = scrn;
  221. X      if( ( win = MyOpenWindow( &Help3_NewWindowStructure10 ) ) == NULL )
  222. X      {
  223. X***************
  224. X*** 1111,1116 ****
  225. X--- 1126,1134 ----
  226. X              done = 1;
  227. X              break;
  228. X  
  229. X+         case MOUSEBUTTONS:
  230. X+         case INACTIVEWINDOW:
  231. X+         case ACTIVEWINDOW:
  232. X          case GADGETUP:
  233. X              lastdown = 0;
  234. X              break;
  235. X***************
  236. X*** 1132,1138 ****
  237. X                  win->BorderLeft,
  238. X                  win->BorderTop + 2,
  239. X                  win->Width - win->BorderRight - 1,
  240. X!                 win->BorderTop + 2 +
  241. X                  (lines*win->RPort->TxHeight) );
  242. X                  getline( fp, loff, line + lines - 1,
  243. X                  buf, sizeof( buf ) );
  244. X--- 1150,1156 ----
  245. X                  win->BorderLeft,
  246. X                  win->BorderTop + 2,
  247. X                  win->Width - win->BorderRight - 1,
  248. X!                 win->BorderTop + 1 +
  249. X                  (lines*win->RPort->TxHeight) );
  250. X                  getline( fp, loff, line + lines - 1,
  251. X                  buf, sizeof( buf ) );
  252. X***************
  253. X*** 1146,1151 ****
  254. X--- 1164,1170 ----
  255. X              {
  256. X                  /* EOF */
  257. X                  DisplayBeep( scrn );
  258. X+                 lastdown = 0;
  259. X              }
  260. X              }
  261. X              else if( lastdown == GADHELPBKWD )
  262. X***************
  263. X*** 1160,1166 ****
  264. X                  win->BorderLeft,
  265. X                  win->BorderTop + 2,
  266. X                  win->Width - win->BorderRight - 1,
  267. X!                 win->BorderTop + 2 +
  268. X                  (lines*win->RPort->TxHeight) );
  269. X                  getline( fp, loff, line, buf, sizeof( buf ) );
  270. X                  Move( win->RPort, win->BorderLeft + 2, topline );
  271. X--- 1179,1185 ----
  272. X                  win->BorderLeft,
  273. X                  win->BorderTop + 2,
  274. X                  win->Width - win->BorderRight - 1,
  275. X!                 win->BorderTop + 1 +
  276. X                  (lines*win->RPort->TxHeight) );
  277. X                  getline( fp, loff, line, buf, sizeof( buf ) );
  278. X                  Move( win->RPort, win->BorderLeft + 2, topline );
  279. X***************
  280. X*** 1170,1175 ****
  281. X--- 1189,1195 ----
  282. X              else
  283. X              {
  284. X                  DisplayBeep( scrn );
  285. X+                 lastdown = 0;
  286. X              }
  287. X              }
  288. X              break;
  289. X***************
  290. X*** 1409,1415 ****
  291. X  
  292. X      /* Set the game name for the status command */
  293. X  
  294. X!     sprintf( gptr->gname, "NetHack 3.1 %s", gptr->name );
  295. X  
  296. X      /* Create a process for the game to execute in */
  297. X  
  298. X--- 1429,1435 ----
  299. X  
  300. X      /* Set the game name for the status command */
  301. X  
  302. X!     sprintf( gptr->gname, "NetHack 3.1.1 %s", gptr->name );
  303. X  
  304. X      /* Create a process for the game to execute in */
  305. X  
  306. X***************
  307. X*** 1451,1457 ****
  308. X      gptr->wbs->sm_Process = proc;
  309. X      gptr->wbs->sm_Segment = gptr->seglist;
  310. X      gptr->wbs->sm_NumArgs = 2;
  311. X!     gptr->wbs->sm_ToolWindow = "con:0/0/350/50/Amiga NetHack 3.1";
  312. X      gptr->wbs->sm_ArgList = gptr->wba;
  313. X  
  314. X      /* Fill in the args */
  315. X--- 1471,1477 ----
  316. X      gptr->wbs->sm_Process = proc;
  317. X      gptr->wbs->sm_Segment = gptr->seglist;
  318. X      gptr->wbs->sm_NumArgs = 2;
  319. X!     gptr->wbs->sm_ToolWindow = "con:0/0/350/50/Amiga NetHack 3.1.1";
  320. X      gptr->wbs->sm_ArgList = gptr->wba;
  321. X  
  322. X      /* Fill in the args */
  323. X***************
  324. X*** 2025,2031 ****
  325. X                  ActivateGadget( gd, cwin, NULL );
  326. X                  break;
  327. X  
  328. X!             case GADCONFLOAD: case GADCONFNAME:
  329. X                  ReadConfig( );
  330. X                  strcpy( StrPath, options[ PATH_IDX ] );
  331. X                  strcpy( StrHackdir, options[ HACKDIR_IDX ] );
  332. X--- 2045,2054 ----
  333. X                  ActivateGadget( gd, cwin, NULL );
  334. X                  break;
  335. X  
  336. X!             case GADCONFNAME:    /* Do nothing... */
  337. X!                 break;
  338. X! 
  339. X!             case GADCONFLOAD:
  340. X                  ReadConfig( );
  341. X                  strcpy( StrPath, options[ PATH_IDX ] );
  342. X                  strcpy( StrHackdir, options[ HACKDIR_IDX ] );
  343. X***************
  344. X*** 2036,2042 ****
  345. X                  break;
  346. X  
  347. X              case GADCONFSAVE:
  348. X!                 errmsg( FLASH, "Save not implemented" );
  349. X                  break;
  350. X  
  351. X              default:
  352. X--- 2059,2136 ----
  353. X                  break;
  354. X  
  355. X              case GADCONFSAVE:
  356. X!                     {
  357. X!                         FILE *fp, *nfp;
  358. X!                         char buf[ 300 ], *t, nname[ 100 ], oname[100], *b;
  359. X! 
  360. X!                                 setoneopt( PATH_IDX, StrPath );
  361. X!                                 PutOptions( curopts );
  362. X!                                 setoneopt( HACKDIR_IDX, StrHackdir );
  363. X!                                 setoneopt( PENS_IDX, StrPens );
  364. X!                                 setoneopt( LEVELS_IDX, StrLevels );
  365. X!                                 setoneopt( SAVE_IDX, StrSave );
  366. X! 
  367. X!                     fp = fopen( StrConf, "r" );
  368. X!                     if( !fp )
  369. X!                     fp = fopen( "NetHack:NetHack.cnf", "r" );
  370. X!                     if( !fp )
  371. X!                     {
  372. X!                                 errmsg( FLASH, "Can't open nethack.cnf" );
  373. X!                                 break;
  374. X!                             }
  375. X! 
  376. X!                               t = dirname( StrConf );
  377. X!                             b = basename( StrConf );
  378. X!                               if( t[ strlen(t)-1 ] == ':' )
  379. X!                               {
  380. X!                                   sprintf( nname, "%snew_%s", t, b);
  381. X!                                   sprintf( oname, "%sold_%s", t, b);
  382. X!                             }
  383. X!                              else
  384. X!                 {
  385. X!                                     sprintf( oname, "%s/old_%s", t, b);
  386. X!                                     sprintf( nname, "%s/new_%s", t, b);
  387. X!                             }
  388. X! 
  389. X!                     nfp = fopen( nname, "w" );
  390. X!                     if( !nfp )
  391. X!                     {
  392. X!                                 errmsg( FLASH, "Can't open new_nethack.cnf for write" );
  393. X!                                 fclose( fp );
  394. X!                                 break;
  395. X!                             }
  396. X! 
  397. X!                     while( fgets( buf, sizeof( buf ), fp ) )
  398. X!                     {
  399. X!                         if( strncmp( buf, "PATH=", 5 ) == 0 )
  400. X!                             fprintf( nfp, "PATH=%s\n",
  401. X!                         options[ PATH_IDX ] );
  402. X!                         else if( strncmp( buf, "LEVELS=", 7 ) == 0 )
  403. X!                             fprintf( nfp, "LEVELS=%s\n",
  404. X!                         options[ LEVELS_IDX ] );
  405. X!                         else if( strncmp( buf, "PENS=", 5 ) == 0 )
  406. X!                             fprintf( nfp, "PENS=%s\n",
  407. X!                         options[ PENS_IDX ] );
  408. X!                         else if( strncmp( buf, "OPTIONS=", 8 ) == 0 )
  409. X!                             fprintf( nfp, "OPTIONS=%s\n",
  410. X!                         options[ OPTIONS_IDX ] );
  411. X!                         else if( strncmp( buf, "SAVE=", 5 ) == 0 )
  412. X!                             fprintf( nfp, "SAVE=%s\n",
  413. X!                         options[ SAVE_IDX ] );
  414. X!                         else if( strncmp( buf, "HACKDIR=", 8 ) == 0 )
  415. X!                             fprintf( nfp, "HACKDIR=%s\n",
  416. X!                         options[ HACKDIR_IDX ] );
  417. X!                         else
  418. X!                         {
  419. X!                             fputs( buf, nfp );
  420. X!                         }
  421. X!                     }
  422. X!                     fclose( fp );
  423. X!                     fclose( nfp );
  424. X!                     unlink( oname );
  425. X!                     rename( StrConf, oname );
  426. X!                     rename( nname, StrConf );
  427. X!                     }
  428. X                  break;
  429. X  
  430. X              default:
  431. X***************
  432. X*** 2061,2071 ****
  433. X      MapGadgets( R_DISK, 1 );
  434. X  }
  435. X  
  436. X  void menu_editdef( gametype )
  437. X      int gametype;
  438. X  {
  439. X      register struct Window *cwin;
  440. X!     int done = 0;
  441. X      USHORT mcode;
  442. X      long class, qual, code;
  443. X      register struct IntuiMessage *imsg;
  444. X--- 2155,2252 ----
  445. X      MapGadgets( R_DISK, 1 );
  446. X  }
  447. X  
  448. X+ void
  449. X+ UpdateCnfFile()
  450. X+ {
  451. X+     FILE *fp, *nfp;
  452. X+     char buf[ 300 ];
  453. X+     char path=0,option=0,dir=0,pens=0,levels=0,save=0;
  454. X+ 
  455. X+     setoneopt( PATH_IDX, StrPath );
  456. X+     PutOptions( curopts );
  457. X+     setoneopt( HACKDIR_IDX, StrHackdir );
  458. X+     setoneopt( PENS_IDX, StrPens );
  459. X+     setoneopt( LEVELS_IDX, StrLevels );
  460. X+     setoneopt( SAVE_IDX, StrSave );
  461. X+ 
  462. X+     fp = fopen( "nethack.cnf", "r" );
  463. X+     if( !fp )
  464. X+     {
  465. X+         errmsg( FLASH, "Can't open nethack.cnf" );
  466. X+         return;
  467. X+     }
  468. X+     nfp = fopen( "new_nethack.cnf", "w" );
  469. X+     if( !nfp )
  470. X+     {
  471. X+         errmsg( FLASH, "Can't open new_nethack.cnf for write" );
  472. X+         fclose( fp );
  473. X+         return;
  474. X+     }
  475. X+     while( fgets( buf, sizeof( buf ), fp ) )
  476. X+     {
  477. X+         if( strncmp( buf, "PATH=", 5 ) == 0 )
  478. X+     {
  479. X+             fprintf( nfp, "PATH=%s\n", options[ PATH_IDX ] );
  480. X+         path=1;
  481. X+     }
  482. X+         else if( strncmp( buf, "LEVELS=", 7 ) == 0 )
  483. X+     {
  484. X+             fprintf( nfp, "LEVELS=%s\n", options[ LEVELS_IDX ] );
  485. X+         levels=1;
  486. X+     }
  487. X+         else if( strncmp( buf, "PENS=", 5 ) == 0 )
  488. X+     {
  489. X+             fprintf( nfp, "PENS=%s\n", options[ PENS_IDX ] );
  490. X+         pens=1;
  491. X+     }
  492. X+         else if( strncmp( buf, "OPTIONS=", 8 ) == 0 )
  493. X+     {
  494. X+             fprintf( nfp, "OPTIONS=%s\n", options[ OPTIONS_IDX ] );
  495. X+         option=1;
  496. X+     }
  497. X+         else if( strncmp( buf, "SAVE=", 5 ) == 0 )
  498. X+     {
  499. X+             fprintf( nfp, "SAVE=%s\n", options[ SAVE_IDX ] );
  500. X+         save=1;
  501. X+     }
  502. X+         else if( strncmp( buf, "HACKDIR=", 8 ) == 0 )
  503. X+     {
  504. X+             fprintf( nfp, "HACKDIR=%s\n", options[ HACKDIR_IDX ] );
  505. X+         dir=1;
  506. X+     }
  507. X+         else
  508. X+         {
  509. X+                fputs( buf, nfp );
  510. X+         }
  511. X+     }
  512. X+ 
  513. X+     /* Write any that weren't already in the file */
  514. X+     if( !path )
  515. X+         fprintf( nfp, "PATH=%s\n", options[ PATH_IDX ] );
  516. X+     if( !levels )
  517. X+         fprintf( nfp, "LEVELS=%s\n", options[ LEVELS_IDX ] );
  518. X+     if( !pens )
  519. X+         fprintf( nfp, "PENS=%s\n", options[ PENS_IDX ] );
  520. X+     if( !option )
  521. X+         fprintf( nfp, "OPTIONS=%s\n", options[ OPTIONS_IDX ] );
  522. X+     if( !save )
  523. X+         fprintf( nfp, "SAVE=%s\n", options[ SAVE_IDX ] );
  524. X+     if( !dir )
  525. X+         fprintf( nfp, "HACKDIR=%s\n", options[ HACKDIR_IDX ] );
  526. X+ 
  527. X+     /* Close up and rename files */
  528. X+     fclose( fp );
  529. X+     fclose( nfp );
  530. X+     unlink( "old_nethack.cnf" );
  531. X+     rename( "nethack.cnf", "old_nethack.cnf" );
  532. X+     rename( "new_nethack.cnf", "nethack.cnf" );
  533. X+ }
  534. X+ 
  535. X  void menu_editdef( gametype )
  536. X      int gametype;
  537. X  {
  538. X      register struct Window *cwin;
  539. X!     int done = 0, err;
  540. X      USHORT mcode;
  541. X      long class, qual, code;
  542. X      register struct IntuiMessage *imsg;
  543. X***************
  544. X*** 2259,2271 ****
  545. X                  break;
  546. X  
  547. X              case GADDEFLOAD:
  548. X!                 LoadDefaults( DefPlayerName );
  549. X!                 strcpy( DefOutFile, DefPlayerName );
  550. X!                 CopyDefs2Gad();
  551. X!                 UpdateTypes( cwin );
  552. X!                 sprintf( buf, "Game definition loaded from: %s",
  553. X!                 DefPlayerName );
  554. X!                 errmsg( NO_FLASH, buf );
  555. X                  break;
  556. X  
  557. X              default:
  558. X--- 2440,2455 ----
  559. X                  break;
  560. X  
  561. X              case GADDEFLOAD:
  562. X!                 err = !LoadDefaults( DefPlayerName );
  563. X!                 if( !err )
  564. X!                 {
  565. X!                 strcpy( DefOutFile, DefPlayerName );
  566. X!                 CopyDefs2Gad();
  567. X!                 UpdateTypes( cwin );
  568. X!                 sprintf( buf, "Game definition loaded from: %s",
  569. X!                     DefPlayerName );
  570. X!                 errmsg( NO_FLASH, buf );
  571. X!                 }
  572. X                  break;
  573. X  
  574. X              default:
  575. X***************
  576. X*** 2634,2639 ****
  577. X--- 2818,2824 ----
  578. X                   * is displayed in the gadget.
  579. X                   */
  580. X  
  581. X+                 sp = gptr->dobj->do_ToolTypes;
  582. X                  strcpy( StrTools, *sp );
  583. X                  UpdateInfoWin( cwin );
  584. X                  break;
  585. X***************
  586. X*** 2804,2809 ****
  587. X--- 2989,3000 ----
  588. X  void SetGadgetUP( gad )
  589. X      register struct Gadget *gad;
  590. X  {
  591. X+     if( gad->Flags & GADGIMAGE )
  592. X+     {
  593. X+     DrawImage( win->RPort, (struct Image *)gad->GadgetRender,
  594. X+         gad->LeftEdge, gad->TopEdge );
  595. X+     }
  596. X+ #if 0
  597. X      RemoveGadget( win, gad );
  598. X      gad->Flags &= ~(SELECTED|GADGHIGHBITS);
  599. X      gad->Flags |= GADGHIMAGE|GADGIMAGE;
  600. X***************
  601. X*** 2815,2820 ****
  602. X--- 3006,3012 ----
  603. X      gad->Flags |= GADGHNONE;
  604. X      gad->Activation &= ~TOGGLESELECT;
  605. X      AddGadget( win, gad, 0 );
  606. X+ #endif
  607. X  }
  608. X  
  609. X  /*
  610. X***************
  611. X*** 2824,2829 ****
  612. X--- 3016,3027 ----
  613. X  void SetGadgetDOWN( gad )
  614. X      register struct Gadget *gad;
  615. X  {
  616. X+     if( gad->Flags & GADGHIMAGE )
  617. X+     {
  618. X+     DrawImage( win->RPort, (struct Image *)gad->SelectRender,
  619. X+         gad->LeftEdge, gad->TopEdge );
  620. X+     }
  621. X+ #if 0
  622. X      RemoveGadget( win, gad );
  623. X      gad->Flags &= ~GADGHIGHBITS;
  624. X      gad->Flags |= GADGHIMAGE|GADGIMAGE|SELECTED;
  625. X***************
  626. X*** 2835,2840 ****
  627. X--- 3033,3039 ----
  628. X      gad->Flags |= GADGHNONE;
  629. X      gad->Activation &= ~TOGGLESELECT;
  630. X      AddGadget( win, gad, 0 );
  631. X+ #endif
  632. X  }
  633. X  
  634. X  /*
  635. X***************
  636. X*** 2935,2941 ****
  637. X   * Load a defaults file into global structures
  638. X   */
  639. X  
  640. X! void LoadDefaults( player )
  641. X      char *player;
  642. X  {
  643. X      FILE *fp;
  644. X--- 3134,3140 ----
  645. X   * Load a defaults file into global structures
  646. X   */
  647. X  
  648. X! LoadDefaults( player )
  649. X      char *player;
  650. X  {
  651. X      FILE *fp;
  652. X***************
  653. X*** 2950,2956 ****
  654. X      {
  655. X      errmsg( FLASH,
  656. X          "Can't open defaults, %s, in current directory", fname );
  657. X!     return;
  658. X      }
  659. X  
  660. X      while( fgets( buf, sizeof( buf ), fp ) != NULL )
  661. X--- 3149,3155 ----
  662. X      {
  663. X      errmsg( FLASH,
  664. X          "Can't open defaults, %s, in current directory", fname );
  665. X!     return 0;
  666. X      }
  667. X  
  668. X      while( fgets( buf, sizeof( buf ), fp ) != NULL )
  669. X***************
  670. X*** 2986,2994 ****
  671. X--- 3185,3198 ----
  672. X          defgame.options = strdup( buf + 8 );
  673. X      }
  674. X      else
  675. X+     {
  676. X          errmsg( FLASH, "Invalid line in defaults file" );
  677. X+         fclose( fp );
  678. X+         return( 0 );
  679. X+     }
  680. X      }
  681. X      fclose( fp );
  682. X+     return( 1 );
  683. X  }
  684. X  
  685. X  /*
  686. X***************
  687. X*** 3083,3088 ****
  688. X--- 3287,3294 ----
  689. X  
  690. X      Defs_PlayerType.GadgetText->IText = players[ defgame.pltype ];
  691. X      RefreshGList( &Defs_PlayerType, cwin, NULL, 1 );
  692. X+     RefreshGList( &Defs_PlayerName, cwin, NULL, 1 );
  693. X+     RefreshGList( &Defs_DefaultName, cwin, NULL, 1 );
  694. X  }
  695. X  
  696. X  /*
  697. X***************
  698. X*** 3321,3331 ****
  699. X          case ITEM_SETOPT:
  700. X          case ITEM_RENAME:
  701. X          case ITEM_DISCARD:
  702. X-         case ITEM_COPYOPT:
  703. X          ino = MENUITEMNO( 1,i,NOSUB );
  704. X          OffMenu( win, ino );
  705. X          break;
  706. X  
  707. X          case ITEM_INFO:
  708. X          case ITEM_SETCOMMENT:
  709. X          ino = MENUITEMNO( 1,i,NOSUB );
  710. X--- 3527,3537 ----
  711. X          case ITEM_SETOPT:
  712. X          case ITEM_RENAME:
  713. X          case ITEM_DISCARD:
  714. X          ino = MENUITEMNO( 1,i,NOSUB );
  715. X          OffMenu( win, ino );
  716. X          break;
  717. X  
  718. X+         case ITEM_COPYOPT:
  719. X          case ITEM_INFO:
  720. X          case ITEM_SETCOMMENT:
  721. X          ino = MENUITEMNO( 1,i,NOSUB );
  722. X***************
  723. X*** 3808,3811 ****
  724. X--- 4014,4032 ----
  725. X      if( defgame.options )
  726. X      free( defgame.options );
  727. X      defgame.options = strdup( ToolsEntry( gptr, "OPTIONS" ) );
  728. X+ }
  729. X+ 
  730. X+ char *basename( str )
  731. X+     char *str;
  732. X+ {
  733. X+     char *t;
  734. X+ 
  735. X+     t = strrchr( str, '/' );
  736. X+     if( !t )
  737. X+     t = strrchr( str, ':' );
  738. X+     if( !t )
  739. X+     t = str;
  740. X+     else
  741. X+     ++t;
  742. X+     return( t );
  743. X  }
  744. X*** /tmp/da09182    Thu Feb 25 10:28:16 1993
  745. X--- sys/amiga/splitter/amiout.h    Mon Feb  8 13:48:57 1993
  746. X***************
  747. X*** 27,33 ****
  748. X  #define HUNK_RELOC32    1004
  749. X  #define HUNK_RELOC16    1005
  750. X  #define HUNK_RELOC8    1006
  751. X! /*#define HUNK_RELOC32s ???        /* ADOS 2.0 */
  752. X  #define HUNK_DRELOC32    0x3f7        /* Lattice & ADOS 2.0 */
  753. X  #define HUNK_DRELOC16    0x3f8        /* Lattice & ADOS 2.0 */
  754. X  #define HUNK_DRELOC8    0x3f9        /* Lattice & ADOS 2.0 */
  755. X--- 27,33 ----
  756. X  #define HUNK_RELOC32    1004
  757. X  #define HUNK_RELOC16    1005
  758. X  #define HUNK_RELOC8    1006
  759. X! #define HUNK_RELOC32s    0x3fc        /* ADOS 2.0 */
  760. X  #define HUNK_DRELOC32    0x3f7        /* Lattice & ADOS 2.0 */
  761. X  #define HUNK_DRELOC16    0x3f8        /* Lattice & ADOS 2.0 */
  762. X  #define HUNK_DRELOC8    0x3f9        /* Lattice & ADOS 2.0 */
  763. X*** /tmp/da09206    Thu Feb 25 10:28:22 1993
  764. X--- sys/amiga/splitter/loader.c    Mon Feb 22 11:49:59 1993
  765. X***************
  766. X*** 8,14 ****
  767. X  
  768. X  /*#define LDEBUG         /* turn on debugging I/O */
  769. X  #define SDEBUG        /* static primary array allocation */
  770. X! /*#define NOCLEAN        /* turn off $ovl_memchain code */
  771. X  /*#define NOSPLIT        /* debug: load an unsplit binary(run ONCE!)*/
  772. X  #define MULTI            /* real file reading code */
  773. X  /*#define PARANOID        /* check for refs off end that might be OK */
  774. X--- 8,14 ----
  775. X  
  776. X  /*#define LDEBUG         /* turn on debugging I/O */
  777. X  #define SDEBUG        /* static primary array allocation */
  778. X! /*#define NOCLEAN        /* turn off ovl$memchain code */
  779. X  /*#define NOSPLIT        /* debug: load an unsplit binary(run ONCE!)*/
  780. X  #define MULTI            /* real file reading code */
  781. X  /*#define PARANOID        /* check for refs off end that might be OK */
  782. X***************
  783. X*** 28,33 ****
  784. X--- 28,37 ----
  785. X  #include <proto/dos.h>
  786. X  #include <proto/exec.h>
  787. X  #include <dos.h>            /* NOT libraries/dos.h! */
  788. X+ #include <setjmp.h>
  789. X+ 
  790. X+ jmp_buf jbuf;
  791. X+ 
  792. X  #include "amiout.h"
  793. X  
  794. X  #include "multi.h"
  795. X***************
  796. X*** 37,55 ****
  797. X  
  798. X  #define HT(x)    ((x) & ~MEM_OBJ_EXTEND)
  799. X  
  800. X! void *$ovl_AllocMem(unsigned int);
  801. X  void spanic(char *);            /* think about this!!!! */
  802. X  void exit(int);
  803. X  
  804. X  #ifdef SDEBUG
  805. X! unsigned long *$ovl_hunktable[500];    /* 223 as of 10/21/92 */
  806. X  #else
  807. X! unsigned long *(*$ovl_hunktable)[];
  808. X! int $ovl_hunktablesize;
  809. X  #endif
  810. X  
  811. X  #ifndef NOCLEAN
  812. X! BPTR $ovlmemchain=0;
  813. X  #endif
  814. X  BPTR ovlfile=0;
  815. X  BPTR fh;
  816. X--- 41,59 ----
  817. X  
  818. X  #define HT(x)    ((x) & ~MEM_OBJ_EXTEND)
  819. X  
  820. X! void *ovl$AllocMem(unsigned int);
  821. X  void spanic(char *);            /* think about this!!!! */
  822. X  void exit(int);
  823. X  
  824. X  #ifdef SDEBUG
  825. X! unsigned long *ovl$hunktable[500];    /* 229 as of 2/3/93 */
  826. X  #else
  827. X! unsigned long *(*ovl$hunktable)[];
  828. X! int ovl$hunktablesize;
  829. X  #endif
  830. X  
  831. X  #ifndef NOCLEAN
  832. X! BPTR ovl$memchain=0;
  833. X  #endif
  834. X  BPTR ovlfile=0;
  835. X  BPTR fh;
  836. X***************
  837. X*** 74,79 ****
  838. X--- 78,86 ----
  839. X      {
  840. X      static BPTR base;
  841. X      static char never=1;
  842. X+ 
  843. X+     if( setjmp( jbuf ) != 0 )
  844. X+         return( NULL );
  845. X      if(never){
  846. X  #ifdef LDEBUG
  847. X          fprintf(stderr,"s_LoadSeg waiting\n");
  848. X***************
  849. X*** 133,143 ****
  850. X      fprintf(stderr,"hunk count=%d\n",hc);
  851. X  #endif
  852. X  #ifndef SDEBUG
  853. X!     $ovl_hunktable= (long*(*)[])$ovl_AllocMem(hc*4);
  854. X!     $ovl_hunktablesize=hc*4;
  855. X  #endif
  856. X  #ifdef LDEBUG
  857. X!     fprintf(stderr,"table at %08x\n",$ovl_hunktable);
  858. X  #endif
  859. X      Read(fh,&x,4);    /* F==0 */
  860. X      Read(fh,&x,4);    /* L==size-1 */
  861. X--- 140,150 ----
  862. X      fprintf(stderr,"hunk count=%d\n",hc);
  863. X  #endif
  864. X  #ifndef SDEBUG
  865. X!     ovl$hunktable= (long*(*)[])ovl$AllocMem(hc*4);
  866. X!     ovl$hunktablesize=hc*4;
  867. X  #endif
  868. X  #ifdef LDEBUG
  869. X!     fprintf(stderr,"table at %08x\n",ovl$hunktable);
  870. X  #endif
  871. X      Read(fh,&x,4);    /* F==0 */
  872. X      Read(fh,&x,4);    /* L==size-1 */
  873. X***************
  874. X*** 144,152 ****
  875. X      for(c=0;c<hc;c++){
  876. X          Read(fh,&x,4);
  877. X  #ifdef SDEBUG
  878. X!         xx=$ovl_hunktable[c]=$ovl_AllocMem(x*4);
  879. X  #else
  880. X!         xx=(*$ovl_hunktable)[c]=$ovl_AllocMem(x*4);
  881. X  #endif
  882. X  #ifdef LDEBUG
  883. X          fprintf(stderr,"t[%d]=%08x, len=%08x\n",c,xx,((long*)xx)[-2]);
  884. X--- 151,159 ----
  885. X      for(c=0;c<hc;c++){
  886. X          Read(fh,&x,4);
  887. X  #ifdef SDEBUG
  888. X!         xx=ovl$hunktable[c]=ovl$AllocMem(x*4);
  889. X  #else
  890. X!         xx=(*ovl$hunktable)[c]=ovl$AllocMem(x*4);
  891. X  #endif
  892. X  #ifdef LDEBUG
  893. X          fprintf(stderr,"t[%d]=%08x, len=%08x\n",c,xx,((long*)xx)[-2]);
  894. X***************
  895. X*** 158,173 ****
  896. X      for(c=0,xp=(unsigned long*)1;xp;c++){
  897. X  #ifdef LDEBUG
  898. X  # ifdef SDEBUG
  899. X!         yy=$ovl_hunktable[c];
  900. X  # else
  901. X!         yy=(*$ovl_hunktable)[c];
  902. X  # endif
  903. X          fprintf(stderr,"loading hunk %d@%08x len=%08x\n",c,yy,yy[-2]);
  904. X  #endif
  905. X  #ifdef SDEBUG
  906. X!         xp=load_hunk(fh,dummy,$ovl_hunktable[c]);
  907. X  #else
  908. X!         xp=load_hunk(fh,dummy,(*$ovl_hunktable)[c]);
  909. X  #endif
  910. X      }
  911. X      database=c-1;    /* first hunk for use for data on each load */
  912. X--- 165,180 ----
  913. X      for(c=0,xp=(unsigned long*)1;xp;c++){
  914. X  #ifdef LDEBUG
  915. X  # ifdef SDEBUG
  916. X!         yy=ovl$hunktable[c];
  917. X  # else
  918. X!         yy=(*ovl$hunktable)[c];
  919. X  # endif
  920. X          fprintf(stderr,"loading hunk %d@%08x len=%08x\n",c,yy,yy[-2]);
  921. X  #endif
  922. X  #ifdef SDEBUG
  923. X!         xp=load_hunk(fh,dummy,ovl$hunktable[c]);
  924. X  #else
  925. X!         xp=load_hunk(fh,dummy,(*ovl$hunktable)[c]);
  926. X  #endif
  927. X      }
  928. X      database=c-1;    /* first hunk for use for data on each load */
  929. X***************
  930. X*** 174,188 ****
  931. X      Close(fh);
  932. X  #ifdef LDEBUG
  933. X  # ifdef SDEBUG
  934. X!     fprintf(stderr,"retval=%08x\n",$ovl_hunktable[0]);
  935. X  # else
  936. X!     fprintf(stderr,"retval=%08x\n",(*$ovl_hunktable)[0]);
  937. X  # endif
  938. X  #endif
  939. X  #ifdef SDEBUG
  940. X!     r= (unsigned long) $ovl_hunktable[0];        /* BPTR to seglist */
  941. X  #else
  942. X!     r= (unsigned long) (*$ovl_hunktable)[0];    /* BPTR to seglist */
  943. X  #endif
  944. X      return (BPTR)(r>>2)-1;
  945. X  }
  946. X--- 181,195 ----
  947. X      Close(fh);
  948. X  #ifdef LDEBUG
  949. X  # ifdef SDEBUG
  950. X!     fprintf(stderr,"retval=%08x\n",ovl$hunktable[0]);
  951. X  # else
  952. X!     fprintf(stderr,"retval=%08x\n",(*ovl$hunktable)[0]);
  953. X  # endif
  954. X  #endif
  955. X  #ifdef SDEBUG
  956. X!     r= (unsigned long) ovl$hunktable[0];        /* BPTR to seglist */
  957. X  #else
  958. X!     r= (unsigned long) (*ovl$hunktable)[0];    /* BPTR to seglist */
  959. X  #endif
  960. X      return (BPTR)(r>>2)-1;
  961. X  }
  962. X***************
  963. X*** 203,211 ****
  964. X              /* doing it this way we don't need the hunk count */
  965. X      for(c=database,x=(unsigned long*)1;x;c++){
  966. X  #ifdef SDEBUG
  967. X!         x=load_hunk(fh,fl,$ovl_hunktable[c]);
  968. X  #else
  969. X!         x=load_hunk(fh,fl,(*$ovl_hunktable)[c]);
  970. X  #endif
  971. X      }
  972. X  #ifdef LDEBUG
  973. X--- 210,218 ----
  974. X              /* doing it this way we don't need the hunk count */
  975. X      for(c=database,x=(unsigned long*)1;x;c++){
  976. X  #ifdef SDEBUG
  977. X!         x=load_hunk(fh,fl,ovl$hunktable[c]);
  978. X  #else
  979. X!         x=load_hunk(fh,fl,(*ovl$hunktable)[c]);
  980. X  #endif
  981. X      }
  982. X  #ifdef LDEBUG
  983. X***************
  984. X*** 224,236 ****
  985. X      unsigned long data[2];
  986. X      unsigned long *where;
  987. X      unsigned long reloc_type;
  988. X  
  989. X  #ifdef LDEBUG
  990. X      {
  991. X      int pos=Seek(ovlfile,0,0);
  992. X      fprintf(stderr,"load_hunk (fpos=%08x) @%08x len=%08x(%08x)\n",pos,
  993. X!     lbase,lbase[-2],lbase[-2]/4);
  994. X      }
  995. X  #endif
  996. X      if(0==Read(ovlfile,data,sizeof(data))){
  997. X  #ifdef LDEBUG
  998. X--- 231,251 ----
  999. X      unsigned long data[2];
  1000. X      unsigned long *where;
  1001. X      unsigned long reloc_type;
  1002. X+     static int lbufsize=680;    /* max xref in one hunk 347 2/3/93 */
  1003. X+     static unsigned long *lbuf=0;    /* load buffer */
  1004. X+     unsigned long *lbp;
  1005. X+     unsigned short *lbps;
  1006. X  
  1007. X+     if(!lbuf)lbuf=malloc(lbufsize*4);
  1008. X+     if(!lbuf)spanic("Can't allocate lbuf");
  1009. X  #ifdef LDEBUG
  1010. X+ # ifndef MULTI
  1011. X      {
  1012. X      int pos=Seek(ovlfile,0,0);
  1013. X      fprintf(stderr,"load_hunk (fpos=%08x) @%08x len=%08x(%08x)\n",pos,
  1014. X!         lbase,lbase[-2],lbase[-2]/4);
  1015. X      }
  1016. X+ # endif
  1017. X  #endif
  1018. X      if(0==Read(ovlfile,data,sizeof(data))){
  1019. X  #ifdef LDEBUG
  1020. X***************
  1021. X*** 240,246 ****
  1022. X          return(0);    /* EOF */
  1023. X      }
  1024. X  #ifdef LDEBUG
  1025. X!     fprintf(stderr,"read type=%08x len=%08x(longs)\n",data[0],data[1]);
  1026. X  #endif
  1027. X      if( HT(data[0])!=HUNK_CODE &&
  1028. X          HT(data[0])!=HUNK_DATA &&
  1029. X--- 255,261 ----
  1030. X          return(0);    /* EOF */
  1031. X      }
  1032. X  #ifdef LDEBUG
  1033. X!     fprintf(stderr,"read type=%08x len=%08x\n",data[0],data[1]<<2);
  1034. X  #endif
  1035. X      if( HT(data[0])!=HUNK_CODE &&
  1036. X          HT(data[0])!=HUNK_DATA &&
  1037. X***************
  1038. X*** 278,317 ****
  1039. X  #endif
  1040. X      }
  1041. X              /* link/relocate as needed */
  1042. X-             /* NB this could be done faster if we keep a buffer of
  1043. X-              * relocation information (instead of issuing 4 byte
  1044. X-              * Reads)
  1045. X-              */
  1046. X      xx=Read(ovlfile,&reloc_type,sizeof(reloc_type));
  1047. X      if(xx!=sizeof(reloc_type))spanic("lost reloc_type");
  1048. X      while(reloc_type!=HUNK_END){
  1049. X          unsigned long reloc_count;
  1050. X!         unsigned long reloc_hunk;
  1051. X          unsigned long *base;
  1052. X          unsigned long reloc_offset;
  1053. X!         if(reloc_type!=HUNK_RELOC32){
  1054. X!             if(reloc_type==HUNK_END)continue;    /* and quit */
  1055. X              fprintf(stderr,"bad data %08x\n",reloc_type);
  1056. X              spanic("ovlfile reloc cookie botch");
  1057. X          }
  1058. X          xx=Read(ovlfile,&reloc_count,sizeof(reloc_count));
  1059. X          if(xx!=sizeof(reloc_count))spanic("lost reloc_count");
  1060. X!         while(reloc_count){
  1061. X!             xx=Read(ovlfile,&reloc_hunk,sizeof(reloc_hunk));
  1062. X!             if(xx!=sizeof(reloc_count))spanic("lost reloc_hunk");
  1063. X  #ifdef SDEBUG
  1064. X!             base=$ovl_hunktable[reloc_hunk];
  1065. X  #else
  1066. X!             base=(*$ovl_hunktable)[reloc_hunk];
  1067. X  #endif
  1068. X  #ifdef LDEBUG
  1069. X              fprintf(stderr,"reloc #%d: hunk #%d@%08x\n",
  1070. X!               reloc_count,reloc_hunk,base);
  1071. X  #endif
  1072. X              while(reloc_count--){
  1073. X!                 xx=Read(ovlfile,&reloc_offset,sizeof(long));
  1074. X!                 if(xx!=sizeof(reloc_count))
  1075. X!                     spanic("lost offset");
  1076. X                  if(reloc_offset<0 || reloc_offset>where[-2]){
  1077. X                      fprintf(stderr,"where[-2]==%08x\n",
  1078. X                        where[-2]);
  1079. X--- 293,345 ----
  1080. X  #endif
  1081. X      }
  1082. X              /* link/relocate as needed */
  1083. X      xx=Read(ovlfile,&reloc_type,sizeof(reloc_type));
  1084. X      if(xx!=sizeof(reloc_type))spanic("lost reloc_type");
  1085. X      while(reloc_type!=HUNK_END){
  1086. X          unsigned long reloc_count;
  1087. X!         unsigned long reloc_count2;
  1088. X          unsigned long *base;
  1089. X          unsigned long reloc_offset;
  1090. X!         unsigned long reloc_shift;
  1091. X!         int hnum;
  1092. X!         if(reloc_type==HUNK_END)continue;    /* and quit */
  1093. X!         if(reloc_type!=HUNK_RELOC32 && reloc_type!=HUNK_RELOC32s){
  1094. X              fprintf(stderr,"bad data %08x\n",reloc_type);
  1095. X              spanic("ovlfile reloc cookie botch");
  1096. X          }
  1097. X+         reloc_shift=(reloc_type==HUNK_RELOC32)?2:1;
  1098. X          xx=Read(ovlfile,&reloc_count,sizeof(reloc_count));
  1099. X          if(xx!=sizeof(reloc_count))spanic("lost reloc_count");
  1100. X! 
  1101. X!         reloc_count2=reloc_count;
  1102. X!         while(reloc_count){     /* fix indent */
  1103. X!             if((reloc_count<<reloc_shift) >= (lbufsize*4)){
  1104. X!                 free(lbuf);
  1105. X!                 lbufsize=10+reloc_count;
  1106. X!                 lbuf=malloc(lbufsize*4);
  1107. X!                 if(!lbuf)spanic("Can't realloc lbuf");
  1108. X!             }
  1109. X!             xx=Read(ovlfile,lbuf,((1+reloc_count)<<reloc_shift));
  1110. X!             if(xx!=((1+reloc_count)<<reloc_shift))
  1111. X!                 spanic("can't fill lbuf");
  1112. X!             lbp= &lbuf[1];        /* 0 is reloc_hunk */
  1113. X!             lbps= ((unsigned short *)lbuf)+1;
  1114. X!             hnum=(reloc_shift==2)? lbp[-1]: lbps[-1];
  1115. X  #ifdef SDEBUG
  1116. X!             base=ovl$hunktable[hnum];
  1117. X  #else
  1118. X!             base=(*ovl$hunktable)[hnum];
  1119. X  #endif
  1120. X  #ifdef LDEBUG
  1121. X              fprintf(stderr,"reloc #%d: hunk #%d@%08x\n",
  1122. X!               reloc_count,hnum,base);
  1123. X  #endif
  1124. X              while(reloc_count--){
  1125. X!                 if(reloc_shift==2){
  1126. X!                     reloc_offset= *lbp++;
  1127. X!                 } else {
  1128. X!                     reloc_offset= *lbps++;
  1129. X!                 }
  1130. X                  if(reloc_offset<0 || reloc_offset>where[-2]){
  1131. X                      fprintf(stderr,"where[-2]==%08x\n",
  1132. X                        where[-2]);
  1133. X***************
  1134. X*** 339,350 ****
  1135. X--- 367,386 ----
  1136. X  #endif
  1137. X                  }
  1138. X              }
  1139. X+             if( reloc_shift == 1 && (reloc_count2 & 1) == 0){ /* longword align */
  1140. X+                 short x;
  1141. X+                 Read(ovlfile,&x,sizeof(x));
  1142. X+             }
  1143. X              xx=Read(ovlfile,&reloc_count,sizeof(reloc_count));
  1144. X              if(xx!=sizeof(reloc_count))spanic("lost reloc_count2");
  1145. X+             reloc_count2=reloc_count;
  1146. X          }
  1147. X          xx=Read(ovlfile,&reloc_type,sizeof(reloc_type));
  1148. X          if(xx!=sizeof(reloc_count))spanic("lost reloc_type2");
  1149. X      }
  1150. X+ /* BUG -
  1151. X+  * lbuf never freed
  1152. X+  */
  1153. X      return(where);            /* return execute start point */
  1154. X  }
  1155. X  
  1156. X***************
  1157. X*** 354,360 ****
  1158. X       0    data
  1159. X   */
  1160. X  void *
  1161. X! $ovl_AllocMem(len)
  1162. X      unsigned int len;
  1163. X      {
  1164. X      unsigned long *adr;
  1165. X--- 390,396 ----
  1166. X       0    data
  1167. X   */
  1168. X  void *
  1169. X! ovl$AllocMem(len)
  1170. X      unsigned int len;
  1171. X      {
  1172. X      unsigned long *adr;
  1173. X***************
  1174. X*** 376,383 ****
  1175. X      if(!adr)spanic("allocation failure");
  1176. X      adr[0]=length;
  1177. X  #ifndef NOCLEAN
  1178. X!     adr[1]=(unsigned long)$ovlmemchain;    /* list for freeing at end */
  1179. X!     $ovlmemchain=((long)adr>>2)+1;    /* BPTR to next ptr */
  1180. X  # ifdef LDEBUG
  1181. X      fprintf(stderr,"Alloc: adr[0]=%08x adr[1]=%08x\n",adr[0],adr[1]);
  1182. X  # endif
  1183. X--- 412,419 ----
  1184. X      if(!adr)spanic("allocation failure");
  1185. X      adr[0]=length;
  1186. X  #ifndef NOCLEAN
  1187. X!     adr[1]=(unsigned long)ovl$memchain;    /* list for freeing at end */
  1188. X!     ovl$memchain=((long)adr>>2)+1;    /* BPTR to next ptr */
  1189. X  # ifdef LDEBUG
  1190. X      fprintf(stderr,"Alloc: adr[0]=%08x adr[1]=%08x\n",adr[0],adr[1]);
  1191. X  # endif
  1192. X***************
  1193. X*** 392,400 ****
  1194. X      BPTR p,p1;
  1195. X  
  1196. X  # ifdef LDEBUG
  1197. X!     fprintf(stderr,"starting Free loop: ovlmemchain=%x\n",$ovlmemchain);
  1198. X  # endif
  1199. X!     for(p=$ovlmemchain;p;p=p1){
  1200. X          p1=*(BPTR *)BADDR(p);
  1201. X  # ifdef LDEBUG
  1202. X          fprintf(stderr,"Free(%x,%x)\n",BADDR(p-1),
  1203. X--- 428,436 ----
  1204. X      BPTR p,p1;
  1205. X  
  1206. X  # ifdef LDEBUG
  1207. X!     fprintf(stderr,"starting Free loop: ovlmemchain=%x\n",ovl$memchain);
  1208. X  # endif
  1209. X!     for(p=ovl$memchain;p;p=p1){
  1210. X          p1=*(BPTR *)BADDR(p);
  1211. X  # ifdef LDEBUG
  1212. X          fprintf(stderr,"Free(%x,%x)\n",BADDR(p-1),
  1213. X***************
  1214. X*** 404,410 ****
  1215. X      }
  1216. X  #endif
  1217. X  #ifndef SDEBUG
  1218. X!     FreeMem($ovl_hunktable,$ovl_hunktablesize);
  1219. X  #endif
  1220. X      return;
  1221. X  }
  1222. X--- 440,446 ----
  1223. X      }
  1224. X  #endif
  1225. X  #ifndef SDEBUG
  1226. X!     FreeMem(ovl$hunktable,ovl$hunktablesize);
  1227. X  #endif
  1228. X      return;
  1229. X  }
  1230. X***************
  1231. X*** 415,421 ****
  1232. X      char *s;
  1233. X  {
  1234. X      fprintf(stderr,"s_LoadSeg failed: %s\n",s);
  1235. X!     getchar();
  1236. X!     exit(1);
  1237. X  }
  1238. X  #endif /* SPLIT */
  1239. X--- 451,457 ----
  1240. X      char *s;
  1241. X  {
  1242. X      fprintf(stderr,"s_LoadSeg failed: %s\n",s);
  1243. X!     s_UnLoadSeg();
  1244. X!     longjmp( jbuf, -1 );
  1245. X  }
  1246. X  #endif /* SPLIT */
  1247. X*** /tmp/da09214    Thu Feb 25 10:28:24 1993
  1248. X--- sys/amiga/splitter/multi.c    Mon Feb  8 14:10:28 1993
  1249. X***************
  1250. X*** 94,100 ****
  1251. X              break;            /* comment, blank lines */
  1252. X          default:
  1253. X              if(line[0]==mfp->mfh_mo.r.mor_tag){
  1254. X!                 mfp->mfh_fh=Open(&line[1],MODE_OLDFILE);
  1255. X                  if(!mfp->mfh_fh){
  1256. X                      return -1;    /* error */
  1257. X                  }
  1258. X--- 94,103 ----
  1259. X              break;            /* comment, blank lines */
  1260. X          default:
  1261. X              if(line[0]==mfp->mfh_mo.r.mor_tag){
  1262. X!                         /* allow blanks after tag */
  1263. X!                 char *file= &line[1];
  1264. X!                 while(*file && isspace(*file))file++;
  1265. X!                 mfp->mfh_fh=Open(file,MODE_OLDFILE);
  1266. X                  if(!mfp->mfh_fh){
  1267. X                      return -1;    /* error */
  1268. X                  }
  1269. X*** /tmp/da09230    Thu Feb 25 10:28:27 1993
  1270. X--- sys/amiga/splitter/split.doc    Tue Feb 23 09:38:23 1993
  1271. X***************
  1272. X*** 1,4 ****
  1273. X!     Splitter            [split.doc 93/01/08]
  1274. X  
  1275. X  Usage:
  1276. X      splitter [-Cc_prototype] [-Dd_prototype] [-ddir_prototype] binary
  1277. X--- 1,4 ----
  1278. X!     Splitter            [split.doc 93/02/21]
  1279. X  
  1280. X  Usage:
  1281. X      splitter [-Cc_prototype] [-Dd_prototype] [-ddir_prototype] binary
  1282. X***************
  1283. X*** 31,37 ****
  1284. X  preceed all D entries.
  1285. X  
  1286. X  Maximum output file size is 800K (819200 bytes) - this leaves just enough
  1287. X! space on an empty floppy for a small icon.
  1288. X  
  1289. X  Code file contents:
  1290. X  The first code file contains:
  1291. X--- 31,38 ----
  1292. X  preceed all D entries.
  1293. X  
  1294. X  Maximum output file size is 800K (819200 bytes) - this leaves just enough
  1295. X! space on an empty floppy for a small icon.  Note that splitter will not
  1296. X! break a hunk - VERY large hunks will result in files above the limit.
  1297. X  
  1298. X  Code file contents:
  1299. X  The first code file contains:
  1300. X***************
  1301. X*** 48,53 ****
  1302. X--- 49,60 ----
  1303. X      [SASC5]
  1304. X      lc -L splitter.c arg.c
  1305. X  
  1306. X+ CHANGES FOR 3.1.1:
  1307. X+     Faster loading by buffering offsets.
  1308. X+     Smaller files: splitter will now write out HUNK_RELOC32short
  1309. X+     relocation blocks whenever possible.
  1310. X+     Blanks may now be between the C/D and the file name in the .dir file.
  1311. X+ 
  1312. X  BUGS
  1313. X      The present system for generating multiple files is a hack -
  1314. X      multi.[ch] should be upgraded instead.
  1315. X***************
  1316. X*** 54,58 ****
  1317. X  
  1318. X      Many optimizations for minimizing the size of the output file
  1319. X      could/should/will be added.
  1320. X- 
  1321. X-     Not tested with SASC 6.0 yet.
  1322. X--- 61,63 ----
  1323. X*** /tmp/da09238    Thu Feb 25 10:28:29 1993
  1324. X--- sys/amiga/splitter/split.h    Mon Feb  8 13:49:08 1993
  1325. X***************
  1326. X*** 7,15 ****
  1327. X   * Common definitions for binary file splitting and loading of split files.
  1328. X   */
  1329. X  
  1330. X! #define SVER    1    /* Basic file splitting capability */
  1331. X! /*#define SVER    2    /* */
  1332. X! /*#define SVER    3    /* */
  1333. X  
  1334. X  /* Nothing below this line should need to be modified. */
  1335. X  
  1336. X--- 7,14 ----
  1337. X   * Common definitions for binary file splitting and loading of split files.
  1338. X   */
  1339. X  
  1340. X! /*#define SVER    1    /* Basic file splitting capability */
  1341. X! #define SVER    2    /* emit HUNK_RELOC32s as appropriate */
  1342. X  
  1343. X  /* Nothing below this line should need to be modified. */
  1344. X  
  1345. X***************
  1346. X*** 17,24 ****
  1347. X   __SPLIT_H__SVER_MUST_BE_DEFINED
  1348. X  #endif
  1349. X  
  1350. X! #if SVER >= 2
  1351. X      /* enable options */
  1352. X  #endif
  1353. X  
  1354. X  /* internal structures, etc */
  1355. X--- 16,24 ----
  1356. X   __SPLIT_H__SVER_MUST_BE_DEFINED
  1357. X  #endif
  1358. X  
  1359. X! #if SVER == 2
  1360. X      /* enable options */
  1361. X+ # define EMIT_32s
  1362. X  #endif
  1363. X  
  1364. X  /* internal structures, etc */
  1365. X***************
  1366. X*** 176,181 ****
  1367. X--- 176,182 ----
  1368. X  extern void write_header(void);
  1369. X  extern void owrite(void*,long);
  1370. X  extern void owrite_long(long);
  1371. X+ extern void owrite_short(short);
  1372. X  extern void out_start(char *);
  1373. X  extern void out_stop(void);
  1374. X  extern void new_file(void);
  1375. X*** /tmp/da09246    Thu Feb 25 10:28:31 1993
  1376. X--- sys/amiga/splitter/splitter.c    Mon Feb  8 13:49:20 1993
  1377. X***************
  1378. X*** 293,298 ****
  1379. X--- 293,326 ----
  1380. X      hunk *hp;listlist *ll;
  1381. X      {
  1382. X      block *bp;
  1383. X+ #ifdef EMIT_32s
  1384. X+     int x;
  1385. X+     ULONG *p;
  1386. X+         /* can we write the entire block with a HUNK_RELOC32s? */
  1387. X+     foreach(bp,&(ll->list),(block*)){
  1388. X+         if((((*hlist)[bp->b[1]]).h->hunknum)>0xffff)goto no_32s; /*no*/
  1389. X+         for(p= &(bp->b[2]), x=bp->b[0];x;x--,p++){
  1390. X+             if(*p>0xffff)goto no_32s;    /*no, offset too big*/
  1391. X+         }
  1392. X+     }
  1393. X+         /* yes */
  1394. X+     owrite_long(HUNK_RELOC32s);
  1395. X+     foreach(bp,&(ll->list),(block*)){
  1396. X+         owrite_long(bp->b[0]);
  1397. X+         owrite_short(((*hlist)[bp->b[1]]).h->hunknum);
  1398. X+         for(p= &(bp->b[2]), x=bp->b[0];x;x--,p++){
  1399. X+             owrite_short(*p);
  1400. X+         }
  1401. X+             /* force long alignment.  Not documented, but makes
  1402. X+              * reading dumps easier */
  1403. X+         if((bp->b[0] & 1) == 0){    /* note hunknum also short */
  1404. X+             owrite_short(0);
  1405. X+         }
  1406. X+     }
  1407. X+     owrite_long(0);
  1408. X+     return;
  1409. X+ no_32s:
  1410. X+ #endif
  1411. X      owrite_long(HUNK_RELOC32);
  1412. X      foreach(bp,&(ll->list),(block*)){
  1413. X          owrite_long(bp->b[0]);
  1414. X***************
  1415. X*** 360,365 ****
  1416. X--- 388,401 ----
  1417. X  }
  1418. X  
  1419. X  void
  1420. X+ owrite_short(literal)
  1421. X+     short literal;
  1422. X+ {
  1423. X+     short x=literal;
  1424. X+     owrite(&x,sizeof(x));
  1425. X+ }
  1426. X+ 
  1427. X+ void
  1428. X  owrite(where,len)
  1429. X      void *where;
  1430. X      long len;
  1431. X***************
  1432. X*** 390,395 ****
  1433. X--- 426,441 ----
  1434. X      long literal;
  1435. X  {
  1436. X      long x=literal;
  1437. X+     if((osize+sizeof(x))>SPLITSIZE)new_file();
  1438. X+     owrite(&x,sizeof(x));
  1439. X+     osize += sizeof(x);
  1440. X+ }
  1441. X+ 
  1442. X+ void
  1443. X+ owrite_short(literal)
  1444. X+     short literal;
  1445. X+ {
  1446. X+     short x=literal;
  1447. X      if((osize+sizeof(x))>SPLITSIZE)new_file();
  1448. X      owrite(&x,sizeof(x));
  1449. X      osize += sizeof(x);
  1450. X*** /tmp/da09302    Thu Feb 25 10:28:45 1993
  1451. X--- sys/atari/tos.c    Tue Feb 23 11:25:37 1993
  1452. X***************
  1453. X*** 102,117 ****
  1454. X   * "meta" bit for it.  -3.
  1455. X   */
  1456. X  #define SCANLO        0x10
  1457. X- #define SCANHI        0x32
  1458. X- #define SCANKEYS    (SCANHI - SCANLO + 1)
  1459. X- #define inmap(x)    (SCANLO <= (x) && (x) <= SCANHI)
  1460. X  
  1461. X! static const char scanmap[SCANKEYS] = {     /* ... */
  1462. X      'q','w','e','r','t','y','u','i','o','p','[',']', '\n',
  1463. X      0, 'a','s','d','f','g','h','j','k','l',';','\'', '`',
  1464. X!     0, '\\', 'z','x','c','v','b','N','m'     /* ... */
  1465. X  };
  1466. X  
  1467. X  /*
  1468. X   * BIOSgetch gets keys directly with a BIOS call.
  1469. X   */
  1470. X--- 102,116 ----
  1471. X   * "meta" bit for it.  -3.
  1472. X   */
  1473. X  #define SCANLO        0x10
  1474. X  
  1475. X! static const char scanmap[] = {     /* ... */
  1476. X      'q','w','e','r','t','y','u','i','o','p','[',']', '\n',
  1477. X      0, 'a','s','d','f','g','h','j','k','l',';','\'', '`',
  1478. X!     0, '\\', 'z','x','c','v','b','N','m',',','.','?'     /* ... */
  1479. X  };
  1480. X  
  1481. X+ #define inmap(x)    (SCANLO <= (x) && (x) < SCANLO + SIZE(scanmap))
  1482. X+ 
  1483. X  /*
  1484. X   * BIOSgetch gets keys directly with a BIOS call.
  1485. X   */
  1486. X***************
  1487. X*** 232,240 ****
  1488. X--- 231,248 ----
  1489. X  void
  1490. X  get_scr_size()
  1491. X  {
  1492. X+ # ifdef MINT
  1493. X+ #  include <ioctl.h>
  1494. X+     struct winsize win;
  1495. X+ 
  1496. X+     ioctl(0,TIOCGWINSZ, &win);
  1497. X+     LI = win.ws_row;
  1498. X+     CO = win.ws_col;
  1499. X+ # else
  1500. X      init_aline();
  1501. X      LI = (*((WORD  *)(_a_line + -42L))) + 1;
  1502. X      CO = (*((WORD  *)(_a_line + -44L))) + 1;
  1503. X+ # endif
  1504. X  }
  1505. X  
  1506. X  # define BIGBUF  8192
  1507. X***************
  1508. X*** 289,294 ****
  1509. X--- 297,304 ----
  1510. X  void
  1511. X  set_colors()
  1512. X  {
  1513. X+     static char colorHE[] = "\033q\033b0";
  1514. X+ 
  1515. X      if (!flags.BIOS)
  1516. X          return;
  1517. X      init_aline();
  1518. X***************
  1519. X*** 298,303 ****
  1520. X--- 308,314 ----
  1521. X          return;
  1522. X      } else {
  1523. X          colors_changed = TRUE;
  1524. X+         HE = colorHE;
  1525. X      }
  1526. X  }
  1527. X  
  1528. X***************
  1529. X*** 304,309 ****
  1530. X--- 315,324 ----
  1531. X  void
  1532. X  restore_colors()
  1533. X  {
  1534. X+     static char plainHE[] = "\033q";
  1535. X+ 
  1536. X+     if (colors_changed)
  1537. X+         HE = plainHE;
  1538. X      colors_changed = FALSE;
  1539. X  }
  1540. X  # endif /* TEXTCOLOR */
  1541. X*** /tmp/da09542    Thu Feb 25 10:29:52 1993
  1542. X--- sys/msdos/msdos.c    Wed Feb 17 09:51:36 1993
  1543. X***************
  1544. X*** 1,4 ****
  1545. X! /*    SCCS Id: @(#)msdos.c     3.1     93/01/05          */
  1546. X  /* Copyright (c) NetHack PC Development Team 1990, 1991, 1992      */
  1547. X  /* NetHack may be freely redistributed.  See license for details. */
  1548. X  
  1549. X--- 1,4 ----
  1550. X! /*    SCCS Id: @(#)msdos.c     3.1     93/02/16          */
  1551. X  /* Copyright (c) NetHack PC Development Team 1990, 1991, 1992      */
  1552. X  /* NetHack may be freely redistributed.  See license for details. */
  1553. X  
  1554. X***************
  1555. X*** 128,142 ****
  1556. X   * "meta" bit for it.  -3.
  1557. X   */
  1558. X  #define SCANLO        0x10
  1559. X- #define SCANHI        0x32
  1560. X- #define SCANKEYS    (SCANHI - SCANLO + 1)
  1561. X- #define inmap(x)    (SCANLO <= (x) && (x) <= SCANHI)
  1562. X  
  1563. X! static const char scanmap[SCANKEYS] = {     /* ... */
  1564. X      'q','w','e','r','t','y','u','i','o','p','[',']', '\n',
  1565. X      0, 'a','s','d','f','g','h','j','k','l',';','\'', '`',
  1566. X!     0, '\\', 'z','x','c','v','b','N','m'     /* ... */
  1567. X  };
  1568. X  
  1569. X  /*
  1570. X   * BIOSgetch gets keys directly with a BIOS call.
  1571. X--- 128,141 ----
  1572. X   * "meta" bit for it.  -3.
  1573. X   */
  1574. X  #define SCANLO        0x10
  1575. X  
  1576. X! static const char scanmap[] = {     /* ... */
  1577. X      'q','w','e','r','t','y','u','i','o','p','[',']', '\n',
  1578. X      0, 'a','s','d','f','g','h','j','k','l',';','\'', '`',
  1579. X!     0, '\\', 'z','x','c','v','b','n','m',',','.','?'    /* ... */
  1580. X  };
  1581. X+ 
  1582. X+ #define inmap(x)    (SCANLO <= (x) && (x) < SCANLO + SIZE(scanmap))
  1583. X  
  1584. X  /*
  1585. X   * BIOSgetch gets keys directly with a BIOS call.
  1586. X*** /tmp/da09606    Thu Feb 25 10:30:08 1993
  1587. X--- sys/os2/Install.os2    Thu Feb  4 10:39:38 1993
  1588. X***************
  1589. X*** 2,8 ****
  1590. X                                 on an OS/2 system
  1591. X               =====================================================
  1592. X                                  Timo Hakulinen
  1593. X!                           Last revision: 24 Jan 1993
  1594. X  
  1595. X  0.  Read this entire file before starting, and come back to the Notes below if
  1596. X      you have any problems.
  1597. X--- 2,8 ----
  1598. X                                 on an OS/2 system
  1599. X               =====================================================
  1600. X                                  Timo Hakulinen
  1601. X!                           Last revision: 4 Feb 1993
  1602. X  
  1603. X  0.  Read this entire file before starting, and come back to the Notes below if
  1604. X      you have any problems.
  1605. X***************
  1606. X*** 78,83 ****
  1607. X--- 78,88 ----
  1608. X      definitions there, because every compiler has its own way of declaring
  1609. X      the necessary system functions and data structures.  In general you
  1610. X      should prefer the compiler's offerings, if possible.
  1611. X+ 
  1612. X+     If you are going to compile the game on an HPFS drive, uncomment OS2_HPFS,
  1613. X+     which will enable the use of longer file names during compilation.  The
  1614. X+     generated executable will only use file names compatible with FAT drives,
  1615. X+     however.
  1616. X  
  1617. X      If you are using a 32 bit compiler other than GCC emx 0.8f or C Set/2 in
  1618. X      OS/2 2.x, force OS2_32BITAPI to be defined.  Otherwise it is defined only
  1619. X*** /tmp/da09614    Thu Feb 25 10:30:10 1993
  1620. X--- sys/os2/Makefile.os2    Thu Feb  4 10:39:29 1993
  1621. X***************
  1622. X*** 1,4 ****
  1623. X! #    SCCS Id: @(#)Makefile.os2    3.1    93/01/24
  1624. X  #    OS/2 NetHack 3.1 Makefile for OS/2 versions 1.x and 2.x
  1625. X  #    Copyright (C) 1990, 1991, 1992, 1993 Timo Hakulinen
  1626. X  #
  1627. X--- 1,4 ----
  1628. X! #    SCCS Id: @(#)Makefile.os2    3.1    93/02/02
  1629. X  #    OS/2 NetHack 3.1 Makefile for OS/2 versions 1.x and 2.x
  1630. X  #    Copyright (C) 1990, 1991, 1992, 1993 Timo Hakulinen
  1631. X  #
  1632. X***************
  1633. X*** 207,213 ****
  1634. X  #
  1635. X  #    GCC: max. reasonable GCC warning levels.  Can't use -Wall, because then
  1636. X  #    it would whine about all the zillions of unused declarations etc.
  1637. X! #    Even with these switch you'll get a lot of warnings, but they should
  1638. X  #    all be benign.
  1639. X  #
  1640. X  #    CSet/2: warning level 3.  The second optional parameter gives
  1641. X--- 207,213 ----
  1642. X  #
  1643. X  #    GCC: max. reasonable GCC warning levels.  Can't use -Wall, because then
  1644. X  #    it would whine about all the zillions of unused declarations etc.
  1645. X! #    Even with these switches you'll get a lot of warnings, but they should
  1646. X  #    all be benign.
  1647. X  #
  1648. X  #    CSet/2: warning level 3.  The second optional parameter gives
  1649. X***************
  1650. X*** 219,226 ****
  1651. X  #WARN    = #/W3 #/Kbper    # CSet/2
  1652. X  
  1653. X  #
  1654. X! #    GCC object format selection.  Upper line for standard OS/2 OMF
  1655. X! #    object format, lower for Unix style a.out format.
  1656. X  #
  1657. X  
  1658. X  #GCCO    = -Zomf -Zsys    # GCC OMF
  1659. X--- 219,226 ----
  1660. X  #WARN    = #/W3 #/Kbper    # CSet/2
  1661. X  
  1662. X  #
  1663. X! #    GCC object format selection.  The upper line for standard OS/2 OMF
  1664. X! #    object format, the lower for Unix style a.out format.
  1665. X  #
  1666. X  
  1667. X  #GCCO    = -Zomf -Zsys    # GCC OMF
  1668. X***************
  1669. X*** 241,254 ****
  1670. X  CL    =
  1671. X  
  1672. X  #
  1673. X! #    MSC, CSet/2: don't ignore case in symbols, no default lib search, stack
  1674. X! #    8KB, allow max 1024 segments in program.
  1675. X  #
  1676. X  #    GCC: likes a big stack.
  1677. X  #
  1678. X  
  1679. X  LFLAGS    = /noig /nod /stack:8192 /seg:1024 $(LDFLAGS)    # MSC, CSet/2
  1680. X! #LFLAGS    = /noig /stack:40000                # GCC
  1681. X  
  1682. X  #
  1683. X  #    Prepare for a debugger.
  1684. X--- 241,254 ----
  1685. X  CL    =
  1686. X  
  1687. X  #
  1688. X! #    MSC, CSet/2: don't ignore case in symbols, no default lib search,
  1689. X! #    stack 8KB, allow max 1024 segments in program.
  1690. X  #
  1691. X  #    GCC: likes a big stack.
  1692. X  #
  1693. X  
  1694. X  LFLAGS    = /noig /nod /stack:8192 /seg:1024 $(LDFLAGS)    # MSC, CSet/2
  1695. X! #LFLAGS    = /noig /stack:40000                # GCC OMF
  1696. X  
  1697. X  #
  1698. X  #    Prepare for a debugger.
  1699. X***************
  1700. X*** 386,398 ****
  1701. X  
  1702. X  #
  1703. X  #    Short / long file name selection for FAT and HPFS.
  1704. X! #    Only two files need consideration.
  1705. X  #
  1706. X  
  1707. X  GUIDEBOO = Guideboo    # FAT
  1708. X  PATCHLEV = patchlev    # - " -
  1709. X  #GUIDEBOO = Guidebook    # HPFS
  1710. X  #PATCHLEV = patchlevel    # - " -
  1711. X  
  1712. X  
  1713. X  #
  1714. X--- 386,400 ----
  1715. X  
  1716. X  #
  1717. X  #    Short / long file name selection for FAT and HPFS.
  1718. X! #    Only three files need consideration.
  1719. X  #
  1720. X  
  1721. X  GUIDEBOO = Guideboo    # FAT
  1722. X  PATCHLEV = patchlev    # - " -
  1723. X+ DATABASE = data.bas    # - " -
  1724. X  #GUIDEBOO = Guidebook    # HPFS
  1725. X  #PATCHLEV = patchlevel    # - " -
  1726. X+ #DATABASE = data.base    # - " -
  1727. X  
  1728. X  
  1729. X  #
  1730. X***************
  1731. X*** 422,439 ****
  1732. X  
  1733. X  #
  1734. X  #    If you have yacc and lex programs and make any changes, uncomment
  1735. X! #    the lowermost two lines and uncomment the others.  If you make
  1736. X! #    changes to the .y and .l files but prefer to process the files
  1737. X  #    separately elsewhere, activate the middle two lines, so your changes
  1738. X  #    don't get overwritten.
  1739. X  #
  1740. X  
  1741. X! #do_yacc : yacc_cpy    # use pre-generated files
  1742. X! #do_lex :  lex_cpy    #    - " -
  1743. X  #do_yacc : yacc_msg    # show message if changed
  1744. X  #do_lex :  lex_msg    #    - " -
  1745. X! do_yacc : yacc_act    # re-process files
  1746. X! do_lex :  lex_act    #    - " -
  1747. X  
  1748. X  #
  1749. X  #    If you don't have uudecode program, use the upper line.
  1750. X--- 424,441 ----
  1751. X  
  1752. X  #
  1753. X  #    If you have yacc and lex programs and make any changes, uncomment
  1754. X! #    the lowermost two lines and comment out the others.  If you make
  1755. X! #    changes to the .y and .l files but prefer processing the files
  1756. X  #    separately elsewhere, activate the middle two lines, so your changes
  1757. X  #    don't get overwritten.
  1758. X  #
  1759. X  
  1760. X! do_yacc : yacc_cpy    # use pre-generated files
  1761. X! do_lex :  lex_cpy    #    - " -
  1762. X  #do_yacc : yacc_msg    # show message if changed
  1763. X  #do_lex :  lex_msg    #    - " -
  1764. X! #do_yacc : yacc_act    # re-process files
  1765. X! #do_lex :  lex_act    #    - " -
  1766. X  
  1767. X  #
  1768. X  #    If you don't have uudecode program, use the upper line.
  1769. X***************
  1770. X*** 782,788 ****
  1771. X  $(OBJ)\monstr.o : $(CB)
  1772. X      $(SRCCC)
  1773. X  
  1774. X! $(GAMEDIR)\data : $(DAT)\data.bas $(TEMP)\makedefs.exe
  1775. X      $(TEMP)\makedefs -d
  1776. X      $(CP) $(DAT)\data $(GAMEDIR)
  1777. X      $(RM) $(DAT)\data
  1778. X--- 784,790 ----
  1779. X  $(OBJ)\monstr.o : $(CB)
  1780. X      $(SRCCC)
  1781. X  
  1782. X! $(GAMEDIR)\data : $(DAT)\$(DATABASE) $(TEMP)\makedefs.exe
  1783. X      $(TEMP)\makedefs -d
  1784. X      $(CP) $(DAT)\data $(GAMEDIR)
  1785. X      $(RM) $(DAT)\data
  1786. X*** /tmp/da09678    Thu Feb 25 10:30:27 1993
  1787. X--- sys/share/lev_comp.h    Wed Feb 17 10:11:53 1993
  1788. X***************
  1789. X*** 35,76 ****
  1790. X  # define LADDER_ID 279
  1791. X  # define STAIR_ID 280
  1792. X  # define NON_DIGGABLE_ID 281
  1793. X! # define ROOM_ID 282
  1794. X! # define PORTAL_ID 283
  1795. X! # define TELEPRT_ID 284
  1796. X! # define BRANCH_ID 285
  1797. X! # define LEV 286
  1798. X! # define CHANCE_ID 287
  1799. X! # define CORRIDOR_ID 288
  1800. X! # define GOLD_ID 289
  1801. X! # define ENGRAVING_ID 290
  1802. X! # define FOUNTAIN_ID 291
  1803. X! # define POOL_ID 292
  1804. X! # define SINK_ID 293
  1805. X! # define NONE 294
  1806. X! # define RAND_CORRIDOR_ID 295
  1807. X! # define DOOR_STATE 296
  1808. X! # define LIGHT_STATE 297
  1809. X! # define CURSE_TYPE 298
  1810. X! # define ENGRAVING_TYPE 299
  1811. X! # define DIRECTION 300
  1812. X! # define RANDOM_TYPE 301
  1813. X! # define O_REGISTER 302
  1814. X! # define M_REGISTER 303
  1815. X! # define P_REGISTER 304
  1816. X! # define A_REGISTER 305
  1817. X! # define ALIGNMENT 306
  1818. X! # define LEFT_OR_RIGHT 307
  1819. X! # define CENTER 308
  1820. X! # define TOP_OR_BOT 309
  1821. X! # define ALTAR_TYPE 310
  1822. X! # define UP_OR_DOWN 311
  1823. X! # define SUBROOM_ID 312
  1824. X! # define NAME_ID 313
  1825. X! # define FLAGS_ID 314
  1826. X! # define FLAG_TYPE 315
  1827. X! # define MON_ATTITUDE 316
  1828. X! # define MON_ALERTNESS 317
  1829. X! # define MON_APPEARANCE 318
  1830. X! # define STRING 319
  1831. X! # define MAP_ID 320
  1832. X--- 35,77 ----
  1833. X  # define LADDER_ID 279
  1834. X  # define STAIR_ID 280
  1835. X  # define NON_DIGGABLE_ID 281
  1836. X! # define NON_PASSWALL_ID 282
  1837. X! # define ROOM_ID 283
  1838. X! # define PORTAL_ID 284
  1839. X! # define TELEPRT_ID 285
  1840. X! # define BRANCH_ID 286
  1841. X! # define LEV 287
  1842. X! # define CHANCE_ID 288
  1843. X! # define CORRIDOR_ID 289
  1844. X! # define GOLD_ID 290
  1845. X! # define ENGRAVING_ID 291
  1846. X! # define FOUNTAIN_ID 292
  1847. X! # define POOL_ID 293
  1848. X! # define SINK_ID 294
  1849. X! # define NONE 295
  1850. X! # define RAND_CORRIDOR_ID 296
  1851. X! # define DOOR_STATE 297
  1852. X! # define LIGHT_STATE 298
  1853. X! # define CURSE_TYPE 299
  1854. X! # define ENGRAVING_TYPE 300
  1855. X! # define DIRECTION 301
  1856. X! # define RANDOM_TYPE 302
  1857. X! # define O_REGISTER 303
  1858. X! # define M_REGISTER 304
  1859. X! # define P_REGISTER 305
  1860. X! # define A_REGISTER 306
  1861. X! # define ALIGNMENT 307
  1862. X! # define LEFT_OR_RIGHT 308
  1863. X! # define CENTER 309
  1864. X! # define TOP_OR_BOT 310
  1865. X! # define ALTAR_TYPE 311
  1866. X! # define UP_OR_DOWN 312
  1867. X! # define SUBROOM_ID 313
  1868. X! # define NAME_ID 314
  1869. X! # define FLAGS_ID 315
  1870. X! # define FLAG_TYPE 316
  1871. X! # define MON_ATTITUDE 317
  1872. X! # define MON_ALERTNESS 318
  1873. X! # define MON_APPEARANCE 319
  1874. X! # define STRING 320
  1875. X! # define MAP_ID 321
  1876. X*** /tmp/da09702    Thu Feb 25 10:30:37 1993
  1877. X--- sys/share/pcmain.c    Sun Feb 21 16:41:36 1993
  1878. X***************
  1879. X*** 1,8 ****
  1880. X! /*    SCCS Id: @(#)pcmain.c    3.1    92/12/04    */
  1881. X  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  1882. X  /* NetHack may be freely redistributed.  See license for details. */
  1883. X  
  1884. X! /* main.c - MSDOS, OS/2, ST, and Amiga NetHack */
  1885. X  
  1886. X  #include "hack.h"
  1887. X  
  1888. X--- 1,8 ----
  1889. X! /*    SCCS Id: @(#)pcmain.c    3.1    93/02/07    */
  1890. X  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  1891. X  /* NetHack may be freely redistributed.  See license for details. */
  1892. X  
  1893. X! /* main.c - MSDOS, OS/2, ST, Amiga, and NT NetHack */
  1894. X  
  1895. X  #include "hack.h"
  1896. X  
  1897. X***************
  1898. X*** 39,44 ****
  1899. X--- 39,47 ----
  1900. X  #ifdef AMIGA
  1901. X  extern int bigscreen;
  1902. X  #endif
  1903. X+ #ifdef AMII_GRAPHICS
  1904. X+ extern unsigned short amii_initmap[8];
  1905. X+ #endif
  1906. X  
  1907. X  static void FDECL(process_options,(int argc,char **argv));
  1908. X  
  1909. X***************
  1910. X*** 104,109 ****
  1911. X--- 107,115 ----
  1912. X      ami_argc=argc;
  1913. X      ami_argv=argv;
  1914. X  #endif
  1915. X+ #ifdef AMII_GRAPHICS
  1916. X+     memcpy(flags.amii_curmap,amii_initmap,sizeof(flags.amii_curmap));
  1917. X+ #endif
  1918. X      initoptions();
  1919. X  
  1920. X  #if defined(TOS) && defined(TEXTCOLOR)
  1921. X***************
  1922. X*** 160,174 ****
  1923. X      u.uhp = 1;    /* prevent RIP on early quits */
  1924. X      u.ux = 0;    /* prevent flush_screen() */
  1925. X  
  1926. X!     /*
  1927. X!      * Find the creation date of this game,
  1928. X!      * so as to avoid restoring outdated savefiles.
  1929. X       */
  1930. X-     /* gethdate(hname); */
  1931. X- 
  1932. X-     /*
  1933. X-      * We cannot do chdir earlier, otherwise gethdate will fail.
  1934. X-      */
  1935. X  #ifdef CHDIR
  1936. X      chdirx(hackdir,1);
  1937. X  #endif
  1938. X--- 166,175 ----
  1939. X      u.uhp = 1;    /* prevent RIP on early quits */
  1940. X      u.ux = 0;    /* prevent flush_screen() */
  1941. X  
  1942. X!     /* chdir shouldn't be called before this point to keep the
  1943. X!      * code parallel to other ports which call gethdate just
  1944. X!      * before here.
  1945. X       */
  1946. X  #ifdef CHDIR
  1947. X      chdirx(hackdir,1);
  1948. X  #endif
  1949. X***************
  1950. X*** 260,266 ****
  1951. X          (void) signal(SIGINT, (SIG_RET_TYPE) done1);
  1952. X  #endif
  1953. X  #ifdef NEWS
  1954. X!         if(flags.news) display_file(NEWS, FALSE);
  1955. X  #endif
  1956. X          pline("Restoring save file...");
  1957. X          mark_synch();    /* flush output */
  1958. X--- 261,270 ----
  1959. X          (void) signal(SIGINT, (SIG_RET_TYPE) done1);
  1960. X  #endif
  1961. X  #ifdef NEWS
  1962. X!         if(flags.news){
  1963. X!             display_file(NEWS, FALSE);
  1964. X!             flags.news = FALSE;
  1965. X!         }
  1966. X  #endif
  1967. X          pline("Restoring save file...");
  1968. X          mark_synch();    /* flush output */
  1969. X*** /tmp/da09710    Thu Feb 25 10:30:39 1993
  1970. X--- sys/share/pcsys.c    Thu Feb 25 09:01:38 1993
  1971. X***************
  1972. X*** 26,31 ****
  1973. X--- 26,35 ----
  1974. X  static boolean NDECL(comspec_exists);
  1975. X  #endif
  1976. X  
  1977. X+ #ifdef WIN32CON
  1978. X+ extern int ProgmanLaunched;    /* from nttty.c */
  1979. X+ #endif
  1980. X+ 
  1981. X  # ifdef MICRO
  1982. X  
  1983. X  void
  1984. X***************
  1985. X*** 58,64 ****
  1986. X--- 62,72 ----
  1987. X          suspend_nhwindows((char *)0);
  1988. X  #   endif /* TOS */
  1989. X          chdirx(orgdir, 0);
  1990. X+ #ifdef __GO32__
  1991. X+         if (system(comspec) < 0) {  /* wsu@eecs.umich.edu */
  1992. X+ #else
  1993. X          if (spawnl(P_WAIT, comspec, comspec, NULL) < 0) {
  1994. X+ #endif
  1995. X              raw_printf("Can't spawn \"%s\"!", comspec);
  1996. X              getreturn("to continue");
  1997. X          }
  1998. X***************
  1999. X*** 422,428 ****
  2000. X--- 430,438 ----
  2001. X  
  2002. X      flushout();
  2003. X  # ifndef TOS
  2004. X+ #  ifndef WIN32
  2005. X      enable_ctrlP();        /* in case this wasn't done */
  2006. X+ #  endif
  2007. X  # endif
  2008. X  # ifdef MFLOPPY
  2009. X      if (ramdisk) copybones(TOPERM);
  2010. X***************
  2011. X*** 438,443 ****
  2012. X--- 448,462 ----
  2013. X      if (colors_changed)
  2014. X          restore_colors();
  2015. X  #  endif
  2016. X+ # endif
  2017. X+ # ifdef WIN32CON
  2018. X+     /* Only if we started from Progman, not command prompt,
  2019. X+      * we need to get one last return, so the score board does
  2020. X+      * not vanish instantly after being created.
  2021. X+      * ProgmanLaunched is defined and set in nttty.c.
  2022. X+          */
  2023. X+      
  2024. X+     if (ProgmanLaunched) getreturn("to end");
  2025. X  # endif
  2026. X      exit(code);
  2027. X      return;
  2028. X*** /tmp/da09726    Thu Feb 25 10:30:43 1993
  2029. X--- sys/share/pcunix.c    Tue Feb  2 10:19:29 1993
  2030. X***************
  2031. X*** 110,115 ****
  2032. X--- 110,124 ----
  2033. X  # endif
  2034. X              *lp == '|' || *lp >= 127 || (*lp >= '[' && *lp <= ']'))
  2035. X                          *lp = '_';
  2036. X+ # ifdef WIN32
  2037. X+               /* "Open" was failing on NT, but only on FAT file system     */
  2038. X+               /* volumes, not on NTFS volumes.  NT does not auto-truncate  */
  2039. X+               /* the way MSDOS did in such cases, so we need to check      */
  2040. X+               /* the file name to see if it falls with-in the file systems */
  2041. X+               /* limitations, and if necessary truncate it ourselves       */
  2042. X+ 
  2043. X+                 nt_regularize(s);         /* In winnt.c */
  2044. X+ # endif
  2045. X  }
  2046. X  
  2047. X  #endif /* OVLB */
  2048. X
  2049. END_OF_FILE
  2050. if test 52863 -ne `wc -c <'patches01r'`; then
  2051.     echo shar: \"'patches01r'\" unpacked with wrong size!
  2052. fi
  2053. # end of 'patches01r'
  2054. echo shar: End of archive 15 \(of 31\).
  2055. cp /dev/null ark15isdone
  2056. MISSING=""
  2057. 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 ; do
  2058.     if test ! -f ark${I}isdone ; then
  2059.     MISSING="${MISSING} ${I}"
  2060.     fi
  2061. done
  2062. if test "${MISSING}" = "" ; then
  2063.     echo You have unpacked all 31 archives.
  2064.     echo "Now execute 'patchit.sh'"
  2065.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  2066. else
  2067.     echo You still need to unpack the following archives:
  2068.     echo "        " ${MISSING}
  2069. fi
  2070. ##  End of shell archive.
  2071. exit 0
  2072.