From b02a246b1b4f85d7a8e2f7e5c14f41df69ecf631 Mon Sep 17 00:00:00 2001 From: Richard Frith-Macdonald Date: Sun, 13 Nov 2005 07:45:52 +0000 Subject: [PATCH] Tweak. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@21994 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 6 ++++++ Source/NSPathUtilities.m | 21 ++++----------------- 2 files changed, 10 insertions(+), 17 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5824a181f..351e2dae3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2005-11-12 Richard Frith-Macdonald + + * Source/NSPathUtilities.m: NSOpenStepRootDirectory() mark as + deprecated using macro (was already documented as deprecated). + Get rid of environment variable. Use native path for mingw32 + 2005-11-11 Richard Frith-Macdonald * Applied Willem Rein Oudshoorn's fix for bug #11055, having tested it diff --git a/Source/NSPathUtilities.m b/Source/NSPathUtilities.m index bd8855df8..61cd902c0 100644 --- a/Source/NSPathUtilities.m +++ b/Source/NSPathUtilities.m @@ -120,15 +120,6 @@ static NSString *gnustep_flattened = #define MGR() [NSFileManager defaultManager] -/* - * NB. use fprintf() rather than NSLog() to avoid possibility of recursion - * when features of NSLog() cause patrh utilities to be used. - */ -#define PrintOnce(format, args...) \ - do { static BOOL beenHere = NO; if (beenHere == NO) {\ - beenHere = YES; \ - fprintf(stderr, format, ## args); }} while (0) - /* ------------------ */ /* Internal variables */ /* ------------------ */ @@ -1263,20 +1254,16 @@ NSOpenStepRootDirectory(void) { NSString *root; - root = [[[NSProcessInfo processInfo] environment] - objectForKey: @"GNUSTEP_ROOT"]; - if (root == nil) - { + GSOnceMLog(@"deprecated ... use NSSearchPathForDirectoriesInDomains()"); #if defined(__MINGW32__) #ifdef __CYGWIN__ - root = @"/cygdrive/c/"; + root = @"/cygdrive/c/"; #else - root = @"~c/"; + root = @"C:\\"; #endif #else - root = @"/"; + root = @"/"; #endif - } return root; }