From: H.G. Muller Date: Mon, 4 Jul 2011 09:23:05 +0000 (+0200) Subject: Let PGN parser accept lower-case piece in drop moves X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=fa7d7709b3b69ab3f5fbea393f00d6d89b13b3a1;p=xboard.git Let PGN parser accept lower-case piece in drop moves The @ sign prevents amiguity with other notations anyway. --- diff --git a/parser.c b/parser.c index d2bae37..0a6549e 100644 --- a/parser.c +++ b/parser.c @@ -195,6 +195,7 @@ int NextUnit(char **p) piece = separator = promoted = slash = n = 0; for(i=0; i<4; i++) coord[i] = -1, type[i] = NOTHING; if(**p == '+') (*p)++, promoted++; + if(**p >= 'a' && **p <= 'z' && (*p)[1]== '@') piece =*(*p)++ + 'A' - 'a'; else if(**p >= 'A' && **p <= 'Z') { piece = *(*p)++; // Note we could test for 2-byte non-ascii names here if(**p == '/') slash = *(*p)++; @@ -579,3 +580,4 @@ ChessMove yylexstr(int boardIndex, char *s, char *buf, int buflen) fromString = 0; return ret; } +