53 void (*dbgfun)(
char* filename,
int lineno,
HL_Debug lvl,
const char* fmt,...);
55 void (*hdf5fun)(
unsigned n,
const H5E_error_t* rowmsg);
125#define HL_SPEWDEBUG0(msg) \
126hlhdfDbg.dbgfun(__FILE__,__LINE__,HLHDF_SPEWDEBUG,msg)
131#define HL_SPEWDEBUG1(msg,arg1) \
132hlhdfDbg.dbgfun(__FILE__,__LINE__,HLHDF_SPEWDEBUG,msg,arg1)
134#define HL_SPEWDEBUG2(msg,arg1,arg2) \
135hlhdfDbg.dbgfun(__FILE__,__LINE__,HLHDF_SPEWDEBUG,msg,arg1,arg2)
137#define HL_SPEWDEBUG3(msg,arg1,arg2,arg3) \
138hlhdfDbg.dbgfun(__FILE__,__LINE__,HLHDF_SPEWDEBUG,msg,arg1,arg2,arg3)
140#define HL_SPEWDEBUG4(msg,arg1,arg2,arg3,arg4) \
141hlhdfDbg.dbgfun(__FILE__,__LINE__,HLHDF_SPEWDEBUG,msg,arg1,arg2,arg3,arg4)
143#define HL_DEBUG0(msg) \
144hlhdfDbg.dbgfun(__FILE__,__LINE__,HLHDF_DEBUG,msg)
146#define HL_DEBUG1(msg,arg1) \
147hlhdfDbg.dbgfun(__FILE__,__LINE__,HLHDF_DEBUG,msg,arg1)
149#define HL_DEBUG2(msg,arg1,arg2) \
150hlhdfDbg.dbgfun(__FILE__,__LINE__,HLHDF_DEBUG,msg,arg1,arg2)
152#define HL_DEBUG3(msg,arg1,arg2,arg3) \
153hlhdfDbg.dbgfun(__FILE__,__LINE__,HLHDF_DEBUG,msg,arg1,arg2,arg3)
155#define HL_DEBUG4(msg,arg1,arg2,arg3,arg4) \
156hlhdfDbg.dbgfun(__FILE__,__LINE__,HLHDF_DEBUG,msg,arg1,arg2,arg3,arg4)
158#define HL_DEPRECATED0(msg) \
159hlhdfDbg.dbgfun(__FILE__,__LINE__,HLHDF_DEPRECATED,msg)
161#define HL_DEPRECATED1(msg,arg1) \
162hlhdfDbg.dbgfun(__FILE__,__LINE__,HLHDF_DEPRECATED,msg,arg1)
164#define HL_DEPRECATED2(msg,arg1,arg2) \
165hlhdfDbg.dbgfun(__FILE__,__LINE__,HLHDF_DEPRECATED,msg,arg1,arg2)
167#define HL_DEPRECATED3(msg,arg1,arg2,arg3) \
168hlhdfDbg.dbgfun(__FILE__,__LINE__,HLHDF_DEPRECATED,msg,arg1,arg2,arg3)
170#define HL_DEPRECATED4(msg,arg1,arg2,arg3,arg4) \
171hlhdfDbg.dbgfun(__FILE__,__LINE__,HLHDF_DEPRECATED,msg,arg1,arg2,arg3,arg4)
173#define HL_INFO0(msg) \
174hlhdfDbg.dbgfun(__FILE__,__LINE__,HLHDF_INFO,msg)
176#define HL_INFO1(msg,arg1) \
177hlhdfDbg.dbgfun(__FILE__,__LINE__,HLHDF_INFO,msg,arg1)
179#define HL_INFO2(msg,arg1,arg2) \
180hlhdfDbg.dbgfun(__FILE__,__LINE__,HLHDF_INFO,msg,arg1,arg2)
182#define HL_INFO3(msg,arg1,arg2,arg3) \
183hlhdfDbg.dbgfun(__FILE__,__LINE__,HLHDF_INFO,msg,arg1,arg2,arg3)
185#define HL_INFO4(msg,arg1,arg2,arg3,arg4) \
186hlhdfDbg.dbgfun(__FILE__,__LINE__,HLHDF_INFO,msg,arg1,arg2,arg3,arg4)
188#define HL_WARNING0(msg) \
189hlhdfDbg.dbgfun(__FILE__,__LINE__,HLHDF_WARNING,msg)
191#define HL_WARNING1(msg,arg1) \
192hlhdfDbg.dbgfun(__FILE__,__LINE__,HLHDF_WARNING,msg,arg1)
194#define HL_WARNING2(msg,arg1,arg2) \
195hlhdfDbg.dbgfun(__FILE__,__LINE__,HLHDF_WARNING,msg,arg1,arg2)
197#define HL_WARNING3(msg,arg1,arg2,arg3) \
198hlhdfDbg.dbgfun(__FILE__,__LINE__,HLHDF_WARNING,msg,arg1,arg2,arg3)
200#define HL_WARNING4(msg,arg1,arg2,arg3,arg4) \
201hlhdfDbg.dbgfun(__FILE__,__LINE__,HLHDF_WARNING,msg,arg1,arg2,arg3,arg4)
203#define HL_ERROR0(msg) \
204hlhdfDbg.dbgfun(__FILE__,__LINE__,HLHDF_ERROR,msg)
206#define HL_ERROR1(msg,arg1) \
207hlhdfDbg.dbgfun(__FILE__,__LINE__,HLHDF_ERROR,msg,arg1)
209#define HL_ERROR2(msg,arg1,arg2) \
210hlhdfDbg.dbgfun(__FILE__,__LINE__,HLHDF_ERROR,msg,arg1,arg2)
212#define HL_ERROR3(msg,arg1,arg2,arg3) \
213hlhdfDbg.dbgfun(__FILE__,__LINE__,HLHDF_ERROR,msg,arg1,arg2,arg3)
215#define HL_ERROR4(msg,arg1,arg2,arg3,arg4) \
216hlhdfDbg.dbgfun(__FILE__,__LINE__,HLHDF_ERROR,msg,arg1,arg2,arg3,arg4)
218#define HL_CRITICAL0(msg) \
219hlhdfDbg.dbgfun(__FILE__,__LINE__,HLHDF_CRITICAL,msg)
221#define HL_CRITICAL1(msg,arg1) \
222hlhdfDbg.dbgfun(__FILE__,__LINE__,HLHDF_CRITICAL,msg,arg1)
224#define HL_CRITICAL2(msg,arg1,arg2) \
225hlhdfDbg.dbgfun(__FILE__,__LINE__,HLHDF_CRITICAL,msg,arg1,arg2)
227#define HL_CRITICAL3(msg,arg1,arg2,arg3) \
228hlhdfDbg.dbgfun(__FILE__,__LINE__,HLHDF_CRITICAL,msg,arg1,arg2,arg3)
230#define HL_CRITICAL4(msg,arg1,arg2,arg3,arg4) \
231hlhdfDbg.dbgfun(__FILE__,__LINE__,HLHDF_CRITICAL,msg,arg1,arg2,arg3,arg4)
233#define HL_ASSERT(expr, msg) \
235hlhdfDbg.dbgfun(__FILE__, __LINE__, HLHDF_CRITICAL, msg); \
242#define HL_SPEWDEBUG0(msg)
245#define HL_SPEWDEBUG1(msg,arg1)
248#define HL_SPEWDEBUG2(msg,arg1,arg2)
251#define HL_SPEWDEBUG3(msg,arg1,arg2,arg3)
254#define HL_SPEWDEBUG4(msg,arg1,arg2,arg3,arg4)
257#define HL_DEBUG0(msg)
260#define HL_DEBUG1(msg,arg1)
263#define HL_DEBUG2(msg,arg1,arg2)
266#define HL_DEBUG3(msg,arg1,arg2,arg3)
269#define HL_DEBUG4(msg,arg1,arg2,arg3,arg4)
272#define HL_DEPRECATED0(msg)
275#define HL_DEPRECATED1(msg,arg1)
278#define HL_DEPRECATED2(msg,arg1,arg2)
281#define HL_DEPRECATED3(msg,arg1,arg2,arg3)
284#define HL_DEPRECATED4(msg,arg1,arg2,arg3,arg4)
287#define HL_INFO0(msg) \
288hlhdfDbg.dbgfun(__FILE__,__LINE__,HLHDF_INFO,msg)
291#define HL_INFO1(msg,arg1) \
292hlhdfDbg.dbgfun(__FILE__,__LINE__,HLHDF_INFO,msg,arg1)
295#define HL_INFO2(msg,arg1,arg2) \
296hlhdfDbg.dbgfun(__FILE__,__LINE__,HLHDF_INFO,msg,arg1,arg2)
299#define HL_INFO3(msg,arg1,arg2,arg3) \
300hlhdfDbg.dbgfun(__FILE__,__LINE__,HLHDF_INFO,msg,arg1,arg2,arg3)
303#define HL_INFO4(msg,arg1,arg2,arg3,arg4) \
304hlhdfDbg.dbgfun(__FILE__,__LINE__,HLHDF_INFO,msg,arg1,arg2,arg3,arg4)
307#define HL_WARNING0(msg) \
308hlhdfDbg.dbgfun(__FILE__,__LINE__,HLHDF_WARNING,msg)
311#define HL_WARNING1(msg,arg1) \
312hlhdfDbg.dbgfun(__FILE__,__LINE__,HLHDF_WARNING,msg,arg1)
315#define HL_WARNING2(msg,arg1,arg2) \
316hlhdfDbg.dbgfun(__FILE__,__LINE__,HLHDF_WARNING,msg,arg1,arg2)
319#define HL_WARNING3(msg,arg1,arg2,arg3) \
320hlhdfDbg.dbgfun(__FILE__,__LINE__,HLHDF_WARNING,msg,arg1,arg2,arg3)
323#define HL_WARNING4(msg,arg1,arg2,arg3,arg4) \
324hlhdfDbg.dbgfun(__FILE__,__LINE__,HLHDF_WARNING,msg,arg1,arg2,arg3,arg4)
327#define HL_ERROR0(msg) \
328hlhdfDbg.dbgfun(__FILE__,__LINE__,HLHDF_ERROR,msg)
331#define HL_ERROR1(msg,arg1) \
332hlhdfDbg.dbgfun(__FILE__,__LINE__,HLHDF_ERROR,msg,arg1)
335#define HL_ERROR2(msg,arg1,arg2) \
336hlhdfDbg.dbgfun(__FILE__,__LINE__,HLHDF_ERROR,msg,arg1,arg2)
339#define HL_ERROR3(msg,arg1,arg2,arg3) \
340hlhdfDbg.dbgfun(__FILE__,__LINE__,HLHDF_ERROR,msg,arg1,arg2,arg3)
343#define HL_ERROR4(msg,arg1,arg2,arg3,arg4) \
344hlhdfDbg.dbgfun(__FILE__,__LINE__,HLHDF_ERROR,msg,arg1,arg2,arg3,arg4)
347#define HL_CRITICAL0(msg) \
348hlhdfDbg.dbgfun(__FILE__,__LINE__,HLHDF_CRITICAL,msg)
351#define HL_CRITICAL1(msg,arg1) \
352hlhdfDbg.dbgfun(__FILE__,__LINE__,HLHDF_CRITICAL,msg,arg1)
355#define HL_CRITICAL2(msg,arg1,arg2) \
356hlhdfDbg.dbgfun(__FILE__,__LINE__,HLHDF_CRITICAL,msg,arg1,arg2)
359#define HL_CRITICAL3(msg,arg1,arg2,arg3) \
360hlhdfDbg.dbgfun(__FILE__,__LINE__,HLHDF_CRITICAL,msg,arg1,arg2,arg3)
363#define HL_CRITICAL4(msg,arg1,arg2,arg3,arg4) \
364hlhdfDbg.dbgfun(__FILE__,__LINE__,HLHDF_CRITICAL,msg,arg1,arg2,arg3,arg4)
368#define HL_ASSERT(expr, msg)
376#define HL_ASSERT(expr, msg) \
378hlhdfDbg.dbgfun(__FILE__, __LINE__, HLHDF_CRITICAL, msg); \
382#define HL_ABORT() abort()
void HL_setHdf5ErrorFunction(void(*hdf5fun)(unsigned n, const H5E_error_t *val))
Sets the HDF5 error reporting function.
Definition hlhdf_debug.c:164
void HL_InitializeDebugger(void)
Initializes the debugger structure, must have been called before executing the code.
Definition hlhdf_debug.c:132
void HL_enableHdf5ErrorReporting(void)
Enables the HDF5 error reporting.
Definition hlhdf_debug.c:159
void HL_disableHdf5ErrorReporting(void)
Disables the HDF5 error reporting.
Definition hlhdf_debug.c:154
void HL_setDebugFunction(void(*dbgfun)(char *filename, int lineno, HL_Debug lvl, const char *fmt,...))
Sets the debug function where the debug printouts should be routed.
Definition hlhdf_debug.c:148
HL_Debug
Debug levels.
Definition hlhdf_debug.h:37
void HL_setDebugLevel(HL_Debug lvl)
Sets the debug level.
Definition hlhdf_debug.c:143
@ HLHDF_SILENT
Turns of debugging.
Definition hlhdf_debug.h:45
@ HLHDF_ERROR
Errors can be when memory not could be allocated or a file not could be created.
Definition hlhdf_debug.h:43
@ HLHDF_SPEWDEBUG
The most verbose printouts is turned on here.
Definition hlhdf_debug.h:38
@ HLHDF_DEBUG
Basic debug functions.
Definition hlhdf_debug.h:39
@ HLHDF_WARNING
Warnings.
Definition hlhdf_debug.h:42
@ HLHDF_DEPRECATED
Print outs deprecated warnings.
Definition hlhdf_debug.h:40
@ HLHDF_INFO
Informational messages.
Definition hlhdf_debug.h:41
@ HLHDF_CRITICAL
If this occurs, then something has gone very wrong or the code contains a bug, please report it to th...
Definition hlhdf_debug.h:44
void HL_printf(const char *fmt,...)
The printer function.
Definition hlhdf_debug.c:117
herr_t HL_hdf5_debug_function(hid_t estack, void *inv)
This is the debug function that is used to forward messages to the appropriate debugger function.
Definition hlhdf_debug.c:176
hlhdf_debug_struct hlhdfDbg
The main structure used for routing errors and debug printouts.
Definition hlhdf_debug.c:28
Debug structure.
Definition hlhdf_debug.h:51
int hdf5showerror
If hdf5 errors should be printed or not.
Definition hlhdf_debug.h:54
HL_Debug dbgLevel
Debug level.
Definition hlhdf_debug.h:52