mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 08:21:25 +00:00
Try reversion again.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@22017 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
d3dbf0c0b1
commit
15de84b232
7 changed files with 153 additions and 165 deletions
|
@ -1178,6 +1178,34 @@ BOOL GSDebugSet(NSString *level)
|
|||
}
|
||||
|
||||
|
||||
BOOL
|
||||
GSEnvironmentFlag(const char *name, BOOL def)
|
||||
{
|
||||
const char *c = getenv(name);
|
||||
BOOL a = def;
|
||||
|
||||
if (c != 0)
|
||||
{
|
||||
a = NO;
|
||||
if ((c[0] == 'y' || c[0] == 'Y') && (c[1] == 'e' || c[1] == 'E')
|
||||
&& (c[2] == 's' || c[2] == 'S') && c[3] == 0)
|
||||
{
|
||||
a = YES;
|
||||
}
|
||||
else if ((c[0] == 't' || c[0] == 'T') && (c[1] == 'r' || c[1] == 'R')
|
||||
&& (c[2] == 'u' || c[2] == 'U') && (c[3] == 'e' || c[3] == 'E')
|
||||
&& c[4] == 0)
|
||||
{
|
||||
a = YES;
|
||||
}
|
||||
else if (isdigit(c[0]) && c[0] != '0')
|
||||
{
|
||||
a = YES;
|
||||
}
|
||||
}
|
||||
return a;
|
||||
}
|
||||
|
||||
/**
|
||||
* Used by NSException uncaught exception handler - must not call any
|
||||
* methods/functions which might cause a recursive exception.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue