Changes from Scott Christley. See ChangeLog Mar 4 10:47:18

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@2295 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Andrew McCallum 1997-05-03 17:25:25 +00:00
parent 89f78cc23b
commit 2969f845d4
6 changed files with 24 additions and 26 deletions

View file

@ -28,6 +28,12 @@
#include <Foundation/NSLock.h>
static NSString* NSCharacterSet_PATH = @"NSCharacterSets";
static NSString* gnustep_libdir =
#ifdef GNUSTEP_INSTALL_LIBDIR
@GNUSTEP_INSTALL_LIBDIR;
#else
nil;
#endif
/* A simple array for caching standard bitmap sets */
#define MAX_STANDARD_SETS 12
@ -61,6 +67,7 @@ static NSLock* cache_lock = nil;
{
NSCharacterSet* set;
NSString *path;
NSBundle *gstep_base_bundle = [NSBundle bundleWithPath: gnustep_libdir];
if (!cache_lock)
cache_lock = [NSLock new];
@ -70,15 +77,15 @@ static NSLock* cache_lock = nil;
if (cache_set[number] == nil)
{
NS_DURING
path = [NSBundle pathForResource:setname
ofType:@"dat"
inDirectory:NSCharacterSet_PATH];
path = [gstep_base_bundle pathForResource:setname
ofType:@"dat"
inDirectory:NSCharacterSet_PATH];
/* This is for testing purposes */
if (path == nil || [path length] == 0)
{
path = [NSBundle pathForResource:setname
ofType:@"dat"
inDirectory:@"../NSCharacterSets"];
path = [gstep_base_bundle pathForResource:setname
ofType:@"dat"
inDirectory:@"../NSCharacterSets"];
}
if (path == nil || [path length] == 0)