Add forgotten files 1.4.70b
[polyglot.git] / uci.h
diff --git a/uci.h b/uci.h
index 3e6bacf..cac77df 100644 (file)
--- a/uci.h
+++ b/uci.h
-\r
-// uci.h\r
-\r
-#ifndef UCI_H\r
-#define UCI_H\r
-\r
-// includes\r
-\r
-#include "board.h"\r
-#include "engine.h"\r
-#include "line.h"\r
-#include "move.h"\r
-#include "option.h"\r
-#include "util.h"\r
-\r
-// macros\r
-\r
-// I need to make a uniform string type.\r
-\r
-#define UciStringSize 4096\r
-#define MultiPVStackSize 256\r
-\r
-// types\r
-\r
-typedef struct {\r
-  \r
-  engine_t * engine;\r
-  \r
-  const char * name;\r
-  const char * author;\r
-  \r
-  option_list_t option[1];\r
-  \r
-  bool ready;\r
-  int ready_nb;\r
-  \r
-  bool searching;\r
-  int pending_nb;\r
-  \r
-  board_t board[1];\r
-  \r
-  int best_move;\r
-  int ponder_move;\r
-  \r
-  int score;\r
-  int depth;\r
-  int sel_depth;\r
-  move_t pv[LineSize];\r
-  \r
-  int best_score;\r
-  int best_depth;\r
-  int best_sel_depth;\r
-  move_t best_pv[LineSize];\r
-  char bestmove[UciStringSize];\r
-  \r
-  sint64 node_nb;\r
-  double time;\r
-  double speed;\r
-  double cpu;\r
-  double hash;\r
-  move_t current_line[LineSize];\r
-  \r
-  int root_move;\r
-  int root_move_pos;\r
-  int root_move_nb;\r
-  bool multipv_mode;\r
-  int multipvSP;\r
-  int multipvScore[MultiPVStackSize];\r
-  move_t multipvMove[MultiPVStackSize];\r
-  char info[UciStringSize];\r
-} uci_t;\r
-\r
-typedef enum {\r
-   EVENT_NONE         = 0,\r
-   EVENT_UCI          = 1 << 0,\r
-   EVENT_READY        = 1 << 1,\r
-   EVENT_STOP         = 1 << 2,\r
-   EVENT_MOVE         = 1 << 3,\r
-   EVENT_PV           = 1 << 4,\r
-   EVENT_DEPTH        = 1 << 5,\r
-   EVENT_DRAW         = 1 << 6,\r
-   EVENT_RESIGN       = 1 << 7,\r
-   EVENT_ILLEGAL_MOVE = 1 << 8,\r
-   EVENT_INFO         = 1 << 9\r
-} dummy_event_t;\r
-\r
-// variables\r
-\r
-extern uci_t Uci[1];\r
-\r
-// functions\r
-\r
-extern void uci_open              (uci_t * uci, engine_t * engine);\r
-extern void uci_send_isready      (uci_t * uci);\r
-extern void uci_send_isready_sync (uci_t * uci);\r
-extern void uci_send_stop         (uci_t * uci);\r
-extern void uci_send_stop_sync    (uci_t * uci);\r
-extern void uci_send_ucinewgame   (uci_t * uci);\r
-extern void uci_set_threads       (uci_t * uci, int n);\r
-extern const char * uci_thread_option(uci_t * uci);\r
-extern bool uci_send_option       (uci_t * uci, const char option[], const char format[], ...);\r
-extern void uci_close             (uci_t * uci);\r
-extern void uci_clear             (uci_t * uci);\r
-extern int  uci_parse             (uci_t * uci, const char string[]);\r
-\r
-#endif // !defined UCI_H\r
-\r
-// end of uci.h\r
-\r
+
+// uci.h
+
+#ifndef UCI_H
+#define UCI_H
+
+// includes
+
+#include "board.h"
+#include "engine.h"
+#include "line.h"
+#include "move.h"
+#include "option.h"
+#include "util.h"
+
+// macros
+
+// I need to make a uniform string type.
+
+#define UciStringSize 4096
+#define MultiPVStackSize 256
+
+// types
+
+typedef struct {
+  
+  engine_t * engine;
+  
+  const char * name;
+  const char * author;
+  
+  option_list_t option[1];
+  
+  bool ready;
+  int ready_nb;
+  
+  bool searching;
+  int pending_nb;
+  
+  board_t board[1];
+  
+  int best_move;
+  int ponder_move;
+  
+  int score;
+  int depth;
+  int sel_depth;
+  move_t pv[LineSize];
+  
+  int best_score;
+  int best_depth;
+  int best_sel_depth;
+  move_t best_pv[LineSize];
+  char bestmove[UciStringSize];
+  
+  sint64 node_nb;
+  double time;
+  double speed;
+  double cpu;
+  double hash;
+  move_t current_line[LineSize];
+  
+  int root_move;
+  int root_move_pos;
+  int root_move_nb;
+  bool multipv_mode;
+  int multipvSP;
+  int multipvScore[MultiPVStackSize];
+  move_t multipvMove[MultiPVStackSize];
+  char info[UciStringSize];
+} uci_t;
+
+typedef enum {
+   EVENT_NONE         = 0,
+   EVENT_UCI          = 1 << 0,
+   EVENT_READY        = 1 << 1,
+   EVENT_STOP         = 1 << 2,
+   EVENT_MOVE         = 1 << 3,
+   EVENT_PV           = 1 << 4,
+   EVENT_DEPTH        = 1 << 5,
+   EVENT_DRAW         = 1 << 6,
+   EVENT_RESIGN       = 1 << 7,
+   EVENT_ILLEGAL_MOVE = 1 << 8,
+   EVENT_INFO         = 1 << 9
+} dummy_event_t;
+
+// variables
+
+extern uci_t Uci[1];
+
+// functions
+
+extern void uci_open              (uci_t * uci, engine_t * engine);
+extern void uci_send_isready      (uci_t * uci);
+extern void uci_send_isready_sync (uci_t * uci);
+extern void uci_send_stop         (uci_t * uci);
+extern void uci_send_stop_sync    (uci_t * uci);
+extern void uci_send_ucinewgame   (uci_t * uci);
+extern void uci_set_threads       (uci_t * uci, int n);
+extern const char * uci_thread_option(uci_t * uci);
+extern bool uci_send_option       (uci_t * uci, const char option[], const char format[], ...);
+extern void uci_close             (uci_t * uci);
+extern void uci_clear             (uci_t * uci);
+extern int  uci_parse             (uci_t * uci, const char string[]);
+
+#endif // !defined UCI_H
+
+// end of uci.h
+