/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 *
 * This file is part of SanKit -- A multiplatform set of C code
 * for reading and writing PGN formatted chess games. In addition
 * it can be used as an engine to determine in real time if proposed
 * moves are legal or not. It appears to generate near perfect PGN
 * from incorrectly formatted files.
 *
 * Copyright 1994 Steven J. Edwards All Rights Reserved.
 * Copyright 2009-2011 David Hoerl All Rights Reserved.
 *
 *
 * Redistribution and use in source and binary forms, with or without modification, are
 * permitted provided that the following conditions are met:
 *
 *    1. Redistributions of source code must retain the above copyright notice, this list of
 *       conditions and the following disclaimer.
 *
 *    2. Redistributions in binary form must reproduce the above copyright notice, this list
 *       of conditions and the following disclaimer in the documentation and/or other materials
 *       provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY David Hoerl ''AS IS'' AND ANY EXPRESS OR IMPLIED
 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
 * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL David Hoerl OR
 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 *
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */

/*>>> sanvar.h: external declarations for SAN variables */

/* Revised: 1993.04.24 */

/* program identification and control */

extern charptrT progname;
extern siT progdone;

/* the nil string */

extern charptrT nilstr;

/* ASCII character vectors */

extern char accv[cL];
extern char acpv[pL];
extern char acrv[rankL];
extern char acfv[fileL];

/* conversion vectors */

extern cT cv_c_cpv[cpL];
extern pT cv_p_cpv[cpL];
extern cpT cv_cp_cpv[rcL][pL];

/* special case promotion piece conversion */

extern pT cv_p_scmvv[scmvL];

/* color inversion */

extern cT inv_cv[rcL];

/* game termination strings */

extern charptrT gtcstrv[gtcL];

/* game termination input marker strings */

extern charptrT gtimstrv[gtimL];

/* game status conversions */

extern gtcT cv_gtc_gsv[gsL];

/* game termination input marker converstion */

extern gtcT cv_gtc_gtimv[gtimL];

/* dribble output file */

extern FILEptrT do_fptr;

/* suppress stdout */

extern FILEptrT st_fptr;

/* count of successfully parsed games and offset at failure */

extern siT gameCount;
extern long fileOffset;
extern char parseError[80];

/* direction vectors */

extern dvT dvv[dxL];
extern xdvT xdvv[dxL];

/* global boards */

extern bT gb;
extern xbT gxb;

/* search strategy names */

extern charptrT ssstrv[ssL];

/* piece values */

extern cpevT valpv[pL];
extern cpevT valcpv[cpL];

/* position setup flag */

extern siT setup;

/* game termination code */

extern gtcT gtc;

/* piece locations and counts */

extern sqT plv[rcL][pmaxL];
extern siT plnv[rcL];

/* attackers: bitfield merge and count */

extern siT atkcsqv[rcL][sqL];

/* board indices for piece location vector */

extern siT biv[sqL];

/* history record count */

extern siT hn;

/* history stack base and current pointers */

extern hptrT hbase, hcurr;

/* current environment record */

extern eT curr_e;

/* current generation record */

extern gT curr_g;

/* count of records in analysis stack (also, the current ply) */

extern siT an;

/* analysis stack */

extern aT av[aL];

/* base of tree leg storage */

extern mptrT Tree;

/* head and tail of tag list */

extern tagptrT head_tagptr, tail_tagptr;

/* default reserved tag names */

extern charptrT rsvtagv[rsvtagL];

/* program option vectors: values, names, and helps */

extern siT optnv[optnL];
extern charptrT optnnamev[optnL];
extern charptrT optnhelpv[optnL];

/* command token vector */

extern siT tkn;
extern charptrT tkv[tkL];

/* scratch text vector */

extern char stv[tL];

/* command information vector */

extern ciT civ[cmdL];

/* search strategies */

extern ssT ssv[rcL];

/* material */

extern cpevT cpmv[rcL];

/* playing level */

extern siT level;

/* average response time */

extern secT artsec;

/* previous state information for play/unplay strategy transition */

extern eT prev_e;
extern mT prev_m;
extern bT prev_b;

/* the null move */

extern mT null_m;

/* strategy move selection result */

extern mT select_m;

/*<<< sanvar.h: EOF */
