home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / src / Games / reve / reve.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-05-03  |  19.5 KB  |  502 lines

  1.  
  2. /*  @(#)reve.h 1.26 91/11/13
  3.  *
  4.  *  Definitions used by the reve program.
  5.  *
  6.  *  Copyright (C) 1990, 1991 - Rich Burridge & Yves Gallot.
  7.  *  All rights reserved.
  8.  *
  9.  *  Permission is granted to copy this source, for redistribution
  10.  *  in source form only, provided the news headers in "substantially
  11.  *  unaltered format" are retained, the introductory messages are not
  12.  *  removed, and no monies are exchanged.
  13.  *
  14.  *  Permission is also granted to copy this source, without the
  15.  *  news headers, for the purposes of making an executable copy by
  16.  *  means of compilation, provided that such copy will not be used
  17.  *  for the purposes of competition in any othello tournaments, without
  18.  *  prior permission from the authors.
  19.  *
  20.  *  No responsibility is taken for any errors on inaccuracies inherent
  21.  *  either to the comments or the code of this program, but if reported
  22.  *  (see README file), then an attempt will be made to fix them.
  23.  */
  24.  
  25. #include <stdio.h>
  26. #include <sys/types.h>
  27.  
  28. #ifdef SYSV
  29. #include <string.h>
  30. #include <sys/times.h>
  31. #else
  32. #include <strings.h>
  33. #include <sys/time.h>
  34. #endif /*SYSV*/
  35.  
  36. /* For all function declarations, if ANSI then use a prototype. */
  37.  
  38. #if  defined(__STDC__)
  39. #define P(args)  args
  40. #else  /* ! __STDC__ */
  41. #define P(args)  ()
  42. #endif  /* STDC */
  43.  
  44. #define  ALARM         (void) alarm       /* To make lint happy. */
  45. #define  CLOSE         (void) close
  46. #define  DUP2          (void) dup2
  47. #define  FCLOSE        (void) fclose
  48. #define  FFLUSH        (void) fflush
  49. #define  FGETS         (void) fgets
  50. #define  FSEEK         (void) fseek
  51. #define  FPRINTF       (void) fprintf
  52. #define  GETHOSTNAME   (void) gethostname
  53. #define  GETTIMEOFDAY  (void) gettimeofday
  54. #define  IOCTL         (void) ioctl
  55. #define  KILL          (void) kill
  56. #define  MEMCPY        (void) memcpy
  57. #define  PCLOSE        (void) pclose
  58. #define  PIPE          (void) pipe
  59. #define  POLL          (void) poll
  60. #define  PRINTF        (void) printf
  61. #define  PUTC          (void) putc
  62. #define  READ          (void) read
  63. #define  SSCANF        (void) sscanf
  64. #define  SELECT        (void) select
  65. #define  SETJMP        (void) setjmp
  66. #define  SIGNAL        (void) signal
  67. #define  SPRINTF       (void) sprintf
  68. #define  STRCAT        (void) strcat
  69. #define  STRCPY        (void) strcpy
  70. #define  STRNCAT       (void) strncat
  71. #define  STRNCPY       (void) strncpy
  72. #define  WRITE         (void) write
  73.  
  74. #define  BBORDER       15       /* Width of the reve border. */
  75. #define  BOARD_SIZE    8        /* 8x8 playing board */
  76. #define  BGAP          10       /* Width of the gap between buttons. */
  77. #define  BHEIGHT       32       /* Height of a reve button item. */
  78. #define  BWIDTH        64       /* Width of a reve button item. */
  79. #define  CGAP          4        /* Size of the gap for a cycle item. */
  80. #define  CHEIGHT       20       /* Height of a reve cycle item. */
  81. #define  CHOICEGAP     5        /* Gap between choices in a choice item. */
  82. #define  CLHEIGHT      32       /* Height of a reve clock item. */
  83. #define  CLWIDTH       64       /* Width of a reve clock item. */
  84. #define  CWIDTH        32       /* Width of a reve cycle item. */
  85. #define  MAXBOARDSIZE  750      /* Maximum size of reve game board. */
  86. #define  MAXPRAD       32       /* Maximum game board piece radius. */
  87. #define  MINBOARDSIZE  200      /* Minimum size of reve game board. */
  88. #define  NOBUTS        6        /* Number of reve buttons. */
  89. #define  NOPROWS       11       /* Number of rows of items on property win. */
  90. #define  PIECE_MARGIN  8
  91. #define  PIECE_RAD     (CELL_SIZE / 2 - PIECE_MARGIN)
  92. #define  SHEIGHT       16       /* Height of a game board special symbol. */
  93. #define  SWIDTH        16       /* Width of a game board special symbol. */
  94.  
  95. #define  BOARD_DIM     (8 * CELL_SIZE) + (2 * BBORDER)
  96. #define  CELL_SIZE     54
  97. #define  NOROWS        7        /* Number of rows of reve items. */
  98. #define  PANEL_HEIGHT  ((NOROWS*BHEIGHT) + ((NOROWS-1)*BGAP) + (2*BBORDER))
  99. #define  PANEL_WIDTH   ((NOBUTS*BWIDTH)  + ((NOBUTS-1)*BGAP) + (2*BBORDER))
  100.  
  101. /* States that the the Reve squares can be in. */
  102. #define  BLACK         (-1)    /* Piece definitions. */
  103. #define  FREE          0
  104. #define  WHITE         1
  105. #define  JPJ           2       /* A square where the computer can play. */
  106. #define  TPJ           (-2)    /* A square where the opponent can play. */
  107.  
  108. #define  FALSE         0       /* Boolean definitions. */
  109. #define  TRUE          1
  110.  
  111. #define  HUMAN         0       /* Player definitions. */
  112. #define  COMPUTER      1
  113.  
  114. #define  BACKSPACE      8       /* Used for filename construction. */
  115. #define  DEL            127
  116. #define  LINEFEED       13
  117. #define  RETURN         10
  118.  
  119. #define  CTL(n)        n - 96  /* Control characters. */
  120. #define  ESCAPE        27      /* ASCII escape character. */
  121. #define  EQUAL(a, b)   !strncmp(a, b, strlen(b))
  122. #define  FOR_BOARD(i)  for (i = 0; i < 64; i++)
  123. #define  HELP_COLS     80      /* Number of columns in help window. */
  124. #define  HELP_ROWS     60      /* Number of rows in help window. */
  125. #define  ICONHEIGHT    64      /* Height in pixels for reve icon. */
  126. #define  ICONWIDTH     64      /* Width in pixels of reve icon. */
  127. #define  INC           argc-- ; argv++ ;
  128. #define  INIT_DEPTH    1
  129. #define  ISMOVE(pos, player) \
  130.          (nextmove(pos, NOMOVE, (BOARD *) NULL, player) != NOMOVE)
  131. #define  MAXCHOICES    7       /* Limit on number of choices for cyclic. */
  132. #define  MAXCURSORS    3       /* Maximum number of cursor types. */
  133. #define  MAXDIFF       9       /* Number of levels of difficulty. */
  134. #define  MAXFONTS      4       /* Maximum number of font types. */
  135. #define  MAXIMAGES     13      /* Maximum number of image types. */
  136. #define  MAXITEMS      33      /* Number of different panel items. */
  137.  
  138. #ifndef  MAXLINE
  139. #define  MAXLINE       120     /* Length of character strings. */
  140. #endif /*!MAXLINE*/
  141.  
  142. #define  MAXPAGES      12      /* Maximum number of pages in reve help file. */
  143. #define  MAX_PROFMAX   60      /* Maximum search depth. */
  144. #define  NIVEAUMAX     25      /* Maximum possible depth. */
  145.  
  146. #ifdef  NOINDEX
  147. #define  index         strchr
  148. #endif /*NOINDEX*/
  149.  
  150. #define  NOMOVE        -1
  151. #define  OPPONENT(p)   p * -1
  152.  
  153. #ifdef SYSV
  154.  
  155. /* SysV (at least 5.2) does not support usleep. Makes little difference. */
  156.  
  157. #ifdef sco
  158. #define  PAUSE         nap(500)        /* 0.5 seconds */
  159. #else /*sco*/
  160. #define  PAUSE         sleep(1)
  161. #endif /*sco*/
  162. #else /*SYSV*/
  163. #define  PAUSE         usleep(500000)    /* 0.5 second. */
  164. #endif /*SYSV*/
  165.  
  166. #define  PROPS_HEIGHT  ((NOPROWS*BHEIGHT) + ((NOPROWS-1)*BGAP) + (2*BBORDER))
  167. #define  PROPS_WIDTH   ((NOBUTS*BWIDTH)   + ((NOBUTS-1)*BGAP)  + (2*BBORDER))
  168. #define  PSIZE         40      /* Diameter of playing piece. */
  169.  
  170. #define  B_COLOR(c)   (iscolor ? c : C_BLACK)
  171. #define  W_COLOR(c)   (iscolor ? c : C_WHITE)
  172.  
  173. #define  TICKHEIGHT    16      /* Height of the tick toggle box. */
  174. #define  TICKWIDTH     16      /* Width of the tick toggle box. */
  175.  
  176. #ifndef  EDGENAME
  177. #define  EDGENAME      "reve.edgetable"
  178. #endif /*!EDGENAME*/
  179.  
  180. #ifndef  HELPNAME
  181. #define  HELPNAME      "reve.help"
  182. #endif /*!HELPNAME*/
  183.  
  184. #ifndef  REVEPROC
  185. #define  REVEPROC      "reve_proc"
  186. #endif /*!REVEPROC*/
  187.  
  188. #ifndef  INT_SIGNAL
  189. #define  SIGRET        void
  190. #else
  191. #define  SIGRET        int
  192. #endif /*!INT_SIGNAL*/
  193.  
  194. #define  VINVUL        50
  195.  
  196. #define  CP_WHITE           0          /* Computer plays: choices. */
  197. #define  CP_BLACK           1
  198. #define  CP_NEITHER         2
  199. #define  CP_BOTH            3
  200.  
  201. /* Aliases for the property sheet item values. */
  202. #define  ANIMATION        items[(int) OPT_ANIM].value
  203. #define  DO_BESTMOVE      items[(int) OPT_BEST].value
  204. #define  DO_LAST          items[(int) OPT_LAST].value
  205. #define  SHOW_NOTES       items[(int) OPT_EVAL].value
  206. #define  DO_NUMBER        items[(int) OPT_NUM].value
  207. #define  QUICKGAME        items[(int) OPT_FLIP].value
  208. #define  SHOW_LEGAL       items[(int) OPT_MOVE].value
  209. #define  DO_CLOCK         items[(int) OPT_CLK].value
  210.  
  211. /* Various pseudo events used by the Reve program. */
  212. #define  BOARD_REPAINT    100    /* Game board window needs repainting. */
  213. #define  PANEL_REPAINT    101    /* Control panel window needs repainting. */
  214. #define  PROPS_REPAINT    102    /* Property window needs repainting. */
  215. #define  HELP_REPAINT     103    /* Help window needs repainting. */
  216. #define  ENTER_WINDOW     104    /* Mouse has entered the reve window. */
  217. #define  EXIT_WINDOW      105    /* Mouse has exited reve window. */
  218. #define  LEFT_DOWN        106    /* Left mouse button was depressed. */
  219. #define  LEFT_UP          107    /* Left mouse button was debounced. */
  220. #define  MIDDLE_DOWN      108    /* Middle mouse button was depressed. */
  221. #define  MIDDLE_UP        109    /* Middle mouse button was debounced. */
  222. #define  RIGHT_DOWN       110    /* Right mouse button was depressed. */
  223. #define  RIGHT_UP         111    /* Right mouse button was debounced. */
  224. #define  KEYBOARD         112    /* Keyboard character has been pressed. */
  225. #define  MOUSE_MOVING     113    /* Mouse is moving. */
  226. #define  IGNORE_EVENT     114    /* No interest in this event. */
  227.  
  228. /* Batch, last move, locking or show all direction (ON or OFF). */
  229. enum bltype   { IS_OFF, IS_ON } ;
  230.  
  231. /* Reve move status. */
  232. enum cantype  { BLACK_START, BLACK_MOVING,
  233.                 WHITE_START, WHITE_MOVING, GAME_OVER } ;
  234.  
  235. /* Current cursor type. */
  236. enum curtype  { CANVASCUR, HOURGLASS, NOCURSOR } ;
  237.  
  238. enum disp_type { XBLACK, XBOTH, XWHITE } ;        /* Possible displays. */
  239.  
  240. enum font_type { BFONT, GFONT, HFONT, NFONT} ;    /* Text font definitions. */
  241.  
  242. enum gr_type { GSUNVIEW, GTTY, GX11, GXVIEW } ;   /* Graphical systems. */
  243.  
  244. /* Different types of graphic images. */
  245. enum image_type { BUT_NORMAL, BUT_INVERT, BUT_STENCIL,
  246.                   CY_NORMAL, CY_LINVERT, CY_RINVERT, CY_STENCIL,
  247.                   TOGGLE_ON, TOGGLE_OFF, P_WHITE, P_BLACK,
  248.                   S_MOVE, S_SUGGEST } ;
  249.  
  250. /* Different types of panel items. */
  251. enum item_type { P_BUTTON, P_CHOICE, P_CLOCK, P_CYCLE, P_MESSAGE, P_TOGGLE } ;
  252.  
  253. /* XView reve_proc move operations. */
  254. enum move_type { M_BEST, M_MOVE, M_PROFMAX, M_SUGGESTION, M_TIME } ;
  255.  
  256. /* Different panel items. */
  257. enum panel_type { LOAD_BUT,    MOVES_BUT,    NEW_GAME_BUT, HELP_BUT,
  258.                   REDO_BUT,    PROPS_BUT,    SAVE_BUT,     SUGGEST_BUT,
  259.                   PRINT_BUT,   STOP_BUT,     UNDO_BUT,     CANCEL_BUT,
  260.                   QUIT_BUT,    BLACK_PLAYS,  WHITE_PLAYS,  BLACK_CLOCK,
  261.                   WHITE_CLOCK, PANEL_MES,
  262.                   EVAL_MES,    SCORE_MES,    TURN_MES,     COMP_CHOICE,
  263.                   DIFF_CHOICE, MAX_DEPTH,    OPT_ANIM,     OPT_BEST,
  264.                   OPT_LAST,    OPT_EVAL,     OPT_NUM,      OPT_FLIP,
  265.                   OPT_MOVE,    OPT_CLK,      HELP_PAGE } ;
  266.  
  267. /* X resources used by reve. */
  268. enum res_type { R_ANIMATE, R_BESTMOVE,  R_BOARDSIZE,  R_CLOCK,
  269.                 R_DIFFICULTY,
  270.                 R_LAST,    R_LEGALMOVE, R_LOG,        R_NOTES,
  271.                 R_NUMBER,  R_QUICK,     R_PANELC,     R_BOARDC,
  272.                 R_BOARDBC, R_GRIDC,     R_TEXTC,      R_ITEMC,
  273.                 R_BSTONEC, R_WSTONEC,   R_PROPS,      R_HELP,
  274.                 R_BFONT,   R_GFONT,     R_HFONT,      R_NFONT,
  275.                 R_BSTONEN, R_WSTONEN,   R_PCMD,       R_OPPICON,
  276.                 R_OPPBELL, R_OPPRAISE } ;
  277.  
  278. enum set_type { INCREMENT, DECREMENT, NONE } ;   /* Cycle directions. */
  279.  
  280. enum optype   { RCLR, RINV, RSRC } ;       /* Rasterop codes. */
  281.  
  282. enum playtype { PLAY_BLACK, PLAY_WHITE } ; /* What the computer is playing. */
  283.  
  284. enum win_type { W_BOARD, W_HELP, W_PANEL, W_PROPS } ;    /* Window types. */
  285.  
  286. extern char *getenv(), *getlogin(), *index(), *malloc() ;
  287. extern void exit() ;
  288.  
  289. typedef struct {
  290.   int square[64] ;
  291.   int player ;
  292.   int move ;
  293.   int moves_left ;
  294.   long note ;
  295.   time_t timeleft ;
  296. } BOARD ;
  297.  
  298. struct iteminfo {           /* Item information record. */
  299.   enum win_type wtype ;     /* Which window the item goes in. */
  300.   enum item_type type ;     /* Item type. */
  301.   int lx ;                  /* X position of the label for this item. */
  302.   int ly ;                  /* Y position of the label for this item. */
  303.   char label[30] ;          /* Label for this item (possibly NULL). */
  304.   int x ;                   /* X position of this panel item. */
  305.   int y ;                   /* Y position of this panel item. */
  306.   int width ;               /* Width of this panel item. */
  307.   int height ;              /* Height of this panel item. */
  308.   char text[60] ;           /* Text string associated with this item. */
  309.   int value ;               /* Current value of item. */
  310.   char **options ;          /* Pointer to list of choice strings. */
  311.   int nopts ;               /* Number of options in list. */
  312.   void (*func)() ;          /* Function to obey for this panel item. */
  313. } ;
  314.  
  315. struct reve_in {     /* Input supplied on standard input to reve_proc. */
  316.   enum move_type type ;
  317.   int board[64] ;
  318.   int player ;
  319.   int level ;
  320.   time_t timeleft ;
  321. } ;
  322.  
  323. struct reve_out {    /* Results written to standard output by reve_proc. */
  324.   enum move_type type ;
  325.   int move ;
  326.   int note ;
  327.   int depth ;
  328. } ;
  329.  
  330. FILE *find_file         P((char *)) ;
  331.  
  332. char *get_resource      P((enum res_type)) ;
  333. char *getuserhost       P(()) ;
  334.  
  335. int check               P((int)) ;
  336. int count               P((BOARD *, int)) ;
  337. int formfliplist        P((int, int)) ;
  338. int fork_child          P(()) ;
  339. int get_bool_resource   P((enum res_type, int *)) ;
  340. int get_int_resource    P((enum res_type, int *)) ;
  341. int get_str_resource    P((enum res_type, char *)) ;
  342. int get_strwidth        P((enum font_type, char *)) ;
  343. int init_ws_type        P(()) ;
  344. int is_local            P(()) ;
  345. int legal               P((int, int, BOARD *)) ;
  346. int jejoueen            P((int, int, int)) ;
  347. int jepeuxjouer         P((int)) ;
  348. int load_move           P((int, int)) ;
  349. int main                P((int, char **)) ;
  350. int play_reve           P((int *, int, int, int *, long *)) ;
  351. int sandwich            P((int)) ;
  352. int tujouesen           P((int, int, int)) ;
  353. int tupeuxjouer         P((int)) ;
  354. int valid_move          P((BOARD *, int)) ;
  355.  
  356. long evalue             P((int)) ;
  357.  
  358. void animate_move       P((int)) ;
  359. void batch              P((enum bltype)) ;
  360. void beep               P(()) ;
  361. void check_button_down  P((enum panel_type)) ;
  362. void check_choice_down  P((enum panel_type)) ;
  363. void check_cycle_down   P((enum panel_type)) ;
  364. void check_item_down    P(()) ;
  365. void check_item_up      P(()) ;
  366. void check_toggle_down  P((enum panel_type)) ;
  367. void close_reve         P(()) ;
  368. void color_area         P((enum win_type, int, int, int, int, int)) ;
  369. void connect_io         P(()) ;
  370. void create_menu        P(()) ;
  371. void destroy_reve       P(()) ;
  372. void display_help       P(()) ;
  373. void display_time       P((int)) ;
  374. void do_action          P(()) ;
  375. void do_edit            P(()) ;
  376. void do_help            P(()) ;
  377. void do_key             P((int, int)) ;
  378. void do_key_move        P((int, int)) ;
  379. void do_move            P((int)) ;
  380. void do_opponent_move   P((int)) ;
  381. void do_props           P(()) ;
  382. void do_selection       P((int)) ;
  383. void do_stop            P(()) ;
  384. void do_suggest         P((int, int, int, enum bltype)) ;
  385. void domove             P((BOARD *, int, BOARD *, int)) ;
  386. void done               P(()) ;
  387. void draw_button        P((enum win_type, enum panel_type,
  388.                            int, enum image_type)) ;
  389. void draw_choice        P((enum win_type, enum panel_type, int)) ;
  390. void draw_clock         P((enum win_type, enum panel_type, int)) ;
  391. void draw_cycle         P((enum win_type, enum panel_type,
  392.                            int, enum image_type)) ;
  393. void draw_cycle_item    P((enum win_type, enum panel_type,
  394.                            int, enum image_type)) ;
  395. void draw_filename      P((char *)) ;
  396. void draw_image         P((enum win_type, int, int, int, int,
  397.                            enum image_type)) ;
  398. void draw_line          P((enum win_type, int, int, int, int,
  399.                            enum optype, int)) ;
  400. void draw_outline       P((int, enum bltype)) ;
  401. void draw_piece         P((int, int, int, enum optype)) ;
  402. void draw_rect          P((enum win_type, int, int, int, int,
  403.                            enum optype, int)) ;
  404. void draw_square        P((int, enum bltype, int)) ;
  405. void draw_stencil       P((enum win_type, int, int, int, int, enum optype,
  406.                            int, enum image_type, enum image_type)) ;
  407. void draw_symbol        P((enum image_type, int, enum bltype)) ;
  408. void draw_text          P((enum win_type, int, int, enum font_type,
  409.                            int, char *)) ;
  410. void draw_textfield     P(()) ;
  411. void draw_toggle        P((enum win_type, enum panel_type, int)) ;
  412. void end_msgs           P(()) ;
  413. void generate_graphics  P((int, char **)) ;
  414. void get_addrs          P((char *, char *)) ;
  415. void get_display        P((int, char **)) ;
  416. void get_filename       P(()) ;
  417. void get_options        P((int, char **)) ;
  418. void get_xy             P((int, int *, int *)) ;
  419. void getparam           P((char *, char **, char *)) ;
  420. void handle_board_event P(()) ;
  421. void handle_event       P(()) ;
  422. void handle_item        P((int)) ;
  423. void handle_key         P(()) ;
  424. void init_canvas        P(()) ;
  425. void init_clocks        P(()) ;
  426. void init_edge_table    P(()) ;
  427. void init_help_file     P((char *)) ;
  428. void init_fonts         P(()) ;
  429. void init_graphics      P((int *, char **)) ;
  430. void initboard          P(()) ;
  431. void initialise         P(()) ;
  432. void invite_remote      P(()) ;
  433. void load_and_move      P(()) ;
  434. void load_game          P(()) ;
  435. void load_resources     P(()) ;
  436. void lock_screen        P((enum bltype)) ;
  437. void make_canvas        P(()) ;
  438. void make_frame         P((int, char **)) ;
  439. void make_help_window   P((int, char **)) ;
  440. void make_icon          P(()) ;
  441. void make_message       P((enum win_type, enum panel_type)) ;
  442. void make_move          P(()) ;
  443. void make_pieces        P((int, int)) ;
  444. void message            P((enum panel_type, char *)) ;
  445. void nap_upto           P((int)) ;
  446. void new_game           P(()) ;
  447. void open_ctl           P(()) ;
  448. void open_reve          P(()) ;
  449. void open_socket        P(()) ;
  450. void opponent_move      P((int)) ;
  451. void opt_toggle         P((int *)) ;
  452. void paint_all          P(()) ;
  453. void paint_board        P(()) ;
  454. void paint_help         P(()) ;
  455. void paint_help_text    P(()) ;
  456. void paint_panel        P(()) ;
  457. void paint_prop_sheet   P(()) ;
  458. void position_popup     P(()) ;
  459. void print_game         P(()) ;
  460. void process_event      P(()) ;
  461. void raise_reve         P(()) ;
  462. void read_resources     P(()) ;
  463. void read_from_reve     P((int)) ;
  464. void read_from_sock     P((int)) ;
  465. void read_str           P((char **, char *)) ;
  466. void redo               P(()) ;
  467. void redo_move          P((int)) ;
  468. void remove_textfield   P(()) ;
  469. void reset_clock        P((int)) ;
  470. void reset_time         P((time_t)) ;
  471. void save_game_to       P((FILE *)) ;
  472. void save_game          P(()) ;
  473. void set_computer       P((int)) ;
  474. void set_config         P((enum disp_type)) ;
  475. void set_cursor         P((enum curtype)) ;
  476. void set_cycle          P((enum win_type, enum panel_type, char *)) ;
  477. void set_display_types  P(()) ;
  478. void set_eval           P((int, int, long)) ;
  479. void set_frame          P((enum win_type, int)) ;
  480. void set_option         P(()) ;
  481. void set_score          P(()) ;
  482. void set_timer          P(()) ;
  483. void set_turn           P((int)) ;
  484. void show_all           P((enum bltype)) ;
  485. void show_all_moves     P(()) ;
  486. void show_best          P((int, long)) ;
  487. void show_last          P((int, enum bltype)) ;
  488. void show_number        P((int, int, enum bltype)) ;
  489. void start_msgs         P(()) ;
  490. void start_tool         P((enum disp_type)) ;
  491. void suggest            P(()) ;
  492. void think              P(()) ;
  493. void undo               P(()) ;
  494. void undo_move          P((int)) ;
  495. void update_board_image P((int, int)) ;
  496. void update_clock       P((int, int)) ;
  497. void update_pieces      P((int, int)) ;
  498. void usage              P(()) ;
  499. void who_wins           P(()) ;
  500. void write_to_reve      P((enum move_type, int *, int, int)) ;
  501. void write_to_sock      P((int, int)) ;
  502.