Mercurial > hg > th-libs
diff th_string.h @ 735:31bc1ed07cf5
Renaming BOOL->bool and TRUE/FALSE to true/false, and using stdbool.h if available.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Wed, 07 Dec 2022 12:14:39 +0200 |
parents | 29e44a58bc73 |
children | 4181d43f91f9 |
line wrap: on
line diff
--- a/th_string.h Wed Dec 07 11:58:54 2022 +0200 +++ b/th_string.h Wed Dec 07 12:14:39 2022 +0200 @@ -188,11 +188,11 @@ int th_vprintf_put_int(th_vprintf_ctx *ctx, th_vprintf_putch vputch, va_list ap, const int f_radix, int f_flags, int f_width, int f_prec, - const BOOL f_unsig, th_vprintf_altfmt_func f_alt); + const bool f_unsig, th_vprintf_altfmt_func f_alt); int th_vprintf_put_int_format(th_vprintf_ctx *ctx, th_vprintf_putch vputch, th_char_t *buf, int f_flags, int f_width, int f_prec, int f_len, int vret, - BOOL f_neg, BOOL f_unsig, th_vprintf_altfmt_func f_alt); + bool f_neg, bool f_unsig, th_vprintf_altfmt_func f_alt); #define TH_VPRINTF_INTFMT_NAME th_vprintf_buf_int @@ -210,7 +210,7 @@ #ifdef TH_PRINTF_DEBUG -extern BOOL th_printf_debug; +extern bool th_printf_debug; extern char *th_printf_debug_prefix; #endif @@ -221,12 +221,12 @@ const th_char_t *th_findsep(const th_char_t *str, size_t *pos, const th_char_t sep); const th_char_t *th_findseporspace(const th_char_t *str, size_t *pos, const th_char_t sep); -BOOL th_strmatch(const th_char_t *haystack, const th_char_t *pattern); -BOOL th_strcasematch(const th_char_t *haystack, const th_char_t *pattern); +bool th_strmatch(const th_char_t *haystack, const th_char_t *pattern); +bool th_strcasematch(const th_char_t *haystack, const th_char_t *pattern); -BOOL th_get_hex_triplet(const th_char_t *str, unsigned int *value); -BOOL th_get_boolean(const th_char_t *str, BOOL *value); -BOOL th_get_int(const th_char_t *str, unsigned int *value, BOOL *neg); +bool th_get_hex_triplet(const th_char_t *str, unsigned int *value); +bool th_get_boolean(const th_char_t *str, bool *value); +bool th_get_int(const th_char_t *str, unsigned int *value, bool *neg); #ifdef __cplusplus