From fa7d7709b3b69ab3f5fbea393f00d6d89b13b3a1 Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Mon, 4 Jul 2011 11:23:05 +0200 Subject: [PATCH 1/1] Let PGN parser accept lower-case piece in drop moves The @ sign prevents amiguity with other notations anyway. --- parser.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) 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; } + -- 1.7.0.4