50typedef long (*
COMPFN)(
void *,
void *);
73#define CODA_ASSERT(cond) \
77 fprintf(stderr, "Assert (%s) in %s:%d\n", #cond, __FILE__, \
86#define CODA_ASSERT(cond) \
90 fprintf(stderr, "Assert failed in %s:%d\n", __FILE__, __LINE__); \
102 if (((X) = (T *)malloc(sizeof(T))) == NULL) \
106#define NALLOC(X, T, S) \
108 if (((X) = (T *)malloc(sizeof(T) * (S))) == NULL) { \
124#define TIME(tv) (gettimeofday(&(tv), NULL))
128#define TIMEDIFF(tvb, tve, tvr) \
130 CODA_ASSERT(((tve).sec > (tvb).sec) || \
131 (((tve).sec == (tvb).sec) && ((tve).usec > (tvb).usec))); \
132 if ((tve).usec < (tvb).usec) { \
133 (tvr).usec = 1000000 + (tve).usec - (tvb).usec; \
134 (tvr).sec = (tve).sec - (tvb).sec - 1; \
136 (tvr).usec = (tve).usec - (tvb).usec; \
137 (tvr).sec = (tve).sec - (tvb).sec; \
struct timeval TIMEVAL
Definition: odytypes.h:60
unsigned long magic_t
Definition: odytypes.h:44
typdef int(* COMPFN)()
Definition: odytypes.h:54
bool
Definition: odytypes.h:38
@ FALSE
Definition: odytypes.h:40
@ TRUE
Definition: odytypes.h:39