Fix util.cpp missing
This commit is contained in:
parent
62259b6c75
commit
7e50948296
1 changed files with 19 additions and 0 deletions
19
src/util.cpp
Normal file
19
src/util.cpp
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
#include "util.h"
|
||||||
|
|
||||||
|
static int debug_level = 0;
|
||||||
|
|
||||||
|
void dbg_setlevel(int Level)
|
||||||
|
{
|
||||||
|
debug_level=Level;
|
||||||
|
}
|
||||||
|
|
||||||
|
void dbg_printf(int Level, const char *fmt, ...)
|
||||||
|
{
|
||||||
|
if (Level <= debug_level)
|
||||||
|
{
|
||||||
|
va_list args;
|
||||||
|
va_start(args, fmt);
|
||||||
|
vfprintf(stderr, fmt, args);
|
||||||
|
va_end(args);
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue