X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=eco.c;h=3d5bbca3361897fc963a72f38f60111da0e037d4;hb=62fac85f587619ad81f27eae3ef2703f376a8b04;hp=6a0d9201a3e33b7f43b68fc94a2d7723bcdf1669;hpb=4e0c88b473dffdefb830e6806c3692aab6b4fa0c;p=pgn-extract diff --git a/eco.c b/eco.c index 6a0d920..3d5bbca 100644 --- a/eco.c +++ b/eco.c @@ -53,23 +53,24 @@ static unsigned maximum_half_moves = ECO_HALF_MOVE_LIMIT; #define ECO_TABLE_SIZE 4096 static EcoLog **EcoTable; -#if INCLUDE_UNUSED_FUNCTIONS -static void +void dumpEcoTable(void) { unsigned ix; for(ix = 0; ix < ECO_TABLE_SIZE; ix++){ if(EcoTable[ix] != NULL){ EcoLog *entry = NULL; for(entry = EcoTable[ix]; entry != NULL; entry = entry->next){ - fprintf(stderr,"%s %lu %lu ",entry->ECO_tag, - entry->required_hash_value, - entry->cumulative_hash_value); + printf("%u\t", (unsigned int)(entry->cumulative_hash_value)); + printf("%s\t", entry->ECO_tag ? entry->ECO_tag : ""); + printf("%s\t", entry->Opening_tag ? entry->Opening_tag : ""); + printf("%s\t", entry->Variation_tag ? entry->Variation_tag : ""); + printf("%s\n", entry->Sub_Variation_tag ? entry->Sub_Variation_tag : ""); } - fprintf(stderr,"\n"); } } } +#if INCLUDE_UNUSED_FUNCTIONS /* Return at how many points this match works. * required_hash_value * cumulative_hash_value