X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=xshogi%2Fxshogi.c;h=f88f39a669aebbea8f6b8558ca003ff4862c2b8f;hb=2e0ba7d65fd8be45d46122e07ca246a762e1edb6;hp=f6317ddc0feecc1f479a9f51343989627f3b9c5a;hpb=00e10bc4a760150665436b17c50abf264f28d435;p=gnushogi.git diff --git a/xshogi/xshogi.c b/xshogi/xshogi.c index f6317dd..f88f39a 100644 --- a/xshogi/xshogi.c +++ b/xshogi/xshogi.c @@ -91,7 +91,6 @@ #include #include -#include "../version.h" #include "xshogi.h" #define BUF_SIZE 1024 @@ -1704,9 +1703,9 @@ CreatePlayerWindow(void) False, (XtEventHandler)EventProc, (XtPointer)(player == &remotePlayer)); - sprintf(buf, "xshogi version %s, patchlevel %s based on " + sprintf(buf, "xshogi version %s based on " "xboard version %s", - version, patchlevel, XBOARD_VERSION); + PACKAGE_VERSION, XBOARD_VERSION); /* * If there is to be a machine match, set it up. @@ -7130,23 +7129,21 @@ void DisplayTitle(char *title) -/* CHECKME: does this work? - * This routine sends a SIGUSR1 to gnushogi to awaken it +/* + * This routine used to send a SIGINT (^C interrupt) to gnushogi to awaken it * if it might be busy thinking on our time. This normally isn't needed, * but is useful on systems where the FIONREAD ioctl doesn't work since * on those systems the gnushogi feature that lets you interrupt its thinking * just by typing a command does not work. * - * In the future, similar code could be used to stop gnushogi and make - * it move immediately when it is thinking about its own move; this could - * be useful if we want to make Backward or ForceMoves work while gnushogi - * is thinking. + * Now gnushogi periodically checks for user input without a need for + * this hack. */ void Attention(int pid) { -#if !defined(FIONREAD) +#if 0 if (localPlayer.appData.noShogiProgram || (pid == 0)) return; @@ -7159,11 +7156,11 @@ Attention(int pid) { if (xshogiDebug || localPlayer.appData.debugMode) { - fprintf(stderr, "Sending SIGUSR1 to %s\n", + fprintf(stderr, "Sending SIGINT to %s\n", ((pid == firstProgramPID) ? "first" : "second")); } - (void)kill(pid, SIGUSR1); /* stop it thinking */ + (void)kill(pid, SIGINT); /* stop it thinking */ } break;