From: Daniel Mehrmann Date: Sun, 15 Feb 2004 02:29:36 +0000 (+0000) Subject: Bugfix bug #6908 X-Git-Tag: v4.2.8~46 X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=cda9681381317b37da384bc8450795c29e8dccc8;p=xboard.git Bugfix bug #6908 --- diff --git a/backend.c b/backend.c index 901a35e..8ea75c8 100644 --- a/backend.c +++ b/backend.c @@ -4375,7 +4375,7 @@ HandleMachineMove(message, cps) if (!ignore) { buf1[0] = NULLCHAR; - if (sscanf(message, "%d%c %d %d %I64u %[^\n]\n", + if (sscanf(message, "%d%c %d %d" u64Display "%[^\n]\n", &plylev, &plyext, &curscore, &time, &nodes, buf1) >= 5) { if (plyext != ' ' && plyext != '\t') { @@ -4455,7 +4455,7 @@ HandleMachineMove(message, cps) DisplayAnalysis(); } return; - } else if (sscanf(message,"stat01: %d %lu %d %d %d %s", + } else if (sscanf(message,"stat01: %d" u64Display "%d %d %d %s", &time, &nodes, &plylev, &mvleft, &mvtot, mvname) >= 5) { /* The stat01: line is from Crafty (9.29+) in response @@ -9263,7 +9263,7 @@ DisplayAnalysis() if (programStats.moves_left > 0 && appData.periodicUpdates) { if (programStats.move_name[0] != NULLCHAR) { - sprintf(buf, "depth=%d %d/%d(%s) %+.2f %s%s\nNodes: %I64u NPS: %d\nTime: %02d:%02d:%02d.%02d", + sprintf(buf, "depth=%d %d/%d(%s) %+.2f %s%s\nNodes: "u64Display" NPS: %d\nTime: %02d:%02d:%02d.%02d", programStats.depth, programStats.nr_moves-programStats.moves_left, programStats.nr_moves, programStats.move_name, @@ -9272,7 +9272,7 @@ DisplayAnalysis() xtra[programStats.got_fail] : "", (u64)programStats.nodes, (int)nps, h, m, s, cs); } else { - sprintf(buf, "depth=%d %d/%d %+.2f %s%s\nNodes: %I64u NPS: %d\nTime: %02d:%02d:%02d.%02d", + sprintf(buf, "depth=%d %d/%d %+.2f %s%s\nNodes: "u64Display" NPS: %d\nTime: %02d:%02d:%02d.%02d", programStats.depth, programStats.nr_moves-programStats.moves_left, programStats.nr_moves, ((float)programStats.score)/100.0, @@ -9282,7 +9282,7 @@ DisplayAnalysis() (u64)programStats.nodes, (int)nps, h, m, s, cs); } } else { - sprintf(buf, "depth=%d %+.2f %s%s\nNodes: %I64u NPS: %d\nTime: %02d:%02d:%02d.%02d", + sprintf(buf, "depth=%d %+.2f %s%s\nNodes: "u64Display" NPS: %d\nTime: %02d:%02d:%02d.%02d", programStats.depth, ((float)programStats.score)/100.0, programStats.movelist, diff --git a/backend.h b/backend.h index 41f8da1..2c63b76 100644 --- a/backend.h +++ b/backend.h @@ -177,16 +177,17 @@ extern GameInfo gameInfo; int ics_type; /* unsigned int 64 for engine nodes work and display */ -#define u64Display "%I64u" #ifdef WIN32 /* I don't know the name for this type of other compilers * If it not work just added here * Thats for MS Visual Studio */ #define u64 unsigned __int64 + #define u64Display "%I64u" #else /* GNU gcc */ #define u64 unsigned long long + #define u64Display "%llu" #endif