X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=util.h;h=3855a8227a9dfc801a8c49f0cb091e1e30f57f42;hb=60900035e6d0309705f2326ee50edc52386305e9;hp=4eee73a9e8e4d43af48c117def1852d3ceafc4b0;hpb=bb6c47f77f59067c358579a71cefa1ae65180a30;p=polyglot.git diff --git a/util.h b/util.h index 4eee73a..3855a82 100644 --- a/util.h +++ b/util.h @@ -91,8 +91,13 @@ } \ } \ +#define TO_BOOL(string) ((my_string_case_equal(string,"false") || \ + my_string_equal(string,"0"))?FALSE:TRUE) - +#define IS_BOOL(string) (my_string_case_equal(string,"false")|| \ + my_string_case_equal(string,"true") || \ + my_string_case_equal(string,"1") || \ + my_string_case_equal(string,"0")) // types typedef signed char sint8; @@ -173,6 +178,15 @@ extern double my_timer_elapsed_real (const my_timer_t * timer); extern char * my_error(); +extern void my_dequote (char *out, + const char *in, + const char *special); +extern void my_quote (char *out, + const char *in, + const char *special); + +extern void my_sleep (int msec); + #endif // !defined UTIL_H // end of util.h