Go to the documentation of this file.
25 #ifndef CLUSTALO_UTIL_H
26 #define CLUSTALO_UTIL_H
29 #define CKMALLOC(b) CkMalloc((b), __FUNCTION__, __LINE__)
30 #define CKCALLOC(c, s) CkCalloc((c), (s), __FUNCTION__, __LINE__)
31 #define CKREALLOC(p, b) CkRealloc((p), (b), __FUNCTION__, __LINE__)
32 #define CKFREE(b) ((b)=CkFree((b), __FUNCTION__, __LINE__))
35 #define MAX(a,b) ((a)>(b)?(a):(b))
38 #define MIN(a,b) ((a)<(b)?(a):(b))
42 #define STR_EQ(a,b) (strcmp((a),(b)) == 0)
44 #define STR_NC_EQ(a,b) (strcasecmp((a),(b)) == 0)
64 void *
CkMalloc(
size_t size,
const char *
function,
const int line);
65 void *
CkCalloc(
size_t count,
size_t size,
const char *
function,
const int line);
66 void *
CkRealloc(
void *ptr,
size_t bytes,
const char *
function,
const int line);
67 void *
CkFree(
void *ptr,
const char *
function,
const int line);
71 int IntCmp(
const void *a,
const void *b);
74 const int uArrayLen,
const char cOrder,
const bool bOverwriteArrayToSort);