|
|
@ -20,6 +20,7 @@ |
|
|
|
#define ICP20110203_XMEM_H |
|
|
|
|
|
|
|
#include <stdlib.h> |
|
|
|
#include <stdarg.h> |
|
|
|
|
|
|
|
#ifdef __cpluscplus |
|
|
|
extern "C" { |
|
|
@ -39,10 +40,18 @@ do_realloc(void *, size_t, const char *, unsigned int); |
|
|
|
char * |
|
|
|
do_strdup(const char *, const char *, unsigned int); |
|
|
|
|
|
|
|
#define xmalloc(s) do_malloc(s, __FILE__, __LINE__) |
|
|
|
#define xcalloc(n,s) do_calloc(n, s, __FILE__, __LINE__) |
|
|
|
#define xrealloc(p,s) do_realloc(p, s, __FILE__, __LINE__) |
|
|
|
#define xstrdup(s) do_strdup(s, __FILE__, __LINE__) |
|
|
|
int |
|
|
|
do_asprintf(char **, const char *, const char *, unsigned int, ...); |
|
|
|
|
|
|
|
int |
|
|
|
do_vasprintf(char **, const char *, const char *, unsigned int, va_list); |
|
|
|
|
|
|
|
#define xmalloc(s) do_malloc(s, __FILE__, __LINE__) |
|
|
|
#define xcalloc(n,s) do_calloc(n, s, __FILE__, __LINE__) |
|
|
|
#define xrealloc(p,s) do_realloc(p, s, __FILE__, __LINE__) |
|
|
|
#define xstrdup(s) do_strdup(s, __FILE__, __LINE__) |
|
|
|
#define xasprintf(s,f,...) do_asprintf(s, f, __FILE__, __LINE__, __VA_ARGS__) |
|
|
|
#define xvasprintf(s,f,v) do_vasprintf(s, f, __FILE__, __LINE__, v) |
|
|
|
|
|
|
|
#ifdef __cplusplus |
|
|
|
} |
|
|
|