mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 00:41:02 +00:00
A few string methods and OSX version compatibility tweaks.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@36781 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
6f9ad53449
commit
19bec3c0c9
57 changed files with 433 additions and 144 deletions
62
ChangeLog
62
ChangeLog
|
@ -1,3 +1,65 @@
|
|||
2013-07-01 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* configure.ac: Add test for another libicu header
|
||||
* configure: regenerate
|
||||
* Headers/GNUstepBase/config.h.in: regenerate
|
||||
* Source/NSString.m: Add decompose/precompose methods derived from
|
||||
change in testplant branch.
|
||||
* Headers/GNUstepBase/GSVersionMacros.h: OSX compatibility tweak ...
|
||||
handle OSX style 4 digit versionn constants.
|
||||
* Headers/Foundation/NSArray.h:
|
||||
* Headers/Foundation/NSAutoreleasePool.h:
|
||||
* Headers/Foundation/NSBundle.h:
|
||||
* Headers/Foundation/NSCoder.h:
|
||||
* Headers/Foundation/NSComparisonPredicate.h:
|
||||
* Headers/Foundation/NSCompoundPredicate.h:
|
||||
* Headers/Foundation/NSConnection.h:
|
||||
* Headers/Foundation/NSData.h:
|
||||
* Headers/Foundation/NSDate.h:
|
||||
* Headers/Foundation/NSDictionary.h:
|
||||
* Headers/Foundation/NSError.h:
|
||||
* Headers/Foundation/NSException.h:
|
||||
* Headers/Foundation/NSExpression.h:
|
||||
* Headers/Foundation/NSHTTPCookie.h:
|
||||
* Headers/Foundation/NSHTTPCookieStorage.h:
|
||||
* Headers/Foundation/NSIndexPath.h:
|
||||
* Headers/Foundation/NSIndexSet.h:
|
||||
* Headers/Foundation/NSKeyValueObserving.h:
|
||||
* Headers/Foundation/NSLock.h:
|
||||
* Headers/Foundation/NSNetServices.h:
|
||||
* Headers/Foundation/NSObjCRuntime.h:
|
||||
* Headers/Foundation/NSOperation.h:
|
||||
* Headers/Foundation/NSPathUtilities.h:
|
||||
* Headers/Foundation/NSPointerArray.h:
|
||||
* Headers/Foundation/NSPointerFunctions.h:
|
||||
* Headers/Foundation/NSPredicate.h:
|
||||
* Headers/Foundation/NSProcessInfo.h:
|
||||
* Headers/Foundation/NSPropertyList.h:
|
||||
* Headers/Foundation/NSScanner.h:
|
||||
* Headers/Foundation/NSSet.h:
|
||||
* Headers/Foundation/NSSortDescriptor.h:
|
||||
* Headers/Foundation/NSSpellServer.h:
|
||||
* Headers/Foundation/NSStream.h:
|
||||
* Headers/Foundation/NSString.h:
|
||||
* Headers/Foundation/NSTimeZone.h:
|
||||
* Headers/Foundation/NSTimer.h:
|
||||
* Headers/Foundation/NSURL.h:
|
||||
* Headers/Foundation/NSURLAuthenticationChallenge.h:
|
||||
* Headers/Foundation/NSURLCache.h:
|
||||
* Headers/Foundation/NSURLConnection.h:
|
||||
* Headers/Foundation/NSURLCredential.h:
|
||||
* Headers/Foundation/NSURLCredentialStorage.h:
|
||||
* Headers/Foundation/NSURLDownload.h:
|
||||
* Headers/Foundation/NSURLError.h:
|
||||
* Headers/Foundation/NSURLProtectionSpace.h:
|
||||
* Headers/Foundation/NSURLProtocol.h:
|
||||
* Headers/Foundation/NSURLRequest.h:
|
||||
* Headers/Foundation/NSURLResponse.h:
|
||||
* Headers/Foundation/NSValueTransformer.h:
|
||||
* Headers/Foundation/NSXMLElement.h:
|
||||
* Headers/Foundation/NSXMLParser.h:
|
||||
Replace numeric version constants with OSX compatibility macros.
|
||||
|
||||
2013-06-27 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSConcreteMapTable.m: attempt to fix double retain bug
|
||||
|
|
|
@ -39,7 +39,7 @@ extern "C" {
|
|||
@class NSURL;
|
||||
@class NSIndexSet;
|
||||
|
||||
#if OS_API_VERSION(100600, GS_API_LATEST)
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_6, GS_API_LATEST)
|
||||
enum
|
||||
{
|
||||
NSBinarySearchingFirstEqual = (1UL << 8), /** Specifies that the binary
|
||||
|
@ -112,7 +112,7 @@ typedef NSUInteger NSBinarySearchingOptions;
|
|||
*/
|
||||
- (id) objectAtIndex: (NSUInteger)index;
|
||||
|
||||
#if OS_API_VERSION(100400, GS_API_LATEST)
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_4, GS_API_LATEST)
|
||||
- (NSArray *) objectsAtIndexes: (NSIndexSet *)indexes;
|
||||
#endif
|
||||
|
||||
|
@ -154,7 +154,7 @@ typedef NSUInteger NSBinarySearchingOptions;
|
|||
- (id) valueForKey: (NSString*)key;
|
||||
#endif
|
||||
|
||||
#if OS_API_VERSION(100600, GS_API_LATEST)
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_6, GS_API_LATEST)
|
||||
|
||||
DEFINE_BLOCK_TYPE(GSEnumeratorBlock, void, id, NSUInteger, BOOL*);
|
||||
DEFINE_BLOCK_TYPE(GSPredicateBlock, BOOL, id, NSUInteger, BOOL*);
|
||||
|
@ -314,7 +314,7 @@ DEFINE_BLOCK_TYPE(GSPredicateBlock, BOOL, id, NSUInteger, BOOL*);
|
|||
* The object is retained by the array.
|
||||
*/
|
||||
- (void) insertObject: (id)anObject atIndex: (NSUInteger)index;
|
||||
#if OS_API_VERSION(100400, GS_API_LATEST)
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_4, GS_API_LATEST)
|
||||
- (void) insertObjects: (NSArray *)objects atIndexes: (NSIndexSet *)indexes;
|
||||
#endif
|
||||
|
||||
|
@ -335,7 +335,7 @@ DEFINE_BLOCK_TYPE(GSPredicateBlock, BOOL, id, NSUInteger, BOOL*);
|
|||
- (void) replaceObjectAtIndex: (NSUInteger)index
|
||||
withObject: (id)anObject;
|
||||
|
||||
#if OS_API_VERSION(100400, GS_API_LATEST)
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_4, GS_API_LATEST)
|
||||
- (void) replaceObjectsAtIndexes: (NSIndexSet *)indexes
|
||||
withObjects: (NSArray *)objects;
|
||||
#endif
|
||||
|
@ -365,7 +365,7 @@ DEFINE_BLOCK_TYPE(GSPredicateBlock, BOOL, id, NSUInteger, BOOL*);
|
|||
- (void) sortUsingSelector: (SEL)comparator;
|
||||
|
||||
|
||||
#if OS_API_VERSION(100600, GS_API_LATEST)
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_6, GS_API_LATEST)
|
||||
/**
|
||||
* Sorts the array using the specified comparator block.
|
||||
*/
|
||||
|
|
|
@ -231,7 +231,7 @@ NS_AUTOMATED_REFCOUNT_UNAVAILABLE
|
|||
*/
|
||||
- (id) autorelease;
|
||||
|
||||
#if OS_API_VERSION(100400, GS_API_LATEST)
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_4, GS_API_LATEST)
|
||||
/**
|
||||
* Intended to trigger a garbage collection run (if needed) when called in
|
||||
* a garbage collected environment.<br />
|
||||
|
|
|
@ -42,7 +42,7 @@ extern "C" {
|
|||
@class NSMutableArray;
|
||||
@class NSMutableDictionary;
|
||||
|
||||
#if OS_API_VERSION(100500,GS_API_LATEST)
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_5,GS_API_LATEST)
|
||||
enum {
|
||||
NSBundleExecutableArchitectureI386 = 0x00000007,
|
||||
NSBundleExecutableArchitecturePPC = 0x00000012,
|
||||
|
@ -184,7 +184,7 @@ GS_EXPORT NSString* const NSLoadedClasses;
|
|||
* not readable, return nil. If you want the main bundle of an
|
||||
* application or a tool, it's better if you use +mainBundle. */
|
||||
+ (NSBundle*) bundleWithPath: (NSString*)path;
|
||||
#if OS_API_VERSION(100600,GS_API_LATEST)
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_6,GS_API_LATEST)
|
||||
+ (NSBundle*) bundleWithURL: (NSURL*)url;
|
||||
#endif
|
||||
|
||||
|
@ -207,7 +207,7 @@ GS_EXPORT NSString* const NSLoadedClasses;
|
|||
inDirectory: (NSString*)bundlePath
|
||||
withVersion: (int)version;
|
||||
|
||||
#if OS_API_VERSION(100600,GS_API_LATEST)
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_6,GS_API_LATEST)
|
||||
+ (NSURL*) URLForResource: (NSString*)name
|
||||
withExtension: (NSString*)extension
|
||||
subdirectory: (NSString*)subpath
|
||||
|
@ -236,7 +236,7 @@ GS_EXPORT NSString* const NSLoadedClasses;
|
|||
*/
|
||||
- (id) initWithPath: (NSString*)path;
|
||||
|
||||
#if OS_API_VERSION(100600,GS_API_LATEST)
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_6,GS_API_LATEST)
|
||||
- (id) initWithURL: (NSURL*)url;
|
||||
#endif
|
||||
|
||||
|
@ -313,7 +313,7 @@ GS_EXPORT NSString* const NSLoadedClasses;
|
|||
- (NSString*) pathForResource: (NSString*)name
|
||||
ofType: (NSString*)extension;
|
||||
|
||||
#if OS_API_VERSION(100600,GS_API_LATEST)
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_6,GS_API_LATEST)
|
||||
- (NSURL*) URLForResource: (NSString*)name
|
||||
withExtension: (NSString*)extension;
|
||||
- (NSURL*) URLForResource: (NSString*)name
|
||||
|
@ -369,7 +369,7 @@ GS_EXPORT NSString* const NSLoadedClasses;
|
|||
+ (NSArray *) preferredLocalizationsFromArray: (NSArray *)localizationsArray
|
||||
forPreferences: (NSArray *)preferencesArray;
|
||||
|
||||
#if OS_API_VERSION(100200,GS_API_LATEST)
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_2,GS_API_LATEST)
|
||||
/**
|
||||
* Returns a boolean indicating whether code for the bundle has been loaded.
|
||||
*/
|
||||
|
@ -400,7 +400,7 @@ GS_EXPORT NSString* const NSLoadedClasses;
|
|||
/** Returns the info property list associated with the bundle. */
|
||||
- (NSDictionary*) infoDictionary;
|
||||
|
||||
#if OS_API_VERSION(100200,GS_API_LATEST)
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_2,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.
|
||||
|
@ -432,7 +432,7 @@ GS_EXPORT NSString* const NSLoadedClasses;
|
|||
*/
|
||||
- (BOOL) load;
|
||||
|
||||
#if OS_API_VERSION(100200,GS_API_LATEST)
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_2,GS_API_LATEST)
|
||||
/** * Not implemented
|
||||
*/
|
||||
- (BOOL) unload;
|
||||
|
@ -442,7 +442,7 @@ GS_EXPORT NSString* const NSLoadedClasses;
|
|||
- (NSString *) executablePath;
|
||||
#endif
|
||||
|
||||
#if OS_API_VERSION(100500,GS_API_LATEST)
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_5,GS_API_LATEST)
|
||||
/** Not implemented */
|
||||
- (NSArray *) executableArchitectures;
|
||||
/** Not implemented */
|
||||
|
|
|
@ -353,7 +353,7 @@ extern "C" {
|
|||
- (void) encodeObject: (id)anObject forKey: (NSString*)aKey;
|
||||
#endif
|
||||
|
||||
#if OS_API_VERSION(100500, GS_API_LATEST)
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_5, GS_API_LATEST)
|
||||
/** <override-subclass />
|
||||
* Encodes an NSInteger and associates the encoded value with key.
|
||||
*/
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#define __NSComparisonPredicate_h_GNUSTEP_BASE_INCLUDE
|
||||
#import <GNUstepBase/GSVersionMacros.h>
|
||||
|
||||
#if OS_API_VERSION(100400, GS_API_LATEST)
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_4, GS_API_LATEST)
|
||||
|
||||
#import <Foundation/NSExpression.h>
|
||||
#import <Foundation/NSPredicate.h>
|
||||
|
@ -62,7 +62,7 @@ typedef enum _NSPredicateOperatorType
|
|||
NSEndsWithPredicateOperatorType,
|
||||
NSInPredicateOperatorType,
|
||||
NSCustomSelectorPredicateOperatorType
|
||||
#if OS_API_VERSION(100500,GS_API_LATEST)
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_5,GS_API_LATEST)
|
||||
,
|
||||
NSContainsPredicateOperatorType = 99,
|
||||
NSBetweenPredicateOperatorType
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#define __NSCompoundPredicate_h_GNUSTEP_BASE_INCLUDE
|
||||
#import <GNUstepBase/GSVersionMacros.h>
|
||||
|
||||
#if OS_API_VERSION(100400, GS_API_LATEST)
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_4, GS_API_LATEST)
|
||||
|
||||
#import <Foundation/NSPredicate.h>
|
||||
|
||||
|
|
|
@ -119,7 +119,7 @@ GS_NSConnection_IVARS;
|
|||
+ (NSDistantObject*) rootProxyForConnectionWithRegisteredName: (NSString*)n
|
||||
host: (NSString*)h usingNameServer: (NSPortNameServer*)s;
|
||||
|
||||
#if OS_API_VERSION(100500,GS_API_LATEST)
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_5,GS_API_LATEST)
|
||||
+ (id) serviceConnectionWithName: (NSString *)name
|
||||
rootObject: (id)root;
|
||||
+ (id) serviceConnectionWithName: (NSString *)name
|
||||
|
|
|
@ -39,7 +39,7 @@ extern "C" {
|
|||
@class NSURL;
|
||||
#endif
|
||||
|
||||
#if OS_API_VERSION(100400,GS_API_LATEST)
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_4,GS_API_LATEST)
|
||||
enum {
|
||||
NSMappedRead = 1,
|
||||
NSUncachedRead = 2
|
||||
|
@ -141,7 +141,7 @@ enum {
|
|||
count: (unsigned int)numInts
|
||||
atIndex: (unsigned int)index;
|
||||
|
||||
#if OS_API_VERSION(100400,GS_API_LATEST)
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_4,GS_API_LATEST)
|
||||
/**
|
||||
* <p>Writes a copy of the data encapsulated by the receiver to a file
|
||||
* at path. If the NSAtomicWrite option is set, this writes to a
|
||||
|
|
|
@ -106,7 +106,7 @@ GS_EXPORT const NSTimeInterval NSTimeIntervalSince1970;
|
|||
- (BOOL) isEqualToDate: (NSDate*)other;
|
||||
- (NSDate*) laterDate: (NSDate*)otherDate;
|
||||
|
||||
#if OS_API_VERSION(100600,GS_API_LATEST)
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_6,GS_API_LATEST)
|
||||
/**
|
||||
* Returns an autoreleased NSDate instance whose value is offset from
|
||||
* that of the receiver by the specified interval.
|
||||
|
|
|
@ -59,7 +59,7 @@ extern "C" {
|
|||
- (NSString*) descriptionWithLocale: (id)locale
|
||||
indent: (NSUInteger)level;
|
||||
|
||||
#if OS_API_VERSION(100600, GS_API_LATEST)
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_6, GS_API_LATEST)
|
||||
DEFINE_BLOCK_TYPE(GSKeysAndObjectsEnumeratorBlock, void, id, id, BOOL*);
|
||||
- (void) enumerateKeysAndObjectsUsingBlock:
|
||||
(GSKeysAndObjectsEnumeratorBlock)aBlock;
|
||||
|
@ -87,7 +87,7 @@ DEFINE_BLOCK_TYPE(GSKeysAndObjectsEnumeratorBlock, void, id, id, BOOL*);
|
|||
|
||||
- (NSEnumerator*) keyEnumerator; // Primitive
|
||||
|
||||
#if OS_API_VERSION(100600, GS_API_LATEST)
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_6, GS_API_LATEST)
|
||||
DEFINE_BLOCK_TYPE(GSKeysAndObjectsPredicateBlock, BOOL, id, id, BOOL*);
|
||||
- (NSSet*) keysOfEntriesPassingTest: (GSKeysAndObjectsPredicateBlock)aPredicate;
|
||||
- (NSSet*) keysOfEntriesWithOptions: (NSEnumerationOptions)opts
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
|
||||
#import <Foundation/NSObject.h>
|
||||
|
||||
#if OS_API_VERSION(100300,GS_API_LATEST)
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_3,GS_API_LATEST)
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
|
@ -50,7 +50,7 @@ GS_EXPORT NSString* const NSLocalizedDescriptionKey;
|
|||
*/
|
||||
GS_EXPORT NSString* const NSUnderlyingErrorKey;
|
||||
|
||||
#if OS_API_VERSION(100400,GS_API_LATEST)
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_4,GS_API_LATEST)
|
||||
/**
|
||||
* This key can be used to store the file path of a resource involved
|
||||
* in the error (eg unreadable file).
|
||||
|
@ -98,7 +98,7 @@ GS_EXPORT NSString* const NSOSStatusErrorDomain;
|
|||
* Domain for system and system library errors.
|
||||
*/
|
||||
GS_EXPORT NSString* const NSPOSIXErrorDomain;
|
||||
#if OS_API_VERSION(100400,GS_API_LATEST)
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_4,GS_API_LATEST)
|
||||
/**
|
||||
* Domain for Foundation and AppKit (base and gui) errors.
|
||||
*/
|
||||
|
@ -167,7 +167,7 @@ GS_EXPORT NSString* const NSCocoaErrorDomain;
|
|||
*/
|
||||
- (NSString *) localizedDescription;
|
||||
|
||||
#if OS_API_VERSION(100400,GS_API_LATEST)
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_4,GS_API_LATEST)
|
||||
/**
|
||||
* Return a human readable explanation of the reason for the error
|
||||
* (if known). This should normally be a more discursive explanation
|
||||
|
|
|
@ -136,7 +136,7 @@ extern "C" {
|
|||
format: (NSString*)format
|
||||
arguments: (va_list)argList;
|
||||
|
||||
#if OS_API_VERSION(100500,GS_API_LATEST) && GS_API_VERSION( 11501,GS_API_LATEST)
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_5,GS_API_LATEST) && GS_API_VERSION( 11501,GS_API_LATEST)
|
||||
/** Returns an array of the call stack return addresses at the point when
|
||||
* the exception was raised. Re-raising the exception does not change
|
||||
* this value.
|
||||
|
@ -144,7 +144,7 @@ extern "C" {
|
|||
- (NSArray*) callStackReturnAddresses;
|
||||
#endif
|
||||
|
||||
#if OS_API_VERSION(100600,GS_API_LATEST) && GS_API_VERSION( 11903,GS_API_LATEST)
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_6,GS_API_LATEST) && GS_API_VERSION( 11903,GS_API_LATEST)
|
||||
/**
|
||||
* Returns an array of the symbolic names of the call stack return addresses.
|
||||
* Note that, on some platforms, symbols are only exported in
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#define __NSExpression_h_GNUSTEP_BASE_INCLUDE
|
||||
#import <GNUstepBase/GSVersionMacros.h>
|
||||
|
||||
#if OS_API_VERSION(100400, GS_API_LATEST)
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_4, GS_API_LATEST)
|
||||
|
||||
#import <Foundation/NSObject.h>
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#define __NSHTTPCookie_h_GNUSTEP_BASE_INCLUDE
|
||||
#import <GNUstepBase/GSVersionMacros.h>
|
||||
|
||||
#if OS_API_VERSION(100200,GS_API_LATEST) && GS_API_VERSION( 11300,GS_API_LATEST)
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_2,GS_API_LATEST) && GS_API_VERSION( 11300,GS_API_LATEST)
|
||||
|
||||
#import <Foundation/NSObject.h>
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#define __NSHTTPCookieStorage_h_GNUSTEP_BASE_INCLUDE
|
||||
#import <GNUstepBase/GSVersionMacros.h>
|
||||
|
||||
#if OS_API_VERSION(100200,GS_API_LATEST) && GS_API_VERSION( 11300,GS_API_LATEST)
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_2,GS_API_LATEST) && GS_API_VERSION( 11300,GS_API_LATEST)
|
||||
|
||||
#import <Foundation/NSObject.h>
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if OS_API_VERSION(100400,GS_API_LATEST) && GS_API_VERSION( 10200,GS_API_LATEST)
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_4,GS_API_LATEST) && GS_API_VERSION( 10200,GS_API_LATEST)
|
||||
|
||||
/**
|
||||
* Instances of this class represent a series of indexes into a hierarchy
|
||||
|
|
|
@ -90,14 +90,14 @@ extern "C" {
|
|||
*/
|
||||
- (NSUInteger) count;
|
||||
|
||||
#if OS_API_VERSION(100500,GS_API_LATEST)
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_5,GS_API_LATEST)
|
||||
/** Not implemented
|
||||
* Returns the number of indexes set within the specified range.
|
||||
*/
|
||||
- (NSUInteger) countOfIndexesInRange: (NSRange)range;
|
||||
#endif
|
||||
|
||||
#if OS_API_VERSION(100600,GS_API_LATEST)
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_6,GS_API_LATEST)
|
||||
DEFINE_BLOCK_TYPE(GSIndexSetEnumerationBlock, void, NSUInteger, BOOL*);
|
||||
- (void)enumerateIndexesInRange: (NSRange)range
|
||||
options: (NSEnumerationOptions)opts
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#define __NSKeyValueObserving_h_GNUSTEP_BASE_INCLUDE
|
||||
#import <GNUstepBase/GSVersionMacros.h>
|
||||
|
||||
#if OS_API_VERSION(100300,GS_API_LATEST) && GS_API_VERSION( 10200,GS_API_LATEST)
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_3,GS_API_LATEST) && GS_API_VERSION( 10200,GS_API_LATEST)
|
||||
|
||||
#import <Foundation/NSObject.h>
|
||||
#import <Foundation/NSArray.h>
|
||||
|
@ -42,7 +42,7 @@ extern "C" {
|
|||
enum {
|
||||
NSKeyValueObservingOptionNew = 1,
|
||||
NSKeyValueObservingOptionOld = 2
|
||||
#if OS_API_VERSION(100500,GS_API_LATEST)
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_5,GS_API_LATEST)
|
||||
, NSKeyValueObservingOptionInitial = 4,
|
||||
NSKeyValueObservingOptionPrior = 8
|
||||
#endif
|
||||
|
@ -69,7 +69,7 @@ GS_EXPORT NSString *const NSKeyValueChangeIndexesKey;
|
|||
GS_EXPORT NSString *const NSKeyValueChangeKindKey;
|
||||
GS_EXPORT NSString *const NSKeyValueChangeNewKey;
|
||||
GS_EXPORT NSString *const NSKeyValueChangeOldKey;
|
||||
#if OS_API_VERSION(100500,GS_API_LATEST)
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_5,GS_API_LATEST)
|
||||
GS_EXPORT NSString *const NSKeyValueChangeNotificationIsPriorKey;
|
||||
#endif
|
||||
|
||||
|
@ -180,7 +180,7 @@ GS_EXPORT NSString *const NSKeyValueChangeNotificationIsPriorKey;
|
|||
valuesAtIndexes: (NSIndexSet*)indexes
|
||||
forKey: (NSString*)aKey;
|
||||
|
||||
#if OS_API_VERSION(100400,GS_API_LATEST)
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_4,GS_API_LATEST)
|
||||
|
||||
/** <override-dummy />
|
||||
*/
|
||||
|
|
|
@ -98,7 +98,7 @@ extern "C" {
|
|||
*/
|
||||
- (void) unlock;
|
||||
|
||||
#if OS_API_VERSION(100500,GS_API_LATEST)
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_5,GS_API_LATEST)
|
||||
/** Return the name of the receiver or nil of none has been set.
|
||||
*/
|
||||
- (NSString*) name;
|
||||
|
@ -236,7 +236,7 @@ extern "C" {
|
|||
*/
|
||||
- (void) unlock;
|
||||
|
||||
#if OS_API_VERSION(100500,GS_API_LATEST)
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_5,GS_API_LATEST)
|
||||
/** Return the name of the receiver or nil of none has been set.
|
||||
*/
|
||||
- (NSString*) name;
|
||||
|
@ -286,7 +286,7 @@ extern "C" {
|
|||
*/
|
||||
- (void) unlock;
|
||||
|
||||
#if OS_API_VERSION(100500,GS_API_LATEST)
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_5,GS_API_LATEST)
|
||||
/** Return the name of the receiver or nil of none has been set.
|
||||
*/
|
||||
- (NSString*) name;
|
||||
|
|
|
@ -362,7 +362,7 @@ GS_EXPORT NSString * const NSNetServicesErrorDomain;
|
|||
- (void) scheduleInRunLoop: (NSRunLoop *) aRunLoop
|
||||
forMode: (NSString *) mode;
|
||||
|
||||
#if OS_API_VERSION(100500,GS_API_LATEST)
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_5,GS_API_LATEST)
|
||||
- (NSInteger) port;
|
||||
|
||||
- (void) publishWithOptions: (NSNetServiceOptions)options;
|
||||
|
|
|
@ -117,7 +117,7 @@ typedef NSUInteger NSSortOptions;
|
|||
|
||||
#import <GNUstepBase/GSObjCRuntime.h>
|
||||
|
||||
#if OS_API_VERSION(100500,GS_API_LATEST)
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_5,GS_API_LATEST)
|
||||
GS_EXPORT NSString *NSStringFromProtocol(Protocol *aProtocol);
|
||||
GS_EXPORT Protocol *NSProtocolFromString(NSString *aProtocolName);
|
||||
#endif
|
||||
|
|
|
@ -28,13 +28,13 @@
|
|||
#define __NSOperation_h_GNUSTEP_BASE_INCLUDE
|
||||
|
||||
#import <Foundation/NSObject.h>
|
||||
#if OS_API_VERSION(100500, GS_API_LATEST)
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_5, GS_API_LATEST)
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if OS_API_VERSION(100600, GS_API_LATEST)
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_6, GS_API_LATEST)
|
||||
#import <GNUstepBase/GSBlocks.h>
|
||||
DEFINE_BLOCK_TYPE_NO_ARGS(GSOperationCompletionBlock, void);
|
||||
#endif
|
||||
|
@ -82,7 +82,7 @@ typedef NSInteger NSOperationQueuePriority;
|
|||
*/
|
||||
- (void) cancel;
|
||||
|
||||
#if OS_API_VERSION(100600, GS_API_LATEST)
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_6, GS_API_LATEST)
|
||||
/**
|
||||
* Returns the block that will be executed after the operation finishes.
|
||||
*/
|
||||
|
@ -147,7 +147,7 @@ typedef NSInteger NSOperationQueuePriority;
|
|||
*/
|
||||
- (void) removeDependency: (NSOperation *)op;
|
||||
|
||||
#if OS_API_VERSION(100600, GS_API_LATEST)
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_6, GS_API_LATEST)
|
||||
/**
|
||||
* Sets the block that will be executed when the operation has finished.
|
||||
*/
|
||||
|
@ -160,7 +160,7 @@ typedef NSInteger NSOperationQueuePriority;
|
|||
*/
|
||||
- (void) setQueuePriority: (NSOperationQueuePriority)priority;
|
||||
|
||||
#if OS_API_VERSION(100600, GS_API_LATEST)
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_6, GS_API_LATEST)
|
||||
/** Sets the thread priority to be used while executing then -main method.
|
||||
* The priority change is implemented in the -start method, so if you are
|
||||
* replacing -start you are responsible for managing this.<br />
|
||||
|
@ -184,7 +184,7 @@ typedef NSInteger NSOperationQueuePriority;
|
|||
*/
|
||||
- (void) start;
|
||||
|
||||
#if OS_API_VERSION(100600, GS_API_LATEST)
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_6, GS_API_LATEST)
|
||||
/** Returns the thread priority to be used executing the -main method.
|
||||
* The default is 0.5
|
||||
*/
|
||||
|
@ -219,7 +219,7 @@ enum {
|
|||
@private id _internal;
|
||||
#endif
|
||||
}
|
||||
#if OS_API_VERSION(100600, GS_API_LATEST)
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_6, GS_API_LATEST)
|
||||
/** If called from within the -main method of an operation which is
|
||||
* currently being executed by a queue, this returns the queue instance
|
||||
* in use.
|
||||
|
@ -235,7 +235,7 @@ enum {
|
|||
*/
|
||||
- (void) addOperation: (NSOperation *)op;
|
||||
|
||||
#if OS_API_VERSION(100600, GS_API_LATEST)
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_6, GS_API_LATEST)
|
||||
/** Adds multiple operations to the receiver and (optionally) waits for
|
||||
* all the operations in the queue to finish.
|
||||
*/
|
||||
|
@ -257,7 +257,7 @@ enum {
|
|||
*/
|
||||
- (NSInteger) maxConcurrentOperationCount;
|
||||
|
||||
#if OS_API_VERSION(100600, GS_API_LATEST)
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_6, GS_API_LATEST)
|
||||
/** Return the name of this operation queue.
|
||||
*/
|
||||
- (NSString*) name;
|
||||
|
@ -278,7 +278,7 @@ enum {
|
|||
*/
|
||||
- (void) setMaxConcurrentOperationCount: (NSInteger)cnt;
|
||||
|
||||
#if OS_API_VERSION(100600, GS_API_LATEST)
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_6, GS_API_LATEST)
|
||||
/** Sets the name for this operation queue.
|
||||
*/
|
||||
- (void) setName: (NSString*)s;
|
||||
|
|
|
@ -116,18 +116,18 @@ enum
|
|||
NSDeveloperDirectory, /** Developer */
|
||||
NSUserDirectory, /** user home directories */
|
||||
NSDocumentationDirectory, /** Documentation */
|
||||
#if OS_API_VERSION(100200, GS_API_LATEST)
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_2, GS_API_LATEST)
|
||||
NSDocumentDirectory, /** Documents */
|
||||
#endif
|
||||
#if OS_API_VERSION(100300, GS_API_LATEST)
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_3, GS_API_LATEST)
|
||||
NSCoreServicesDirectory, /** CoreServices */
|
||||
#endif
|
||||
#if OS_API_VERSION(100400, GS_API_LATEST)
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_4, GS_API_LATEST)
|
||||
NSDesktopDirectory = 12, /** location of users desktop */
|
||||
NSCachesDirectory = 13, /** location of users cache files */
|
||||
NSApplicationSupportDirectory = 14, /** location of app support files */
|
||||
#endif
|
||||
#if OS_API_VERSION(100500, GS_API_LATEST)
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_5, GS_API_LATEST)
|
||||
NSDownloadsDirectory = 15, /** location of downloaded files */
|
||||
#endif
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
#import <Foundation/NSArray.h>
|
||||
#import <Foundation/NSPointerFunctions.h>
|
||||
|
||||
#if OS_API_VERSION(100500, GS_API_LATEST)
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_5, GS_API_LATEST)
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
|
||||
#import <Foundation/NSObject.h>
|
||||
|
||||
#if OS_API_VERSION(100500, GS_API_LATEST)
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_5, GS_API_LATEST)
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
|
@ -154,5 +154,5 @@ typedef NSUInteger NSPointerFunctionsOptions;
|
|||
}
|
||||
#endif
|
||||
|
||||
#endif /* OS_API_VERSION(100500, GS_API_LATEST) */
|
||||
#endif /* OS_API_VERSION(MAC_OS_X_VERSION_10_5, GS_API_LATEST) */
|
||||
#endif /* __NSPointerFunctions_h_GNUSTEP_BASE_INCLUDE */
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#define __NSPredicate_h_GNUSTEP_BASE_INCLUDE
|
||||
#import <GNUstepBase/GSVersionMacros.h>
|
||||
|
||||
#if OS_API_VERSION(100400, GS_API_LATEST)
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_4, GS_API_LATEST)
|
||||
|
||||
#import <Foundation/NSObject.h>
|
||||
#import <Foundation/NSArray.h>
|
||||
|
|
|
@ -166,7 +166,7 @@ enum {
|
|||
* Returns a human readable version string for the current operating system
|
||||
* version.
|
||||
*/
|
||||
#if OS_API_VERSION(100200,GS_API_LATEST)
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_2,GS_API_LATEST)
|
||||
- (NSString *) operatingSystemVersionString;
|
||||
#endif
|
||||
|
||||
|
@ -189,7 +189,7 @@ enum {
|
|||
*/
|
||||
- (void) setProcessName: (NSString*)newName;
|
||||
|
||||
#if OS_API_VERSION(100500,GS_API_LATEST)
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_5,GS_API_LATEST)
|
||||
/** Not implemented */
|
||||
- (NSUInteger) processorCount;
|
||||
/** Not implemented */
|
||||
|
|
|
@ -65,7 +65,7 @@ enum {
|
|||
NSPropertyListGNUstepBinaryFormat
|
||||
};
|
||||
|
||||
#if OS_API_VERSION(100600,GS_API_LATEST)
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_6,GS_API_LATEST)
|
||||
typedef NSUInteger NSPropertyListWriteOptions;
|
||||
typedef NSUInteger NSPropertyListReadOptions;
|
||||
@class NSError;
|
||||
|
@ -261,7 +261,7 @@ typedef NSUInteger NSPropertyListFormat;
|
|||
format: (NSPropertyListFormat*)aFormat
|
||||
errorDescription: (NSString**)anErrorString;
|
||||
|
||||
#if OS_API_VERSION(100600,GS_API_LATEST)
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_6,GS_API_LATEST)
|
||||
+ (NSData *) dataWithPropertyList: (id)aPropertyList
|
||||
format: (NSPropertyListFormat)aFormat
|
||||
options: (NSPropertyListWriteOptions)anOption
|
||||
|
|
|
@ -110,7 +110,7 @@ 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)
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_5, GS_API_LATEST)
|
||||
/** Not implemented */
|
||||
- (BOOL) scanHexDouble: (double *)result;
|
||||
/** Not implemented */
|
||||
|
|
|
@ -80,7 +80,7 @@ extern "C" {
|
|||
- (id) member: (id)anObject;
|
||||
- (NSEnumerator*) objectEnumerator;
|
||||
|
||||
#if OS_API_VERSION(100600, GS_API_LATEST)
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_6, GS_API_LATEST)
|
||||
|
||||
DEFINE_BLOCK_TYPE(GSSetEnumeratorBlock, void, id, BOOL*);
|
||||
DEFINE_BLOCK_TYPE(GSSetFilterBlock, BOOL, id, BOOL*);
|
||||
|
@ -113,7 +113,7 @@ DEFINE_BLOCK_TYPE(GSSetFilterBlock, BOOL, id, BOOL*);
|
|||
|
||||
#endif
|
||||
|
||||
#if OS_API_VERSION(100500,GS_API_LATEST)
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_5,GS_API_LATEST)
|
||||
- (NSSet *) setByAddingObject: (id)anObject;
|
||||
- (NSSet *) setByAddingObjectsFromSet: (NSSet *)other;
|
||||
- (NSSet *) setByAddingObjectsFromArray: (NSArray *)other;
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#define __NSSortDescriptor_h_GNUSTEP_BASE_INCLUDE
|
||||
#import <GNUstepBase/GSVersionMacros.h>
|
||||
|
||||
#if OS_API_VERSION(100300,GS_API_LATEST)
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_3,GS_API_LATEST)
|
||||
|
||||
#import <Foundation/NSObject.h>
|
||||
#import <Foundation/NSArray.h>
|
||||
|
|
|
@ -47,7 +47,7 @@ extern "C" {
|
|||
@class NSMutableArray;
|
||||
@class NSMutableDictionary;
|
||||
|
||||
#if OS_API_VERSION(100500,GS_API_LATEST)
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_5,GS_API_LATEST)
|
||||
GS_EXPORT NSString *const NSGrammarCorrections;
|
||||
GS_EXPORT NSString *const NSGrammarRange;
|
||||
GS_EXPORT NSString *const NSGrammarUserDescription;
|
||||
|
@ -143,7 +143,7 @@ findMisspelledWordInString: (NSString *)stringToCheck
|
|||
didForgetWord: (NSString *)word
|
||||
inLanguage: (NSString *)language;
|
||||
|
||||
#if OS_API_VERSION(100300,GS_API_LATEST)
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_3,GS_API_LATEST)
|
||||
/** Not implemented */
|
||||
- (NSArray *) spellServer: (NSSpellServer *)sender
|
||||
suggestCompletionsForPartialWordRange: (NSRange)range
|
||||
|
@ -151,7 +151,7 @@ findMisspelledWordInString: (NSString *)stringToCheck
|
|||
language: (NSString *)language;
|
||||
#endif
|
||||
|
||||
#if OS_API_VERSION(100500,GS_API_LATEST)
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_5,GS_API_LATEST)
|
||||
/** Not implemented */
|
||||
- (NSRange) spellServer: (NSSpellServer *)sender
|
||||
checkGrammarInString: (NSString *)stringToCheck
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
#define __NSStream_h_GNUSTEP_BASE_INCLUDE
|
||||
#import <GNUstepBase/GSVersionMacros.h>
|
||||
|
||||
#if OS_API_VERSION(100400,GS_API_LATEST) && GS_API_VERSION( 10200,GS_API_LATEST)
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_4,GS_API_LATEST) && GS_API_VERSION( 10200,GS_API_LATEST)
|
||||
|
||||
#import <Foundation/NSObject.h>
|
||||
|
||||
|
|
|
@ -81,7 +81,7 @@ extern "C" {
|
|||
*/
|
||||
typedef uint16_t unichar;
|
||||
|
||||
#if OS_API_VERSION(100500,GS_API_LATEST)
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_5,GS_API_LATEST)
|
||||
#define NSMaximumStringLength (INT_MAX-1)
|
||||
#endif
|
||||
|
||||
|
@ -104,13 +104,13 @@ enum
|
|||
NSBackwardsSearch = 4,
|
||||
NSAnchoredSearch = 8,
|
||||
NSNumericSearch = 64 /* MacOS-X 10.2 */
|
||||
#if OS_API_VERSION(100500,GS_API_LATEST)
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_5,GS_API_LATEST)
|
||||
,
|
||||
NSDiacriticInsensitiveSearch = 128,
|
||||
NSWidthInsensitiveSearch = 256,
|
||||
NSForcedOrderingSearch = 512
|
||||
#endif
|
||||
#if OS_API_VERSION(100700,GS_API_LATEST)
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_7,GS_API_LATEST)
|
||||
,
|
||||
/**
|
||||
* Treats the search string as a regular expression. This option may be
|
||||
|
@ -196,7 +196,7 @@ typedef enum _NSStringEncoding
|
|||
NSBIG5StringEncoding, // Traditional chinese
|
||||
NSKoreanEUCStringEncoding // Korean
|
||||
|
||||
#if OS_API_VERSION(100400,GS_API_LATEST)
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_4,GS_API_LATEST)
|
||||
,
|
||||
NSUTF16BigEndianStringEncoding = 0x90000100,
|
||||
NSUTF16LittleEndianStringEncoding = 0x94000100,
|
||||
|
@ -210,7 +210,7 @@ enum {
|
|||
NSOpenStepUnicodeReservedBase = 0xF400
|
||||
};
|
||||
|
||||
#if OS_API_VERSION(100400,GS_API_LATEST)
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_4,GS_API_LATEST)
|
||||
enum {
|
||||
NSStringEncodingConversionAllowLossy = 1,
|
||||
NSStringEncodingConversionExternalRepresentation = 2
|
||||
|
@ -267,7 +267,7 @@ typedef NSUInteger NSStringEncodingConversionOptions;
|
|||
+ (id) string;
|
||||
+ (id) stringWithCharacters: (const unichar*)chars
|
||||
length: (NSUInteger)length;
|
||||
#if OS_API_VERSION(100400,GS_API_LATEST) && GS_API_VERSION( 10200,GS_API_LATEST)
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_4,GS_API_LATEST) && GS_API_VERSION( 10200,GS_API_LATEST)
|
||||
+ (id) stringWithCString: (const char*)byteString
|
||||
encoding: (NSStringEncoding)encoding;
|
||||
#endif
|
||||
|
@ -279,7 +279,7 @@ typedef NSUInteger NSStringEncodingConversionOptions;
|
|||
|
||||
// Initializing Newly Allocated Strings
|
||||
- (id) init;
|
||||
#if OS_API_VERSION(100400,GS_API_LATEST) && GS_API_VERSION( 10200,GS_API_LATEST)
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_4,GS_API_LATEST) && GS_API_VERSION( 10200,GS_API_LATEST)
|
||||
- (id) initWithBytes: (const void*)bytes
|
||||
length: (NSUInteger)length
|
||||
encoding: (NSStringEncoding)encoding;
|
||||
|
@ -288,7 +288,7 @@ typedef NSUInteger NSStringEncodingConversionOptions;
|
|||
encoding: (NSStringEncoding)encoding
|
||||
freeWhenDone: (BOOL)flag;
|
||||
#endif
|
||||
#if OS_API_VERSION(100400,GS_API_LATEST)
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_4,GS_API_LATEST)
|
||||
+ (id) stringWithContentsOfFile: (NSString*)path
|
||||
usedEncoding: (NSStringEncoding*)enc
|
||||
error: (NSError**)error;
|
||||
|
@ -322,7 +322,7 @@ typedef NSUInteger NSStringEncodingConversionOptions;
|
|||
encoding: (NSStringEncoding)enc
|
||||
error: (NSError**)error;
|
||||
#endif
|
||||
#if OS_API_VERSION(100500,GS_API_LATEST)
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_5,GS_API_LATEST)
|
||||
- (NSString*)stringByReplacingOccurrencesOfString: (NSString*)replace
|
||||
withString: (NSString*)by
|
||||
options: (NSStringCompareOptions)opts
|
||||
|
@ -386,8 +386,26 @@ typedef NSUInteger NSStringEncodingConversionOptions;
|
|||
// Determining Composed Character Sequences
|
||||
- (NSRange) rangeOfComposedCharacterSequenceAtIndex: (NSUInteger)anIndex;
|
||||
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_2,GS_API_LATEST)
|
||||
/** Returns a copy of the receiver normalised using the KD form.
|
||||
*/
|
||||
- (NSString *) decomposedStringWithCompatibilityMapping;
|
||||
|
||||
/** Returns a copy of the receiver normalised using the D form.
|
||||
*/
|
||||
- (NSString *) decomposedStringWithCanonicalMapping;
|
||||
|
||||
/** Returns a copy of the receiver normalised using the KC form.
|
||||
*/
|
||||
- (NSString *) precomposedStringWithCompatibilityMapping;
|
||||
|
||||
/** Returns a copy of the receiver normalised using the C form.
|
||||
*/
|
||||
- (NSString *) precomposedStringWithCanonicalMapping;
|
||||
#endif
|
||||
|
||||
// Converting String Contents into a Property List
|
||||
- (id)propertyList;
|
||||
- (id) propertyList;
|
||||
- (NSDictionary*) propertyListFromStringsFileFormat;
|
||||
|
||||
// Identifying and Comparing Strings
|
||||
|
@ -416,7 +434,7 @@ typedef NSUInteger NSStringEncodingConversionOptions;
|
|||
- (const char*) cString;
|
||||
#if OS_API_VERSION(GS_API_MACOSX, GS_API_LATEST)
|
||||
|
||||
#if OS_API_VERSION(100400,GS_API_LATEST) && GS_API_VERSION( 10200,GS_API_LATEST)
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_4,GS_API_LATEST) && GS_API_VERSION( 10200,GS_API_LATEST)
|
||||
- (const char*) cStringUsingEncoding: (NSStringEncoding)encoding;
|
||||
- (BOOL) getCString: (char*)buffer
|
||||
maxLength: (NSUInteger)maxLength
|
||||
|
@ -765,7 +783,7 @@ typedef NSUInteger NSStringEncodingConversionOptions;
|
|||
- (const char *)UTF8String;
|
||||
#endif
|
||||
|
||||
#if OS_API_VERSION(100300,GS_API_LATEST)
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_3,GS_API_LATEST)
|
||||
/** Not implemented */
|
||||
- (void) getParagraphStart: (NSUInteger *)startIndex
|
||||
end: (NSUInteger *)parEndIndex
|
||||
|
@ -775,7 +793,7 @@ typedef NSUInteger NSStringEncodingConversionOptions;
|
|||
- (NSRange) paragraphRangeForRange: (NSRange)range;
|
||||
#endif
|
||||
|
||||
#if OS_API_VERSION(100500,GS_API_LATEST)
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_5,GS_API_LATEST)
|
||||
/**
|
||||
* Returns YES when scanning the receiver's text from left to right
|
||||
* finds an initial digit in the range 1-9 or a letter in the set
|
||||
|
|
|
@ -35,7 +35,7 @@ extern "C" {
|
|||
@class NSLocale;
|
||||
@class NSString;
|
||||
|
||||
#if OS_API_VERSION(100500,GS_API_LATEST)
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_5,GS_API_LATEST)
|
||||
enum {
|
||||
NSTimeZoneNameStyleStandard,
|
||||
NSTimeZoneNameStyleShortStandard,
|
||||
|
@ -87,7 +87,7 @@ GS_EXPORT NSString * const NSSystemTimeZoneDidChangeNotification;
|
|||
- (NSInteger) secondsFromGMTForDate: (NSDate*)aDate;
|
||||
#endif
|
||||
|
||||
#if OS_API_VERSION(100500,GS_API_LATEST)
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_5,GS_API_LATEST)
|
||||
- (NSTimeInterval) daylightSavingTimeOffsetForDate: (NSDate *)aDate;
|
||||
/** Not implemented */
|
||||
- (NSDate *) nextDaylightSavingTimeTransitionAfterDate: (NSDate *)aDate;
|
||||
|
|
|
@ -92,7 +92,7 @@ extern "C" {
|
|||
- (NSTimeInterval) timeInterval;
|
||||
#endif
|
||||
|
||||
#if OS_API_VERSION(100200, GS_API_LATEST)
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_2, GS_API_LATEST)
|
||||
- (id) initWithFireDate: (NSDate*)fd
|
||||
interval: (NSTimeInterval)ti
|
||||
target: (id)object
|
||||
|
|
|
@ -70,7 +70,7 @@ GS_EXPORT NSString* const NSURLFileScheme;
|
|||
*/
|
||||
+ (id) fileURLWithPath: (NSString*)aPath;
|
||||
|
||||
#if OS_API_VERSION(100600,GS_API_LATEST)
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_6,GS_API_LATEST)
|
||||
/** Creates a file URL using a path built from components.
|
||||
*/
|
||||
+ (NSURL*) fileURLWithPathComponents: (NSArray*)components;
|
||||
|
@ -104,7 +104,7 @@ GS_EXPORT NSString* const NSURLFileScheme;
|
|||
*/
|
||||
- (id) initFileURLWithPath: (NSString*)aPath;
|
||||
|
||||
#if OS_API_VERSION(100500,GS_API_LATEST)
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_5,GS_API_LATEST)
|
||||
/**
|
||||
* Initialise as a file URL with the specified path (which must
|
||||
* be a valid path on the local filesystem).<br />
|
||||
|
@ -166,7 +166,7 @@ GS_EXPORT NSString* const NSURLFileScheme;
|
|||
*/
|
||||
- (NSURL*) baseURL;
|
||||
|
||||
#if OS_API_VERSION(100600,GS_API_LATEST)
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_6,GS_API_LATEST)
|
||||
/** Attempts to load from the specified URL and provides an error
|
||||
* response if the data is unrachable.<br />
|
||||
* Returns YES on success, NO on failure.
|
||||
|
@ -197,7 +197,7 @@ GS_EXPORT NSString* const NSURLFileScheme;
|
|||
*/
|
||||
- (BOOL) isFileURL;
|
||||
|
||||
#if OS_API_VERSION(100600,GS_API_LATEST)
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_6,GS_API_LATEST)
|
||||
/** Returns the last (rightmost) path component of the receiver.
|
||||
*/
|
||||
- (NSString*) lastPathComponent;
|
||||
|
@ -260,7 +260,7 @@ GS_EXPORT NSString* const NSURLFileScheme;
|
|||
*/
|
||||
- (NSString*) path;
|
||||
|
||||
#if OS_API_VERSION(100600,GS_API_LATEST)
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_6,GS_API_LATEST)
|
||||
/** Returns thepath components of the receiver.<br />
|
||||
* See [NSString-pathComponents].
|
||||
*/
|
||||
|
@ -346,7 +346,7 @@ GS_EXPORT NSString* const NSURLFileScheme;
|
|||
*/
|
||||
- (NSURL*) standardizedURL;
|
||||
|
||||
#if OS_API_VERSION(100600,GS_API_LATEST)
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_6,GS_API_LATEST)
|
||||
/** Returns a URL formed by adding a path component to the path of the
|
||||
* receiver.<br />
|
||||
* See [NSString-stringByAppendingPathComponent:].
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#define __NSURLAuthenticationChallenge_h_GNUSTEP_BASE_INCLUDE
|
||||
#import <GNUstepBase/GSVersionMacros.h>
|
||||
|
||||
#if OS_API_VERSION(100200,GS_API_LATEST) && GS_API_VERSION( 11300,GS_API_LATEST)
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_2,GS_API_LATEST) && GS_API_VERSION( 11300,GS_API_LATEST)
|
||||
|
||||
#import <Foundation/NSObject.h>
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#define __NSURLCache_h_GNUSTEP_BASE_INCLUDE
|
||||
#import <GNUstepBase/GSVersionMacros.h>
|
||||
|
||||
#if OS_API_VERSION(100200,GS_API_LATEST) && GS_API_VERSION( 11300,GS_API_LATEST)
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_2,GS_API_LATEST) && GS_API_VERSION( 11300,GS_API_LATEST)
|
||||
|
||||
#import <Foundation/NSObject.h>
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#define __NSURLConnection_h_GNUSTEP_BASE_INCLUDE
|
||||
#import <GNUstepBase/GSVersionMacros.h>
|
||||
|
||||
#if OS_API_VERSION(100200,GS_API_LATEST) && GS_API_VERSION( 11300,GS_API_LATEST)
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_2,GS_API_LATEST) && GS_API_VERSION( 11300,GS_API_LATEST)
|
||||
|
||||
#import <Foundation/NSObject.h>
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#define __NSURLCredential_h_GNUSTEP_BASE_INCLUDE
|
||||
#import <GNUstepBase/GSVersionMacros.h>
|
||||
|
||||
#if OS_API_VERSION(100200,GS_API_LATEST) && GS_API_VERSION( 11300,GS_API_LATEST)
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_2,GS_API_LATEST) && GS_API_VERSION( 11300,GS_API_LATEST)
|
||||
|
||||
#import <Foundation/NSObject.h>
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#define __NSURLCredentialStorage_h_GNUSTEP_BASE_INCLUDE
|
||||
#import <GNUstepBase/GSVersionMacros.h>
|
||||
|
||||
#if OS_API_VERSION(100200,GS_API_LATEST) && GS_API_VERSION( 11300,GS_API_LATEST)
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_2,GS_API_LATEST) && GS_API_VERSION( 11300,GS_API_LATEST)
|
||||
|
||||
#import <Foundation/NSObject.h>
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#define __NSURLDownload_h_GNUSTEP_BASE_INCLUDE
|
||||
#import <GNUstepBase/GSVersionMacros.h>
|
||||
|
||||
#if OS_API_VERSION(100200,GS_API_LATEST) && GS_API_VERSION( 11300,GS_API_LATEST)
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_2,GS_API_LATEST) && GS_API_VERSION( 11300,GS_API_LATEST)
|
||||
|
||||
#import <Foundation/NSObject.h>
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#define __NSURLError_h_GNUSTEP_BASE_INCLUDE
|
||||
#import <GNUstepBase/GSVersionMacros.h>
|
||||
|
||||
#if OS_API_VERSION(100200,GS_API_LATEST) && GS_API_VERSION( 11300,GS_API_LATEST)
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_2,GS_API_LATEST) && GS_API_VERSION( 11300,GS_API_LATEST)
|
||||
|
||||
#import <Foundation/NSObject.h>
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#define __NSURLProtectionSpace_h_GNUSTEP_BASE_INCLUDE
|
||||
#import <GNUstepBase/GSVersionMacros.h>
|
||||
|
||||
#if OS_API_VERSION(100200,GS_API_LATEST) && GS_API_VERSION( 11300,GS_API_LATEST)
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_2,GS_API_LATEST) && GS_API_VERSION( 11300,GS_API_LATEST)
|
||||
|
||||
#import <Foundation/NSObject.h>
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#define __NSURLProtocol_h_GNUSTEP_BASE_INCLUDE
|
||||
#import <GNUstepBase/GSVersionMacros.h>
|
||||
|
||||
#if OS_API_VERSION(100200,GS_API_LATEST) && GS_API_VERSION( 11300,GS_API_LATEST)
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_2,GS_API_LATEST) && GS_API_VERSION( 11300,GS_API_LATEST)
|
||||
|
||||
#import <Foundation/NSObject.h>
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#define __NSURLRequest_h_GNUSTEP_BASE_INCLUDE
|
||||
#import <GNUstepBase/GSVersionMacros.h>
|
||||
|
||||
#if OS_API_VERSION(100200,GS_API_LATEST) && GS_API_VERSION( 11300,GS_API_LATEST)
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_2,GS_API_LATEST) && GS_API_VERSION( 11300,GS_API_LATEST)
|
||||
|
||||
#import <Foundation/NSObject.h>
|
||||
|
||||
|
@ -193,7 +193,7 @@ typedef NSUInteger NSURLRequestCachePolicy;
|
|||
*/
|
||||
- (NSData *) HTTPBody;
|
||||
|
||||
#if OS_API_VERSION(100400,GS_API_LATEST)
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_4,GS_API_LATEST)
|
||||
/**
|
||||
* Returns the currently set stream (if any) to be used to provide data
|
||||
* to send as the request body.<br />
|
||||
|
@ -242,7 +242,7 @@ typedef NSUInteger NSURLRequestCachePolicy;
|
|||
*/
|
||||
- (void) setAllHTTPHeaderFields: (NSDictionary *)headerFields;
|
||||
|
||||
#if OS_API_VERSION(100400,GS_API_LATEST)
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_4,GS_API_LATEST)
|
||||
/**
|
||||
* Sets the request body to be the contents of the given stream.<br />
|
||||
* The stream should be unopened when it is set, and the load process
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#define __NSURLResponse_h_GNUSTEP_BASE_INCLUDE
|
||||
#import <GNUstepBase/GSVersionMacros.h>
|
||||
|
||||
#if OS_API_VERSION(100200,GS_API_LATEST)
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_2,GS_API_LATEST)
|
||||
|
||||
#import <Foundation/NSObject.h>
|
||||
|
||||
|
@ -67,7 +67,7 @@ extern "C" {
|
|||
expectedContentLength: (NSInteger)length
|
||||
textEncodingName: (NSString *)name;
|
||||
|
||||
#if OS_API_VERSION(100700,GS_API_LATEST)
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_7,GS_API_LATEST)
|
||||
/**
|
||||
* Initialises the receiver with the URL, statusCode, HTTPVersion, and
|
||||
* headerFields provided.
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
#define __NSValueTransformer_h_GNUSTEP_BASE_INCLUDE
|
||||
#import <GNUstepBase/GSVersionMacros.h>
|
||||
|
||||
#if OS_API_VERSION(100300,GS_API_LATEST) && GS_API_VERSION( 10200,GS_API_LATEST)
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_3,GS_API_LATEST) && GS_API_VERSION( 10200,GS_API_LATEST)
|
||||
|
||||
#import <Foundation/NSObject.h>
|
||||
|
||||
|
|
|
@ -104,7 +104,7 @@ extern "C" {
|
|||
*/
|
||||
- (void) setAttributesAsDictionary: (NSDictionary*)attributes;
|
||||
|
||||
#if OS_API_VERSION(100700, GS_API_LATEST)
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_7, GS_API_LATEST)
|
||||
/**
|
||||
* Sets attributes from the supplied dictionary.
|
||||
*/
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
#define __NSXMLParser_h_GNUSTEP_BASE_INCLUDE
|
||||
#import <GNUstepBase/GSVersionMacros.h>
|
||||
|
||||
#if OS_API_VERSION(100300, GS_API_LATEST)
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_3, GS_API_LATEST)
|
||||
|
||||
#import <Foundation/NSObject.h>
|
||||
|
||||
|
|
|
@ -43,22 +43,28 @@
|
|||
# define NO_GNUSTEP 1
|
||||
#endif
|
||||
|
||||
/*
|
||||
* For MacOS-X compatibility, we define the MacOS-X version constants and
|
||||
* we allow MAC_OS_X_VERSION_MIN_ALLOWED or MAC_OS_X_VERSION_MAX_ALLOWED
|
||||
* instead of GS_OPENSTEP_V
|
||||
/* Define the GS_OSX_ADJUST() macro to adjust OSX style version macros
|
||||
* to GNUstep style version macros.
|
||||
*/
|
||||
#define GS_OSX_ADJUST(V) ((V) < 10000 ? (V) : (V) * 100)
|
||||
|
||||
#ifndef MAC_OS_X_VERSION_10_0
|
||||
#define MAC_OS_X_VERSION_10_0 100000
|
||||
#define MAC_OS_X_VERSION_10_1 100100
|
||||
#define MAC_OS_X_VERSION_10_2 100200
|
||||
#define MAC_OS_X_VERSION_10_3 100300
|
||||
#define MAC_OS_X_VERSION_10_4 100400
|
||||
#define MAC_OS_X_VERSION_10_5 100500
|
||||
#define MAC_OS_X_VERSION_10_6 100600
|
||||
/* Define OSX compatibility version macros if necessary.
|
||||
*/
|
||||
#if !defined(MAC_OS_X_VERSION_10_0)
|
||||
#define MAC_OS_X_VERSION_10_0 1000
|
||||
#define MAC_OS_X_VERSION_10_1 1001
|
||||
#define MAC_OS_X_VERSION_10_2 1002
|
||||
#define MAC_OS_X_VERSION_10_3 1003
|
||||
#define MAC_OS_X_VERSION_10_4 1004
|
||||
#define MAC_OS_X_VERSION_10_5 1005
|
||||
#define MAC_OS_X_VERSION_10_6 1006
|
||||
#define MAC_OS_X_VERSION_10_7 1007
|
||||
#define MAC_OS_X_VERSION_10_8 1008
|
||||
#endif /* MAC_OS_X_VERSION_10_0 */
|
||||
|
||||
/* Allow MAC_OS_X_VERSION_MIN_ALLOWED or MAC_OS_X_VERSION_MAX_ALLOWED to be
|
||||
* used in place of GS_OPENSTEP_V
|
||||
*/
|
||||
#ifndef GS_OPENSTEP_V
|
||||
#ifdef MAC_OS_X_VERSION_MIN_ALLOWED
|
||||
#define GS_OPENSTEP_V MAC_OS_X_VERSION_MIN_ALLOWED
|
||||
|
@ -69,6 +75,7 @@
|
|||
#endif /* MAC_OS_X_VERSION_MIN_ALLOWED */
|
||||
#endif /* GS_OPENSTEP_V */
|
||||
|
||||
|
||||
/*
|
||||
* NB. The version values below must be integers ... by convention these are
|
||||
* made up of two digits each for major, minor and subminor version numbers
|
||||
|
@ -135,7 +142,7 @@
|
|||
* </p>
|
||||
*/
|
||||
#define OS_API_VERSION(ADD,REM) \
|
||||
(!defined(GS_OPENSTEP_V) || (GS_OPENSTEP_V >= ADD && GS_OPENSTEP_V < REM))
|
||||
(!defined(GS_OPENSTEP_V) || (GS_OPENSTEP_V >= GS_OSX_ADJUST(ADD) && GS_OPENSTEP_V < GS_OSX_ADJUST(REM)))
|
||||
|
||||
/**
|
||||
* A constant which is the lowest possible version number (0) so that
|
||||
|
|
|
@ -198,6 +198,9 @@
|
|||
/* Define to 1 if you have the `ctime' function. */
|
||||
#undef HAVE_CTIME
|
||||
|
||||
/* Define if you have currency_symbol field in struct lconv */
|
||||
#undef HAVE_CURRENCY_SYMBOL_IN_LCONV
|
||||
|
||||
/* Define to 1 if you have the declaration of `strerror_r', and to 0 if you
|
||||
don't. */
|
||||
#undef HAVE_DECL_STRERROR_R
|
||||
|
@ -685,6 +688,9 @@
|
|||
/* Define to 1 if you have the <unicode/uloc.h> header file. */
|
||||
#undef HAVE_UNICODE_ULOC_H
|
||||
|
||||
/* Define to 1 if you have the <unicode/unorm2.h> header file. */
|
||||
#undef HAVE_UNICODE_UNORM2_H
|
||||
|
||||
/* Define to 1 if you have the <unicode/unum.h> header file. */
|
||||
#undef HAVE_UNICODE_UNUM_H
|
||||
|
||||
|
|
|
@ -99,6 +99,9 @@
|
|||
#if defined(HAVE_UNICODE_UCOL_H)
|
||||
# include <unicode/ucol.h>
|
||||
#endif
|
||||
#if defined(HAVE_UNICODE_UNORM2_H)
|
||||
# include <unicode/unorm2.h>
|
||||
#endif
|
||||
#if defined(HAVE_UNICODE_USTRING_H)
|
||||
# include <unicode/ustring.h>
|
||||
#endif
|
||||
|
@ -589,10 +592,11 @@ handle_printf_atsign (FILE *stream,
|
|||
#if GS_USE_ICU == 1
|
||||
/**
|
||||
* Returns an ICU collator for the given locale and options, or returns
|
||||
* NULL if a collator couldn't be created or the GNUstep comparison code should be
|
||||
* used instead.
|
||||
* NULL if a collator couldn't be created or the GNUstep comparison code
|
||||
* should be used instead.
|
||||
*/
|
||||
static UCollator *GSICUCollatorOpen(NSStringCompareOptions mask, NSLocale *locale)
|
||||
static UCollator *
|
||||
GSICUCollatorOpen(NSStringCompareOptions mask, NSLocale *locale)
|
||||
{
|
||||
UErrorCode status = U_ZERO_ERROR;
|
||||
const char *localeCString;
|
||||
|
@ -605,12 +609,12 @@ static UCollator *GSICUCollatorOpen(NSStringCompareOptions mask, NSLocale *local
|
|||
|
||||
if (locale == nil)
|
||||
{
|
||||
/*
|
||||
* a nil locale should trigger POSIX collation (i.e. 'A'-'Z' sort before 'a'),
|
||||
* and support for this was added in ICU 4.6 under the locale name
|
||||
* en_US_POSIX, but it doesn't fit our requirements (e.g. 'e' and 'E' don't
|
||||
* compare as equal with case insensitive comparison.) - so return NULL to
|
||||
* indicate that the GNUstep comparison code should be used.
|
||||
/* A nil locale should trigger POSIX collation (i.e. 'A'-'Z' sort
|
||||
* before 'a'), and support for this was added in ICU 4.6 under the
|
||||
* locale name en_US_POSIX, but it doesn't fit our requirements
|
||||
* (e.g. 'e' and 'E' don't compare as equal with case insensitive
|
||||
* comparison.) - so return NULL to indicate that the GNUstep
|
||||
* comparison code should be used.
|
||||
*/
|
||||
return NULL;
|
||||
}
|
||||
|
@ -657,6 +661,94 @@ static UCollator *GSICUCollatorOpen(NSStringCompareOptions mask, NSLocale *local
|
|||
ucol_close(coll);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
- (NSString *) _normalizedICUStringOfType: (const char*)normalization
|
||||
mode: (UNormalizationMode)mode
|
||||
{
|
||||
UErrorCode err;
|
||||
const UNormalizer2 *normalizer;
|
||||
int32_t length;
|
||||
int32_t newLength;
|
||||
NSString *newString;
|
||||
|
||||
length = (uint32_t)[self length];
|
||||
if (0 == length)
|
||||
{
|
||||
return @""; // Simple case ... empty string
|
||||
}
|
||||
|
||||
err = 0;
|
||||
normalizer = unorm2_getInstance(NULL, normalization, UNORM2_COMPOSE, &err);
|
||||
if (U_FAILURE(err))
|
||||
{
|
||||
[NSException raise: NSCharacterConversionException
|
||||
format: @"libicu unorm2_getInstance() failed"];
|
||||
}
|
||||
|
||||
if (length < 200)
|
||||
{
|
||||
unichar src[length];
|
||||
unichar dst[length*3];
|
||||
|
||||
/* For a short string, it's very efficient to just use on-stack
|
||||
* buffers for the libicu work, and then let the standard string
|
||||
* initialiser convert that to an inline string.
|
||||
*/
|
||||
[self getCharacters: (unichar *)src range: NSMakeRange(0, length)];
|
||||
err = 0;
|
||||
newLength = unorm2_normalize(normalizer, (UChar*)src, length,
|
||||
(UChar*)dst, length*3, &err);
|
||||
if (U_FAILURE(err))
|
||||
{
|
||||
[NSException raise: NSCharacterConversionException
|
||||
format: @"precompose/decompose failed"];
|
||||
}
|
||||
newString = [[NSString alloc] initWithCharacters: dst length: newLength];
|
||||
}
|
||||
else
|
||||
{
|
||||
unichar *src;
|
||||
unichar *dst;
|
||||
|
||||
/* For longer strings, we copy the source into a buffer on the heap
|
||||
* for the libicu operation, determine the length needed for the
|
||||
* output buffer, then do the actual conversion to build the string.
|
||||
*/
|
||||
src = (unichar*)malloc(length * sizeof(unichar));
|
||||
[self getCharacters: (unichar*)src range: NSMakeRange(0, length)];
|
||||
err = 0;
|
||||
newLength = unorm2_normalize(normalizer, (UChar*)src, length,
|
||||
0, 0, &err);
|
||||
if (U_BUFFER_OVERFLOW_ERROR != err)
|
||||
{
|
||||
free(src);
|
||||
[NSException raise: NSCharacterConversionException
|
||||
format: @"precompose/decompose length check failed"];
|
||||
}
|
||||
#if GS_WITH_GC
|
||||
dst = NSAllocateCollectable(newLength * sizeof(unichar), 0);
|
||||
#else
|
||||
dst = NSZoneMalloc(NSDefaultMallocZone(), newLength * sizeof(unichar));
|
||||
#endif
|
||||
err = 0;
|
||||
unorm2_normalize(normalizer, (UChar*)src, length,
|
||||
(UChar*)dst, newLength, &err);
|
||||
free(src);
|
||||
if (U_FAILURE(err))
|
||||
{
|
||||
#if !GS_WITH_GC
|
||||
NSZoneFree(NSDefaultMallocZone(), dst);
|
||||
#endif
|
||||
[NSException raise: NSCharacterConversionException
|
||||
format: @"precompose/decompose failed"];
|
||||
}
|
||||
newString = [[NSString alloc] initWithCharactersNoCopy: dst
|
||||
length: newLength
|
||||
freeWhenDone: YES];
|
||||
}
|
||||
|
||||
return AUTORELEASE(newString);
|
||||
}
|
||||
#endif
|
||||
|
||||
+ (void) atExit
|
||||
|
@ -1675,6 +1767,24 @@ static UCollator *GSICUCollatorOpen(NSStringCompareOptions mask, NSLocale *local
|
|||
return (unichar)0;
|
||||
}
|
||||
|
||||
- (NSString *) decomposedStringWithCompatibilityMapping
|
||||
{
|
||||
#if GS_USE_ICU == 1
|
||||
return [self _normalizedICUStringOfType: "nfkc" mode: UNORM2_DECOMPOSE];
|
||||
#else
|
||||
return [self notImplemented: _cmd];
|
||||
#endif
|
||||
}
|
||||
|
||||
- (NSString *) decomposedStringWithCanonicalMapping
|
||||
{
|
||||
#if GS_USE_ICU == 1
|
||||
return [self _normalizedICUStringOfType: "nfc" mode: UNORM2_DECOMPOSE];
|
||||
#else
|
||||
return [self notImplemented: _cmd];
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns this string as an array of 16-bit <code>unichar</code> (unsigned
|
||||
* short) values. buffer must be preallocated and should be capable of
|
||||
|
@ -3819,6 +3929,24 @@ static NSFileManager *fm = nil;
|
|||
return @"";
|
||||
}
|
||||
|
||||
- (NSString *) precomposedStringWithCompatibilityMapping
|
||||
{
|
||||
#if GS_USE_ICU == 1
|
||||
return [self _normalizedICUStringOfType: "nfkc" mode: UNORM2_COMPOSE];
|
||||
#else
|
||||
return [self notImplemented: _cmd];
|
||||
#endif
|
||||
}
|
||||
|
||||
- (NSString *) precomposedStringWithCanonicalMapping
|
||||
{
|
||||
#if GS_USE_ICU == 1
|
||||
return [self _normalizedICUStringOfType: "nfc" mode: UNORM2_COMPOSE];
|
||||
#else
|
||||
return [self notImplemented: _cmd];
|
||||
#endif
|
||||
}
|
||||
|
||||
- (NSString*) stringByAppendingPathComponent: (NSString*)aString
|
||||
{
|
||||
unsigned originalLength = [self length];
|
||||
|
|
78
configure
vendored
78
configure
vendored
|
@ -13537,6 +13537,11 @@ fi
|
|||
#--------------------------------------------------------------------
|
||||
# Check for ObjC2 support in runtime
|
||||
#--------------------------------------------------------------------
|
||||
if test "$cross_compiling"="yes"; then
|
||||
{ $as_echo "$as_me:$LINENO: \"Cross compiling! Using predefined OBJC2RUNTIME variable\"" >&5
|
||||
$as_echo "$as_me: \"Cross compiling! Using predefined OBJC2RUNTIME variable\"" >&6;}
|
||||
OBJC2RUNTIME="$cross_objc2_runtime"
|
||||
else
|
||||
|
||||
for ac_func in objc_setProperty
|
||||
do
|
||||
|
@ -13638,10 +13643,11 @@ _ACEOF
|
|||
fi
|
||||
done
|
||||
|
||||
if test $ac_cv_func_objc_setProperty = yes ; then
|
||||
OBJC2RUNTIME=1
|
||||
else
|
||||
OBJC2RUNTIME=0
|
||||
if test $ac_cv_func_objc_setProperty = yes ; then
|
||||
OBJC2RUNTIME=1
|
||||
else
|
||||
OBJC2RUNTIME=0
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
|
@ -15815,6 +15821,67 @@ _ACEOF
|
|||
|
||||
fi
|
||||
|
||||
{ $as_echo "$as_me:$LINENO: checking for currency_symbol field in struct lconv" >&5
|
||||
$as_echo_n "checking for currency_symbol field in struct lconv... " >&6; }
|
||||
if test "${ac_cv_have_currency_symbol_in_struct_lconv+set}" = set; then
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
/* confdefs.h. */
|
||||
_ACEOF
|
||||
cat confdefs.h >>conftest.$ac_ext
|
||||
cat >>conftest.$ac_ext <<_ACEOF
|
||||
/* end confdefs.h. */
|
||||
#include <locale.h>
|
||||
int
|
||||
main ()
|
||||
{
|
||||
struct lconv l; l.currency_symbol = NULL;
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
rm -f conftest.$ac_objext
|
||||
if { (ac_try="$ac_compile"
|
||||
case "(($ac_try" in
|
||||
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
|
||||
*) ac_try_echo=$ac_try;;
|
||||
esac
|
||||
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
|
||||
$as_echo "$ac_try_echo") >&5
|
||||
(eval "$ac_compile") 2>conftest.er1
|
||||
ac_status=$?
|
||||
grep -v '^ *+' conftest.er1 >conftest.err
|
||||
rm -f conftest.er1
|
||||
cat conftest.err >&5
|
||||
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } && {
|
||||
test -z "$ac_c_werror_flag" ||
|
||||
test ! -s conftest.err
|
||||
} && test -s conftest.$ac_objext; then
|
||||
ac_cv_have_currency_symbol_in_struct_lconv="yes"
|
||||
else
|
||||
$as_echo "$as_me: failed program was:" >&5
|
||||
sed 's/^/| /' conftest.$ac_ext >&5
|
||||
|
||||
ac_cv_have_currency_symbol_in_struct_lconv="no"
|
||||
|
||||
fi
|
||||
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
|
||||
fi
|
||||
{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_currency_symbol_in_struct_lconv" >&5
|
||||
$as_echo "$ac_cv_have_currency_symbol_in_struct_lconv" >&6; }
|
||||
if test "x$ac_cv_have_currency_symbol_in_struct_lconv" = "xyes" ; then
|
||||
|
||||
cat >>confdefs.h <<\_ACEOF
|
||||
#define HAVE_CURRENCY_SYMBOL_IN_LCONV 1
|
||||
_ACEOF
|
||||
|
||||
fi
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
# These two headers (functions) needed by Time.m
|
||||
#--------------------------------------------------------------------
|
||||
|
@ -26022,7 +26089,8 @@ $as_echo "yes" >&6; }
|
|||
|
||||
|
||||
|
||||
for ac_header in unicode/uloc.h unicode/ulocdata.h unicode/ucol.h unicode/ucurr.h unicode/uregex.h unicode/ucal.h unicode/unum.h unicode/udat.h unicode/udatpg.h unicode/ustring.h unicode/usearch.h
|
||||
|
||||
for ac_header in unicode/uloc.h unicode/ulocdata.h unicode/ucol.h unicode/ucurr.h unicode/uregex.h unicode/ucal.h unicode/unum.h unicode/udat.h unicode/udatpg.h unicode/ustring.h unicode/usearch.h unicode/unorm2.h
|
||||
do
|
||||
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
|
||||
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
|
||||
|
|
|
@ -3204,7 +3204,7 @@ if test $enable_icu = yes; then
|
|||
|
||||
if test "$have_icu" = "yes"; then
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_CHECK_HEADERS(unicode/uloc.h unicode/ulocdata.h unicode/ucol.h unicode/ucurr.h unicode/uregex.h unicode/ucal.h unicode/unum.h unicode/udat.h unicode/udatpg.h unicode/ustring.h unicode/usearch.h)
|
||||
AC_CHECK_HEADERS(unicode/uloc.h unicode/ulocdata.h unicode/ucol.h unicode/ucurr.h unicode/uregex.h unicode/ucal.h unicode/unum.h unicode/udat.h unicode/udatpg.h unicode/ustring.h unicode/usearch.h unicode/unorm2.h)
|
||||
LIBS="$LIBS $ICU_LIBS"
|
||||
LDFLAGS="$LDFLAGS $ICU_LDFLAGS"
|
||||
LDIR_FLAGS="$LDIR_FLAGS $ICU_LDFLAGS"
|
||||
|
|
Loading…
Reference in a new issue