summaryrefslogtreecommitdiffstats
path: root/src/debug.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/debug.c')
-rw-r--r--src/debug.c27
1 files changed, 0 insertions, 27 deletions
diff --git a/src/debug.c b/src/debug.c
index b5f74ad..78f3a17 100644
--- a/src/debug.c
+++ b/src/debug.c
@@ -26,7 +26,6 @@
26#include "libiphone/libiphone.h" 26#include "libiphone/libiphone.h"
27 27
28int toto_debug = 0; 28int toto_debug = 0;
29uint16_t dbg_mask = 0;
30 29
31/** 30/**
32 * Sets the level of debugging. Currently the only acceptable values are 0 and 31 * Sets the level of debugging. Currently the only acceptable values are 0 and
@@ -39,17 +38,6 @@ void iphone_set_debug_level(int level)
39 toto_debug = level; 38 toto_debug = level;
40} 39}
41 40
42
43/**
44 * Set debug ids to display. Values can be OR-ed
45 *
46 * @param level Set to 0 for no debugging or 1 for debugging.
47 */
48void iphone_set_debug_mask(uint16_t mask)
49{
50 dbg_mask = mask;
51}
52
53void log_debug_msg(const char *format, ...) 41void log_debug_msg(const char *format, ...)
54{ 42{
55#ifndef STRIP_DEBUG_CODE 43#ifndef STRIP_DEBUG_CODE
@@ -66,21 +54,6 @@ void log_debug_msg(const char *format, ...)
66#endif 54#endif
67} 55}
68 56
69void log_dbg_msg(uint16_t id, const char *format, ...)
70{
71#ifndef STRIP_DEBUG_CODE
72 if (id & dbg_mask) {
73 va_list args;
74 /* run the real fprintf */
75 va_start(args, format);
76
77 vfprintf(stderr, format, args);
78
79 va_end(args);
80 }
81#endif
82}
83
84inline void log_debug_buffer(const char *data, const int length) 57inline void log_debug_buffer(const char *data, const int length)
85{ 58{
86#ifndef STRIP_DEBUG_CODE 59#ifndef STRIP_DEBUG_CODE