X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=pgntags.c;h=74e449567306e3be12b3740b077a77255d789630;hb=2987ec348b8b2cbf38ba9a6a0793652a6b238ae8;hp=e7476a5fe3870c449c9a3968f1332ff4f9d0e702;hpb=fefd92a124c5bef3b465ae84b2ae30d3e5f57f37;p=xboard.git diff --git a/pgntags.c b/pgntags.c index e7476a5..74e4495 100644 --- a/pgntags.c +++ b/pgntags.c @@ -1,7 +1,7 @@ /* * pgntags.c -- Functions to manage PGN tags * - * Copyright 1995, 2009, 2010, 2011 Free Software Foundation, Inc. + * Copyright 1995, 2009, 2010, 2011, 2012, 2013, 2014 Free Software Foundation, Inc. * * Enhancements Copyright 2005 Alessandro Scotti * @@ -50,9 +50,8 @@ /* Parse PGN tags; returns 0 for success or error number */ -int ParsePGNTag(tag, gameInfo) - char *tag; - GameInfo *gameInfo; +int +ParsePGNTag (char *tag, GameInfo *gameInfo) { char *name, *value, *p, *oldTags; int len; @@ -141,11 +140,9 @@ int ParsePGNTag(tag, gameInfo) } -/* Print game info - */ -void PrintPGNTags(fp, gameInfo) - FILE *fp; - GameInfo *gameInfo; +/* Print game info */ +void +PrintPGNTags (FILE *fp, GameInfo *gameInfo) { fprintf(fp, "[Event \"%s\"]\n", gameInfo->event ? gameInfo->event : "?"); fprintf(fp, "[Site \"%s\"]\n", gameInfo->site ? gameInfo->site : "?"); @@ -169,8 +166,8 @@ void PrintPGNTags(fp, gameInfo) /* Return a non-static buffer with a games info. */ -char *PGNTags(gameInfo) - GameInfo *gameInfo; +char * +PGNTags (GameInfo *gameInfo) { size_t len; char *buf; @@ -219,8 +216,8 @@ char *PGNTags(gameInfo) /* Returns pointer to a static string with a result. */ -char *PGNResult(result) - ChessMove result; +char * +PGNResult (ChessMove result) { switch (result) { case GameUnfinished: @@ -237,9 +234,7 @@ char *PGNResult(result) /* Returns 0 for success, nonzero for error */ int -ReplaceTags(tags, gameInfo) - char *tags; - GameInfo *gameInfo; +ReplaceTags (char *tags, GameInfo *gameInfo) { ChessMove moveType; int err;