Files
pokediamond/tools/msgenc/util.h
T
2021-08-27 13:00:48 -04:00

18 lines
368 B
C

#ifndef GUARD_UTIL_H
#define GUARD_UTIL_H
#include <cstdio>
#include <cstdarg>
static inline __attribute__((format(printf, 1, 2))) void debug_printf(const char * fmt, ...) {
#ifndef NDEBUG
fputs("DEBUG: ", stderr);
va_list va_args;
va_start(va_args, fmt);
vfprintf(stderr, fmt, va_args);
va_end(va_args);
#endif //NDEBUG
}
#endif //GUARD_UTIL_H