home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / misc / volume18 / notation / part01 / drivers.h < prev    next >
Encoding:
C/C++ Source or Header  |  1991-04-13  |  1.6 KB  |  79 lines

  1. /* notation program */
  2. /* headers for output drivers */
  3. #ifndef _HEADERS_DRIVERS
  4. #define HEADERS_DRIVERS
  5.  
  6.  
  7. #define D_ASCII  0
  8. #define D_POST   1
  9. #define D_TEX    2
  10. #define D_ROFF   3
  11. #define D_XCHESS 4
  12. #define D_GNU    5
  13.  
  14. #define NB_DRIVER 6
  15.  
  16.  
  17.  
  18. #define PS_HEADER  "Header.ps"
  19. #define PS_FOOTER  "Footer.ps"
  20. #define TEX_HEADER "Header.tex"
  21.  
  22.  
  23. /* output buffers */
  24. #define TAMPON 256
  25.  
  26. typedef struct {
  27.  
  28.   /* type of driver */
  29.   int type ;
  30.  
  31.   /* output_file */
  32.   FILE *outfile ;
  33.   /* these  booleans control the output format */
  34.   int print_move    ;  /* move numbering */
  35.   int print_piece   ;  /* print piece name */
  36.   int print_pawn    ; /* print the PAWN name */
  37.   int roque_alg     ; /*  roque in algebraic form Ke1g1 or O-O */
  38.   int print_liaison ; /* print the - or x in move output */
  39.   int only_board ;
  40.  
  41.   int variation_level ;
  42.  
  43.   /* boolean to print the coordinates in ascii output of board */
  44.   int coordinates   ;
  45.   int output_move_format ;
  46.  
  47.   char *out_table;    /* translation table */
  48.  
  49.   /* procedures */
  50.   void (*out_init)() ;
  51.   void (*out_move)() ;
  52.   void (*out_board)() ;
  53.   void (*out_end)() ;
  54.  
  55.   /* temp vars  used by move buffering */
  56.  
  57.   int iswhiteturn ; /*= FALSE */
  58.   int interrupt ; /*= FALSE */
  59.  
  60.   char move_buffer[TAMPON]  /*= ""*/ ;
  61.   char white_buffer[TAMPON] /*= ""*/ ;
  62.   char black_buffer[TAMPON] /*= ""*/ ;
  63.  
  64.  
  65. } format ;
  66.  
  67.  
  68. /* fonctions ----------------- */
  69.  
  70. extern void output_init(/*format *dr*/);
  71. extern void output_move(/*format *dr, depl *d*/);
  72. extern void output_board(/*format *dr, game *g*/);
  73. extern void output_end(/*format *dr*/);
  74.  
  75. extern format *new_driver(/*void*/);
  76. extern void init_driver(/*format *dr, int driver, int olboard*/);
  77.  
  78. #endif
  79.