X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=uci.h;h=0a471fd07dec96be195b92d9b858ecf2ede4411a;hb=acb140befabd8b0f1a8606470013b420d05b4fb7;hp=0ac4f30b385f5b4b53695548d322cc0fff9698c7;hpb=e15efca6667b2673b4c1a5879a6917eab6800e58;p=polyglot.git diff --git a/uci.h b/uci.h index 0ac4f30..0a471fd 100644 --- a/uci.h +++ b/uci.h @@ -13,9 +13,11 @@ #include "option.h" #include "util.h" -// defines +// macros -#define OptionNb 256 +// I need to make a uniform string type. + +#define UciStringSize 4096 // types @@ -26,8 +28,7 @@ typedef struct { const char * name; const char * author; - int option_nb; - option_t option[OptionNb]; + option_list_t option[1]; bool ready; int ready_nb; @@ -61,18 +62,21 @@ typedef struct { int root_move_pos; int root_move_nb; bool multipv_mode; + 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_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 @@ -88,27 +92,11 @@ 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 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[]); -extern void 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[]); - -void uci_set_option(uci_t * uci, - const char * name, - const char * default_, - const char * type, - const char * max, - const char * min, - int var_nb, - const char * var[]); +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