MCPcopy Create free account
hub / github.com/WinMerge/winmerge / getDebugLevel

Function getDebugLevel

Externals/poco/XML/src/xmlparse.cpp:9215–9232  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9213#endif /* XML_GE == 1 */
9214
9215static unsigned long
9216getDebugLevel(const char *variableName, unsigned long defaultDebugLevel) {
9217 const char *const valueOrNull = getenv(variableName);
9218 if (valueOrNull == NULL) {
9219 return defaultDebugLevel;
9220 }
9221 const char *const value = valueOrNull;
9222
9223 errno = 0;
9224 char *afterValue = NULL;
9225 unsigned long debugLevel = strtoul(value, &afterValue, 10);
9226 if ((errno != 0) || (afterValue == value) || (afterValue[0] != '\0')) {
9227 errno = 0;
9228 return defaultDebugLevel;
9229 }
9230
9231 return debugLevel;
9232}

Callers 3

ENTROPY_DEBUGFunction · 0.85
xmlparse.cppFile · 0.85
parserInitFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected