Go to the source code of this file.
- Author
- Xyne
- Copyright
- GPL2 only
◆ debug_print
#define debug_print |
( |
|
msg | ) |
|
Value:do \
{ \
{ \
debug_print_prefix; \
fprintf(\
msg \
); \
} \
} while (0)
#define RBT_DEBUG_FD
Definition: debug.h:27
#define RBT_DEBUG
Definition: debug.h:20
Print a debugging message.
- Parameters
-
◆ debug_print_func
#define debug_print_func |
( |
|
func, |
|
|
|
print_newline, |
|
|
|
... |
|
) |
| |
Value:do \
{ \
{ \
debug_print_prefix; \
if (print_newline) \
{ \
} \
} \
} while (0)
Print the debugging prefix then invoke a function to print the rest of the message.
- Parameters
-
func | A function that accepts a file descriptor as its first argument. |
print_newline | A boolean parameter. If it evaluates to non-zero, a newline will be printed after the function call. |
... | Additional arguments to pass to the function. |
◆ debug_print_prefix
Precede debug_print_prefix_flat
with indentation to represent the nesting level, if RBT_DEBUG_INDENT
is greater than 0, otherwise this is the same as debug_print_prefix_flat
.
◆ debug_print_prefix_flat
#define debug_print_prefix_flat |
Value: fprintf(\
"%s%s %s%d %s%s(): %s", \
RBT_DEBUG_FILENAME_COLOR, \
__FILE__, \
RBT_DEBUG_LINENUMBER_COLOR, \
__LINE__, \
RBT_DEBUG_FUNCTIONNAME_COLOR, \
__func__, \
RBT_DEBUG_RESET_COLOR \
)
Print the file name, line number and function name.
◆ debug_printf
#define debug_printf |
( |
|
fmt, |
|
|
|
... |
|
) |
| |
Value:do \
{ \
{ \
debug_print_prefix; \
fprintf(\
fmt, \
__VA_ARGS__ \
); \
} \
} while (0)
Print a debugging message.
- Parameters
-
fmt | A printf format string. |
... | Parameters to pass to printf . |
◆ error_print
#define error_print |
( |
|
msg | ) |
|
Value:do \
{ \
fprintf( \
"%s %d %s(): %s", \
__FILE__, __LINE__, __func__, msg \
); \
} \
while (0) \
Identical to debug_print
except that it is independent of RBT_DEBUG
.
- Parameters
-
◆ error_printf
#define error_printf |
( |
|
fmt, |
|
|
|
... |
|
) |
| |
Value:do \
{ \
fprintf( \
"%s %d %s(): " fmt, \
__FILE__, __LINE__, __func__, fmt, __VA_ARGS__ \
); \
} \
while (0) \
Identical to debug_printf
except that it is independent of RBT_DEBUG
.
- Parameters
-
fmt | A printf format string. |
... | Parameters to pass to printf . |
◆ RBT_DEBUG
Enable debugging messages if non-zero.
◆ RBT_DEBUG_FD
#define RBT_DEBUG_FD stderr |
The file descriptor to use for printing debugging messages.
◆ RBT_DEBUG_INDENT
#define RBT_DEBUG_INDENT 0 |
Use indentation to represent the nesting level of function calls.