summaryrefslogtreecommitdiffstats
path: root/src/debug.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/debug.h')
-rw-r--r--src/debug.h20
1 files changed, 16 insertions, 4 deletions
diff --git a/src/debug.h b/src/debug.h
index 398508e..f99089d 100644
--- a/src/debug.h
+++ b/src/debug.h
@@ -1,6 +1,6 @@
1/* 1/*
2 * debug.h 2 * debug.h
3 * contains utilitary methos for logging and debugging 3 * contains utilitary functions for debugging
4 * 4 *
5 * Copyright (c) 2008 Jonathan Beck All Rights Reserved. 5 * Copyright (c) 2008 Jonathan Beck All Rights Reserved.
6 * 6 *
@@ -24,8 +24,20 @@
24 24
25#include <glib.h> 25#include <glib.h>
26 26
27G_GNUC_INTERNAL inline void log_debug_msg(const char *format, ...); 27#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L && !defined(STRIP_DEBUG_CODE)
28G_GNUC_INTERNAL inline void log_debug_buffer(const char *data, const int length); 28#define debug_info(...) debug_info_real (__func__, __FILE__, __LINE__, __VA_ARGS__)
29G_GNUC_INTERNAL inline void dump_debug_buffer(const char *file, const char *data, const int length); 29#elif defined(__GNUC__) && __GNUC__ >= 3 && !defined(STRIP_DEBUG_CODE)
30#define debug_info(...) debug_info_real (__FUNCTION__, __FILE__, __LINE__, __VA_ARGS__)
31#else
32#define debug_info(...)
33#endif
34
35G_GNUC_INTERNAL inline void debug_info_real(const char *func,
36 const char *file,
37 int line,
38 const char *format, ...);
39
40G_GNUC_INTERNAL inline void debug_buffer(const char *data, const int length);
41G_GNUC_INTERNAL inline void debug_buffer_to_file(const char *file, const char *data, const int length);
30 42
31#endif 43#endif