mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 00:11:26 +00:00
Updates to reduce global namespace pollution. Plenty more remaining.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@23795 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
9d71af9cbf
commit
eae859d1c7
85 changed files with 1090 additions and 1277 deletions
|
@ -50,7 +50,7 @@
|
|||
#include "Foundation/NSPathUtilities.h"
|
||||
#include "Foundation/NSData.h"
|
||||
#include "Foundation/NSValue.h"
|
||||
#include "GNUstepBase/GSFunctions.h"
|
||||
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
@ -226,7 +226,7 @@ static NSString *ExecutablePath()
|
|||
#ifdef PROCFS_EXE_LINK
|
||||
executablePath = [[NSFileManager defaultManager]
|
||||
pathContentOfSymbolicLinkAtPath:
|
||||
[NSString stringWithCString: PROCFS_EXE_LINK]];
|
||||
[NSString stringWithUTF8String: PROCFS_EXE_LINK]];
|
||||
|
||||
/*
|
||||
On some systems, the link is of the form "[device]:inode", which
|
||||
|
@ -377,11 +377,29 @@ _bundle_name_first_match(NSString* directory, NSString* name)
|
|||
static inline NSString *
|
||||
_find_framework(NSString *name)
|
||||
{
|
||||
NSArray *paths;
|
||||
NSArray *paths;
|
||||
NSFileManager *file_mgr = [NSFileManager defaultManager];
|
||||
NSString *file_name;
|
||||
NSString *file_path;
|
||||
NSString *path;
|
||||
NSEnumerator *enumerator;
|
||||
|
||||
NSCParameterAssert(name != nil);
|
||||
|
||||
paths = NSSearchPathForDirectoriesInDomains(GSFrameworksDirectory,
|
||||
NSAllDomainsMask,YES);
|
||||
return GSFindNamedFile(paths, name, @"framework");
|
||||
|
||||
enumerator = [paths objectEnumerator];
|
||||
while ((path = [enumerator nextObject]))
|
||||
{
|
||||
file_path = [path stringByAppendingPathComponent: file_name];
|
||||
|
||||
if ([file_mgr fileExistsAtPath: file_path] == YES)
|
||||
{
|
||||
return file_path; // Found it!
|
||||
}
|
||||
}
|
||||
return nil;
|
||||
}
|
||||
|
||||
@interface NSBundle (Private)
|
||||
|
@ -464,8 +482,9 @@ _find_framework(NSString *name)
|
|||
&& !strncmp ("NSFramework_", frameworkClass->name, 12))
|
||||
{
|
||||
/* The name of the framework. */
|
||||
NSString *name = [NSString stringWithCString: &frameworkClass->name[12]];
|
||||
NSString *name;
|
||||
|
||||
name = [NSString stringWithUTF8String: &frameworkClass->name[12]];
|
||||
/* Important - gnustep-make mangles framework names to encode
|
||||
* them as ObjC class names. Here we need to demangle them. We
|
||||
* apply the reverse transformations in the reverse order.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue