* GSWeb.framework/GSWUtils.m (boolValueFor,boolValueWithDefaultFor): Rely

on [NSString-boolValue] as it handle NO and digits more correctly.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gsweb/trunk@26057 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
David Ayers 2008-02-13 00:50:10 +00:00
parent f53759946a
commit 157908c52c
2 changed files with 7 additions and 4 deletions

View file

@ -1,4 +1,10 @@
2008-02-13 David Ayers <ayers@fsfe.org>
* GSWeb.framework/GSWUtils.m (boolValueFor,boolValueWithDefaultFor): Rely
on [NSString-boolValue] as it handle NO and digits more correctly.
2007-11-30 David Wetzel <dave@turbocat.de>
GSWeb.framework:
* GSWBindingNameAssociation.m
* GSWAssociation.m
@ -10,6 +16,7 @@
use private _setValueNoValidation: inComponent: to speed things up
2007-11-25 David Wetzel <dave@turbocat.de>
* GSWAdaptors/Apache2/mod_gsw.c
Works also if a header or empty line at the end of the headers has a \r\n ending.
GSWeb.framework:

View file

@ -336,8 +336,6 @@ BOOL boolValueFor(id anObject)
return YES;
else if (/*anObject==BNNO ||*/ anObject==NSTNO || anObject==GSWNumberNo)
return NO;
else if (/*[anObject conformsTo:@protocol(NSString)]*/ [anObject isKindOfClass:nsStringClass] && [anObject length]>0)
return ([anObject caseInsensitiveCompare: @"NO"]!=NSOrderedSame);
else if ([anObject respondsToSelector:@selector(boolValue)] && [anObject boolValue])
return YES;
else if ([anObject respondsToSelector:@selector(intValue)] && [anObject intValue])
@ -361,8 +359,6 @@ BOOL boolValueWithDefaultFor(id anObject,BOOL defaultValue)
return YES;
else if (/*anObject==BNNO ||*/ anObject==NSTNO)
return NO;
else if ([anObject isKindOfClass:nsStringClass] && [anObject length]>0)
return ([anObject caseInsensitiveCompare: @"NO"]!=NSOrderedSame);
else if ([anObject respondsToSelector:@selector(boolValue)])
return ([anObject boolValue]!=NO);
else if ([anObject respondsToSelector:@selector(intValue)])