X-Git-Url: http://winboard.nl/cgi-bin?p=xboard.git;a=blobdiff_plain;f=backend.h;h=840dda3bd95d5bfa8246b61a86b3f81481f2746a;hp=eba53662d3bab5071ec569812510e9703acf4f12;hb=ea750683ac62717dd7346de17b5ae072622ff92a;hpb=74025874f2010f84fd4f7f2e120e84b56ee9781b diff --git a/backend.h b/backend.h index eba5366..840dda3 100644 --- a/backend.h +++ b/backend.h @@ -48,6 +48,40 @@ #ifndef _BACKEND #define _BACKEND +/* unsigned int 64 for engine nodes work and display */ +#ifdef WIN32 + /* I don't know the name for this type of other compiler + * If it not work, just modify here + * This is for MS Visual Studio + */ + #ifdef _MSC_VER + #define u64 unsigned __int64 + #define s64 signed __int64 + #define u64Display "%I64u" + #define s64Display "%I64d" + #define u64Const(c) (c ## UI64) + #define s64Const(c) (c ## I64) + #else + /* place holder + * or dummy types for other compiler + */ + #define u64 unsigned long long + #define s64 signed long long + #define u64Display "%llu" + #define s64Display "%lld" + #define u64Const(c) (c ## ULL) + #define s64Const(c) (c ## LL) + #endif +#else + /* GNU gcc */ + #define u64 unsigned long long + #define s64 signed long long + #define u64Display "%llu" + #define s64Display "%lld" + #define u64Const(c) (c ## ull) + #define s64Const(c) (c ## ll) +#endif + #include "lists.h" #include "frontend.h" @@ -159,6 +193,7 @@ Boolean ParseOneMove P((char *move, int moveNum, int *toX, int *toY, char *promoChar)); char *VariantName P((VariantClass v)); VariantClass StringToVariant P((char *e)); +double u64ToDouble P((u64 value)); char *StrStr P((char *string, char *match)); char *StrCaseStr P((char *string, char *match)); @@ -176,6 +211,14 @@ int ToUpper P((int c)); extern GameInfo gameInfo; +/* ICS vars used with backend.c and zippy.c */ +#define ICS_GENERIC 0 +#define ICS_ICC 1 +#define ICS_FICS 2 +#define ICS_CHESSNET 3 /* not really supported */ +int ics_type; + + /* pgntags.c prototypes */ @@ -302,7 +345,7 @@ typedef struct { int nr_moves; /* Total nr of root moves */ int moves_left; /* Moves remaining to be searched */ char move_name[MOVE_LEN]; /* Current move being searched, if provided */ - unsigned long nodes; /* # of nodes searched */ + u64 nodes; /* # of nodes searched */ int time; /* Search time (centiseconds) */ int score; /* Score (centipawns) */ int got_only_move; /* If last msg was "(only move)" */