29#define DEBUG_CHAR_STORAGE_SIZE (1024)
31enum debug_tristate_option
46debug_string_to_bool(
const char *
string);
48enum debug_tristate_option
49debug_string_to_tristate(
const char *
string);
52debug_string_to_num(
const char *
string,
long _default);
55debug_string_to_float(
const char *
string,
float _default);
58debug_string_to_log_level(
const char *
string,
enum u_logging_level _default);
68debug_get_option(
char *chars,
size_t char_count,
const char *name,
const char *_default);
71debug_get_bool_option(
const char *name,
bool _default);
73enum debug_tristate_option
74debug_get_tristate_option(
const char *name);
77debug_string_to_num(
const char *
string,
long _default);
80debug_get_num_option(
const char *name,
long _default);
83debug_get_float_option(
const char *name,
float _default);
95#define DEBUG_GET_ONCE_OPTION(suffix, name, _default) \
96 static const char *debug_get_option_##suffix(void) \
98 static char storage[DEBUG_CHAR_STORAGE_SIZE]; \
99 static bool gotten = false; \
100 static const char *stored; \
103 stored = debug_get_option(storage, ARRAY_SIZE(storage), name, _default); \
108#define DEBUG_GET_ONCE_TRISTATE_OPTION(suffix, name) \
109 static enum debug_tristate_option debug_get_tristate_option_##suffix(void) \
111 static bool gotten = false; \
112 static enum debug_tristate_option stored; \
115 stored = debug_get_tristate_option(name); \
120#define DEBUG_GET_ONCE_BOOL_OPTION(suffix, name, _default) \
121 static bool debug_get_bool_option_##suffix(void) \
123 static bool gotten = false; \
124 static bool stored; \
127 stored = debug_get_bool_option(name, _default); \
132#define DEBUG_GET_ONCE_NUM_OPTION(suffix, name, _default) \
133 static long debug_get_num_option_##suffix(void) \
135 static long gotten = false; \
136 static long stored; \
139 stored = debug_get_num_option(name, _default); \
144#define DEBUG_GET_ONCE_FLOAT_OPTION(suffix, name, _default) \
145 static float debug_get_float_option_##suffix(void) \
147 static long gotten = false; \
148 static float stored; \
151 stored = debug_get_float_option(name, _default); \
156#define DEBUG_GET_ONCE_LOG_OPTION(suffix, name, _default) \
157 static enum u_logging_level debug_get_log_option_##suffix(void) \
159 static long gotten = false; \
160 static enum u_logging_level stored; \
163 stored = debug_get_log_option(name, _default); \
u_logging_level
Logging level enum.
Definition: u_logging.h:43
Basic logging functionality.
Header holding common defines.