X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=uci.h;h=0ac4f30b385f5b4b53695548d322cc0fff9698c7;hb=9d90dc40cca05e03cafd0519e17f15b1d7441e37;hp=7291cdc14e74a5d33bdd12eea26f904ec35ae396;hpb=64f72f31685ea1dff12b19b22cfaf7a53ccc079f;p=polyglot.git diff --git a/uci.h b/uci.h index 7291cdc..0ac4f30 100644 --- a/uci.h +++ b/uci.h @@ -10,24 +10,16 @@ #include "engine.h" #include "line.h" #include "move.h" +#include "option.h" #include "util.h" -// constants +// defines -const int OptionNb = 256; +#define OptionNb 256 // types -struct option_t { - const char * name; - const char * value; - const char * type; - const char * max; - const char * min; - const char * var; -}; - -struct uci_t { +typedef struct { engine_t * engine; @@ -69,9 +61,9 @@ struct uci_t { int root_move_pos; int root_move_nb; bool multipv_mode; -}; +} uci_t; -enum dummy_event_t { +typedef enum { EVENT_NONE = 0, EVENT_UCI = 1 << 0, EVENT_READY = 1 << 1, @@ -81,7 +73,7 @@ enum dummy_event_t { EVENT_DEPTH = 1 << 5, EVENT_DRAW = 1 << 6, EVENT_RESIGN= 1 << 7 -}; +} dummy_event_t; // variables @@ -97,6 +89,7 @@ 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 bool uci_thread_option_exist(uci_t * uci); +extern const char * uci_thread_option(uci_t * uci); extern int uci_get_option (uci_t * uci, const char * name); extern bool uci_option_exist (uci_t * uci, const char option[]); @@ -110,11 +103,12 @@ extern int uci_parse (uci_t * uci, const char string[]); void uci_set_option(uci_t * uci, const char * name, - const char * value, + const char * default_, const char * type, const char * max, const char * min, - const char * var); + int var_nb, + const char * var[]); #endif // !defined UCI_H