mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 08:26:27 +00:00
MacOS-X compatibility updates.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@26598 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
35e907b7ed
commit
f1d83b9f14
42 changed files with 827 additions and 13 deletions
48
ChangeLog
48
ChangeLog
|
@ -1,3 +1,51 @@
|
|||
2008-06-06 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/GSLocale.m:
|
||||
* Source/NSTimeZone.m:
|
||||
* Source/NSNetServices.m:
|
||||
* Source/NSSpellServer.m:
|
||||
* Source/NSBundle.m:
|
||||
* Source/NSPathUtilities.m:
|
||||
* Source/NSScanner.m:
|
||||
* Source/NSProcessInfo.m:
|
||||
* Source/NSArray.m:
|
||||
* Source/externs.m:
|
||||
* Source/NSCoder.m:
|
||||
* Source/NSString.m:
|
||||
* Source/NSConnection.m:
|
||||
* Source/NSAutoreleasePool.m:
|
||||
* Source/NSData.m:
|
||||
* Source/NSObjCRuntime.m:
|
||||
* Source/NSIndexSet.m:
|
||||
* Source/NSLock.m:
|
||||
* Source/NSSet.m:
|
||||
* Documentation/ReleaseNotes.gsdoc:
|
||||
* Headers/Foundation/NSTimeZone.h:
|
||||
* Headers/Foundation/NSNetServices.h:
|
||||
* Headers/Foundation/NSCoder.h:
|
||||
* Headers/Foundation/NSString.h:
|
||||
* Headers/Foundation/NSSpellServer.h:
|
||||
* Headers/Foundation/NSBundle.h:
|
||||
* Headers/Foundation/NSPathUtilities.h:
|
||||
* Headers/Foundation/NSScanner.h:
|
||||
* Headers/Foundation/NSProcessInfo.h:
|
||||
* Headers/Foundation/NSComparisonPredicate.h:
|
||||
* Headers/Foundation/NSConnection.h:
|
||||
* Headers/Foundation/NSAutoreleasePool.h:
|
||||
* Headers/Foundation/NSUserDefaults.h:
|
||||
* Headers/Foundation/NSData.h:
|
||||
* Headers/Foundation/NSArray.h:
|
||||
* Headers/Foundation/NSObjCRuntime.h:
|
||||
* Headers/Foundation/NSIndexSet.h:
|
||||
* Headers/Foundation/NSLock.h:
|
||||
* Headers/Foundation/NSSet.h:
|
||||
Lots of small OSX10.5 compatibility updates:-
|
||||
Some new enumerations and constant strings.
|
||||
Some new method implementations.
|
||||
Some new empty method stubs.
|
||||
Change NSLocale constant string to GSLocale in preparation for adding
|
||||
the new NSLocal class.
|
||||
|
||||
2008-05-25 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* configure.ac: For now, only use ffi for sparc64 on solaris as
|
||||
|
|
|
@ -28,6 +28,64 @@ notice and this notice are preserved.
|
|||
changes and other information that might help developers and users
|
||||
migrate to using a newer version of the library.
|
||||
</p>
|
||||
<section>
|
||||
<heading>Version 1.15.4</heading>
|
||||
<p>
|
||||
This is a stable release.
|
||||
</p>
|
||||
Highlights:
|
||||
<deflist>
|
||||
<term>NSArray</term>
|
||||
<desc>New OSX method stubs.</desc>
|
||||
<term>NSAutoreleasePool</term>
|
||||
<desc>Dummy OSX method (-drain).</desc>
|
||||
<term>NSBundle</term>
|
||||
<desc>New OSX method stubs.</desc>
|
||||
<term>NSCoder</term>
|
||||
<desc>
|
||||
New OSX10.5 methods for NSInteger implemented.
|
||||
</desc>
|
||||
<term>NSConnection</term>
|
||||
<desc>
|
||||
New OSX10.5 methods for server connections implemented.
|
||||
</desc>
|
||||
<term>NSData</term>
|
||||
<desc>New OSX method stubs.</desc>
|
||||
<term>NSException</term>
|
||||
<desc>Implement stack address reporting.</desc>
|
||||
<term>NSIndexSet</term>
|
||||
<desc>Add OSX10.5 stub for countOfIndexesInRange</desc>
|
||||
<term>NSKeyvalueObserving</term>
|
||||
<desc>OSX10.5 additions implemented</desc>
|
||||
<term>NSSet</term>
|
||||
<desc>Implemented new OSX methods.</desc>
|
||||
<term>NSThread</term>
|
||||
<desc>Implemented new OSX methods.</desc>
|
||||
<term>NSLock, NSRecursiveLock, NSConditionLock</term>
|
||||
<desc>Implemented names.</desc>
|
||||
</deflist>
|
||||
To do for MacOS-X 10.5 compatibility:
|
||||
Implement most new method stubs.
|
||||
Implement new OSX10.5 NSCalendar class.
|
||||
Implement new OSX10.5 NSLocale class.
|
||||
Implement new OSX10.5 NSOperation class.
|
||||
Implement new OSX10.5 XML classes.
|
||||
Implement NSInteger coding for NSCoder subclasses.
|
||||
Implement support for now enumarated values in NSComparisonPredicate.
|
||||
Implement new OSX10.5 features of NSDateFormatter.
|
||||
Implement new OSX10.5 features of NSExpesssion.
|
||||
Implement new OSX10.5 features of NSPredicate.
|
||||
Implement new OSX10.5 features of NSFileManager.
|
||||
Implement new OSX10.5 features of NSProcessInfo.
|
||||
Implement new OSX10.5 NSHashTable class.
|
||||
Implement new OSX10.5 NSMapTable class.
|
||||
Implement new OSX10.5 NSPointerArray class.
|
||||
Implement new OSX10.5 NSLocale additions.
|
||||
Implement new OSX10.5 features of NSNumberFormatter.
|
||||
Implement new OSX10.5 features of NSNumber/NSValue.
|
||||
Update NSDistributedNotificationCenter with new OSX methods.
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<heading>Version 1.15.3</heading>
|
||||
<p>
|
||||
|
|
|
@ -74,7 +74,9 @@ extern "C" {
|
|||
|
||||
- (id) lastObject;
|
||||
- (id) objectAtIndex: (unsigned)index; // Primitive
|
||||
#if OS_API_VERSION(100400, GS_API_LATEST)
|
||||
- (NSArray *) objectsAtIndexes: (NSIndexSet *)indexes;
|
||||
#endif
|
||||
|
||||
- (id) firstObjectCommonWithArray: (NSArray*)otherArray;
|
||||
- (BOOL) isEqualToArray: (NSArray*)otherArray;
|
||||
|
@ -128,10 +130,17 @@ extern "C" {
|
|||
#endif
|
||||
- (id) initWithCapacity: (unsigned)numItems; // Primitive
|
||||
- (void) insertObject: (id)anObject atIndex: (unsigned)index; // Primitive
|
||||
#if OS_API_VERSION(100400, GS_API_LATEST)
|
||||
- (void) insertObjects: (NSArray *)objects atIndexes: (NSIndexSet *)indexes;
|
||||
#endif
|
||||
- (void) removeObjectAtIndex: (unsigned)index; // Primitive
|
||||
- (void) removeObjectsAtIndexes: (NSIndexSet *)indexes;
|
||||
- (void) replaceObjectAtIndex: (unsigned)index
|
||||
withObject: (id)anObject; // Primitive
|
||||
#if OS_API_VERSION(100400, GS_API_LATEST)
|
||||
- (void) replaceObjectsAtIndexes: (NSIndexSet *)indexes
|
||||
withObjects: (NSArray *)objects;
|
||||
#endif
|
||||
- (void) replaceObjectsInRange: (NSRange)aRange
|
||||
withObjectsFromArray: (NSArray*)anArray;
|
||||
- (void) replaceObjectsInRange: (NSRange)aRange
|
||||
|
|
|
@ -219,6 +219,12 @@ typedef struct autorelease_array_list
|
|||
*/
|
||||
- (id) autorelease;
|
||||
|
||||
#if OS_API_VERSION(100400, GS_API_LATEST)
|
||||
/** Not implemented
|
||||
*/
|
||||
- (void) drain;
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Destroys the receiver (calls -dealloc).
|
||||
*/
|
||||
|
|
|
@ -42,6 +42,15 @@ extern "C" {
|
|||
@class NSMutableArray;
|
||||
@class NSMutableDictionary;
|
||||
|
||||
#if OS_API_VERSION(100500,GS_API_LATEST)
|
||||
enum {
|
||||
NSBundleExecutableArchitectureI386 = 0x00000007,
|
||||
NSBundleExecutableArchitecturePPC = 0x00000012,
|
||||
NSBundleExecutableArchitecturePPC64 = 0x01000012,
|
||||
NSBundleExecutableArchitectureX86_64 = 0x01000007,
|
||||
};
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Notification posted when a bundle is loaded. The notification object is
|
||||
* the [NSBundle] itself. The notification also contains a <em>userInfo</em>
|
||||
|
@ -322,10 +331,12 @@ GS_EXPORT NSString* const NSLoadedClasses;
|
|||
+ (NSArray *) preferredLocalizationsFromArray: (NSArray *)localizationsArray
|
||||
forPreferences: (NSArray *)preferencesArray;
|
||||
|
||||
#if OS_API_VERSION(100200,GS_API_LATEST)
|
||||
/**
|
||||
* Returns a boolean indicating whether code for the bundle has been loaded.
|
||||
*/
|
||||
- (BOOL) isLoaded;
|
||||
#endif
|
||||
|
||||
/**
|
||||
* This method returns the same information as
|
||||
|
@ -351,12 +362,22 @@ GS_EXPORT NSString* const NSLoadedClasses;
|
|||
/** Returns the info property list associated with the bundle. */
|
||||
- (NSDictionary*) infoDictionary;
|
||||
|
||||
#if OS_API_VERSION(100200,GS_API_LATEST)
|
||||
/** Returns a localized info property list based on the preferred
|
||||
* localization or the most appropriate localization if the preferred
|
||||
* one cannot be found.
|
||||
*/
|
||||
- (NSDictionary*) localizedInfoDictionary;
|
||||
|
||||
/** Not implemented
|
||||
*/
|
||||
- (NSString*) developmentLocalization;
|
||||
|
||||
/** Not implemented
|
||||
*/
|
||||
- (id) objectForInfoDictionaryKey: (NSString *)key;
|
||||
#endif
|
||||
|
||||
/** Returns all the localizations in the bundle. */
|
||||
- (NSArray*) localizations;
|
||||
|
||||
|
@ -373,10 +394,24 @@ GS_EXPORT NSString* const NSLoadedClasses;
|
|||
*/
|
||||
- (BOOL) load;
|
||||
|
||||
#if OS_API_VERSION(100200,GS_API_LATEST)
|
||||
/** * Not implemented
|
||||
*/
|
||||
- (BOOL) unload;
|
||||
#endif
|
||||
|
||||
/** Returns the path to the executable code in the bundle */
|
||||
- (NSString *) executablePath;
|
||||
#endif
|
||||
|
||||
#if OS_API_VERSION(100500,GS_API_LATEST)
|
||||
/** Not implemented */
|
||||
- (NSArray *) executableArchitectures;
|
||||
/** Not implemented */
|
||||
- (BOOL) preflightAndReturnError: (NSError **)error;
|
||||
/** Not implemented */
|
||||
- (BOOL) loadAndReturnError: (NSError **)error;
|
||||
#endif
|
||||
@end
|
||||
|
||||
#if OS_API_VERSION(GS_API_NONE, GS_API_NONE)
|
||||
|
|
|
@ -352,6 +352,18 @@ extern "C" {
|
|||
*/
|
||||
- (void) encodeObject: (id)anObject forKey: (NSString*)aKey;
|
||||
#endif
|
||||
|
||||
#if OS_API_VERSION(100500, GS_API_LATEST)
|
||||
/** <override-subclass />
|
||||
* Encodes anInteger and associates the encoded value with key.
|
||||
*/
|
||||
|
||||
- (void) encodeInteger: (NSInteger)anInteger forKey: (NSString *)key;
|
||||
/** <override-subclass />
|
||||
* Decodes an integer associated with the key.
|
||||
*/
|
||||
- (NSInteger) decodeIntegerForKey: (NSString *)key;
|
||||
#endif
|
||||
@end
|
||||
|
||||
#if defined(__cplusplus)
|
||||
|
|
|
@ -62,6 +62,11 @@ typedef enum _NSPredicateOperatorType
|
|||
NSEndsWithPredicateOperatorType,
|
||||
NSInPredicateOperatorType,
|
||||
NSCustomSelectorPredicateOperatorType
|
||||
#if OS_API_VERSION(100500,GS_API_LATEST)
|
||||
,
|
||||
NSContainsPredicateOperatorType = 99,
|
||||
NSBetweenPredicateOperatorType
|
||||
#endif
|
||||
} NSPredicateOperatorType;
|
||||
|
||||
@interface NSComparisonPredicate : NSPredicate
|
||||
|
|
|
@ -149,6 +149,13 @@ GS_EXPORT NSString* const NSConnectionProxyCount; /* Objects received */
|
|||
+ (NSDistantObject*) rootProxyForConnectionWithRegisteredName: (NSString*)n
|
||||
host: (NSString*)h usingNameServer: (NSPortNameServer*)s;
|
||||
|
||||
#if OS_API_VERSION(100500,GS_API_LATEST)
|
||||
+ (id) serviceConnectionWithName: (NSString *)name
|
||||
rootObject: (id)root;
|
||||
+ (id) serviceConnectionWithName: (NSString *)name
|
||||
rootObject: (id)root
|
||||
usingNameServer: (NSPortNameServer *)server;
|
||||
#endif
|
||||
|
||||
- (void) addRequestMode: (NSString*)mode;
|
||||
- (void) addRunLoop: (NSRunLoop*)loop;
|
||||
|
|
|
@ -35,9 +35,21 @@ extern "C" {
|
|||
#endif
|
||||
|
||||
#if OS_API_VERSION(GS_API_MACOSX, GS_API_LATEST)
|
||||
@class NSError;
|
||||
@class NSURL;
|
||||
#endif
|
||||
|
||||
#if OS_API_VERSION(100400,GS_API_LATEST)
|
||||
enum {
|
||||
NSMappedRead = 1,
|
||||
NSUncachedRead = 2
|
||||
};
|
||||
|
||||
enum {
|
||||
NSAtomicWrite = 1
|
||||
};
|
||||
#endif
|
||||
|
||||
@interface NSData : NSObject <NSCoding, NSCopying, NSMutableCopying>
|
||||
|
||||
// Allocating and Initializing a Data Object
|
||||
|
@ -118,6 +130,16 @@ extern "C" {
|
|||
count: (unsigned int)numInts
|
||||
atIndex: (unsigned int)index;
|
||||
|
||||
#if OS_API_VERSION(100400,GS_API_LATEST)
|
||||
/** Not implemented */
|
||||
- (BOOL) writeToFile: (NSString *)path
|
||||
options: (NSUInteger)writeOptionsMask
|
||||
error: (NSError **)errorPtr;
|
||||
/** Not implemented */
|
||||
- (BOOL) writeToURL: (NSURL *)url
|
||||
options: (NSUInteger)writeOptionsMask
|
||||
error: (NSError **)errorPtr;
|
||||
#endif
|
||||
@end
|
||||
|
||||
#if OS_API_VERSION(GS_API_NONE, GS_API_NONE)
|
||||
|
|
|
@ -87,6 +87,13 @@ extern "C" {
|
|||
*/
|
||||
- (unsigned int) count;
|
||||
|
||||
#if OS_API_VERSION(100500,GS_API_LATEST)
|
||||
/** Not implemented
|
||||
* Returns the number of indexes set within the specified range.
|
||||
*/
|
||||
- (NSUInteger) countOfIndexesInRange: (NSRange)range;
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Returns the first index value in the receiver or NSNotFound if the
|
||||
* receiver is empty.
|
||||
|
@ -206,7 +213,6 @@ extern "C" {
|
|||
- (void) removeIndexesInRange: (NSRange)aRange;
|
||||
|
||||
/**
|
||||
* Not implemented.<br />
|
||||
* Moves all the indexes from anIndex upwards by the amount specified.<br />
|
||||
* If amount is negative, index values below anIndex will be overwritten
|
||||
* by the shifted values.<br />
|
||||
|
|
|
@ -62,7 +62,8 @@ extern "C" {
|
|||
@interface NSLock : NSObject <NSLocking, GCFinalization>
|
||||
{
|
||||
@private
|
||||
void *_mutex;
|
||||
void *_mutex;
|
||||
NSString *_name;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -85,6 +86,16 @@ extern "C" {
|
|||
*/
|
||||
- (void) unlock;
|
||||
|
||||
#if OS_API_VERSION(100500,GS_API_LATEST)
|
||||
/** Return the name of the receiver or nil of none has been set.
|
||||
*/
|
||||
- (NSString*) name;
|
||||
|
||||
/** Sets the name of the receiver (for use in debugging).
|
||||
*/
|
||||
- (void) setName: (NSString*)name;
|
||||
#endif
|
||||
|
||||
@end
|
||||
|
||||
/**
|
||||
|
@ -98,6 +109,7 @@ extern "C" {
|
|||
void *_condition;
|
||||
void *_mutex;
|
||||
int _condition_value;
|
||||
NSString *_name;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -163,6 +175,16 @@ extern "C" {
|
|||
*/
|
||||
- (void) unlock;
|
||||
|
||||
#if OS_API_VERSION(100500,GS_API_LATEST)
|
||||
/** Return the name of the receiver or nil of none has been set.
|
||||
*/
|
||||
- (NSString*) name;
|
||||
|
||||
/** Sets the name of the receiver (for use in debugging).
|
||||
*/
|
||||
- (void) setName: (NSString*)name;
|
||||
#endif
|
||||
|
||||
@end
|
||||
|
||||
|
||||
|
@ -177,6 +199,7 @@ extern "C" {
|
|||
{
|
||||
@private
|
||||
void *_mutex;
|
||||
NSString *_name;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -200,6 +223,16 @@ extern "C" {
|
|||
*/
|
||||
- (void) unlock;
|
||||
|
||||
#if OS_API_VERSION(100500,GS_API_LATEST)
|
||||
/** Return the name of the receiver or nil of none has been set.
|
||||
*/
|
||||
- (NSString*) name;
|
||||
|
||||
/** Sets the name of the receiver (for use in debugging).
|
||||
*/
|
||||
- (void) setName: (NSString*)name;
|
||||
#endif
|
||||
|
||||
@end
|
||||
|
||||
#if OS_API_VERSION(GS_API_NONE, GS_API_NONE)
|
||||
|
|
|
@ -90,6 +90,12 @@ typedef enum
|
|||
NSNetServicesTimeoutError = -72007L
|
||||
} NSNetServicesError;
|
||||
|
||||
enum {
|
||||
NSNetServiceNoAutoRename = 1 << 0
|
||||
};
|
||||
typedef NSUInteger NSNetServiceOptions;
|
||||
|
||||
|
||||
GS_EXPORT NSString * const NSNetServicesErrorCode;
|
||||
GS_EXPORT NSString * const NSNetServicesErrorDomain;
|
||||
|
||||
|
@ -141,6 +147,13 @@ GS_EXPORT NSString * const NSNetServicesErrorDomain;
|
|||
- (void) scheduleInRunLoop: (NSRunLoop *) aRunLoop
|
||||
forMode: (NSString *) mode;
|
||||
|
||||
#if OS_API_VERSION(100500,GS_API_LATEST)
|
||||
/** Not implemented */
|
||||
- (NSInteger)port;
|
||||
/** Not implemented */
|
||||
- (void) publishWithOptions: (NSNetServiceOptions)options;
|
||||
#endif
|
||||
|
||||
- (void) publish;
|
||||
- (void) resolve;
|
||||
- (void) resolveWithTimeout: (NSTimeInterval) timeout;
|
||||
|
|
|
@ -40,6 +40,11 @@ extern "C" {
|
|||
typedef gsaddr NSInteger;
|
||||
typedef gsuaddr NSUInteger;
|
||||
|
||||
#if OS_API_VERSION(100500,GS_API_LATEST)
|
||||
GS_EXPORT NSString *NSStringFromProtocol(Protocol *aProtocol);
|
||||
GS_EXPORT Protocol *NSProtocolFromString(NSString *aProtocolName);
|
||||
#endif
|
||||
GS_EXPORT SEL NSSelectorFromString(NSString *aSelectorName);
|
||||
GS_EXPORT NSString *NSStringFromSelector(SEL aSelector);
|
||||
GS_EXPORT SEL NSSelectorFromString(NSString *aSelectorName);
|
||||
GS_EXPORT Class NSClassFromString(NSString *aClassName);
|
||||
|
|
|
@ -161,6 +161,9 @@ typedef enum
|
|||
NSCachesDirectory = 13, /** location of users cache files */
|
||||
NSApplicationSupportDirectory = 14, /** location of app support files */
|
||||
#endif
|
||||
#if OS_API_VERSION(100500, GS_API_LATEST)
|
||||
NSDownloadsDirectory = 15, /** location of downloaded files */
|
||||
#endif
|
||||
|
||||
NSAllApplicationsDirectory = 100, /** all app directories */
|
||||
NSAllLibrariesDirectory = 101, /** all library resources */
|
||||
|
|
|
@ -189,6 +189,14 @@ enum {
|
|||
*/
|
||||
- (void) setProcessName: (NSString*)newName;
|
||||
|
||||
#if OS_API_VERSION(100500,GS_API_LATEST)
|
||||
/** Not implemented */
|
||||
- (NSUInteger) processorCount;
|
||||
/** Not implemented */
|
||||
- (NSUInteger) activeProcessorCount;
|
||||
/** Not implemented */
|
||||
- (unsigned long long) physicalMemory;
|
||||
#endif
|
||||
@end
|
||||
|
||||
#if OS_API_VERSION(GS_API_NONE,GS_API_NONE)
|
||||
|
|
|
@ -99,6 +99,16 @@ extern "C" {
|
|||
#if OS_API_VERSION(GS_API_MACOSX, GS_API_LATEST)
|
||||
- (BOOL) scanDecimal: (NSDecimal*)value;
|
||||
#endif
|
||||
#if OS_API_VERSION(100500, GS_API_LATEST)
|
||||
/** Not implemented */
|
||||
- (BOOL) scanHexDouble: (double *)result;
|
||||
/** Not implemented */
|
||||
- (BOOL) scanHexFloat: (float *)result;
|
||||
/** Not implemented */
|
||||
- (BOOL) scanHexLongLong: (unsigned long long *)result;
|
||||
/** Not implemented */
|
||||
- (BOOL) scanInteger: (NSInteger *)value;
|
||||
#endif
|
||||
@end
|
||||
|
||||
#if defined(__cplusplus)
|
||||
|
|
|
@ -78,6 +78,11 @@ extern "C" {
|
|||
- (id) member: (id)anObject;
|
||||
- (NSEnumerator*) objectEnumerator;
|
||||
|
||||
#if OS_API_VERSION(100500,GS_API_LATEST)
|
||||
- (NSSet *) setByAddingObject: (id)anObject;
|
||||
- (NSSet *) setByAddingObjectsFromSet: (NSSet *)other;
|
||||
- (NSSet *) setByAddingObjectsFromArray: (NSArray *)other;
|
||||
#endif
|
||||
@end
|
||||
|
||||
@interface NSMutableSet: NSSet
|
||||
|
|
|
@ -47,6 +47,12 @@ extern "C" {
|
|||
@class NSMutableArray;
|
||||
@class NSMutableDictionary;
|
||||
|
||||
#if OS_API_VERSION(100500,GS_API_LATEST)
|
||||
GS_EXPORT NSString *const NSGrammarCorrections;
|
||||
GS_EXPORT NSString *const NSGrammarRange;
|
||||
GS_EXPORT NSString *const NSGrammarUserDescription;
|
||||
#endif
|
||||
|
||||
@interface NSSpellServer : NSObject
|
||||
{
|
||||
@private
|
||||
|
@ -126,6 +132,24 @@ findMisspelledWordInString: (NSString *)stringToCheck
|
|||
- (void) spellServer: (NSSpellServer *)sender
|
||||
didForgetWord: (NSString *)word
|
||||
inLanguage: (NSString *)language;
|
||||
|
||||
#if OS_API_VERSION(100300,GS_API_LATEST)
|
||||
/** Not implemented */
|
||||
- (NSArray *) spellServer: (NSSpellServer *)sender
|
||||
suggestCompletionsForPartialWordRange: (NSRange)range
|
||||
inString: (NSString *)string
|
||||
language: (NSString *)language;
|
||||
#endif
|
||||
|
||||
#if OS_API_VERSION(100500,GS_API_LATEST)
|
||||
/** Not implemented */
|
||||
- (NSRange) spellServer: (NSSpellServer *)sender
|
||||
checkGrammarInString: (NSString *)stringToCheck
|
||||
language: (NSString *)language
|
||||
details: (NSArray **)details;
|
||||
|
||||
#endif
|
||||
|
||||
@end
|
||||
|
||||
#if defined(__cplusplus)
|
||||
|
|
|
@ -38,12 +38,17 @@ extern "C" {
|
|||
*/
|
||||
typedef uint16_t unichar;
|
||||
|
||||
#if OS_API_VERSION(100500,GS_API_LATEST)
|
||||
#define NSMaximumStringLength (INT_MAX-1)
|
||||
#endif
|
||||
|
||||
@class NSArray;
|
||||
@class NSCharacterSet;
|
||||
@class NSData;
|
||||
@class NSDictionary;
|
||||
#if OS_API_VERSION(GS_API_MACOSX, GS_API_LATEST)
|
||||
@class NSError;
|
||||
@class NSLocale;
|
||||
@class NSURL;
|
||||
#endif
|
||||
|
||||
|
@ -56,7 +61,14 @@ enum
|
|||
NSBackwardsSearch = 4,
|
||||
NSAnchoredSearch = 8,
|
||||
NSNumericSearch = 64 /* MacOS-X 10.2 */
|
||||
#if OS_API_VERSION(100500,GS_API_LATEST)
|
||||
,
|
||||
NSDiacriticInsensitiveSearch = 128,
|
||||
NSWidthInsensitiveSearch = 256,
|
||||
NSForcedOrderingSearch = 512
|
||||
#endif
|
||||
};
|
||||
typedef NSUInteger NSStringCompareOptions;
|
||||
|
||||
/**
|
||||
* <p>Enumeration of available encodings for converting between bytes and
|
||||
|
@ -98,6 +110,7 @@ typedef enum _NSStringEncoding
|
|||
NSShiftJISStringEncoding = 8,
|
||||
NSISOLatin2StringEncoding = 9, // ISO-8859-2; East European
|
||||
NSUnicodeStringEncoding = 10,
|
||||
NSUTF16StringEncoding = NSUnicodeStringEncoding, // An alias
|
||||
NSWindowsCP1251StringEncoding = 11,
|
||||
NSWindowsCP1252StringEncoding = 12, // WinLatin1
|
||||
NSWindowsCP1253StringEncoding = 13, // Greek
|
||||
|
@ -128,12 +141,29 @@ typedef enum _NSStringEncoding
|
|||
NSGSM0338StringEncoding, // GSM (mobile phone) default alphabet
|
||||
NSBIG5StringEncoding, // Traditional chinese
|
||||
NSKoreanEUCStringEncoding // Korean
|
||||
|
||||
#if OS_API_VERSION(100400,GS_API_LATEST)
|
||||
,
|
||||
NSUTF16BigEndianStringEncoding = 0x90000100,
|
||||
NSUTF16LittleEndianStringEncoding = 0x94000100,
|
||||
NSUTF32StringEncoding = 0x8c000100,
|
||||
NSUTF32BigEndianStringEncoding = 0x98000100,
|
||||
NSUTF32LittleEndianStringEncoding = 0x9c000100
|
||||
#endif
|
||||
} NSStringEncoding;
|
||||
|
||||
enum {
|
||||
NSOpenStepUnicodeReservedBase = 0xF400
|
||||
};
|
||||
|
||||
#if OS_API_VERSION(100400,GS_API_LATEST)
|
||||
enum {
|
||||
NSStringEncodingConversionAllowLossy = 1,
|
||||
NSStringEncodingConversionExternalRepresentation = 2
|
||||
};
|
||||
typedef NSUInteger NSStringEncodingConversionOptions;
|
||||
#endif
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* <code>NSString</code> objects represent an immutable string of Unicode 3.0
|
||||
|
@ -628,9 +658,33 @@ enum {
|
|||
- (const char *)UTF8String;
|
||||
#endif
|
||||
|
||||
#if OS_API_VERSION(100300,GS_API_LATEST)
|
||||
/** Not implemented */
|
||||
- (void) getParagraphStart: (NSUInteger *)startPtr
|
||||
end: (NSUInteger *)parEndPtr
|
||||
contentsEnd: (NSUInteger *)contentsEndPtr
|
||||
forRange: (NSRange)range;
|
||||
/** Not implemented */
|
||||
- (NSRange) paragraphRangeForRange: (NSRange)range;
|
||||
#endif
|
||||
|
||||
#if OS_API_VERSION(100500,GS_API_LATEST)
|
||||
- (BOOL) boolValue;
|
||||
- (NSArray *) componentsSeparatedByCharactersInSet: (NSCharacterSet *)separator;
|
||||
- (NSInteger) integerValue;
|
||||
- (long long) longLongValue;
|
||||
/** Not implemented */
|
||||
- (NSRange) rangeOfComposedCharacterSequencesForRange: (NSRange)range;
|
||||
/** Not implemented */
|
||||
- (NSRange) rangeOfString: (NSString *)aString
|
||||
options: (NSStringCompareOptions)mask
|
||||
range: (NSRange)searchRange
|
||||
locale: (NSLocale *)locale;
|
||||
|
||||
#endif
|
||||
|
||||
#if OS_API_VERSION(GS_API_NONE, GS_API_NONE)
|
||||
+ (Class) constantStringClass;
|
||||
- (BOOL) boolValue;
|
||||
#endif /* GS_API_NONE */
|
||||
|
||||
@end
|
||||
|
|
|
@ -32,6 +32,7 @@ extern "C" {
|
|||
@class NSArray;
|
||||
@class NSDate;
|
||||
@class NSDictionary;
|
||||
@class NSLocale;
|
||||
@class NSString;
|
||||
|
||||
@interface NSTimeZone : NSObject
|
||||
|
@ -75,6 +76,29 @@ extern "C" {
|
|||
- (int) secondsFromGMTForDate: (NSDate*)aDate;
|
||||
#endif
|
||||
|
||||
#if OS_API_VERSION(100500,GS_API_LATEST)
|
||||
/** Not implemented */
|
||||
- (NSTimeInterval) daylightSavingTimeOffsetForDate: (NSDate *)aDate;
|
||||
/** Not implemented */
|
||||
- (NSDate *) nextDaylightSavingTimeTransitionAfterDate: (NSDate *)aDate;
|
||||
/** Not implemented */
|
||||
- (NSTimeInterval) daylightSavingTimeOffset;
|
||||
/** Not implemented */
|
||||
- (NSDate *) nextDaylightSavingTimeTransition;
|
||||
|
||||
enum {
|
||||
NSTimeZoneNameStyleStandard,
|
||||
NSTimeZoneNameStyleShortStandard,
|
||||
NSTimeZoneNameStyleDaylightSaving,
|
||||
NSTimeZoneNameStyleShortDaylightSaving
|
||||
};
|
||||
typedef NSInteger NSTimeZoneNameStyle;
|
||||
- (NSString *)localizedName: (NSTimeZoneNameStyle)style
|
||||
locale: (NSLocale *)locale;
|
||||
GS_EXPORT NSString * const NSSystemTimeZoneDidChangeNotification;
|
||||
|
||||
#endif
|
||||
|
||||
#if OS_API_VERSION(GS_API_OPENSTEP, GS_API_MACOSX)
|
||||
- (NSTimeZoneDetail*) timeZoneDetailForDate: (NSDate*)date;
|
||||
- (NSString*) timeZoneName;
|
||||
|
@ -87,6 +111,7 @@ extern "C" {
|
|||
*/
|
||||
+ (NSTimeZone*) defaultTimeZone;
|
||||
+ (NSTimeZone*) timeZoneWithAbbreviation: (NSString*)abbreviation;
|
||||
|
||||
@end
|
||||
|
||||
#if OS_API_VERSION(GS_API_OPENSTEP, GS_API_MACOSX)
|
||||
|
|
|
@ -181,7 +181,7 @@ GS_EXPORT NSString* const NSLanguageCode;
|
|||
GS_EXPORT NSString* const NSFormalName;
|
||||
#ifndef NO_GNUSTEP
|
||||
/** Key for locale dictionary: name of locale. */
|
||||
GS_EXPORT NSString* const NSLocale;
|
||||
GS_EXPORT NSString* const GSLocale;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
|
|
@ -203,7 +203,7 @@ GSDomainFromDefaultLocale(void)
|
|||
#endif
|
||||
if (str1 != nil)
|
||||
{
|
||||
[dict setObject: str1 forKey: NSLocale];
|
||||
[dict setObject: str1 forKey: GSLocale];
|
||||
}
|
||||
str2 = GSLanguageFromLocale(str1);
|
||||
if (str2 != nil)
|
||||
|
|
|
@ -1635,6 +1635,13 @@ compare(id elem1, id elem2, void* context)
|
|||
[self subclassResponsibility: _cmd];
|
||||
}
|
||||
|
||||
/** Not implemented
|
||||
*/
|
||||
- (void) replaceObjectsAtIndexes: (NSIndexSet *)indexes
|
||||
withObjects: (NSArray *)objects
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Replaces objects in the receiver with those from anArray.<br />
|
||||
* Raises an exception if given a range extending beyond the array.<br />
|
||||
|
@ -1676,6 +1683,12 @@ compare(id elem1, id elem2, void* context)
|
|||
[self subclassResponsibility: _cmd];
|
||||
}
|
||||
|
||||
/** Not implemented
|
||||
*/
|
||||
- (void) insertObjects: (NSArray *)objects atIndexes: (NSIndexSet *)indexes
|
||||
{
|
||||
}
|
||||
|
||||
/** <override-subclass />
|
||||
* Removes an object from the receiver at the specified location.<br />
|
||||
* The size of the array decreases by one.<br />
|
||||
|
|
|
@ -305,6 +305,11 @@ static IMP initImp;
|
|||
_released_count++;
|
||||
}
|
||||
|
||||
- (void) drain
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
- (id) retain
|
||||
{
|
||||
[NSException raise: NSGenericException
|
||||
|
|
|
@ -1912,6 +1912,16 @@ _bundle_load_callback(Class theClass, struct objc_category *theCategory)
|
|||
return dict;
|
||||
}
|
||||
|
||||
- (id) objectForInfoDictionaryKey: (NSString *)key
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (NSString*) developmentLocalization
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (NSArray *) localizations
|
||||
{
|
||||
NSString *locale;
|
||||
|
@ -2081,6 +2091,20 @@ _bundle_load_callback(Class theClass, struct objc_category *theCategory)
|
|||
_strip_after_loading = flag;
|
||||
}
|
||||
|
||||
- (NSArray *) executableArchitectures
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
- (BOOL) preflightAndReturnError: (NSError **)error
|
||||
{
|
||||
return NO;
|
||||
}
|
||||
- (BOOL) loadAndReturnError: (NSError **)error
|
||||
{
|
||||
return NO;
|
||||
}
|
||||
|
||||
|
||||
- (NSString *) executablePath
|
||||
{
|
||||
NSString *object, *path;
|
||||
|
@ -2223,6 +2247,10 @@ _bundle_load_callback(Class theClass, struct objc_category *theCategory)
|
|||
_version = version;
|
||||
}
|
||||
|
||||
- (BOOL) unload
|
||||
{
|
||||
return NO;
|
||||
}
|
||||
@end
|
||||
|
||||
@implementation NSBundle (GNUstep)
|
||||
|
|
|
@ -344,6 +344,12 @@
|
|||
return 0;
|
||||
}
|
||||
|
||||
- (NSInteger) decodeIntegerForKey: (NSString*)key
|
||||
{
|
||||
[self subclassResponsibility: _cmd];
|
||||
return 0;
|
||||
}
|
||||
|
||||
- (int32_t) decodeInt32ForKey: (NSString*)aKey
|
||||
{
|
||||
[self subclassResponsibility: _cmd];
|
||||
|
@ -394,6 +400,11 @@
|
|||
[self subclassResponsibility: _cmd];
|
||||
}
|
||||
|
||||
- (void) encodeInteger: (NSInteger)anInteger forKey: (NSString*)key
|
||||
{
|
||||
[self subclassResponsibility: _cmd];
|
||||
}
|
||||
|
||||
- (void) encodeInt32: (int32_t)anInteger forKey: (NSString*)aKey
|
||||
{
|
||||
[self subclassResponsibility: _cmd];
|
||||
|
|
|
@ -647,6 +647,42 @@ static NSLock *cached_proxies_gate = nil;
|
|||
return AUTORELEASE(proxy);
|
||||
}
|
||||
|
||||
+ (id) serviceConnectionWithName: (NSString *)name
|
||||
rootObject: (id)root
|
||||
{
|
||||
return [self serviceConnectionWithName: name
|
||||
rootObject: root
|
||||
usingNameServer: [NSPortNameServer systemDefaultPortNameServer]];
|
||||
}
|
||||
|
||||
+ (id) serviceConnectionWithName: (NSString *)name
|
||||
rootObject: (id)root
|
||||
usingNameServer: (NSPortNameServer *)server
|
||||
{
|
||||
NSConnection *c;
|
||||
NSPort *p;
|
||||
|
||||
if ([server isKindOfClass: [NSMessagePortNameServer class]] == YES)
|
||||
{
|
||||
p = [NSMessagePort port];
|
||||
}
|
||||
else if ([server isKindOfClass: [NSSocketPortNameServer class]] == YES)
|
||||
{
|
||||
p = [NSSocketPort port];
|
||||
}
|
||||
else
|
||||
{
|
||||
p = nil;
|
||||
}
|
||||
|
||||
c = [[NSConnection alloc] initWithReceivePort: p sendPort: nil];
|
||||
if ([c registerName: name withNameServer: server] == NO)
|
||||
{
|
||||
DESTROY(c);
|
||||
}
|
||||
return AUTORELEASE(c);
|
||||
}
|
||||
|
||||
+ (void) _timeout: (NSTimer*)t
|
||||
{
|
||||
NSArray *cached_locals;
|
||||
|
|
|
@ -1540,6 +1540,19 @@ failure:
|
|||
return self;
|
||||
}
|
||||
|
||||
- (BOOL) writeToFile: (NSString *)path
|
||||
options: (NSUInteger)writeOptionsMask
|
||||
error: (NSError **)errorPtr
|
||||
{
|
||||
return NO;
|
||||
}
|
||||
|
||||
- (BOOL) writeToURL: (NSURL *)url
|
||||
options: (NSUInteger)writeOptionsMask
|
||||
error: (NSError **)errorPtr
|
||||
{
|
||||
return NO;
|
||||
}
|
||||
@end
|
||||
|
||||
/**
|
||||
|
|
|
@ -232,6 +232,11 @@ static unsigned posForIndex(GSIArray array, unsigned index)
|
|||
}
|
||||
}
|
||||
|
||||
- (NSUInteger) countOfIndexesInRange: (NSRange)range
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
- (void) dealloc
|
||||
{
|
||||
if (_array != 0)
|
||||
|
|
|
@ -167,6 +167,14 @@ NSString *NSRecursiveLockException = @"NSRecursiveLockException";
|
|||
[super dealloc];
|
||||
}
|
||||
|
||||
- (NSString*) description
|
||||
{
|
||||
if (_name == nil)
|
||||
return [super description];
|
||||
return [NSString stringWithFormat: @"%@ named '%@'",
|
||||
[super description], _name];
|
||||
}
|
||||
|
||||
- (void) gcFinalize
|
||||
{
|
||||
if (_mutex != 0)
|
||||
|
@ -175,10 +183,21 @@ NSString *NSRecursiveLockException = @"NSRecursiveLockException";
|
|||
// If there are outstanding locks then it will block
|
||||
if (objc_mutex_deallocate(_MUTEX) == -1)
|
||||
{
|
||||
NSWarnMLog(@"objc_mutex_deallocate() failed");
|
||||
NSWarnMLog(@"objc_mutex_deallocate() failed for %@", self);
|
||||
}
|
||||
_mutex = 0;
|
||||
}
|
||||
DESTROY(_name);
|
||||
}
|
||||
|
||||
- (NSString*) name
|
||||
{
|
||||
return _name;
|
||||
}
|
||||
|
||||
- (void) setName: (NSString*)name
|
||||
{
|
||||
ASSIGNCOPY(_name, name);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -304,6 +323,14 @@ NSString *NSRecursiveLockException = @"NSRecursiveLockException";
|
|||
[super dealloc];
|
||||
}
|
||||
|
||||
- (NSString*) description
|
||||
{
|
||||
if (_name == nil)
|
||||
return [super description];
|
||||
return [NSString stringWithFormat: @"%@ named '%@'",
|
||||
[super description], _name];
|
||||
}
|
||||
|
||||
- (void) gcFinalize
|
||||
{
|
||||
if (_condition != 0)
|
||||
|
@ -311,7 +338,7 @@ NSString *NSRecursiveLockException = @"NSRecursiveLockException";
|
|||
// Ask the runtime to deallocate the condition
|
||||
if (objc_condition_deallocate(_CONDITION) == -1)
|
||||
{
|
||||
NSWarnMLog(@"objc_condition_deallocate() failed");
|
||||
NSWarnMLog(@"objc_condition_deallocate() failed for %@", self);
|
||||
}
|
||||
}
|
||||
if (_mutex != 0)
|
||||
|
@ -320,9 +347,10 @@ NSString *NSRecursiveLockException = @"NSRecursiveLockException";
|
|||
// If there are outstanding locks then it will block
|
||||
if (objc_mutex_deallocate(_MUTEX) == -1)
|
||||
{
|
||||
NSWarnMLog(@"objc_mutex_deallocate() failed");
|
||||
NSWarnMLog(@"objc_mutex_deallocate() failed for %@", self);
|
||||
}
|
||||
}
|
||||
DESTROY(_name);
|
||||
}
|
||||
|
||||
// Return the current condition of the lock
|
||||
|
@ -354,6 +382,16 @@ NSString *NSRecursiveLockException = @"NSRecursiveLockException";
|
|||
}
|
||||
}
|
||||
|
||||
- (NSString*) name
|
||||
{
|
||||
return _name;
|
||||
}
|
||||
|
||||
- (void) setName: (NSString*)name
|
||||
{
|
||||
ASSIGNCOPY(_name, name);
|
||||
}
|
||||
|
||||
- (void) unlockWithCondition: (int)value
|
||||
{
|
||||
int depth;
|
||||
|
@ -600,6 +638,14 @@ NSString *NSRecursiveLockException = @"NSRecursiveLockException";
|
|||
[super dealloc];
|
||||
}
|
||||
|
||||
- (NSString*) description
|
||||
{
|
||||
if (_name == nil)
|
||||
return [super description];
|
||||
return [NSString stringWithFormat: @"%@ named '%@'",
|
||||
[super description], _name];
|
||||
}
|
||||
|
||||
- (void) gcFinalize
|
||||
{
|
||||
if (_mutex != 0)
|
||||
|
@ -608,10 +654,21 @@ NSString *NSRecursiveLockException = @"NSRecursiveLockException";
|
|||
// If there are outstanding locks then it will block
|
||||
if (objc_mutex_deallocate(_MUTEX) == -1)
|
||||
{
|
||||
NSWarnMLog(@"objc_mutex_deallocate() failed");
|
||||
NSWarnMLog(@"objc_mutex_deallocate() failed for %@", self);
|
||||
}
|
||||
_mutex = 0;
|
||||
}
|
||||
DESTROY(_name);
|
||||
}
|
||||
|
||||
- (NSString*) name
|
||||
{
|
||||
return _name;
|
||||
}
|
||||
|
||||
- (void) setName: (NSString*)name
|
||||
{
|
||||
ASSIGNCOPY(_name, name);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -2334,6 +2334,15 @@ static void DNSSD_API
|
|||
return [((Service*)_reserved)->info objectForKey: @"Name"];
|
||||
}
|
||||
|
||||
- (NSInteger) port
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
- (void) publishWithOptions: (NSNetServiceOptions)options
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the type of the service.
|
||||
*
|
||||
|
|
|
@ -34,7 +34,39 @@
|
|||
#include <string.h>
|
||||
|
||||
/**
|
||||
* Returns a string object containing the method name for
|
||||
* Returns a string object containing the name for
|
||||
* aProtocol. If aProtocol is 0, returns nil.
|
||||
*/
|
||||
NSString *
|
||||
NSStringFromProtocol(Protocol *aProtocol)
|
||||
{
|
||||
if (aProtocol != (Protocol*)0)
|
||||
return [NSString stringWithUTF8String: (const char*)[aProtocol name]];
|
||||
return nil;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the protocol whose name is supplied in the
|
||||
* aProtocolName argument, or 0 if a nil string is supplied.
|
||||
*/
|
||||
Protocol *
|
||||
NSProtocolFromString(NSString *aProtocolName)
|
||||
{
|
||||
if (aProtocolName != nil)
|
||||
{
|
||||
int len = [aProtocolName length];
|
||||
char buf[len+1];
|
||||
|
||||
[aProtocolName getCString: buf
|
||||
maxLength: len + 1
|
||||
encoding: NSASCIIStringEncoding];
|
||||
return GSProtocolFromName (buf);
|
||||
}
|
||||
return (Protocol*)0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a string object containing the name for
|
||||
* aSelector. If aSelector is 0, returns nil.
|
||||
*/
|
||||
NSString *
|
||||
|
@ -46,7 +78,7 @@ NSStringFromSelector(SEL aSelector)
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns a selector for the method whose name is supplied in the
|
||||
* Returns the selector whose name is supplied in the
|
||||
* aSelectorName argument, or 0 if a nil string is supplied.
|
||||
*/
|
||||
SEL
|
||||
|
|
|
@ -1909,6 +1909,15 @@ if (domainMask & mask) \
|
|||
}
|
||||
break;
|
||||
|
||||
case NSDownloadsDirectory:
|
||||
{
|
||||
ADD_PATH(NSUserDomainMask, gnustepUserLibrary, @"Downloads");
|
||||
ADD_PATH(NSLocalDomainMask, gnustepLocalLibrary, @"Downloads");
|
||||
ADD_PATH(NSNetworkDomainMask, gnustepNetworkLibrary, @"Downloads");
|
||||
ADD_PATH(NSSystemDomainMask, gnustepSystemLibrary, @"Downloads");
|
||||
}
|
||||
break;
|
||||
|
||||
case NSCachesDirectory:
|
||||
{
|
||||
/* Uff - at the moment the only place to put Caches seems to
|
||||
|
|
|
@ -1192,6 +1192,20 @@ static void determineOperatingSystem()
|
|||
return;
|
||||
}
|
||||
|
||||
- (NSUInteger) processorCount
|
||||
{
|
||||
return 0; // FIXME
|
||||
}
|
||||
|
||||
- (NSUInteger) activeProcessorCount
|
||||
{
|
||||
return 0; // FIXME
|
||||
}
|
||||
|
||||
- (unsigned long long) physicalMemory
|
||||
{
|
||||
return 0; // FIXME
|
||||
}
|
||||
@end
|
||||
|
||||
@implementation NSProcessInfo (GNUstep)
|
||||
|
|
|
@ -1147,6 +1147,22 @@ typedef struct {
|
|||
return n;
|
||||
}
|
||||
|
||||
- (BOOL) scanHexDouble: (double *)result
|
||||
{
|
||||
return NO; // FIXME
|
||||
}
|
||||
- (BOOL) scanHexFloat: (float *)result
|
||||
{
|
||||
return NO; // FIXME
|
||||
}
|
||||
- (BOOL) scanHexLongLong: (unsigned long long *)result
|
||||
{
|
||||
return NO; // FIXME
|
||||
}
|
||||
- (BOOL) scanInteger: (NSInteger *)value
|
||||
{
|
||||
return NO; // FIXME
|
||||
}
|
||||
@end
|
||||
|
||||
/*
|
||||
|
|
|
@ -848,6 +848,49 @@ static Class NSMutableSet_concrete_class;
|
|||
|
||||
return result;
|
||||
}
|
||||
|
||||
/** Return a set formed by adding anObject to the receiver.
|
||||
*/
|
||||
- (NSSet *) setByAddingObject: (id)anObject
|
||||
{
|
||||
NSMutableSet *m;
|
||||
NSSet *s;
|
||||
|
||||
m = [self mutableCopy];
|
||||
[m addObject: anObject];
|
||||
s = [m copy];
|
||||
[m release];
|
||||
return [s autorelease];
|
||||
}
|
||||
|
||||
/** Return a set formed by adding the contents of other to the receiver.
|
||||
*/
|
||||
- (NSSet *) setByAddingObjectsFromArray: (NSArray *)other
|
||||
{
|
||||
NSMutableSet *m;
|
||||
NSSet *s;
|
||||
|
||||
m = [self mutableCopy];
|
||||
[m addObjectsFromArray: other];
|
||||
s = [m copy];
|
||||
[m release];
|
||||
return [s autorelease];
|
||||
}
|
||||
|
||||
/** Return a set formed as a union of the receiver and other.
|
||||
*/
|
||||
- (NSSet *) setByAddingObjectsFromSet: (NSSet *)other
|
||||
{
|
||||
NSMutableSet *m;
|
||||
NSSet *s;
|
||||
|
||||
m = [self mutableCopy];
|
||||
[m unionSet: other];
|
||||
s = [m copy];
|
||||
[m release];
|
||||
return [s autorelease];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
|
||||
|
|
|
@ -40,6 +40,10 @@
|
|||
#include "Foundation/NSException.h"
|
||||
#include "Foundation/NSSet.h"
|
||||
|
||||
NSString *const NSGrammarRange = @"NSGrammarRange";
|
||||
NSString *const NSGrammarUserDescription = @"NSGrammarUserDescription";
|
||||
NSString *const NSGrammarCorrections = @"NSGrammarCorrections";
|
||||
|
||||
/* User dictionary location */
|
||||
static NSString *GNU_UserDictionariesDir = @"Dictionaries";
|
||||
|
||||
|
@ -468,4 +472,19 @@ is a set of words learned by the spell service for that particular user.
|
|||
return words;
|
||||
}
|
||||
|
||||
- (NSArray *) spellServer: (NSSpellServer *)sender
|
||||
suggestCompletionsForPartialWordRange: (NSRange)range
|
||||
inString: (NSString *)string
|
||||
language: (NSString *)language
|
||||
{
|
||||
return nil; // FIXME
|
||||
}
|
||||
|
||||
- (NSRange) spellServer: (NSSpellServer *)sender
|
||||
checkGrammarInString: (NSString *)stringToCheck
|
||||
language: (NSString *)language
|
||||
details: (NSArray **)details
|
||||
{
|
||||
return NSMakeRange(0, 0); // FIXME
|
||||
}
|
||||
@end
|
||||
|
|
|
@ -1515,6 +1515,48 @@ handle_printf_atsign (FILE *stream,
|
|||
|
||||
// Dividing Strings into Substrings
|
||||
|
||||
/**
|
||||
* <p>Returns an array of [NSString]s representing substrings of this string
|
||||
* that are separated by characters in the set (which must not be nil).
|
||||
* If there are no occurrences of separator, the whole string is
|
||||
* returned. If string begins or ends with separator, empty strings will
|
||||
* be returned for those positions.</p>
|
||||
*/
|
||||
- (NSArray *) componentsSeparatedByCharactersInSet: (NSCharacterSet *)set
|
||||
{
|
||||
NSRange search;
|
||||
NSRange complete;
|
||||
NSRange found;
|
||||
NSMutableArray *array;
|
||||
|
||||
if (set == nil)
|
||||
[NSException raise: NSInvalidArgumentException format: @"set is nil"];
|
||||
|
||||
array = [NSMutableArray array];
|
||||
search = NSMakeRange (0, [self length]);
|
||||
complete = search;
|
||||
found = [self rangeOfCharacterFromSet: set];
|
||||
while (found.length != 0)
|
||||
{
|
||||
NSRange current;
|
||||
|
||||
current = NSMakeRange (search.location,
|
||||
found.location - search.location);
|
||||
[array addObject: [self substringWithRange: current]];
|
||||
|
||||
search = NSMakeRange (found.location + found.length,
|
||||
complete.length - found.location - found.length);
|
||||
found = [self rangeOfCharacterFromSet: set
|
||||
options: 0
|
||||
range: search];
|
||||
}
|
||||
// Add the last search string range
|
||||
[array addObject: [self substringWithRange: search]];
|
||||
|
||||
// FIXME: Need to make mutable array into non-mutable array?
|
||||
return array;
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>Returns an array of [NSString]s representing substrings of this string
|
||||
* that are separated by separator (which itself is never returned in the
|
||||
|
@ -1703,6 +1745,11 @@ handle_printf_atsign (FILE *stream,
|
|||
return range;
|
||||
}
|
||||
|
||||
- (NSRange) rangeOfComposedCharacterSequencesForRange: (NSRange)range
|
||||
{
|
||||
return NSMakeRange(0, 0); // FIXME
|
||||
}
|
||||
|
||||
/**
|
||||
* Invokes -rangeOfString:options: with no options.
|
||||
*/
|
||||
|
@ -1762,6 +1809,14 @@ handle_printf_atsign (FILE *stream,
|
|||
return strRangeNsNs(self, aString, mask, aRange);
|
||||
}
|
||||
|
||||
- (NSRange) rangeOfString: (NSString *)aString
|
||||
options: (NSStringCompareOptions)mask
|
||||
range: (NSRange)searchRange
|
||||
locale: (NSLocale *)locale
|
||||
{
|
||||
return NSMakeRange(0, 0); // FIXME
|
||||
}
|
||||
|
||||
- (unsigned int) indexOfString: (NSString *)substring
|
||||
{
|
||||
NSRange range = {0, [self length]};
|
||||
|
@ -2287,6 +2342,14 @@ handle_printf_atsign (FILE *stream,
|
|||
}
|
||||
}
|
||||
|
||||
- (void) getParagraphStart: (NSUInteger *)startPtr
|
||||
end: (NSUInteger *)parEndPtr
|
||||
contentsEnd: (NSUInteger *)contentsEndPtr
|
||||
forRange: (NSRange)range
|
||||
{
|
||||
// FIXME
|
||||
}
|
||||
|
||||
// Changing Case
|
||||
|
||||
/**
|
||||
|
@ -2782,6 +2845,16 @@ handle_printf_atsign (FILE *stream,
|
|||
return atoi([self lossyCString]);
|
||||
}
|
||||
|
||||
- (NSInteger) integerValue
|
||||
{
|
||||
return atol([self lossyCString]);
|
||||
}
|
||||
|
||||
- (long long) longLongValue
|
||||
{
|
||||
return atoll([self lossyCString]);
|
||||
}
|
||||
|
||||
// Working With Encodings
|
||||
|
||||
/**
|
||||
|
@ -3146,6 +3219,11 @@ static NSFileManager *fm = nil;
|
|||
return [self substringWithRange: ((NSRange){i, l-i})];
|
||||
}
|
||||
|
||||
- (NSRange) paragraphRangeForRange: (NSRange)range
|
||||
{
|
||||
return NSMakeRange(0, 0); // FIXME
|
||||
}
|
||||
|
||||
- (NSString*) pathExtension
|
||||
{
|
||||
NSRange range;
|
||||
|
|
|
@ -116,6 +116,9 @@
|
|||
#include "nstzfile.h"
|
||||
#endif
|
||||
|
||||
NSString * const NSSystemTimeZoneDidChangeNotification
|
||||
= @"NSSystemTimeZoneDidChangeNotification";
|
||||
|
||||
/* Key for local time zone in user defaults. */
|
||||
#define LOCALDBKEY @"Local Time Zone"
|
||||
|
||||
|
@ -1312,6 +1315,9 @@ static NSMapTable *absolutes = 0;
|
|||
{
|
||||
[zone_mutex unlock];
|
||||
}
|
||||
[[NSNotificationCenter defaultCenter]
|
||||
postNotificationName: NSSystemTimeZoneDidChangeNotification
|
||||
object: nil];
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1934,6 +1940,32 @@ static NSMapTable *absolutes = 0;
|
|||
return [self name];
|
||||
}
|
||||
|
||||
- (NSTimeInterval) daylightSavingTimeOffsetForDate: (NSDate *)aDate
|
||||
{
|
||||
return 0.0; // FIXME
|
||||
}
|
||||
|
||||
- (NSDate *) nextDaylightSavingTimeTransitionAfterDate: (NSDate *)aDate
|
||||
{
|
||||
return nil; // FIXME;
|
||||
}
|
||||
|
||||
- (NSTimeInterval) daylightSavingTimeOffset
|
||||
{
|
||||
return 0.0; // FIXME
|
||||
}
|
||||
|
||||
- (NSDate *) nextDaylightSavingTimeTransition
|
||||
{
|
||||
return nil; // FIXME;
|
||||
}
|
||||
|
||||
- (NSString *)localizedName: (NSTimeZoneNameStyle)style
|
||||
locale: (NSLocale *)locale
|
||||
{
|
||||
return nil; // FIXME;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
/**
|
||||
|
|
|
@ -197,7 +197,7 @@ NSString *NSLanguageName = @"NSLanguageName";
|
|||
NSString *NSFormalName = @"NSFormalName";
|
||||
|
||||
/* For GNUstep */
|
||||
NSString *NSLocale = @"NSLocale";
|
||||
NSString *GSLocale = @"GSLocale";
|
||||
|
||||
|
||||
/*
|
||||
|
@ -278,7 +278,7 @@ GSPrivateBuildStrings()
|
|||
GS_REPLACE_CONSTANT_STRING(NSLanguageName);
|
||||
GS_REPLACE_CONSTANT_STRING(NSLaterTimeDesignations);
|
||||
GS_REPLACE_CONSTANT_STRING(NSLoadedClasses);
|
||||
GS_REPLACE_CONSTANT_STRING(NSLocale);
|
||||
GS_REPLACE_CONSTANT_STRING(GSLocale);
|
||||
GS_REPLACE_CONSTANT_STRING(NSLocalNotificationCenterType);
|
||||
GS_REPLACE_CONSTANT_STRING(NSMonthNameArray);
|
||||
GS_REPLACE_CONSTANT_STRING(NSNegativeCurrencyFormatString);
|
||||
|
|
3
configure
vendored
3
configure
vendored
|
@ -12255,6 +12255,9 @@ _ACEOF
|
|||
fi
|
||||
fi
|
||||
|
||||
if test x"$objc_threaded" = x"-pthread"; then
|
||||
LIBS="$LIBS -lpthread"
|
||||
fi
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
# This function needed by StdioStream.m
|
||||
|
|
|
@ -1449,6 +1449,9 @@ if test $ac_cv_header_pthread_h = yes ; then
|
|||
fi
|
||||
fi
|
||||
AC_SUBST(HAVE_PTHREAD_H)
|
||||
if test x"$objc_threaded" = x"-pthread"; then
|
||||
LIBS="$LIBS -lpthread"
|
||||
fi
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
# This function needed by StdioStream.m
|
||||
|
|
Loading…
Reference in a new issue