mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 08:21:25 +00:00
Consistency improvements.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@22012 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
25fb578f1c
commit
07e83d38c1
9 changed files with 87 additions and 82 deletions
|
@ -57,6 +57,7 @@
|
|||
#include "Foundation/NSFileManager.h"
|
||||
#include "Foundation/NSPortCoder.h"
|
||||
#include "Foundation/NSPathUtilities.h"
|
||||
#include "Foundation/NSProcessInfo.h"
|
||||
#include "Foundation/NSRange.h"
|
||||
#include "Foundation/NSException.h"
|
||||
#include "Foundation/NSData.h"
|
||||
|
@ -427,6 +428,8 @@ handle_printf_atsign (FILE *stream,
|
|||
|
||||
if (self == [NSString class] && beenHere == NO)
|
||||
{
|
||||
NSString *setting;
|
||||
|
||||
beenHere = YES;
|
||||
cMemberSel = @selector(characterIsMember:);
|
||||
caiSel = @selector(characterAtIndex:);
|
||||
|
@ -435,17 +438,6 @@ handle_printf_atsign (FILE *stream,
|
|||
|
||||
_DefaultStringEncoding = GetDefEncoding();
|
||||
_ByteEncodingOk = GSIsByteEncoding(_DefaultStringEncoding);
|
||||
if (getenv("GNUSTEP_PATH_HANDLING") != 0)
|
||||
{
|
||||
if (strcmp("unix", getenv("GNUSTEP_PATH_HANDLING")) == 0)
|
||||
{
|
||||
pathHandling = PH_UNIX;
|
||||
}
|
||||
else if (strcmp("windows", getenv("GNUSTEP_PATH_HANDLING")) == 0)
|
||||
{
|
||||
pathHandling = PH_WINDOWS;
|
||||
}
|
||||
}
|
||||
|
||||
NSStringClass = self;
|
||||
[self setVersion: 1];
|
||||
|
@ -475,6 +467,20 @@ handle_printf_atsign (FILE *stream,
|
|||
[NSException raise: NSGenericException
|
||||
format: @"register printf handling of %%@ failed"];
|
||||
#endif /* HAVE_REGISTER_PRINTF_FUNCTION */
|
||||
|
||||
setting = [[[NSProcessInfo processInfo] environment]
|
||||
objectForKey: @"GNUSTEP_PATH_HANDLING"];
|
||||
if (setting != nil)
|
||||
{
|
||||
if ([setting isEqualToString: @"unix"] == YES)
|
||||
{
|
||||
pathHandling = PH_UNIX;
|
||||
}
|
||||
else if ([setting isEqualToString: @"windows"] == YES)
|
||||
{
|
||||
pathHandling = PH_WINDOWS;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue