X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=pgntags.c;h=23957f6e30ae4148ec3f9fc8db9db0f175cf97b9;hb=2d0f4769e69d228d9593c574014c634706edea97;hp=e7476a5fe3870c449c9a3968f1332ff4f9d0e702;hpb=fefd92a124c5bef3b465ae84b2ae30d3e5f57f37;p=xboard.git diff --git a/pgntags.c b/pgntags.c index e7476a5..23957f6 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 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;