1#ifndef DMADEBUG_DEBUG_H
2#define DMADEBUG_DEBUG_H
21#define DEBUG_ANSI_RESET "\033[0m"
22#define DEBUG_ANSI_BOLD "\033[1m"
23#define DEBUG_ANSI_YELLOW "\033[33m"
24#define DEBUG_ANSI_GREEN "\033[32m"
25#define DEBUG_ANSI_MAGENTA "\033[35m"
26#define DEBUG_ANSI_CYAN "\033[36m"
27#define DEBUG_ANSI_WHITE "\033[37m"
28#define DEBUG_ANSI_ON_GREEN "\033[42m\033[30m"
29#define DEBUG_ANSI_ON_MAGENTA "\033[45m\033[30m"
30#define DEBUG_ANSI_ON_CYAN "\033[46m\033[30m"
31#define DEBUG_ANSI_ON_WHITE "\033[47m\033[30m"
32#define DEBUG_ANSI_ON_RED "\033[41m\033[30m"
33#define DEBUG_ANSI_ALERT "\033[41m\033[30m\033[5m"
34#define DEBUG_ANSI_CAUTION "\033[43m\033[30m\033[5m"
42#define DEBUG_ABORT(line, message) \
44 printf("Line %d: ", line); \
void DEBUG_reset(void)
Empty the output buffer and the pending message line.
char g_szDebugScratch[DEBUG_SCRATCH_SIZE]
Text the checker formats a message into before reporting it.
void DEBUG_addField(int placement, char *line, char *format,...)
Format a field and add it to a report line.
void DEBUG_init(const char *options)
Configure the module and allocate the output buffer.
@ DEBUG_MAX_WARNING_MASKS
Definition debug.h:68
int DEBUG_print(const char *text)
Append a line to the output buffer.
@ DEBUG_SCRATCH_SIZE
Definition debug.h:71
@ DEBUG_FATAL
Definition debug.h:53
@ DEBUG_ERROR
Definition debug.h:52
@ DEBUG_WARNING
Definition debug.h:54
@ DEBUG_FIELD_LINE
Definition debug.h:61
@ DEBUG_FIELD_INLINE
Definition debug.h:60
@ DEBUG_FIELD_COLUMN
Definition debug.h:59
int DEBUG_message(int number, int severity, const char *text)
Report an error or a warning.
@ DEBUG_COLUMN_WIDTH
Definition debug.h:65