16 #define CRINIT_PARAM_UNUSED(par) \
33 #define crinitParamCheck(inputParam, cmpShort, cmpLong) \
34 ((strncmp(inputParam, cmpShort, sizeof(cmpShort)) == 0) || (strncmp(inputParam, cmpLong, sizeof(cmpLong)) == 0))
43 #define crinitIsAbsPath(path) (((path) != NULL) && ((path)[0] == '/'))
48 #define crinitNumElements(p) (sizeof(p) / sizeof(*(p)))
63 #define crinitNullCheck(errcode, ...) \
65 _Pragma("GCC diagnostic push"); \
66 _Pragma("GCC diagnostic error \"-Wshadow\""); \
67 const void *_macroPtrsToCheck[] = {__VA_ARGS__}; \
68 for (size_t _macroI = 0; _macroI < crinitNumElements(_macroPtrsToCheck); _macroI++) { \
69 if (_macroPtrsToCheck[_macroI] == NULL) { \
70 crinitErrPrint("Input parameters must not be NULL."); \
74 _Pragma("GCC diagnostic pop"); \
87 #define crinitStrtoGenericInteger(resType, str, endptr, base) \
91 long long : strtoll, \
92 unsigned int : strtoul, \
93 unsigned long : strtoul, \
94 unsigned long long : strtoull) \
95 ((str), (endptr), (base))
103 #define crinitNullify(ptr) \