Go to the documentation of this file.
42 #define malloc(x) DO_NOT_CALL_MALLOC__USE_C_MALLOC_INSTEAD
47 #define calloc(x,y) DO_NOT_CALL_CALLOC__USE_C_CALLOC_INSTEAD
52 #define realloc(x,y) DO_NOT_CALL_REALLOC__USE_C_REALLOC_INSTEAD
57 #define dirname(x) DO_NOT_CALL_MALLOC__USE_C_DIRNAME_INSTEAD
62 #define basename(x) DO_NOT_CALL_MALLOC__USE_C_BASENAME_INSTEAD
67 #define strdup(x) DO_NOT_CALL_STRDUP__USE_C_STRDUP_INSTEAD
69 #define INT_TO_POINTER(i) (void *) i
70 #define POINTER_TO_INT(p) *((int *) (p))
73 #define ZERO_STRUCT(x) memset((char *)&(x), 0, sizeof(x))
76 #define ZERO_STRUCTP(x) do { if ((x) != NULL) memset((char *)(x), 0, sizeof(*(x))); } while(0)
79 #define SAFE_FREE(x) do { if ((x) != NULL) {free(x); x=NULL;} } while(0)
82 #define MIN(a,b) ((a) < (b) ? (a) : (b))
85 #define MAX(a,b) ((a) < (b) ? (b) : (a))
88 #define ARRAY_SIZE(a) (sizeof(a)/sizeof(a[0]))