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

  1. Subject:  v17i054:  nethack31 - display oriented dungeons & dragons (Ver. 3.1), Patch1m/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 54
  7. Archive-name: nethack31/Patch1m
  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 13 (of 31)."
  20. # Contents:  patches01o sys/winnt/setup.bat
  21. # Wrapped by billr@saab on Fri Mar  5 10:50:44 1993
  22. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  23. if test -f 'patches01o' -a "${1}" != "-c" ; then 
  24.   echo shar: Renaming existing file \"'patches01o'\" to \"'patches01o.orig'\"
  25.   mv -f 'patches01o' 'patches01o.orig'
  26. fi
  27. echo shar: Extracting \"'patches01o'\" \(53271 characters\)
  28. sed "s/^X//" >'patches01o' <<'END_OF_FILE'
  29. X*** /tmp/da10318    Thu Feb 25 10:33:13 1993
  30. X--- win/X11/winmesg.c    Wed Feb 24 16:11:45 1993
  31. X***************
  32. X*** 1,4 ****
  33. X! /*    SCCS Id: @(#)winmesg.c    3.1    92/05/19          */
  34. X  /* Copyright (c) Dean Luick, 1992                  */
  35. X  /* NetHack may be freely redistributed.  See license for details. */
  36. X  
  37. X--- 1,4 ----
  38. X! /*    SCCS Id: @(#)winmesg.c    3.1    93/02/02          */
  39. X  /* Copyright (c) Dean Luick, 1992                  */
  40. X  /* NetHack may be freely redistributed.  See license for details. */
  41. X  
  42. X***************
  43. X*** 6,55 ****
  44. X   * Message window routines.
  45. X   *
  46. X   * Global functions:
  47. X-  *    set_message_height()
  48. X   *    create_message_window()
  49. X   *    destroy_message_window()
  50. X   *    display_message_window()
  51. X   *    append_message()
  52. X   */
  53. X  #include <X11/Intrinsic.h>
  54. X  #include <X11/StringDefs.h>
  55. X  #include <X11/Shell.h>
  56. X  #include <X11/Xaw/Cardinals.h>
  57. X  #include <X11/Xaw/Viewport.h>
  58. X  #include "Window.h"    /* Window widget declarations */
  59. X  
  60. X  #include "hack.h"
  61. X  #include "winX.h"
  62. X  
  63. X! static const char message_translations[] =
  64. X!     "#override\n\
  65. X!     <Key>: no-op()";
  66. X  
  67. X- static struct line_element *get_previous();
  68. X- static void set_circle_buf();
  69. X- static char *split();
  70. X- static void add_line();
  71. X- static void redraw_message_window();
  72. X- static void mesg_check_size_change();
  73. X- static void mesg_exposed();
  74. X- static void get_gc();
  75. X- static void mesg_resized();
  76. X- 
  77. X- /* Adjust the number of rows on the given message window. */
  78. X- void
  79. X- set_message_height(wp, rows)
  80. X-     struct xwindow *wp;
  81. X-     Dimension rows;
  82. X- {
  83. X-     Arg args[1];
  84. X- 
  85. X-     wp->pixel_height = wp->mesg_information->char_height * rows;
  86. X- 
  87. X-     XtSetArg(args[0], XtNheight, wp->pixel_height);
  88. X-     XtSetValues(wp->w, args, ONE);
  89. X- }
  90. X- 
  91. X  /* Move the message window's vertical scrollbar's slider to the bottom. */
  92. X  void
  93. X  set_message_slider(wp)
  94. X--- 6,50 ----
  95. X   * Message window routines.
  96. X   *
  97. X   * Global functions:
  98. X   *    create_message_window()
  99. X   *    destroy_message_window()
  100. X   *    display_message_window()
  101. X   *    append_message()
  102. X   */
  103. X+ 
  104. X+ #ifndef SYSV
  105. X+ #define PRESERVE_NO_SYSV    /* X11 include files may define SYSV */
  106. X+ #endif
  107. X+ 
  108. X  #include <X11/Intrinsic.h>
  109. X  #include <X11/StringDefs.h>
  110. X  #include <X11/Shell.h>
  111. X  #include <X11/Xaw/Cardinals.h>
  112. X  #include <X11/Xaw/Viewport.h>
  113. X+ #include <X11/Xatom.h>
  114. X+ 
  115. X+ #ifdef PRESERVE_NO_SYSV
  116. X+ # ifdef SYSV
  117. X+ #  undef SYSV
  118. X+ # endif
  119. X+ # undef PRESERVE_NO_SYSV
  120. X+ #endif
  121. X+ 
  122. X  #include "Window.h"    /* Window widget declarations */
  123. X  
  124. X  #include "hack.h"
  125. X  #include "winX.h"
  126. X  
  127. X! static struct line_element *FDECL(get_previous, (struct line_element *));
  128. X! static void FDECL(set_circle_buf, (struct mesg_info_t *,int));
  129. X! static char *FDECL(split, (char *,XFontStruct *,DIMENSION_P));
  130. X! static void FDECL(add_line, (struct mesg_info_t *,const char *));
  131. X! static void FDECL(redraw_message_window, (struct xwindow *));
  132. X! static void FDECL(mesg_check_size_change, (struct xwindow *));
  133. X! static void FDECL(mesg_exposed, (Widget,XtPointer,XtPointer));
  134. X! static void FDECL(get_gc, (Widget,struct mesg_info_t *));
  135. X! static void FDECL(mesg_resized, (Widget,XtPointer,XtPointer));
  136. X  
  137. X  /* Move the message window's vertical scrollbar's slider to the bottom. */
  138. X  void
  139. X  set_message_slider(wp)
  140. X***************
  141. X*** 115,120 ****
  142. X--- 110,119 ----
  143. X      wp->popup = parent = XtCreatePopupShell("message_popup",
  144. X                      topLevelShellWidgetClass,
  145. X                      toplevel, args, num_args);
  146. X+     /*
  147. X+      * If we're here, then this is an auxiliary message window.  If we're
  148. X+      * cancelled via a delete window message, we should just pop down.
  149. X+      */
  150. X      }
  151. X  
  152. X      /*
  153. X***************
  154. X*** 125,135 ****
  155. X      num_args = 0;
  156. X      XtSetArg(args[num_args], XtNallowVert,  True);      num_args++;
  157. X      viewport = XtCreateManagedWidget(
  158. X!                         "mesg_viewport",         /* name */
  159. X!                         viewportWidgetClass,    /* widget class from Window.h */
  160. X!                         parent,                 /* parent widget */
  161. X!                         args,                   /* set some values */
  162. X!                         num_args);              /* number of values to set */
  163. X  
  164. X      /*
  165. X       * Create a message window.  We will change the width and height once
  166. X--- 124,134 ----
  167. X      num_args = 0;
  168. X      XtSetArg(args[num_args], XtNallowVert,  True);      num_args++;
  169. X      viewport = XtCreateManagedWidget(
  170. X!             "mesg_viewport",    /* name */
  171. X!             viewportWidgetClass,    /* widget class from Window.h */
  172. X!             parent,            /* parent widget */
  173. X!             args,            /* set some values */
  174. X!             num_args);        /* number of values to set */
  175. X  
  176. X      /*
  177. X       * Create a message window.  We will change the width and height once
  178. X***************
  179. X*** 136,143 ****
  180. X       * we know what font we are using.
  181. X       */
  182. X      num_args = 0;
  183. X-     XtSetArg(args[num_args], XtNtranslations,
  184. X-     XtParseTranslationTable(message_translations));    num_args++;
  185. X      wp->w = XtCreateManagedWidget(
  186. X          "message",        /* name */
  187. X          windowWidgetClass,    /* widget class from Window.h */
  188. X--- 135,140 ----
  189. X***************
  190. X*** 166,172 ****
  191. X  
  192. X      get_gc(wp->w, mesg_info);
  193. X  
  194. X!     wp->pixel_height = DEFAULT_LINES_DISPLAYED * mesg_info->char_height;
  195. X  
  196. X      /* If a variable spaced font, only use 2/3 of the default size */
  197. X      if (mesg_info->fs->min_bounds.width != mesg_info->fs->max_bounds.width) {
  198. X--- 163,169 ----
  199. X  
  200. X      get_gc(wp->w, mesg_info);
  201. X  
  202. X!     wp->pixel_height = ((int)flags.msg_history) * mesg_info->char_height;
  203. X  
  204. X      /* If a variable spaced font, only use 2/3 of the default size */
  205. X      if (mesg_info->fs->min_bounds.width != mesg_info->fs->max_bounds.width) {
  206. X***************
  207. X*** 182,198 ****
  208. X      XtSetArg(args[num_args], XtNheight,       wp->pixel_height); num_args++;
  209. X      XtSetValues(wp->w, args, num_args);
  210. X  
  211. X!     XtAddEventHandler(wp->w, KeyPressMask, False,
  212. X!               (XtEventHandler) msgkey, (XtPointer) 0);
  213. X      XtAddCallback(wp->w, XtNresizeCallback, mesg_resized, (XtPointer) 0);
  214. X  
  215. X      /*
  216. X       * If we have created our own popup, then realize it so that the
  217. X!      * viewport is also realized.  Then resize the mesg window.
  218. X       */
  219. X      if (create_popup) {
  220. X      XtRealizeWidget(wp->popup);
  221. X!     set_message_height(wp, (int) flags.msg_history);
  222. X      }
  223. X  }
  224. X  
  225. X--- 179,201 ----
  226. X      XtSetArg(args[num_args], XtNheight,       wp->pixel_height); num_args++;
  227. X      XtSetValues(wp->w, args, num_args);
  228. X  
  229. X!     /* make sure viewport height makes sense before realizing it */
  230. X!     num_args = 0;
  231. X!     mesg_info->viewport_height =
  232. X!     DEFAULT_LINES_DISPLAYED * mesg_info->char_height;
  233. X!     XtSetArg(args[num_args], XtNheight, mesg_info->viewport_height);num_args++;
  234. X!     XtSetValues(viewport, args, num_args);
  235. X! 
  236. X      XtAddCallback(wp->w, XtNresizeCallback, mesg_resized, (XtPointer) 0);
  237. X  
  238. X      /*
  239. X       * If we have created our own popup, then realize it so that the
  240. X!      * viewport is also realized.
  241. X       */
  242. X      if (create_popup) {
  243. X      XtRealizeWidget(wp->popup);
  244. X!     XSetWMProtocols(XtDisplay(wp->popup), XtWindow(wp->popup),
  245. X!             &wm_delete_window, 1);
  246. X      }
  247. X  }
  248. X  
  249. X***************
  250. X*** 450,457 ****
  251. X       *
  252. X       * This could be done more effecently with one call to XDrawText() instead
  253. X       * of many calls to XDrawString().  Maybe later.
  254. X       */
  255. X!     XClearWindow(XtDisplay(wp->w), XtWindow(wp->w));
  256. X  
  257. X      /* For now, just update the whole shootn' match. */
  258. X      for (row = 0, curr = mesg_info->head;
  259. X--- 453,462 ----
  260. X       *
  261. X       * This could be done more effecently with one call to XDrawText() instead
  262. X       * of many calls to XDrawString().  Maybe later.
  263. X+      *
  264. X+      * Only need to clear if window has new text.
  265. X       */
  266. X!     if (mesg_info->dirty) XClearWindow(XtDisplay(wp->w), XtWindow(wp->w));
  267. X  
  268. X      /* For now, just update the whole shootn' match. */
  269. X      for (row = 0, curr = mesg_info->head;
  270. X***************
  271. X*** 460,468 ****
  272. X      register int y_base = row * mesg_info->char_height;
  273. X  
  274. X      XDrawString(XtDisplay(wp->w), XtWindow(wp->w),
  275. X!                 mesg_info->gc,
  276. X          mesg_info->char_lbearing,
  277. X!                 mesg_info->char_ascent + y_base,
  278. X          curr->line,
  279. X          curr->str_length);
  280. X  
  281. X--- 465,473 ----
  282. X      register int y_base = row * mesg_info->char_height;
  283. X  
  284. X      XDrawString(XtDisplay(wp->w), XtWindow(wp->w),
  285. X!         mesg_info->gc,
  286. X          mesg_info->char_lbearing,
  287. X!         mesg_info->char_ascent + y_base,
  288. X          curr->line,
  289. X          curr->str_length);
  290. X  
  291. X***************
  292. X*** 472,478 ****
  293. X       */
  294. X      if (appResources.message_line && curr == mesg_info->last_pause) {
  295. X          XDrawLine(XtDisplay(wp->w), XtWindow(wp->w),
  296. X!                 mesg_info->gc,
  297. X          0, y_base, wp->pixel_width, y_base);
  298. X      }
  299. X      }
  300. X--- 477,483 ----
  301. X       */
  302. X      if (appResources.message_line && curr == mesg_info->last_pause) {
  303. X          XDrawLine(XtDisplay(wp->w), XtWindow(wp->w),
  304. X!         mesg_info->gc,
  305. X          0, y_base, wp->pixel_width, y_base);
  306. X      }
  307. X      }
  308. X***************
  309. X*** 514,529 ****
  310. X  /* Event handler for message window expose events. */
  311. X  /*ARGSUSED*/
  312. X  static void
  313. X! mesg_exposed(w, event)
  314. X      Widget w;
  315. X!     XExposeEvent *event;    /* unused */
  316. X  {
  317. X!     struct xwindow *wp;
  318. X  
  319. X!     if (!XtIsRealized(w)) return;
  320. X!     wp = find_widget(w);
  321. X!     mesg_check_size_change(wp);
  322. X!     redraw_message_window(wp);
  323. X  }
  324. X  
  325. X  
  326. X--- 519,549 ----
  327. X  /* Event handler for message window expose events. */
  328. X  /*ARGSUSED*/
  329. X  static void
  330. X! mesg_exposed(w, client_data, widget_data)
  331. X      Widget w;
  332. X!     XtPointer client_data;    /* unused */
  333. X!     XtPointer widget_data;    /* expose event from Window widget */
  334. X  {
  335. X!     XExposeEvent *event = (XExposeEvent *) widget_data;
  336. X  
  337. X!     if (XtIsRealized(w) && event->count == 0) {
  338. X!     struct xwindow *wp;
  339. X!     Display *dpy;
  340. X!     Window   win;
  341. X!     XEvent   evt;
  342. X! 
  343. X!     /*
  344. X!      * Drain all pending expose events for the message window;
  345. X!      * we'll redraw the whole thing at once.
  346. X!      */
  347. X!     dpy = XtDisplay(w);
  348. X!     win = XtWindow(w);
  349. X!     while (XCheckTypedWindowEvent(dpy, win, Expose, &evt)) continue;
  350. X! 
  351. X!     wp = find_widget(w);
  352. X!     mesg_check_size_change(wp);
  353. X!     redraw_message_window(wp);
  354. X!     }
  355. X  }
  356. X  
  357. X  
  358. X*** /tmp/da10326    Thu Feb 25 10:33:16 1993
  359. X--- win/X11/winmisc.c    Wed Feb 24 16:11:51 1993
  360. X***************
  361. X*** 1,4 ****
  362. X! /*    SCCS Id: @(#)winmisc.c    3.1    92/10/21    */
  363. X  /* Copyright (c) Dean Luick, 1992                  */
  364. X  /* NetHack may be freely redistributed.  See license for details. */
  365. X  
  366. X--- 1,4 ----
  367. X! /*    SCCS Id: @(#)winmisc.c    3.1    93/02/04    */
  368. X  /* Copyright (c) Dean Luick, 1992                  */
  369. X  /* NetHack may be freely redistributed.  See license for details. */
  370. X  
  371. X***************
  372. X*** 7,12 ****
  373. X--- 7,17 ----
  374. X   * 
  375. X   *     + Global functions: player_selection() and get_ext_cmd().
  376. X   */
  377. X+ 
  378. X+ #ifndef SYSV
  379. X+ #define PRESERVE_NO_SYSV    /* X11 include files may define SYSV */
  380. X+ #endif
  381. X+ 
  382. X  #include <X11/Intrinsic.h>
  383. X  #include <X11/StringDefs.h>
  384. X  #include <X11/Shell.h>
  385. X***************
  386. X*** 15,21 ****
  387. X--- 20,34 ----
  388. X  #include <X11/Xaw/Label.h>
  389. X  #include <X11/Xaw/Cardinals.h>
  390. X  #include <X11/Xos.h>    /* for index() */
  391. X+ #include <X11/Xatom.h>
  392. X  
  393. X+ #ifdef PRESERVE_NO_SYSV
  394. X+ # ifdef SYSV
  395. X+ #  undef SYSV
  396. X+ # endif
  397. X+ # undef PRESERVE_NO_SYSV
  398. X+ #endif
  399. X+ 
  400. X  #include "hack.h"
  401. X  #include "func_tab.h"
  402. X  #include "winX.h"
  403. X***************
  404. X*** 38,44 ****
  405. X       <Key>: ps_key()";
  406. X  
  407. X  
  408. X! static Widget make_menu();
  409. X  
  410. X  
  411. X  /* Player Selection -------------------------------------------------------- */
  412. X--- 51,60 ----
  413. X       <Key>: ps_key()";
  414. X  
  415. X  
  416. X! static Widget FDECL(make_menu, (const char *,const char *,String,
  417. X!                 const char *,XtCallbackProc,
  418. X!                 const char *,XtCallbackProc,
  419. X!                 int,char **,XtCallbackProc,Widget *));
  420. X  
  421. X  
  422. X  /* Player Selection -------------------------------------------------------- */
  423. X***************
  424. X*** 121,128 ****
  425. X          num_roles, roles, ps_select, &player_form);
  426. X  
  427. X      ps_selected = 0;
  428. X!     positionpopup(popup);
  429. X!     nh_XtPopup(popup, XtGrabExclusive, player_form);
  430. X  
  431. X      /* The callbacks will enable the event loop exit. */
  432. X      (void) x_event(EXIT_ON_EXIT);
  433. X--- 137,144 ----
  434. X          num_roles, roles, ps_select, &player_form);
  435. X  
  436. X      ps_selected = 0;
  437. X!     positionpopup(popup, FALSE);
  438. X!     nh_XtPopup(popup, (int)XtGrabExclusive, player_form);
  439. X  
  440. X      /* The callbacks will enable the event loop exit. */
  441. X      (void) x_event(EXIT_ON_EXIT);
  442. X***************
  443. X*** 167,174 ****
  444. X  {
  445. X      extended_command_selected = -1;        /* reset selected value */
  446. X  
  447. X!     positionpopup(extended_command_popup);    /* center on cursor */
  448. X!     nh_XtPopup(extended_command_popup, XtGrabExclusive, extended_command_form);
  449. X  
  450. X      /* The callbacks will enable the event loop exit. */
  451. X      (void) x_event(EXIT_ON_EXIT);
  452. X--- 183,191 ----
  453. X  {
  454. X      extended_command_selected = -1;        /* reset selected value */
  455. X  
  456. X!     positionpopup(extended_command_popup, FALSE); /* center on cursor */
  457. X!     nh_XtPopup(extended_command_popup, (int)XtGrabExclusive,
  458. X!                     extended_command_form);
  459. X  
  460. X      /* The callbacks will enable the event loop exit. */
  461. X      (void) x_event(EXIT_ON_EXIT);
  462. X***************
  463. X*** 216,221 ****
  464. X--- 233,251 ----
  465. X  
  466. X  /* ARGSUSED */
  467. X  void
  468. X+ ec_delete(w, event, params, num_params)
  469. X+     Widget w;
  470. X+     XEvent *event;
  471. X+     String *params;
  472. X+     Cardinal *num_params;
  473. X+ {
  474. X+     extended_command_selected = -1;    /* dismiss */
  475. X+     nh_XtPopdown(extended_command_popup);
  476. X+     exit_x_event = TRUE;        /* leave event loop */
  477. X+ }
  478. X+ 
  479. X+ /* ARGSUSED */
  480. X+ void
  481. X  ec_key(w, event, params, num_params)
  482. X      Widget w;
  483. X      XEvent *event;
  484. X***************
  485. X*** 327,338 ****
  486. X          left_name, left_callback,
  487. X          right_name, right_callback,
  488. X          num_names, widget_names, name_callback, formp)
  489. X!     char       *popup_name;
  490. X!     char       *popup_label;
  491. X      String       popup_translations;
  492. X!     char       *left_name;
  493. X      XtCallbackProc left_callback;
  494. X!     char       *right_name;
  495. X      XtCallbackProc right_callback;
  496. X      int           num_names;
  497. X      char       **widget_names;
  498. X--- 357,368 ----
  499. X          left_name, left_callback,
  500. X          right_name, right_callback,
  501. X          num_names, widget_names, name_callback, formp)
  502. X!     const char       *popup_name;
  503. X!     const char       *popup_label;
  504. X      String       popup_translations;
  505. X!     const char       *left_name;
  506. X      XtCallbackProc left_callback;
  507. X!     const char       *right_name;
  508. X      XtCallbackProc right_callback;
  509. X      int           num_names;
  510. X      char       **widget_names;
  511. X***************
  512. X*** 357,362 ****
  513. X--- 387,394 ----
  514. X      popup = XtCreatePopupShell(popup_name,
  515. X                  transientShellWidgetClass,
  516. X                  toplevel, args, num_args);
  517. X+     XtOverrideTranslations(popup,
  518. X+     XtParseTranslationTable("<Message>WM_PROTOCOLS: ec_delete()"));
  519. X  
  520. X      num_args = 0;
  521. X      XtSetArg(args[num_args], XtNtranslations,
  522. X***************
  523. X*** 414,419 ****
  524. X--- 446,453 ----
  525. X              args, num_args);
  526. X      XtAddCallback(right, XtNcallback, right_callback, (XtPointer) 0);
  527. X  
  528. X+     XtInstallAccelerators(form, left);
  529. X+     XtInstallAccelerators(form, right);
  530. X  
  531. X      /*
  532. X       * Create and place the command widgets.
  533. X***************
  534. X*** 470,475 ****
  535. X--- 504,510 ----
  536. X      free((char *) commands);
  537. X  
  538. X      XtRealizeWidget(popup);
  539. X+     XSetWMProtocols(XtDisplay(popup), XtWindow(popup), &wm_delete_window, 1);
  540. X  
  541. X      return popup;
  542. X  }
  543. X*** /tmp/da10334    Thu Feb 25 10:33:18 1993
  544. X--- win/X11/winstat.c    Wed Feb 24 16:11:57 1993
  545. X***************
  546. X*** 1,4 ****
  547. X! /*    SCCS Id: @(#)winstat.c    3.1    92/3/7
  548. X  /* Copyright (c) Dean Luick, 1992                  */
  549. X  /* NetHack may be freely redistributed.  See license for details. */
  550. X  
  551. X--- 1,4 ----
  552. X! /*    SCCS Id: @(#)winstat.c    3.1    93/02/04    */
  553. X  /* Copyright (c) Dean Luick, 1992                  */
  554. X  /* NetHack may be freely redistributed.  See license for details. */
  555. X  
  556. X***************
  557. X*** 9,14 ****
  558. X--- 9,19 ----
  559. X   * made.  This code assumes that only one fancy status will ever be made.
  560. X   * Currently, only one status window (of any type) is _ever_ made.
  561. X   */
  562. X+ 
  563. X+ #ifndef SYSV
  564. X+ #define PRESERVE_NO_SYSV    /* X11 include files may define SYSV */
  565. X+ #endif
  566. X+ 
  567. X  #include <X11/Intrinsic.h>
  568. X  #include <X11/StringDefs.h>
  569. X  #include <X11/Shell.h>
  570. X***************
  571. X*** 16,22 ****
  572. X--- 21,35 ----
  573. X  #include <X11/Xaw/Cardinals.h>
  574. X  #include <X11/Xaw/Form.h>
  575. X  #include <X11/Xaw/Label.h>
  576. X+ #include <X11/Xatom.h>
  577. X  
  578. X+ #ifdef PRESERVE_NO_SYSV
  579. X+ # ifdef SYSV
  580. X+ #  undef SYSV
  581. X+ # endif
  582. X+ # undef PRESERVE_NO_SYSV
  583. X+ #endif
  584. X+ 
  585. X  #include "hack.h"
  586. X  #include "winX.h"
  587. X  
  588. X***************
  589. X*** 23,30 ****
  590. X  extern const char *hu_stat[]; /* from eat.c */
  591. X  extern const char *enc_stat[]; /* from botl.c */
  592. X  
  593. X! static void update_fancy_status();
  594. X! static Widget create_fancy_status();
  595. X  
  596. X  void
  597. X  create_status_window(wp, create_popup, parent)
  598. X--- 36,43 ----
  599. X  extern const char *hu_stat[]; /* from eat.c */
  600. X  extern const char *enc_stat[]; /* from botl.c */
  601. X  
  602. X! static void FDECL(update_fancy_status, (struct xwindow *));
  603. X! static Widget FDECL(create_fancy_status, (Widget,Widget));
  604. X  
  605. X  void
  606. X  create_status_window(wp, create_popup, parent)
  607. X***************
  608. X*** 63,68 ****
  609. X--- 76,85 ----
  610. X      wp->popup = parent = XtCreatePopupShell("status_popup",
  611. X                      topLevelShellWidgetClass,
  612. X                      toplevel, args, num_args);
  613. X+     /*
  614. X+      * If we're here, then this is an auxiliary status window.  If we're
  615. X+      * cancelled via a delete window message, we should just pop down.
  616. X+      */
  617. X  
  618. X      num_args = 0;
  619. X      XtSetArg(args[num_args], XtNdisplayCaret, False); num_args++;
  620. X***************
  621. X*** 202,217 ****
  622. X  #define F_EXP      15
  623. X  #define F_ALIGN       16
  624. X  #define F_TIME     17
  625. X  
  626. X! #define F_HUNGER   18
  627. X! #define F_CONFUSED 19
  628. X! #define F_SICK       20
  629. X! #define F_BLIND       21
  630. X! #define F_STUNNED  22
  631. X! #define F_HALLU    23
  632. X! #define F_ENCUMBER 24
  633. X  
  634. X! #define NUM_STATS  25
  635. X  
  636. X  /*
  637. X   * Notes:
  638. X--- 219,235 ----
  639. X  #define F_EXP      15
  640. X  #define F_ALIGN       16
  641. X  #define F_TIME     17
  642. X+ #define F_SCORE       18
  643. X  
  644. X! #define F_HUNGER   19
  645. X! #define F_CONFUSED 20
  646. X! #define F_SICK       21
  647. X! #define F_BLIND       22
  648. X! #define F_STUNNED  23
  649. X! #define F_HALLU    24
  650. X! #define F_ENCUMBER 25
  651. X  
  652. X! #define NUM_STATS  26
  653. X  
  654. X  /*
  655. X   * Notes:
  656. X***************
  657. X*** 220,226 ****
  658. X   */
  659. X  static struct X_status_value shown_stats[NUM_STATS] = {
  660. X      { "Strength",    SV_VALUE, (Widget) 0, -1, 0, FALSE, FALSE },    /* 0*/
  661. X!     { "Dexerity",    SV_VALUE, (Widget) 0, -1, 0, FALSE, FALSE },
  662. X      { "Constitution",    SV_VALUE, (Widget) 0, -1, 0, FALSE, FALSE },
  663. X      { "Intelligence",    SV_VALUE, (Widget) 0, -1, 0, FALSE, FALSE },
  664. X      { "Wisdom",        SV_VALUE, (Widget) 0, -1, 0, FALSE, FALSE },
  665. X--- 238,244 ----
  666. X   */
  667. X  static struct X_status_value shown_stats[NUM_STATS] = {
  668. X      { "Strength",    SV_VALUE, (Widget) 0, -1, 0, FALSE, FALSE },    /* 0*/
  669. X!     { "Dexterity",    SV_VALUE, (Widget) 0, -1, 0, FALSE, FALSE },
  670. X      { "Constitution",    SV_VALUE, (Widget) 0, -1, 0, FALSE, FALSE },
  671. X      { "Intelligence",    SV_VALUE, (Widget) 0, -1, 0, FALSE, FALSE },
  672. X      { "Wisdom",        SV_VALUE, (Widget) 0, -1, 0, FALSE, FALSE },
  673. X***************
  674. X*** 238,252 ****
  675. X      { "Experience",    SV_VALUE, (Widget) 0, -1, 0, FALSE, FALSE },    /*15*/
  676. X      { "Alignment",    SV_VALUE, (Widget) 0, -2, 0, FALSE, FALSE },
  677. X      { "Time",        SV_VALUE, (Widget) 0, -2, 0, FALSE, FALSE },
  678. X  
  679. X      { "",        SV_NAME,  (Widget) 0,  0, 0, FALSE, TRUE }, /* hunger*/
  680. X!     { "Confused",    SV_NAME,  (Widget) 0,  1, 0, FALSE, TRUE },
  681. X!     { "Sick",        SV_NAME,  (Widget) 0,  0, 0, FALSE, TRUE },    /*20*/
  682. X      { "Blind",        SV_NAME,  (Widget) 0,  0, 0, FALSE, TRUE },
  683. X      { "Stunned",    SV_NAME,  (Widget) 0,  0, 0, FALSE, TRUE },
  684. X      { "Hallucinating",    SV_NAME,  (Widget) 0,  0, 0, FALSE, TRUE },
  685. X      { "",        SV_NAME,  (Widget) 0,  0, 0, FALSE, TRUE }, /*encumbr*/
  686. X- 
  687. X  };
  688. X  
  689. X  
  690. X--- 256,270 ----
  691. X      { "Experience",    SV_VALUE, (Widget) 0, -1, 0, FALSE, FALSE },    /*15*/
  692. X      { "Alignment",    SV_VALUE, (Widget) 0, -2, 0, FALSE, FALSE },
  693. X      { "Time",        SV_VALUE, (Widget) 0, -2, 0, FALSE, FALSE },
  694. X+     { "Score",        SV_VALUE, (Widget) 0, -2, 0, FALSE, FALSE },
  695. X  
  696. X      { "",        SV_NAME,  (Widget) 0,  0, 0, FALSE, TRUE }, /* hunger*/
  697. X!     { "Confused",    SV_NAME,  (Widget) 0,  1, 0, FALSE, TRUE },    /*20*/
  698. X!     { "Sick",        SV_NAME,  (Widget) 0,  0, 0, FALSE, TRUE },
  699. X      { "Blind",        SV_NAME,  (Widget) 0,  0, 0, FALSE, TRUE },
  700. X      { "Stunned",    SV_NAME,  (Widget) 0,  0, 0, FALSE, TRUE },
  701. X      { "Hallucinating",    SV_NAME,  (Widget) 0,  0, 0, FALSE, TRUE },
  702. X      { "",        SV_NAME,  (Widget) 0,  0, 0, FALSE, TRUE }, /*encumbr*/
  703. X  };
  704. X  
  705. X  
  706. X***************
  707. X*** 387,392 ****
  708. X--- 405,461 ----
  709. X          }
  710. X          if(!flagtime) return;
  711. X      }
  712. X+ 
  713. X+     /* special case: exp can be enabled & disabled */
  714. X+     else if (attr_rec == &shown_stats[F_EXP]) {
  715. X+         static boolean flagexp = TRUE;
  716. X+ #ifdef EXP_ON_BOTL
  717. X+ 
  718. X+         if (flags.showexp && !flagexp) {
  719. X+         set_name(attr_rec->w, shown_stats[F_EXP].name);
  720. X+         force_update = TRUE;
  721. X+         flagexp = flags.showexp;
  722. X+         } else if(!flags.showexp && flagexp) {
  723. X+         set_name(attr_rec->w, "");
  724. X+         set_value(attr_rec->w, "");
  725. X+         flagexp = flags.showexp;
  726. X+         }
  727. X+         if (!flagexp) return;
  728. X+ #else
  729. X+         if (flagexp) {
  730. X+         set_name(attr_rec->w, "");
  731. X+         set_value(attr_rec->w, "");
  732. X+         flagexp = FALSE;
  733. X+         }
  734. X+         return;    /* don't show it at all */
  735. X+ #endif
  736. X+     }
  737. X+ 
  738. X+     /* special case: score can be enabled & disabled */
  739. X+     else if (attr_rec == &shown_stats[F_SCORE]) {
  740. X+         static boolean flagscore = TRUE;
  741. X+ #ifdef SCORE_ON_BOTL
  742. X+ 
  743. X+         if(flags.showscore && !flagscore) {
  744. X+         set_name(attr_rec->w, shown_stats[F_SCORE].name);
  745. X+         force_update = TRUE;
  746. X+         flagscore = flags.showscore;
  747. X+         } else if(!flags.showscore && flagscore) {
  748. X+         set_name(attr_rec->w, "");
  749. X+         set_value(attr_rec->w, "");
  750. X+         flagscore = flags.showscore;
  751. X+         }
  752. X+         if(!flagscore) return;
  753. X+ #else
  754. X+         if (flagscore) {
  755. X+         set_name(attr_rec->w, "");
  756. X+         set_value(attr_rec->w, "");
  757. X+         flagscore = FALSE;
  758. X+         }
  759. X+         return;
  760. X+ #endif
  761. X+     }
  762. X+ 
  763. X  #ifdef POLYSELF
  764. X      /* special case: when polymorphed, show "HD", disable exp */
  765. X      else if (attr_rec == &shown_stats[F_LEVEL]) {
  766. X***************
  767. X*** 475,482 ****
  768. X   * Information on the first line:
  769. X   *    name, attributes, alignment, score
  770. X   *
  771. X-  * Not done: score
  772. X-  *
  773. X   * Information on the second line:
  774. X   *     dlvl, gold, hp, power, ac, {level & exp or HD **}
  775. X   *     status (hunger, conf, halu, stun, sick, blind), time, encumbrance
  776. X--- 544,549 ----
  777. X***************
  778. X*** 542,550 ****
  779. X  #else
  780. X          case F_LEVEL:    val = (long) u.ulevel;    break;
  781. X  #endif
  782. X!         case F_EXP:        val = (long) u.uexp;    break;
  783. X          case F_ALIGN:    val = (long) u.ualign.type; break;
  784. X          case F_TIME:    val = flags.time ? (long) moves : 0L;    break;
  785. X          default:
  786. X          {
  787. X          /*
  788. X--- 609,626 ----
  789. X  #else
  790. X          case F_LEVEL:    val = (long) u.ulevel;    break;
  791. X  #endif
  792. X! #ifdef EXP_ON_BOTL
  793. X!         case F_EXP:        val = flags.showexp ? u.uexp : 0L; break;
  794. X! #else
  795. X!         case F_EXP:        val = 0L; break;
  796. X! #endif
  797. X          case F_ALIGN:    val = (long) u.ualign.type; break;
  798. X          case F_TIME:    val = flags.time ? (long) moves : 0L;    break;
  799. X+ #ifdef SCORE_ON_BOTL
  800. X+         case F_SCORE:    val = flags.showscore ? botl_score():0L; break;
  801. X+ #else
  802. X+         case F_SCORE:    val = 0L; break;
  803. X+ #endif
  804. X          default:
  805. X          {
  806. X          /*
  807. X***************
  808. X*** 625,630 ****
  809. X--- 701,707 ----
  810. X      case F_EXP:    return "4294967295";    /* max ulong */
  811. X      case F_ALIGN:    return "Neutral";
  812. X      case F_TIME:    return "4294967295";    /* max ulong */
  813. X+     case F_SCORE:    return "4294967295";    /* max ulong */
  814. X      }
  815. X      impossible("width_string: unknown index %d\n", sv_index);
  816. X      return "";
  817. X***************
  818. X*** 781,788 ****
  819. X  static int status_indices[] = { F_HUNGER, F_CONFUSED, F_SICK, F_BLIND,
  820. X                  F_STUNNED, F_HALLU, F_ENCUMBER, -1,0,0 };
  821. X  
  822. X! static int col2_indices[] = { F_MAXHP,F_ALIGN,F_TIME,F_EXP,F_MAXPOWER,-1,0,0 };
  823. X! static int col1_indices[] = { F_HP, F_AC, F_GOLD, F_LEVEL, F_POWER,   -1,0,0 };
  824. X  
  825. X  
  826. X  /*
  827. X--- 858,867 ----
  828. X  static int status_indices[] = { F_HUNGER, F_CONFUSED, F_SICK, F_BLIND,
  829. X                  F_STUNNED, F_HALLU, F_ENCUMBER, -1,0,0 };
  830. X  
  831. X! static int col2_indices[] = { F_MAXHP,    F_ALIGN, F_TIME, F_EXP,
  832. X!                   F_MAXPOWER, -1,0,0 };
  833. X! static int col1_indices[] = { F_HP,       F_AC,    F_GOLD, F_LEVEL,
  834. X!                   F_POWER,    F_SCORE, -1,0,0 };
  835. X  
  836. X  
  837. X  /*
  838. X*** /tmp/da10358    Thu Feb 25 10:33:24 1993
  839. X--- win/tty/getline.c    Mon Feb  8 14:04:32 1993
  840. X***************
  841. X*** 48,53 ****
  842. X--- 48,58 ----
  843. X              obufp[1] = 0;
  844. X              break;
  845. X          }
  846. X+         if (ttyDisplay->intr) {
  847. X+             ttyDisplay->intr--;
  848. X+             *bufp = 0;
  849. X+             putsyms(obufp);
  850. X+         }
  851. X          if(c == '\020') { /* ctrl-P */
  852. X              if(!doprev)
  853. X              (void) tty_doprev_message(); /* need two initially */
  854. X***************
  855. X*** 76,82 ****
  856. X              *bufp = 0;
  857. X              break;
  858. X          } else if(' ' <= c && c < '\177' && 
  859. X!                 (bufp-obufp < BUFSZ-1 || bufp-obufp < COLNO)) {
  860. X                  /* avoid isprint() - some people don't have it
  861. X                     ' ' is not always a printing char */
  862. X              *bufp = c;
  863. X--- 81,87 ----
  864. X              *bufp = 0;
  865. X              break;
  866. X          } else if(' ' <= c && c < '\177' && 
  867. X!                 (bufp-obufp < BUFSZ-1 && bufp-obufp < COLNO)) {
  868. X                  /* avoid isprint() - some people don't have it
  869. X                     ' ' is not always a printing char */
  870. X              *bufp = c;
  871. X***************
  872. X*** 94,99 ****
  873. X--- 99,105 ----
  874. X      }
  875. X      ttyDisplay->toplin = 2;        /* nonempty, no --More-- required */
  876. X      ttyDisplay->inread--;
  877. X+     clear_nhwindow(WIN_MESSAGE);    /* clean up after ourselves */
  878. X  }
  879. X  
  880. X  void
  881. X***************
  882. X*** 133,152 ****
  883. X      register int c;
  884. X      int com_index, oindex;
  885. X  
  886. X      pline("# ");
  887. X-     ttyDisplay->toplin = 2;        /* nonempty, no --More-- required */
  888. X  
  889. X      for(;;) {
  890. X          (void) fflush(stdout);
  891. X          if((c = readchar()) == EOF) {
  892. X              *bufp = 0;
  893. X!             return;
  894. X          }
  895. X          if(c == '\033') {
  896. X              *obufp = c;
  897. X              obufp[1] = 0;
  898. X!             return;
  899. X          }
  900. X          if(c == erase_char || c == '\b') {
  901. X              if(bufp != obufp) {
  902. X                  bufp--;
  903. X--- 139,164 ----
  904. X      register int c;
  905. X      int com_index, oindex;
  906. X  
  907. X+     ttyDisplay->toplin = 3; /* special prompt state */
  908. X+     ttyDisplay->inread++;
  909. X      pline("# ");
  910. X  
  911. X      for(;;) {
  912. X          (void) fflush(stdout);
  913. X          if((c = readchar()) == EOF) {
  914. X              *bufp = 0;
  915. X!             break;
  916. X          }
  917. X          if(c == '\033') {
  918. X              *obufp = c;
  919. X              obufp[1] = 0;
  920. X!             break;
  921. X          }
  922. X+         if (ttyDisplay->intr) {
  923. X+             ttyDisplay->intr--;
  924. X+             *bufp = 0;
  925. X+             putsyms(obufp);
  926. X+         }
  927. X          if(c == erase_char || c == '\b') {
  928. X              if(bufp != obufp) {
  929. X                  bufp--;
  930. X***************
  931. X*** 158,165 ****
  932. X          } else if(c == '\n') {
  933. X  #endif
  934. X              *bufp = 0;
  935. X!             return;
  936. X!         } else if(' ' <= c && c < '\177') {
  937. X                  /* avoid isprint() - some people don't have it
  938. X                     ' ' is not always a printing char */
  939. X              *bufp = c;
  940. X--- 170,178 ----
  941. X          } else if(c == '\n') {
  942. X  #endif
  943. X              *bufp = 0;
  944. X!             break;
  945. X!         } else if(' ' <= c && c < '\177' &&
  946. X!                 (bufp-obufp < BUFSZ-1 && bufp-obufp < COLNO)) {
  947. X                  /* avoid isprint() - some people don't have it
  948. X                     ' ' is not always a printing char */
  949. X              *bufp = c;
  950. X***************
  951. X*** 199,205 ****
  952. X          } else
  953. X              tty_nhbell();
  954. X      }
  955. X! 
  956. X  }
  957. X  #endif /* COM_COMPL */
  958. X  
  959. X--- 212,220 ----
  960. X          } else
  961. X              tty_nhbell();
  962. X      }
  963. X!     ttyDisplay->toplin = 2;        /* nonempty, no --More-- required */
  964. X!     ttyDisplay->inread--;
  965. X!     clear_nhwindow(WIN_MESSAGE);    /* clean up after ourselves */
  966. X  }
  967. X  #endif /* COM_COMPL */
  968. X  
  969. X*** /tmp/da10366    Thu Feb 25 10:33:26 1993
  970. X--- win/tty/termcap.c    Fri Feb 12 10:23:46 1993
  971. X***************
  972. X*** 308,314 ****
  973. X      free((genericptr_t)tptr);
  974. X  # ifdef TEXTCOLOR
  975. X  #  if defined(TOS) && defined(__GNUC__)
  976. X!     if (!strcmp(term, "builtin") || !strcmp(term, "tw52")) {
  977. X          init_hilite();
  978. X      }
  979. X  #  else
  980. X--- 308,315 ----
  981. X      free((genericptr_t)tptr);
  982. X  # ifdef TEXTCOLOR
  983. X  #  if defined(TOS) && defined(__GNUC__)
  984. X!     if (!strcmp(term, "builtin") || !strcmp(term, "tw52") ||
  985. X!         !strcmp(term, "st52")) {
  986. X          init_hilite();
  987. X      }
  988. X  #  else
  989. X***************
  990. X*** 811,828 ****
  991. X      register int c;
  992. X  #  ifdef TOS
  993. X      extern unsigned long tos_numcolors;    /* in tos.c */
  994. X!     static const char NOCOL[] = "\033b0", COLHE[] = "\033q\033b0";
  995. X  
  996. X-     HI = "\033p";
  997. X- #  else
  998. X-     int backg, foreg, hi_backg, hi_foreg;
  999. X- #  endif
  1000. X- 
  1001. X-     for (c = 0; c < SIZE(hilites); c++)
  1002. X-         hilites[c] = HI;
  1003. X-     hilites[GRAY] = hilites[NO_COLOR] = NULL;
  1004. X- 
  1005. X- #  ifdef TOS
  1006. X      if (tos_numcolors <= 2) {
  1007. X          return;
  1008. X      }
  1009. X--- 812,819 ----
  1010. X      register int c;
  1011. X  #  ifdef TOS
  1012. X      extern unsigned long tos_numcolors;    /* in tos.c */
  1013. X!     static char NOCOL[] = "\033b0", COLHE[] = "\033q\033b0";
  1014. X  
  1015. X      if (tos_numcolors <= 2) {
  1016. X          return;
  1017. X      }
  1018. X***************
  1019. X*** 833,843 ****
  1020. X   */
  1021. X      hilites[0] = NOCOL;
  1022. X      for (c = 1; c < SIZE(hilites); c++) {
  1023. X!         hilites[c] = (char *) alloc(sizeof("\033b0"));
  1024. X          if (tos_numcolors > 4)
  1025. X!             Sprintf(hilites[c], "\033b%c", (c&~BRIGHT)+'0');
  1026. X          else
  1027. X!             Strcpy(hilites[c], HI);
  1028. X      }
  1029. X  
  1030. X      if (tos_numcolors == 4) {
  1031. X--- 824,836 ----
  1032. X   */
  1033. X      hilites[0] = NOCOL;
  1034. X      for (c = 1; c < SIZE(hilites); c++) {
  1035. X!         char *foo;
  1036. X!         foo = (char *) alloc(sizeof("\033b0"));
  1037. X          if (tos_numcolors > 4)
  1038. X!             Sprintf(foo, "\033b%c", (c&~BRIGHT)+'0');
  1039. X          else
  1040. X!             Strcpy(foo, "\033b0");
  1041. X!         hilites[c] = foo;
  1042. X      }
  1043. X  
  1044. X      if (tos_numcolors == 4) {
  1045. X***************
  1046. X*** 858,863 ****
  1047. X--- 851,863 ----
  1048. X      }
  1049. X  
  1050. X  #  else /* TOS */
  1051. X+ 
  1052. X+     int backg, foreg, hi_backg, hi_foreg;
  1053. X+ 
  1054. X+      for (c = 0; c < SIZE(hilites); c++)
  1055. X+         hilites[c] = HI;
  1056. X+     hilites[GRAY] = hilites[NO_COLOR] = NULL;
  1057. X+ 
  1058. X      analyze_seq(HI, &hi_foreg, &hi_backg);
  1059. X      analyze_seq(HE, &foreg, &backg);
  1060. X  
  1061. X*** /tmp/da10374    Thu Feb 25 10:33:28 1993
  1062. X--- win/tty/topl.c    Mon Feb  8 14:40:10 1993
  1063. X***************
  1064. X*** 331,336 ****
  1065. X--- 331,337 ----
  1066. X      clean_up:
  1067. X      ttyDisplay->inread--;
  1068. X      ttyDisplay->toplin = 2;
  1069. X+     if (ttyDisplay->intr) ttyDisplay->intr--;
  1070. X      if(wins[WIN_MESSAGE]->cury)
  1071. X          tty_clear_nhwindow(WIN_MESSAGE);
  1072. X  
  1073. X*** /tmp/da10382    Thu Feb 25 10:33:30 1993
  1074. X--- win/tty/wintty.c    Mon Feb 22 12:24:36 1993
  1075. X***************
  1076. X*** 1,4 ****
  1077. X! /*    SCCS Id: @(#)wintty.c    3.1    92/10/21    */
  1078. X  /* Copyright (c) David Cohrs, 1991                  */
  1079. X  /* NetHack may be freely redistributed.  See license for details. */
  1080. X  
  1081. X--- 1,4 ----
  1082. X! /*    SCCS Id: @(#)wintty.c    3.1    93/02/21    */
  1083. X  /* Copyright (c) David Cohrs, 1991                  */
  1084. X  /* NetHack may be freely redistributed.  See license for details. */
  1085. X  
  1086. X***************
  1087. X*** 177,183 ****
  1088. X      ttyDisplay->rows = hgt;
  1089. X      ttyDisplay->cols = wid;
  1090. X      ttyDisplay->curx = ttyDisplay->cury = 0;
  1091. X!     ttyDisplay->inmore = ttyDisplay->inread = 0;
  1092. X  #ifdef TEXTCOLOR
  1093. X      ttyDisplay->color = NO_COLOR;
  1094. X  #endif
  1095. X--- 177,183 ----
  1096. X      ttyDisplay->rows = hgt;
  1097. X      ttyDisplay->cols = wid;
  1098. X      ttyDisplay->curx = ttyDisplay->cury = 0;
  1099. X!     ttyDisplay->inmore = ttyDisplay->inread = ttyDisplay->intr = 0;
  1100. X  #ifdef TEXTCOLOR
  1101. X      ttyDisplay->color = NO_COLOR;
  1102. X  #endif
  1103. X***************
  1104. X*** 323,346 ****
  1105. X      ct = 0;
  1106. X      while((c = tty_nhgetch()) != '\n') {
  1107. X          if(c == EOF) error("End of input\n");
  1108. X- #ifndef VMS
  1109. X          /* some people get confused when their erase char is not ^H */
  1110. X!         if(c == '\b') {
  1111. X              if(ct) {
  1112. X                  ct--;
  1113. X! # ifdef MICRO
  1114. X!                 msmsg("\b \b");
  1115. X  # else
  1116. X                  (void) putchar('\b');
  1117. X                  (void) putchar(' ');
  1118. X                  (void) putchar('\b');
  1119. X! # endif
  1120. X              }
  1121. X              continue;
  1122. X          }
  1123. X- #endif
  1124. X  #if defined(UNIX) || defined(VMS)
  1125. X!         if(c != '-')
  1126. X          if(c < 'A' || (c > 'Z' && c < 'a') || c > 'z') c = '_';
  1127. X  #endif
  1128. X          if(ct < sizeof(plname)-1) {
  1129. X--- 323,348 ----
  1130. X      ct = 0;
  1131. X      while((c = tty_nhgetch()) != '\n') {
  1132. X          if(c == EOF) error("End of input\n");
  1133. X          /* some people get confused when their erase char is not ^H */
  1134. X!         if (c == '\b' || c == '\177') {
  1135. X              if(ct) {
  1136. X                  ct--;
  1137. X! #ifdef MICRO
  1138. X! # if defined(WIN32CON)
  1139. X!                 nttty_rubout();  /* \b is visible on NT */
  1140. X  # else
  1141. X+                 msmsg("\b \b");
  1142. X+ # endif 
  1143. X+ #else
  1144. X                  (void) putchar('\b');
  1145. X                  (void) putchar(' ');
  1146. X                  (void) putchar('\b');
  1147. X! #endif
  1148. X              }
  1149. X              continue;
  1150. X          }
  1151. X  #if defined(UNIX) || defined(VMS)
  1152. X!         if(c != '-' && c != '@')
  1153. X          if(c < 'A' || (c > 'Z' && c < 'a') || c > 'z') c = '_';
  1154. X  #endif
  1155. X          if(ct < sizeof(plname)-1) {
  1156. X***************
  1157. X*** 1244,1253 ****
  1158. X--- 1246,1257 ----
  1159. X          addtopl("--More--");
  1160. X          (void) fflush(stdout);
  1161. X      } else if(ttyDisplay->inread) {
  1162. X+         /* this can only happen if we were reading and got interrupted */
  1163. X          ttyDisplay->toplin = 3;
  1164. X          /* do this twice; 1st time gets the Quit? message again */
  1165. X          (void) tty_doprev_message();
  1166. X          (void) tty_doprev_message();
  1167. X+         ttyDisplay->intr++;
  1168. X          (void) fflush(stdout);
  1169. X      }
  1170. X      }
  1171. X***************
  1172. X*** 1576,1581 ****
  1173. X--- 1580,1588 ----
  1174. X  void
  1175. X  win_tty_init()
  1176. X  {
  1177. X+ # if defined(WIN32CON)
  1178. X+     nttty_open();
  1179. X+ # endif
  1180. X      return;
  1181. X  }
  1182. X  
  1183. X*** /tmp/da09854    Thu Feb 25 10:31:15 1993
  1184. X--- sys/unix/Install.unx    Tue Feb  2 15:57:53 1993
  1185. X***************
  1186. X*** 3,9 ****
  1187. X                  =======================================
  1188. X  
  1189. X  0.  Read this entire file before starting, and come back to the Notes
  1190. X!     below if you have any problems.
  1191. X  
  1192. X  1.  Make sure all the NetHack files are in the appropriate directory
  1193. X      structure.  You should have a main directory with subdirectories dat,
  1194. X--- 3,13 ----
  1195. X                  =======================================
  1196. X  
  1197. X  0.  Read this entire file before starting, and come back to the Notes
  1198. X!     below if you have any problems.  If you are trying to use X11,
  1199. X!     also read all of win/X11/Install.X11.  For help in controlling
  1200. X!     and running the game after it is installed, see the '?' command
  1201. X!     within the game and doc/Guidebook (non-installers want to know
  1202. X!     about those things too).
  1203. X  
  1204. X  1.  Make sure all the NetHack files are in the appropriate directory
  1205. X      structure.  You should have a main directory with subdirectories dat,
  1206. X***************
  1207. X*** 56,63 ****
  1208. X      that if you don't want to run NetHack either setuid or setgid, and
  1209. X      people in more than one group will be playing it, you'll need to go back
  1210. X      and set FCMASK to 0666 in unixconf.h and let everybody fiddle with the
  1211. X!     files NetHack creates.)  Type 'make spec_levs' and 'make dungeon' from
  1212. X!     the top directory to set up files for some of the special levels.
  1213. X      Then become root if necessary and type 'make install'.  Everything
  1214. X      should now be set.
  1215. X  
  1216. X--- 60,67 ----
  1217. X      that if you don't want to run NetHack either setuid or setgid, and
  1218. X      people in more than one group will be playing it, you'll need to go back
  1219. X      and set FCMASK to 0666 in unixconf.h and let everybody fiddle with the
  1220. X!     files NetHack creates.)  Type 'make all' from the top directory to
  1221. X!     set up all the auxiliary files the main executable will use.
  1222. X      Then become root if necessary and type 'make install'.  Everything
  1223. X      should now be set.
  1224. X  
  1225. X*** /tmp/da09878    Thu Feb 25 10:31:20 1993
  1226. X--- sys/unix/Makefile.src    Sun Feb 21 16:57:53 1993
  1227. X***************
  1228. X*** 1,6 ****
  1229. X--- 1,18 ----
  1230. X  #    NetHack Makefile.
  1231. X  #    SCCS Id: @(#)Makefile.src    3.1    93/01/25
  1232. X  
  1233. X+ # newer makes predefine $(MAKE) to 'make' and do smarter processing of
  1234. X+ # recursive make calls if $(MAKE) is used
  1235. X+ # these makes allow $(MAKE) to be overridden by the environment if someone
  1236. X+ # wants to (or has to) use something other than the standard make, so we do
  1237. X+ # not want to unconditionally set $(MAKE) here
  1238. X+ #
  1239. X+ # unfortunately, some older makes do not predefine $(MAKE); if you have one of
  1240. X+ # these, uncomment the following line
  1241. X+ # (you will know that you have one if you get complaints about being unable
  1242. X+ # to find 'makedefs')
  1243. X+ # MAKE = make
  1244. X+ 
  1245. X  # This makefile replaces the previous Makefile.unix, Makefile.xenix,
  1246. X  # Makefile.3B2, Makefile.att, and Makefile.tos.
  1247. X  # Set SYSTEM to one of:
  1248. X***************
  1249. X*** 430,436 ****
  1250. X      $(CC) $(CFLAGS) -c ../sys/unix/ioctl.c
  1251. X  unixmain.o: ../sys/unix/unixmain.c  ../include/hack.h
  1252. X      $(CC) $(CFLAGS) -c ../sys/unix/unixmain.c
  1253. X! unixtty.o: ../sys/unix/unixtty.c  ../include/hack.h ../include/wintty.h
  1254. X      $(CC) $(CFLAGS) -c ../sys/unix/unixtty.c
  1255. X  unixunix.o: ../sys/unix/unixunix.c  ../include/hack.h
  1256. X      $(CC) $(CFLAGS) -c ../sys/unix/unixunix.c
  1257. X--- 442,448 ----
  1258. X      $(CC) $(CFLAGS) -c ../sys/unix/ioctl.c
  1259. X  unixmain.o: ../sys/unix/unixmain.c  ../include/hack.h
  1260. X      $(CC) $(CFLAGS) -c ../sys/unix/unixmain.c
  1261. X! unixtty.o: ../sys/unix/unixtty.c  ../include/hack.h
  1262. X      $(CC) $(CFLAGS) -c ../sys/unix/unixtty.c
  1263. X  unixunix.o: ../sys/unix/unixunix.c  ../include/hack.h
  1264. X      $(CC) $(CFLAGS) -c ../sys/unix/unixunix.c
  1265. X***************
  1266. X*** 442,448 ****
  1267. X      $(CC) $(CFLAGS) -c ../win/tty/topl.c
  1268. X  wintty.o: ../win/tty/wintty.c  ../include/hack.h ../include/termcap.h ../include/wintty.h
  1269. X      $(CC) $(CFLAGS) -c ../win/tty/wintty.c
  1270. X! Window.o: ../win/X11/Window.c  ../include/WindowP.h
  1271. X      $(CC) $(CFLAGS) -c ../win/X11/Window.c
  1272. X  dialogs.o: ../win/X11/dialogs.c  ../include/config.h
  1273. X      $(CC) $(CFLAGS) -c ../win/X11/dialogs.c
  1274. X--- 454,460 ----
  1275. X      $(CC) $(CFLAGS) -c ../win/tty/topl.c
  1276. X  wintty.o: ../win/tty/wintty.c  ../include/hack.h ../include/termcap.h ../include/wintty.h
  1277. X      $(CC) $(CFLAGS) -c ../win/tty/wintty.c
  1278. X! Window.o: ../win/X11/Window.c  ../include/WindowP.h ../include/config.h
  1279. X      $(CC) $(CFLAGS) -c ../win/X11/Window.c
  1280. X  dialogs.o: ../win/X11/dialogs.c  ../include/config.h
  1281. X      $(CC) $(CFLAGS) -c ../win/X11/dialogs.c
  1282. X***************
  1283. X*** 581,587 ****
  1284. X      touch ../include/eshk.h
  1285. X  ../include/global.h:  ../include/coord.h ../include/vmsconf.h ../include/unixconf.h \
  1286. X          ../include/os2conf.h ../include/pcconf.h ../include/tosconf.h \
  1287. X!         ../include/amiconf.h ../include/macconf.h
  1288. X      touch ../include/global.h
  1289. X  ../include/hack.h:  ../include/config.h ../include/dungeon.h ../include/monsym.h \
  1290. X          ../include/mkroom.h ../include/objclass.h ../include/decl.h \
  1291. X--- 593,599 ----
  1292. X      touch ../include/eshk.h
  1293. X  ../include/global.h:  ../include/coord.h ../include/vmsconf.h ../include/unixconf.h \
  1294. X          ../include/os2conf.h ../include/pcconf.h ../include/tosconf.h \
  1295. X!         ../include/amiconf.h ../include/macconf.h ../include/ntconf.h
  1296. X      touch ../include/global.h
  1297. X  ../include/hack.h:  ../include/config.h ../include/dungeon.h ../include/monsym.h \
  1298. X          ../include/mkroom.h ../include/objclass.h ../include/decl.h \
  1299. X*** /tmp/da09894    Thu Feb 25 10:31:25 1993
  1300. X--- sys/unix/Makefile.utl    Tue Feb  9 16:27:32 1993
  1301. X***************
  1302. X*** 1,6 ****
  1303. X--- 1,18 ----
  1304. X  #    Makefile for NetHack's utility programs.
  1305. X  #    SCCS Id: @(#)Makefile.utl    3.1    92/11/01
  1306. X  
  1307. X+ # newer makes predefine $(MAKE) to 'make' and do smarter processing of
  1308. X+ # recursive make calls if $(MAKE) is used
  1309. X+ # these makes allow $(MAKE) to be overridden by the environment if someone
  1310. X+ # wants to (or has to) use something other than the standard make, so we do
  1311. X+ # not want to unconditionally set $(MAKE) here
  1312. X+ #
  1313. X+ # unfortunately, some older makes do not predefine $(MAKE); if you have one of
  1314. X+ # these, uncomment the following line
  1315. X+ # (you will know that you have one if you get complaints about unable to
  1316. X+ # execute things like 'foo.o')
  1317. X+ # MAKE = make
  1318. X+ 
  1319. X  # if you are using gcc as your compiler,
  1320. X  #    uncomment the CC definition below if it's not in your environment
  1321. X  # CC = gcc
  1322. X***************
  1323. X*** 129,141 ****
  1324. X  panic.o:     ../include/config.h
  1325. X  
  1326. X  # see lev_comp.l for WEIRD_LEX discussion
  1327. X! # egrep returns failure if it doesn't find anything, so we have to go to
  1328. X! # some trouble to check for $(CC) failures
  1329. X! lev_lex.o:   ../include/hack.h ../include/lev_comp.h ../include/sp_lev.h
  1330. X!     -@rm lev_lex.o 2>/dev/null
  1331. X      @echo $(CC) -c $(CFLAGS) lev_lex.c
  1332. X!     -@$(CC) -c $(CFLAGS) -DWEIRD_LEX=`egrep -c _cplusplus lev_lex.c` lev_lex.c
  1333. X!     @test -r lev_lex.o
  1334. X  
  1335. X  ../include/lev_comp.h: lev_yacc.c
  1336. X  
  1337. X--- 141,151 ----
  1338. X  panic.o:     ../include/config.h
  1339. X  
  1340. X  # see lev_comp.l for WEIRD_LEX discussion
  1341. X! # egrep will return failure if it doesn't find anything, but we know there
  1342. X! # is one "_cplusplus" inside a comment
  1343. X! lev_lex.o:   ../include/hack.h ../include/lev_comp.h ../include/sp_lev.h lev_lex.c
  1344. X      @echo $(CC) -c $(CFLAGS) lev_lex.c
  1345. X!     @$(CC) -c $(CFLAGS) -DWEIRD_LEX=`egrep -c _cplusplus lev_lex.c` lev_lex.c
  1346. X  
  1347. X  ../include/lev_comp.h: lev_yacc.c
  1348. X  
  1349. X***************
  1350. X*** 163,175 ****
  1351. X  dgn_main.o:  ../include/config.h
  1352. X  
  1353. X  # see dgn_comp.l for WEIRD_LEX discussion
  1354. X! # egrep returns failure if it doesn't find anything, so we have to go to
  1355. X! # some trouble to check for $(CC) failures
  1356. X! dgn_lex.o:   ../include/config.h ../include/dgn_comp.h ../include/dgn_file.h
  1357. X!     -@rm dgn_lex.o 2>/dev/null
  1358. X      @echo $(CC) -c $(CFLAGS) dgn_lex.c
  1359. X!     -@$(CC) -c $(CFLAGS) -DWEIRD_LEX=`egrep -c _cplusplus dgn_lex.c` dgn_lex.c
  1360. X!     @test -r dgn_lex.o
  1361. X  
  1362. X  
  1363. X  ../include/dgn_comp.h: dgn_yacc.c
  1364. X--- 173,181 ----
  1365. X  dgn_main.o:  ../include/config.h
  1366. X  
  1367. X  # see dgn_comp.l for WEIRD_LEX discussion
  1368. X! dgn_lex.o:   ../include/config.h ../include/dgn_comp.h ../include/dgn_file.h dgn_lex.c
  1369. X      @echo $(CC) -c $(CFLAGS) dgn_lex.c
  1370. X!     @$(CC) -c $(CFLAGS) -DWEIRD_LEX=`egrep -c _cplusplus dgn_lex.c` dgn_lex.c
  1371. X  
  1372. X  
  1373. X  ../include/dgn_comp.h: dgn_yacc.c
  1374. X*** /tmp/da09958    Thu Feb 25 10:31:42 1993
  1375. X--- sys/unix/unixmain.c    Mon Feb 22 12:24:33 1993
  1376. X***************
  1377. X*** 13,19 ****
  1378. X  #endif
  1379. X  
  1380. X  #if !defined(_BULL_SOURCE) && !defined(sgi)
  1381. X! # if defined(POSIX_TYPES) || defined(SVR4)
  1382. X  extern struct passwd *FDECL(getpwuid,(uid_t));
  1383. X  # else
  1384. X  extern struct passwd *FDECL(getpwuid,(int));
  1385. X--- 13,19 ----
  1386. X  #endif
  1387. X  
  1388. X  #if !defined(_BULL_SOURCE) && !defined(sgi)
  1389. X! # if defined(POSIX_TYPES) || defined(SVR4) || defined(HPUX)
  1390. X  extern struct passwd *FDECL(getpwuid,(uid_t));
  1391. X  # else
  1392. X  extern struct passwd *FDECL(getpwuid,(int));
  1393. X***************
  1394. X*** 130,140 ****
  1395. X  #endif
  1396. X      if(!*plname || !strncmp(plname, "player", 4)
  1397. X              || !strncmp(plname, "games", 4)) {
  1398. X-         exact_username = FALSE;
  1399. X          askname();
  1400. X      }
  1401. X!     if (!exact_username) /* what if their LOGNAME looks suffixed-like? */
  1402. X!         plnamesuffix();    /* strip suffix from name; calls askname() */
  1403. X                  /* again if suffix was whole name */
  1404. X                  /* accepts any suffix */
  1405. X  #ifdef WIZARD
  1406. X--- 130,145 ----
  1407. X  #endif
  1408. X      if(!*plname || !strncmp(plname, "player", 4)
  1409. X              || !strncmp(plname, "games", 4)) {
  1410. X          askname();
  1411. X+     } else if (exact_username) {
  1412. X+         /* guard against user names with hyphens in them */
  1413. X+         int len = strlen(plname);
  1414. X+         /* append the current role, if any, so that last dash is ours */
  1415. X+         if (++len < sizeof plname)
  1416. X+             (void)strncat(strcat(plname, "-"),
  1417. X+                       pl_character, sizeof plname - len - 1);
  1418. X      }
  1419. X!     plnamesuffix();        /* strip suffix from name; calls askname() */
  1420. X                  /* again if suffix was whole name */
  1421. X                  /* accepts any suffix */
  1422. X  #ifdef WIZARD
  1423. X***************
  1424. X*** 191,197 ****
  1425. X          (void) chmod(SAVEF,0);    /* disallow parallel restores */
  1426. X          (void) signal(SIGINT, (SIG_RET_TYPE) done1);
  1427. X  #ifdef NEWS
  1428. X!         if(flags.news) display_file(NEWS, FALSE);
  1429. X  #endif
  1430. X          pline("Restoring save file...");
  1431. X          mark_synch();    /* flush output */
  1432. X--- 196,205 ----
  1433. X          (void) chmod(SAVEF,0);    /* disallow parallel restores */
  1434. X          (void) signal(SIGINT, (SIG_RET_TYPE) done1);
  1435. X  #ifdef NEWS
  1436. X!         if(flags.news) {
  1437. X!             display_file(NEWS, FALSE);
  1438. X!             flags.news = FALSE; /* in case dorecover() fails */
  1439. X!         }
  1440. X  #endif
  1441. X          pline("Restoring save file...");
  1442. X          mark_synch();    /* flush output */
  1443. X***************
  1444. X*** 316,322 ****
  1445. X                (void) strncpy(plname, argv[0], sizeof(plname)-1);
  1446. X              } else
  1447. X                  raw_print("Player name expected after -u");
  1448. X-             plnamesuffix();
  1449. X              break;
  1450. X          case 'I':
  1451. X          case 'i':
  1452. X--- 324,329 ----
  1453. X*** /tmp/da09966    Thu Feb 25 10:31:44 1993
  1454. X--- sys/unix/unixtty.c    Thu Feb  4 12:04:24 1993
  1455. X***************
  1456. X*** 11,20 ****
  1457. X  #define NEED_VARARGS
  1458. X  #include "hack.h"
  1459. X  
  1460. X- #ifdef TTY_GRAPHICS
  1461. X- #include "wintty.h"
  1462. X- #endif
  1463. X- 
  1464. X  /*
  1465. X   * The distinctions here are not BSD - rest but rather USG - rest, as
  1466. X   * BSD still has the old sgttyb structure, but SYSV has termio. Thus:
  1467. X--- 11,16 ----
  1468. X***************
  1469. X*** 286,292 ****
  1470. X  {
  1471. X  #ifdef TTY_GRAPHICS
  1472. X      /* Ugly hack to keep from changing tty modes for non-tty games -dlc */
  1473. X!     if (windowprocs.win_init_nhwindows == tty_init_nhwindows &&
  1474. X          intr_char != nonesuch && curttyb2.intr_sym != '\003') {
  1475. X          curttyb2.intr_sym = '\003';
  1476. X          setctty();
  1477. X--- 282,288 ----
  1478. X  {
  1479. X  #ifdef TTY_GRAPHICS
  1480. X      /* Ugly hack to keep from changing tty modes for non-tty games -dlc */
  1481. X!     if (!strcmp(windowprocs.name, "tty") &&
  1482. X          intr_char != nonesuch && curttyb2.intr_sym != '\003') {
  1483. X          curttyb2.intr_sym = '\003';
  1484. X          setctty();
  1485. X***************
  1486. X*** 299,305 ****
  1487. X  {
  1488. X  #ifdef TTY_GRAPHICS
  1489. X      /* Ugly hack to keep from changing tty modes for non-tty games -dlc */
  1490. X!     if (windowprocs.win_init_nhwindows == tty_init_nhwindows &&
  1491. X         curttyb2.intr_sym != nonesuch) {
  1492. X          curttyb2.intr_sym = nonesuch;
  1493. X          setctty();
  1494. X--- 295,301 ----
  1495. X  {
  1496. X  #ifdef TTY_GRAPHICS
  1497. X      /* Ugly hack to keep from changing tty modes for non-tty games -dlc */
  1498. X!     if (!strcmp(windowprocs.name, "tty") &&
  1499. X         curttyb2.intr_sym != nonesuch) {
  1500. X          curttyb2.intr_sym = nonesuch;
  1501. X          setctty();
  1502. X*** /tmp/da09974    Thu Feb 25 10:31:46 1993
  1503. X--- sys/unix/unixunix.c    Thu Feb  4 12:04:28 1993
  1504. X***************
  1505. X*** 155,160 ****
  1506. X--- 155,161 ----
  1507. X      extern int errno;
  1508. X      register int i = 0, fd, c;
  1509. X  
  1510. X+ #ifdef TTY_GRAPHICS
  1511. X      /* idea from rpick%ucqais@uccba.uc.edu
  1512. X       * prevent automated rerolling of characters
  1513. X       * test input (fd0) so that tee'ing output to get a screen dump still
  1514. X***************
  1515. X*** 161,168 ****
  1516. X       * works
  1517. X       * also incidentally prevents development of any hack-o-matic programs
  1518. X       */
  1519. X!     if (!isatty(0))
  1520. X          error("You must play from a terminal.");
  1521. X  
  1522. X      /* we ignore QUIT and INT at this point */
  1523. X      if (!lock_file(HLOCK, 10)) {
  1524. X--- 162,172 ----
  1525. X       * works
  1526. X       * also incidentally prevents development of any hack-o-matic programs
  1527. X       */
  1528. X!     /* added check for window-system type -dlc */
  1529. X!     if (!strcmp(windowprocs.name, "tty"))
  1530. X!         if (!isatty(0))
  1531. X          error("You must play from a terminal.");
  1532. X+ #endif
  1533. X  
  1534. X      /* we ignore QUIT and INT at this point */
  1535. X      if (!lock_file(HLOCK, 10)) {
  1536. X*** /tmp/da08782    Thu Feb 25 10:26:18 1993
  1537. X--- util/dgn_comp.l    Tue Feb  9 16:24:08 1993
  1538. X***************
  1539. X*** 39,45 ****
  1540. X  #  endif
  1541. X  # endif
  1542. X  # if !defined(VOIDYYPUT) && defined(WEIRD_LEX)
  1543. X! #  if defined(SUNOS4) && defined(__STDC__) && (WEIRD_LEX != 0) 
  1544. X  #   define VOIDYYPUT
  1545. X  #  endif
  1546. X  # endif
  1547. X--- 39,45 ----
  1548. X  #  endif
  1549. X  # endif
  1550. X  # if !defined(VOIDYYPUT) && defined(WEIRD_LEX)
  1551. X! #  if defined(SUNOS4) && defined(__STDC__) && (WEIRD_LEX > 1) 
  1552. X  #   define VOIDYYPUT
  1553. X  #  endif
  1554. X  # endif
  1555. X*** /tmp/da08806    Thu Feb 25 10:26:23 1993
  1556. X--- util/lev_comp.l    Wed Feb 17 09:53:01 1993
  1557. X***************
  1558. X*** 36,42 ****
  1559. X  #  endif
  1560. X  # endif
  1561. X  # if !defined(VOIDYYPUT) && defined(WEIRD_LEX)
  1562. X! #  if defined(SUNOS4) && defined(__STDC__) && (WEIRD_LEX != 0) 
  1563. X  #   define VOIDYYPUT
  1564. X  #  endif
  1565. X  # endif
  1566. X--- 36,42 ----
  1567. X  #  endif
  1568. X  # endif
  1569. X  # if !defined(VOIDYYPUT) && defined(WEIRD_LEX)
  1570. X! #  if defined(SUNOS4) && defined(__STDC__) && (WEIRD_LEX > 1) 
  1571. X  #   define VOIDYYPUT
  1572. X  #  endif
  1573. X  # endif
  1574. X***************
  1575. X*** 125,131 ****
  1576. X            yylval.map[yyleng-6] = 0;
  1577. X            return MAP_ID;
  1578. X          }
  1579. X! <MAPC>[-|}{+ABCISKPLW\\#. ]*\n    { line_number++; yymore(); }
  1580. X  ^#.*\n        { line_number++; }
  1581. X  :        { colon_line_number = line_number; return ':'; }
  1582. X  MESSAGE        return MESSAGE_ID;
  1583. X--- 125,131 ----
  1584. X            yylval.map[yyleng-6] = 0;
  1585. X            return MAP_ID;
  1586. X          }
  1587. X! <MAPC>[-|}{+ABCISHKPLW\\#. ]*\n    { line_number++; yymore(); }
  1588. X  ^#.*\n        { line_number++; }
  1589. X  :        { colon_line_number = line_number; return ':'; }
  1590. X  MESSAGE        return MESSAGE_ID;
  1591. X***************
  1592. X*** 157,162 ****
  1593. X--- 157,163 ----
  1594. X  SINK        return SINK_ID;
  1595. X  POOL        return POOL_ID;
  1596. X  NON_DIGGABLE    return NON_DIGGABLE_ID;
  1597. X+ NON_PASSWALL    return NON_PASSWALL_ID;
  1598. X  ROOM        return ROOM_ID;
  1599. X  SUBROOM        return SUBROOM_ID;
  1600. X  RANDOM_CORRIDORS    return RAND_CORRIDOR_ID;
  1601. X*** /tmp/da08814    Thu Feb 25 10:26:25 1993
  1602. X--- util/lev_comp.y    Wed Feb 17 09:53:05 1993
  1603. X***************
  1604. X*** 1,5 ****
  1605. X  %{
  1606. X! /*    SCCS Id: @(#)lev_comp.c    3.1    92/07/12    */
  1607. X  /*    Copyright (c) 1989 by Jean-Christophe Collet */
  1608. X  /* NetHack may be freely redistributed.  See license for details. */
  1609. X  
  1610. X--- 1,5 ----
  1611. X  %{
  1612. X! /*    SCCS Id: @(#)lev_comp.c    3.1    93/02/13    */
  1613. X  /*    Copyright (c) 1989 by Jean-Christophe Collet */
  1614. X  /* NetHack may be freely redistributed.  See license for details. */
  1615. X  
  1616. X***************
  1617. X*** 95,100 ****
  1618. X--- 95,101 ----
  1619. X  lad *tmplad[256];
  1620. X  stair *tmpstair[256];
  1621. X  digpos *tmpdig[256];
  1622. X+ digpos *tmppass[32];
  1623. X  char *tmpmap[ROWNO];
  1624. X  region *tmpreg[256];
  1625. X  lev_region *tmplreg[32];
  1626. X***************
  1627. X*** 126,132 ****
  1628. X  unsigned int nlreg = 0, nreg = 0, ndoor = 0, ntrap = 0, nmons = 0, nobj = 0;
  1629. X  unsigned int ndb = 0, nwalk = 0, npart = 0, ndig = 0, nlad = 0, nstair = 0;
  1630. X  unsigned int naltar = 0, ncorridor = 0, nrooms = 0, ngold = 0, nengraving = 0;
  1631. X! unsigned int nfountain = 0, npool = 0, nsink = 0;
  1632. X  
  1633. X  static unsigned long lev_flags = 0;
  1634. X  
  1635. X--- 127,133 ----
  1636. X  unsigned int nlreg = 0, nreg = 0, ndoor = 0, ntrap = 0, nmons = 0, nobj = 0;
  1637. X  unsigned int ndb = 0, nwalk = 0, npart = 0, ndig = 0, nlad = 0, nstair = 0;
  1638. X  unsigned int naltar = 0, ncorridor = 0, nrooms = 0, ngold = 0, nengraving = 0;
  1639. X! unsigned int nfountain = 0, npool = 0, nsink = 0, npass = 0;
  1640. X  
  1641. X  static unsigned long lev_flags = 0;
  1642. X  
  1643. X***************
  1644. X*** 157,163 ****
  1645. X  %token    <i> OBJECT_ID MONSTER_ID TRAP_ID DOOR_ID DRAWBRIDGE_ID
  1646. X  %token    <i> MAZEWALK_ID WALLIFY_ID REGION_ID FILLING
  1647. X  %token    <i> RANDOM_OBJECTS_ID RANDOM_MONSTERS_ID RANDOM_PLACES_ID
  1648. X! %token    <i> ALTAR_ID LADDER_ID STAIR_ID NON_DIGGABLE_ID ROOM_ID
  1649. X  %token    <i> PORTAL_ID TELEPRT_ID BRANCH_ID LEV CHANCE_ID
  1650. X  %token    <i> CORRIDOR_ID GOLD_ID ENGRAVING_ID FOUNTAIN_ID POOL_ID SINK_ID NONE
  1651. X  %token    <i> RAND_CORRIDOR_ID DOOR_STATE LIGHT_STATE CURSE_TYPE ENGRAVING_TYPE
  1652. X--- 158,164 ----
  1653. X  %token    <i> OBJECT_ID MONSTER_ID TRAP_ID DOOR_ID DRAWBRIDGE_ID
  1654. X  %token    <i> MAZEWALK_ID WALLIFY_ID REGION_ID FILLING
  1655. X  %token    <i> RANDOM_OBJECTS_ID RANDOM_MONSTERS_ID RANDOM_PLACES_ID
  1656. X! %token    <i> ALTAR_ID LADDER_ID STAIR_ID NON_DIGGABLE_ID NON_PASSWALL_ID ROOM_ID
  1657. X  %token    <i> PORTAL_ID TELEPRT_ID BRANCH_ID LEV CHANCE_ID
  1658. X  %token    <i> CORRIDOR_ID GOLD_ID ENGRAVING_ID FOUNTAIN_ID POOL_ID SINK_ID NONE
  1659. X  %token    <i> RAND_CORRIDOR_ID DOOR_STATE LIGHT_STATE CURSE_TYPE ENGRAVING_TYPE
  1660. X***************
  1661. X*** 309,324 ****
  1662. X          | FLAGS_ID ':' flag_list
  1663. X            {
  1664. X              $$ = lev_flags;
  1665. X            }
  1666. X          ;
  1667. X  
  1668. X! flag_list    : FLAG_TYPE
  1669. X            {
  1670. X              lev_flags |= $1;
  1671. X            }
  1672. X!         | FLAG_TYPE ',' flag_list
  1673. X            {
  1674. X!             lev_flags |= $3;
  1675. X            }
  1676. X          ;
  1677. X  
  1678. X--- 310,326 ----
  1679. X          | FLAGS_ID ':' flag_list
  1680. X            {
  1681. X              $$ = lev_flags;
  1682. X+             lev_flags = 0;    /* clear for next user */
  1683. X            }
  1684. X          ;
  1685. X  
  1686. X! flag_list    : FLAG_TYPE ',' flag_list
  1687. X            {
  1688. X              lev_flags |= $1;
  1689. X            }
  1690. X!         | FLAG_TYPE
  1691. X            {
  1692. X!             lev_flags |= $1;
  1693. X            }
  1694. X          ;
  1695. X  
  1696. X***************
  1697. X*** 813,818 ****
  1698. X--- 815,821 ----
  1699. X          | gold_detail
  1700. X          | engraving_detail
  1701. X          | diggable_detail
  1702. X+         | passwall_detail
  1703. X          ;
  1704. X  
  1705. X  monster_detail    : MONSTER_ID ':' monster_c ',' m_name ',' coordinate
  1706. X***************
  1707. X*** 1215,1220 ****
  1708. X--- 1218,1234 ----
  1709. X              tmpdig[ndig]->x2 = current_region.x2;
  1710. X              tmpdig[ndig]->y2 = current_region.y2;
  1711. X              ndig++;
  1712. X+           }
  1713. X+         ;
  1714. X+ 
  1715. X+ passwall_detail : NON_PASSWALL_ID ':' region
  1716. X+           {
  1717. X+             tmppass[npass] = New(digpos);
  1718. X+             tmppass[npass]->x1 = current_region.x1;
  1719. X+             tmppass[npass]->y1 = current_region.y1;
  1720. X+             tmppass[npass]->x2 = current_region.x2;
  1721. X+             tmppass[npass]->y2 = current_region.y2;
  1722. X+             npass++;
  1723. X            }
  1724. X          ;
  1725. X  
  1726. X*** /tmp/da08822    Thu Feb 25 10:26:28 1993
  1727. X--- util/lev_main.c    Wed Feb 17 09:53:09 1993
  1728. X***************
  1729. X*** 152,157 ****
  1730. X--- 152,158 ----
  1731. X  extern lad *tmplad[];
  1732. X  extern stair *tmpstair[];
  1733. X  extern digpos *tmpdig[];
  1734. X+ extern digpos *tmppass[];
  1735. X  extern char *tmpmap[];
  1736. X  extern region *tmpreg[];
  1737. X  extern lev_region *tmplreg[];
  1738. X***************
  1739. X*** 174,180 ****
  1740. X  extern int n_olist, n_mlist, n_plist;
  1741. X  
  1742. X  extern unsigned int nlreg, nreg, ndoor, ntrap, nmons, nobj;
  1743. X! extern unsigned int ndb, nwalk, npart, ndig, nlad, nstair;
  1744. X  extern unsigned int naltar, ncorridor, nrooms, ngold, nengraving;
  1745. X  extern unsigned int nfountain, npool, nsink;
  1746. X  
  1747. X--- 175,181 ----
  1748. X  extern int n_olist, n_mlist, n_plist;
  1749. X  
  1750. X  extern unsigned int nlreg, nreg, ndoor, ntrap, nmons, nobj;
  1751. X! extern unsigned int ndb, nwalk, npart, ndig, npass, nlad, nstair;
  1752. X  extern unsigned int naltar, ncorridor, nrooms, ngold, nengraving;
  1753. X  extern unsigned int nfountain, npool, nsink;
  1754. X  
  1755. X***************
  1756. X*** 441,446 ****
  1757. X--- 442,448 ----
  1758. X            case 'B'  : return(CROSSWALL); /* hack: boundary location */
  1759. X            case 'C'  : return(CLOUD);
  1760. X            case 'S'  : return(SDOOR);
  1761. X+           case 'H'  : return(SCORR);
  1762. X            case '{'  : return(FOUNTAIN);
  1763. X            case '\\' : return(THRONE);
  1764. X            case 'K'  :
  1765. X***************
  1766. X*** 708,713 ****
  1767. X--- 710,724 ----
  1768. X      }
  1769. X      ndig = 0;
  1770. X  
  1771. X+     /* The non_passwall directives */
  1772. X+ 
  1773. X+     if ((tmppart[npart]->npass = npass) != 0) {
  1774. X+         tmppart[npart]->passs = NewTab(digpos, npass);
  1775. X+         for(i=0;i<npass;i++)
  1776. X+             tmppart[npart]->passs[i] = tmppass[i];
  1777. X+     }
  1778. X+     npass = 0;
  1779. X+ 
  1780. X      /* The ladders */
  1781. X  
  1782. X      if ((tmppart[npart]->nlad = nlad) != 0) {
  1783. X***************
  1784. X*** 1059,1064 ****
  1785. X--- 1070,1084 ----
  1786. X          }
  1787. X          if (pt->ndig > 0)
  1788. X              Free(pt->digs);
  1789. X+ 
  1790. X+         /* The non_passwall directives */
  1791. X+         Write(fd, &(pt->npass), sizeof(pt->npass));
  1792. X+         for(j=0;j<pt->npass;j++) {
  1793. X+             Write(fd, pt->passs[j], sizeof(digpos));
  1794. X+             Free(pt->passs[j]);
  1795. X+         }
  1796. X+         if (pt->npass > 0)
  1797. X+             Free(pt->passs);
  1798. X  
  1799. X          /* The ladders */
  1800. X          Write(fd, &(pt->nlad), sizeof(pt->nlad));
  1801. X*** /tmp/da08830    Thu Feb 25 10:26:31 1993
  1802. X--- util/makedefs.c    Thu Feb  4 10:39:25 1993
  1803. X***************
  1804. X*** 660,666 ****
  1805. X      Sprintf(tempfile, DATA_TEMPLATE, "database.tmp");
  1806. X      Sprintf(filename, DATA_TEMPLATE, DATA_FILE);
  1807. X      Strcat(strcpy(infile, filename),
  1808. X! #ifdef OS2
  1809. X          ".bas"
  1810. X  #else
  1811. X          ".base"
  1812. X--- 660,666 ----
  1813. X      Sprintf(tempfile, DATA_TEMPLATE, "database.tmp");
  1814. X      Sprintf(filename, DATA_TEMPLATE, DATA_FILE);
  1815. X      Strcat(strcpy(infile, filename),
  1816. X! #if (defined(OS2) && !defined(OS2_HPFS)) || defined(WIN32)
  1817. X          ".bas"
  1818. X  #else
  1819. X          ".base"
  1820. X
  1821. END_OF_FILE
  1822. if test 53271 -ne `wc -c <'patches01o'`; then
  1823.     echo shar: \"'patches01o'\" unpacked with wrong size!
  1824. fi
  1825. # end of 'patches01o'
  1826. if test -f 'sys/winnt/setup.bat' -a "${1}" != "-c" ; then 
  1827.   echo shar: Renaming existing file \"'sys/winnt/setup.bat'\" to \"'sys/winnt/setup.bat.orig'\"
  1828.   mv -f 'sys/winnt/setup.bat' 'sys/winnt/setup.bat.orig'
  1829. fi
  1830. echo shar: Extracting \"'sys/winnt/setup.bat'\" \(1821 characters\)
  1831. sed "s/^X//" >'sys/winnt/setup.bat' <<'END_OF_FILE'
  1832. X@echo off
  1833. XREM  SCCS Id: @(#)setup.bat     93/02/23         
  1834. XREM  Copyright (c) NetHack PC Development Team 1993
  1835. XREM  NetHack may be freely redistributed.  See license for details. 
  1836. XREM  Windows NT setup batch file, see Install.nt for details
  1837. XREM
  1838. Xecho Checking to see if directories are set up properly
  1839. Xif not exist ..\..\include\hack.h goto err_dir
  1840. Xif not exist ..\..\src\hack.c goto err_dir
  1841. Xif not exist ..\..\dat\wizard.des goto err_dir
  1842. Xif not exist ..\..\util\makedefs.c goto err_dir
  1843. Xecho Directories look ok.
  1844. Xif exist ..\..\dat\data.bas goto do_rest
  1845. Xif NOT exist ..\..\dat\data.base goto err_data
  1846. Xcopy ..\..\dat\data.base ..\..\dat\data.bas >nul
  1847. X:do_rest
  1848. Xecho Copying Make files
  1849. Xcopy makefile.src ..\..\src\makefile >nul
  1850. Xcopy makefile.utl ..\..\util\makefile >nul
  1851. Xcopy makefile.dat ..\..\dat\makefile >nul
  1852. Xecho Copied ok.
  1853. XREM blending with empty. ensures that timestamp will be new
  1854. Xprompt %prompt% >_empty.
  1855. Xecho Copying level and dungeon compiler sources to util.
  1856. Xcopy _empty.+..\share\lev_lex.c ..\..\util\lev_lex.c >nul
  1857. Xcopy _empty.+..\share\dgn_lex.c ..\..\util\dgn_lex.c >nul
  1858. Xcopy _empty.+..\share\lev_yacc.c ..\..\util\lev_yacc.c >nul
  1859. Xcopy _empty.+..\share\dgn_yacc.c ..\..\util\dgn_yacc.c >nul
  1860. Xecho Copied ok.
  1861. Xecho Copying level and dungeon compiler header files to include.
  1862. Xcopy _empty.+..\share\lev_comp.h ..\..\include\lev_comp.h >nul
  1863. Xcopy _empty.+..\share\dgn_comp.h ..\..\include\dgn_comp.h >nul
  1864. Xecho Copied ok.
  1865. Xdel _empty. >nul
  1866. Xecho done!
  1867. Xecho.
  1868. Xecho Proceed with the next step documented in Install.nt
  1869. Xgoto done
  1870. X:err_data
  1871. Xecho A required file ..\..\dat\data.bas seems to be missing.
  1872. Xecho Check Files. in the root directory for your NetHack distribution
  1873. Xecho and make sure that all required files exist.
  1874. Xgoto done
  1875. X:err_dir
  1876. Xecho Your directories are not set up properly, please re-read the
  1877. Xecho documentation.
  1878. X:done
  1879. END_OF_FILE
  1880. if test 1821 -ne `wc -c <'sys/winnt/setup.bat'`; then
  1881.     echo shar: \"'sys/winnt/setup.bat'\" unpacked with wrong size!
  1882. fi
  1883. # end of 'sys/winnt/setup.bat'
  1884. echo shar: End of archive 13 \(of 31\).
  1885. cp /dev/null ark13isdone
  1886. MISSING=""
  1887. 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
  1888.     if test ! -f ark${I}isdone ; then
  1889.     MISSING="${MISSING} ${I}"
  1890.     fi
  1891. done
  1892. if test "${MISSING}" = "" ; then
  1893.     echo You have unpacked all 31 archives.
  1894.     echo "Now execute 'patchit.sh'"
  1895.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  1896. else
  1897.     echo You still need to unpack the following archives:
  1898.     echo "        " ${MISSING}
  1899. fi
  1900. ##  End of shell archive.
  1901. exit 0
  1902.