From 7e50948296193c577c09011d8a8988933b4f00fe Mon Sep 17 00:00:00 2001 From: F5OEO Date: Tue, 8 Jan 2019 14:07:01 +0000 Subject: [PATCH] Fix util.cpp missing --- src/util.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 src/util.cpp diff --git a/src/util.cpp b/src/util.cpp new file mode 100644 index 0000000..e9e5943 --- /dev/null +++ b/src/util.cpp @@ -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); + } +}