X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=pgntags.c;h=f13eb963cd7dacdb7e30fe2dea6a3a0c560f2b80;hb=ba3e6a6301920d112fde459b61a5a5206565dcbd;hp=2caed095603db3b46d651ce1d18446b2d7748592;hpb=5bee433e9f42c5194734b2671dbbcfcf9068eab8;p=xboard.git diff --git a/pgntags.c b/pgntags.c index 2caed09..f13eb96 100644 --- a/pgntags.c +++ b/pgntags.c @@ -114,8 +114,11 @@ ParsePGNTag (char *tag, GameInfo *gameInfo) success = TRUE; } else if (StrCaseCmp(name, "Variant") == 0) { /* xboard-defined extension */ + success = StrSavePtr(value, &gameInfo->variantName) != NULL; gameInfo->variant = StringToVariant(value); - success = TRUE; + } else if (StrCaseCmp(name, "VariantMen") == 0) { + /* for now ignore this tag, as we have no method yet */ + /* for assigning the pieces to XBoard pictograms */ } else if (StrCaseCmp(name, PGN_OUT_OF_BOOK) == 0) { /* [AS] Out of book annotation */ success = StrSavePtr(value, &gameInfo->outOfBook) != NULL; @@ -161,7 +164,7 @@ PrintPGNTags (FILE *fp, GameInfo *gameInfo) if (gameInfo->variant != VariantNormal) fprintf(fp, "[Variant \"%s\"]\n", VariantName(gameInfo->variant)); if (*(p = CollectPieceDescriptors())) - fprintf(fp, "[Pieces \"%s\"]\n", p); + fprintf(fp, "[VariantMen \"%s\"]\n", p); if (gameInfo->extraTags) fputs(gameInfo->extraTags, fp); }