From 40269944bc042aced158ae854027ef3a80344fb3 Mon Sep 17 00:00:00 2001 From: H.G.Muller Date: Sun, 28 Sep 2014 13:40:13 +0200 Subject: [PATCH] Rename PGN Pieces tag to VariantMen Following a suggestion from Steven Edwards, this indeed makes a much clearer name. Also add code to skip the tag on reading, rather than allowing it to end up with the 'extra tags', as the latter could lead to duplication of the tag on subsequent saves. --- pgntags.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/pgntags.c b/pgntags.c index 2caed09..2d9cfb8 100644 --- a/pgntags.c +++ b/pgntags.c @@ -116,6 +116,9 @@ ParsePGNTag (char *tag, GameInfo *gameInfo) /* xboard-defined extension */ 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); } -- 1.7.0.4