c_macro.h File Reference


Detailed Description

cynapses libc macro definitions

Definition in file c_macro.h.

#include <stdlib.h>
#include <string.h>

Include dependency graph for c_macro.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define ARRAY_SIZE(a)   (sizeof(a)/sizeof(a[0]))
#define basename(x)   DO_NOT_CALL_MALLOC__USE_C_BASENAME_INSTEAD
#define calloc(x, y)   DO_NOT_CALL_CALLOC__USE_C_CALLOC_INSTEAD
#define dirname(x)   DO_NOT_CALL_MALLOC__USE_C_DIRNAME_INSTEAD
#define INT_TO_POINTER(i)   (void *) i
#define malloc(x)   DO_NOT_CALL_MALLOC__USE_C_MALLOC_INSTEAD
#define MAX(a, b)   ((a) < (b) ? (b) : (a))
#define MIN(a, b)   ((a) < (b) ? (a) : (b))
#define POINTER_TO_INT(p)   *((int *) (p))
#define realloc(x, y)   DO_NOT_CALL_REALLOC__USE_C_REALLOC_INSTEAD
#define SAFE_FREE(x)   do { if ((x) != NULL) {free(x); x=NULL;} } while(0)
#define strdup(x)   DO_NOT_CALL_STRDUP__USE_C_STRDUP_INSTEAD
#define ZERO_STRUCT(x)   memset((char *)&(x), 0, sizeof(x))
#define ZERO_STRUCTP(x)   do { if ((x) != NULL) memset((char *)(x), 0, sizeof(*(x))); } while(0)


Generated on Mon May 4 17:43:38 2009 for doc by  doxygen 1.5.6