Mercurial > hg > th-libs
diff th_util.c @ 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 | db1a132c7754 |
line wrap: on
line diff
--- a/th_util.c Wed Dec 07 11:58:54 2022 +0200 +++ b/th_util.c Wed Dec 07 12:14:39 2022 +0200 @@ -15,7 +15,7 @@ /* Default settings */ -static BOOL th_initialized = FALSE; +static bool th_initialized = false; int th_verbosity = 2; char *th_prog_name = NULL, *th_prog_desc = NULL, @@ -45,7 +45,7 @@ th_prog_license = license; #endif - th_initialized = TRUE; + th_initialized = true; } @@ -116,7 +116,7 @@ */ void THERR_V(const char *fmt, va_list ap) { - assert(th_initialized == TRUE); + assert(th_initialized == true); fprintf(stderr, "%s: ", th_prog_name); vfprintf(stderr, fmt, ap); @@ -125,7 +125,7 @@ void THMSG_V(int level, const char *fmt, va_list ap) { - assert(th_initialized == TRUE); + assert(th_initialized == true); if (th_verbosity >= level) { @@ -137,7 +137,7 @@ void THPRINT_V(int level, const char *fmt, va_list ap) { - assert(th_initialized == TRUE); + assert(th_initialized == true); if (th_verbosity >= level) { @@ -149,7 +149,7 @@ void THERR(const char *fmt, ...) { va_list ap; - assert(th_initialized == TRUE); + assert(th_initialized == true); va_start(ap, fmt); THERR_V(fmt, ap); @@ -160,7 +160,7 @@ void THMSG(int level, const char *fmt, ...) { va_list ap; - assert(th_initialized == TRUE); + assert(th_initialized == true); va_start(ap, fmt); THMSG_V(level, fmt, ap); @@ -171,7 +171,7 @@ void THPRINT(int level, const char *fmt, ...) { va_list ap; - assert(th_initialized == TRUE); + assert(th_initialized == true); va_start(ap, fmt); THPRINT_V(level, fmt, ap);