version 1.4.34b
[polyglot.git] / uci.h
diff --git a/uci.h b/uci.h
index 0ac4f30..0a471fd 100644 (file)
--- a/uci.h
+++ b/uci.h
 #include "option.h"\r
 #include "util.h"\r
 \r
-// defines\r
+// macros\r
 \r
-#define OptionNb 256\r
+// I need to make a uniform string type.\r
+\r
+#define UciStringSize 4096\r
 \r
 // types\r
 \r
@@ -26,8 +28,7 @@ typedef struct {
    const char * name;\r
    const char * author;\r
 \r
-   int option_nb;\r
-   option_t option[OptionNb];\r
+   option_list_t option[1];\r
 \r
    bool ready;\r
    int ready_nb;\r
@@ -61,18 +62,21 @@ typedef struct {
    int root_move_pos;\r
    int root_move_nb;\r
    bool multipv_mode;\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_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
@@ -88,27 +92,11 @@ extern void uci_send_stop         (uci_t * uci);
 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 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
-extern void uci_send_option       (uci_t * uci, const char option[], const char format[], ...);\r
-\r
-extern void uci_close           (uci_t * uci);\r
-\r
-extern void uci_clear           (uci_t * uci);\r
-\r
-extern int  uci_parse           (uci_t * uci, const char string[]);\r
-\r
-void uci_set_option(uci_t * uci,\r
-                    const char * name,\r
-                    const char * default_,\r
-                    const char * type,\r
-                    const char * max,\r
-                    const char * min,\r
-                    int var_nb,\r
-                    const char * var[]);\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