Small debug helpers.
More...
Go to the source code of this file.
Small debug helpers.
- Author
- Jakob Bornecrantz jakob.nosp@m.@col.nosp@m.labor.nosp@m.a.co.nosp@m.m
Debug get option helpers heavily inspired from mesa ones.
◆ DEBUG_GET_ONCE_BOOL_OPTION
#define DEBUG_GET_ONCE_BOOL_OPTION |
( |
|
suffix, |
|
|
|
name, |
|
|
|
_default |
|
) |
| |
Value:static bool debug_get_bool_option_##suffix() \
{ \
static bool gotten = false; \
static bool stored; \
if (!gotten) { \
gotten = true; \
} \
return stored; \
}
bool debug_get_bool_option(const char *name, bool _default)
Definition: u_debug.c:49
◆ DEBUG_GET_ONCE_FLOAT_OPTION
#define DEBUG_GET_ONCE_FLOAT_OPTION |
( |
|
suffix, |
|
|
|
name, |
|
|
|
_default |
|
) |
| |
Value:static long debug_get_float_option_##suffix() \
{ \
static long gotten = false; \
static long stored; \
if (!gotten) { \
gotten = true; \
} \
return stored; \
}
float debug_get_float_option(const char *name, float _default)
Definition: u_debug.c:117
◆ DEBUG_GET_ONCE_NUM_OPTION
#define DEBUG_GET_ONCE_NUM_OPTION |
( |
|
suffix, |
|
|
|
name, |
|
|
|
_default |
|
) |
| |
Value:static long debug_get_num_option_##suffix() \
{ \
static long gotten = false; \
static long stored; \
if (!gotten) { \
gotten = true; \
} \
return stored; \
}
long debug_get_num_option(const char *name, long _default)
Definition: u_debug.c:91
◆ DEBUG_GET_ONCE_OPTION
#define DEBUG_GET_ONCE_OPTION |
( |
|
suffix, |
|
|
|
name, |
|
|
|
_default |
|
) |
| |
Value:static const char *debug_get_option_##suffix() \
{ \
static bool gotten = false; \
static const char *stored; \
if (!gotten) { \
gotten = true; \
} \
return stored; \
}
const char * debug_get_option(const char *name, const char *_default)
Definition: u_debug.c:29
◆ debug_get_bool_option()
bool debug_get_bool_option |
( |
const char * |
name, |
|
|
bool |
_default |
|
) |
| |
◆ debug_get_float_option()
float debug_get_float_option |
( |
const char * |
name, |
|
|
float |
_default |
|
) |
| |
◆ debug_get_num_option()
long debug_get_num_option |
( |
const char * |
name, |
|
|
long |
_default |
|
) |
| |
◆ debug_get_option()
const char* debug_get_option |
( |
const char * |
name, |
|
|
const char * |
_default |
|
) |
| |