45#define ERROR(retval, exitval, s,...) { myError(__FILE__, __LINE__, __func__, s, ##__VA_ARGS__); exit (exitval); }
63#define WARNING(...) warning(__FILE__, __LINE__, __func__, __VA_ARGS__)
67#define XMALLOC(n) xmalloc(__FILE__, __LINE__, __func__, (n))
71#define XCALLOC(n,s) xcalloc(__FILE__, __LINE__, __func__, (n), (s))
75#define XREALLOC(p,s) xrealloc(__FILE__, __LINE__, __func__, (p), (s))
79#define XFOPEN(f,m) xfopen(__FILE__, __LINE__, __func__, (f), (m))
void * xcalloc(const char *file, const int line, const char *fnct, const size_t nmemb, const size_t size)
Wrapper around the regular calloc memory allocator.
void warning(const char *file, const int line, const char *fnct, const char *frm,...)
Prints a warning message.
void * xrealloc(const char *file, const int line, const char *fnct, void *ptr, const size_t size)
Wrapper around the regular realloc memory allocator.
FILE * xfopen(const char *file, const int line, const char *fnct, const char *name, const char *mode)
Wrapper around the regular fopen.
void * xmalloc(const char *file, const int line, const char *fnct, const size_t size)
Wrapper around the regular malloc memory allocator.
void myError(const char *file, const int line, const char *fnct, const char *frm,...)
Prints an error message and exit with -1 status.