home *** CD-ROM | disk | FTP | other *** search
/ Giga Games 1 / Giga Games.iso / net / usenet / volume11 / reve / patch3f < prev    next >
Encoding:
Internet Message Format  |  1991-01-03  |  49.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: v12i006:  reve - an othello game, Patch3f
  5. Message-ID: <6764@tekred.CNA.TEK.COM>
  6. Date: 21 Dec 90 20:51:44 GMT
  7. Sender: news@tekred.CNA.TEK.COM
  8. Lines: 1467
  9. Approved: billr@saab.CNA.TEK.COM
  10.  
  11. Submitted-by: Rich Burridge <rburridge@sun.COM>
  12. Posting-number: Volume 12, Issue 6
  13. Archive-name: reve/Patch3f
  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 6 (of 9)."
  26. # Contents:  patches03c
  27. # Wrapped by billr@saab on Fri Dec 21 11:27:26 1990
  28. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  29. if test -f 'patches03c' -a "${1}" != "-c" ; then 
  30.   echo shar: Will not clobber existing file \"'patches03c'\"
  31. else
  32. echo shar: Extracting \"'patches03c'\" \(47790 characters\)
  33. sed "s/^X//" >'patches03c' <<'END_OF_FILE'
  34. X
  35. X------- main.c -------
  36. X*** /tmp/da07594    Sun Dec  9 15:14:38 1990
  37. X--- main.c    Sat Dec  8 19:41:09 1990
  38. X***************
  39. X*** 25,37 ****
  40. X  #include "reve.h"
  41. X  #include "color.h"
  42. X  #include "patchlevel.h"
  43. X! #ifdef SYSV
  44. X! #include <string.h>
  45. X! #include <sys/times.h>
  46. X! #else
  47. X! #include <strings.h>
  48. X! #include <sys/time.h>
  49. X! #endif /*SYSV*/
  50. X  
  51. X  #ifdef X11
  52. X  #include <X11/Xos.h>
  53. X--- 25,31 ----
  54. X  #include "reve.h"
  55. X  #include "color.h"
  56. X  #include "patchlevel.h"
  57. X! #include <ctype.h>
  58. X  
  59. X  #ifdef X11
  60. X  #include <X11/Xos.h>
  61. X***************
  62. X*** 45,58 ****
  63. X  #endif /*NO_TIMEVAL*/
  64. X  
  65. X  /* Text values for the cyclic buttons. */
  66. X! char *diff_values[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9", NULL } ;
  67. X! char *notes_values[] = { "off", "on", NULL } ;
  68. X  char *player_values[] = { "human", "computer", NULL } ;
  69. X  
  70. X  enum cantype cmode, last_cmode ;
  71. X  enum disp_type dtype ;
  72. X  enum dpy_type cur_dpyno ;
  73. X  enum set_type direction ;   /* Incremental direction for cycle item. */
  74. X  
  75. X  int tx, ty, tw, th ;    /* Position and size of text field. */
  76. X  
  77. X--- 39,65 ----
  78. X  #endif /*NO_TIMEVAL*/
  79. X  
  80. X  /* Text values for the cyclic buttons. */
  81. X! char *comp_plays[]    = { "white", "black", "neither", "both" } ;
  82. X! char *diff_values[]   = { "1", "2", "3", "4", "5", "6", "7", "8", "9", NULL } ;
  83. X! char *notes_values[]  = { "off", "on", NULL } ;
  84. X  char *player_values[] = { "human", "computer", NULL } ;
  85. X  
  86. X+ char *resources[] = {      /* Reve X resources read. */
  87. X+   "animate",               /* Boolean: show animation. */
  88. X+   "bestmove",              /* Boolean: show computer best move so far. */
  89. X+   "difficulty",            /* Integer: difficulty level. */
  90. X+   "last",                  /* Boolean: show last move (with a square). */
  91. X+   "log",                   /* Boolean: write computer info to log file. */
  92. X+   "notes",                 /* Boolean: show computer notes. */
  93. X+   "number",                /* Boolean: show last move (number on stone). */
  94. X+   "quick"                  /* Boolean: play quick game (don't flip stones). */
  95. X+ } ;
  96. X+ 
  97. X  enum cantype cmode, last_cmode ;
  98. X  enum disp_type dtype ;
  99. X  enum dpy_type cur_dpyno ;
  100. X  enum set_type direction ;   /* Incremental direction for cycle item. */
  101. X+ enum win_type curwin ;      /* Window the current event for in. */
  102. X  
  103. X  int tx, ty, tw, th ;    /* Position and size of text field. */
  104. X  
  105. X***************
  106. X*** 59,75 ****
  107. X  int piece_x ;           /* Current X position of moving piece. */
  108. X  int piece_y ;           /* Current Y position of moving piece */
  109. X  
  110. X- int animation ;         /* If set, show computer move glide and piece drag. */
  111. X  int best_cmove ;        /* Best computer move so far. */
  112. X  int bfont_height ;      /* Height in pixels for bold font. */
  113. X  int but_inverted ;      /* Value of panel item inverted. */
  114. X  int color ;             /* Current color value. */
  115. X  int cur_ch ;            /* Current character pressed. */
  116. X  int curx ;              /* Current mouse X position. */
  117. X  int cury ;              /* Current mouse Y position. */
  118. X- int do_bestmove ;       /* If set, continuously update computers best move. */
  119. X- int do_last ;           /* If set, don't show last move. */
  120. X- int do_number ;         /* If set, the last stone placed is numbered. */
  121. X  int down ;              /* Indicates is a mouse button is down. */
  122. X  int first_move = 0 ;    /* Set if computer plays first move. */
  123. X  int iconic ;            /* Set if window is currently iconic. */
  124. X--- 66,79 ----
  125. X  int piece_x ;           /* Current X position of moving piece. */
  126. X  int piece_y ;           /* Current Y position of moving piece */
  127. X  
  128. X  int best_cmove ;        /* Best computer move so far. */
  129. X  int bfont_height ;      /* Height in pixels for bold font. */
  130. X  int but_inverted ;      /* Value of panel item inverted. */
  131. X+ int cmove_depth ;       /* Depth of the current best computer move. */
  132. X  int color ;             /* Current color value. */
  133. X  int cur_ch ;            /* Current character pressed. */
  134. X  int curx ;              /* Current mouse X position. */
  135. X  int cury ;              /* Current mouse Y position. */
  136. X  int down ;              /* Indicates is a mouse button is down. */
  137. X  int first_move = 0 ;    /* Set if computer plays first move. */
  138. X  int iconic ;            /* Set if window is currently iconic. */
  139. X***************
  140. X*** 94,103 ****
  141. X  int nfont_height ;      /* Height in pixels for normal font. */
  142. X  int play_computer ;     /* Set if playing against the computer. */
  143. X  int posspec ;           /* Set if -Wp or -g option is present (for X11) */
  144. X! int quickgame ;         /* If set, don't flash turning stones. */
  145. X  int saveres = 0 ;       /* If set, save computer results to log file. */
  146. X  int show_moves ;        /* If set, all possible moves are being shown. */
  147. X- int show_notes ;        /* If set, display notes value from play_reve. */
  148. X  int suggestion = -1 ;   /* Positive if a suggested move. */
  149. X  int suggest_x ;         /* X position of suggested move. */
  150. X  int suggest_y ;         /* Y position of suggested move. */
  151. X--- 98,107 ----
  152. X  int nfont_height ;      /* Height in pixels for normal font. */
  153. X  int play_computer ;     /* Set if playing against the computer. */
  154. X  int posspec ;           /* Set if -Wp or -g option is present (for X11) */
  155. X! int processing ;        /* If set, computer is procesing a move. */
  156. X! int props_showing ;     /* If set, the property window is visible. */
  157. X  int saveres = 0 ;       /* If set, save computer results to log file. */
  158. X  int show_moves ;        /* If set, all possible moves are being shown. */
  159. X  int suggestion = -1 ;   /* Positive if a suggested move. */
  160. X  int suggest_x ;         /* X position of suggested move. */
  161. X  int suggest_y ;         /* Y position of suggested move. */
  162. X***************
  163. X*** 127,186 ****
  164. X  
  165. X  BOARD moves[64] ;          /* Complete array of board moves. */
  166. X  
  167. X! struct iteminfo items[MAXITEMS] = {                     /* Panel items. */
  168. X  
  169. X! /*   type   x   y   width   height   text   value   function */
  170. X  
  171. X! { P_BUTTON,  BBORDER + (0*(BWIDTH+BGAP)), BBORDER + (0*(BHEIGHT+BGAP)),
  172. X!              BWIDTH, BHEIGHT, "load",     0, draw_textfield },
  173. X  
  174. X! { P_BUTTON,  BBORDER + (1*(BWIDTH+BGAP)), BBORDER + (0*(BHEIGHT+BGAP)),
  175. X!              BWIDTH, BHEIGHT, "moves?",   0, show_all_moves },
  176. X  
  177. X! { P_BUTTON,  BBORDER + (2*(BWIDTH+BGAP)), BBORDER + (0*(BHEIGHT+BGAP)),
  178. X!              BWIDTH, BHEIGHT, "new game", 0, new_game },
  179. X  
  180. X! { P_BUTTON,  BBORDER + (3*(BWIDTH+BGAP)), BBORDER + (0*(BHEIGHT+BGAP)),
  181. X!              BWIDTH, BHEIGHT, "save",     0, draw_textfield },
  182. X  
  183. X! { P_BUTTON,  BBORDER + (4*(BWIDTH+BGAP)), BBORDER + (0*(BHEIGHT+BGAP)),
  184. X!              BWIDTH, BHEIGHT, "suggest",  0, suggest },
  185. X  
  186. X! { P_BUTTON,  BBORDER + (5*(BWIDTH+BGAP)), BBORDER + (0*(BHEIGHT+BGAP)),
  187. X!              BWIDTH, BHEIGHT, "undo",     0, undo },
  188. X  
  189. X! { P_BUTTON,  BBORDER + (0*(BWIDTH+BGAP)), BBORDER + (1*(BHEIGHT+BGAP)),
  190. X!              BWIDTH, BHEIGHT, "iconify",  0, done },
  191. X  
  192. X! { P_BUTTON,  -1,                          -1,   /* Not normally active. */
  193. X!              BWIDTH, BHEIGHT, "cancel",  0, remove_textfield },
  194. X  
  195. X! { P_BUTTON,  BBORDER + (5*(BWIDTH+BGAP)), BBORDER + (1*(BHEIGHT+BGAP)),
  196. X!              BWIDTH, BHEIGHT, "quit",     0, quit },
  197. X  
  198. X! { P_CYCLE,   BBORDER + (0*(BWIDTH+BGAP)), BBORDER + (2*(BHEIGHT+BGAP)),
  199. X!              CWIDTH, CHEIGHT, "Black:", 0, init_player },
  200. X  
  201. X! { P_CYCLE,   BBORDER + (3*(BWIDTH+BGAP)), BBORDER + (2*(BHEIGHT+BGAP)),
  202. X!              CWIDTH, CHEIGHT, "White:", 1, init_player },
  203. X  
  204. X! { P_CYCLE,   BBORDER + (0*(BWIDTH+BGAP)), BBORDER + (3*(BHEIGHT+BGAP)),
  205. X!              CWIDTH, CHEIGHT, "Difficulty:", INIT_DEPTH, difficulty },
  206. X  
  207. X! { P_CYCLE,   BBORDER + (3*(BWIDTH+BGAP)), BBORDER + (3*(BHEIGHT+BGAP)),
  208. X!              CWIDTH, CHEIGHT, "Notes:",      FALSE,      init_notes },
  209. X  
  210. X! { P_MESSAGE, BBORDER + (0*(BWIDTH+BGAP)), BBORDER + (4*(BHEIGHT+BGAP)),
  211. X!              0, 0, "Use left mouse button to move", 0, NULL },
  212. X  
  213. X! { P_MESSAGE, BBORDER + (0*(BWIDTH+BGAP)), BBORDER + (5*(BHEIGHT+BGAP)),
  214. X!              0, 0, "",                                   0, NULL },
  215. X  
  216. X! { P_MESSAGE, BBORDER + (0*(BWIDTH+BGAP)), BBORDER + (6*(BHEIGHT+BGAP)),
  217. X!              0, 0, "White:  2, Black:  2",               0, NULL },
  218. X  
  219. X! { P_MESSAGE, BBORDER + (3*(BWIDTH+BGAP)), BBORDER + (6*(BHEIGHT+BGAP)),
  220. X!              0, 0, "",                                   0, NULL },
  221. X  } ;
  222. X  
  223. X  char geometry[MAXDPY][MAXLINE] ;       /* X11 geometry information. */
  224. X--- 131,376 ----
  225. X  
  226. X  BOARD moves[64] ;          /* Complete array of board moves. */
  227. X  
  228. X! struct iteminfo items[MAXITEMS] = {   /* Panel items. */
  229. X  
  230. X! /*  wtype     type    lx    ly           Main window items.
  231. X!  *  label
  232. X!  *  x         y
  233. X!  *  width     height  text  value
  234. X!  *  options   nopts
  235. X!  *  function
  236. X!  */
  237. X  
  238. X!   {                                   /* load button. */
  239. X!     W_MAIN, P_BUTTON, 0, 0,
  240. X!     "",
  241. X!     BBORDER + (0*(BWIDTH+BGAP)), BBORDER + (0*(BHEIGHT+BGAP)),
  242. X!     BWIDTH, BHEIGHT, "load", 0,
  243. X!     (char **) NULL, 0,
  244. X!     draw_textfield
  245. X!   },
  246. X  
  247. X!   {                                   /* moves? button. */
  248. X!     W_MAIN, P_BUTTON, 0, 0,
  249. X!     "",
  250. X!     BBORDER + (1*(BWIDTH+BGAP)), BBORDER + (0*(BHEIGHT+BGAP)),
  251. X!     BWIDTH, BHEIGHT, "moves?", 0,
  252. X!     (char **) NULL, 0,
  253. X!     show_all_moves
  254. X!   },
  255. X  
  256. X!   {                                   /* new game button. */
  257. X!     W_MAIN, P_BUTTON, 0, 0,
  258. X!     "",
  259. X!     BBORDER + (2*(BWIDTH+BGAP)), BBORDER + (0*(BHEIGHT+BGAP)),
  260. X!     BWIDTH, BHEIGHT, "new game", 0,
  261. X!     (char **) NULL, 0,
  262. X!     new_game
  263. X!   },
  264. X  
  265. X!   {                                   /* save button. */
  266. X!     W_MAIN, P_BUTTON, 0, 0,
  267. X!     "",
  268. X!     BBORDER + (3*(BWIDTH+BGAP)), BBORDER + (0*(BHEIGHT+BGAP)),
  269. X!     BWIDTH, BHEIGHT, "save", 0,
  270. X!     (char **) NULL, 0,
  271. X!     draw_textfield
  272. X!   },
  273. X!   
  274. X!   {                                   /* suggest button. */
  275. X!     W_MAIN, P_BUTTON, 0, 0,
  276. X!     "",
  277. X!     BBORDER + (4*(BWIDTH+BGAP)), BBORDER + (0*(BHEIGHT+BGAP)),
  278. X!     BWIDTH, BHEIGHT, "suggest", 0,
  279. X!     (char **) NULL, 0,
  280. X!     suggest
  281. X!   },
  282. X!   
  283. X!   {                                   /* undo button. */
  284. X!     W_MAIN, P_BUTTON, 0, 0,
  285. X!     "",
  286. X!     BBORDER + (5*(BWIDTH+BGAP)), BBORDER + (0*(BHEIGHT+BGAP)),
  287. X!     BWIDTH, BHEIGHT, "undo", 0,
  288. X!     (char **) NULL, 0,
  289. X!     undo
  290. X!   },
  291. X!   
  292. X!   {                                   /* props button. */
  293. X!     W_MAIN, P_BUTTON, 0, 0,
  294. X!     "",
  295. X!     BBORDER + (0*(BWIDTH+BGAP)), BBORDER + (1*(BHEIGHT+BGAP)),
  296. X!     BWIDTH, BHEIGHT, "props", 0,
  297. X!     (char **) NULL, 0,
  298. X!     do_props
  299. X!   },
  300. X  
  301. X!   {                                   /* cancel button. */
  302. X!     W_MAIN, P_BUTTON, 0, 0,
  303. X!     "",
  304. X!     -1, -1,                           /* Not normally active. */
  305. X!     BWIDTH, BHEIGHT, "cancel", 0,
  306. X!     (char **) NULL, 0,
  307. X!     remove_textfield
  308. X!   },
  309. X!   
  310. X!   {                                   /* quit button. */
  311. X!     W_MAIN, P_BUTTON, 0, 0,
  312. X!     "",
  313. X!     BBORDER + (5*(BWIDTH+BGAP)), BBORDER + (1*(BHEIGHT+BGAP)),
  314. X!     BWIDTH, BHEIGHT, "quit", 0,
  315. X!     (char **) NULL, 0,
  316. X!     quit
  317. X!   },
  318. X!   
  319. X!   {                                   /* Black player message item. */
  320. X!     W_MAIN, P_MESSAGE,
  321. X!     BBORDER + (0*(BWIDTH+BGAP)), BBORDER + (2*(BHEIGHT+BGAP)),
  322. X!     "Black:",
  323. X!     BBORDER + (2*(BWIDTH+BGAP)), BBORDER + (2*(BHEIGHT+BGAP)),
  324. X!     CWIDTH, CHEIGHT, "", 0,
  325. X!     (char **) NULL, 0,
  326. X!     NULL
  327. X!   },
  328. X!   
  329. X!   {                                   /* White player message item. */
  330. X!     W_MAIN, P_MESSAGE,
  331. X!     BBORDER + (3*(BWIDTH+BGAP)), BBORDER + (2*(BHEIGHT+BGAP)),
  332. X!     "White:",
  333. X!     BBORDER + (5*(BWIDTH+BGAP)), BBORDER + (2*(BHEIGHT+BGAP)),
  334. X!     CWIDTH, CHEIGHT, "", 1,
  335. X!     (char **) NULL, 0,
  336. X!     NULL
  337. X!   },
  338. X  
  339. X!   {                                   /* Panel message item. */
  340. X!     W_MAIN, P_MESSAGE, 0, 0,
  341. X!     "",
  342. X!     BBORDER + (0*(BWIDTH+BGAP)), BBORDER + (3*(BHEIGHT+BGAP)),
  343. X!     0, 0, "Use left mouse button to move", 0,
  344. X!     (char **) NULL, 0,
  345. X!     NULL
  346. X!   },
  347. X  
  348. X!   {                                   /* Notes message item. */
  349. X!     W_MAIN, P_MESSAGE, 0, 0,
  350. X!     "",
  351. X!     BBORDER + (0*(BWIDTH+BGAP)), BBORDER + (4*(BHEIGHT+BGAP)),
  352. X!     0, 0, "", 0,
  353. X!     (char **) NULL, 0,
  354. X!     NULL
  355. X!   },
  356. X  
  357. X!   {                                   /* Score message item. */
  358. X!     W_MAIN, P_MESSAGE, 0, 0,
  359. X!     "",
  360. X!     BBORDER + (0*(BWIDTH+BGAP)), BBORDER + (5*(BHEIGHT+BGAP)),
  361. X!     0, 0, "White:  2, Black:  2", 0,
  362. X!     (char **) NULL, 0,
  363. X!     NULL
  364. X!   },
  365. X  
  366. X!   {                                   /* Turn message item. */
  367. X!     W_MAIN, P_MESSAGE, 0, 0,
  368. X!     "",
  369. X!     BBORDER + (3*(BWIDTH+BGAP)), BBORDER + (5*(BHEIGHT+BGAP)),
  370. X!     0, 0, "", 0,
  371. X!     (char **) NULL, 0,
  372. X!     NULL
  373. X!   },
  374. X  
  375. X! /*  wtype     type                    Property window items.
  376. X!  *  lx        ly
  377. X!  *  label
  378. X!  *  x         y
  379. X!  *  width     height  text  value
  380. X!  *  options   nopts
  381. X!  *  function
  382. X!  */
  383. X  
  384. X!   {                                   /* Computer plays choice item. */
  385. X!     W_PROPS, P_CHOICE,
  386. X!     BBORDER + (0*(BWIDTH+BGAP)), BBORDER + (0*(BHEIGHT+BGAP)),
  387. X!     "Computer plays:",
  388. X!     BBORDER + (2*(BWIDTH+BGAP)), BBORDER + (0*(BHEIGHT+BGAP)),
  389. X!     0, 0, "", 0,
  390. X!     (char **) comp_plays, 4,
  391. X!     set_option
  392. X!   },
  393. X  
  394. X!   {                                   /* Difficulty choice item. */
  395. X!     W_PROPS, P_CHOICE,
  396. X!     BBORDER + (0*(BWIDTH+BGAP)), BBORDER + (1*(BHEIGHT+BGAP)),
  397. X!     "Difficulty:",
  398. X!     BBORDER + (2*(BWIDTH+BGAP)), BBORDER + (1*(BHEIGHT+BGAP)),
  399. X!     0, 0, "", 0,
  400. X!     (char **) diff_values, 9,
  401. X!     set_option
  402. X!   },
  403. X  
  404. X!   {                                   /* Set search depth cycle item. */
  405. X!     W_PROPS, P_CYCLE,
  406. X!     BBORDER + (0*(BWIDTH+BGAP)), BBORDER + (2*(BHEIGHT+BGAP)),
  407. X!     "Set search depth:",
  408. X!     BBORDER + (2*(BWIDTH+BGAP)), BBORDER + (2*(BHEIGHT+BGAP)),
  409. X!     0, 0, "", INIT_DEPTH,
  410. X!     (char **) NULL, 0,
  411. X!     set_option
  412. X!   },
  413. X  
  414. X!   {                                   /* Options (Animate Move) item. */
  415. X!     W_PROPS, P_TOGGLE,
  416. X!     BBORDER + (0*(BWIDTH+BGAP)), BBORDER + (3*(BHEIGHT+BGAP)),
  417. X!     "Options:",
  418. X!     BBORDER + (2*(BWIDTH+BGAP)), BBORDER + (3*(BHEIGHT+BGAP)),
  419. X!     TICKWIDTH, TICKHEIGHT, "Animate Move", 0,
  420. X!     (char **) NULL, 0,
  421. X!     set_option
  422. X!   },
  423. X  
  424. X!   {                              /* Options (Show Current Best Move) item. */
  425. X!     W_PROPS, P_TOGGLE, 0, 0,
  426. X!     "",
  427. X!     BBORDER + (2*(BWIDTH+BGAP)), BBORDER + (4*(BHEIGHT+BGAP)),
  428. X!     TICKWIDTH, TICKHEIGHT, "Show Current Best Move", 0,
  429. X!     (char **) NULL, 0,
  430. X!     set_option
  431. X!   },
  432. X  
  433. X!   {                                   /* Options (Show Last Move) item. */
  434. X!     W_PROPS, P_TOGGLE, 0, 0,
  435. X!     "",
  436. X!     BBORDER + (2*(BWIDTH+BGAP)), BBORDER + (5*(BHEIGHT+BGAP)),
  437. X!     TICKWIDTH, TICKHEIGHT, "Show Last Move", 0,
  438. X!     (char **) NULL, 0,
  439. X!     set_option
  440. X!   },
  441. X  
  442. X!   {                              /* Options (Show Evaluation Info.) item. */
  443. X!     W_PROPS, P_TOGGLE, 0, 0,
  444. X!     "",
  445. X!     BBORDER + (2*(BWIDTH+BGAP)), BBORDER + (6*(BHEIGHT+BGAP)),
  446. X!     TICKWIDTH, TICKHEIGHT, "Show Evaluation Info.", 0,
  447. X!     (char **) NULL, 0,
  448. X!     set_option
  449. X!   },
  450. X! 
  451. X!   {                                   /* Options (Number Last Move) item. */
  452. X!     W_PROPS, P_TOGGLE, 0, 0,
  453. X!     "",
  454. X!     BBORDER + (2*(BWIDTH+BGAP)), BBORDER + (7*(BHEIGHT+BGAP)),
  455. X!     TICKWIDTH, TICKHEIGHT, "Number Last Move", 0,
  456. X!     (char **) NULL, 0,
  457. X!     set_option
  458. X!   },
  459. X! 
  460. X!   {                                   /* Options (Don't Show Flip) item. */
  461. X!     W_PROPS, P_TOGGLE, 0, 0,
  462. X!     "",
  463. X!     BBORDER + (2*(BWIDTH+BGAP)), BBORDER + (8*(BHEIGHT+BGAP)),
  464. X!     TICKWIDTH, TICKHEIGHT, "Don't Show Flip", 0,
  465. X!     (char **) NULL, 0,
  466. X!     set_option
  467. X!   },
  468. X  } ;
  469. X  
  470. X  char geometry[MAXDPY][MAXLINE] ;       /* X11 geometry information. */
  471. X***************
  472. X*** 197,202 ****
  473. X--- 387,393 ----
  474. X  int damier[NIVEAUMAX][64] ;  /* Boards at different depth level */
  475. X  int tacouleur, macouleur ;   /* Your and my colors during evaluation */
  476. X  int mnb, profmax ;           /* Number of moves played, current max. depth */
  477. X+ int max_depth = 2 ;          /* Computer strategy - maximum depth. */
  478. X  int vp0, vo0 ;               /* Current mobility components */
  479. X  long c1, c2, c3 ;            /* Constants used in evaluation function */
  480. X  long edges[6561] ;           /* Edges Stability Table */
  481. X***************
  482. X*** 213,221 ****
  483. X--- 404,419 ----
  484. X    STRCPY(progname, argv[0]) ;   /* Save program name for later use. */
  485. X    STRCPY(gamefile, "reve.game") ;
  486. X    SPRINTF(line, " Reve.  V1.1.%1d", PATCHLEVEL) ;
  487. X+   init_graphics(&argc, argv) ;
  488. X    initialise() ;                /* Initialise variables used by reve. */
  489. X+   load_resources() ;            /* Get resources from various places. */
  490. X+   read_resources() ;            /* Read resources from merged database. */
  491. X    get_options(argc, argv) ;     /* Read command line options. */
  492. X+ 
  493. X+ #ifndef XVIEW
  494. X    init_edge_table(edgefile) ;   /* Load reve edge table values. */
  495. X+ #endif /*XVIEW*/
  496. X+ 
  497. X    set_display_types() ;         /* Work out what displays to initialise. */
  498. X    if (init_ws_type())           /* Determine window system type. */
  499. X      {
  500. X***************
  501. X*** 231,236 ****
  502. X--- 429,448 ----
  503. X  
  504. X  
  505. X  void
  506. X+ do_computer_move(player)
  507. X+ int player ;
  508. X+ {
  509. X+   set_cursor(CANVASCUR) ;
  510. X+   if (ANIMATION == TRUE) animate_move(move) ;
  511. X+   if (best_cmove != -1 && DO_BESTMOVE == TRUE)
  512. X+     draw_square(best_cmove, IS_OFF, 2) ;
  513. X+   do_move(player) ;
  514. X+   last_move = move ;
  515. X+   cmode = (enum cantype) (OPPONENT(player) + 1) ;
  516. X+ }
  517. X+ 
  518. X+ 
  519. X+ void
  520. X  generate_graphics(argc, argv, dpyno)
  521. X  enum dpy_type dpyno ;
  522. X  int argc ;
  523. X***************
  524. X*** 241,255 ****
  525. X    make_frame(argc, argv) ;      /* Create reve window/icon. */
  526. X    make_canvas() ;               /* Create drawing canvas. */
  527. X    init_fonts() ;                /* Load normal and bold fonts. */
  528. X-   create_menu(BLACK_PLAYS, player_values) ;
  529. X-   create_menu(WHITE_PLAYS, player_values) ;
  530. X-   create_menu(DIFFICULTY,  diff_values) ;
  531. X-   create_menu(NOTES,       notes_values) ;
  532. X    initboard() ;
  533. X    set_cursor(CANVASCUR) ;
  534. X  }
  535. X  
  536. X  
  537. X  void
  538. X  get_options(argc, argv)   /* Read and process command line options. */
  539. X  int argc ;
  540. X--- 453,492 ----
  541. X    make_frame(argc, argv) ;      /* Create reve window/icon. */
  542. X    make_canvas() ;               /* Create drawing canvas. */
  543. X    init_fonts() ;                /* Load normal and bold fonts. */
  544. X    initboard() ;
  545. X    set_cursor(CANVASCUR) ;
  546. X  }
  547. X  
  548. X  
  549. X+ get_bool_resource(rtype, boolval)   /* Get boolean resource from the server. */
  550. X+ enum res_type rtype ;
  551. X+ int *boolval ;
  552. X+ {
  553. X+   char *val, tempstr[MAXLINE] ;
  554. X+   int n ;
  555. X+ 
  556. X+   if ((val = get_resource(rtype)) == NULL) return(0) ;
  557. X+   STRCPY(tempstr, val) ;
  558. X+   for (n = 0; n < strlen(tempstr); n++)
  559. X+     if (isupper(tempstr[n])) tempstr[n] = tolower(tempstr[n]) ;
  560. X+   if (EQUAL(tempstr, "true")) *boolval = TRUE ;
  561. X+   else                        *boolval = FALSE ;
  562. X+   return(1) ;
  563. X+ }
  564. X+ 
  565. X+ 
  566. X+ get_int_resource(rtype, intval)   /* Get integer resource from the server. */
  567. X+ enum res_type rtype ;
  568. X+ int *intval ;
  569. X+ {
  570. X+   char *val ;
  571. X+ 
  572. X+   if ((val = get_resource(rtype)) == NULL) return(0) ;
  573. X+   *intval = atoi(val) ;
  574. X+   return(1) ;
  575. X+ }
  576. X+ 
  577. X+ 
  578. X  void
  579. X  get_options(argc, argv)   /* Read and process command line options. */
  580. X  int argc ;
  581. X***************
  582. X*** 265,273 ****
  583. X          switch (argv[0][1])
  584. X            {
  585. X              case 'a' : /* Allow computer glide and piece dragging. */
  586. X!                        if (EQUAL(argv[0], "-animate")) animation = TRUE ;
  587. X                         break ;
  588. X!             case 'b' : if (EQUAL(argv[0], "-bestmove")) do_bestmove = TRUE ;
  589. X                         else if (EQUAL(argv[0], "-black"))
  590. X                           {
  591. X                             isblack = 1 ;
  592. X--- 502,510 ----
  593. X          switch (argv[0][1])
  594. X            {
  595. X              case 'a' : /* Allow computer glide and piece dragging. */
  596. X!                        if (EQUAL(argv[0], "-animate")) ANIMATION = TRUE ;
  597. X                         break ;
  598. X!             case 'b' : if (EQUAL(argv[0], "-bestmove")) DO_BESTMOVE = TRUE ;
  599. X                         else if (EQUAL(argv[0], "-black"))
  600. X                           {
  601. X                             isblack = 1 ;
  602. X***************
  603. X*** 284,290 ****
  604. X                         getparam(next, argv, "-d needs difficulty") ;
  605. X                         level = atoi(next) ;
  606. X                         if (level < 1 || level > MAXDIFF) level = INIT_DEPTH ;
  607. X!                        items[(int) DIFFICULTY].value = level - 1 ;
  608. X                         break ;
  609. X              case 'e' : INC ;
  610. X                         getparam(edgefile, argv, "-e needs an edgetable file") ;
  611. X--- 521,527 ----
  612. X                         getparam(next, argv, "-d needs difficulty") ;
  613. X                         level = atoi(next) ;
  614. X                         if (level < 1 || level > MAXDIFF) level = INIT_DEPTH ;
  615. X!                        items[(int) DIFF_CHOICE].value = level - 1 ;
  616. X                         break ;
  617. X              case 'e' : INC ;
  618. X                         getparam(edgefile, argv, "-e needs an edgetable file") ;
  619. X***************
  620. X*** 295,301 ****
  621. X                         break ;
  622. X              case 'i' : inv_video = 1 ;       /* Display in inverse video. */
  623. X                         break ;
  624. X!             case 'l' :      if (EQUAL(argv[0], "-last")) do_last = TRUE ;
  625. X                         else if (EQUAL(argv[0], "-load"))
  626. X                           {
  627. X                             INC ;             /* Reve game file to load. */
  628. X--- 532,539 ----
  629. X                         break ;
  630. X              case 'i' : inv_video = 1 ;       /* Display in inverse video. */
  631. X                         break ;
  632. X!             case 'l' :      if (EQUAL(argv[0], "-last")) DO_LAST = TRUE ;
  633. X!                        else if (EQUAL(argv[0], "-log"))  saveres = TRUE ;
  634. X                         else if (EQUAL(argv[0], "-load"))
  635. X                           {
  636. X                             INC ;             /* Reve game file to load. */
  637. X***************
  638. X*** 306,322 ****
  639. X              case 'm' : monochrome = 1 ;      /* Force display to mono. */
  640. X                         for (i = 0; i < MAXDPY; i++) iscolor[i] = 0 ;
  641. X                         break ;
  642. X!             case 'n' : if (EQUAL(argv[0], "-notes"))
  643. X!                          {
  644. X!                            show_notes = TRUE ;
  645. X!                            items[(int) NOTES].value = 1 ;
  646. X!                          }
  647. X!                        else if (EQUAL(argv[0], "-number")) do_number = TRUE ;
  648. X                         break ;
  649. X!             case 'q' : if (EQUAL(argv[0], "-quick")) quickgame = TRUE ;
  650. X                         break ;
  651. X-             case 'r' : saveres = 1 ;       /* Save computer results to file. */
  652. X-                        break ;
  653. X              case '?' :
  654. X              case 'v' : usage() ;
  655. X  
  656. X--- 544,554 ----
  657. X              case 'm' : monochrome = 1 ;      /* Force display to mono. */
  658. X                         for (i = 0; i < MAXDPY; i++) iscolor[i] = 0 ;
  659. X                         break ;
  660. X!             case 'n' :      if (EQUAL(argv[0], "-notes")) SHOW_NOTES = TRUE ;
  661. X!                        else if (EQUAL(argv[0], "-number")) DO_NUMBER = TRUE ;
  662. X                         break ;
  663. X!             case 'q' : if (EQUAL(argv[0], "-quick")) QUICKGAME = TRUE ;
  664. X                         break ;
  665. X              case '?' :
  666. X              case 'v' : usage() ;
  667. X  
  668. X***************
  669. X*** 387,392 ****
  670. X--- 619,636 ----
  671. X  }
  672. X  
  673. X  
  674. X+ get_str_resource(rtype, strval)   /* Get a string resource from the server. */
  675. X+ enum res_type rtype ;
  676. X+ char *strval ;
  677. X+ {
  678. X+   char *val ;
  679. X+ 
  680. X+   if ((val = get_resource(rtype)) == NULL) return(0) ;
  681. X+   STRCPY(strval, val) ;
  682. X+   return(1) ;
  683. X+ }
  684. X+ 
  685. X+ 
  686. X  void
  687. X  getparam(s, argv, errmes)
  688. X  char *s, *argv[], *errmes ;
  689. X***************
  690. X*** 407,418 ****
  691. X    int adjust, d, i, n, x, y ;
  692. X   
  693. X    d = (int) cur_dpyno ;
  694. X!   color_area(0, 0, TOTAL_WIDTH, TOTAL_HEIGHT, C_WHITE) ;
  695. X    if (iscolor[d])
  696. X      {
  697. X!       color_area(0, 0, TOTAL_WIDTH, CY, C_BEIGE) ;
  698. X!       color_area(0, CY, TOTAL_WIDTH, TOTAL_WIDTH, C_DBROWN) ;
  699. X!       color_area(0 + BBORDER, CY + BBORDER, BOARD_SIZE * CELL_SIZE,
  700. X                   BOARD_SIZE * CELL_SIZE, C_LBROWN) ;
  701. X      }
  702. X    make_panel() ;                /* Create panel and panel items. */
  703. X--- 651,662 ----
  704. X    int adjust, d, i, n, x, y ;
  705. X   
  706. X    d = (int) cur_dpyno ;
  707. X!   color_area(W_MAIN, 0, 0, TOTAL_WIDTH, TOTAL_HEIGHT, C_WHITE) ;
  708. X    if (iscolor[d])
  709. X      {
  710. X!       color_area(W_MAIN, 0, 0, TOTAL_WIDTH, CY, C_BEIGE) ;
  711. X!       color_area(W_MAIN, 0, CY, TOTAL_WIDTH, TOTAL_WIDTH, C_DBROWN) ;
  712. X!       color_area(W_MAIN, 0 + BBORDER, CY + BBORDER, BOARD_SIZE * CELL_SIZE,
  713. X                   BOARD_SIZE * CELL_SIZE, C_LBROWN) ;
  714. X      }
  715. X    make_panel() ;                /* Create panel and panel items. */
  716. X***************
  717. X*** 426,435 ****
  718. X        if (n == 0 || n == BOARD_SIZE) color = C_BLACK ;
  719. X        if (color == C_LGREY) adjust = 1 ;
  720. X        else adjust = 0 ;
  721. X!       draw_line((n*CELL_SIZE)+BBORDER, CY+BBORDER+adjust,   /* Vertical. */
  722. X!                 (n*CELL_SIZE)+BBORDER,
  723. X                   CY+BBORDER+(BOARD_SIZE*CELL_SIZE)-adjust, RSRC, color) ;
  724. X!       draw_line(BBORDER+adjust, CY+BBORDER+(n*CELL_SIZE),   /* Horizontal. */
  725. X                  BBORDER+(BOARD_SIZE*CELL_SIZE)-adjust,
  726. X                  CY+BBORDER+(n*CELL_SIZE), RSRC, color) ;
  727. X      }
  728. X--- 670,680 ----
  729. X        if (n == 0 || n == BOARD_SIZE) color = C_BLACK ;
  730. X        if (color == C_LGREY) adjust = 1 ;
  731. X        else adjust = 0 ;
  732. X!       draw_line(W_MAIN, (n*CELL_SIZE)+BBORDER,              /* Vertical. */
  733. X!                 CY+BBORDER+adjust, (n*CELL_SIZE)+BBORDER,
  734. X                   CY+BBORDER+(BOARD_SIZE*CELL_SIZE)-adjust, RSRC, color) ;
  735. X!       draw_line(W_MAIN, BBORDER+adjust,                     /* Horizontal. */
  736. X!                 CY+BBORDER+(n*CELL_SIZE),
  737. X                  BBORDER+(BOARD_SIZE*CELL_SIZE)-adjust,
  738. X                  CY+BBORDER+(n*CELL_SIZE), RSRC, color) ;
  739. X      }
  740. X***************
  741. X*** 439,460 ****
  742. X      {
  743. X        color = (iscolor[d]) ? C_WHITE : C_BLACK ;
  744. X        SPRINTF(s1, "%c", 'a' + i) ;
  745. X!       draw_text(BBORDER + (i * CELL_SIZE) + (CELL_SIZE / 2) - 2,
  746. X                  CY + BBORDER - 4, BFONT, color, s1) ;
  747. X!       draw_text(BBORDER + (i * CELL_SIZE) + (CELL_SIZE / 2) - 2,
  748. X                  CY + (2 * BBORDER) + (BOARD_SIZE * CELL_SIZE) - 4,
  749. X                  BFONT, color, s1) ;
  750. X        SPRINTF(sa, "%c", '1' + i) ;
  751. X!       draw_text(BBORDER / 2 - 2, CY + BBORDER + (i * CELL_SIZE) +
  752. X                  (CELL_SIZE / 2) + 2, BFONT, color, sa) ;
  753. X!       draw_text(BBORDER + (BOARD_SIZE * CELL_SIZE) + (BBORDER / 2) - 2,
  754. X                  CY + BBORDER + (i * CELL_SIZE) + (CELL_SIZE / 2) + 2,
  755. X                  BFONT, color, sa) ;
  756. X      }
  757. X    batch(IS_OFF) ;
  758. X-   show_last(last_move, IS_ON) ;
  759. X-   show_number(last_move, IS_ON) ;
  760. X-   show_suggestion() ;
  761. X    batch(IS_ON) ;
  762. X    FOR_BOARD(i)
  763. X      if (board.square[i])
  764. X--- 684,702 ----
  765. X      {
  766. X        color = (iscolor[d]) ? C_WHITE : C_BLACK ;
  767. X        SPRINTF(s1, "%c", 'a' + i) ;
  768. X!       draw_text(W_MAIN, BBORDER + (i * CELL_SIZE) + (CELL_SIZE / 2) - 2,
  769. X                  CY + BBORDER - 4, BFONT, color, s1) ;
  770. X!       draw_text(W_MAIN, BBORDER + (i * CELL_SIZE) + (CELL_SIZE / 2) - 2,
  771. X                  CY + (2 * BBORDER) + (BOARD_SIZE * CELL_SIZE) - 4,
  772. X                  BFONT, color, s1) ;
  773. X        SPRINTF(sa, "%c", '1' + i) ;
  774. X!       draw_text(W_MAIN, BBORDER / 2 - 2, CY + BBORDER + (i * CELL_SIZE) +
  775. X                  (CELL_SIZE / 2) + 2, BFONT, color, sa) ;
  776. X!       draw_text(W_MAIN, BBORDER + (BOARD_SIZE * CELL_SIZE) + (BBORDER / 2) - 2,
  777. X                  CY + BBORDER + (i * CELL_SIZE) + (CELL_SIZE / 2) + 2,
  778. X                  BFONT, color, sa) ;
  779. X      }
  780. X    batch(IS_OFF) ;
  781. X    batch(IS_ON) ;
  782. X    FOR_BOARD(i)
  783. X      if (board.square[i])
  784. X***************
  785. X*** 462,470 ****
  786. X          get_xy(i, &x, &y) ;
  787. X          draw_piece(board.square[i], x, CY+y, RSRC) ;
  788. X        }
  789. X!   batch(IS_OFF) ;
  790. X    set_score() ;
  791. X    message(TURN_MES, "Black to move.") ;
  792. X  
  793. X    if (loadgame)
  794. X      {
  795. X--- 704,715 ----
  796. X          get_xy(i, &x, &y) ;
  797. X          draw_piece(board.square[i], x, CY+y, RSRC) ;
  798. X        }
  799. X!   if (DO_LAST) show_last(last_move, IS_ON) ;
  800. X!   if (DO_NUMBER) show_number(last_move, 60 - board.moves_left, IS_ON) ;
  801. X!   show_suggestion() ;
  802. X    set_score() ;
  803. X    message(TURN_MES, "Black to move.") ;
  804. X+   batch(IS_OFF) ;
  805. X  
  806. X    if (loadgame)
  807. X      {
  808. X***************
  809. X*** 490,510 ****
  810. X    last_move     = -1 ;
  811. X    last_outline  = -1 ;
  812. X    next_player   = BLACK ;
  813. X!   animation     = FALSE ;
  814. X    best_cmove    = -1 ;
  815. X    but_inverted  = -1 ;
  816. X!   do_bestmove   = FALSE ;
  817. X!   do_last       = FALSE ;
  818. X!   do_number     = FALSE ;
  819. X!   quickgame     = FALSE ;
  820. X    validkey      = 0 ;
  821. X    cmode         = BLACK_START ;
  822. X    show_moves    = FALSE ;
  823. X!   show_notes    = FALSE ;
  824. X    isblack       = 0 ;
  825. X    iswhite       = 0 ;
  826. X    level         = INIT_DEPTH ;
  827. X!   items[(int) DIFFICULTY].value = level - 1 ;
  828. X  
  829. X    black_dpy = NULL ;              /* X11 black piece display information. */
  830. X    white_dpy = NULL ;              /* X11 white piece display information. */
  831. X--- 735,757 ----
  832. X    last_move     = -1 ;
  833. X    last_outline  = -1 ;
  834. X    next_player   = BLACK ;
  835. X!   ANIMATION     = FALSE ;
  836. X    best_cmove    = -1 ;
  837. X    but_inverted  = -1 ;
  838. X!   DO_BESTMOVE   = FALSE ;
  839. X!   DO_LAST       = FALSE ;
  840. X!   DO_NUMBER     = FALSE ;
  841. X!   processing    = FALSE ;             /* No computer move initially. */
  842. X!   props_showing = FALSE ;
  843. X!   QUICKGAME     = FALSE ;
  844. X    validkey      = 0 ;
  845. X    cmode         = BLACK_START ;
  846. X    show_moves    = FALSE ;
  847. X!   SHOW_NOTES    = FALSE ;
  848. X    isblack       = 0 ;
  849. X    iswhite       = 0 ;
  850. X    level         = INIT_DEPTH ;
  851. X!   items[(int) DIFF_CHOICE].value = level - 1 ;
  852. X  
  853. X    black_dpy = NULL ;              /* X11 black piece display information. */
  854. X    white_dpy = NULL ;              /* X11 white piece display information. */
  855. X***************
  856. X*** 515,572 ****
  857. X  
  858. X  
  859. X  void
  860. X! init_edge_table(edgefile)     /* Load reve edge table values. */
  861. X! char *edgefile ;
  862. X  {
  863. X!   char buf[MAXLINE], *getenv(), name[MAXLINE], *paths, *ptr ;
  864. X!   int i, line ;
  865. X!   FILE *fp = NULL ;
  866. X  
  867. X!   i = 0 ;
  868. X!   if ((fp = fopen(edgefile, "r")) == NULL)
  869. X!     {
  870. X!       paths = getenv("PATH") ;
  871. X!       if ((ptr = paths) && edgefile[0] != '/')
  872. X!         for (;;)
  873. X!           if (*ptr == ':' || *ptr == 0)
  874. X!             {
  875. X!               if (*ptr == 0) break ;
  876. X!               name[i++] = '/' ;
  877. X!               name[i] = 0 ;
  878. X!               STRCAT(name, edgefile) ;
  879. X!               if ((fp = fopen(name, "r")) != NULL) break ;
  880. X!               if (*ptr == '\0') break ;
  881. X!               ptr++ ;
  882. X!               i = 0 ;
  883. X!             }
  884. X!           else name[i++] = *ptr++ ;
  885. X!     }
  886. X  
  887. X!   if (fp == NULL)
  888. X      {
  889. X!       FPRINTF(stderr, "Cannot open Edge Stability Table file\n") ;
  890. X!       exit(1) ;
  891. X      }
  892. X!   line = 0 ;
  893. X!   while (fgets(buf, MAXLINE, fp) != NULL)
  894. X!     {
  895. X!       line++ ;
  896. X!       if (buf[0] == '\n' || buf[0] == '#') continue ;
  897. X!       if ((ptr = index(buf, '[')) == NULL)
  898. X!         {
  899. X!           FPRINTF(stderr, "Cannot read edge table file at line %d\n", line) ;
  900. X!           exit(1) ;
  901. X!         }
  902. X!       SSCANF(ptr+1, "%d", &i) ;
  903. X!       if ((ptr = index(buf, '=')) == NULL)
  904. X!         {
  905. X!           FPRINTF(stderr, "Cannot read edge table file at line %d\n", line) ;
  906. X!           exit(1) ;
  907. X!         }
  908. X!       SSCANF(ptr+1, "%ld", &edges[i]) ;
  909. X!     }
  910. X!   FCLOSE(fp) ;
  911. X!   for (i = 0 ; i < 3281; i++) edges[6560 - i] = - edges[i] ;
  912. X  }
  913. X  
  914. X  
  915. X--- 762,786 ----
  916. X  
  917. X  
  918. X  void
  919. X! read_resources()            /* Read all possible resources from database. */
  920. X  {
  921. X!   int boolval, intval ;
  922. X  
  923. X!   if (get_bool_resource(R_ANIMATE,  &boolval)) ANIMATION   = boolval ;
  924. X!   if (get_bool_resource(R_BESTMOVE, &boolval)) DO_BESTMOVE = boolval ;
  925. X  
  926. X!   if (get_int_resource(R_DIFFICULTY, &intval))
  927. X      {
  928. X!       level = intval ;
  929. X!       if (level < 1 || level > MAXDIFF) level = INIT_DEPTH ;
  930. X!       items[(int) DIFF_CHOICE].value = level - 1 ;
  931. X      }
  932. X! 
  933. X!   if (get_bool_resource(R_LAST,   &boolval)) DO_LAST = boolval ;
  934. X!   if (get_bool_resource(R_LOG,    &boolval)) saveres = boolval ;
  935. X!   if (get_bool_resource(R_NOTES,  &boolval)) SHOW_NOTES = boolval ;
  936. X!   if (get_bool_resource(R_NUMBER, &boolval)) DO_NUMBER = boolval ;
  937. X!   if (get_bool_resource(R_QUICK,  &boolval)) QUICKGAME = boolval ;
  938. X  }
  939. X  
  940. X  
  941. X***************
  942. X*** 593,598 ****
  943. X--- 807,814 ----
  944. X  void
  945. X  set_display_types()
  946. X  {
  947. X+   int val ;
  948. X+ 
  949. X         if (isblack && iswhite) play_computer = 0 ;
  950. X         if (isblack && iswhite) dtype = XBOTH ;
  951. X    else if (isblack)            dtype = XBLACK ;
  952. X***************
  953. X*** 625,632 ****
  954. X         if (dtype == XBLACK)                 isblack = 1 ;
  955. X    else if (dtype == XWHITE)                 iswhite = first_move = 1 ;
  956. X    else if (dtype == XTWO || dtype == XBOTH) isblack = iswhite    = 1 ;
  957. X!   items[(int) BLACK_PLAYS].value = (isblack == 0) ;
  958. X!   items[(int) WHITE_PLAYS].value = (iswhite == 0) ;
  959. X  }
  960. X  
  961. X  
  962. X--- 841,854 ----
  963. X         if (dtype == XBLACK)                 isblack = 1 ;
  964. X    else if (dtype == XWHITE)                 iswhite = first_move = 1 ;
  965. X    else if (dtype == XTWO || dtype == XBOTH) isblack = iswhite    = 1 ;
  966. X! 
  967. X!   val = (isblack == 0) ;
  968. X!   items[(int) BLACK_PLAYS].value = val ;
  969. X!   STRCPY(items[(int) BLACK_PLAYS].text, player_values[val]) ;
  970. X! 
  971. X!   val = (iswhite == 0) ;
  972. X!   items[(int) WHITE_PLAYS].value = val ;
  973. X!   STRCPY(items[(int) WHITE_PLAYS].text, player_values[val]) ;
  974. X  }
  975. X  
  976. X  
  977. X***************
  978. X*** 638,651 ****
  979. X    move = TRUE ;            /* Make sure the computer clock is decremented. */
  980. X    best_cmove = -1 ;
  981. X    message(EVAL_MES, "") ;
  982. X    play_reve(board.square, player, level, &move, ¬e) ;
  983. X!   set_cursor(CANVASCUR) ;
  984. X!   if (animation == TRUE) animate_move(move) ;
  985. X!   if (best_cmove != -1 && do_bestmove == TRUE)
  986. X!     draw_square(best_cmove, IS_OFF, 2) ;
  987. X!   do_move(player) ;
  988. X!   last_move = move ;
  989. X!   cmode = (enum cantype) (OPPONENT(player) + 1) ;
  990. X  }
  991. X  
  992. X  
  993. X--- 860,871 ----
  994. X    move = TRUE ;            /* Make sure the computer clock is decremented. */
  995. X    best_cmove = -1 ;
  996. X    message(EVAL_MES, "") ;
  997. X+ #ifdef XVIEW
  998. X+   write_to_reve(M_MOVE, board.square, player, level, &move, ¬e) ;
  999. X+ #else
  1000. X    play_reve(board.square, player, level, &move, ¬e) ;
  1001. X!   do_computer_move(player) ;
  1002. X! #endif /*XVIEW*/
  1003. X  }
  1004. X  
  1005. X  
  1006. X
  1007. X------- procs.c -------
  1008. X*** /tmp/da07597    Sun Dec  9 15:14:39 1990
  1009. X--- procs.c    Sat Dec  8 19:41:37 1990
  1010. X***************
  1011. X*** 29,37 ****
  1012. X  
  1013. X  
  1014. X  void
  1015. X! difficulty()
  1016. X  {
  1017. X!   level = next_setting(DIFFICULTY, diff_values) + 1 ;
  1018. X  }
  1019. X  
  1020. X  
  1021. X--- 29,39 ----
  1022. X  
  1023. X  
  1024. X  void
  1025. X! do_props()
  1026. X  {
  1027. X!   props_showing = !props_showing ;
  1028. X!   if (props_showing == TRUE) open_frame(W_PROPS) ;
  1029. X!   else                       close_frame(W_PROPS) ;
  1030. X  }
  1031. X  
  1032. X  
  1033. X***************
  1034. X*** 48,60 ****
  1035. X    if (state == LEFT_DOWN)
  1036. X      {
  1037. X        draw_outline(cy * BOARD_SIZE + cx, IS_ON) ;
  1038. X!       if (animation == TRUE)
  1039. X          draw_piece(next_player, piece_x, piece_y, RINV) ;
  1040. X        cmode = (enum cantype) ((int) cmode - 1) ;
  1041. X      }
  1042. X    else
  1043. X      {
  1044. X!       if (animation == TRUE)
  1045. X          draw_piece(next_player, piece_x, piece_y, RINV) ;
  1046. X        draw_outline(last_outline, IS_OFF) ;
  1047. X        move = cy * BOARD_SIZE + cx ;
  1048. X--- 50,62 ----
  1049. X    if (state == LEFT_DOWN)
  1050. X      {
  1051. X        draw_outline(cy * BOARD_SIZE + cx, IS_ON) ;
  1052. X!       if (ANIMATION == TRUE)
  1053. X          draw_piece(next_player, piece_x, piece_y, RINV) ;
  1054. X        cmode = (enum cantype) ((int) cmode - 1) ;
  1055. X      }
  1056. X    else
  1057. X      {
  1058. X!       if (ANIMATION == TRUE)
  1059. X          draw_piece(next_player, piece_x, piece_y, RINV) ;
  1060. X        draw_outline(last_outline, IS_OFF) ;
  1061. X        move = cy * BOARD_SIZE + cx ;
  1062. X***************
  1063. X*** 64,126 ****
  1064. X  
  1065. X  
  1066. X  void
  1067. X! done()
  1068. X  {
  1069. X!   iconic = 1 ;
  1070. X!   close_frame() ;
  1071. X! }
  1072. X  
  1073. X! 
  1074. X! void
  1075. X! init_notes()
  1076. X! {
  1077. X!   show_notes = next_setting(NOTES, notes_values) ;
  1078. X!   if (show_notes == FALSE) message(EVAL_MES, "") ;
  1079. X! }
  1080. X! 
  1081. X! 
  1082. X! void
  1083. X! init_player()
  1084. X! {
  1085. X!   enum panel_type item, other ;
  1086. X!   int curi, curo ;
  1087. X! 
  1088. X! /*  XXX: Currently computer vs computer is not implemented, because of the
  1089. X!  *       inability to break out of it, once started, with some of the
  1090. X!  *       graphics versions. If the user has asked for this, then force it
  1091. X!  *       to toggle the other player, so this situation can't happen.
  1092. X!  */
  1093. X! 
  1094. X!   if (curx < (BBORDER + (3*(BWIDTH+BGAP))))
  1095. X      {
  1096. X!       item = BLACK_PLAYS ;
  1097. X!       other = WHITE_PLAYS ;
  1098. X      }
  1099. X-   else
  1100. X-     {
  1101. X-       item = WHITE_PLAYS ;
  1102. X-       other = BLACK_PLAYS ;
  1103. X-     }
  1104. X-   curo = items[(int) other].value ;
  1105. X-   curi = next_setting(item, player_values) ;
  1106. X-   if (curi == COMPUTER && curo == COMPUTER)
  1107. X-     {
  1108. X-       curi = HUMAN ;
  1109. X-       set_cycle(item, player_values[curi]) ;
  1110. X-       items[(int) item].value = curi ;
  1111. X-       message(PANEL_MES, "Computer can't play both players.") ;
  1112. X-     }
  1113. X-   if (curi == HUMAN    && curo == COMPUTER)
  1114. X-     dtype = (item == BLACK_PLAYS) ? XBLACK : XWHITE ;
  1115. X-   else if (curi == COMPUTER && curo == HUMAN)
  1116. X-     dtype = (item == BLACK_PLAYS) ? XWHITE : XBLACK ;
  1117. X-   else if (curi == HUMAN    && curo == HUMAN)
  1118. X-     dtype = (dtype == XTWO) ? XTWO : XBOTH ; 
  1119. X  
  1120. X!   if (curi == COMPUTER)
  1121. X!     if ((item == BLACK_PLAYS && cmode == BLACK_START) ||
  1122. X!         (item == WHITE_PLAYS && cmode == WHITE_START))
  1123. X!       computer_move(next_player) ;
  1124. X  }
  1125. X  
  1126. X  
  1127. X--- 66,95 ----
  1128. X  
  1129. X  
  1130. X  void
  1131. X! do_suggest(player, suggestion, note, state)
  1132. X! int player, suggestion, note ;
  1133. X! enum bltype state ;
  1134. X  {
  1135. X!   set_cursor(CANVASCUR) ;
  1136. X  
  1137. X!   if (suggestion == -1) return ;
  1138. X!   if (best_cmove != -1 && DO_BESTMOVE == TRUE)
  1139. X      {
  1140. X!       draw_square(best_cmove, IS_OFF, 2) ;
  1141. X!       if (DO_NUMBER) show_number(best_cmove, cmove_depth, IS_OFF) ;
  1142. X      }
  1143. X  
  1144. X!   suggest_x = BBORDER + ((suggestion & 7)  + 1) * CELL_SIZE - CELL_SIZE / 2 ;
  1145. X!   suggest_y = BBORDER + ((suggestion >> 3) + 1) * CELL_SIZE - CELL_SIZE / 2 ;
  1146. X!   if (state == IS_OFF)
  1147. X!     color = (iscolor[(int) cur_dpyno]) ? C_LBROWN : C_WHITE ;
  1148. X!   else color = C_BLACK ;
  1149. X! 
  1150. X!   draw_line(W_MAIN, suggest_x-5, CY+suggest_y-5,
  1151. X!                     suggest_x+5, CY+suggest_y+5, RSRC, color) ;
  1152. X!   draw_line(W_MAIN, suggest_x-5, CY+suggest_y+5,
  1153. X!                     suggest_x+5, CY+suggest_y-5, RSRC, color) ;
  1154. X!   if (SHOW_NOTES && state == IS_ON) set_eval(player, suggestion, note) ;
  1155. X  }
  1156. X  
  1157. X  
  1158. X***************
  1159. X*** 160,199 ****
  1160. X    init_canvas() ;
  1161. X    message(EVAL_MES, "") ;
  1162. X    message(PANEL_MES, "Use left mouse button to move") ;
  1163. X!   draw_button(NEW_GAME_BUT, C_LGREY, BUT_NORMAL) ;
  1164. X  }
  1165. X  
  1166. X  
  1167. X! next_setting(item, choices)
  1168. X! enum panel_type item ;
  1169. X! char *choices[] ;
  1170. X  {
  1171. X!   switch (direction)
  1172. X      {
  1173. X!       case INCREMENT : if (choices[++item_value] != NULL)
  1174. X!                          items[(int) item].value++ ;
  1175. X!                        else items[(int) item].value = item_value = 0 ;
  1176. X!                        break ;
  1177. X!       case DECREMENT : if (--item_value == -1)
  1178. X!                          {
  1179. X!                            while (choices[++item_value] != NULL) continue ;
  1180. X!                            item_value-- ;
  1181. X!                            items[(int) item].value = item_value ;
  1182. X!                          }
  1183. X!                        else items[(int) item].value-- ;
  1184. X!                        break ;
  1185. X!       case NONE      : /* Handled elsewhere. */ ;
  1186. X      }
  1187. X!   set_cycle(item, choices[item_value]) ;
  1188. X!   return(items[(int) item].value) ;
  1189. X  }
  1190. X  
  1191. X  
  1192. X  void
  1193. X! quit()
  1194. X  {
  1195. X!   destroy_frame() ;
  1196. X!   exit(0) ;
  1197. X  }
  1198. X  
  1199. X  
  1200. X--- 129,258 ----
  1201. X    init_canvas() ;
  1202. X    message(EVAL_MES, "") ;
  1203. X    message(PANEL_MES, "Use left mouse button to move") ;
  1204. X!   draw_button(W_MAIN, NEW_GAME_BUT, C_LGREY, BUT_NORMAL) ;
  1205. X  }
  1206. X  
  1207. X  
  1208. X! void
  1209. X! quit()
  1210. X  {
  1211. X!   destroy_frame() ;
  1212. X!   exit(0) ;
  1213. X! }
  1214. X! 
  1215. X! 
  1216. X! void
  1217. X! set_computer(val)
  1218. X! int val ;
  1219. X! {
  1220. X!   int color, curi ;
  1221. X! 
  1222. X!   if (val == CP_WHITE)
  1223. X      {
  1224. X!       dtype = XBLACK ;
  1225. X!       play_computer = TRUE ;
  1226. X!       items[(int) BLACK_PLAYS].value = HUMAN ;
  1227. X!       STRCPY(items[(int) BLACK_PLAYS].text, player_values[HUMAN]) ;
  1228. X!       items[(int) WHITE_PLAYS].value = COMPUTER ;
  1229. X!       STRCPY(items[(int) WHITE_PLAYS].text, player_values[COMPUTER]) ;
  1230. X      }
  1231. X!   else if (val == CP_BLACK)
  1232. X!     {
  1233. X!       dtype = XWHITE ;
  1234. X!       play_computer = TRUE ;
  1235. X!       items[(int) BLACK_PLAYS].value = COMPUTER ;
  1236. X!       STRCPY(items[(int) BLACK_PLAYS].text, player_values[COMPUTER]) ;
  1237. X!       items[(int) WHITE_PLAYS].value = HUMAN ;
  1238. X!       STRCPY(items[(int) WHITE_PLAYS].text, player_values[HUMAN]) ;
  1239. X!     }
  1240. X!   else if (val == CP_NEITHER)
  1241. X!     {
  1242. X!       dtype = XTWO ;
  1243. X!       play_computer = FALSE ;
  1244. X!       items[(int) BLACK_PLAYS].value = HUMAN ;
  1245. X!       STRCPY(items[(int) BLACK_PLAYS].text, player_values[HUMAN]) ;
  1246. X!       items[(int) WHITE_PLAYS].value = HUMAN ;
  1247. X!       STRCPY(items[(int) WHITE_PLAYS].text, player_values[HUMAN]) ; 
  1248. X!     }
  1249. X! 
  1250. X!   color = (iscolor[(int) cur_dpyno]) ? C_BEIGE : C_WHITE ;
  1251. X!   draw_choice(W_PROPS, COMP_CHOICE, color) ;
  1252. X! 
  1253. X!   val = items[(int) BLACK_PLAYS].value ;
  1254. X!   val = items[(int) WHITE_PLAYS].value ;
  1255. X! 
  1256. X!   if (next_player == BLACK) curi = items[(int) BLACK_PLAYS].value ;
  1257. X!   else                      curi = items[(int) WHITE_PLAYS].value ;
  1258. X!   if (curi == COMPUTER)
  1259. X!     if ((next_player == BLACK && cmode == BLACK_START) ||
  1260. X!         (next_player == WHITE && cmode == WHITE_START))
  1261. X!       computer_move(next_player) ;
  1262. X  }
  1263. X  
  1264. X  
  1265. X  void
  1266. X! set_option()
  1267. X  {
  1268. X!   char str[4] ;
  1269. X!   int color, d, maxw, n, val ;
  1270. X! 
  1271. X!   d = (int) cur_dpyno ;
  1272. X!   switch (itemno)
  1273. X!     {
  1274. X!       case COMP_CHOICE : maxw = items[itemno].width / items[itemno].nopts ;
  1275. X!                          val = (curx - items[itemno].x) / maxw ;
  1276. X!                          if (val != CP_BOTH)
  1277. X!                            {
  1278. X!                              items[itemno].value = val ;
  1279. X!                              set_computer(val) ;
  1280. X!                            }
  1281. X!                          else message(PANEL_MES,
  1282. X!                                "Computer plays both is not implemented yet.") ;
  1283. X!                          break ;
  1284. X! 
  1285. X!       case DIFF_CHOICE : maxw = items[itemno].width / items[itemno].nopts ;
  1286. X!                          val = (curx - items[itemno].x) / maxw ;
  1287. X!                          level = val + 1 ;
  1288. X!                          items[itemno].value = val ;
  1289. X!                          color = (iscolor[d]) ? C_BEIGE : C_WHITE ;
  1290. X!                          draw_choice(W_PROPS, DIFF_CHOICE, color) ;
  1291. X!                          break ;
  1292. X! 
  1293. X!       case MAX_DEPTH   : val = items[itemno].value ;
  1294. X!                          if (direction == INCREMENT && val < MAX_PROFMAX)
  1295. X!                            items[itemno].value++ ;
  1296. X!                          else if (direction == DECREMENT && val > INIT_DEPTH)
  1297. X!                            items[itemno].value-- ;
  1298. X!                          SPRINTF(str, "%d", items[itemno].value) ;
  1299. X!                          color = (iscolor[d]) ? C_LGREY : C_WHITE ;
  1300. X!                          set_cycle(W_PROPS, MAX_DEPTH, str) ;
  1301. X!                          profmax = items[itemno].value ;
  1302. X!                          level = 1 ;
  1303. X!                          break ;
  1304. X! 
  1305. X!       case OPT_ANIM    : ANIMATION   = !ANIMATION ;
  1306. X!                          break ;
  1307. X! 
  1308. X!       case OPT_BEST    : DO_BESTMOVE = !DO_BESTMOVE ;
  1309. X!                          break ;
  1310. X! 
  1311. X!       case OPT_LAST    : DO_LAST     = !DO_LAST ;
  1312. X!                          n = 63 - board.moves_left ;
  1313. X!                          show_last(moves[n].move, DO_LAST) ;
  1314. X!                          break ;
  1315. X! 
  1316. X!       case OPT_EVAL    : SHOW_NOTES  = !SHOW_NOTES ;
  1317. X!                          if (!SHOW_NOTES) message(EVAL_MES, "") ;
  1318. X!                          break ;
  1319. X! 
  1320. X!       case OPT_NUM     : DO_NUMBER   = !DO_NUMBER ;
  1321. X!                          n = 63 - board.moves_left ;
  1322. X!                          show_number(moves[n].move, 60 - board.moves_left,
  1323. X!                                      DO_NUMBER, DO_NUMBER) ;
  1324. X!                          break ;
  1325. X! 
  1326. X!       case OPT_FLIP    : QUICKGAME   = !QUICKGAME ;
  1327. X!     }
  1328. X  }
  1329. X  
  1330. X  
  1331. X***************
  1332. X*** 212,229 ****
  1333. X    long note ;
  1334. X  
  1335. X    if (cmode == GAME_OVER) return ;
  1336. X    if (cmode == WHITE_START) player = WHITE ;
  1337. X    else                      player = BLACK ;
  1338. X    suggestion = FALSE ;   /* Make sure the computer clock isn't decremented. */
  1339. X    play_reve(&board.square[0], player, level, &suggestion, ¬e) ;
  1340. X! 
  1341. X!   suggest_x = BBORDER + ((suggestion & 7)  + 1) * CELL_SIZE - CELL_SIZE / 2 ;
  1342. X!   suggest_y = BBORDER + ((suggestion >> 3) + 1) * CELL_SIZE - CELL_SIZE / 2 ;
  1343. X!   draw_line(suggest_x-5, CY+suggest_y-5,
  1344. X!             suggest_x+5, CY+suggest_y+5, RSRC, C_BLACK) ;
  1345. X!   draw_line(suggest_x-5, CY+suggest_y+5,
  1346. X!             suggest_x+5, CY+suggest_y-5, RSRC, C_BLACK) ;
  1347. X!   if (show_notes) set_eval(player, suggestion, note) ;
  1348. X  }
  1349. X  
  1350. X  
  1351. X--- 271,286 ----
  1352. X    long note ;
  1353. X  
  1354. X    if (cmode == GAME_OVER) return ;
  1355. X+   set_cursor(HOURGLASS) ;
  1356. X    if (cmode == WHITE_START) player = WHITE ;
  1357. X    else                      player = BLACK ;
  1358. X    suggestion = FALSE ;   /* Make sure the computer clock isn't decremented. */
  1359. X+ #ifdef XVIEW
  1360. X+   write_to_reve(M_SUGGESTION, board.square, player, level, &move, ¬e) ;
  1361. X+ #else
  1362. X    play_reve(&board.square[0], player, level, &suggestion, ¬e) ;
  1363. X!   do_suggest(player, suggestion, note, IS_ON) ;
  1364. X! #endif /*XVIEW*/
  1365. X  }
  1366. X  
  1367. X  
  1368. X***************
  1369. X*** 252,266 ****
  1370. X  undo_move(player)
  1371. X  int player ;
  1372. X  {
  1373. X!   int i, n, x, y ;
  1374. X  
  1375. X!   n = 62 - board.moves_left ;
  1376. X!   while (moves[n-1].player == player) n-- ;
  1377. X  
  1378. X!   if (n >= 3)
  1379. X      {
  1380. X!       show_last(last_move, IS_OFF) ;
  1381. X!       show_number(last_move, IS_OFF) ;
  1382. X        FOR_BOARD(i)
  1383. X          {
  1384. X            if (moves[n].square[i] != board.square[i])
  1385. X--- 309,325 ----
  1386. X  undo_move(player)
  1387. X  int player ;
  1388. X  {
  1389. X!   int i, limit, n, x, y ;
  1390. X  
  1391. X!   n = 63 - board.moves_left ;
  1392. X!   while (moves[n].player != player) n-- ;
  1393. X  
  1394. X!   limit = (items[(int) BLACK_PLAYS].value == COMPUTER) ? 4 : 3 ;
  1395. X!   if (n >= limit)
  1396. X      {
  1397. X!       if (DO_LAST) show_last(last_move, IS_OFF) ;
  1398. X!       if (DO_NUMBER) show_number(last_move, 60 - board.moves_left, IS_OFF) ;
  1399. X!       do_suggest(player, suggestion, note, IS_OFF) ;
  1400. X        FOR_BOARD(i)
  1401. X          {
  1402. X            if (moves[n].square[i] != board.square[i])
  1403. X***************
  1404. X*** 267,273 ****
  1405. X              {
  1406. X                get_xy(i, &x, &y) ;
  1407. X                if (moves[n].square[i] == FREE)
  1408. X!                 color_area(x, CY+y, PSIZE, PSIZE,
  1409. X                             (iscolor[(int) cur_dpyno]) ? C_LBROWN : C_WHITE) ;
  1410. X                else draw_piece(moves[n].square[i], x, CY+y, RSRC) ;
  1411. X              }
  1412. X--- 326,332 ----
  1413. X              {
  1414. X                get_xy(i, &x, &y) ;
  1415. X                if (moves[n].square[i] == FREE)
  1416. X!                 color_area(W_MAIN, x, CY+y, PSIZE, PSIZE,
  1417. X                             (iscolor[(int) cur_dpyno]) ? C_LBROWN : C_WHITE) ;
  1418. X                else draw_piece(moves[n].square[i], x, CY+y, RSRC) ;
  1419. X              }
  1420. X***************
  1421. X*** 290,295 ****
  1422. X--- 349,358 ----
  1423. X  
  1424. X        timeleft = board.timeleft ;
  1425. X  
  1426. X+ #ifdef XVIEW
  1427. X+       reset_time(timeleft) ;
  1428. X+ #endif /*XVIEW*/
  1429. X+ 
  1430. X        if (OPPONENT(player) == BLACK) cmode = BLACK_START ;
  1431. X        else                           cmode = WHITE_START ;
  1432. X        message(PANEL_MES, "") ;
  1433. X***************
  1434. X*** 296,304 ****
  1435. X  
  1436. X        if (n > 3)
  1437. X          {
  1438. X!           show_last(last_move, IS_ON) ;
  1439. X!           show_number(last_move, IS_ON) ;
  1440. X!           if (show_notes) set_eval(board.player, board.move, board.note) ;
  1441. X          }
  1442. X        else message(EVAL_MES, "") ;
  1443. X        next_player = OPPONENT(board.player) ;
  1444. X--- 359,367 ----
  1445. X  
  1446. X        if (n > 3)
  1447. X          {
  1448. X!           if (DO_LAST) show_last(last_move, IS_ON) ;
  1449. X!           if (DO_NUMBER) show_number(last_move, 60 - board.moves_left, IS_ON) ;
  1450. X!           if (SHOW_NOTES) set_eval(board.player, board.move, board.note) ;
  1451. X          }
  1452. X        else message(EVAL_MES, "") ;
  1453. X        next_player = OPPONENT(board.player) ;
  1454. X
  1455. END_OF_FILE
  1456. if test 47790 -ne `wc -c <'patches03c'`; then
  1457.     echo shar: \"'patches03c'\" unpacked with wrong size!
  1458. fi
  1459. # end of 'patches03c'
  1460. fi
  1461. echo shar: End of archive 6 \(of 9\).
  1462. cp /dev/null ark6isdone
  1463. MISSING=""
  1464. for I in 1 2 3 4 5 6 7 8 9 ; do
  1465.     if test ! -f ark${I}isdone ; then
  1466.     MISSING="${MISSING} ${I}"
  1467.     fi
  1468. done
  1469. if test "${MISSING}" = "" ; then
  1470.     echo You have unpacked all 9 archives.
  1471.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  1472. else
  1473.     echo You still need to unpack the following archives:
  1474.     echo "        " ${MISSING}
  1475. fi
  1476. ##  End of shell archive.
  1477. exit 0
  1478.