diff options
Diffstat (limited to 'src/debug.h')
-rw-r--r-- | src/debug.h | 52 |
1 files changed, 0 insertions, 52 deletions
diff --git a/src/debug.h b/src/debug.h deleted file mode 100644 index 2fd0960..0000000 --- a/src/debug.h +++ /dev/null | |||
@@ -1,52 +0,0 @@ | |||
1 | /* | ||
2 | * debug.h | ||
3 | * contains utilitary functions for debugging | ||
4 | * | ||
5 | * Copyright (c) 2008 Jonathan Beck All Rights Reserved. | ||
6 | * Copyright (c) 2010 Martin S. All Rights Reserved. | ||
7 | * | ||
8 | * This library is free software; you can redistribute it and/or | ||
9 | * modify it under the terms of the GNU Lesser General Public | ||
10 | * License as published by the Free Software Foundation; either | ||
11 | * version 2.1 of the License, or (at your option) any later version. | ||
12 | * | ||
13 | * This library is distributed in the hope that it will be useful, | ||
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
16 | * Lesser General Public License for more details. | ||
17 | * | ||
18 | * You should have received a copy of the GNU Lesser General Public | ||
19 | * License along with this library; if not, write to the Free Software | ||
20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||
21 | */ | ||
22 | |||
23 | #ifndef DEBUG_H | ||
24 | #define DEBUG_H | ||
25 | |||
26 | #include <plist/plist.h> | ||
27 | #include <glib.h> | ||
28 | |||
29 | #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L && !defined(STRIP_DEBUG_CODE) | ||
30 | #define debug_info(...) debug_info_real (__func__, __FILE__, __LINE__, __VA_ARGS__) | ||
31 | #define debug_plist(a) debug_plist_real (__func__, __FILE__, __LINE__, a) | ||
32 | #elif defined(__GNUC__) && __GNUC__ >= 3 && !defined(STRIP_DEBUG_CODE) | ||
33 | #define debug_info(...) debug_info_real (__FUNCTION__, __FILE__, __LINE__, __VA_ARGS__) | ||
34 | #define debug_plist(a) debug_plist_real (__FUNCTION__, __FILE__, __LINE__, a) | ||
35 | #else | ||
36 | #define debug_info(...) | ||
37 | #define debug_plist(a) | ||
38 | #endif | ||
39 | |||
40 | G_GNUC_INTERNAL inline void debug_info_real(const char *func, | ||
41 | const char *file, | ||
42 | int line, | ||
43 | const char *format, ...); | ||
44 | |||
45 | G_GNUC_INTERNAL inline void debug_buffer(const char *data, const int length); | ||
46 | G_GNUC_INTERNAL inline void debug_buffer_to_file(const char *file, const char *data, const int length); | ||
47 | G_GNUC_INTERNAL inline void debug_plist_real(const char *func, | ||
48 | const char *file, | ||
49 | int line, | ||
50 | plist_t plist); | ||
51 | |||
52 | #endif | ||