MCPcopy Create free account
hub / github.com/Kitware/CMake / getDebugLevel

Function getDebugLevel

Utilities/cmexpat/lib/xmlparse.c:9199–9216  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9197#endif /* XML_GE == 1 */
9198
9199static unsigned long
9200getDebugLevel(const char *variableName, unsigned long defaultDebugLevel) {
9201 const char *const valueOrNull = getenv(variableName);
9202 if (valueOrNull == NULL) {
9203 return defaultDebugLevel;
9204 }
9205 const char *const value = valueOrNull;
9206
9207 errno = 0;
9208 char *afterValue = NULL;
9209 unsigned long debugLevel = strtoul(value, &afterValue, 10);
9210 if ((errno != 0) || (afterValue == value) || (afterValue[0] != '\0')) {
9211 errno = 0;
9212 return defaultDebugLevel;
9213 }
9214
9215 return debugLevel;
9216}

Callers 3

ENTROPY_DEBUGFunction · 0.85
xmlparse.cFile · 0.85
parserInitFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…