Rev 33 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 33 | Rev 108 | ||
---|---|---|---|
Line 62... | Line 62... | ||
62 | # define tL 256 |
62 | # define tL 256 |
63 | /* EPD I/O buffer length */ |
63 | /* EPD I/O buffer length */ |
64 | # define epdL 4096 |
64 | # define epdL 4096 |
65 | /* the standard algebraic notation character vector type */ |
65 | /* the standard algebraic notation character vector type */ |
66 | # define sanL 16 |
66 | # define sanL 16 |
67 | /* must be at least 8; extra room for alternatives */ |
67 | /* must be at least 8; extra room for alternatives */ |
68 | typedef char sanT[sanL]; |
68 | typedef char sanT[sanL]; |
69 | typedef sanT *sanptrT; |
69 | typedef sanT *sanptrT; |
70 | 70 | ||
71 | /* SAN style attributes, priority ordered (used for encoding) */ |
71 | /* SAN style attributes, priority ordered (used for encoding) */ |
72 | typedef siT ssaT; |
72 | typedef siT ssaT; |
Line 95... | Line 95... | ||
95 | # define cL (bit << cQ) |
95 | # define cL (bit << cQ) |
96 | # define rcQ 1 |
96 | # define rcQ 1 |
97 | # define rcL (bit << rcQ) |
97 | # define rcL (bit << rcQ) |
98 | # define c_nil (-1) |
98 | # define c_nil (-1) |
99 | # define c_w 0 |
99 | # define c_w 0 |
100 | /* white */ |
100 | /* white */ |
101 | # define c_b 1 |
101 | # define c_b 1 |
102 | /* black */ |
102 | /* black */ |
103 | # define c_v 2 |
103 | # define c_v 2 |
104 | /* vacant */ |
104 | /* vacant */ |
105 | # define c_x 3 |
105 | # define c_x 3 |
106 | /* extra */ |
106 | /* extra */ |
107 | /* pieces (ordering is critical) */ |
107 | /* pieces (ordering is critical) */ |
108 | typedef siT pT, *pptrT; |
108 | typedef siT pT, *pptrT; |
109 | 109 | ||
110 | # define pL 8 |
110 | # define pL 8 |
111 | # define rpL 6 |
111 | # define rpL 6 |
112 | # define p_nil (-1) |
112 | # define p_nil (-1) |
113 | # define p_p 0 |
113 | # define p_p 0 |
114 | /* pawn */ |
114 | /* pawn */ |
115 | # define p_n 1 |
115 | # define p_n 1 |
116 | /* knight */ |
116 | /* knight */ |
117 | # define p_b 2 |
117 | # define p_b 2 |
118 | /* bishop */ |
118 | /* bishop */ |
119 | # define p_r 3 |
119 | # define p_r 3 |
120 | /* rook */ |
120 | /* rook */ |
121 | # define p_q 4 |
121 | # define p_q 4 |
122 | /* queen */ |
122 | /* queen */ |
123 | # define p_k 5 |
123 | # define p_k 5 |
124 | /* king */ |
124 | /* king */ |
125 | # define p_v 6 |
125 | # define p_v 6 |
126 | /* vacant */ |
126 | /* vacant */ |
127 | # define p_x 7 |
127 | # define p_x 7 |
128 | /* extra */ |
128 | /* extra */ |
129 | /* color piece combinations (ordering is critical) */ |
129 | /* color piece combinations (ordering is critical) */ |
130 | typedef siT cpT; |
130 | typedef siT cpT; |
131 | 131 | ||
132 | # define cpL 16 |
132 | # define cpL 16 |
133 | # define rcpL 12 |
133 | # define rcpL 12 |
134 | # define cp_nil (-1) |
134 | # define cp_nil (-1) |
135 | # define cp_wp 0 |
135 | # define cp_wp 0 /* white pawn */ |
136 | # define cp_wn 1 |
136 | # define cp_wn 1 /* white knight */ |
137 | # define cp_wb 2 |
137 | # define cp_wb 2 /* white bishop */ |
138 | # define cp_wr 3 |
138 | # define cp_wr 3 /* white rook */ |
139 | # define cp_wq 4 |
139 | # define cp_wq 4 /* white queen */ |
140 | # define cp_wk 5 |
140 | # define cp_wk 5 /* white king */ |
141 | # define cp_bp 6 |
141 | # define cp_bp 6 /* black pawn */ |
142 | # define cp_bn 7 |
142 | # define cp_bn 7 /* black knight */ |
143 | # define cp_bb 8 |
143 | # define cp_bb 8 /* black bishop */ |
144 | # define cp_br 9 |
144 | # define cp_br 9 /* black rook */ |
145 | # define cp_bq 10 |
145 | # define cp_bq 10 /* black queen */ |
146 | # define cp_bk 11 |
146 | # define cp_bk 11 /* black king */ |
147 | # define cp_v0 12 |
147 | # define cp_v0 12 /* vacant */ |
148 | # define cp_x0 13 |
148 | # define cp_x0 13 /* extra 0 */ |
149 | # define cp_x1 14 |
149 | # define cp_x1 14 /* extra 1 */ |
150 | # define cp_x2 15 |
150 | # define cp_x2 15 /* extra 2 */ |
151 | /* ranks */ |
151 | /* ranks */ |
152 | typedef siT rankT; |
152 | typedef siT rankT; |
153 | 153 | ||
154 | # define rankM (0x0007) |
154 | # define rankM (0x0007) |
155 | # define rankQ 3 |
155 | # define rankQ 3 |
Line 168... | Line 168... | ||
168 | 168 | ||
169 | # define fileM (0x0007) |
169 | # define fileM (0x0007) |
170 | # define fileQ 3 |
170 | # define fileQ 3 |
171 | # define fileL (bit << fileQ) |
171 | # define fileL (bit << fileQ) |
172 | # define file_nil (-1) |
172 | # define file_nil (-1) |
173 | # define file_a 0 |
173 | # define file_a 0 /* QR */ |
174 | # define file_b 1 |
174 | # define file_b 1 /* QN */ |
175 | # define file_c 2 |
175 | # define file_c 2 /* QB */ |
176 | # define file_d 3 |
176 | # define file_d 3 /* Q */ |
177 | # define file_e 4 |
177 | # define file_e 4 /* K */ |
178 | # define file_f 5 |
178 | # define file_f 5 /* KB */ |
179 | # define file_g 6 |
179 | # define file_g 6 /* KN */ |
180 | # define file_h 7 |
180 | # define file_h 7 /* KR */ |
181 | /* location mappings */ |
181 | /* location mappings */ |
182 | # define map_sq(r, f) (((r) << fileQ | (f))) |
182 | # define map_sq(r, f) (((r) << fileQ | (f))) |
183 | # define map_file(sq) ((sq) & 0x07) |
183 | # define map_file(sq) ((sq) & 0x07) |
184 | # define map_rank(sq) ((sq) >> fileQ) |
184 | # define map_rank(sq) ((sq) >> fileQ) |
185 | /* squares */ |
185 | /* squares */ |
Line 253... | Line 253... | ||
253 | # define sq_f8 map_sq(rank_8, file_f) |
253 | # define sq_f8 map_sq(rank_8, file_f) |
254 | # define sq_g8 map_sq(rank_8, file_g) |
254 | # define sq_g8 map_sq(rank_8, file_g) |
255 | # define sq_h8 map_sq(rank_8, file_h) |
255 | # define sq_h8 map_sq(rank_8, file_h) |
256 | /* regular board */ |
256 | /* regular board */ |
257 | typedef union rbU { |
257 | typedef union rbU { |
258 | cpT rbm[rankL][fileL]; |
258 | cpT rbm[rankL][fileL]; /* rank/file indexing */ |
259 | cpT rbv[sqL]; /* square indexing */ |
259 | cpT rbv[sqL]; /* square indexing */ |
260 | } rbT, *rbptrT; |
260 | } rbT, *rbptrT; |
261 | 261 | ||
262 | /* nybble board vector */ |
262 | /* nybble board vector */ |
263 | # define nbL (sqL / (byteW / nybbW)) |
263 | # define nbL (sqL / (byteW / nybbW)) |
264 | typedef byteT nbvT[nbL]; |
264 | typedef byteT nbvT[nbL]; |
Line 266... | Line 266... | ||
266 | /* flanks */ |
266 | /* flanks */ |
267 | typedef siT flankT; |
267 | typedef siT flankT; |
268 | 268 | ||
269 | # define flankL 2 |
269 | # define flankL 2 |
270 | # define flank_nil (-1) |
270 | # define flank_nil (-1) |
271 | # define flank_k 0 /* kingside */ |
271 | # define flank_k 0 /* kingside */ |
272 | # define flank_q 1 /* queenside */ |
272 | # define flank_q 1 /* queenside */ |
273 | /* direction indices */ |
273 | /* direction indices */ |
274 | typedef siT dxT; |
274 | typedef siT dxT; |
275 | 275 | ||
276 | # define dxQ 4 |
276 | # define dxQ 4 |
277 | # define dxL (bit << dxQ) |
277 | # define dxL (bit << dxQ) |
Line 406... | Line 406... | ||
406 | # define forced_mate(cpev) ((cpev) >= ((cpev_mate - (max_dist_mateL * 2)) + 1)) |
406 | # define forced_mate(cpev) ((cpev) >= ((cpev_mate - (max_dist_mateL * 2)) + 1)) |
407 | # define forced_loss(cpev) ((cpev) <= (cpev_bust + (max_dist_lossL * 2))) |
407 | # define forced_loss(cpev) ((cpev) <= (cpev_bust + (max_dist_lossL * 2))) |
408 | /* move flag bits */ |
408 | /* move flag bits */ |
409 | typedef siT mfT; |
409 | typedef siT mfT; |
410 | 410 | ||
411 | # define mf_bust (bit << 0) |
411 | # define mf_bust (bit << 0) /* illegal move */ |
412 | # define mf_chec (bit << 1) |
412 | # define mf_chec (bit << 1) /* checking */ |
413 | # define mf_chmt (bit << 2) |
413 | # define mf_chmt (bit << 2) /* checkmating */ |
414 | # define mf_draw (bit << 3) |
414 | # define mf_draw (bit << 3) /* drawing (includes stalemating) */ |
415 | # define mf_exec (bit << 4) |
415 | # define mf_exec (bit << 4) /* executed at least once */ |
416 | # define mf_null (bit << 5) |
416 | # define mf_null (bit << 5) /* special null move */ |
417 | # define mf_sanf (bit << 6) |
417 | # define mf_sanf (bit << 6) /* needs file disambiguation */ |
418 | # define mf_sanr (bit << 7) |
418 | # define mf_sanr (bit << 7) /* needs rank disambiguation */ |
419 | # define mf_stmt (bit << 8) |
419 | # define mf_stmt (bit << 8) /* stalemating */ |
420 | /* special case move type */ |
420 | /* special case move type */ |
421 | typedef siT scmvT; |
421 | typedef siT scmvT; |
422 | 422 | ||
423 | # define scmvQ 3 |
423 | # define scmvQ 3 |
424 | # define scmvL (bit << scmvQ) |
424 | # define scmvL (bit << scmvQ) |
425 | # define scmv_nil (-1) |
425 | # define scmv_nil (-1) |
426 | # define scmv_reg 0 |
426 | # define scmv_reg 0 /* regular */ |
427 | # define scmv_epc 1 |
427 | # define scmv_epc 1 /* en passant capture */ |
428 | # define scmv_cks 2 |
428 | # define scmv_cks 2 /* castles kingside */ |
429 | # define scmv_cqs 3 |
429 | # define scmv_cqs 3 /* castles queenside */ |
430 | # define scmv_ppn 4 |
430 | # define scmv_ppn 4 /* pawn promotes to knight */ |
431 | # define scmv_ppb 5 |
431 | # define scmv_ppb 5 /* pawn promotes to bishop */ |
432 | # define scmv_ppr 6 |
432 | # define scmv_ppr 6 /* pawn promotes to rook */ |
433 | # define scmv_ppq 7 |
433 | # define scmv_ppq 7 /* pawn promotes to queen */ |
434 | /* move type */ |
434 | /* move type */ |
435 | typedef struct mS { |
435 | typedef struct mS { |
436 | mfT m_flag; /* move flags */ |
436 | mfT m_flag; /* move flags */ |
437 | sqT m_frsq; /* from square */ |
437 | sqT m_frsq; /* from square */ |
438 | sqT m_tosq; /* to square */ |
438 | sqT m_tosq; /* to square */ |
439 | cpT m_frcp; /* from color-piece */ |
439 | cpT m_frcp; /* from color-piece */ |
440 | cpT m_tocp; /* to color-piece */ |
440 | cpT m_tocp; /* to color-piece */ |
441 | scmvT m_scmv; /* special case move indication */ |
441 | scmvT m_scmv; /* special case move indication */ |
442 | } mT, *mptrT; |
442 | } mT, *mptrT; |
443 | 443 | ||
444 | /* game termination indicator markers */ |
444 | /* game termination indicator markers */ |
445 | typedef siT gtimT, *gtimptrT; |
445 | typedef siT gtimT, *gtimptrT; |
446 | 446 | ||
447 | # define gtimL 4 |
447 | # define gtimL 4 |
448 | # define gtim_nil (-1) |
448 | # define gtim_nil (-1) |
449 | # define gtim_w 0 |
449 | # define gtim_w 0 /* White won */ |
450 | # define gtim_b 1 |
450 | # define gtim_b 1 /* Black won */ |
451 | # define gtim_d 2 |
451 | # define gtim_d 2 /* draw */ |
452 | # define gtim_u 3 |
452 | # define gtim_u 3 /* unknown */ |
453 | /* clockstamp length hh:mm:ss */ |
453 | /* clockstamp length hh:mm:ss */ |
454 | # define clockstampL (2 + 1 + 2 + 1 + 2 + 1) |
454 | # define clockstampL (2 + 1 + 2 + 1 + 2 + 1) |
455 | /* datestamp length YYYY.MM.DD */ |
455 | /* datestamp length YYYY.MM.DD */ |
456 | # define datestampL (4 + 1 + 2 + 1 + 2 + 1) |
456 | # define datestampL (4 + 1 + 2 + 1 + 2 + 1) |
457 | /* duration length dddd:hh:mm:ss */ |
457 | /* duration length dddd:hh:mm:ss */ |
Line 459... | Line 459... | ||
459 | /* EPD operand basetype */ |
459 | /* EPD operand basetype */ |
460 | typedef siT eobT; |
460 | typedef siT eobT; |
461 | 461 | ||
462 | # define eobL 2 |
462 | # define eobL 2 |
463 | # define eob_nil (-1) |
463 | # define eob_nil (-1) |
464 | # define eob_string 0 |
464 | # define eob_string 0 /* quoted string */ |
465 | # define eob_symbol 1 |
465 | # define eob_symbol 1 /* unquoted symbol */ |
466 | /* EPD operand value type */ |
466 | /* EPD operand value type */ |
467 | typedef struct eovS { |
467 | typedef struct eovS { |
468 | eobT eov_eob; /* basetype */ |
468 | eobT eov_eob; /* basetype */ |
469 | charptrT eov_str; /* string value */ |
469 | charptrT eov_str; /* string value */ |
470 | struct eovS *eov_prev; |
470 | struct eovS *eov_prev; /* previous operand */ |
471 | struct eovS *eov_next; |
471 | struct eovS *eov_next; /* next operand */ |
472 | } eovT, *eovptrT; |
472 | } eovT, *eovptrT; |
473 | 473 | ||
474 | /* EPD operation type */ |
474 | /* EPD operation type */ |
475 | typedef struct eopS { |
475 | typedef struct eopS { |
476 | charptrT eop_opsym; /* operation code symbol */ |
476 | charptrT eop_opsym; /* operation code symbol */ |
477 | eovptrT eop_headeov; |
477 | eovptrT eop_headeov; /* head of operand value list */ |
478 | eovptrT eop_taileov; |
478 | eovptrT eop_taileov; /* tail of operand value list */ |
479 | struct eopS *eop_prev; |
479 | struct eopS *eop_prev; /* previous operation */ |
480 | struct eopS *eop_next; |
480 | struct eopS *eop_next; /* next operation */ |
481 | } eopT, *eopptrT; |
481 | } eopT, *eopptrT; |
482 | 482 | ||
483 | /* EPD record type */ |
483 | /* EPD record type */ |
484 | typedef struct epdS { |
484 | typedef struct epdS { |
485 | nbvT epd_nbv; /* piece placement nybble board vector */ |
485 | nbvT epd_nbv; /* piece placement nybble board vector */ |
486 | cT epd_actc; |
486 | cT epd_actc; /* active color */ |
487 | castT epd_cast; /* castling availability */ |
487 | castT epd_cast; /* castling availability */ |
488 | sqT epd_epsq; /* en passant target square */ |
488 | sqT epd_epsq; /* en passant target square */ |
489 | eopptrT epd_headeop; |
489 | eopptrT epd_headeop; /* head of operation list */ |
490 | eopptrT epd_taileop; |
490 | eopptrT epd_taileop; /* tail of operation list */ |
491 | } epdT, *epdptrT; |
491 | } epdT, *epdptrT; |
492 | 492 | ||
493 | /* EPD standard operators */ |
493 | /* EPD standard operators */ |
494 | typedef siT epdsoT, *epdsoptrT; |
494 | typedef siT epdsoT, *epdsoptrT; |
495 | 495 | ||
496 | # define epdsoL 51 |
496 | # define epdsoL 51 |
497 | # define epdso_nil (-1) |
497 | # define epdso_nil (-1) |
498 | # define epdso_acd 0 |
498 | # define epdso_acd 0 /* analysis count: depth */ |
499 | # define epdso_acn 1 |
499 | # define epdso_acn 1 /* analysis count: nodes */ |
500 | # define epdso_acs 2 |
500 | # define epdso_acs 2 /* analysis count: seconds */ |
501 | # define epdso_am |
501 | # define epdso_am 3 /* avoid move(s) */ |
502 | # define epdso_bm |
502 | # define epdso_bm 4 /* best move(s) */ |
503 | # define epdso_c0 |
503 | # define epdso_c0 5 /* comment slot 0 */ |
504 | # define epdso_c1 |
504 | # define epdso_c1 6 /* comment slot 1 */ |
505 | # define epdso_c2 |
505 | # define epdso_c2 7 /* comment slot 2 */ |
506 | # define epdso_c3 |
506 | # define epdso_c3 8 /* comment slot 3 */ |
507 | # define epdso_c4 |
507 | # define epdso_c4 9 /* comment slot 4 */ |
508 | # define epdso_c5 |
508 | # define epdso_c5 10 /* comment slot 5 */ |
509 | # define epdso_c6 |
509 | # define epdso_c6 11 /* comment slot 6 */ |
510 | # define epdso_c7 |
510 | # define epdso_c7 12 /* comment slot 7 */ |
511 | # define epdso_c8 |
511 | # define epdso_c8 13 /* comment slot 8 */ |
512 | # define epdso_c9 |
512 | # define epdso_c9 14 /* comment slot 9 */ |
513 | # define epdso_cc |
513 | # define epdso_cc 15 /* chess clock */ |
514 | # define epdso_ce |
514 | # define epdso_ce 16 /* centipawn evaluation */ |
515 | # define epdso_dm |
515 | # define epdso_dm 17 /* direct move count */ |
516 | # define epdso_draw_accept 18 |
516 | # define epdso_draw_accept 18 /* draw accept */ |
517 | # define epdso_draw_claim 19 |
517 | # define epdso_draw_claim 19 /* draw claim */ |
518 | # define epdso_draw_offer 20 |
518 | # define epdso_draw_offer 20 /* draw offer */ |
519 | # define epdso_draw_reject 21 |
519 | # define epdso_draw_reject 21 /* draw reject */ |
520 | # define epdso_eco 22 |
520 | # define epdso_eco 22 /* ECO code */ |
521 | # define epdso_fmvn |
521 | # define epdso_fmvn 23 /* fullmove number */ |
522 | # define epdso_hmvc |
522 | # define epdso_hmvc 24 /* halfmove clock */ |
523 | # define epdso_id |
523 | # define epdso_id 25 /* position identification */ |
524 | # define epdso_nic 26 |
524 | # define epdso_nic 26 /* NIC code */ |
525 | # define epdso_noop |
525 | # define epdso_noop 27 /* no operation */ |
526 | # define epdso_pm |
526 | # define epdso_pm 28 /* predicted move */ |
527 | # define epdso_ptp 29 |
527 | # define epdso_ptp 29 /* PGN tag pair(s) */ |
528 | # define epdso_pv |
528 | # define epdso_pv 30 /* predicted variation */ |
529 | # define epdso_rc |
529 | # define epdso_rc 31 /* repetition count */ |
530 | # define epdso_refcom 32 |
530 | # define epdso_refcom 32 /* referee command */ |
531 | # define epdso_refreq 33 |
531 | # define epdso_refreq 33 /* referee request */ |
532 | # define epdso_resign 34 |
532 | # define epdso_resign 34 /* resign */ |
533 | # define epdso_sm |
533 | # define epdso_sm 35 /* supplied move */ |
534 | # define epdso_sv |
534 | # define epdso_sv 36 /* supplied variation */ |
535 | # define epdso_tcgs |
535 | # define epdso_tcgs 37 /* telecommunications: game selector */ |
536 | # define epdso_tcri |
536 | # define epdso_tcri 38 /* telecommunications: receiver identification */ |
537 | # define epdso_tcsi |
537 | # define epdso_tcsi 39 /* telecommunications: sender identification */ |
538 | # define epdso_ts |
538 | # define epdso_ts 40 /* timestamp */ |
539 | # define epdso_v0 |
539 | # define epdso_v0 41 /* variation slot 0 */ |
540 | # define epdso_v1 |
540 | # define epdso_v1 42 /* variation slot 1 */ |
541 | # define epdso_v2 |
541 | # define epdso_v2 43 /* variation slot 2 */ |
542 | # define epdso_v3 |
542 | # define epdso_v3 44 /* variation slot 3 */ |
543 | # define epdso_v4 |
543 | # define epdso_v4 45 /* variation slot 4 */ |
544 | # define epdso_v5 |
544 | # define epdso_v5 46 /* variation slot 5 */ |
545 | # define epdso_v6 |
545 | # define epdso_v6 47 /* variation slot 6 */ |
546 | # define epdso_v7 |
546 | # define epdso_v7 48 /* variation slot 7 */ |
547 | # define epdso_v8 |
547 | # define epdso_v8 49 /* variation slot 8 */ |
548 | # define epdso_v9 |
548 | # define epdso_v9 50 /* variation slot 9 */ |
549 | /* referee commands */ |
549 | /* referee commands */ |
550 | typedef siT refcomT, *refcomptrT; |
550 | typedef siT refcomT, *refcomptrT; |
551 | 551 | ||
552 | # define refcomL 7 |
552 | # define refcomL 7 |
553 | # define refcom_nil (-1) |
553 | # define refcom_nil (-1) |
Line 582... | Line 582... | ||
582 | # define pgnstr_white 4 |
582 | # define pgnstr_white 4 |
583 | # define pgnstr_black 5 |
583 | # define pgnstr_black 5 |
584 | # define pgnstr_result 6 |
584 | # define pgnstr_result 6 |
585 | /* benchmark score structure */ |
585 | /* benchmark score structure */ |
586 | typedef struct bmsS { |
586 | typedef struct bmsS { |
587 | siT bms_acdflag; |
587 | siT bms_acdflag; /* ACD (depth) data valid flag */ |
588 | siT bms_acnflag; |
588 | siT bms_acnflag; /* ACN (nodes) data valid flag */ |
589 | siT bms_acsflag; |
589 | siT bms_acsflag; /* ACS (seconds) data valid flag */ |
590 | liT bms_total; |
590 | liT bms_total; /* total record count */ |
591 | liT bms_solve; |
591 | liT bms_solve; /* solved record count */ |
592 | liT bms_unsol; |
592 | liT bms_unsol; /* unsolved record count */ |
593 | liT bms_total_acd; |
593 | liT bms_total_acd; /* ACD used, all records */ |
594 | liT bms_solve_acd; |
594 | liT bms_solve_acd; /* ACD used, solved records */ |
595 | liT bms_unsol_acd; |
595 | liT bms_unsol_acd; /* ACD used, unsolved records */ |
596 | liT bms_total_acn; |
596 | liT bms_total_acn; /* ACN used, all records */ |
597 | liT bms_solve_acn; |
597 | liT bms_solve_acn; /* ACN used, solved records */ |
598 | liT bms_unsol_acn; |
598 | liT bms_unsol_acn; /* ACN used, unsolved records */ |
599 | liT bms_total_acs; |
599 | liT bms_total_acs; /* ACS used, all records */ |
600 | liT bms_solve_acs; |
600 | liT bms_solve_acs; /* ACS used, solved records */ |
601 | liT bms_unsol_acs; |
601 | liT bms_unsol_acs; /* ACS used, unsolved records */ |
602 | } bmsT, *bmsptrT; |
602 | } bmsT, *bmsptrT; |
603 | 603 | ||
604 | /* environment stack entry record type */ |
604 | /* environment stack entry record type */ |
605 | typedef struct eseS { |
605 | typedef struct eseS { |
606 | cT ese_actc; |
606 | cT ese_actc; /* active color */ |
607 | castT ese_cast; /* castling availability */ |
607 | castT ese_cast; /* castling availability */ |
608 | sqT ese_epsq; /* en passant target square */ |
608 | sqT ese_epsq; /* en passant target square */ |
609 | siT ese_hmvc; /* halfmove clock */ |
609 | siT ese_hmvc; /* halfmove clock */ |
610 | siT ese_fmvn; /* fullmove number */ |
610 | siT ese_fmvn; /* fullmove number */ |
611 | sqT ese_ksqv[rcL]; |
611 | sqT ese_ksqv[rcL]; /* king square locations */ |
612 | } eseT, *eseptrT; |
612 | } eseT, *eseptrT; |
613 | 613 | ||
614 | /* game played move record type (entries are prior to move) */ |
614 | /* game played move record type (entries are prior to move) */ |
615 | typedef struct gpmS { |
615 | typedef struct gpmS { |
616 | mT gpm_m; /* the move to be played */ |
616 | mT gpm_m; /* the move to be played */ |
617 | eseT gpm_ese; /* environment statck entry storage */ |
617 | eseT gpm_ese; /* environment statck entry storage */ |
618 | nbvT gpm_nbv; /* nybble board vector */ |
618 | nbvT gpm_nbv; /* nybble board vector */ |
619 | struct gpmS *gpm_prev; |
619 | struct gpmS *gpm_prev; /* previous played move record */ |
620 | struct gpmS *gpm_next; |
620 | struct gpmS *gpm_next; /* next played move record */ |
621 | } gpmT, *gpmptrT; |
621 | } gpmT, *gpmptrT; |
622 | 622 | ||
623 | /* game record type */ |
623 | /* game record type */ |
624 | typedef struct gamS { |
624 | typedef struct gamS { |
625 | charptrT gam_strv[pgnstrL]; /* PGN STR tag values */ |
625 | charptrT gam_strv[pgnstrL]; /* PGN STR tag values */ |
626 | gtimT gam_gtim; /* game termination indicator */ |
626 | gtimT gam_gtim; /* game termination indicator */ |
627 | gpmptrT gam_headgpm; |
627 | gpmptrT gam_headgpm; /* head of game played move list */ |
628 | gpmptrT gam_tailgpm; |
628 | gpmptrT gam_tailgpm; /* tail of game played move list */ |
629 | struct gamS *gam_prev; |
629 | struct gamS *gam_prev; /* previous game */ |
630 | struct gamS *gam_next; |
630 | struct gamS *gam_next; /* next game */ |
631 | } gamT, *gamptrT; |
631 | } gamT, *gamptrT; |
632 | 632 | ||
633 | /* statndard disply output column limit */ |
633 | /* statndard disply output column limit */ |
634 | # define columnL 80 |
634 | # define columnL 80 |
635 | /* inclusion telltale closure */ |
635 | /* inclusion telltale closure */ |