X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=util.h;h=269310dd9009c9719d0e1f7166871adb12e6934b;hb=471c4c42e267be298ce20951d5a352acd6b55190;hp=4eee73a9e8e4d43af48c117def1852d3ceafc4b0;hpb=bb6c47f77f59067c358579a71cefa1ae65180a30;p=polyglot.git diff --git a/util.h b/util.h index 4eee73a..269310d 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,13 @@ 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); + #endif // !defined UTIL_H // end of util.h