X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=fairymax.c;h=0e22af6d39d50040e2fc4aaebe842c993b354295;hb=2a5abd95c63c0e06cbf2437fb8840b3a7676e17c;hp=9f6571bd5ab5e7ac0f97ae84c0cdefdae6d2311f;hpb=1a73d604f9bb1b981d36d10ea4268cce6292a09c;p=fairymax.git diff --git a/fairymax.c b/fairymax.c index 9f6571b..0e22af6 100644 --- a/fairymax.c +++ b/fairymax.c @@ -18,7 +18,7 @@ /*****************************************************************/ #define MULTIPATH -#define VERSION "4.8T" +#define VERSION "4.8U" #include #include @@ -109,6 +109,7 @@ int prom, pm, gating, succession, hill; char piecename[32], piecetype[32], blacktype[32]; char selectedFairy[80]; char *inifile = INI_FILE; +char info[999]; int Ticks, tlim, Setup, SetupQ; @@ -464,6 +465,7 @@ void PrintOptions() printf("feature option=\"Dummy Slider Example -slider 20 0 100\"\n"); printf("feature option=\"Dummy String Example -string happy birthday!\"\n"); printf("feature option=\"Dummy Path Example -path .\"\n"); + printf("feature option=\"Info -button\"\n"); printf("feature option=\"Clear Hash -button\"\n"); printf("feature done=1\n"); } @@ -489,7 +491,9 @@ void LoadGame(char *name) if(!strcmp(name, "fairy")) name = selectedFairy; gating = !strcmp(name, "seirawan"); while((ptc=fscanf(f, "Game: %s # %s # %s", buf, pieceToChar, parent))==0 || strcmp(name, buf) ) { - while((c = fgetc(f)) != EOF && c != '\n'); + char *p = info; + while((c = fgetc(f)) != EOF && c != '\n') *p++ = c; + if(*info == '/') *p = 0; else *info = 0; // remember last line before Game if it was comment count++; if(c == EOF) { printf("telluser variant %s not supported\n", name); @@ -539,7 +543,7 @@ void LoadGame(char *name) } while(fscanf(f, " # %[^\n]", pieceToChar)) printf("piece %s\n", pieceToChar); fclose(f); - if(makruk != 64) makruk = 0; // 66 was kludge to interpret "=1" suffix in asean for setting up 3rd-rank Pawns + if(makruk == 66) makruk = 8; // 66 was kludge to interpret "=1" suffix in asean for setting up 3rd-rank Pawns } int main(int argc, char **argv) @@ -759,6 +763,7 @@ printf("# promo = %d (%c) GT = %d\n", prom, prom + '`', GT); inifile = filename; continue; } if(sscanf(line+7, "Clear Hash%c", &c) == 1) for(i=0; i<=U; i++) A->K = 0; + if(sscanf(line+7, "Info%c", &c) == 1) printf("telluser %s\n", info+3); if(sscanf(line+7, "MultiVariation Margin=%d", &margin) == 1) continue; if(sscanf(line+7, "Variant fairy selects=%s", selectedFairy+6) == 1) continue; if(sscanf(line+7, "Makruk rules=%s", Cambodian) == 1) continue;