mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 08:41:03 +00:00
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:
parent
4effabf601
commit
8b6eceecb0
3 changed files with 29 additions and 23 deletions
|
@ -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
|
||||||
|
|
|
@ -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
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue