From d23a8c7adefbcb71778642500fee08a1475dbc52 Mon Sep 17 00:00:00 2001 From: Jesse van den Kieboom Date: Sun, 6 Nov 2005 16:21:08 +0000 Subject: [PATCH] Filename changed --- src/debug.c | 44 -------------------------------------------- src/debug.h | 13 ------------- 2 files changed, 57 deletions(-) delete mode 100644 src/debug.c delete mode 100644 src/debug.h diff --git a/src/debug.c b/src/debug.c deleted file mode 100644 index c820441..0000000 --- a/src/debug.c +++ /dev/null @@ -1,44 +0,0 @@ -#include -#include -#include -#include -#include -#include - -static gint debug_level = DEBUG_ALWAYS; - -static void -gm_debug_msg_real(FILE *f, struct tm *timet, gchar *line, va_list args) { - fprintf(f, "[%02d:%02d:%02d] # ", timet->tm_hour, timet->tm_min, - timet->tm_sec); - vfprintf(f, line, args); - fprintf(f, "\n"); -} - -void -gm_debug_msg(gint level, gchar *line, ...) { - struct tm *timet; - time_t timer; - va_list args; - - if (debug_level | level == debug_level) { - va_start(args, line); - timer = time(0); - timet = localtime(&timer); - - if (level & DEBUG_ALWAYS) { - gm_debug_msg_real(stdout, timet, line, args); - } - - if (level & DEBUG_ALWAYS != level) { - gm_debug_msg_real(stderr, timet, line, args); - } - - va_end(args); - } -} - -void -debug_set_level(gint level) { - debug_level = level; -} diff --git a/src/debug.h b/src/debug.h deleted file mode 100644 index e75ccce..0000000 --- a/src/debug.h +++ /dev/null @@ -1,13 +0,0 @@ -#ifndef __GM_DEBUG_H__ -#define __GM_DEBUG_H__ 1 - -typedef enum _GmDebugLevel { - DEBUG_ALWAYS = 1 << 1, - DEBUG_DEFAULT = 1 << 2, - DEBUG_MCP = 1 << 3 -} GmDebugLevel; - -void gm_debug_msg(GmDebugLevel level, char *line, ...); -void gm_debug_set_level(GmDebugLevel level); - -#endif /* __GM_DEBUG_H__ */