fixup location of compatibility method

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@28559 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2009-08-27 17:32:15 +00:00
parent 4effabf601
commit 8b6eceecb0
3 changed files with 29 additions and 23 deletions

View file

@ -1,3 +1,9 @@
2009-08-27 Richard Frith-Macdonald <rfm@gnu.org>
* Source/Additions/GSCategories.m:
* Source/Additions/GSCompatibility.m:
Move -fullPath to correct place to build on OSX
2009-08-27 Richard Frith-Macdonald <rfm@gnu.org> 2009-08-27 Richard Frith-Macdonald <rfm@gnu.org>
* Source/NSAttributedString.m: ([-string]) was returning proxy to * Source/NSAttributedString.m: ([-string]) was returning proxy to

View file

@ -1605,26 +1605,3 @@ executablePath(NSFileManager *mgr, NSString *path)
return nil; return nil;
} }
@end @end
@implementation NSURL (GSCategories)
- (NSString*) fullPath
{
NSRange r;
NSString *s;
s = [self absoluteString];
if ((r = [s rangeOfString: @";"]).length > 0)
{
s = [s substringFromIndex: r.location];
}
else if ((r = [s rangeOfString: @"?"]).length > 0)
{
s = [s substringFromIndex: r.location];
}
r = [s rangeOfString: @"//"];
s = [s substringFromIndex: NSMaxRange(r)];
r = [s rangeOfString: @"/"];
s = [s substringFromIndex: r.location];
return s;
}
@end

View file

@ -491,3 +491,26 @@ BOOL GSDebugSet(NSString *level)
@end @end
@implementation NSURL (GSCompatibility)
- (NSString*) fullPath
{
NSRange r;
NSString *s;
s = [self absoluteString];
if ((r = [s rangeOfString: @";"]).length > 0)
{
s = [s substringToIndex: r.location];
}
else if ((r = [s rangeOfString: @"?"]).length > 0)
{
s = [s substringToIndex: r.location];
}
r = [s rangeOfString: @"//"];
s = [s substringFromIndex: NSMaxRange(r)];
r = [s rangeOfString: @"/"];
s = [s substringFromIndex: r.location];
return s;
}
@end