X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=gnushogi%2Fcursesdsp.c;h=9cbca2e07f4b1dc822179b887df694408403f4b8;hb=1ad6c36feffec9aef9011a7585179f9e75b85600;hp=a42bb26a06d1541f57928ec2f20b792887239b4b;hpb=9da823015c78c8e9131cf76f14598a1071d29192;p=gnushogi.git diff --git a/gnushogi/cursesdsp.c b/gnushogi/cursesdsp.c index a42bb26..9cbca2e 100644 --- a/gnushogi/cursesdsp.c +++ b/gnushogi/cursesdsp.c @@ -6,6 +6,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 * @@ -30,10 +31,13 @@ * ---------------------------------------------------------------------- */ +/* request *snprintf prototypes*/ +#define _POSIX_C_SOURCE 200112L #include #include #include +#include #include #include @@ -79,6 +83,7 @@ static void DrawPiece(short sq); static void ShowScore(short score); void Curses_UpdateDisplay(short f, short t, short redraw, short isspec); void Curses_Die(int sig); +void Curses_ShowSidetoMove(void); /**************************************** * Trivial output functions. @@ -107,14 +112,6 @@ gotoXY(short x, short y) } -static void -ClearMessage(void) -{ - gotoXY(TAB, 6); - ClearEoln(); -} - - void Curses_ShowCurrentMove(short pnt, short f, short t) { @@ -773,10 +770,8 @@ DrawPiece(short sq) void Curses_ShowPostnValue(short sq) { - short score; - gotoXY(4 + 5 * VIR_C(sq), 5 + 2 * (7 - VIR_R(sq))); /* CHECKME */ - score = ScorePosition(color[sq]); + (void) ScorePosition(color[sq]); if (color[sq] != neutral) #if defined SAVE_SVALUE @@ -973,7 +968,7 @@ Curses_GiveHint(void) void -Curses_ChangeSearchDepth(void) +Curses_ChangeSearchDepth(char* sx) { Curses_ShowMessage("depth = "); FLUSH_SCANW("%hd", &MaxSearchDepth);