cleaned up some more copyright notices
[xboard.git] / backend.h
index eba5366..a7b6074 100644 (file)
--- a/backend.h
+++ b/backend.h
@@ -1,9 +1,13 @@
 /*\r
  * backend.h -- Interface exported by XBoard back end\r
- * $Id: backend.h,v 2.1 2003/10/27 19:21:00 mann Exp $\r
  *\r
- * Copyright 1991 by Digital Equipment Corporation, Maynard, Massachusetts.\r
- * Enhancements Copyright 1992-95 Free Software Foundation, Inc.\r
+ * Copyright 1991 by Digital Equipment Corporation, Maynard,\r
+ * Massachusetts.\r
+ *\r
+ * Enhancements Copyright 1992-2001, 2002, 2003, 2004, 2005, 2006,\r
+ * 2007, 2008, 2009 Free Software Foundation, Inc.\r
+ *\r
+ * Enhancements Copyright 2005 Alessandro Scotti\r
  *\r
  * The following terms apply to Digital Equipment Corporation's copyright\r
  * interest in XBoard:\r
  * SOFTWARE.\r
  * ------------------------------------------------------------------------\r
  *\r
- * The following terms apply to the enhanced version of XBoard distributed\r
- * by the Free Software Foundation:\r
+ * The following terms apply to the enhanced version of XBoard\r
+ * distributed by the Free Software Foundation:\r
  * ------------------------------------------------------------------------\r
- * This program is free software; you can redistribute it and/or modify\r
+ *\r
+ * GNU XBoard is free software: you can redistribute it and/or modify\r
  * it under the terms of the GNU General Public License as published by\r
- * the Free Software Foundation; either version 2 of the License, or\r
- * (at your option) any later version.\r
+ * the Free Software Foundation, either version 3 of the License, or (at\r
+ * your option) any later version.\r
  *\r
- * This program is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
- * GNU General Public License for more details.\r
+ * GNU XBoard is distributed in the hope that it will be useful, but\r
+ * WITHOUT ANY WARRANTY; without even the implied warranty of\r
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\r
+ * General Public License for more details.\r
  *\r
  * You should have received a copy of the GNU General Public License\r
- * along with this program; if not, write to the Free Software\r
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\r
- * ------------------------------------------------------------------------\r
- */\r
+ * along with this program. If not, see http://www.gnu.org/licenses/.  *\r
+ *\r
+ *------------------------------------------------------------------------\r
+ ** See the file ChangeLog for a revision history.  */\r
+\r
 #ifndef _BACKEND\r
 #define _BACKEND\r
 \r
+/* unsigned int 64 for engine nodes work and display */\r
+#ifdef WIN32\r
+       /* I don't know the name for this type of other compiler\r
+        * If it not work, just modify here\r
+        * This is for MS Visual Studio\r
+        */\r
+       #ifdef _MSC_VER\r
+               #define u64 unsigned __int64\r
+               #define s64 signed __int64\r
+               #define u64Display "%I64u"\r
+               #define s64Display "%I64d"\r
+               #define u64Const(c) (c ## UI64)\r
+               #define s64Const(c) (c ## I64)\r
+       #else\r
+               /* place holder\r
+                * or dummy types for other compiler\r
+                */\r
+               #define u64 unsigned long long\r
+               #define s64 signed long long\r
+               #define u64Display "%llu"\r
+               #define s64Display "%lld"\r
+               #define u64Const(c) (c ## ULL)\r
+               #define s64Const(c) (c ## LL)\r
+       #endif\r
+#else\r
+       /* GNU gcc */\r
+       #define u64 unsigned long long\r
+       #define s64 signed long long\r
+       #define u64Display "%llu"\r
+       #define s64Display "%lld"\r
+       #define u64Const(c) (c ## ull)\r
+       #define s64Const(c) (c ## ll)\r
+#endif\r
+\r
 #include "lists.h"\r
 #include "frontend.h"\r
 \r
@@ -64,7 +104,7 @@ extern Board boards[];
 \r
 char *CmailMsg P((void));\r
 /* Tord: Added the useFEN960 parameter in PositionToFEN() below */\r
-char *PositionToFEN P((int move, int useFEN960));\r
+char *PositionToFEN P((int move, char* useFEN960));\r
 void AlphaRank P((char *s, int n)); /* [HGM] Shogi move preprocessor */\r
 void EditPositionPasteFEN P((char *fen));\r
 void TimeDelay P((long ms));\r
@@ -159,6 +199,7 @@ Boolean ParseOneMove P((char *move, int moveNum,
                        int *toX, int *toY, char *promoChar));\r
 char *VariantName P((VariantClass v));\r
 VariantClass StringToVariant P((char *e));\r
+double u64ToDouble P((u64 value));\r
 \r
 char *StrStr P((char *string, char *match));\r
 char *StrCaseStr P((char *string, char *match));\r
@@ -176,6 +217,14 @@ int ToUpper P((int c));
 \r
 extern GameInfo gameInfo;\r
 \r
+/* ICS vars used with backend.c and zippy.c */\r
+#define ICS_GENERIC 0\r
+#define ICS_ICC 1\r
+#define ICS_FICS 2\r
+#define ICS_CHESSNET 3 /* not really supported */\r
+int ics_type;\r
+\r
\r
 \r
 /* pgntags.c prototypes\r
  */\r
@@ -283,7 +332,9 @@ typedef struct _CPS {
     Option option[MAX_OPTIONS];\r
     int comboCnt;\r
     char *comboList[10*MAX_OPTIONS];\r
+    char *optionSettings;\r
     void *programLogo; /* [HGM] logo: bitmap of the logo                    */\r
+    char *fenOverride; /* [HGM} FRC: force FEN casling & ep fields by hand  */\r
 } ChessProgramState;\r
 \r
 extern ChessProgramState first, second;\r
@@ -302,7 +353,7 @@ typedef struct {
   int nr_moves;           /* Total nr of root moves */\r
   int moves_left;         /* Moves remaining to be searched */\r
   char move_name[MOVE_LEN];  /* Current move being searched, if provided */\r
-  unsigned long nodes;    /* # of nodes searched */\r
+  u64 nodes;    /* # of nodes searched */\r
   int time;               /* Search time (centiseconds) */\r
   int score;              /* Score (centipawns) */\r
   int got_only_move;      /* If last msg was "(only move)" */\r
@@ -313,7 +364,7 @@ typedef struct {
 } ChessProgramStats;\r
 \r
 extern ChessProgramStats_Move pvInfoList[MAX_MOVES];\r
-extern shuffleOpenings;\r
+extern int shuffleOpenings;\r
 extern ChessProgramStats programStats;\r
 \r
 #endif /* _BACKEND */\r