combostr
sortframes[BLACK] = (struct combostr *)0;
sortframes[WHITE] = (struct combostr *)0;
struct combostr *cbp;
struct combostr *cbp;
struct combostr *c_next; /* list of combos at the same level */
struct combostr *c_prev; /* list of combos at the same level */
struct combostr *c_link[2]; /* C:previous level or F:NULL */
struct combostr *e_combo; /* the whole combo */
struct combostr *s_frame[4]; /* level 1 combo for frame[dir] */
struct combostr *o_fcombo; /* the connecting combo */
extern struct combostr frames[FAREA]; /* storage for single frames */
extern struct combostr *sortframes[2]; /* sorted, non-empty frames */
int list_eq(struct combostr **, struct combostr **, int);
void clearcombo(struct combostr *, int);
void markcombo(struct combostr *);
struct combostr *cbp;
struct combostr frames[FAREA]; /* storage for all frames */
struct combostr *sortframes[2]; /* sorted list of non-empty frames */
struct combostr *cbp, *cbp1;
appendcombo(struct combostr *cbp, int color __unused)
struct combostr *pcbp, *ncbp;
if (ncbp == (struct combostr *)0) {
checkframes(struct combostr *cbp, struct combostr *fcbp, struct spotstr *osp,
struct combostr *tcbp, *lcbp;
sortcombo(struct combostr **scbpp, struct combostr **cbpp,
struct combostr *fcbp)
struct combostr **spp, **cpp;
struct combostr *cbp, *ecbp;
if (cbp == (struct combostr *)0) {
fcbp = (struct combostr *)
((char *)scbpp - sizeof(struct combostr));
cbpp = (struct combostr **)(cbp + 1);
fcbp = (struct combostr *)((char *)scbpp - sizeof(struct combostr));
printcombo(struct combostr *cbp, char *buf, size_t max)
struct combostr *tcbp;
markcombo(struct combostr *ocbp)
struct combostr *cbp, *tcbp, **cbpp;
clearcombo(struct combostr *cbp, int open)
struct combostr *tcbp;
list_eq(struct combostr **scbpp, struct combostr **cbpp, int n)
struct combostr **spp, **cpp;
struct combostr *cbp, *ecbp;
if (cbp == (struct combostr *)0)
if ((cbp = sortcombos) != (struct combostr *)0) {
struct combostr *ncbp;
sortcombos = (struct combostr *)0;
makecombo2(struct combostr *ocbp, struct spotstr *osp, int off, int s)
struct combostr *ncbp;
struct combostr **scbpp, *fcbp;
ncbp = (struct combostr *)malloc(sizeof(struct combostr) +
2 * sizeof(struct combostr *));
scbpp = (struct combostr **)(ncbp + 1);
static struct combostr *hashcombos[FAREA];/* hash list for finding duplicates */
static struct combostr *sortcombos; /* combos at higher levels */
struct combostr *cbp, *ecbp;
struct combostr **cbpp, *pcbp;
if (cbp == (struct combostr *)0)
*cbpp = (struct combostr *)0;
if (ecbp == (struct combostr *)0)
static void makecombo2(struct combostr *, struct spotstr *, int, int);
makecombo(struct combostr *ocbp, struct spotstr *osp, int off, int s)
struct combostr *cbp, *ncbp;
static void makecombo(struct combostr *, struct spotstr *, int, int);
struct combostr **scbpp;
static void appendcombo(struct combostr *, int);
static void updatecombo(struct combostr *, int);
static void makeempty(struct combostr *);
static int checkframes(struct combostr *, struct combostr *, struct spotstr *,
static int sortcombo(struct combostr **, struct combostr **, struct combostr *);
ncbp = (struct combostr *)malloc(sizeof(struct combostr) +
(cbp->c_nframes + 1) * sizeof(struct combostr *));
static void printcombo(struct combostr *, char *, size_t);
scbpp = (struct combostr **)(ncbp + 1);
if (sortcombo(scbpp, (struct combostr **)(cbp + 1), ocbp)) {
static struct combostr *ecombo[MAXDEPTH]; /* separate from elist to save space */
makeempty(struct combostr *ocbp)
struct combostr *cbp, *tcbp, **cbpp;
updatecombo(struct combostr *cbp, int color)
struct combostr *tcbp;