You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
shuffle3/src/debug.c

20 lines
418 B

4 years ago
#include <stdlib.h>
#include <stdio.h>
#include <stdarg.h>
#include <debug.h>
#include <colours.h>
4 years ago
void _do_dprintf(struct debuginfo info, const char* fmt, ...)
{
#ifdef DEBUG
va_list li;
va_start(li, fmt);
fprintf(stderr, "["FGRN("dbg")" " FYEL("@") BOLD("%s") "->" FWHT("%s") ":" FYEL("%d") "]: ", info.file, info.function,info.line);
4 years ago
vfprintf(stderr, fmt, li);
fprintf(stderr, "\n");
va_end(li);
#endif
}