xboard-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [XBoard-devel] Bugfix: [Fwd: [Bug-XBoard] [bugs #6908] Node count st


From: Daniel Mehrmann
Subject: Re: [XBoard-devel] Bugfix: [Fwd: [Bug-XBoard] [bugs #6908] Node count stops after about 4.3 billionnodes]
Date: Sun, 15 Feb 2004 03:27:50 +0100
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7a) Gecko/20040124

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Tim Mann wrote:

Thanks Tim! My mistake.

We should allso added a check to the unix makefile of xboard for the
"configure script" if the compiler support long long ! You can compile
the gcc without 64 bit :(( So we should check this. Who can do that ? I
have no glue about configure stuff. I want learn it later...

ps: I forgot to change some lines too. So i correct my patch and other
stuff (scanf lines):

- --- backend.c 2004-02-15 01:51:08.000000000 +0100
+++ backend.c.new       2004-02-15 03:16:44.453125000 +0100
@@ -4375,7 +4375,7 @@

~       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 @@
~                   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 @@

~       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 @@
~                   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 @@
~                   (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,

- --- backend.h 2004-02-15 01:51:08.000000000 +0100
+++ backend.h.new       2004-02-15 03:12:08.359375000 +0100
@@ -177,16 +177,17 @@
~ 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







| You didn't complete the gcc part.  You need a definition for u64Display
| for gcc (it would be "%llu"), and you need to use it in all the printfs
| instead of putting %I64u in there literally.
|
| On Sun, 15 Feb 2004 01:52:52 +0100, Daniel Mehrmann
<address@hidden> wrote:
|
[...]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (MingW32)

iD8DBQFALtkmPt1V5Pj1nvYRAh15AJ0dBa2hD+MMaCeJnRxvwMu7+0chVwCdHqXO
N/s12pcAaQRIpaVhgErvjF8=
=K72g
-----END PGP SIGNATURE-----

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]