u64ToDouble(u64 value)
{
double r;
- u64 tmp = value & 0x7fffffffffffffff;
+ u64 tmp = value & u64Const(0x7fffffffffffffff);
r = (double)(s64)tmp;
- if (value & 0x8000000000000000)
+ if (value & u64Const(0x8000000000000000))
r += 9.2233720368547758080e18; /* 2^63 */
return r;
}
int buf_len;
int next_out;
int tkind;
-#ifdef WIN32
- /* For zippy color lines of winboard
- * cleanup for gcc compiler */
- int backup;
-#endif
+ int backup;
char *p;
-#ifdef WIN32
if (appData.debugMode) {
if (!error) {
fprintf(debugFP, "<ICS: ");
fprintf(debugFP, "\n");
}
}
-#endif
if (count > 0) {
/* If last read ended with a partial line that we couldn't parse,
oldi = i;
if (appData.zippyTalk || appData.zippyPlay) {
+ /* Backup address for color zippy lines */
+ backup = i;
#if ZIPPY
#ifdef WIN32
- /* Backup address for color zippy lines */
- backup = i;
if (loggedOn == TRUE)
if (ZippyControl(buf, &backup) || ZippyConverse(buf, &backup) ||
- (appData.zippyPlay && ZippyMatch(buf, &backup)));
+ (appData.zippyPlay && ZippyMatch(buf, &backup)));
#else
if (ZippyControl(buf, &i) ||
ZippyConverse(buf, &i) ||
(appData.zippyPlay && ZippyMatch(buf, &i))) {
loggedOn = TRUE;
- continue;
+ if (!appData.colorize) continue;
}
#endif
#endif
if (gameMode == IcsObserving &&
atoi(star_match[0]) == ics_gamenum)
{
+ /* icsEngineAnalyze */
+ if (appData.icsEngineAnalyze) {
+ ExitAnalyzeMode();
+ ModeHighlight();
+ }
StopClocks();
gameMode = IcsIdle;
ics_gamenum = -1;
/* Update currentMove and known move number limits */
newMove = newGame || moveNum > forwardMostMove;
- /* If we found takebacks during icsEngineAnalyze
+ /* If we found takebacks during icsEngineAnalyze
try send to engine */
if (!newGame && appData.icsEngineAnalyze && moveNum < forwardMostMove) {
takeback = forwardMostMove - moveNum;
break;
case AnalyzeMode:
case AnalyzeFile:
+ break;
/* icsEngineAnalyze */
case IcsObserving:
if (!appData.icsEngineAnalyze) ignore = TRUE;
ToUpper(cps->twoMachinesColor[0]) : ' '),
((double) curscore) / 100.0,
prefixHint ? lastHint : "",
- prefixHint ? " " : "", buf1);
+ prefixHint ? " " : "", programStats.movelist);
if (currentMove == forwardMostMove || gameMode == AnalyzeMode
|| gameMode == AnalyzeFile || appData.icsEngineAnalyze) {
ExitAnalyzeMode()
{
/* icsEngineAnalyze - possible call from other functions */
- if (appData.icsEngineAnalyze)
+ if (appData.icsEngineAnalyze) {
appData.icsEngineAnalyze = FALSE;
-
+ DisplayMessage("","Close ICS engine analyze...");
+ }
if (first.analysisSupport && first.analyzing) {
SendToProgram("exit\n", &first);
first.analyzing = FALSE;
SubtractTimeMarks(&now, &programStartTime),
cps->which, message);
}
- HandleMachineMove(message, cps);
+ /* if icsEngineAnalyze is active we block all
+ whisper and kibitz output, because nobody want
+ see this
+ */
+ if (appData.icsEngineAnalyze) {
+ if (strstr(message, "whisper") != NULL ||
+ strstr(message, "kibitz") != NULL ||
+ strstr(message, "tellics") != NULL) return;
+ HandleMachineMove(message, cps);
+ } else {
+ HandleMachineMove(message, cps);
+ }
}
{
char buf[MSG_SIZ];
- if (gameMode == AnalyzeMode || gameMode == AnalyzeFile
+ if (gameMode == AnalyzeMode || gameMode == AnalyzeFile
|| appData.icsEngineAnalyze) {
sprintf(buf, "Analysis (%s)", first.tidy);
AnalysisPopUp(buf, text);