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/lean/src/debug.c

18 lines
340 B

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