18 const char *Value = getenv(Name);
22 if (!strcmp(Value,
"0"))
24 else if (!strcmp(Value,
"1"))
27 std::cerr << std::endl
28 <<
"ERROR: Invalid value for " << Name <<
" environment variable"
33 unsigned long getEnvUInt(
const char *Name,
unsigned Default)
35 const char *StrValue = getenv(Name);
40 unsigned long Value = strtoul(StrValue, &End, 10);
41 if (strlen(End) || !strlen(StrValue) || Value == 0)
43 std::cerr << std::endl
44 <<
"ERROR: Invalid value for " << Name <<
" environment variable"
unsigned long getEnvUInt(const char *Name, unsigned Default)
Returns the integer value for the environment variable Name, or Default if it is not set...
bool checkEnv(const char *Name, bool Default)
Returns true if the environment variable Name is set to 1, false for 0, or Default if it is not set...