*/
#define debug_printf_once(args) \
do { \
- static boolean once = TRUE; \
+ static bool once = true; \
if (once) { \
- once = FALSE; \
+ once = false; \
debug_printf args; \
} \
} while (0)
#ifdef DEBUG
#define debug_warn_once(__msg) \
do { \
- static bool warned = FALSE; \
+ static bool warned = false; \
if (!warned) { \
_debug_printf("%s:%u:%s: one time warning: %s\n", \
__FILE__, __LINE__, __FUNCTION__, __msg); \
- warned = TRUE; \
+ warned = true; \
} \
} while (0)
#else
const char *
debug_get_option(const char *name, const char *dfault);
-boolean
-debug_get_bool_option(const char *name, boolean dfault);
+bool
+debug_get_bool_option(const char *name, bool dfault);
long
debug_get_num_option(const char *name, long dfault);
static const char * \
debug_get_option_ ## suffix (void) \
{ \
- static boolean first = TRUE; \
+ static bool first = true; \
static const char * value; \
if (first) { \
- first = FALSE; \
+ first = false; \
value = debug_get_option(name, dfault); \
} \
return value; \
}
#define DEBUG_GET_ONCE_BOOL_OPTION(sufix, name, dfault) \
-static boolean \
+static bool \
debug_get_option_ ## sufix (void) \
{ \
- static boolean first = TRUE; \
- static boolean value; \
+ static bool first = true; \
+ static bool value; \
if (first) { \
- first = FALSE; \
+ first = false; \
value = debug_get_bool_option(name, dfault); \
} \
return value; \
static long \
debug_get_option_ ## sufix (void) \
{ \
- static boolean first = TRUE; \
+ static bool first = true; \
static long value; \
if (first) { \
- first = FALSE; \
+ first = false; \
value = debug_get_num_option(name, dfault); \
} \
return value; \
static unsigned long \
debug_get_option_ ## sufix (void) \
{ \
- static boolean first = TRUE; \
+ static bool first = true; \
static unsigned long value; \
if (first) { \
- first = FALSE; \
+ first = false; \
value = debug_get_flags_option(name, flags, dfault); \
} \
return value; \