Some indentation fixes etc.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@10321 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
CaS 2001-07-07 19:00:02 +00:00
parent fb177fe538
commit df8ea1d187

View file

@ -358,9 +358,10 @@ NSTemporaryDirectory(void)
NSString * NSString *
NSOpenStepRootDirectory(void) NSOpenStepRootDirectory(void)
{ {
NSString *root = [[[NSProcessInfo processInfo] environment] NSString *root;
objectForKey: @"GNUSTEP_ROOT"];
root = [[[NSProcessInfo processInfo] environment]
objectForKey: @"GNUSTEP_ROOT"];
if (root == nil) if (root == nil)
#if defined(__MINGW__) #if defined(__MINGW__)
root = @"C:\\"; root = @"C:\\";
@ -372,8 +373,7 @@ NSOpenStepRootDirectory(void)
NSArray * NSArray *
NSSearchPathForDirectoriesInDomains(NSSearchPathDirectory directoryKey, NSSearchPathForDirectoriesInDomains(NSSearchPathDirectory directoryKey,
NSSearchPathDomainMask domainMask, NSSearchPathDomainMask domainMask, BOOL expandTilde)
BOOL expandTilde)
{ {
/* We read these four only once */ /* We read these four only once */
static NSString *gnustep_user_root = nil; /* GNUSTEP_USER_ROOT */ static NSString *gnustep_user_root = nil; /* GNUSTEP_USER_ROOT */
@ -390,7 +390,8 @@ NSSearchPathForDirectoriesInDomains(NSSearchPathDirectory directoryKey,
NSString *docDir = @"Documentation"; NSString *docDir = @"Documentation";
NSMutableArray *paths = [NSMutableArray new]; NSMutableArray *paths = [NSMutableArray new];
NSString *path; NSString *path;
unsigned i, count; unsigned i;
unsigned count;
if (gnustep_system_root == nil) if (gnustep_system_root == nil)
{ {
@ -409,9 +410,11 @@ NSSearchPathForDirectoriesInDomains(NSSearchPathDirectory directoryKey,
TEST_RETAIN (gnustep_system_root); TEST_RETAIN (gnustep_system_root);
if (gnustep_system_root == nil) if (gnustep_system_root == nil)
{ {
/* This is pretty important as we need it to load /*
character sets, language settings and similar * This is pretty important as we need it to load
resources. Use fprintf to avoid recursive calls. */ * character sets, language settings and similar
* resources. Use fprintf to avoid recursive calls.
*/
fprintf (stderr, fprintf (stderr,
"Warning - GNUSTEP_SYSTEM_ROOT is not set " "Warning - GNUSTEP_SYSTEM_ROOT is not set "
"- using /usr/GNUstep/System as a default\n"); "- using /usr/GNUstep/System as a default\n");
@ -437,14 +440,18 @@ NSSearchPathForDirectoriesInDomains(NSSearchPathDirectory directoryKey,
NS_ENDHANDLER NS_ENDHANDLER
} }
/* The order in which we return paths is important - user must come /*
first, followed by local, followed by network, followed by system. * The order in which we return paths is important - user must come
The calling code can then loop on the returned paths, and stop as * first, followed by local, followed by network, followed by system.
soon as it finds something. So things in user automatically * The calling code can then loop on the returned paths, and stop as
override things in system etc. */ * soon as it finds something. So things in user automatically
* override things in system etc.
*/
/* FIXME - The following code will not respect this order for /*
NSAllApplicationsDirectory. This should be fixed I think. */ * FIXME - The following code will not respect this order for
* NSAllApplicationsDirectory. This should be fixed I think.
*/
#define ADD_PATH(mask, base_dir, add_dir) \ #define ADD_PATH(mask, base_dir, add_dir) \
if (domainMask & mask) \ if (domainMask & mask) \