mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-25 01:31:08 +00:00
Some MacOS-X compatibility additions
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@10483 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
190d5bdee4
commit
478074a059
5 changed files with 37 additions and 6 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2001-07-16 Richard Frith-Macdonald <rfm@gnu.org>
|
||||||
|
|
||||||
|
* Source/NSArray.m: Added ([writeToURL:atomically:]) for
|
||||||
|
MacOS-X compatibility
|
||||||
|
* Source/NSDictionary.m: ditto
|
||||||
|
|
||||||
2001-07-15 Richard Frith-Macdonald <rfm@gnu.org>
|
2001-07-15 Richard Frith-Macdonald <rfm@gnu.org>
|
||||||
|
|
||||||
* Source/NSProcessInfo.m: Added -processIdentifier for compatibility
|
* Source/NSProcessInfo.m: Added -processIdentifier for compatibility
|
||||||
|
|
|
@ -28,6 +28,7 @@
|
||||||
#include <Foundation/NSUtilities.h>
|
#include <Foundation/NSUtilities.h>
|
||||||
|
|
||||||
@class NSString;
|
@class NSString;
|
||||||
|
@class NSURL;
|
||||||
|
|
||||||
@interface NSArray : NSObject <NSCoding, NSCopying, NSMutableCopying>
|
@interface NSArray : NSObject <NSCoding, NSCopying, NSMutableCopying>
|
||||||
|
|
||||||
|
@ -89,7 +90,9 @@
|
||||||
indent: (unsigned int)level;
|
indent: (unsigned int)level;
|
||||||
|
|
||||||
- (BOOL) writeToFile: (NSString*)path atomically: (BOOL)useAuxilliaryFile;
|
- (BOOL) writeToFile: (NSString*)path atomically: (BOOL)useAuxilliaryFile;
|
||||||
|
#ifndef STRICT_OPENSTEP
|
||||||
|
- (BOOL) writeToURL: (NSURL*)url atomically: (BOOL)useAuxilliaryFile;
|
||||||
|
#endif
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
|
|
||||||
#include <Foundation/NSObject.h>
|
#include <Foundation/NSObject.h>
|
||||||
|
|
||||||
@class NSArray, NSString, NSEnumerator;
|
@class NSArray, NSString, NSEnumerator, NSURL;
|
||||||
|
|
||||||
@interface NSDictionary : NSObject <NSCoding, NSCopying, NSMutableCopying>
|
@interface NSDictionary : NSObject <NSCoding, NSCopying, NSMutableCopying>
|
||||||
+ (id) dictionary;
|
+ (id) dictionary;
|
||||||
|
@ -66,10 +66,10 @@
|
||||||
- (id) objectForKey: (id)aKey; // Primitive
|
- (id) objectForKey: (id)aKey; // Primitive
|
||||||
- (NSArray*) objectsForKeys: (NSArray*)keys notFoundMarker: (id)anObject;
|
- (NSArray*) objectsForKeys: (NSArray*)keys notFoundMarker: (id)anObject;
|
||||||
|
|
||||||
- (BOOL) writeToFile: (NSString*)path atomically: (BOOL)useAuxiliaryFile;
|
- (BOOL) writeToFile: (NSString*)path atomically: (BOOL)useAuxilliaryFile;
|
||||||
|
#ifndef STRICT_OPENSTEP
|
||||||
/* Accessing file attributes is a catagory declared in NSFileManager.h*/
|
- (BOOL) writeToURL: (NSURL*)url atomically: (BOOL)useAuxilliaryFile;
|
||||||
|
#endif
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@interface NSMutableDictionary: NSDictionary
|
@interface NSMutableDictionary: NSDictionary
|
||||||
|
|
|
@ -850,6 +850,17 @@ static NSString *indentStrings[] = {
|
||||||
return [desc writeToFile: path atomically: useAuxiliaryFile];
|
return [desc writeToFile: path atomically: useAuxiliaryFile];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (BOOL) writeToURL: (NSURL *)url atomically: (BOOL)useAuxiliaryFile
|
||||||
|
{
|
||||||
|
NSDictionary *loc;
|
||||||
|
NSString *desc;
|
||||||
|
|
||||||
|
loc = [[NSUserDefaults standardUserDefaults] dictionaryRepresentation];
|
||||||
|
desc = [self descriptionWithLocale: loc indent: 0];
|
||||||
|
|
||||||
|
return [desc writeToURL: url atomically: useAuxiliaryFile];
|
||||||
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -631,6 +631,17 @@ compareIt(id o1, id o2, void* context)
|
||||||
return [desc writeToFile: path atomically: useAuxiliaryFile];
|
return [desc writeToFile: path atomically: useAuxiliaryFile];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (BOOL) writeToURL: (NSURL *)url atomically: (BOOL)useAuxiliaryFile
|
||||||
|
{
|
||||||
|
NSDictionary *loc;
|
||||||
|
NSString *desc;
|
||||||
|
|
||||||
|
loc = [[NSUserDefaults standardUserDefaults] dictionaryRepresentation];
|
||||||
|
desc = [self descriptionWithLocale: loc indent: 0];
|
||||||
|
|
||||||
|
return [desc writeToURL: url atomically: useAuxiliaryFile];
|
||||||
|
}
|
||||||
|
|
||||||
- (NSString*) description
|
- (NSString*) description
|
||||||
{
|
{
|
||||||
return [self descriptionWithLocale: nil indent: 0];
|
return [self descriptionWithLocale: nil indent: 0];
|
||||||
|
|
Loading…
Reference in a new issue