home *** CD-ROM | disk | FTP | other *** search
/ Giga Games 1 / Giga Games.iso / net / usenet / volume11 / reve / patch4b < prev    next >
Encoding:
Internet Message Format  |  1991-01-03  |  51.8 KB

  1. Path: uunet!zephyr.ens.tek.com!tekred!saab!billr
  2. From: billr@saab.CNA.TEK.COM (Bill Randle)
  3. Newsgroups: comp.sources.games
  4. Subject: v12i011:  reve - an othello game, Patch4b
  5. Message-ID: <6769@tekred.CNA.TEK.COM>
  6. Date: 21 Dec 90 20:56:01 GMT
  7. Sender: news@tekred.CNA.TEK.COM
  8. Lines: 1662
  9. Approved: billr@saab.CNA.TEK.COM
  10.  
  11. Submitted-by: Rich Burridge <rburridge@sun.COM>
  12. Posting-number: Volume 12, Issue 11
  13. Archive-name: reve/Patch4b
  14. Patch-To: reve: Volume 11, Issue 52-58
  15. Environment: SunView, XView, X11R4, termcap
  16.  
  17.  
  18.  
  19. #! /bin/sh
  20. # This is a shell archive.  Remove anything before this line, then unpack
  21. # it by saving it into a file and typing "sh file".  To overwrite existing
  22. # files, type "sh file -c".  You can also feed this as standard input via
  23. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  24. # will see the following message at the end:
  25. #        "End of archive 2 (of 4)."
  26. # Contents:  patches04b
  27. # Wrapped by billr@saab on Fri Dec 21 11:35:38 1990
  28. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  29. if test -f 'patches04b' -a "${1}" != "-c" ; then 
  30.   echo shar: Will not clobber existing file \"'patches04b'\"
  31. else
  32. echo shar: Extracting \"'patches04b'\" \(49681 characters\)
  33. sed "s/^X//" >'patches04b' <<'END_OF_FILE'
  34. X
  35. X------- sunview.c -------
  36. X*** /tmp/da06711    Tue Dec 18 10:04:12 1990
  37. X--- sunview.c    Sat Dec 15 19:14:12 1990
  38. X***************
  39. X*** 49,54 ****
  40. X--- 49,55 ----
  41. X  #define  WINDOW_SET          (void) window_set
  42. X  
  43. X  #define  NORMALFONT          "/usr/lib/fonts/fixedwidthfonts/screen.r.12"
  44. X+ #define  HELPFONT            "/usr/lib/fonts/fixedwidthfonts/screen.r.10"
  45. X  #define  BOLDFONT            "/usr/lib/fonts/fixedwidthfonts/screen.b.12"
  46. X  
  47. X  mpr_static(button_stencil_pr, 64, 64, 1, button_stencil_image) ;
  48. X***************
  49. X*** 68,81 ****
  50. X  mpr_static(hglass_pr,         16, 16, 1, hglass_image) ;
  51. X  mpr_static(nocur_pr,          16, 16, 1, nocur_image) ;
  52. X  
  53. X! Canvas canvas, pcanvas ;
  54. X  Cursor cursor[MAXCURSORS] ;
  55. X  Event *cur_event ;
  56. X! Frame frame, pframe ;
  57. X  Icon reve_icon ;
  58. X  Pixfont *font[MAXFONTS] ;
  59. X  Pixrect *images[MAXIMAGES] ;
  60. X! Pixwin *cpw, *ppw ;
  61. X  
  62. X  void pw_batch() ;
  63. X  int opvals[3] ;         /* Pixrect rasterop values. */
  64. X--- 69,82 ----
  65. X  mpr_static(hglass_pr,         16, 16, 1, hglass_image) ;
  66. X  mpr_static(nocur_pr,          16, 16, 1, nocur_image) ;
  67. X  
  68. X! Canvas canvas, hcanvas, pcanvas ;
  69. X  Cursor cursor[MAXCURSORS] ;
  70. X  Event *cur_event ;
  71. X! Frame frame, hframe, pframe ;
  72. X  Icon reve_icon ;
  73. X  Pixfont *font[MAXFONTS] ;
  74. X  Pixrect *images[MAXIMAGES] ;
  75. X! Pixwin *cpw, *hpw, *ppw ;
  76. X  
  77. X  void pw_batch() ;
  78. X  int opvals[3] ;         /* Pixrect rasterop values. */
  79. X***************
  80. X*** 101,106 ****
  81. X--- 102,108 ----
  82. X  Event *event ;
  83. X  {
  84. X         if (c == canvas)  curwin = W_MAIN ;
  85. X+   else if (c == hcanvas) curwin = W_HELP ;
  86. X    else if (c == pcanvas) curwin = W_PROPS ;
  87. X  
  88. X    cur_event = event ;
  89. X***************
  90. X*** 109,126 ****
  91. X  
  92. X  
  93. X  void
  94. X- close_frame(wtype)        /* Iconise reve window. */
  95. X- enum win_type wtype ;
  96. X- {
  97. X-   Frame f ;
  98. X- 
  99. X-   if (wtype == W_MAIN) f = frame ;
  100. X-   else                 f = pframe ;
  101. X-   WINDOW_SET(f, FRAME_CLOSED, TRUE, 0) ;
  102. X- }
  103. X- 
  104. X- 
  105. X- void
  106. X  color_area(wtype, x, y, width, height, color)
  107. X  enum win_type wtype ;
  108. X  int x, y, width, height, color ;
  109. X--- 111,116 ----
  110. X***************
  111. X*** 127,133 ****
  112. X  {
  113. X    Pixwin *pw ;
  114. X  
  115. X!   pw = (wtype == W_MAIN) ? cpw : ppw ;
  116. X    PW_WRITEBACKGROUND(pw, x, y, width, height, PIX_SRC | PIX_COLOR(color)) ;
  117. X  }
  118. X  
  119. X--- 117,125 ----
  120. X  {
  121. X    Pixwin *pw ;
  122. X  
  123. X!        if (wtype == W_MAIN)  pw = cpw ;
  124. X!   else if (wtype == W_HELP)  pw = hpw ;
  125. X!   else if (wtype == W_PROPS) pw = ppw ;
  126. X    PW_WRITEBACKGROUND(pw, x, y, width, height, PIX_SRC | PIX_COLOR(color)) ;
  127. X  }
  128. X  
  129. X***************
  130. X*** 147,153 ****
  131. X  {                        
  132. X    Pixwin *pw ;
  133. X  
  134. X!   pw = (wtype == W_MAIN) ? cpw : ppw ;
  135. X    PW_ROP(pw, x, y, width, height, PIX_SRC | PIX_DST,
  136. X           images[(int) image], 0, 0) ;
  137. X  }
  138. X--- 139,147 ----
  139. X  {                        
  140. X    Pixwin *pw ;
  141. X  
  142. X!        if (wtype == W_MAIN)  pw = cpw ;
  143. X!   else if (wtype == W_HELP)  pw = hpw ;
  144. X!   else if (wtype == W_PROPS) pw = ppw ;
  145. X    PW_ROP(pw, x, y, width, height, PIX_SRC | PIX_DST,
  146. X           images[(int) image], 0, 0) ;
  147. X  }
  148. X***************
  149. X*** 162,168 ****
  150. X    Pixwin *pw ;
  151. X    int rop ;
  152. X  
  153. X!   pw = (wtype == W_MAIN) ? cpw : ppw ;
  154. X    rop = opvals[(int) op] ;
  155. X    if (!iscolor[(int) cur_dpyno] && color == C_WHITE)
  156. X      rop = opvals[(int) RCLR] ;
  157. X--- 156,164 ----
  158. X    Pixwin *pw ;
  159. X    int rop ;
  160. X  
  161. X!        if (wtype == W_MAIN)  pw = cpw ;
  162. X!   else if (wtype == W_HELP)  pw = hpw ;
  163. X!   else if (wtype == W_PROPS) pw = ppw ;
  164. X    rop = opvals[(int) op] ;
  165. X    if (!iscolor[(int) cur_dpyno] && color == C_WHITE)
  166. X      rop = opvals[(int) RCLR] ;
  167. X***************
  168. X*** 180,186 ****
  169. X    Pixwin *pw ;
  170. X    int rop ;
  171. X  
  172. X!   pw = (wtype == W_MAIN) ? cpw : ppw ;
  173. X    rop = opvals[(int) op] | PIX_COLOR(color) ;
  174. X    PW_STENCIL(pw, x, y, width, height, rop,
  175. X               images[(int) stencil], 0, 0, images[(int) image], 0, 0) ;
  176. X--- 176,184 ----
  177. X    Pixwin *pw ;
  178. X    int rop ;
  179. X  
  180. X!        if (wtype == W_MAIN)  pw = cpw ;
  181. X!   else if (wtype == W_HELP)  pw = hpw ;
  182. X!   else if (wtype == W_PROPS) pw = ppw ;
  183. X    rop = opvals[(int) op] | PIX_COLOR(color) ;
  184. X    PW_STENCIL(pw, x, y, width, height, rop,
  185. X               images[(int) stencil], 0, 0, images[(int) image], 0, 0) ;
  186. X***************
  187. X*** 196,202 ****
  188. X  {
  189. X    Pixwin *pw ;
  190. X  
  191. X!   pw = (wtype == W_MAIN) ? cpw : ppw ;
  192. X    PW_TTEXT(pw, x, y, PIX_SRC | PIX_COLOR(color), font[(int) ftype], str) ;
  193. X  }
  194. X  
  195. X--- 194,202 ----
  196. X  {
  197. X    Pixwin *pw ;
  198. X  
  199. X!        if (wtype == W_MAIN)  pw = cpw ;
  200. X!   else if (wtype == W_HELP)  pw = hpw ;
  201. X!   else if (wtype == W_PROPS) pw = ppw ;
  202. X    PW_TTEXT(pw, x, y, PIX_SRC | PIX_COLOR(color), font[(int) ftype], str) ;
  203. X  }
  204. X  
  205. X***************
  206. X*** 218,223 ****
  207. X--- 218,224 ----
  208. X  }
  209. X  
  210. X  
  211. X+ /*ARGSUSED*/
  212. X  char *
  213. X  get_resource(rtype)      /* Null routine (currently only X11 and XView). */
  214. X  enum res_type rtype ;
  215. X***************
  216. X*** 241,252 ****
  217. X--- 242,256 ----
  218. X  init_fonts()         /* Open the normal and bold fonts. */
  219. X  {
  220. X    font[(int) BFONT] = get_font(BOLDFONT) ;
  221. X+   font[(int) HFONT] = get_font(HELPFONT) ;
  222. X    font[(int) NFONT] = get_font(NORMALFONT) ;
  223. X    bfont_height = font[(int) BFONT]->pf_defaultsize.y ;
  224. X+   hfont_height = font[(int) HFONT]->pf_defaultsize.y ;
  225. X    nfont_height = font[(int) NFONT]->pf_defaultsize.y ;
  226. X  }
  227. X  
  228. X  
  229. X+ /*ARGSUSED*/
  230. X  init_graphics(argc, argv)
  231. X  int *argc ;
  232. X  char *argv[] ;
  233. X***************
  234. X*** 272,292 ****
  235. X  {
  236. X    Pixwin *frame_pw ;
  237. X    char colorname[CMS_NAMESIZE] ;
  238. X-   u_char red[OTH_COLORSIZE], green[OTH_COLORSIZE], blue[OTH_COLORSIZE] ;
  239. X  
  240. X    iscolor[(int) cur_dpyno] = (cpw->pw_pixrect->pr_depth == 8) ? 1 : 0 ;
  241. X!   SPRINTF(colorname, "%s%D", OTH_COLOR, getpid()) ;
  242. X    PW_SETCMSNAME(cpw, colorname) ;
  243. X  
  244. X!   oth_colorsetup(red, green, blue) ;
  245. X!   PW_PUTCOLORMAP(cpw, 0, OTH_COLORSIZE, red, green, blue) ;
  246. X!   if (inv_video) PW_REVERSEVIDEO(cpw, 0, OTH_COLORSIZE) ;
  247. X  
  248. X    if (iscolor[(int) cur_dpyno])
  249. X      {
  250. X        frame_pw = (Pixwin *) window_get(frame, WIN_PIXWIN) ;
  251. X        PW_SETCMSNAME(frame_pw, colorname) ;
  252. X!       PW_PUTCOLORMAP(frame_pw, 0, OTH_COLORSIZE, red, green, blue) ;
  253. X      }
  254. X  }
  255. X  
  256. X--- 276,294 ----
  257. X  {
  258. X    Pixwin *frame_pw ;
  259. X    char colorname[CMS_NAMESIZE] ;
  260. X  
  261. X    iscolor[(int) cur_dpyno] = (cpw->pw_pixrect->pr_depth == 8) ? 1 : 0 ;
  262. X!   SPRINTF(colorname, "%s%D", REVE_COLOR, getpid()) ;
  263. X    PW_SETCMSNAME(cpw, colorname) ;
  264. X  
  265. X!   PW_PUTCOLORMAP(cpw, 0, REVE_COLORSIZE, rcols, gcols, bcols) ;
  266. X!   if (inv_video) PW_REVERSEVIDEO(cpw, 0, REVE_COLORSIZE) ;
  267. X  
  268. X    if (iscolor[(int) cur_dpyno])
  269. X      {
  270. X        frame_pw = (Pixwin *) window_get(frame, WIN_PIXWIN) ;
  271. X        PW_SETCMSNAME(frame_pw, colorname) ;
  272. X!       PW_PUTCOLORMAP(frame_pw, 0, REVE_COLORSIZE, rcols, gcols, bcols) ;
  273. X      }
  274. X  }
  275. X  
  276. X***************
  277. X*** 315,321 ****
  278. X  void
  279. X  make_canvas()               /* Create canvas for game board. */
  280. X  {
  281. X!   canvas = window_create(frame, CANVAS,
  282. X                           CANVAS_RETAINED, FALSE,
  283. X                           WIN_HEIGHT,      TOTAL_HEIGHT,
  284. X                           WIN_WIDTH,       TOTAL_WIDTH,
  285. X--- 317,323 ----
  286. X  void
  287. X  make_canvas()               /* Create canvas for game board. */
  288. X  {
  289. X!   canvas = window_create(frame,           CANVAS,
  290. X                           CANVAS_RETAINED, FALSE,
  291. X                           WIN_HEIGHT,      TOTAL_HEIGHT,
  292. X                           WIN_WIDTH,       TOTAL_WIDTH,
  293. X***************
  294. X*** 331,337 ****
  295. X                           0) ;
  296. X    cpw = (Pixwin *) window_get(canvas, CANVAS_PIXWIN) ;
  297. X  
  298. X!   pcanvas = window_create(pframe, CANVAS,
  299. X                            CANVAS_RETAINED, FALSE,
  300. X                            WIN_HEIGHT,      PROPS_HEIGHT,
  301. X                            WIN_WIDTH,       PROPS_WIDTH,
  302. X--- 333,339 ----
  303. X                           0) ;
  304. X    cpw = (Pixwin *) window_get(canvas, CANVAS_PIXWIN) ;
  305. X  
  306. X!   pcanvas = window_create(pframe,          CANVAS,
  307. X                            CANVAS_RETAINED, FALSE,
  308. X                            WIN_HEIGHT,      PROPS_HEIGHT,
  309. X                            WIN_WIDTH,       PROPS_WIDTH,
  310. X***************
  311. X*** 395,415 ****
  312. X  
  313. X  
  314. X  void
  315. X! make_icon()
  316. X  {
  317. X!   reve_icon = icon_create(ICON_IMAGE, &icon_pr, 0) ;
  318. X  }
  319. X  
  320. X  
  321. X  void
  322. X! open_frame(wtype)
  323. X! enum win_type wtype ;
  324. X  {
  325. X!   Frame f ;
  326. X! 
  327. X!   if (wtype == W_MAIN) f = frame ;
  328. X!   else                 f = pframe ;
  329. X!   WINDOW_SET(f, WIN_SHOW, TRUE, 0) ;
  330. X  }
  331. X  
  332. X  
  333. X--- 397,440 ----
  334. X  
  335. X  
  336. X  void
  337. X! make_help_window(argc, argv)
  338. X! int argc ;
  339. X! char *argv[] ;
  340. X  {
  341. X!   int fontwidth ;
  342. X! 
  343. X!   hframe = window_create((Window) NULL,     FRAME,
  344. X!                           FRAME_ICON,       reve_icon,
  345. X!                           FRAME_LABEL,      "reve help",
  346. X!                           FRAME_NO_CONFIRM, TRUE,
  347. X!                           WIN_ERROR_MSG,    "Can't create window.",
  348. X!                           FRAME_ARGS,       argc, argv,
  349. X!                           0) ;
  350. X! 
  351. X!   fontwidth = font[(int) HFONT]->pf_defaultsize.x ;
  352. X!   help_height = ((hfont_height + 1) * HELP_ROWS) + (4 * CGAP) + CHEIGHT ;
  353. X!   help_width  = (fontwidth * HELP_COLS) + (2 * CGAP) ;
  354. X! 
  355. X!   hcanvas = window_create(hframe, CANVAS,
  356. X!                           CANVAS_RETAINED, FALSE,
  357. X!                           WIN_HEIGHT,      help_height,
  358. X!                           WIN_WIDTH,       help_width,
  359. X!                           WIN_CONSUME_PICK_EVENTS,
  360. X!                             MS_LEFT, MS_MIDDLE,
  361. X!                             0,
  362. X!                           WIN_CONSUME_KBD_EVENTS,
  363. X!                             KBD_USE, KBD_DONE, WIN_ASCII_EVENTS, WIN_UP_EVENTS,
  364. X!                             0,
  365. X!                           WIN_EVENT_PROC, canvas_proc,
  366. X!                           0) ;
  367. X!   hpw = (Pixwin *) window_get(hcanvas, CANVAS_PIXWIN) ;
  368. X  }
  369. X  
  370. X  
  371. X  void
  372. X! make_icon()
  373. X  {
  374. X!   reve_icon = icon_create(ICON_IMAGE, &icon_pr, 0) ;
  375. X  }
  376. X  
  377. X  
  378. X***************
  379. X*** 446,452 ****
  380. X      nextc = MOUSE_MOVING ;
  381. X    else if (id == WIN_REPAINT)
  382. X      {
  383. X!            if (curwin == W_MAIN) nextc = FRAME_REPAINT ;
  384. X        else if (curwin == W_PROPS) nextc = PROPS_REPAINT ;
  385. X      }
  386. X  }
  387. X--- 471,478 ----
  388. X      nextc = MOUSE_MOVING ;
  389. X    else if (id == WIN_REPAINT)
  390. X      {
  391. X!            if (curwin == W_MAIN)  nextc = FRAME_REPAINT ;
  392. X!       else if (curwin == W_HELP)  nextc = HELP_REPAINT ;
  393. X        else if (curwin == W_PROPS) nextc = PROPS_REPAINT ;
  394. X      }
  395. X  }
  396. X***************
  397. X*** 460,465 ****
  398. X--- 486,504 ----
  399. X  }
  400. X  
  401. X  
  402. X+ void
  403. X+ set_frame(wtype, showing)
  404. X+ enum win_type wtype ;
  405. X+ int showing ;
  406. X+ {
  407. X+   Frame f ;
  408. X+ 
  409. X+        if (wtype == W_HELP)  f = hframe ;
  410. X+   else if (wtype == W_PROPS) f = pframe ;
  411. X+   WINDOW_SET(f, WIN_SHOW, showing, 0) ;
  412. X+ }
  413. X+ 
  414. X+ 
  415. X  /*ARGSUSED*/
  416. X  void
  417. X  start_tool(dtype)      /* Display window and start the notifier. */
  418. X***************
  419. X*** 472,477 ****
  420. X--- 511,517 ----
  421. X        WINDOW_SET(frame, FRAME_ICON, reve_icon, 0) ;
  422. X      }
  423. X    window_fit(frame) ;
  424. X+   window_fit(hframe) ;
  425. X    window_fit(pframe) ;
  426. X    window_main_loop(frame) ;
  427. X  }
  428. X
  429. X------- tty.c -------
  430. X*** /tmp/da06714    Tue Dec 18 10:04:13 1990
  431. X--- tty.c    Sat Dec 15 19:42:20 1990
  432. X***************
  433. X*** 65,74 ****
  434. X        {  1,  1,  43,  32, },      /* Load */
  435. X        { 11,  1, 117,  32, },      /* Moves? */
  436. X        { 22,  1, 191,  32, },      /* New game */
  437. X!       { 33,  1, 265,  32, },      /* Save */
  438. X!       { 44,  1, 339,  32, },      /* Suggest */
  439. X!       { 55,  1, 413,  32, },      /* Undo */
  440. X!       { -1, -1,  43,  74, },      /* Props  (not displayed). */
  441. X        { -1, -1, 339,  74, },      /* Cancel (not displayed). */
  442. X        { -1, -1, 413,  74, },      /* Quit   (not displayed). */
  443. X        { 60,  5,  15, 111, },      /* Black: */
  444. X--- 65,78 ----
  445. X        {  1,  1,  43,  32, },      /* Load */
  446. X        { 11,  1, 117,  32, },      /* Moves? */
  447. X        { 22,  1, 191,  32, },      /* New game */
  448. X!       { -1, -1, 265,  32, },      /* Help   (not displayed). */
  449. X!       { -1, -1, 339,  32, },      /* Redo   (not displayed). */
  450. X!       { -1, -1, 413,  32, },      /* Props  (not displayed). */
  451. X!       { 33,  1,  43,  74, },      /* Save */
  452. X!       { 44,  1, 117,  74, },      /* Suggest */
  453. X!       { -1, -1, 191,  74, },      /* Edit   (not displayed). */
  454. X!       { -1, -1, 265,  74, },      /* Stop   (not displayed). */
  455. X!       { 55,  1, 339,  74, },      /* Undo */
  456. X        { -1, -1, 339,  74, },      /* Cancel (not displayed). */
  457. X        { -1, -1, 413,  74, },      /* Quit   (not displayed). */
  458. X        { 60,  5,  15, 111, },      /* Black: */
  459. X***************
  460. X*** 86,91 ****
  461. X--- 90,96 ----
  462. X        { -1, -1,  -1,  -1, },      /* Show evaluation option. */
  463. X        { -1, -1,  -1,  -1, },      /* Number move option. */
  464. X        { -1, -1,  -1,  -1, },      /* Quick game option. */
  465. X+       { -1, -1,  -1,  -1, },      /* Help window page cycle.*/
  466. X  } ;
  467. X  
  468. X  struct other_info {   /* Information needed to place other text values. */
  469. X***************
  470. X*** 97,106 ****
  471. X        { -1, -1, },       /* Load     (ignored). */
  472. X        { -1, -1, },       /* Moves?   (ignored). */
  473. X        { -1, -1, },       /* New game (ignored). */
  474. X        { -1, -1, },       /* Save     (ignored). */
  475. X        { -1, -1, },       /* Suggest  (ignored). */
  476. X        { -1, -1, },       /* Undo     (ignored). */
  477. X-       { -1, -1, },       /* Done     (ignored). */
  478. X        { -1, -1, },       /* Cancel   (ignored). */
  479. X        { -1, -1, },       /* Quit     (ignored). */
  480. X        { 38,  5, },       /* Black: */
  481. X--- 102,115 ----
  482. X        { -1, -1, },       /* Load     (ignored). */
  483. X        { -1, -1, },       /* Moves?   (ignored). */
  484. X        { -1, -1, },       /* New game (ignored). */
  485. X+       { -1, -1, },       /* Help     (ignored). */
  486. X+       { -1, -1, },       /* Redo     (ignored). */
  487. X+       { -1, -1, },       /* Props    (ignored). */
  488. X        { -1, -1, },       /* Save     (ignored). */
  489. X        { -1, -1, },       /* Suggest  (ignored). */
  490. X+       { -1, -1, },       /* Edit     (ignored). */
  491. X+       { -1, -1, },       /* Stop     (ignored). */
  492. X        { -1, -1, },       /* Undo     (ignored). */
  493. X        { -1, -1, },       /* Cancel   (ignored). */
  494. X        { -1, -1, },       /* Quit     (ignored). */
  495. X        { 38,  5, },       /* Black: */
  496. X***************
  497. X*** 118,123 ****
  498. X--- 127,133 ----
  499. X        { 60, 11, },       /* Show evaluation option. */
  500. X        { -1, -1, },       /* Number move option. */
  501. X        { -1, -1, },       /* Quick game option. */
  502. X+       { -1, -1, },       /* Help window page cycle. */
  503. X  } ;
  504. X  
  505. X  
  506. X***************
  507. X*** 135,145 ****
  508. X  {}
  509. X  
  510. X  
  511. X- void
  512. X- close_frame()           /* This option does nothing with termcap. */
  513. X- {}
  514. X- 
  515. X- 
  516. X  /*ARGSUSED*/
  517. X  void
  518. X  color_area(wtype, x, y, width, height, color)
  519. X--- 145,150 ----
  520. X***************
  521. X*** 532,550 ****
  522. X  }
  523. X  
  524. X  
  525. X- void
  526. X- make_icon()             /* Null routine - no icon in termcap version. */
  527. X- {}
  528. X- 
  529. X- 
  530. X  /*ARGSUSED*/
  531. X  void
  532. X! open_frame(wtype)
  533. X! enum win_type wtype ;
  534. X  {
  535. X  }
  536. X  
  537. X  
  538. X  static void
  539. X  outc(c)                 /* Output the next character to the screen. */
  540. X  register int c ;
  541. X--- 537,556 ----
  542. X  }
  543. X  
  544. X  
  545. X  /*ARGSUSED*/
  546. X  void
  547. X! make_help_window(argc, argv)
  548. X! int argc ;
  549. X! char *argv[] ;
  550. X  {
  551. X  }
  552. X  
  553. X  
  554. X+ void
  555. X+ make_icon()             /* Null routine - no icon in termcap version. */
  556. X+ {}
  557. X+ 
  558. X+ 
  559. X  static void
  560. X  outc(c)                 /* Output the next character to the screen. */
  561. X  register int c ;
  562. X***************
  563. X*** 575,580 ****
  564. X--- 581,594 ----
  565. X  void
  566. X  set_cursor(cursor)        /* No cursors in termcap version. */
  567. X  enum curtype cursor ;
  568. X+ {}
  569. X+ 
  570. X+ 
  571. X+ /*ARGSUSED*/
  572. X+ void
  573. X+ set_frame(wtype, showing)
  574. X+ enum win_type wtype ;
  575. X+ int showing ;
  576. X  {}
  577. X  
  578. X  
  579. X
  580. X------- x11.c -------
  581. X*** /tmp/da06717    Tue Dec 18 10:04:15 1990
  582. X--- x11.c    Mon Dec 17 10:26:26 1990
  583. X***************
  584. X*** 41,46 ****
  585. X--- 41,47 ----
  586. X  
  587. X  #define  BOLDFONT    "lucidasanstypewriter-bold-12"
  588. X  #define  DEFFONT     "fixed"
  589. X+ #define  HELPFONT    "lucidasanstypewriter-10"
  590. X  #define  NORMALFONT  "lucidasanstypewriter-12"
  591. X  
  592. X  #define  FRAME_MASK  (ButtonPressMask | ButtonReleaseMask | ExposureMask    | \
  593. X***************
  594. X*** 63,75 ****
  595. X  Pixmap images[MAXIMAGES] ;
  596. X  Pixmap no_pixmap ;
  597. X  Pixmap load_color_icon(), load_image(), reve_icon[MAXDPY] ;
  598. X! Window frame[MAXDPY], pframe[MAXDPY], root[MAXDPY] ;
  599. X  XClassHint class_hint = { "reve", "Reve" } ;
  600. X  XColor BGcolor, FGcolor ;
  601. X  XEvent event ;
  602. X  XFontStruct *font[MAXFONTS] ;
  603. X  XrmDatabase reve_DB[MAXDPY] ;   /* Combined resources database. */
  604. X! XSizeHints psize, size ;
  605. X  XWMHints wm_hints ;
  606. X  XGCValues gc_val ;              /* Used to setup graphics context values. */
  607. X  int gc_flags ;                  /* Used to set up graphics context flags. */
  608. X--- 64,76 ----
  609. X  Pixmap images[MAXIMAGES] ;
  610. X  Pixmap no_pixmap ;
  611. X  Pixmap load_color_icon(), load_image(), reve_icon[MAXDPY] ;
  612. X! Window frame[MAXDPY], hframe[MAXDPY], pframe[MAXDPY], root[MAXDPY] ;
  613. X  XClassHint class_hint = { "reve", "Reve" } ;
  614. X  XColor BGcolor, FGcolor ;
  615. X  XEvent event ;
  616. X  XFontStruct *font[MAXFONTS] ;
  617. X  XrmDatabase reve_DB[MAXDPY] ;   /* Combined resources database. */
  618. X! XSizeHints size ;
  619. X  XWMHints wm_hints ;
  620. X  XGCValues gc_val ;              /* Used to setup graphics context values. */
  621. X  int gc_flags ;                  /* Used to set up graphics context flags. */
  622. X***************
  623. X*** 78,84 ****
  624. X  unsigned long backgnd[MAXDPY] ; /* Default background color. */
  625. X  unsigned long foregnd[MAXDPY] ; /* Default foreground color. */
  626. X  unsigned long gc_mask ;         /* Mask for setting graphic context values. */
  627. X! unsigned long palette[OTH_COLORSIZE] ;     /* Xlib color palette. */
  628. X  
  629. X  #ifndef NOSELECT
  630. X  #ifdef NO_43SELECT
  631. X--- 79,85 ----
  632. X  unsigned long backgnd[MAXDPY] ; /* Default background color. */
  633. X  unsigned long foregnd[MAXDPY] ; /* Default foreground color. */
  634. X  unsigned long gc_mask ;         /* Mask for setting graphic context values. */
  635. X! unsigned long palette[REVE_COLORSIZE] ;     /* Xlib color palette. */
  636. X  
  637. X  #ifndef NOSELECT
  638. X  #ifdef NO_43SELECT
  639. X***************
  640. X*** 143,172 ****
  641. X  
  642. X  
  643. X  void
  644. X- close_frame(wtype)            /* Iconise reve window. */
  645. X- enum win_type wtype ;
  646. X- {
  647. X-   int d ;
  648. X-   XEvent event ;
  649. X-   Window window ;
  650. X- 
  651. X-   d = (int) cur_dpyno ;
  652. X-   if (wtype == W_MAIN) window = frame[d] ;
  653. X-   else                 window = pframe[d] ;
  654. X- 
  655. X-   iconic = 1 ;
  656. X-   event.xclient.type = ClientMessage ;
  657. X-   event.xclient.display = dpy[d] ;
  658. X-   event.xclient.window = window ;
  659. X-   event.xclient.message_type = XInternAtom(dpy[d], "WM_CHANGE_STATE", False) ;
  660. X-   event.xclient.format = 32 ;
  661. X-   event.xclient.data.l[0] = IconicState ;
  662. X-   XSendEvent(dpy[d], DefaultRootWindow(dpy[d]), False,
  663. X-               SubstructureRedirectMask | SubstructureNotifyMask, &event) ;
  664. X- }
  665. X- 
  666. X- 
  667. X- void
  668. X  color_area(wtype, x, y, width, height, color)
  669. X  enum win_type wtype ;
  670. X  int x, y, width, height, color ;
  671. X--- 144,149 ----
  672. X***************
  673. X*** 175,181 ****
  674. X    int d ;
  675. X  
  676. X    d = (int) cur_dpyno ;
  677. X!   window = (wtype == W_MAIN) ? frame[d] : pframe[d] ;
  678. X    if (iscolor[d]) gc_val.foreground = palette[color] ;
  679. X    else
  680. X      { 
  681. X--- 152,161 ----
  682. X    int d ;
  683. X  
  684. X    d = (int) cur_dpyno ;
  685. X!        if (wtype == W_MAIN)  window = frame[d] ;
  686. X!   else if (wtype == W_HELP)  window = hframe[d] ;
  687. X!   else if (wtype == W_PROPS) window = pframe[d] ;
  688. X! 
  689. X    if (iscolor[d]) gc_val.foreground = palette[color] ;
  690. X    else
  691. X      { 
  692. X***************
  693. X*** 206,212 ****
  694. X    int d ;
  695. X  
  696. X    d = (int) cur_dpyno ;
  697. X!   window = (wtype == W_MAIN) ? frame[d] : pframe[d] ;
  698. X    gc_mask = GCStipple | GCTileStipXOrigin | GCTileStipYOrigin ;
  699. X    gc_val.stipple = images[(int) image] ;
  700. X    gc_val.ts_x_origin = x ;
  701. X--- 186,195 ----
  702. X    int d ;
  703. X  
  704. X    d = (int) cur_dpyno ;
  705. X!        if (wtype == W_MAIN)  window = frame[d] ;
  706. X!   else if (wtype == W_HELP)  window = hframe[d] ;
  707. X!   else if (wtype == W_PROPS) window = pframe[d] ;
  708. X! 
  709. X    gc_mask = GCStipple | GCTileStipXOrigin | GCTileStipYOrigin ;
  710. X    gc_val.stipple = images[(int) image] ;
  711. X    gc_val.ts_x_origin = x ;
  712. X***************
  713. X*** 226,232 ****
  714. X    int d ;
  715. X  
  716. X    d = (int) cur_dpyno ;
  717. X!   window = (wtype == W_MAIN) ? frame[d] : pframe[d] ;
  718. X    if (iscolor[d]) gc_val.foreground = palette[color] ;
  719. X    else
  720. X      {
  721. X--- 209,218 ----
  722. X    int d ;
  723. X  
  724. X    d = (int) cur_dpyno ;
  725. X!        if (wtype == W_MAIN)  window = frame[d] ;
  726. X!   else if (wtype == W_HELP)  window = hframe[d] ;
  727. X!   else if (wtype == W_PROPS) window = pframe[d] ;
  728. X! 
  729. X    if (iscolor[d]) gc_val.foreground = palette[color] ;
  730. X    else
  731. X      {
  732. X***************
  733. X*** 250,256 ****
  734. X    int d ;
  735. X  
  736. X    d = (int) cur_dpyno ;
  737. X!   window = (wtype == W_MAIN) ? frame[d] : pframe[d] ;
  738. X    if (iscolor[d]) gc_val.foreground = palette[color] ;
  739. X    else            gc_val.foreground = foregnd[d] ;
  740. X    gc_val.function = opvals[(int) op] ;
  741. X--- 236,245 ----
  742. X    int d ;
  743. X  
  744. X    d = (int) cur_dpyno ;
  745. X!        if (wtype == W_MAIN)  window = frame[d] ;
  746. X!   else if (wtype == W_HELP)  window = hframe[d] ;
  747. X!   else if (wtype == W_PROPS) window = pframe[d] ;
  748. X! 
  749. X    if (iscolor[d]) gc_val.foreground = palette[color] ;
  750. X    else            gc_val.foreground = foregnd[d] ;
  751. X    gc_val.function = opvals[(int) op] ;
  752. X***************
  753. X*** 279,285 ****
  754. X    int d ;
  755. X  
  756. X    d = (int) cur_dpyno ;
  757. X!   window = (wtype == W_MAIN) ? frame[d] : pframe[d] ;
  758. X    if (iscolor[d]) gc_val.foreground = palette[color] ;
  759. X    else
  760. X      { 
  761. X--- 268,277 ----
  762. X    int d ;
  763. X  
  764. X    d = (int) cur_dpyno ;
  765. X!        if (wtype == W_MAIN)  window = frame[d] ;
  766. X!   else if (wtype == W_HELP)  window = hframe[d] ;
  767. X!   else if (wtype == W_PROPS) window = pframe[d] ;
  768. X! 
  769. X    if (iscolor[d]) gc_val.foreground = palette[color] ;
  770. X    else
  771. X      { 
  772. X***************
  773. X*** 377,385 ****
  774. X--- 369,380 ----
  775. X  init_fonts()             /* Open the normal and bold fonts. */
  776. X  {
  777. X    font[(int) BFONT] = get_font(BOLDFONT) ;
  778. X+   font[(int) HFONT] = get_font(HELPFONT) ;
  779. X    font[(int) NFONT] = get_font(NORMALFONT) ;
  780. X    bfont_height = font[(int) BFONT]->max_bounds.ascent +
  781. X                   font[(int) BFONT]->max_bounds.descent ;
  782. X+   hfont_height = font[(int) HFONT]->max_bounds.ascent +
  783. X+                  font[(int) HFONT]->max_bounds.descent ;
  784. X    nfont_height = font[(int) NFONT]->max_bounds.ascent +
  785. X                   font[(int) NFONT]->max_bounds.descent ;
  786. X  }
  787. X***************
  788. X*** 439,445 ****
  789. X  load_colors()     /* Create and load reve color map. */
  790. X  {
  791. X    XColor ccol ;
  792. X-   u_char red[OTH_COLORSIZE], green[OTH_COLORSIZE], blue[OTH_COLORSIZE] ;
  793. X    int d, i, numcolors ;
  794. X  
  795. X    d = (int) cur_dpyno ;
  796. X--- 434,439 ----
  797. X***************
  798. X*** 446,465 ****
  799. X    iscolor[d] = 0 ;
  800. X    if (DisplayCells(dpy[d], screen[d]) > 2)
  801. X      {
  802. X-       oth_colorsetup(red, green, blue) ;
  803. X        iscolor[d] = 1 ;
  804. X        numcolors = 0 ;
  805. X!       for (i = 0; i < OTH_COLORSIZE; i++)
  806. X          {
  807. X!           ccol.flags = DoRed | DoGreen | DoBlue ;
  808. X!           ccol.red   = (unsigned short) (red[i]   << 8) ;
  809. X!           ccol.green = (unsigned short) (green[i] << 8) ;
  810. X!           ccol.blue  = (unsigned short) (blue[i]  << 8) ;
  811. X            if (XAllocColor(dpy[d],
  812. X                DefaultColormap(dpy[d], screen[d]), &ccol) == True)
  813. X              palette[numcolors++] = ccol.pixel ;
  814. X          }
  815. X!       if (numcolors < 2)
  816. X          {
  817. X            FPRINTF(stderr, "%s: cannot allocate colors.\n", progname) ;
  818. X            exit(1) ;
  819. X--- 440,463 ----
  820. X    iscolor[d] = 0 ;
  821. X    if (DisplayCells(dpy[d], screen[d]) > 2)
  822. X      {
  823. X        iscolor[d] = 1 ;
  824. X        numcolors = 0 ;
  825. X!       for (i = 0; i < REVE_COLORSIZE; i++)
  826. X          {
  827. X!           if (colstr[i] == NULL ||
  828. X!               (XParseColor(dpy[d], DefaultColormap(dpy[d], screen[d]),
  829. X!                            colstr[i], &ccol) == 0))
  830. X!             {
  831. X!               ccol.flags = DoRed | DoGreen | DoBlue ;
  832. X!               ccol.red   = (unsigned short) (rcols[i] << 8) ;
  833. X!               ccol.green = (unsigned short) (gcols[i] << 8) ;
  834. X!               ccol.blue  = (unsigned short) (bcols[i] << 8) ;
  835. X!             }
  836. X            if (XAllocColor(dpy[d],
  837. X                DefaultColormap(dpy[d], screen[d]), &ccol) == True)
  838. X              palette[numcolors++] = ccol.pixel ;
  839. X          }
  840. X!       if (numcolors < REVE_COLORSIZE)
  841. X          {
  842. X            FPRINTF(stderr, "%s: cannot allocate colors.\n", progname) ;
  843. X            exit(1) ;
  844. X***************
  845. X*** 525,530 ****
  846. X--- 523,530 ----
  847. X   *
  848. X   *  XENVIRONMENT environment variable or, if not set, .Xdefaults-hostname
  849. X   *  file.
  850. X+  *
  851. X+  *  REVEDEFAULTS environment variable or, if not set, the ~/.reverc file.
  852. X   */
  853. X  
  854. X  void
  855. X***************
  856. X*** 570,575 ****
  857. X--- 570,587 ----
  858. X      }
  859. X    else db = XrmGetFileDatabase(ptr) ;
  860. X    XrmMergeDatabases(db, &reve_DB[d]) ;
  861. X+ 
  862. X+ /*  Finally merge in Reve defaults via REVEDEFAULTS or, if not defined, the
  863. X+  *  ~/.reverc file.
  864. X+  */
  865. X+ 
  866. X+   if ((ptr = getenv("REVEDEFAULTS")) == NULL)
  867. X+     {
  868. X+       SPRINTF(name, "%s/.reverc", home) ;
  869. X+       db = XrmGetFileDatabase(name) ;
  870. X+     }
  871. X+   else db = XrmGetFileDatabase(ptr) ;
  872. X+   XrmMergeDatabases(db, &reve_DB[d]) ;
  873. X  }
  874. X  
  875. X  
  876. X***************
  877. X*** 655,673 ****
  878. X  
  879. X  /*  Setup property window. */
  880. X  
  881. X!   psize.flags = PMinSize | PMaxSize | PPosition | PSize ;
  882. X!   psize.x = TOTAL_WIDTH + 10 ;
  883. X!   psize.y = 0 ;
  884. X!   psize.max_width = size.min_width = size.width = PROPS_WIDTH ;
  885. X!   psize.max_height = size.min_height = size.height = PROPS_HEIGHT ;
  886. X  
  887. X    pframe[d] = XCreateSimpleWindow(dpy[d], root[d],
  888. X!                                   size.x + TOTAL_WIDTH + 10, size.y,
  889. X!                                   PROPS_WIDTH, PROPS_HEIGHT,
  890. X                                    REVE_BORDER_WIDTH, foregnd[d], backgnd[d]) ;
  891. X  
  892. X    XSetStandardProperties(dpy[d], pframe[d], "reve properties",
  893. X!                          "Props", reve_icon[d], argv, argc, &psize) ;
  894. X  
  895. X  /* Create graphics contexts. */
  896. X  
  897. X--- 667,685 ----
  898. X  
  899. X  /*  Setup property window. */
  900. X  
  901. X!   size.flags = PMinSize | PMaxSize | PPosition | PSize ;
  902. X!   size.x = TOTAL_WIDTH + 10 ;
  903. X!   size.y = 0 ;
  904. X!   size.max_width = size.min_width = size.width = PROPS_WIDTH ;
  905. X!   size.max_height = size.min_height = size.height = PROPS_HEIGHT ;
  906. X  
  907. X    pframe[d] = XCreateSimpleWindow(dpy[d], root[d],
  908. X!                                   size.x, size.y,
  909. X!                                   size.max_width, size.max_height,
  910. X                                    REVE_BORDER_WIDTH, foregnd[d], backgnd[d]) ;
  911. X  
  912. X    XSetStandardProperties(dpy[d], pframe[d], "reve properties",
  913. X!                          "Props", reve_icon[d], argv, argc, &size) ;
  914. X  
  915. X  /* Create graphics contexts. */
  916. X  
  917. X***************
  918. X*** 682,691 ****
  919. X--- 694,733 ----
  920. X  
  921. X    stencilgc[d] = XCreateGC(dpy[d], root[d], gc_mask, &gc_val) ;
  922. X    XSetFillStyle(dpy[d], stencilgc[d], FillOpaqueStippled) ;
  923. X+   XSynchronize(dpy[d], TRUE) ;
  924. X  }
  925. X  
  926. X  
  927. X  void
  928. X+ make_help_window(argc, argv)
  929. X+ int argc ;
  930. X+ char *argv[] ;
  931. X+ {
  932. X+   int d, fontwidth ;
  933. X+ 
  934. X+   d = (int) cur_dpyno ;
  935. X+   fontwidth = font[(int) HFONT]->max_bounds.rbearing +
  936. X+               font[(int) HFONT]->min_bounds.lbearing ;
  937. X+   help_height = ((hfont_height + 1) * HELP_ROWS) + (4 * CGAP) + CHEIGHT ;
  938. X+   help_width  = (fontwidth * HELP_COLS) + (2 * CGAP) ;
  939. X+ 
  940. X+   size.flags = PMinSize | PMaxSize | PPosition | PSize ;
  941. X+   size.x = TOTAL_WIDTH + 10 ;
  942. X+   size.y = 0 ;
  943. X+   size.max_width  = size.min_width  = size.width  = help_width ;
  944. X+   size.max_height = size.min_height = size.height = help_height ;
  945. X+ 
  946. X+   hframe[d] = XCreateSimpleWindow(dpy[d], root[d],
  947. X+                                   size.x, size.y,
  948. X+                                   size.max_width, size.max_height,
  949. X+                                   REVE_BORDER_WIDTH, foregnd[d], backgnd[d]) ;
  950. X+ 
  951. X+   XSetStandardProperties(dpy[d], hframe[d], "reve help",
  952. X+                          "Help", reve_icon[d], argv, argc, &size) ;
  953. X+ }
  954. X+ 
  955. X+ 
  956. X+ void
  957. X  make_icon() {}        /* Null routine - icon created in make_frame. */
  958. X  
  959. X  
  960. X***************
  961. X*** 719,739 ****
  962. X  
  963. X  
  964. X  void
  965. X- open_frame(wtype)
  966. X- enum win_type wtype ;
  967. X- {
  968. X-   int d ;
  969. X-   Window window ;
  970. X- 
  971. X-   d = (int) cur_dpyno ;
  972. X-   if (wtype == W_MAIN) window = frame[d] ;
  973. X-   else                 window = pframe[d] ;
  974. X-   XSelectInput(dpy[0], window, FRAME_MASK) ;
  975. X-   XMapWindow(dpy[0], window) ;
  976. X- }
  977. X- 
  978. X- 
  979. X- void
  980. X  process_event()         /* Determine event type. */
  981. X  {
  982. X    XClientMessageEvent *ev ;
  983. X--- 761,766 ----
  984. X***************
  985. X*** 743,749 ****
  986. X    int d ;
  987. X  
  988. X    d = (int) cur_dpyno ; 
  989. X!        if (event.xany.window == frame[(int) cur_dpyno])  curwin = W_MAIN ;
  990. X    else if (event.xany.window == pframe[(int) cur_dpyno]) curwin = W_PROPS ;
  991. X  
  992. X    switch (event.type)
  993. X--- 770,777 ----
  994. X    int d ;
  995. X  
  996. X    d = (int) cur_dpyno ; 
  997. X!        if (event.xany.window ==  frame[(int) cur_dpyno]) curwin = W_MAIN ;
  998. X!   else if (event.xany.window == hframe[(int) cur_dpyno]) curwin = W_HELP ;
  999. X    else if (event.xany.window == pframe[(int) cur_dpyno]) curwin = W_PROPS ;
  1000. X  
  1001. X    switch (event.type)
  1002. X***************
  1003. X*** 807,812 ****
  1004. X--- 835,841 ----
  1005. X  {
  1006. X    int d ;
  1007. X    int doframe  = 0 ;
  1008. X+   int dohframe = 0 ;
  1009. X    int dopframe = 0 ;
  1010. X  
  1011. X    d = (int) cur_dpyno ;
  1012. X***************
  1013. X*** 814,819 ****
  1014. X--- 843,850 ----
  1015. X      {
  1016. X        if (event->count == 0 && event->window == frame[(int) cur_dpyno])
  1017. X          doframe++ ;
  1018. X+       if (event->count == 0 && event->window == hframe[(int) cur_dpyno])
  1019. X+         dohframe++ ;
  1020. X        if (event->count == 0 && event->window == pframe[(int) cur_dpyno])
  1021. X          dopframe++ ;
  1022. X      }
  1023. X***************
  1024. X*** 820,825 ****
  1025. X--- 851,857 ----
  1026. X    while (XCheckMaskEvent(dpy[d], ExposureMask, (XEvent *) event)) ;
  1027. X  
  1028. X         if (doframe)  return(FRAME_REPAINT) ;
  1029. X+   else if (dohframe) return(HELP_REPAINT) ;
  1030. X    else if (dopframe) return(PROPS_REPAINT) ;
  1031. X    else               return(IGNORE_EVENT) ;
  1032. X  }
  1033. X***************
  1034. X*** 838,847 ****
  1035. X  
  1036. X  
  1037. X  void
  1038. X  start_tool(dtype)            /* Start event dispatcher and display. */
  1039. X  enum disp_type dtype ;
  1040. X  {
  1041. X!   open_frame(W_MAIN) ;
  1042. X    XSelectInput(dpy[0], pframe[0], FRAME_MASK) ;
  1043. X  
  1044. X    if (dtype == XTWO)
  1045. X--- 870,898 ----
  1046. X  
  1047. X  
  1048. X  void
  1049. X+ set_frame(wtype, showing)
  1050. X+ enum win_type wtype ;
  1051. X+ int showing ;
  1052. X+ {
  1053. X+   Window window ;
  1054. X+   int d ;
  1055. X+ 
  1056. X+   d = (int) cur_dpyno ;
  1057. X+        if (wtype == W_HELP)  window = hframe[d] ;
  1058. X+   else if (wtype == W_PROPS) window = pframe[d] ;
  1059. X+ 
  1060. X+   if (showing) XMapWindow(dpy[d], window) ;
  1061. X+   else         XUnmapWindow(dpy[d], window) ;
  1062. X+ }
  1063. X+ 
  1064. X+ 
  1065. X+ void
  1066. X  start_tool(dtype)            /* Start event dispatcher and display. */
  1067. X  enum disp_type dtype ;
  1068. X  {
  1069. X!   XSelectInput(dpy[0], frame[0], FRAME_MASK) ;
  1070. X!   XMapWindow(dpy[0], frame[0]) ;
  1071. X!   XSelectInput(dpy[0], hframe[0], FRAME_MASK) ;
  1072. X    XSelectInput(dpy[0], pframe[0], FRAME_MASK) ;
  1073. X  
  1074. X    if (dtype == XTWO)
  1075. X***************
  1076. X*** 848,853 ****
  1077. X--- 899,905 ----
  1078. X      {
  1079. X        XSelectInput(dpy[1], frame[1], FRAME_MASK) ;
  1080. X        XMapWindow(dpy[1], frame[1]) ;
  1081. X+       XSelectInput(dpy[1], hframe[1], FRAME_MASK) ;
  1082. X        XSelectInput(dpy[1], pframe[1], FRAME_MASK) ;
  1083. X      }
  1084. X  
  1085. X
  1086. X------- xview.c -------
  1087. X*** /tmp/da06720    Tue Dec 18 10:04:16 1990
  1088. X--- xview.c    Sun Dec 16 11:57:06 1990
  1089. X***************
  1090. X*** 38,43 ****
  1091. X--- 38,44 ----
  1092. X  #include <xview/cms.h>
  1093. X  #include <xview/cursor.h>
  1094. X  #include <xview/svrimage.h>
  1095. X+ #include <xview/textsw.h>
  1096. X  #include <xview/xv_xrect.h>
  1097. X  #include <X11/Xlib.h>
  1098. X  #include <X11/Xresource.h>
  1099. X***************
  1100. X*** 46,52 ****
  1101. X  
  1102. X  enum gr_type gtype = GXVIEW ;          /* Graphics type. */
  1103. X  
  1104. X! enum popup_pos {P_BELOW, P_RIGHT } ;   /* Positions relative to main frame. */
  1105. X  
  1106. X  #define  CLIENT_NO          10
  1107. X  #define  DEPTH_MENU_ENTRY   9
  1108. X--- 47,53 ----
  1109. X  
  1110. X  enum gr_type gtype = GXVIEW ;          /* Graphics type. */
  1111. X  
  1112. X! enum popup_pos { P_BELOW, P_RIGHT } ;  /* Positions relative to main frame. */
  1113. X  
  1114. X  #define  CLIENT_NO          10
  1115. X  #define  DEPTH_MENU_ENTRY   9
  1116. X***************
  1117. X*** 59,64 ****
  1118. X--- 60,66 ----
  1119. X  
  1120. X  #define  BOLDFONT           "lucidasanstypewriter-bold-12"
  1121. X  #define  DEFFONT            "fixed"
  1122. X+ #define  HELPFONT           "lucidasanstypewriter-12"
  1123. X  #define  NORMALFONT         "lucidasanstypewriter-12"
  1124. X  
  1125. X  Canvas canvas ;
  1126. X***************
  1127. X*** 71,76 ****
  1128. X--- 73,81 ----
  1129. X  
  1130. X  Notify_client client = (Notify_client) CLIENT_NO ;
  1131. X  
  1132. X+ Frame  h_frame ;                /* Help window frame. */
  1133. X+ Textsw h_textsw ;               /* Text sub-window for help file. */
  1134. X+ 
  1135. X  Frame ls_frame ;                /* Frame for load/save pop-up window. */
  1136. X  Panel ls_panel ;                /* Panel for load/save operations. */
  1137. X  Panel_item ls_button ;          /* Button to start load/save operation. */
  1138. X***************
  1139. X*** 111,117 ****
  1140. X  unsigned long backgnd ;         /* Default background color. */
  1141. X  unsigned long foregnd ;         /* Default foreground color. */
  1142. X  unsigned long gc_mask ;         /* Mask for setting graphic context values. */
  1143. X! unsigned long palette[OTH_COLORSIZE] ;     /* Xlib color palette. */
  1144. X  
  1145. X  int opvals[3] ;         /* Pixrect rasterop values. */
  1146. X  int pid ;               /* Process id of the reve_proc process. */
  1147. X--- 116,122 ----
  1148. X  unsigned long backgnd ;         /* Default background color. */
  1149. X  unsigned long foregnd ;         /* Default foreground color. */
  1150. X  unsigned long gc_mask ;         /* Mask for setting graphic context values. */
  1151. X! unsigned long palette[REVE_COLORSIZE] ;     /* Xlib color palette. */
  1152. X  
  1153. X  int opvals[3] ;         /* Pixrect rasterop values. */
  1154. X  int pid ;               /* Process id of the reve_proc process. */
  1155. X***************
  1156. X*** 121,128 ****
  1157. X  
  1158. X  Notify_value read_from_reve(), sigchldcatcher() ;
  1159. X  void destroy_frame() ;
  1160. X! static void menu_proc(),    set_depth(),   set_player() ;
  1161. X! static void xv_load_game(), xv_new_game(), xv_save_game(), xv_set_props() ;
  1162. X  
  1163. X  
  1164. X  void
  1165. X--- 126,134 ----
  1166. X  
  1167. X  Notify_value read_from_reve(), sigchldcatcher() ;
  1168. X  void destroy_frame() ;
  1169. X! static void menu_proc(),    set_depth(),    set_player() ;
  1170. X! static void xv_do_help(),   xv_load_game(), xv_new_game() ;
  1171. X! static void xv_save_game(), xv_set_props() ;
  1172. X  
  1173. X  
  1174. X  void
  1175. X***************
  1176. X*** 158,170 ****
  1177. X  }
  1178. X  
  1179. X  
  1180. X- void
  1181. X- close_frame()        /* Iconise reve window. */
  1182. X- {
  1183. X-   XV_SET(frame, FRAME_CLOSED, TRUE, 0) ;
  1184. X- }
  1185. X- 
  1186. X- 
  1187. X  /*ARGSUSED*/
  1188. X  void
  1189. X  color_area(wtype, x, y, width, height, color)
  1190. X--- 164,169 ----
  1191. X***************
  1192. X*** 427,435 ****
  1193. X--- 426,437 ----
  1194. X  init_fonts()         /* Open the normal and bold fonts. */
  1195. X  {
  1196. X    font[(int) BFONT] = get_font(BOLDFONT) ;
  1197. X+   font[(int) HFONT] = get_font(HELPFONT) ;
  1198. X    font[(int) NFONT] = get_font(NORMALFONT) ;
  1199. X    bfont_height = font[(int) BFONT]->max_bounds.ascent +
  1200. X                   font[(int) BFONT]->max_bounds.descent ;
  1201. X+   hfont_height = font[(int) HFONT]->max_bounds.ascent +
  1202. X+                  font[(int) HFONT]->max_bounds.descent ;
  1203. X    nfont_height = font[(int) NFONT]->max_bounds.ascent +
  1204. X                   font[(int) NFONT]->max_bounds.descent ;
  1205. X  }
  1206. X***************
  1207. X*** 460,482 ****
  1208. X  load_colors()      /* Create and load reve color map. */
  1209. X  {
  1210. X    XColor ccol ;
  1211. X-   u_char red[OTH_COLORSIZE], green[OTH_COLORSIZE], blue[OTH_COLORSIZE] ;
  1212. X    int i, numcolors ;
  1213. X  
  1214. X    if (iscolor[(int) cur_dpyno])
  1215. X      {
  1216. X-       oth_colorsetup(red, green, blue) ;
  1217. X        numcolors = 0 ;
  1218. X!       for (i = 0; i < OTH_COLORSIZE; i++)
  1219. X          {
  1220. X!           ccol.flags = DoRed | DoGreen | DoBlue ;
  1221. X!           ccol.red = (unsigned short) (red[i] << 8) ;
  1222. X!           ccol.green = (unsigned short) (green[i] << 8) ;
  1223. X!           ccol.blue = (unsigned short) (blue[i] << 8) ;
  1224. X            if (XAllocColor(dpy, DefaultColormap(dpy, screen), &ccol) == True)
  1225. X              palette[numcolors++] = ccol.pixel ;
  1226. X          }
  1227. X!       if (numcolors < 2)
  1228. X          {
  1229. X            FPRINTF(stderr, "%s: cannot allocate colors.\n", progname) ;
  1230. X            exit(1) ;
  1231. X--- 462,487 ----
  1232. X  load_colors()      /* Create and load reve color map. */
  1233. X  {
  1234. X    XColor ccol ;
  1235. X    int i, numcolors ;
  1236. X  
  1237. X    if (iscolor[(int) cur_dpyno])
  1238. X      {
  1239. X        numcolors = 0 ;
  1240. X!       for (i = 0; i < REVE_COLORSIZE; i++)
  1241. X          {
  1242. X!           if (colstr[i] == NULL ||
  1243. X!               (XParseColor(dpy, DefaultColormap(dpy, screen),
  1244. X!                            colstr[i], &ccol) == 0)) 
  1245. X!             {
  1246. X!               ccol.flags = DoRed | DoGreen | DoBlue ;
  1247. X!               ccol.red   = (unsigned short) (rcols[i] << 8) ;
  1248. X!               ccol.green = (unsigned short) (gcols[i] << 8) ;
  1249. X!               ccol.blue  = (unsigned short) (bcols[i] << 8) ;
  1250. X!             }
  1251. X            if (XAllocColor(dpy, DefaultColormap(dpy, screen), &ccol) == True)
  1252. X              palette[numcolors++] = ccol.pixel ;
  1253. X          }
  1254. X!       if (numcolors < REVE_COLORSIZE)
  1255. X          {
  1256. X            FPRINTF(stderr, "%s: cannot allocate colors.\n", progname) ;
  1257. X            exit(1) ;
  1258. X***************
  1259. X*** 498,503 ****
  1260. X--- 503,510 ----
  1261. X   *
  1262. X   *  XENVIRONMENT environment variable or, if not set, .Xdefaults-hostname
  1263. X   *  file.
  1264. X+  *
  1265. X+  *  REVEDEFAULTS environment variable or, if not set, the ~/.reverc file.
  1266. X   */
  1267. X   
  1268. X  void
  1269. X***************
  1270. X*** 541,546 ****
  1271. X--- 548,565 ----
  1272. X      }
  1273. X    else db = XrmGetFileDatabase(ptr) ;
  1274. X    XrmMergeDatabases(db, &reve_DB[d]) ;
  1275. X+ 
  1276. X+ /*  Finally merge in Reve defaults via REVEDEFAULTS or, if not defined, the
  1277. X+  *  ~/.reverc file.
  1278. X+  */
  1279. X+   
  1280. X+   if ((ptr = getenv("REVEDEFAULTS")) == NULL)
  1281. X+     {
  1282. X+       SPRINTF(name, "%s/.reverc", home) ;
  1283. X+       db = XrmGetFileDatabase(name) ;
  1284. X+     }
  1285. X+   else db = XrmGetFileDatabase(ptr) ;
  1286. X+   XrmMergeDatabases(db, &reve_DB[d]) ;
  1287. X  }
  1288. X  
  1289. X  
  1290. X***************
  1291. X*** 652,659 ****
  1292. X    XV_CREATE(panel,              PANEL_BUTTON,
  1293. X              PANEL_ITEM_X,       xv_col(panel, 0),
  1294. X              PANEL_ITEM_Y,       xv_row(panel, 0),
  1295. X!             PANEL_LABEL_STRING, "Load Game...",
  1296. X!             PANEL_NOTIFY_PROC,  xv_load_game,
  1297. X              0) ;
  1298. X  
  1299. X    XV_CREATE(panel,              PANEL_BUTTON,
  1300. X--- 671,678 ----
  1301. X    XV_CREATE(panel,              PANEL_BUTTON,
  1302. X              PANEL_ITEM_X,       xv_col(panel, 0),
  1303. X              PANEL_ITEM_Y,       xv_row(panel, 0),
  1304. X!             PANEL_NOTIFY_PROC,  xv_new_game,
  1305. X!             PANEL_LABEL_STRING, " New Game ",
  1306. X              0) ;
  1307. X  
  1308. X    XV_CREATE(panel,              PANEL_BUTTON,
  1309. X***************
  1310. X*** 666,687 ****
  1311. X    XV_CREATE(panel,              PANEL_BUTTON,
  1312. X              PANEL_ITEM_X,       xv_col(panel, 30),
  1313. X              PANEL_ITEM_Y,       xv_row(panel, 0),
  1314. X!             PANEL_NOTIFY_PROC,  xv_new_game,
  1315. X!             PANEL_LABEL_STRING, " New Game ",
  1316. X              0) ;
  1317. X  
  1318. X    XV_CREATE(panel,              PANEL_BUTTON,
  1319. X              PANEL_ITEM_X,       xv_col(panel, 45),
  1320. X              PANEL_ITEM_Y,       xv_row(panel, 0),
  1321. X!             PANEL_LABEL_STRING, "   Props...   ",
  1322. X!             PANEL_NOTIFY_PROC,  xv_set_props,
  1323. X              0) ;
  1324. X  
  1325. X    XV_CREATE(panel,              PANEL_BUTTON,
  1326. X              PANEL_ITEM_X,       xv_col(panel, 0),
  1327. X              PANEL_ITEM_Y,       xv_row(panel, 1),
  1328. X!             PANEL_LABEL_STRING, "Save Game...",
  1329. X!             PANEL_NOTIFY_PROC,  xv_save_game,
  1330. X              0) ;
  1331. X  
  1332. X    XV_CREATE(panel,              PANEL_BUTTON,
  1333. X--- 685,706 ----
  1334. X    XV_CREATE(panel,              PANEL_BUTTON,
  1335. X              PANEL_ITEM_X,       xv_col(panel, 30),
  1336. X              PANEL_ITEM_Y,       xv_row(panel, 0),
  1337. X!             PANEL_LABEL_STRING, "     Redo     ",
  1338. X!             PANEL_NOTIFY_PROC,  redo,
  1339. X              0) ;
  1340. X  
  1341. X    XV_CREATE(panel,              PANEL_BUTTON,
  1342. X              PANEL_ITEM_X,       xv_col(panel, 45),
  1343. X              PANEL_ITEM_Y,       xv_row(panel, 0),
  1344. X!             PANEL_LABEL_STRING, "   Help...    ",
  1345. X!             PANEL_NOTIFY_PROC,  xv_do_help,
  1346. X              0) ;
  1347. X  
  1348. X    XV_CREATE(panel,              PANEL_BUTTON,
  1349. X              PANEL_ITEM_X,       xv_col(panel, 0),
  1350. X              PANEL_ITEM_Y,       xv_row(panel, 1),
  1351. X!             PANEL_LABEL_STRING, "Load Game...",
  1352. X!             PANEL_NOTIFY_PROC,  xv_load_game,
  1353. X              0) ;
  1354. X  
  1355. X    XV_CREATE(panel,              PANEL_BUTTON,
  1356. X***************
  1357. X*** 689,695 ****
  1358. X              PANEL_ITEM_Y,       xv_row(panel, 1),
  1359. X              PANEL_LABEL_STRING, "   Suggest   ",
  1360. X              PANEL_NOTIFY_PROC,  suggest,
  1361. X!             0) ;        
  1362. X  
  1363. X    XV_CREATE(panel,              PANEL_BUTTON,
  1364. X              PANEL_ITEM_X,       xv_col(panel, 30),
  1365. X--- 708,714 ----
  1366. X              PANEL_ITEM_Y,       xv_row(panel, 1),
  1367. X              PANEL_LABEL_STRING, "   Suggest   ",
  1368. X              PANEL_NOTIFY_PROC,  suggest,
  1369. X!             0) ;
  1370. X  
  1371. X    XV_CREATE(panel,              PANEL_BUTTON,
  1372. X              PANEL_ITEM_X,       xv_col(panel, 30),
  1373. X***************
  1374. X*** 696,706 ****
  1375. X              PANEL_ITEM_Y,       xv_row(panel, 1),
  1376. X              PANEL_LABEL_STRING, "     Undo     ",
  1377. X              PANEL_NOTIFY_PROC,  undo,
  1378. X!             0) ;        
  1379. X  
  1380. X    XV_CREATE(panel,              PANEL_BUTTON,
  1381. X              PANEL_ITEM_X,       xv_col(panel, 45),
  1382. X              PANEL_ITEM_Y,       xv_row(panel, 1),
  1383. X              PANEL_LABEL_STRING, "     Quit     ",
  1384. X              PANEL_NOTIFY_PROC,  destroy_frame,
  1385. X              0) ;
  1386. X--- 715,739 ----
  1387. X              PANEL_ITEM_Y,       xv_row(panel, 1),
  1388. X              PANEL_LABEL_STRING, "     Undo     ",
  1389. X              PANEL_NOTIFY_PROC,  undo,
  1390. X!             0) ;
  1391. X  
  1392. X    XV_CREATE(panel,              PANEL_BUTTON,
  1393. X              PANEL_ITEM_X,       xv_col(panel, 45),
  1394. X              PANEL_ITEM_Y,       xv_row(panel, 1),
  1395. X+             PANEL_LABEL_STRING, "   Props...   ",
  1396. X+             PANEL_NOTIFY_PROC,  xv_set_props,
  1397. X+             0) ;
  1398. X+ 
  1399. X+   XV_CREATE(panel,              PANEL_BUTTON,
  1400. X+             PANEL_ITEM_X,       xv_col(panel, 0),
  1401. X+             PANEL_ITEM_Y,       xv_row(panel, 2),
  1402. X+             PANEL_LABEL_STRING, "Save Game...",
  1403. X+             PANEL_NOTIFY_PROC,  xv_save_game,
  1404. X+             0) ;
  1405. X+ 
  1406. X+   XV_CREATE(panel,              PANEL_BUTTON,
  1407. X+             PANEL_ITEM_X,       xv_col(panel, 45),
  1408. X+             PANEL_ITEM_Y,       xv_row(panel, 2),
  1409. X              PANEL_LABEL_STRING, "     Quit     ",
  1410. X              PANEL_NOTIFY_PROC,  destroy_frame,
  1411. X              0) ;
  1412. X***************
  1413. X*** 707,713 ****
  1414. X  
  1415. X    XV_CREATE(panel, PANEL_MESSAGE,
  1416. X              PANEL_ITEM_X,       xv_col(panel, 0),
  1417. X!             PANEL_ITEM_Y,       xv_row(panel, 2),
  1418. X              PANEL_LABEL_BOLD,   TRUE,
  1419. X              PANEL_LABEL_STRING, "Black:",
  1420. X              0) ;
  1421. X--- 740,746 ----
  1422. X  
  1423. X    XV_CREATE(panel, PANEL_MESSAGE,
  1424. X              PANEL_ITEM_X,       xv_col(panel, 0),
  1425. X!             PANEL_ITEM_Y,       xv_row(panel, 3),
  1426. X              PANEL_LABEL_BOLD,   TRUE,
  1427. X              PANEL_LABEL_STRING, "Black:",
  1428. X              0) ;
  1429. X***************
  1430. X*** 714,720 ****
  1431. X    val = items[(int) BLACK_PLAYS].value ;
  1432. X    black_item = xv_create(panel,                      PANEL_MESSAGE,
  1433. X                           PANEL_ITEM_X,               xv_col(panel, 7),
  1434. X!                          PANEL_ITEM_Y,               xv_row(panel, 2),
  1435. X                           PANEL_LABEL_BOLD,           FALSE,
  1436. X                           PANEL_LABEL_STRING,         player_values[val],
  1437. X                           0) ;
  1438. X--- 747,753 ----
  1439. X    val = items[(int) BLACK_PLAYS].value ;
  1440. X    black_item = xv_create(panel,                      PANEL_MESSAGE,
  1441. X                           PANEL_ITEM_X,               xv_col(panel, 7),
  1442. X!                          PANEL_ITEM_Y,               xv_row(panel, 3),
  1443. X                           PANEL_LABEL_BOLD,           FALSE,
  1444. X                           PANEL_LABEL_STRING,         player_values[val],
  1445. X                           0) ;
  1446. X***************
  1447. X*** 721,727 ****
  1448. X  
  1449. X    XV_CREATE(panel, PANEL_MESSAGE,
  1450. X              PANEL_ITEM_X,       xv_col(panel, 30),
  1451. X!             PANEL_ITEM_Y,       xv_row(panel, 2),
  1452. X              PANEL_LABEL_BOLD,   TRUE,
  1453. X              PANEL_LABEL_STRING, "White:",
  1454. X              0) ;
  1455. X--- 754,760 ----
  1456. X  
  1457. X    XV_CREATE(panel, PANEL_MESSAGE,
  1458. X              PANEL_ITEM_X,       xv_col(panel, 30),
  1459. X!             PANEL_ITEM_Y,       xv_row(panel, 3),
  1460. X              PANEL_LABEL_BOLD,   TRUE,
  1461. X              PANEL_LABEL_STRING, "White:",
  1462. X              0) ;
  1463. X***************
  1464. X*** 728,734 ****
  1465. X    val = items[(int) WHITE_PLAYS].value ;
  1466. X    white_item = xv_create(panel,                      PANEL_MESSAGE,
  1467. X                           PANEL_ITEM_X,               xv_col(panel, 37),
  1468. X!                          PANEL_ITEM_Y,               xv_row(panel, 2),
  1469. X                           PANEL_LABEL_BOLD,           FALSE,
  1470. X                           PANEL_LABEL_STRING,         player_values[val],
  1471. X                           0) ;
  1472. X--- 761,767 ----
  1473. X    val = items[(int) WHITE_PLAYS].value ;
  1474. X    white_item = xv_create(panel,                      PANEL_MESSAGE,
  1475. X                           PANEL_ITEM_X,               xv_col(panel, 37),
  1476. X!                          PANEL_ITEM_Y,               xv_row(panel, 3),
  1477. X                           PANEL_LABEL_BOLD,           FALSE,
  1478. X                           PANEL_LABEL_STRING,         player_values[val],
  1479. X                           0) ;
  1480. X***************
  1481. X*** 735,759 ****
  1482. X  
  1483. X    mes_items[(int) (PANEL_MES - PANEL_MES)] = xv_create(panel, PANEL_MESSAGE,
  1484. X                         PANEL_ITEM_X,       xv_col(panel, 0),
  1485. X!                        PANEL_ITEM_Y,       xv_row(panel, 3),
  1486. X                         PANEL_LABEL_STRING, "",
  1487. X                         0) ;
  1488. X  
  1489. X    mes_items[(int) (EVAL_MES - PANEL_MES)] = xv_create(panel, PANEL_MESSAGE,
  1490. X                         PANEL_ITEM_X,       xv_col(panel, 0),
  1491. X!                        PANEL_ITEM_Y,       xv_row(panel, 4),
  1492. X                         PANEL_LABEL_STRING, "",
  1493. X                         0) ;
  1494. X  
  1495. X    mes_items[(int) (SCORE_MES - PANEL_MES)] = xv_create(panel, PANEL_MESSAGE,
  1496. X                         PANEL_ITEM_X,       xv_col(panel, 0),
  1497. X!                        PANEL_ITEM_Y,       xv_row(panel, 5),
  1498. X                         PANEL_LABEL_STRING, "",
  1499. X                         0) ;
  1500. X  
  1501. X    mes_items[(int) (TURN_MES - PANEL_MES)] = xv_create(panel, PANEL_MESSAGE,
  1502. X                         PANEL_ITEM_X,       xv_col(panel, 30),
  1503. X!                        PANEL_ITEM_Y,       xv_row(panel, 5),
  1504. X                         PANEL_LABEL_STRING, "Black to move",
  1505. X                         0) ;
  1506. X    window_fit(panel) ;
  1507. X--- 768,792 ----
  1508. X  
  1509. X    mes_items[(int) (PANEL_MES - PANEL_MES)] = xv_create(panel, PANEL_MESSAGE,
  1510. X                         PANEL_ITEM_X,       xv_col(panel, 0),
  1511. X!                        PANEL_ITEM_Y,       xv_row(panel, 4),
  1512. X                         PANEL_LABEL_STRING, "",
  1513. X                         0) ;
  1514. X  
  1515. X    mes_items[(int) (EVAL_MES - PANEL_MES)] = xv_create(panel, PANEL_MESSAGE,
  1516. X                         PANEL_ITEM_X,       xv_col(panel, 0),
  1517. X!                        PANEL_ITEM_Y,       xv_row(panel, 5),
  1518. X                         PANEL_LABEL_STRING, "",
  1519. X                         0) ;
  1520. X  
  1521. X    mes_items[(int) (SCORE_MES - PANEL_MES)] = xv_create(panel, PANEL_MESSAGE,
  1522. X                         PANEL_ITEM_X,       xv_col(panel, 0),
  1523. X!                        PANEL_ITEM_Y,       xv_row(panel, 6),
  1524. X                         PANEL_LABEL_STRING, "",
  1525. X                         0) ;
  1526. X  
  1527. X    mes_items[(int) (TURN_MES - PANEL_MES)] = xv_create(panel, PANEL_MESSAGE,
  1528. X                         PANEL_ITEM_X,       xv_col(panel, 30),
  1529. X!                        PANEL_ITEM_Y,       xv_row(panel, 6),
  1530. X                         PANEL_LABEL_STRING, "Black to move",
  1531. X                         0) ;
  1532. X    window_fit(panel) ;
  1533. X***************
  1534. X*** 905,911 ****
  1535. X--- 938,977 ----
  1536. X  }
  1537. X  
  1538. X  
  1539. X+ /*ARGSUSED*/
  1540. X  void
  1541. X+ make_help_window(argc, argv)
  1542. X+ int argc ;
  1543. X+ char *argv[] ;
  1544. X+ {
  1545. X+   h_frame = (Frame) xv_create(frame,                    FRAME_CMD,
  1546. X+                               FRAME_ICON,               reve_icon,
  1547. X+                               FRAME_LABEL,              "Reve Help",
  1548. X+                               FRAME_CMD_PUSHPIN_IN,     TRUE,
  1549. X+                               FRAME_NO_CONFIRM,         TRUE,
  1550. X+                               XV_X,                     0,
  1551. X+                               XV_Y,                     0,
  1552. X+                               XV_WIDTH,                 500,
  1553. X+                               XV_HEIGHT,                700,
  1554. X+                               XV_SHOW,                  help_showing,
  1555. X+                               FRAME_SHOW_RESIZE_CORNER, FALSE,
  1556. X+                               0) ;
  1557. X+   h_textsw = (Textsw) xv_create(h_frame,                 TEXTSW,
  1558. X+                                 XV_X,                    0,
  1559. X+                                 XV_Y,                    0,
  1560. X+                                 XV_WIDTH,                500,
  1561. X+                                 XV_HEIGHT,               700,
  1562. X+                                 TEXTSW_FILE_CONTENTS,    helpfile,
  1563. X+                                 TEXTSW_READ_ONLY,        TRUE,
  1564. X+                                 TEXTSW_FIRST,            0,
  1565. X+                                 TEXTSW_BROWSING,         TRUE,
  1566. X+                                 0) ;
  1567. X+   window_fit(h_textsw) ;
  1568. X+   window_fit(h_frame) ;
  1569. X+ }
  1570. X+ 
  1571. X+ 
  1572. X+ void
  1573. X  make_icon()
  1574. X  {
  1575. X  
  1576. X***************
  1577. X*** 973,985 ****
  1578. X  
  1579. X  
  1580. X  void
  1581. X! open_frame(wtype)                    /* **DUMMY ROUTINE** */
  1582. X! enum win_type wtype ;
  1583. X  {
  1584. X  }
  1585. X  
  1586. X  
  1587. X  void
  1588. X  paint_prop_sheet()            /* **DUMMY ROUTINE** */
  1589. X  {
  1590. X  }
  1591. X--- 1039,1056 ----
  1592. X  
  1593. X  
  1594. X  void
  1595. X! paint_help()                  /* **DUMMY ROUTINE** */
  1596. X  {
  1597. X  }
  1598. X  
  1599. X  
  1600. X  void
  1601. X+ paint_help_text()             /* **DUMMY ROUTINE** */
  1602. X+ {
  1603. X+ }
  1604. X+ 
  1605. X+ 
  1606. X+ void
  1607. X  paint_prop_sheet()            /* **DUMMY ROUTINE** */
  1608. X  {
  1609. X  }
  1610. X***************
  1611. X*** 1160,1165 ****
  1612. X--- 1231,1245 ----
  1613. X  
  1614. X  /*ARGSUSED*/
  1615. X  void
  1616. X+ set_frame(wtype, showing)                       /* **DUMMY ROUTINE** */
  1617. X+ enum win_type wtype ;
  1618. X+ int showing ;
  1619. X+ {
  1620. X+ }
  1621. X+ 
  1622. X+ 
  1623. X+ /*ARGSUSED*/
  1624. X+ void
  1625. X  set_cycle(wtype, mtype, str)                    /* **DUMMY ROUTINE** */
  1626. X  enum win_type wtype ;
  1627. X  enum panel_type mtype ;
  1628. X***************
  1629. X*** 1326,1331 ****
  1630. X--- 1406,1423 ----
  1631. X    reve_player = player ;
  1632. X    processing  = TRUE ;
  1633. X    WRITE(pipe_io[0][1], (char *) &in, sizeof(struct reve_in)) ;
  1634. X+ }
  1635. X+ 
  1636. X+ 
  1637. X+ /*ARGSUSED*/
  1638. X+ static void
  1639. X+ xv_do_help(item, value, event)    /* Callback for online help window. */
  1640. X+ Panel_item item ;
  1641. X+ int value ;
  1642. X+ Event *event ;
  1643. X+ {
  1644. X+   position_popup(frame, h_frame, P_RIGHT) ;
  1645. X+   XV_SET(h_frame, XV_SHOW, TRUE, 0) ;
  1646. X  }
  1647. X  
  1648. X  
  1649. X
  1650. END_OF_FILE
  1651. if test 49681 -ne `wc -c <'patches04b'`; then
  1652.     echo shar: \"'patches04b'\" unpacked with wrong size!
  1653. fi
  1654. # end of 'patches04b'
  1655. fi
  1656. echo shar: End of archive 2 \(of 4\).
  1657. cp /dev/null ark2isdone
  1658. MISSING=""
  1659. for I in 1 2 3 4 ; do
  1660.     if test ! -f ark${I}isdone ; then
  1661.     MISSING="${MISSING} ${I}"
  1662.     fi
  1663. done
  1664. if test "${MISSING}" = "" ; then
  1665.     echo You have unpacked all 4 archives.
  1666.     rm -f ark[1-9]isdone
  1667. else
  1668.     echo You still need to unpack the following archives:
  1669.     echo "        " ${MISSING}
  1670. fi
  1671. ##  End of shell archive.
  1672. exit 0
  1673.