eco_match = entry;
}
}
+ next_move->eco = eco_match;
}
next_move = next_move->next;
}
#include "apply.h"
#include "output.h"
#include "mymalloc.h"
+#include "eco.h"
/* Functions for outputting games in the required format. */
int black_elo = atoi(black_elo_tag);
for (move = current_game.moves; move != NULL; move = move->next) {
- unsigned int opening = 0; // TODO
+ unsigned int opening = move->eco ? move->eco->cumulative_hash_value : 0;
// key
putc(move->bpfen_len + strlen((char *)move->move), outputfile);
*/
#define MAX_MOVE_LEN 15
+struct EcoLog;
+typedef struct EcoLog EcoLog;
+
/* Retain the text of a move and any associated
* NAGs and comments.
*/
/* terminating_result hold the result of the current list of moves. */
char *terminating_result;
Variation *Variants;
+ EcoLog *eco;
/* Pointers to the previous and next move.
* The extraction program does not need the prev field, but my
* intention is to build other interfaces that might need it.