2 * collectd - src/utils_debug.h
3 * Copyright (C) 2005 Niki W. Waibel
5 * This program is free software; you can redistribute it and/
6 * or modify it under the terms of the GNU General Public Li-
7 * cence as published by the Free Software Foundation; either
8 * version 2 of the Licence, or any later version.
10 * This program is distributed in the hope that it will be use-
11 * ful, but WITHOUT ANY WARRANTY; without even the implied war-
12 * ranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13 * See the GNU General Public Licence for more details.
15 * You should have received a copy of the GNU General Public
16 * Licence along with this program; if not, write to the Free
17 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139,
21 * Niki W. Waibel <niki.waibel@gmx.net>
24 #if !COLLECTD_UTILS_DEBUG_H
25 #define COLLECTD_UTILS_DEBUG_H 1
27 #define DBG(...) cu_debug(__FILE__, __LINE__, __func__, \
30 #define DBG_STARTFILE(...) cu_debug_startfile(__FILE__, __LINE__, \
31 __func__, __VA_ARGS__)
32 #define DBG_STOPFILE(...) cu_debug_stopfile(__FILE__, __LINE__, \
33 __func__, __VA_ARGS__)
35 #define DBG_RESETFILE(file) cu_debug_resetfile(__FILE__, __LINE__, __func__, \
38 void cu_debug(const char *file, int line, const char *func,
39 const char *format, ...);
41 int cu_debug_startfile(const char *file, int line, const char *func,
42 const char *format, ...);
43 int cu_debug_stopfile(const char *file, int line, const char *func,
44 const char *format, ...);
46 int cu_debug_resetfile(const char *file, int line, const char *func,
47 const char *filename);
49 #endif /* !COLLECTD_UTILS_DEBUG_H */