version 1.4.31b
[polyglot.git] / uci.h
diff --git a/uci.h b/uci.h
index 7291cdc..0ac4f30 100644 (file)
--- a/uci.h
+++ b/uci.h
 #include "engine.h"\r
 #include "line.h"\r
 #include "move.h"\r
+#include "option.h"\r
 #include "util.h"\r
 \r
-// constants\r
+// defines\r
 \r
-const int OptionNb = 256;\r
+#define OptionNb 256\r
 \r
 // types\r
 \r
-struct option_t {\r
-    const char * name;\r
-    const char * value;\r
-    const char * type;\r
-    const char * max;\r
-    const char * min;\r
-    const char * var;\r
-};\r
-\r
-struct uci_t {\r
+typedef struct {\r
 \r
    engine_t * engine;\r
 \r
@@ -69,9 +61,9 @@ struct uci_t {
    int root_move_pos;\r
    int root_move_nb;\r
    bool multipv_mode;\r
-};\r
+} uci_t;\r
 \r
-enum dummy_event_t {\r
+typedef enum {\r
    EVENT_NONE  = 0,\r
    EVENT_UCI   = 1 << 0,\r
    EVENT_READY = 1 << 1,\r
@@ -81,7 +73,7 @@ enum dummy_event_t {
    EVENT_DEPTH = 1 << 5,\r
    EVENT_DRAW  = 1 << 6,\r
    EVENT_RESIGN= 1 << 7\r
-};\r
+} dummy_event_t;\r
 \r
 // variables\r
 \r
@@ -97,6 +89,7 @@ extern void uci_send_stop_sync    (uci_t * uci);
 extern void uci_send_ucinewgame   (uci_t * uci);\r
 extern void uci_set_threads       (uci_t * uci, int n);\r
 extern bool uci_thread_option_exist(uci_t * uci);\r
+extern const char * uci_thread_option(uci_t * uci);\r
 extern int uci_get_option          (uci_t * uci, const char * name);\r
 \r
 extern bool uci_option_exist      (uci_t * uci, const char option[]);\r
@@ -110,11 +103,12 @@ extern int  uci_parse           (uci_t * uci, const char string[]);
 \r
 void uci_set_option(uci_t * uci,\r
                     const char * name,\r
-                    const char * value,\r
+                    const char * default_,\r
                     const char * type,\r
                     const char * max,\r
                     const char * min,\r
-                    const char * var);\r
+                    int var_nb,\r
+                    const char * var[]);\r
 \r
 #endif // !defined UCI_H\r
 \r