mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 08:41:03 +00:00
win32 path handling simplifications (and some bug fixes).
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@21276 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
987497d4b1
commit
3fc6c34dd5
11 changed files with 252 additions and 255 deletions
|
@ -218,32 +218,14 @@ static void ShutdownPathUtilities(void);
|
|||
static inline NSString*
|
||||
internalizePathCString(const char *path)
|
||||
{
|
||||
unsigned int len;
|
||||
|
||||
if (path == 0)
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
|
||||
len = strlen(path);
|
||||
return [MGR() stringWithFileSystemRepresentation: path length: len];
|
||||
return [NSString stringWithCString: path];
|
||||
}
|
||||
|
||||
/* make sure that the path 's' is in internal format (unix-style) */
|
||||
static inline NSString*
|
||||
internalizePath(NSString *s)
|
||||
{
|
||||
const char *ptr;
|
||||
unsigned int len;
|
||||
|
||||
if (s == nil)
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
|
||||
ptr = [s cString];
|
||||
len = strlen(ptr);
|
||||
return [MGR() stringWithFileSystemRepresentation: ptr length: len];
|
||||
return s;
|
||||
}
|
||||
|
||||
/* Convenience MACRO to ease legibility and coding */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue