33#include <lal/LALString.h>
34#include <lal/LALDebugLevel.h>
35#include <lal/LALError.h>
38#ifdef LAL_PTHREAD_LOCK
40static pthread_once_t
lalOnce = PTHREAD_ONCE_INIT;
41#define LAL_ONCE(init) pthread_once(&lalOnce, (init))
44#define LAL_ONCE(init) (lalOnce ? (init)(), lalOnce = 0 : 0)
63 const char *env = getenv(
"LAL_DEBUG_LEVEL");
64 if (env == NULL || *env ==
'\0')
70 level = (int) strtol(env, &
end, 0);
77 const char *
const seps =
",";
78 const char *token = env;
80 size_t toklen = strcspn(token, seps);
106 lalAbortHook(
"%s: could not parse LAL_DEBUG_LEVEL='%s'. For help try 'man LAL_DEBUG_LEVEL'.\n", __func__, env);
111 }
while (*(token++) !=
'\0');
static void XLALSetDebugLevel(void)
void(* lalAbortHook)(const char *,...)
void XLALClobberDebugLevel(int level)
int XLALGetDebugLevel(void)
@ LALTRACE
enable tracing messages
@ LALINFO
enable info messages
@ LALMEMTRACE
enable memory tracing tools
@ LALERROR
enable error messages
@ LALWARNING
enable warning messages
@ LALMEMDBG
enable memory debugging tools
@ LALMSGLVL2
enable error and warning messages
@ LALMSGLVL1
enable error messages
@ LALMSGLVL3
enable error, warning, and info messages
@ LALALLDBG
enable all debugging
int XLALStringNCaseCompare(const char *s1, const char *s2, size_t n)
Compare the first N characters of two strings, ignoring case and without using locale-dependent funct...