X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=gnushogi%2Fcommondsp.c;h=a6f567d1ea86fda729df94d7e770b221d06bddbb;hb=1907f35d3370f971df16e40dec4135110386a84c;hp=45c2e2e906e0a6cf12d65c9281a830a6cda6c866;hpb=ea78287f5e83a2d8c3b65554f853122e470269ff;p=gnushogi.git diff --git a/gnushogi/commondsp.c b/gnushogi/commondsp.c index 45c2e2e..a6f567d 100644 --- a/gnushogi/commondsp.c +++ b/gnushogi/commondsp.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 * @@ -31,6 +32,10 @@ * */ +/* request *snprintf prototypes */ +#define _POSIX_C_SOURCE 200112L +#include + #if defined HAVE_GETTIMEOFDAY #include #endif @@ -1655,7 +1660,7 @@ InputCommand(char *command) } else if (strcmp(s, "alg") == 0) { - /* noop */ ; /* alg */ + /* noop */ ; } else if ((strcmp(s, "quit") == 0) || (strcmp(s, "exit") == 0)) @@ -1667,7 +1672,7 @@ InputCommand(char *command) { dsp->EditBoard(); } - else if ((strcmp(s, "setup") == 0)) + else if (strcmp(s, "setup") == 0) { dsp->SetupBoard(); } @@ -1860,7 +1865,11 @@ InputCommand(char *command) } else if (strcmp(s, "depth") == 0) { - dsp->ChangeSearchDepth(); + dsp->ChangeSearchDepth(sx + strlen("depth")); + } + else if (strcmp(s, "sd") == 0) + { + dsp->ChangeSearchDepth(sx + strlen("sd")); } else if (strcmp(s, "hashdepth") == 0) {