X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=gnushogi%2Fmakepattern.c;h=fa2ee14baa0ea77e7f64b1312821ce6067c34938;hb=HEAD;hp=e24cfcda2a02f5c1a64a0e222529855e36f22bef;hpb=d43826fb9e4f50b20de90fead3bfc7c3e72b8a93;p=gnushogi.git diff --git a/gnushogi/makepattern.c b/gnushogi/makepattern.c index e24cfcd..fa2ee14 100644 --- a/gnushogi/makepattern.c +++ b/gnushogi/makepattern.c @@ -4,6 +4,7 @@ * ---------------------------------------------------------------------- * Copyright (c) 1993, 1994, 1995 Matthias Mutz * Copyright (c) 1999 Michael Vanier and the Free Software Foundation + * Copyright (c) 2008, 2013, 2014 Yann Dirson and the Free Software Foundation * * GNU SHOGI is based on GNU CHESS * @@ -36,13 +37,18 @@ #define MAX_OPENING_SEQUENCE 20 #define MAX_PATTERN 200 +short xboard = false; + small_short pattern_data[MAX_PATTERN_DATA]; /* minimal ShowMessage to avoid dependency on extraneous display code */ static void -Dummy_ShowMessage(char *s) +Dummy_ShowMessage(char *format, ...) { - printf("%s\n", s); + va_list ap; + va_start(ap, format); + vprintf(format, ap); + va_end(ap); } static struct display dummydsp = { .ShowMessage = Dummy_ShowMessage, @@ -123,7 +129,7 @@ ScanPiece(char **s, small_short *side, /* determine column */ for (c = 0; c < NO_COLS; c++) { - if (**s == cxx[c]) + if (**s == COL_NAME(c)) { (*s)++; break; @@ -136,7 +142,7 @@ ScanPiece(char **s, small_short *side, /* determine row */ for (r = 0; r < NO_ROWS; r++) { - if (**s == rxx[r]) + if (**s == ROW_NAME(r)) { (*s)++; break;