X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=gnushogi%2Fcursesdsp.c;h=98cec52182a623525eff2e17e2545400337c27bb;hb=1950330c6bfee3abf748a81d85afad03b7c768a4;hp=2fa6d4cf40b6186adfe774d24ca1a9cd859206fb;hpb=e575a64304bf46ab7bcc29634a982dae82721af5;p=gnushogi.git diff --git a/gnushogi/cursesdsp.c b/gnushogi/cursesdsp.c index 2fa6d4c..98cec52 100644 --- a/gnushogi/cursesdsp.c +++ b/gnushogi/cursesdsp.c @@ -64,7 +64,7 @@ int mycnt1, mycnt2; -#define MARGIN (4) +#define MARGIN (5) #define TAB (58) #define VIR_C(s) ((flag.reverse) ? (NO_COLS - 1 - column(s)) : column(s)) @@ -485,6 +485,7 @@ Curses_EditBoard(void) ClearEoln(); FLUSH_SCANW("%s", s); found = 0; + ClearMessage(); if (s[0] == '.') break; @@ -520,15 +521,18 @@ Curses_EditBoard(void) break; } } - + if (!found) + AlwaysShowMessage("Invalid piece type '%c'", s[0]); continue; } c = COL_NUM(s[1]); r = ROW_NUM(s[2]); - if ((c < 0) || (c >= NO_COLS) || (r < 0) || (r >= NO_ROWS)) + if ((c < 0) || (c >= NO_COLS) || (r < 0) || (r >= NO_ROWS)) { + AlwaysShowMessage("Out-of-board '%c%c'", s[1], s[2]); continue; + } sq = locn(r, c); @@ -547,6 +551,9 @@ Curses_EditBoard(void) } } + if (!found) + AlwaysShowMessage("Invalid piece type '%c'", s[0]); + DrawPiece(sq); }