mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 08:26:27 +00:00
Updates for 10.5 API changes
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@27962 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
0b528e776c
commit
30cf8bf35b
138 changed files with 2094 additions and 1536 deletions
147
ChangeLog
147
ChangeLog
|
@ -1,3 +1,150 @@
|
|||
2009-02-23 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSIndexPath.m:
|
||||
* Source/GSSocketStream.h:
|
||||
* Source/NSTimeZone.m:
|
||||
* Source/NSNetServices.m:
|
||||
* Source/NSURLCredential.m:
|
||||
* Source/GSSocketStream.m:
|
||||
* Source/NSURLAuthenticationChallenge.m:
|
||||
* Source/NSCalendarDate.m:
|
||||
* Source/NSPropertyList.m:
|
||||
* Source/GSConcreteValueTemplate.m:
|
||||
* Source/NSAffineTransform.m:
|
||||
* Source/NSConcretePointerFunctions.h:
|
||||
* Source/NSPathUtilities.m:
|
||||
* Source/NSScanner.m:
|
||||
* Source/NSProcessInfo.m:
|
||||
* Source/NSDistributedNotificationCenter.m:
|
||||
* Source/NSNotificationQueue.m:
|
||||
* Source/NSGeometry.m:
|
||||
* Source/NSConcretePointerFunctions.m:
|
||||
* Source/NSRunLoop.m:
|
||||
* Source/NSAttributedString.m:
|
||||
* Source/NSUndoManager.m:
|
||||
* Source/NSMethodSignature.m:
|
||||
* Source/NSUserDefaults.m:
|
||||
* Source/NSArray.m:
|
||||
* Source/GSStream.h:
|
||||
* Source/GSStream.m:
|
||||
* Source/NSKeyedArchiver.m:
|
||||
* Source/NSDebug.m:
|
||||
* Source/unix/NSStream.m:
|
||||
* Source/NSKeyedUnarchiver.m:
|
||||
* Source/NSURLDownload.m:
|
||||
* Source/NSPredicate.m:
|
||||
* Source/NSAssertionHandler.m:
|
||||
* Source/NSZone.m:
|
||||
* Source/NSPort.m:
|
||||
* Source/GSPrivate.h:
|
||||
* Source/win32/NSStream.m:
|
||||
* Source/NSInvocation.m:
|
||||
* Source/NSFileManager.m:
|
||||
* Source/NSURLResponse.m:
|
||||
* Source/NSURLCache.m:
|
||||
* Source/NSCoder.m:
|
||||
* Source/NSException.m:
|
||||
* Source/NSCopyObject.m:
|
||||
* Source/NSURL.m:
|
||||
* Source/NSString.m:
|
||||
* Source/NSObject.m:
|
||||
* Source/NSDecimalNumber.m:
|
||||
* Source/cifframe.m:
|
||||
* Source/Additions/GCArray.m:
|
||||
* Source/Additions/GSXML.m:
|
||||
* Source/Additions/GCDictionary.m:
|
||||
* Source/Additions/GSCategories.m:
|
||||
* Source/Additions/GSMime.m:
|
||||
* Source/NSNumber.m:
|
||||
* Source/NSDecimal.m:
|
||||
* Source/GSString.m:
|
||||
* Source/NSThread.m:
|
||||
* Source/NSHTTPCookie.m:
|
||||
* Source/NSData.m:
|
||||
* Source/NSProxy.m:
|
||||
* Source/NSURLProtectionSpace.m:
|
||||
* Source/NSError.m:
|
||||
* Source/NSDictionary.m:
|
||||
* Source/NSURLRequest.m:
|
||||
* Source/NSValue.m:
|
||||
* Source/NSCountedSet.m:
|
||||
* Source/NSIndexSet.m:
|
||||
* Source/GSFileHandle.m:
|
||||
* Source/NSLock.m:
|
||||
* Source/NSSet.m:
|
||||
* Source/NSArchiver.m:
|
||||
* Source/NSXMLParser.m:
|
||||
* Source/GSURLPrivate.h:
|
||||
* Headers/Foundation/NSTimeZone.h:
|
||||
* Headers/Foundation/NSNetServices.h:
|
||||
* Headers/Foundation/NSCoder.h:
|
||||
* Headers/Foundation/NSException.h:
|
||||
* Headers/Foundation/NSHTTPCookieStorage.h:
|
||||
* Headers/Foundation/NSURLAuthenticationChallenge.h:
|
||||
* Headers/Foundation/NSCompoundPredicate.h:
|
||||
* Headers/Foundation/NSObject.h:
|
||||
* Headers/Foundation/NSSpellServer.h:
|
||||
* Headers/Foundation/NSString.h:
|
||||
* Headers/Foundation/NSCalendarDate.h:
|
||||
* Headers/Foundation/NSDecimalNumber.h:
|
||||
* Headers/Foundation/NSURLHandle.h:
|
||||
* Headers/Foundation/NSPropertyList.h:
|
||||
* Headers/Foundation/NSAffineTransform.h:
|
||||
* Headers/Foundation/NSPathUtilities.h:
|
||||
* Headers/Foundation/NSScanner.h:
|
||||
* Headers/Foundation/NSProcessInfo.h:
|
||||
* Headers/Foundation/NSDistributedNotificationCenter.h:
|
||||
* Headers/Foundation/NSStream.h:
|
||||
* Headers/Foundation/NSComparisonPredicate.h:
|
||||
* Headers/Foundation/NSGeometry.h:
|
||||
* Headers/Foundation/NSNotificationQueue.h:
|
||||
* Headers/Foundation/NSRunLoop.h:
|
||||
* Headers/Foundation/NSDecimal.h:
|
||||
* Headers/Foundation/NSAttributedString.h:
|
||||
* Headers/Foundation/NSUndoManager.h:
|
||||
* Headers/Foundation/NSMethodSignature.h:
|
||||
* Headers/Foundation/NSUserDefaults.h:
|
||||
* Headers/Foundation/NSThread.h:
|
||||
* Headers/Foundation/NSData.h:
|
||||
* Headers/Foundation/NSHTTPCookie.h:
|
||||
* Headers/Foundation/NSArray.h:
|
||||
* Headers/Foundation/NSObjCRuntime.h:
|
||||
* Headers/Foundation/NSProxy.h:
|
||||
* Headers/Foundation/NSURLProtectionSpace.h:
|
||||
* Headers/Foundation/NSKeyedArchiver.h:
|
||||
* Headers/Foundation/NSDebug.h:
|
||||
* Headers/Foundation/NSError.h:
|
||||
* Headers/Foundation/NSURLDownload.h:
|
||||
* Headers/Foundation/NSKeyValueObserving.h:
|
||||
* Headers/Foundation/NSDictionary.h:
|
||||
* Headers/Foundation/NSURLRequest.h:
|
||||
* Headers/Foundation/NSZone.h:
|
||||
* Headers/Foundation/NSValue.h:
|
||||
* Headers/Foundation/NSIndexSet.h:
|
||||
* Headers/Foundation/NSPort.h:
|
||||
* Headers/Foundation/NSLock.h:
|
||||
* Headers/Foundation/NSSet.h:
|
||||
* Headers/Foundation/NSExpression.h:
|
||||
* Headers/Foundation/NSInvocation.h:
|
||||
* Headers/Foundation/NSFileManager.h:
|
||||
* Headers/Foundation/NSXMLParser.h:
|
||||
* Headers/Foundation/NSURLResponse.h:
|
||||
* Headers/Foundation/NSIndexPath.h:
|
||||
* Headers/Foundation/NSURLCache.h:
|
||||
* Headers/Additions/GNUstepBase/GSXML.h:
|
||||
* Headers/Additions/GNUstepBase/GSCategories.h:
|
||||
* Headers/Additions/GNUstepBase/GSMime.h:
|
||||
* Headers/Additions/GNUstepBase/GSFileHandle.h:
|
||||
* Tools/gdnc.h:
|
||||
* Tools/gdnc.m:
|
||||
Conversion of everything to use the new MacOS-X 10.5 API where return
|
||||
values and arguments use the NSInteger, NSUInteger, and CGFloat types.
|
||||
For now, as suggesed by David, the proper 10.5 behavior is turned off
|
||||
and those types are equivalent to the types used by the old API.
|
||||
Edit Headers/Foundation/NSObjCRuntime.h to turn on the new behavior
|
||||
where the integer types are the same size as a pointer, and the float
|
||||
type is actually a double on 64bit processors.
|
||||
|
||||
2009-02-23 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSPortCoder.m:
|
||||
|
|
|
@ -207,7 +207,7 @@ typedef enum _NSGNUstepStringEncoding
|
|||
*/
|
||||
|
||||
@interface NSCalendarDate (GSCategories)
|
||||
- (int) weekOfYear;
|
||||
- (NSInteger) weekOfYear;
|
||||
@end
|
||||
|
||||
@interface NSData (GSCategories)
|
||||
|
@ -216,10 +216,10 @@ typedef enum _NSGNUstepStringEncoding
|
|||
- (NSData*) md5Digest;
|
||||
- (BOOL) uudecodeInto: (NSMutableData*)decoded
|
||||
name: (NSString**)namePtr
|
||||
mode: (int*)modePtr;
|
||||
mode: (NSInteger*)modePtr;
|
||||
- (BOOL) uuencodeInto: (NSMutableData*)encoded
|
||||
name: (NSString*)name
|
||||
mode: (int)mode;
|
||||
mode: (NSInteger)mode;
|
||||
@end
|
||||
|
||||
@interface NSString (GSCategories)
|
||||
|
@ -275,11 +275,11 @@ typedef enum _NSGNUstepStringEncoding
|
|||
|
||||
@interface NSArray (GSCompatibility)
|
||||
- (id) initWithArray: (NSArray*)array copyItems: (BOOL)shouldCopy;
|
||||
- (unsigned) insertionPosition: (id)item
|
||||
usingFunction: (NSComparisonResult (*)(id, id, void *))sorter
|
||||
context: (void *)context;
|
||||
- (unsigned) insertionPosition: (id)item
|
||||
usingSelector: (SEL)comp;
|
||||
- (NSUInteger) insertionPosition: (id)item
|
||||
usingFunction: (NSComparisonResult (*)(id, id, void *))sorter
|
||||
context: (void *)context;
|
||||
- (NSUInteger) insertionPosition: (id)item
|
||||
usingSelector: (SEL)comp;
|
||||
@end
|
||||
|
||||
@interface NSAttributedString (GSCategories)
|
||||
|
@ -293,7 +293,7 @@ typedef enum _NSGNUstepStringEncoding
|
|||
@end
|
||||
|
||||
@interface NSDistantObject (GSCompatibility)
|
||||
+ (void) setDebug: (int)val;
|
||||
+ (void) setDebug: (NSInteger)val;
|
||||
@end
|
||||
|
||||
@interface NSFileHandle(GSCompatibility)
|
||||
|
|
|
@ -92,7 +92,7 @@
|
|||
- (void) setNonBlocking: (BOOL)flag;
|
||||
- (void) postReadNotification;
|
||||
- (void) postWriteNotification;
|
||||
- (int) read: (void*)buf length: (int)len;
|
||||
- (NSInteger) read: (void*)buf length: (NSUInteger)len;
|
||||
- (void) receivedEvent: (void*)data
|
||||
type: (RunLoopEventType)type
|
||||
extra: (void*)extra
|
||||
|
@ -101,7 +101,7 @@
|
|||
- (BOOL) useCompression;
|
||||
- (void) watchReadDescriptorForModes: (NSArray*)modes;
|
||||
- (void) watchWriteDescriptor;
|
||||
- (int) write: (const void*)buf length: (int)len;
|
||||
- (NSInteger) write: (const void*)buf length: (NSUInteger)len;
|
||||
|
||||
@end
|
||||
|
||||
|
|
|
@ -62,7 +62,7 @@ extern "C" {
|
|||
}
|
||||
- (BOOL) atEnd;
|
||||
- (BOOL) decodeData: (const void*)sData
|
||||
length: (unsigned)length
|
||||
length: (NSUInteger)length
|
||||
intoData: (NSMutableData*)dData;
|
||||
- (void) setAtEnd: (BOOL)flag;
|
||||
@end
|
||||
|
|
|
@ -119,15 +119,15 @@ extern "C" {
|
|||
id _parent;
|
||||
}
|
||||
|
||||
+ (NSString*) descriptionFromType: (int)type;
|
||||
+ (int) typeFromDescription: (NSString*)desc;
|
||||
+ (NSString*) descriptionFromType: (NSInteger)type;
|
||||
+ (NSInteger) typeFromDescription: (NSString*)desc;
|
||||
|
||||
- (NSString*) href;
|
||||
|
||||
- (void*) lib;
|
||||
- (GSXMLNamespace*) next;
|
||||
- (NSString*) prefix;
|
||||
- (int) type;
|
||||
- (NSInteger) type;
|
||||
- (NSString*) typeDescription;
|
||||
|
||||
@end
|
||||
|
@ -140,8 +140,8 @@ extern "C" {
|
|||
id _parent;
|
||||
}
|
||||
|
||||
+ (NSString*) descriptionFromType: (int)type;
|
||||
+ (int) typeFromDescription: (NSString*)desc;
|
||||
+ (NSString*) descriptionFromType: (NSInteger)type;
|
||||
+ (NSInteger) typeFromDescription: (NSString*)desc;
|
||||
|
||||
- (NSDictionary*) attributes;
|
||||
- (NSString*) content;
|
||||
|
@ -177,7 +177,7 @@ extern "C" {
|
|||
- (NSMutableDictionary*) propertiesAsDictionaryWithKeyTransformationSel:
|
||||
(SEL)keyTransformSel;
|
||||
- (void) setObject: (NSString*)value forKey:(NSString*)key;
|
||||
- (int) type;
|
||||
- (NSInteger) type;
|
||||
- (NSString*) typeDescription;
|
||||
- (void) setNamespace: (GSXMLNamespace *)space;
|
||||
|
||||
|
@ -209,10 +209,10 @@ extern "C" {
|
|||
+ (NSString*) xmlEncodingStringForStringEncoding: (NSStringEncoding)encoding;
|
||||
|
||||
- (void) abortParsing;
|
||||
- (int) columnNumber;
|
||||
- (NSInteger) columnNumber;
|
||||
- (GSXMLDocument*) document;
|
||||
- (BOOL) doValidityChecking: (BOOL)yesno;
|
||||
- (int) errNo;
|
||||
- (NSInteger) errNo;
|
||||
- (BOOL) getWarnings: (BOOL)yesno;
|
||||
- (id) initWithSAXHandler: (GSSAXHandler*)handler;
|
||||
- (id) initWithSAXHandler: (GSSAXHandler*)handler
|
||||
|
@ -223,7 +223,7 @@ extern "C" {
|
|||
withData: (NSData*)data;
|
||||
|
||||
- (BOOL) keepBlanks: (BOOL)yesno;
|
||||
- (int) lineNumber;
|
||||
- (NSInteger) lineNumber;
|
||||
- (NSString*) messages;
|
||||
- (BOOL) parse;
|
||||
- (BOOL) parse: (NSData*)data;
|
||||
|
@ -256,8 +256,8 @@ extern "C" {
|
|||
/** <override-dummy /> */
|
||||
- (void) attributeDecl: (NSString*)nameElement
|
||||
name: (NSString*)name
|
||||
type: (int)type
|
||||
typeDefValue: (int)defType
|
||||
type: (NSInteger)type
|
||||
typeDefValue: (NSInteger)defType
|
||||
defaultValue: (NSString*)value;
|
||||
/** <override-dummy /> */
|
||||
- (void) characters: (NSString*)name;
|
||||
|
@ -267,7 +267,7 @@ extern "C" {
|
|||
- (void) comment: (NSString*) value;
|
||||
/** <override-dummy /> */
|
||||
- (void) elementDecl: (NSString*)name
|
||||
type: (int)type;
|
||||
type: (NSInteger)type;
|
||||
/** <override-dummy /> */
|
||||
- (void) endDocument;
|
||||
/** <override-dummy /> */
|
||||
|
@ -278,35 +278,35 @@ extern "C" {
|
|||
href: (NSString*)href;
|
||||
/** <override-dummy /> */
|
||||
- (void) entityDecl: (NSString*)name
|
||||
type: (int)type
|
||||
type: (NSInteger)type
|
||||
public: (NSString*)publicId
|
||||
system: (NSString*)systemId
|
||||
content: (NSString*)content;
|
||||
- (void) error: (NSString*)e;
|
||||
- (void) error: (NSString*)e
|
||||
colNumber: (int)colNumber
|
||||
lineNumber: (int)lineNumber;
|
||||
colNumber: (NSInteger)colNumber
|
||||
lineNumber: (NSInteger)lineNumber;
|
||||
- (BOOL) externalSubset: (NSString*)name
|
||||
externalID: (NSString*)externalID
|
||||
systemID: (NSString*)systemID;
|
||||
- (void) fatalError: (NSString*)e;
|
||||
- (void) fatalError: (NSString*)e
|
||||
colNumber: (int)colNumber
|
||||
lineNumber: (int)lineNumber;
|
||||
colNumber: (NSInteger)colNumber
|
||||
lineNumber: (NSInteger)lineNumber;
|
||||
- (void*) getEntity: (NSString*)name;
|
||||
- (void*) getParameterEntity: (NSString*)name;
|
||||
/** <override-dummy /> */
|
||||
- (void) globalNamespace: (NSString*)name
|
||||
href: (NSString*)href
|
||||
prefix: (NSString*)prefix;
|
||||
- (int) hasExternalSubset;
|
||||
- (int) hasInternalSubset;
|
||||
- (NSInteger) hasExternalSubset;
|
||||
- (NSInteger) hasInternalSubset;
|
||||
/** <override-dummy /> */
|
||||
- (void) ignoreWhitespace: (NSString*)ch;
|
||||
- (BOOL) internalSubset: (NSString*)name
|
||||
externalID: (NSString*)externalID
|
||||
systemID: (NSString*)systemID;
|
||||
- (int) isStandalone;
|
||||
- (NSInteger) isStandalone;
|
||||
- (NSString*) loadEntity: (NSString*)publicId
|
||||
at: (NSString*)location;
|
||||
/** <override-dummy /> */
|
||||
|
@ -340,8 +340,8 @@ extern "C" {
|
|||
notationName: (NSString*)notation;
|
||||
- (void) warning: (NSString*)e;
|
||||
- (void) warning: (NSString*)e
|
||||
colNumber: (int)colNumber
|
||||
lineNumber: (int)lineNumber;
|
||||
colNumber: (NSInteger)colNumber
|
||||
lineNumber: (NSInteger)lineNumber;
|
||||
|
||||
@end
|
||||
|
||||
|
@ -432,11 +432,11 @@ extern "C" {
|
|||
* For XPath queries returning a node set.
|
||||
*/
|
||||
@interface GSXPathNodeSet : GSXPathObject
|
||||
- (unsigned int) count;
|
||||
- (unsigned int) length;
|
||||
- (NSUInteger) count;
|
||||
- (NSUInteger) length;
|
||||
|
||||
/** Please note that index starts from 0. */
|
||||
- (GSXMLNode *) nodeAtIndex: (unsigned)index;
|
||||
- (GSXMLNode *) nodeAtIndex: (NSUInteger)index;
|
||||
@end
|
||||
|
||||
@interface GSXMLDocument (XSLT)
|
||||
|
@ -571,7 +571,8 @@ extern "C" {
|
|||
* as a string.<br />
|
||||
* This method is intended for use by applications acting as XMLRPC servers.
|
||||
*/
|
||||
- (NSString*) buildResponseWithFaultCode: (int)code andString: (NSString*)s;
|
||||
- (NSString*) buildResponseWithFaultCode: (NSInteger)code
|
||||
andString: (NSString*)s;
|
||||
|
||||
/**
|
||||
* Builds an XMLRPC response with the specified array of parameters and
|
||||
|
@ -624,7 +625,7 @@ extern "C" {
|
|||
*/
|
||||
- (id) makeMethodCall: (NSString*)method
|
||||
params: (NSArray*)params
|
||||
timeout: (int)seconds;
|
||||
timeout: (NSInteger)seconds;
|
||||
|
||||
/**
|
||||
* Parses XML data containing an XMLRPC method call.<br />
|
||||
|
@ -681,7 +682,7 @@ extern "C" {
|
|||
*/
|
||||
- (BOOL) sendMethodCall: (NSString*)method
|
||||
params: (NSArray*)params
|
||||
timeout: (int)seconds;
|
||||
timeout: (NSInteger)seconds;
|
||||
|
||||
/**
|
||||
* Specify whether to generate compact XML (omit indentation and other white
|
||||
|
|
|
@ -33,12 +33,12 @@
|
|||
#import <Foundation/NSGeometry.h>
|
||||
|
||||
typedef struct {
|
||||
float m11;
|
||||
float m12;
|
||||
float m21;
|
||||
float m22;
|
||||
float tX;
|
||||
float tY;
|
||||
CGFloat m11;
|
||||
CGFloat m12;
|
||||
CGFloat m21;
|
||||
CGFloat m22;
|
||||
CGFloat tX;
|
||||
CGFloat tY;
|
||||
} NSAffineTransformStruct;
|
||||
|
||||
@interface NSAffineTransform : NSObject <NSCopying, NSCoding>
|
||||
|
@ -56,15 +56,15 @@ typedef struct {
|
|||
- (id) initWithTransform: (NSAffineTransform*)aTransform;
|
||||
- (void) invert;
|
||||
- (void) prependTransform: (NSAffineTransform*)aTransform;
|
||||
- (void) rotateByDegrees: (float)angle;
|
||||
- (void) rotateByRadians: (float)angleRad;
|
||||
- (void) scaleBy: (float)scale;
|
||||
- (void) scaleXBy: (float)scaleX yBy: (float)scaleY;
|
||||
- (void) rotateByDegrees: (CGFloat)angle;
|
||||
- (void) rotateByRadians: (CGFloat)angleRad;
|
||||
- (void) scaleBy: (CGFloat)scale;
|
||||
- (void) scaleXBy: (CGFloat)scaleX yBy: (CGFloat)scaleY;
|
||||
- (void) setTransformStruct: (NSAffineTransformStruct)val;
|
||||
- (NSPoint) transformPoint: (NSPoint)aPoint;
|
||||
- (NSSize) transformSize: (NSSize)aSize;
|
||||
- (NSAffineTransformStruct) transformStruct;
|
||||
- (void) translateXBy: (float)tranX yBy: (float)tranY;
|
||||
- (void) translateXBy: (CGFloat)tranX yBy: (CGFloat)tranY;
|
||||
@end
|
||||
|
||||
#endif /* __NSAffineTransform_h_GNUSTEP_BASE_INCLUDE */
|
||||
|
|
|
@ -48,18 +48,18 @@ extern "C" {
|
|||
#endif
|
||||
+ (id) arrayWithObject: (id)anObject;
|
||||
+ (id) arrayWithObjects: (id)firstObject, ...;
|
||||
+ (id) arrayWithObjects: (id*)objects count: (unsigned)count;
|
||||
+ (id) arrayWithObjects: (id*)objects count: (NSUInteger)count;
|
||||
|
||||
- (NSArray*) arrayByAddingObject: (id)anObject;
|
||||
- (NSArray*) arrayByAddingObjectsFromArray: (NSArray*)anotherArray;
|
||||
- (BOOL) containsObject: anObject;
|
||||
- (unsigned) count; // Primitive
|
||||
- (NSUInteger) count; // Primitive
|
||||
- (void) getObjects: (id*)aBuffer;
|
||||
- (void) getObjects: (id*)aBuffer range: (NSRange)aRange;
|
||||
- (unsigned) indexOfObject: (id)anObject;
|
||||
- (unsigned) indexOfObject: (id)anObject inRange: (NSRange)aRange;
|
||||
- (unsigned) indexOfObjectIdenticalTo: (id)anObject;
|
||||
- (unsigned) indexOfObjectIdenticalTo: (id)anObject inRange: (NSRange)aRange;
|
||||
- (NSUInteger) indexOfObject: (id)anObject;
|
||||
- (NSUInteger) indexOfObject: (id)anObject inRange: (NSRange)aRange;
|
||||
- (NSUInteger) indexOfObjectIdenticalTo: (id)anObject;
|
||||
- (NSUInteger) indexOfObjectIdenticalTo: (id)anObject inRange: (NSRange)aRange;
|
||||
- (id) init;
|
||||
- (id) initWithArray: (NSArray*)array;
|
||||
#if OS_API_VERSION(GS_API_MACOSX, GS_API_LATEST)
|
||||
|
@ -70,10 +70,10 @@ extern "C" {
|
|||
- (id) initWithContentsOfURL: (NSURL*)aURL;
|
||||
#endif
|
||||
- (id) initWithObjects: firstObject, ...;
|
||||
- (id) initWithObjects: (id*)objects count: (unsigned)count; // Primitive
|
||||
- (id) initWithObjects: (id*)objects count: (NSUInteger)count; // Primitive
|
||||
|
||||
- (id) lastObject;
|
||||
- (id) objectAtIndex: (unsigned)index; // Primitive
|
||||
- (id) objectAtIndex: (NSUInteger)index; // Primitive
|
||||
#if OS_API_VERSION(100400, GS_API_LATEST)
|
||||
- (NSArray *) objectsAtIndexes: (NSIndexSet *)indexes;
|
||||
#endif
|
||||
|
@ -108,7 +108,7 @@ extern "C" {
|
|||
- (NSString*) description;
|
||||
- (NSString*) descriptionWithLocale: (NSDictionary*)locale;
|
||||
- (NSString*) descriptionWithLocale: (NSDictionary*)locale
|
||||
indent: (unsigned int)level;
|
||||
indent: (NSUInteger)level;
|
||||
|
||||
- (BOOL) writeToFile: (NSString*)path atomically: (BOOL)useAuxiliaryFile;
|
||||
#if OS_API_VERSION(GS_API_MACOSX, GS_API_LATEST)
|
||||
|
@ -120,22 +120,22 @@ extern "C" {
|
|||
|
||||
@interface NSMutableArray : NSArray
|
||||
|
||||
+ (id) arrayWithCapacity: (unsigned)numItems;
|
||||
+ (id) arrayWithCapacity: (NSUInteger)numItems;
|
||||
|
||||
- (void) addObject: (id)anObject; // Primitive
|
||||
- (void) addObjectsFromArray: (NSArray*)otherArray;
|
||||
#if OS_API_VERSION(GS_API_MACOSX, GS_API_LATEST)
|
||||
- (void) exchangeObjectAtIndex: (unsigned int)i1
|
||||
withObjectAtIndex: (unsigned int)i2;
|
||||
- (void) exchangeObjectAtIndex: (NSUInteger)i1
|
||||
withObjectAtIndex: (NSUInteger)i2;
|
||||
#endif
|
||||
- (id) initWithCapacity: (unsigned)numItems; // Primitive
|
||||
- (void) insertObject: (id)anObject atIndex: (unsigned)index; // Primitive
|
||||
- (id) initWithCapacity: (NSUInteger)numItems; // Primitive
|
||||
- (void) insertObject: (id)anObject atIndex: (NSUInteger)index; // Primitive
|
||||
#if OS_API_VERSION(100400, GS_API_LATEST)
|
||||
- (void) insertObjects: (NSArray *)objects atIndexes: (NSIndexSet *)indexes;
|
||||
#endif
|
||||
- (void) removeObjectAtIndex: (unsigned)index; // Primitive
|
||||
- (void) removeObjectAtIndex: (NSUInteger)index; // Primitive
|
||||
- (void) removeObjectsAtIndexes: (NSIndexSet *)indexes;
|
||||
- (void) replaceObjectAtIndex: (unsigned)index
|
||||
- (void) replaceObjectAtIndex: (NSUInteger)index
|
||||
withObject: (id)anObject; // Primitive
|
||||
#if OS_API_VERSION(100400, GS_API_LATEST)
|
||||
- (void) replaceObjectsAtIndexes: (NSIndexSet *)indexes
|
||||
|
@ -156,8 +156,8 @@ extern "C" {
|
|||
- (void) removeObjectIdenticalTo: (id)anObject inRange: (NSRange)aRange;
|
||||
- (void) removeObjectsInArray: (NSArray*)otherArray;
|
||||
- (void) removeObjectsInRange: (NSRange)aRange;
|
||||
- (void) removeObjectsFromIndices: (unsigned*)indices
|
||||
numIndices: (unsigned)count;
|
||||
- (void) removeObjectsFromIndices: (NSUInteger*)indices
|
||||
numIndices: (NSUInteger)count;
|
||||
|
||||
- (void) sortUsingFunction: (NSComparisonResult (*)(id,id,void*))compare
|
||||
context: (void*)context;
|
||||
|
@ -185,11 +185,11 @@ extern "C" {
|
|||
* The selector version works the same - returning NSOrderedAscending if
|
||||
* the receiver is 'less than' the item in the array.
|
||||
*/
|
||||
- (unsigned) insertionPosition: (id)item
|
||||
usingFunction: (NSComparisonResult (*)(id, id, void *))sorter
|
||||
context: (void *)context;
|
||||
- (unsigned) insertionPosition: (id)item
|
||||
usingSelector: (SEL)comp;
|
||||
- (NSUInteger) insertionPosition: (id)item
|
||||
usingFunction: (NSComparisonResult (*)(id, id, void *))sorter
|
||||
context: (void *)context;
|
||||
- (NSUInteger) insertionPosition: (id)item
|
||||
usingSelector: (SEL)comp;
|
||||
@end
|
||||
|
||||
#if defined(__cplusplus)
|
||||
|
|
|
@ -71,19 +71,19 @@ extern "C" {
|
|||
- (id) initWithString: (NSString*)aString attributes: (NSDictionary*)attributes;
|
||||
|
||||
//Retrieving character information
|
||||
- (unsigned int) length;
|
||||
- (NSUInteger) length;
|
||||
- (NSString*) string; //Primitive method!
|
||||
|
||||
//Retrieving attribute information
|
||||
- (NSDictionary*) attributesAtIndex: (unsigned int)index
|
||||
- (NSDictionary*) attributesAtIndex: (NSUInteger)index
|
||||
effectiveRange: (NSRange*)aRange; //Primitive method!
|
||||
- (NSDictionary*) attributesAtIndex: (unsigned int)index
|
||||
- (NSDictionary*) attributesAtIndex: (NSUInteger)index
|
||||
longestEffectiveRange: (NSRange*)aRange
|
||||
inRange: (NSRange)rangeLimit;
|
||||
- (id) attribute: (NSString*)attributeName
|
||||
atIndex: (unsigned int)index
|
||||
atIndex: (NSUInteger)index
|
||||
effectiveRange: (NSRange*)aRange;
|
||||
- (id) attribute: (NSString*)attributeName atIndex: (unsigned int)index
|
||||
- (id) attribute: (NSString*)attributeName atIndex: (NSUInteger)index
|
||||
longestEffectiveRange: (NSRange*)aRange inRange: (NSRange)rangeLimit;
|
||||
|
||||
//Comparing attributed strings
|
||||
|
@ -115,7 +115,7 @@ extern "C" {
|
|||
//Changing characters and attributes
|
||||
- (void) appendAttributedString: (NSAttributedString*)attributedString;
|
||||
- (void) insertAttributedString: (NSAttributedString*)attributedString
|
||||
atIndex: (unsigned int)index;
|
||||
atIndex: (NSUInteger)index;
|
||||
- (void) replaceCharactersInRange: (NSRange)aRange
|
||||
withAttributedString: (NSAttributedString*)attributedString;
|
||||
- (void) replaceCharactersInRange: (NSRange)aRange
|
||||
|
|
|
@ -46,12 +46,12 @@ extern "C" {
|
|||
+ (id) dateWithString: (NSString*)description
|
||||
calendarFormat: (NSString*)format
|
||||
locale: (NSDictionary*)dictionary;
|
||||
+ (id) dateWithYear: (int)year
|
||||
month: (unsigned int)month
|
||||
day: (unsigned int)day
|
||||
hour: (unsigned int)hour
|
||||
minute: (unsigned int)minute
|
||||
second: (unsigned int)second
|
||||
+ (id) dateWithYear: (NSInteger)year
|
||||
month: (NSUInteger)month
|
||||
day: (NSUInteger)day
|
||||
hour: (NSUInteger)hour
|
||||
minute: (NSUInteger)minute
|
||||
second: (NSUInteger)second
|
||||
timeZone: (NSTimeZone*)aTimeZone;
|
||||
|
||||
// Initializing an NSCalendar Date
|
||||
|
@ -61,32 +61,32 @@ extern "C" {
|
|||
- (id) initWithString: (NSString*)description
|
||||
calendarFormat: (NSString*)fmt
|
||||
locale: (NSDictionary*)locale;
|
||||
- (id) initWithYear: (int)year
|
||||
month: (unsigned int)month
|
||||
day: (unsigned int)day
|
||||
hour: (unsigned int)hour
|
||||
minute: (unsigned int)minute
|
||||
second: (unsigned int)second
|
||||
- (id) initWithYear: (NSInteger)year
|
||||
month: (NSUInteger)month
|
||||
day: (NSUInteger)day
|
||||
hour: (NSUInteger)hour
|
||||
minute: (NSUInteger)minute
|
||||
second: (NSUInteger)second
|
||||
timeZone: (NSTimeZone*)aTimeZone;
|
||||
|
||||
// Retrieving Date Elements
|
||||
- (int) dayOfCommonEra;
|
||||
- (int) dayOfMonth;
|
||||
- (int) dayOfWeek;
|
||||
- (int) dayOfYear;
|
||||
- (int) hourOfDay;
|
||||
- (int) minuteOfHour;
|
||||
- (int) monthOfYear;
|
||||
- (int) secondOfMinute;
|
||||
- (int) yearOfCommonEra;
|
||||
- (NSInteger) dayOfCommonEra;
|
||||
- (NSInteger) dayOfMonth;
|
||||
- (NSInteger) dayOfWeek;
|
||||
- (NSInteger) dayOfYear;
|
||||
- (NSInteger) hourOfDay;
|
||||
- (NSInteger) minuteOfHour;
|
||||
- (NSInteger) monthOfYear;
|
||||
- (NSInteger) secondOfMinute;
|
||||
- (NSInteger) yearOfCommonEra;
|
||||
|
||||
// Providing Adjusted Dates
|
||||
- (NSCalendarDate*) addYear: (int)year
|
||||
month: (int)month
|
||||
day: (int)day
|
||||
hour: (int)hour
|
||||
minute: (int)minute
|
||||
second: (int)second;
|
||||
- (NSCalendarDate*) addYear: (NSInteger)year
|
||||
month: (NSInteger)month
|
||||
day: (NSInteger)day
|
||||
hour: (NSInteger)hour
|
||||
minute: (NSInteger)minute
|
||||
second: (NSInteger)second;
|
||||
|
||||
// Getting String Descriptions of Dates
|
||||
- (NSString*) description;
|
||||
|
@ -126,17 +126,17 @@ extern "C" {
|
|||
* last day of the year is a monday tuesday or wednesday, these days are
|
||||
* part of week 1 of the next year.
|
||||
*/
|
||||
- (int) weekOfYear;
|
||||
- (NSInteger) weekOfYear;
|
||||
@end
|
||||
|
||||
@interface NSCalendarDate (GregorianDate)
|
||||
|
||||
- (int) lastDayOfGregorianMonth: (int)month year: (int)year;
|
||||
- (int) absoluteGregorianDay: (int)day month: (int)month year: (int)year;
|
||||
- (void) gregorianDateFromAbsolute: (int)d
|
||||
day: (int*)day
|
||||
month: (int*)month
|
||||
year: (int*)year;
|
||||
- (NSInteger) lastDayOfGregorianMonth: (NSInteger)month year: (NSInteger)year;
|
||||
- (NSInteger) absoluteGregorianDay: (NSInteger)day month: (NSInteger)month year: (NSInteger)year;
|
||||
- (void) gregorianDateFromAbsolute: (NSInteger)d
|
||||
day: (NSInteger*)day
|
||||
month: (NSInteger*)month
|
||||
year: (NSInteger*)year;
|
||||
|
||||
@end
|
||||
|
||||
|
@ -145,19 +145,19 @@ extern "C" {
|
|||
#if OS_API_VERSION(GS_API_OPENSTEP, GS_API_MACOSX)
|
||||
@interface NSCalendarDate (OPENSTEP)
|
||||
|
||||
- (NSCalendarDate*) dateByAddingYears: (int)years
|
||||
months: (int)months
|
||||
days: (int)days
|
||||
hours: (int)hours
|
||||
minutes: (int)minutes
|
||||
seconds: (int)seconds;
|
||||
- (NSCalendarDate*) dateByAddingYears: (NSInteger)years
|
||||
months: (NSInteger)months
|
||||
days: (NSInteger)days
|
||||
hours: (NSInteger)hours
|
||||
minutes: (NSInteger)minutes
|
||||
seconds: (NSInteger)seconds;
|
||||
|
||||
- (void) years: (int*)years
|
||||
months: (int*)months
|
||||
days: (int*)days
|
||||
hours: (int*)hours
|
||||
minutes: (int*)minutes
|
||||
seconds: (int*)seconds
|
||||
- (void) years: (NSInteger*)years
|
||||
months: (NSInteger*)months
|
||||
days: (NSInteger*)days
|
||||
hours: (NSInteger*)hours
|
||||
minutes: (NSInteger*)minutes
|
||||
seconds: (NSInteger*)seconds
|
||||
sinceDate: (NSDate*)date;
|
||||
@end
|
||||
#endif
|
||||
|
|
|
@ -57,7 +57,7 @@ extern "C" {
|
|||
* well.
|
||||
*/
|
||||
- (void) encodeArrayOfObjCType: (const char*)type
|
||||
count: (unsigned)count
|
||||
count: (NSUInteger)count
|
||||
at: (const void*)array;
|
||||
|
||||
/**
|
||||
|
@ -72,7 +72,7 @@ extern "C" {
|
|||
/**
|
||||
* Stores bytes directly into archive.
|
||||
*/
|
||||
- (void) encodeBytes: (void*)d length: (unsigned)l;
|
||||
- (void) encodeBytes: (void*)d length: (NSUInteger)l;
|
||||
|
||||
/**
|
||||
* Encode object if it is/will be encoded unconditionally by this coder,
|
||||
|
@ -141,13 +141,13 @@ extern "C" {
|
|||
* well. Objects will be retained and you must release them.
|
||||
*/
|
||||
- (void) decodeArrayOfObjCType: (const char*)type
|
||||
count: (unsigned)count
|
||||
count: (NSUInteger)count
|
||||
at: (void*)address;
|
||||
|
||||
/**
|
||||
* Retrieve bytes directly from archive.
|
||||
*/
|
||||
- (void*) decodeBytesWithReturnedLength: (unsigned*)l;
|
||||
- (void*) decodeBytesWithReturnedLength: (NSUInteger*)l;
|
||||
|
||||
/**
|
||||
* Decode an instance of [NSData].
|
||||
|
@ -257,7 +257,7 @@ extern "C" {
|
|||
* -encodeBytes:length:forKey:
|
||||
*/
|
||||
- (const uint8_t*) decodeBytesForKey: (NSString*)aKey
|
||||
returnedLength: (unsigned*)alength;
|
||||
returnedLength: (NSUInteger*)alength;
|
||||
|
||||
/** <override-subclass />
|
||||
* Returns a double value associated with aKey. This value must previously
|
||||
|
@ -313,7 +313,7 @@ extern "C" {
|
|||
* and associates the encoded value with aKey.
|
||||
*/
|
||||
- (void) encodeBytes: (const uint8_t*)aPointer
|
||||
length: (unsigned)length
|
||||
length: (NSUInteger)length
|
||||
forKey: (NSString*)aKey;
|
||||
|
||||
/** <override-subclass />
|
||||
|
@ -333,17 +333,17 @@ extern "C" {
|
|||
- (void) encodeFloat: (float)aFloat forKey: (NSString*)aKey;
|
||||
|
||||
/** <override-subclass />
|
||||
* Encodes anInteger and associates the encoded value with aKey.
|
||||
* Encodes an int and associates the encoded value with aKey.
|
||||
*/
|
||||
- (void) encodeInt: (int)anInteger forKey: (NSString*)aKey;
|
||||
|
||||
/** <override-subclass />
|
||||
* Encodes anInteger and associates the encoded value with aKey.
|
||||
* Encodes 32 bit integer and associates the encoded value with aKey.
|
||||
*/
|
||||
- (void) encodeInt32: (int32_t)anInteger forKey: (NSString*)aKey;
|
||||
|
||||
/** <override-subclass />
|
||||
* Encodes anInteger and associates the encoded value with aKey.
|
||||
* Encodes a 64 bit integer and associates the encoded value with aKey.
|
||||
*/
|
||||
- (void) encodeInt64: (int64_t)anInteger forKey: (NSString*)aKey;
|
||||
|
||||
|
@ -355,12 +355,12 @@ extern "C" {
|
|||
|
||||
#if OS_API_VERSION(100500, GS_API_LATEST)
|
||||
/** <override-subclass />
|
||||
* Encodes anInteger and associates the encoded value with key.
|
||||
* Encodes an NSInteger and associates the encoded value with key.
|
||||
*/
|
||||
|
||||
- (void) encodeInteger: (NSInteger)anInteger forKey: (NSString *)key;
|
||||
/** <override-subclass />
|
||||
* Decodes an integer associated with the key.
|
||||
* Decodes an NSInteger associated with the key.
|
||||
*/
|
||||
- (NSInteger) decodeIntegerForKey: (NSString *)key;
|
||||
#endif
|
||||
|
|
|
@ -73,7 +73,7 @@ typedef enum _NSPredicateOperatorType
|
|||
{
|
||||
NSComparisonPredicateModifier _modifier;
|
||||
SEL _selector;
|
||||
unsigned _options;
|
||||
NSUInteger _options;
|
||||
NSPredicateOperatorType _type;
|
||||
@public
|
||||
NSExpression *_left;
|
||||
|
@ -87,7 +87,7 @@ typedef enum _NSPredicateOperatorType
|
|||
rightExpression: (NSExpression *)right
|
||||
modifier: (NSComparisonPredicateModifier)modifier
|
||||
type: (NSPredicateOperatorType)type
|
||||
options: (unsigned) opts;
|
||||
options: (NSUInteger) opts;
|
||||
|
||||
- (NSComparisonPredicateModifier) comparisonPredicateModifier;
|
||||
- (SEL) customSelector;
|
||||
|
@ -98,9 +98,9 @@ typedef enum _NSPredicateOperatorType
|
|||
rightExpression: (NSExpression *)right
|
||||
modifier: (NSComparisonPredicateModifier)modifier
|
||||
type: (NSPredicateOperatorType)type
|
||||
options: (unsigned) opts;
|
||||
options: (NSUInteger) opts;
|
||||
- (NSExpression *) leftExpression;
|
||||
- (unsigned) options;
|
||||
- (NSUInteger) options;
|
||||
- (NSPredicateOperatorType) predicateOperatorType;
|
||||
- (NSExpression *) rightExpression;
|
||||
|
||||
|
|
|
@ -34,12 +34,13 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef enum _NSCompoundPredicateType
|
||||
enum
|
||||
{
|
||||
NSNotPredicateType = 0,
|
||||
NSAndPredicateType,
|
||||
NSOrPredicateType
|
||||
} NSCompoundPredicateType;
|
||||
};
|
||||
typedef NSUInteger NSCompoundPredicateType;
|
||||
|
||||
@interface NSCompoundPredicate : NSPredicate
|
||||
{
|
||||
|
|
|
@ -56,12 +56,12 @@ enum {
|
|||
|
||||
+ (id) data;
|
||||
+ (id) dataWithBytes: (const void*)bytes
|
||||
length: (unsigned int)length;
|
||||
length: (NSUInteger)length;
|
||||
+ (id) dataWithBytesNoCopy: (void*)bytes
|
||||
length: (unsigned int)length;
|
||||
length: (NSUInteger)length;
|
||||
#if OS_API_VERSION(GS_API_MACOSX, GS_API_LATEST)
|
||||
+ (id) dataWithBytesNoCopy: (void*)aBuffer
|
||||
length: (unsigned int)bufferSize
|
||||
length: (NSUInteger)bufferSize
|
||||
freeWhenDone: (BOOL)shouldFree;
|
||||
#endif
|
||||
+ (id) dataWithContentsOfFile: (NSString*)path;
|
||||
|
@ -71,12 +71,12 @@ enum {
|
|||
#endif
|
||||
+ (id) dataWithData: (NSData*)data;
|
||||
- (id) initWithBytes: (const void*)aBuffer
|
||||
length: (unsigned int)bufferSize;
|
||||
length: (NSUInteger)bufferSize;
|
||||
- (id) initWithBytesNoCopy: (void*)aBuffer
|
||||
length: (unsigned int)bufferSize;
|
||||
length: (NSUInteger)bufferSize;
|
||||
#if OS_API_VERSION(GS_API_MACOSX, GS_API_LATEST)
|
||||
- (id) initWithBytesNoCopy: (void*)aBuffer
|
||||
length: (unsigned int)bufferSize
|
||||
length: (NSUInteger)bufferSize
|
||||
freeWhenDone: (BOOL)shouldFree;
|
||||
#endif
|
||||
- (id) initWithContentsOfFile: (NSString*)path;
|
||||
|
@ -92,7 +92,7 @@ enum {
|
|||
- (NSString*) description;
|
||||
- (void) getBytes: (void*)buffer;
|
||||
- (void) getBytes: (void*)buffer
|
||||
length: (unsigned int)length;
|
||||
length: (NSUInteger)length;
|
||||
- (void) getBytes: (void*)buffer
|
||||
range: (NSRange)aRange;
|
||||
- (NSData*) subdataWithRange: (NSRange)aRange;
|
||||
|
@ -100,7 +100,7 @@ enum {
|
|||
// Querying a Data Object
|
||||
|
||||
- (BOOL) isEqualToData: (NSData*)other;
|
||||
- (unsigned int) length;
|
||||
- (NSUInteger) length;
|
||||
|
||||
// Storing Data
|
||||
|
||||
|
@ -284,8 +284,8 @@ enum {
|
|||
#define _GSC_CID 0x17 /* Class encoded as id */
|
||||
|
||||
@interface NSData (GNUstepExtensions)
|
||||
+ (id) dataWithShmID: (int)anID length: (unsigned int) length;
|
||||
+ (id) dataWithSharedBytes: (const void*)bytes length: (unsigned int) length;
|
||||
+ (id) dataWithShmID: (int)anID length: (NSUInteger) length;
|
||||
+ (id) dataWithSharedBytes: (const void*)bytes length: (NSUInteger) length;
|
||||
|
||||
/*
|
||||
* -deserializeTypeTag:andCrossRef:atCursor:
|
||||
|
@ -300,21 +300,21 @@ enum {
|
|||
|
||||
@interface NSMutableData : NSData
|
||||
|
||||
+ (id) dataWithCapacity: (unsigned int)numBytes;
|
||||
+ (id) dataWithLength: (unsigned int)length;
|
||||
- (id) initWithCapacity: (unsigned int)capacity;
|
||||
- (id) initWithLength: (unsigned int)length;
|
||||
+ (id) dataWithCapacity: (NSUInteger)numBytes;
|
||||
+ (id) dataWithLength: (NSUInteger)length;
|
||||
- (id) initWithCapacity: (NSUInteger)capacity;
|
||||
- (id) initWithLength: (NSUInteger)length;
|
||||
|
||||
// Adjusting Capacity
|
||||
|
||||
- (void) increaseLengthBy: (unsigned int)extraLength;
|
||||
- (void) setLength: (unsigned int)size;
|
||||
- (void) increaseLengthBy: (NSUInteger)extraLength;
|
||||
- (void) setLength: (NSUInteger)size;
|
||||
- (void*) mutableBytes;
|
||||
|
||||
// Appending Data
|
||||
|
||||
- (void) appendBytes: (const void*)aBuffer
|
||||
length: (unsigned int)bufferSize;
|
||||
length: (NSUInteger)bufferSize;
|
||||
- (void) appendData: (NSData*)other;
|
||||
|
||||
// Modifying Data
|
||||
|
@ -324,7 +324,7 @@ enum {
|
|||
#if OS_API_VERSION(GS_API_MACOSX, GS_API_LATEST)
|
||||
- (void) replaceBytesInRange: (NSRange)aRange
|
||||
withBytes: (const void*)bytes
|
||||
length: (unsigned int)length;
|
||||
length: (NSUInteger)length;
|
||||
#endif
|
||||
- (void) resetBytesInRange: (NSRange)aRange;
|
||||
- (void) setData: (NSData*)data;
|
||||
|
@ -353,8 +353,8 @@ enum {
|
|||
* Capacity management - GNUstep gives you control over the size of
|
||||
* the data buffer as well as the 'length' of valid data in it.
|
||||
*/
|
||||
- (unsigned int) capacity;
|
||||
- (id) setCapacity: (unsigned int)newCapacity;
|
||||
- (NSUInteger) capacity;
|
||||
- (id) setCapacity: (NSUInteger)newCapacity;
|
||||
|
||||
- (int) shmID; /* Shared memory ID for data buffer (if any) */
|
||||
|
||||
|
|
|
@ -453,19 +453,19 @@ GS_EXPORT BOOL NSDeallocateZombies;
|
|||
* Retrieve stack information. Use caution: uses built-in gcc functions
|
||||
* and currently only works up to 100 frames.
|
||||
*/
|
||||
GS_EXPORT void *NSFrameAddress(int offset);
|
||||
GS_EXPORT void *NSFrameAddress(NSUInteger offset);
|
||||
|
||||
/**
|
||||
* Retrieve stack information. Use caution: uses built-in gcc functions
|
||||
* and currently only works up to 100 frames.
|
||||
*/
|
||||
GS_EXPORT void *NSReturnAddress(int offset);
|
||||
GS_EXPORT void *NSReturnAddress(NSUInteger offset);
|
||||
|
||||
/**
|
||||
* Retrieve stack information. Use caution: uses built-in gcc functions
|
||||
* and currently only works up to 100 frames.
|
||||
*/
|
||||
GS_EXPORT unsigned NSCountFrames(void);
|
||||
GS_EXPORT NSUInteger NSCountFrames(void);
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
|
|
|
@ -50,12 +50,13 @@ extern "C" {
|
|||
* .5 rounds to make last remaining digit even). See the
|
||||
* [(NSDecimalNumberBehaviors)] protocol.
|
||||
*/
|
||||
typedef enum {
|
||||
enum {
|
||||
NSRoundPlain, /* Round .5 up */
|
||||
NSRoundDown,
|
||||
NSRoundUp,
|
||||
NSRoundBankers /* Make last digit even */
|
||||
} NSRoundingMode;
|
||||
};
|
||||
typedef NSUInteger NSRoundingMode;
|
||||
|
||||
/**
|
||||
* Enumerated type for specifying a decimal calculation error. Can be one of
|
||||
|
@ -73,13 +74,14 @@ typedef enum {
|
|||
* <desc>The caller tried to divide by 0.</desc>
|
||||
* </deflist>
|
||||
*/
|
||||
typedef enum {
|
||||
enum {
|
||||
NSCalculationNoError = 0,
|
||||
NSCalculationLossOfPrecision,
|
||||
NSCalculationUnderflow, /* result became zero */
|
||||
NSCalculationOverflow,
|
||||
NSCalculationDivideByZero
|
||||
} NSCalculationError;
|
||||
};
|
||||
typedef NSUInteger NSCalculationError;
|
||||
|
||||
/**
|
||||
* Give a precision of at least 38 decimal digits
|
||||
|
@ -149,7 +151,8 @@ NSDecimalCompare(const NSDecimal *leftOperand, const NSDecimal *rightOperand);
|
|||
* but can be the same as number.
|
||||
*/
|
||||
GS_EXPORT void
|
||||
NSDecimalRound(NSDecimal *result, const NSDecimal *number, int scale, NSRoundingMode mode);
|
||||
NSDecimalRound(NSDecimal *result, const NSDecimal *number, NSInteger scale,
|
||||
NSRoundingMode mode);
|
||||
|
||||
/**
|
||||
* Sets the exponents of n1 and n2 equal to one another, adjusting mantissas
|
||||
|
@ -201,7 +204,8 @@ NSDecimalDivide(NSDecimal *result, const NSDecimal *l, const NSDecimal *rr, NSRo
|
|||
* n or power.
|
||||
*/
|
||||
GS_EXPORT NSCalculationError
|
||||
NSDecimalPower(NSDecimal *result, const NSDecimal *n, unsigned power, NSRoundingMode mode);
|
||||
NSDecimalPower(NSDecimal *result, const NSDecimal *n, NSUInteger power,
|
||||
NSRoundingMode mode);
|
||||
|
||||
/**
|
||||
* Multiplies n by 10^power and returns result to 38-digit precision. See the
|
||||
|
|
|
@ -362,33 +362,35 @@ extern "C" {
|
|||
* behavior for rounding/precision/error handling.
|
||||
*/
|
||||
- (NSDecimalNumber *)decimalNumberByMultiplyingByPowerOf10:(short)power
|
||||
withBehavior:(id <NSDecimalNumberBehaviors>)behavior;
|
||||
withBehavior:(id <NSDecimalNumberBehaviors>)behavior;
|
||||
|
||||
/**
|
||||
* Raises self to given positive integer power and returns new result, using
|
||||
* +defaultBehavior for rounding/precision/error handling.
|
||||
*/
|
||||
- (NSDecimalNumber *)decimalNumberByRaisingToPower:(unsigned)power;
|
||||
- (NSDecimalNumber *)decimalNumberByRaisingToPower:(NSUInteger)power;
|
||||
|
||||
/**
|
||||
* Raises self to given positive integer power and returns new result, using
|
||||
* given behavior for rounding/precision/error handling.
|
||||
*/
|
||||
- (NSDecimalNumber *)decimalNumberByRaisingToPower:(unsigned)power
|
||||
withBehavior:(id <NSDecimalNumberBehaviors>)behavior;
|
||||
- (NSDecimalNumber *)decimalNumberByRaisingToPower:(NSUInteger)power
|
||||
withBehavior:(id <NSDecimalNumberBehaviors>)behavior;
|
||||
|
||||
/**
|
||||
* Subtracts decimalNumber from self and returns new result, using
|
||||
* +defaultBehavior for rounding/precision/error handling.
|
||||
*/
|
||||
- (NSDecimalNumber *)decimalNumberBySubtracting:(NSDecimalNumber *)decimalNumber;
|
||||
- (NSDecimalNumber *)decimalNumberBySubtracting:
|
||||
(NSDecimalNumber *)decimalNumber;
|
||||
|
||||
/**
|
||||
* Subtracts decimalNumber from self and returns new result, using given
|
||||
* behavior for rounding/precision/error handling.
|
||||
*/
|
||||
- (NSDecimalNumber *)decimalNumberBySubtracting:(NSDecimalNumber *)decimalNumber
|
||||
withBehavior:(id <NSDecimalNumberBehaviors>)behavior;
|
||||
- (NSDecimalNumber *)decimalNumberBySubtracting:
|
||||
(NSDecimalNumber *)decimalNumber
|
||||
withBehavior:(id <NSDecimalNumberBehaviors>)behavior;
|
||||
|
||||
/**
|
||||
* Returns rounded version of underlying decimal.
|
||||
|
|
|
@ -45,18 +45,18 @@ extern "C" {
|
|||
+ (id) dictionaryWithObjects: (NSArray*)objects forKeys: (NSArray*)keys;
|
||||
+ (id) dictionaryWithObjects: (id*)objects
|
||||
forKeys: (id*)keys
|
||||
count: (unsigned)count;
|
||||
count: (NSUInteger)count;
|
||||
+ (id) dictionaryWithObjectsAndKeys: (id)firstObject, ...;
|
||||
|
||||
- (NSArray*) allKeys;
|
||||
- (NSArray*) allKeysForObject: (id)anObject;
|
||||
- (NSArray*) allValues;
|
||||
- (unsigned) count; // Primitive
|
||||
- (NSUInteger) count; // Primitive
|
||||
- (NSString*) description;
|
||||
- (NSString*) descriptionInStringsFileFormat;
|
||||
- (NSString*) descriptionWithLocale: (NSDictionary*)locale;
|
||||
- (NSString*) descriptionWithLocale: (NSDictionary*)locale
|
||||
indent: (unsigned int)level;
|
||||
indent: (NSUInteger)level;
|
||||
|
||||
- (id) init;
|
||||
- (id) initWithContentsOfFile: (NSString*)path;
|
||||
|
@ -69,7 +69,7 @@ extern "C" {
|
|||
- (id) initWithObjectsAndKeys: (id)firstObject, ...;
|
||||
- (id) initWithObjects: (id*)objects
|
||||
forKeys: (id*)keys
|
||||
count: (unsigned)count; // Primitive
|
||||
count: (NSUInteger)count; // Primitive
|
||||
- (BOOL) isEqualToDictionary: (NSDictionary*)other;
|
||||
|
||||
- (NSEnumerator*) keyEnumerator; // Primitive
|
||||
|
@ -87,10 +87,10 @@ extern "C" {
|
|||
|
||||
@interface NSMutableDictionary: NSDictionary
|
||||
|
||||
+ (id) dictionaryWithCapacity: (unsigned)numItems;
|
||||
+ (id) dictionaryWithCapacity: (NSUInteger)numItems;
|
||||
|
||||
- (void) addEntriesFromDictionary: (NSDictionary*)otherDictionary;
|
||||
- (id) initWithCapacity: (unsigned)numItems; // Primitive
|
||||
- (id) initWithCapacity: (NSUInteger)numItems; // Primitive
|
||||
- (void) removeAllObjects;
|
||||
- (void) removeObjectForKey: (id)aKey; // Primitive
|
||||
- (void) removeObjectsForKeys: (NSArray*)keyArray;
|
||||
|
|
|
@ -50,12 +50,13 @@ extern "C" {
|
|||
}
|
||||
</example>
|
||||
*/
|
||||
typedef enum {
|
||||
enum {
|
||||
NSNotificationSuspensionBehaviorDrop = 1,
|
||||
NSNotificationSuspensionBehaviorCoalesce = 2,
|
||||
NSNotificationSuspensionBehaviorHold = 3,
|
||||
NSNotificationSuspensionBehaviorDeliverImmediately = 4
|
||||
} NSNotificationSuspensionBehavior;
|
||||
};
|
||||
typedef NSUInteger NSNotificationSuspensionBehavior;
|
||||
|
||||
/**
|
||||
* Type for [NSDistributedNotificationCenter+notificationCenterForType:] -
|
||||
|
|
|
@ -126,14 +126,14 @@ GS_EXPORT NSString* const NSCocoaErrorDomain;
|
|||
* -initWithDomain:code:userInfo:
|
||||
*/
|
||||
+ (id) errorWithDomain: (NSString*)aDomain
|
||||
code: (int)aCode
|
||||
code: (NSInteger)aCode
|
||||
userInfo: (NSDictionary*)aDictionary;
|
||||
|
||||
/**
|
||||
* Return the error code ... which is not globally unique, just unique for
|
||||
* a particular domain.
|
||||
*/
|
||||
- (int) code;
|
||||
- (NSInteger) code;
|
||||
|
||||
/**
|
||||
* Return the domain for this instance.
|
||||
|
@ -145,7 +145,7 @@ GS_EXPORT NSString* const NSCocoaErrorDomain;
|
|||
* The domain must be non-nil.
|
||||
*/
|
||||
- (id) initWithDomain: (NSString*)aDomain
|
||||
code: (int)aCode
|
||||
code: (NSInteger)aCode
|
||||
userInfo: (NSDictionary*)aDictionary;
|
||||
|
||||
/**
|
||||
|
|
|
@ -357,13 +357,13 @@ GS_EXPORT void _NSRemoveHandler( NSHandler *handler );
|
|||
|
||||
- (void) handleFailureInFunction: (NSString*)functionName
|
||||
file: (NSString*)fileName
|
||||
lineNumber: (int)line
|
||||
lineNumber: (NSInteger)line
|
||||
description: (NSString*)format,...;
|
||||
|
||||
- (void) handleFailureInMethod: (SEL)aSelector
|
||||
object: object
|
||||
file: (NSString*)fileName
|
||||
lineNumber: (int)line
|
||||
lineNumber: (NSInteger)line
|
||||
description: (NSString*)format,...;
|
||||
|
||||
@end
|
||||
|
|
|
@ -38,14 +38,15 @@ extern "C" {
|
|||
@class NSMutableDictionary;
|
||||
@class NSString;
|
||||
|
||||
typedef enum _NSExpressionType
|
||||
enum
|
||||
{
|
||||
NSConstantValueExpressionType=0,
|
||||
NSEvaluatedObjectExpressionType,
|
||||
NSVariableExpressionType,
|
||||
NSKeyPathExpressionType,
|
||||
NSFunctionExpressionType
|
||||
} NSExpressionType;
|
||||
};
|
||||
typedef NSUInteger NSExpressionType;
|
||||
|
||||
@interface NSExpression : NSObject <NSCoding, NSCopying>
|
||||
{
|
||||
|
|
|
@ -268,7 +268,7 @@ extern "C" {
|
|||
* with unicode strings.
|
||||
*/
|
||||
- (NSString*) stringWithFileSystemRepresentation: (const GSNativeChar*)string
|
||||
length: (unsigned int)len;
|
||||
length: (NSUInteger)len;
|
||||
|
||||
- (NSArray*) subpathsAtPath: (NSString*)path;
|
||||
|
||||
|
@ -465,9 +465,9 @@ GS_EXPORT NSString* const NSFileSystemFreeNodes;
|
|||
- (unsigned long) fileGroupOwnerAccountID;
|
||||
- (NSString*) fileGroupOwnerAccountName;
|
||||
- (NSDate*) fileModificationDate;
|
||||
- (unsigned long) filePosixPermissions;
|
||||
- (unsigned long) fileSystemNumber;
|
||||
- (unsigned long) fileSystemFileNumber;
|
||||
- (NSUInteger) filePosixPermissions;
|
||||
- (NSUInteger) fileSystemNumber;
|
||||
- (NSUInteger) fileSystemFileNumber;
|
||||
@end
|
||||
|
||||
#if defined(__cplusplus)
|
||||
|
|
|
@ -52,15 +52,15 @@ extern "C" {
|
|||
|
||||
/**
|
||||
<example>{
|
||||
float x;
|
||||
float y;
|
||||
CGFloat x;
|
||||
CGFloat y;
|
||||
}</example>
|
||||
<p>Represents a 2-d cartesian position.</p> */
|
||||
typedef struct _NSPoint NSPoint;
|
||||
struct _NSPoint
|
||||
{
|
||||
float x;
|
||||
float y;
|
||||
CGFloat x;
|
||||
CGFloat y;
|
||||
};
|
||||
|
||||
#if OS_API_VERSION(GS_API_MACOSX, GS_API_LATEST)
|
||||
|
@ -72,15 +72,15 @@ typedef NSPoint *NSPointPointer;
|
|||
|
||||
/**
|
||||
<example>{
|
||||
float width;
|
||||
float height;
|
||||
CGFloat width;
|
||||
CGFloat height;
|
||||
}</example>
|
||||
<p>Floating point rectangle size.</p> */
|
||||
typedef struct _NSSize NSSize;
|
||||
struct _NSSize
|
||||
{
|
||||
float width;
|
||||
float height;
|
||||
CGFloat width;
|
||||
CGFloat height;
|
||||
};
|
||||
|
||||
#if OS_API_VERSION(GS_API_MACOSX, GS_API_LATEST)
|
||||
|
@ -111,6 +111,13 @@ typedef NSRect *NSRectArray;
|
|||
typedef NSRect *NSRectPointer;
|
||||
#endif
|
||||
|
||||
enum
|
||||
{
|
||||
NSMinXEdge = 0,
|
||||
NSMinYEdge = 1,
|
||||
NSMaxXEdge = 2,
|
||||
NSMaxYEdge = 3
|
||||
};
|
||||
/** Sides of a rectangle.
|
||||
<example>
|
||||
{
|
||||
|
@ -121,13 +128,7 @@ typedef NSRect *NSRectPointer;
|
|||
}
|
||||
</example>
|
||||
*/
|
||||
typedef enum _NSRectEdge
|
||||
{
|
||||
NSMinXEdge = 0,
|
||||
NSMinYEdge = 1,
|
||||
NSMaxXEdge = 2,
|
||||
NSMaxYEdge = 3
|
||||
} NSRectEdge;
|
||||
typedef NSUInteger NSRectEdge;
|
||||
|
||||
/** Point at 0,0 */
|
||||
static const NSPoint NSZeroPoint __attribute__((unused)) = {0.0,0.0};
|
||||
|
@ -156,11 +157,11 @@ static const NSSize NSZeroSize __attribute__((unused)) = {0.0,0.0};
|
|||
/** Create Basic Structures... **/
|
||||
|
||||
GS_GEOM_SCOPE NSPoint
|
||||
NSMakePoint(float x, float y) GS_GEOM_ATTR;
|
||||
NSMakePoint(CGFloat x, CGFloat y) GS_GEOM_ATTR;
|
||||
|
||||
/** Returns an NSPoint having x-coordinate X and y-coordinate Y. */
|
||||
GS_GEOM_SCOPE NSPoint
|
||||
NSMakePoint(float x, float y)
|
||||
NSMakePoint(CGFloat x, CGFloat y)
|
||||
{
|
||||
NSPoint point;
|
||||
|
||||
|
@ -170,11 +171,11 @@ NSMakePoint(float x, float y)
|
|||
}
|
||||
|
||||
GS_GEOM_SCOPE NSSize
|
||||
NSMakeSize(float w, float h) GS_GEOM_ATTR;
|
||||
NSMakeSize(CGFloat w, CGFloat h) GS_GEOM_ATTR;
|
||||
|
||||
/** Returns an NSSize having width w and height h. */
|
||||
GS_GEOM_SCOPE NSSize
|
||||
NSMakeSize(float w, float h)
|
||||
NSMakeSize(CGFloat w, CGFloat h)
|
||||
{
|
||||
NSSize size;
|
||||
|
||||
|
@ -184,11 +185,11 @@ NSMakeSize(float w, float h)
|
|||
}
|
||||
|
||||
GS_GEOM_SCOPE NSRect
|
||||
NSMakeRect(float x, float y, float w, float h) GS_GEOM_ATTR;
|
||||
NSMakeRect(CGFloat x, CGFloat y, CGFloat w, CGFloat h) GS_GEOM_ATTR;
|
||||
|
||||
/** Returns an NSRect having point of origin (x, y) and size {w, h}. */
|
||||
GS_GEOM_SCOPE NSRect
|
||||
NSMakeRect(float x, float y, float w, float h)
|
||||
NSMakeRect(CGFloat x, CGFloat y, CGFloat w, CGFloat h)
|
||||
{
|
||||
NSRect rect;
|
||||
|
||||
|
@ -201,81 +202,81 @@ NSMakeRect(float x, float y, float w, float h)
|
|||
|
||||
/** Get a Rectangle's Coordinates... **/
|
||||
|
||||
GS_GEOM_SCOPE float
|
||||
GS_GEOM_SCOPE CGFloat
|
||||
NSMaxX(NSRect aRect) GS_GEOM_ATTR;
|
||||
|
||||
/** Returns the greatest x-coordinate value still inside aRect. */
|
||||
GS_GEOM_SCOPE float
|
||||
GS_GEOM_SCOPE CGFloat
|
||||
NSMaxX(NSRect aRect)
|
||||
{
|
||||
return aRect.origin.x + aRect.size.width;
|
||||
}
|
||||
|
||||
GS_GEOM_SCOPE float
|
||||
GS_GEOM_SCOPE CGFloat
|
||||
NSMaxY(NSRect aRect) GS_GEOM_ATTR;
|
||||
|
||||
/** Returns the greatest y-coordinate value still inside aRect. */
|
||||
GS_GEOM_SCOPE float
|
||||
GS_GEOM_SCOPE CGFloat
|
||||
NSMaxY(NSRect aRect)
|
||||
{
|
||||
return aRect.origin.y + aRect.size.height;
|
||||
}
|
||||
|
||||
GS_GEOM_SCOPE float
|
||||
GS_GEOM_SCOPE CGFloat
|
||||
NSMidX(NSRect aRect) GS_GEOM_ATTR;
|
||||
|
||||
/** Returns the x-coordinate of aRect's middle point. */
|
||||
GS_GEOM_SCOPE float
|
||||
GS_GEOM_SCOPE CGFloat
|
||||
NSMidX(NSRect aRect)
|
||||
{
|
||||
return aRect.origin.x + (aRect.size.width / 2.0);
|
||||
}
|
||||
|
||||
GS_GEOM_SCOPE float
|
||||
GS_GEOM_SCOPE CGFloat
|
||||
NSMidY(NSRect aRect) GS_GEOM_ATTR;
|
||||
|
||||
/** Returns the y-coordinate of aRect's middle point. */
|
||||
GS_GEOM_SCOPE float
|
||||
GS_GEOM_SCOPE CGFloat
|
||||
NSMidY(NSRect aRect)
|
||||
{
|
||||
return aRect.origin.y + (aRect.size.height / 2.0);
|
||||
}
|
||||
|
||||
GS_GEOM_SCOPE float
|
||||
GS_GEOM_SCOPE CGFloat
|
||||
NSMinX(NSRect aRect) GS_GEOM_ATTR;
|
||||
|
||||
/** Returns the least x-coordinate value still inside aRect. */
|
||||
GS_GEOM_SCOPE float
|
||||
GS_GEOM_SCOPE CGFloat
|
||||
NSMinX(NSRect aRect)
|
||||
{
|
||||
return aRect.origin.x;
|
||||
}
|
||||
|
||||
GS_GEOM_SCOPE float
|
||||
GS_GEOM_SCOPE CGFloat
|
||||
NSMinY(NSRect aRect) GS_GEOM_ATTR;
|
||||
|
||||
/** Returns the least y-coordinate value still inside aRect. */
|
||||
GS_GEOM_SCOPE float
|
||||
GS_GEOM_SCOPE CGFloat
|
||||
NSMinY(NSRect aRect)
|
||||
{
|
||||
return aRect.origin.y;
|
||||
}
|
||||
|
||||
GS_GEOM_SCOPE float
|
||||
GS_GEOM_SCOPE CGFloat
|
||||
NSWidth(NSRect aRect) GS_GEOM_ATTR;
|
||||
|
||||
/** Returns aRect's width. */
|
||||
GS_GEOM_SCOPE float
|
||||
GS_GEOM_SCOPE CGFloat
|
||||
NSWidth(NSRect aRect)
|
||||
{
|
||||
return aRect.size.width;
|
||||
}
|
||||
|
||||
GS_GEOM_SCOPE float
|
||||
GS_GEOM_SCOPE CGFloat
|
||||
NSHeight(NSRect aRect) GS_GEOM_ATTR;
|
||||
|
||||
/** Returns aRect's height. */
|
||||
GS_GEOM_SCOPE float
|
||||
GS_GEOM_SCOPE CGFloat
|
||||
NSHeight(NSRect aRect)
|
||||
{
|
||||
return aRect.size.height;
|
||||
|
@ -295,12 +296,12 @@ NSIsEmptyRect(NSRect aRect)
|
|||
/** Modify a Copy of a Rectangle... **/
|
||||
|
||||
GS_GEOM_SCOPE NSRect
|
||||
NSOffsetRect(NSRect aRect, float dx, float dy) GS_GEOM_ATTR;
|
||||
NSOffsetRect(NSRect aRect, CGFloat dx, CGFloat dy) GS_GEOM_ATTR;
|
||||
|
||||
/** Returns the rectangle obtained by translating aRect
|
||||
* horizontally by dx and vertically by dy. */
|
||||
GS_GEOM_SCOPE NSRect
|
||||
NSOffsetRect(NSRect aRect, float dx, float dy)
|
||||
NSOffsetRect(NSRect aRect, CGFloat dx, CGFloat dy)
|
||||
{
|
||||
NSRect rect = aRect;
|
||||
|
||||
|
@ -310,7 +311,7 @@ NSOffsetRect(NSRect aRect, float dx, float dy)
|
|||
}
|
||||
|
||||
GS_GEOM_SCOPE NSRect
|
||||
NSInsetRect(NSRect aRect, float dX, float dY) GS_GEOM_ATTR;
|
||||
NSInsetRect(NSRect aRect, CGFloat dX, CGFloat dY) GS_GEOM_ATTR;
|
||||
|
||||
/** Returns the rectangle obtained by moving each of aRect's
|
||||
* horizontal sides inward by dy and each of aRect's vertical
|
||||
|
@ -319,7 +320,7 @@ NSInsetRect(NSRect aRect, float dX, float dY) GS_GEOM_ATTR;
|
|||
* a rectanglew with nagative width or height, strange as that seems.
|
||||
*/
|
||||
GS_GEOM_SCOPE NSRect
|
||||
NSInsetRect(NSRect aRect, float dX, float dY)
|
||||
NSInsetRect(NSRect aRect, CGFloat dX, CGFloat dY)
|
||||
{
|
||||
NSRect rect;
|
||||
|
||||
|
@ -337,7 +338,7 @@ GS_EXPORT void
|
|||
NSDivideRect(NSRect aRect,
|
||||
NSRect *slice,
|
||||
NSRect *remainder,
|
||||
float amount,
|
||||
CGFloat amount,
|
||||
NSRectEdge edge);
|
||||
|
||||
/** Returns a rectangle obtained by expanding aRect minimally
|
||||
|
|
|
@ -243,7 +243,7 @@ extern NSString * const NSHTTPCookieVersion; /** Obtain cookie version */
|
|||
* Returns 0 for an unversioned Netscape style cookie or a
|
||||
* positive integer for a versioned cookie.
|
||||
*/
|
||||
- (unsigned) version;
|
||||
- (NSUInteger) version;
|
||||
|
||||
@end
|
||||
|
||||
|
|
|
@ -38,17 +38,18 @@ extern "C" {
|
|||
@class NSHTTPCookie;
|
||||
@class NSURL;
|
||||
|
||||
enum {
|
||||
NSHTTPCookieAcceptPolicyAlways,
|
||||
NSHTTPCookieAcceptPolicyNever,
|
||||
NSHTTPCookieAcceptPolicyOnlyFromMainDocumentDomain
|
||||
};
|
||||
/**
|
||||
* NSHTTPCookieAcceptPolicyAlways Accept all cookies
|
||||
* NSHTTPCookieAcceptPolicyNever Reject all cookies
|
||||
* NSHTTPCookieAcceptPolicyOnlyFromMainDocumentDomain Accept cookies
|
||||
* only from the main document domain
|
||||
*/
|
||||
typedef enum {
|
||||
NSHTTPCookieAcceptPolicyAlways,
|
||||
NSHTTPCookieAcceptPolicyNever,
|
||||
NSHTTPCookieAcceptPolicyOnlyFromMainDocumentDomain
|
||||
} NSHTTPCookieAcceptPolicy;
|
||||
typedef NSUInteger NSHTTPCookieAcceptPolicy;
|
||||
|
||||
/**
|
||||
* Posted to the distributed notification center when the cookie
|
||||
|
|
|
@ -44,20 +44,20 @@ extern "C" {
|
|||
*/
|
||||
@interface NSIndexPath : NSObject <NSCopying, NSCoding>
|
||||
{
|
||||
unsigned _hash;
|
||||
unsigned _length;
|
||||
unsigned *_indexes;
|
||||
NSUInteger _hash;
|
||||
NSUInteger _length;
|
||||
NSUInteger *_indexes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a path containing the single value anIndex.
|
||||
*/
|
||||
+ (id) indexPathWithIndex: (unsigned)anIndex;
|
||||
+ (id) indexPathWithIndex: (NSUInteger)anIndex;
|
||||
|
||||
/**
|
||||
* Return a path containing all the indexes in the supplied array.
|
||||
*/
|
||||
+ (id) indexPathWithIndexes: (unsigned*)indexes length: (unsigned)length;
|
||||
+ (id) indexPathWithIndexes: (NSUInteger*)indexes length: (NSUInteger)length;
|
||||
|
||||
/**
|
||||
* Compares other with the receiver.<br />
|
||||
|
@ -71,18 +71,18 @@ extern "C" {
|
|||
/**
|
||||
* Copies all index values from the receiver into aBuffer.
|
||||
*/
|
||||
- (void) getIndexes: (unsigned*)aBuffer;
|
||||
- (void) getIndexes: (NSUInteger*)aBuffer;
|
||||
|
||||
/**
|
||||
* Return the index at the specified position or NSNotFound if there
|
||||
* is no index at the specified position.
|
||||
*/
|
||||
- (unsigned) indexAtPosition: (unsigned)position;
|
||||
- (NSUInteger) indexAtPosition: (NSUInteger)position;
|
||||
|
||||
/**
|
||||
* Return path formed by adding anIndex to the receiver.
|
||||
*/
|
||||
- (NSIndexPath *) indexPathByAddingIndex: (unsigned)anIndex;
|
||||
- (NSIndexPath *) indexPathByAddingIndex: (NSUInteger)anIndex;
|
||||
|
||||
/**
|
||||
* Return path formed by removing the last index from the receiver.
|
||||
|
@ -93,18 +93,18 @@ extern "C" {
|
|||
* Returns the shared instance containing the specified index, creating it
|
||||
* and destroying the receiver if necessary.
|
||||
*/
|
||||
- (id) initWithIndex: (unsigned)anIndex;
|
||||
- (id) initWithIndex: (NSUInteger)anIndex;
|
||||
|
||||
/** <init />
|
||||
* Returns the shared instance containing the specified index array,
|
||||
* creating it and destroying the receiver if necessary.
|
||||
*/
|
||||
- (id) initWithIndexes: (unsigned*)indexes length: (unsigned)length;
|
||||
- (id) initWithIndexes: (NSUInteger*)indexes length: (NSUInteger)length;
|
||||
|
||||
/**
|
||||
* Returns the number of index values present in the receiver.
|
||||
*/
|
||||
- (unsigned) length;
|
||||
- (NSUInteger) length;
|
||||
|
||||
@end
|
||||
|
||||
|
|
|
@ -57,7 +57,7 @@ extern "C" {
|
|||
* Return a set containing the single value anIndex, or returns nil if
|
||||
* anIndex is NSNotFound.
|
||||
*/
|
||||
+ (id) indexSetWithIndex: (unsigned int)anIndex;
|
||||
+ (id) indexSetWithIndex: (NSUInteger)anIndex;
|
||||
|
||||
/**
|
||||
* Return a set containing all the values in aRange, or returns nil if
|
||||
|
@ -68,7 +68,7 @@ extern "C" {
|
|||
/**
|
||||
* Returns YES if the receiver contains anIndex, NO otherwise.
|
||||
*/
|
||||
- (BOOL) containsIndex: (unsigned int)anIndex;
|
||||
- (BOOL) containsIndex: (NSUInteger)anIndex;
|
||||
|
||||
/**
|
||||
* Returns YES if the receiver contains all the index values present
|
||||
|
@ -85,7 +85,7 @@ extern "C" {
|
|||
/**
|
||||
* Returns the number of index values present in the receiver.
|
||||
*/
|
||||
- (unsigned int) count;
|
||||
- (NSUInteger) count;
|
||||
|
||||
#if OS_API_VERSION(100500,GS_API_LATEST)
|
||||
/** Not implemented
|
||||
|
@ -98,7 +98,7 @@ extern "C" {
|
|||
* Returns the first index value in the receiver or NSNotFound if the
|
||||
* receiver is empty.
|
||||
*/
|
||||
- (unsigned int) firstIndex;
|
||||
- (NSUInteger) firstIndex;
|
||||
|
||||
/**
|
||||
* Copies index values into aBuffer until there are no index values left or
|
||||
|
@ -109,39 +109,39 @@ extern "C" {
|
|||
* If aRange is a null pointer, this method attempts to get <em>all</em>
|
||||
* index values from the set (and of course no range can be returned in it).
|
||||
*/
|
||||
- (unsigned int) getIndexes: (unsigned int*)aBuffer
|
||||
maxCount: (unsigned int)aCount
|
||||
inIndexRange: (NSRangePointer)aRange;
|
||||
- (NSUInteger) getIndexes: (NSUInteger*)aBuffer
|
||||
maxCount: (NSUInteger)aCount
|
||||
inIndexRange: (NSRangePointer)aRange;
|
||||
|
||||
/**
|
||||
* Return the first index value in the receiver which is greater than
|
||||
* anIndex.
|
||||
*/
|
||||
- (unsigned int) indexGreaterThanIndex: (unsigned int)anIndex;
|
||||
- (NSUInteger) indexGreaterThanIndex: (NSUInteger)anIndex;
|
||||
|
||||
/**
|
||||
* Return the first index value in the receiver which is greater than
|
||||
* or equal to anIndex.
|
||||
*/
|
||||
- (unsigned int) indexGreaterThanOrEqualToIndex: (unsigned int)anIndex;
|
||||
- (NSUInteger) indexGreaterThanOrEqualToIndex: (NSUInteger)anIndex;
|
||||
|
||||
/**
|
||||
* Return the first index value in the receiver which is less than
|
||||
* anIndex.
|
||||
*/
|
||||
- (unsigned int) indexLessThanIndex: (unsigned int)anIndex;
|
||||
- (NSUInteger) indexLessThanIndex: (NSUInteger)anIndex;
|
||||
|
||||
/**
|
||||
* Return the first index value in the receiver which is less than
|
||||
* or equal to anIndex.
|
||||
*/
|
||||
- (unsigned int) indexLessThanOrEqualToIndex: (unsigned int)anIndex;
|
||||
- (NSUInteger) indexLessThanOrEqualToIndex: (NSUInteger)anIndex;
|
||||
|
||||
/**
|
||||
* Initialise the receiver to contain anIndex. Returns the initialised
|
||||
* object or nil if anIndex is NSNotFound.
|
||||
*/
|
||||
- (id) initWithIndex: (unsigned int)anIndex;
|
||||
- (id) initWithIndex: (NSUInteger)anIndex;
|
||||
|
||||
/** <init />
|
||||
* Initialise the receiver to contain all index values in aRange.
|
||||
|
@ -169,7 +169,7 @@ extern "C" {
|
|||
* Returns the last index value in the receiver or NSNotFound if the
|
||||
* receiver is empty.
|
||||
*/
|
||||
- (unsigned int) lastIndex;
|
||||
- (NSUInteger) lastIndex;
|
||||
@end
|
||||
|
||||
|
||||
|
@ -178,7 +178,7 @@ extern "C" {
|
|||
/**
|
||||
* Adds anIndex to the set of indexes stored in the receiver.
|
||||
*/
|
||||
- (void) addIndex: (unsigned int)anIndex;
|
||||
- (void) addIndex: (NSUInteger)anIndex;
|
||||
|
||||
/**
|
||||
* Adds all the indexes from aSet to the set of indexes stored in the receiver.
|
||||
|
@ -198,7 +198,7 @@ extern "C" {
|
|||
/**
|
||||
* Removes anIndex from the set of indexes stored in the receiver.
|
||||
*/
|
||||
- (void) removeIndex: (unsigned int)anIndex;
|
||||
- (void) removeIndex: (NSUInteger)anIndex;
|
||||
|
||||
/**
|
||||
* Removes all the indexes in aSet from the set of indexes
|
||||
|
@ -219,7 +219,8 @@ extern "C" {
|
|||
* If amount is positive, a 'hole' will be left in the index range after
|
||||
* anIndex.
|
||||
*/
|
||||
- (void) shiftIndexesStartingAtIndex: (unsigned int)anIndex by: (int)amount;
|
||||
- (void) shiftIndexesStartingAtIndex: (NSUInteger)anIndex
|
||||
by: (NSInteger)amount;
|
||||
|
||||
@end
|
||||
|
||||
|
|
|
@ -61,11 +61,11 @@ extern "C" {
|
|||
* Accessing message elements.
|
||||
*/
|
||||
- (void) getArgument: (void*)buffer
|
||||
atIndex: (int)index;
|
||||
atIndex: (NSInteger)index;
|
||||
- (void) getReturnValue: (void*)buffer;
|
||||
- (SEL) selector;
|
||||
- (void) setArgument: (void*)buffer
|
||||
atIndex: (int)index;
|
||||
atIndex: (NSInteger)index;
|
||||
- (void) setReturnValue: (void*)buffer;
|
||||
- (void) setSelector: (SEL)aSelector;
|
||||
- (void) setTarget: (id)anObject;
|
||||
|
|
|
@ -39,28 +39,31 @@ extern "C" {
|
|||
@class NSSet;
|
||||
@class NSString;
|
||||
|
||||
typedef enum {
|
||||
enum {
|
||||
NSKeyValueObservingOptionNew = 1,
|
||||
NSKeyValueObservingOptionOld = 2
|
||||
#if OS_API_VERSION(100500,GS_API_LATEST)
|
||||
, NSKeyValueObservingOptionInitial = 4,
|
||||
NSKeyValueObservingOptionPrior = 8
|
||||
#endif
|
||||
} NSKeyValueObservingOptions;
|
||||
};
|
||||
typedef NSUInteger NSKeyValueObservingOptions;
|
||||
|
||||
typedef enum {
|
||||
enum {
|
||||
NSKeyValueChangeSetting = 1,
|
||||
NSKeyValueChangeInsertion = 2,
|
||||
NSKeyValueChangeRemoval = 3,
|
||||
NSKeyValueChangeReplacement = 4
|
||||
} NSKeyValueChange;
|
||||
};
|
||||
typedef NSUInteger NSKeyValueChange;
|
||||
|
||||
typedef enum {
|
||||
enum {
|
||||
NSKeyValueUnionSetMutation = 1,
|
||||
NSKeyValueMinusSetMutation = 2,
|
||||
NSKeyValueIntersectSetMutation = 3,
|
||||
NSKeyValueSetSetMutation = 4
|
||||
} NSKeyValueSetMutationKind;
|
||||
};
|
||||
typedef NSUInteger NSKeyValueSetMutationKind;
|
||||
|
||||
GS_EXPORT NSString *const NSKeyValueChangeIndexesKey;
|
||||
GS_EXPORT NSString *const NSKeyValueChangeKindKey;
|
||||
|
|
|
@ -121,7 +121,7 @@ extern "C" {
|
|||
* and associates the encoded value with aKey.
|
||||
*/
|
||||
- (void) encodeBytes: (const uint8_t*)aPointer
|
||||
length: (unsigned)length
|
||||
length: (NSUInteger)length
|
||||
forKey: (NSString*)aKey;
|
||||
|
||||
/**
|
||||
|
@ -298,7 +298,7 @@ extern "C" {
|
|||
* -encodeBytes:length:forKey:
|
||||
*/
|
||||
- (const uint8_t*) decodeBytesForKey: (NSString*)aKey
|
||||
returnedLength: (unsigned*)length;
|
||||
returnedLength: (NSUInteger*)length;
|
||||
|
||||
/**
|
||||
* Returns a double value associated with aKey. This value must previously
|
||||
|
|
|
@ -115,12 +115,12 @@ extern "C" {
|
|||
/**
|
||||
* Initialize lock with given condition.
|
||||
*/
|
||||
- (id) initWithCondition: (int)value;
|
||||
- (id) initWithCondition: (NSInteger)value;
|
||||
|
||||
/**
|
||||
* Return the current condition of the lock.
|
||||
*/
|
||||
- (int) condition;
|
||||
- (NSInteger) condition;
|
||||
|
||||
/*
|
||||
* Acquiring and releasing the lock.
|
||||
|
@ -130,12 +130,12 @@ extern "C" {
|
|||
* Acquire lock when it is available and the internal condition is equal to
|
||||
* value. Blocks until this occurs.
|
||||
*/
|
||||
- (void) lockWhenCondition: (int)value;
|
||||
- (void) lockWhenCondition: (NSInteger)value;
|
||||
|
||||
/**
|
||||
* Relinquish the lock, setting internal condition to value.
|
||||
*/
|
||||
- (void) unlockWithCondition: (int)value;
|
||||
- (void) unlockWithCondition: (NSInteger)value;
|
||||
|
||||
/**
|
||||
* Try to acquire lock regardless of condition and return immediately, YES if
|
||||
|
@ -147,7 +147,7 @@ extern "C" {
|
|||
* Try to acquire lock if condition is equal to value and return immediately
|
||||
* in any case, YES if succeeded, NO if not.
|
||||
*/
|
||||
- (BOOL) tryLockWhenCondition: (int)value;
|
||||
- (BOOL) tryLockWhenCondition: (NSInteger)value;
|
||||
|
||||
/*
|
||||
* Acquiring the lock with a date condition.
|
||||
|
@ -162,7 +162,7 @@ extern "C" {
|
|||
* Try to acquire lock, when internal condition is equal to condition_to_meet,
|
||||
* and return before limit, YES if succeeded, NO if not.
|
||||
*/
|
||||
- (BOOL) lockWhenCondition: (int)condition_to_meet
|
||||
- (BOOL) lockWhenCondition: (NSInteger)condition_to_meet
|
||||
beforeDate: (NSDate*)limitDate;
|
||||
|
||||
/**
|
||||
|
|
|
@ -88,8 +88,8 @@ typedef struct {
|
|||
@interface NSMethodSignature : NSObject
|
||||
{
|
||||
const char *_methodTypes;
|
||||
unsigned _argFrameLength;
|
||||
unsigned _numArgs;
|
||||
NSUInteger _argFrameLength;
|
||||
NSUInteger _numArgs;
|
||||
#if OS_API_VERSION(GS_API_NONE, GS_API_MACOSX)
|
||||
NSArgumentInfo *_info;
|
||||
#else
|
||||
|
@ -108,14 +108,14 @@ typedef struct {
|
|||
* Returns full information on given argument. Indices start at 0. Provide
|
||||
* -1 to get info on return value.
|
||||
*/
|
||||
- (NSArgumentInfo) argumentInfoAtIndex: (unsigned)index;
|
||||
- (NSArgumentInfo) argumentInfoAtIndex: (NSUInteger)index;
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Number of bytes that the full set of arguments occupies on the stack, which
|
||||
* is platform(hardware)-dependent.
|
||||
*/
|
||||
- (unsigned) frameLength;
|
||||
- (NSUInteger) frameLength;
|
||||
|
||||
/**
|
||||
* Returns Objective-C <code>@encode(...)</code> compatible string. Arguments
|
||||
|
@ -123,7 +123,7 @@ typedef struct {
|
|||
* <code><em>self</em></code> (type <code>id</code>, at position 0) and
|
||||
* <code><em>_cmd</em></code> (type <code>SEL</code>, at position 1).
|
||||
*/
|
||||
- (const char*) getArgumentTypeAtIndex: (unsigned)index;
|
||||
- (const char*) getArgumentTypeAtIndex: (NSUInteger)index;
|
||||
|
||||
/**
|
||||
* Pertains to distributed objects; method is asynchronous when invoked and
|
||||
|
@ -135,7 +135,7 @@ typedef struct {
|
|||
* Number of bytes that the return value occupies on the stack, which is
|
||||
* platform(hardware)-dependent.
|
||||
*/
|
||||
- (unsigned) methodReturnLength;
|
||||
- (NSUInteger) methodReturnLength;
|
||||
|
||||
/**
|
||||
* Returns Objective-C <code>@encode(...)</code> compatible string. Arguments
|
||||
|
@ -149,7 +149,7 @@ typedef struct {
|
|||
* Returns number of arguments to method, including the implicit
|
||||
* <code><em>self</em></code> and <code><em>_cmd</em></code>.
|
||||
*/
|
||||
- (unsigned) numberOfArguments;
|
||||
- (NSUInteger) numberOfArguments;
|
||||
|
||||
@end
|
||||
|
||||
|
|
|
@ -33,8 +33,17 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef enum
|
||||
enum
|
||||
{
|
||||
NSNetServicesUnknownError = -72000L,
|
||||
NSNetServicesCollisionError = -72001L,
|
||||
NSNetServicesNotFoundError = -72002L,
|
||||
NSNetServicesActivityInProgress = -72003L,
|
||||
NSNetServicesBadArgumentError = -72004L,
|
||||
NSNetServicesCancelledError = -72005L,
|
||||
NSNetServicesInvalidError = -72006L,
|
||||
NSNetServicesTimeoutError = -72007L
|
||||
};
|
||||
/**
|
||||
* <list>
|
||||
* <item>
|
||||
|
@ -80,15 +89,7 @@ typedef enum
|
|||
* </item>
|
||||
* </list>
|
||||
*/
|
||||
NSNetServicesUnknownError = -72000L,
|
||||
NSNetServicesCollisionError = -72001L,
|
||||
NSNetServicesNotFoundError = -72002L,
|
||||
NSNetServicesActivityInProgress = -72003L,
|
||||
NSNetServicesBadArgumentError = -72004L,
|
||||
NSNetServicesCancelledError = -72005L,
|
||||
NSNetServicesInvalidError = -72006L,
|
||||
NSNetServicesTimeoutError = -72007L
|
||||
} NSNetServicesError;
|
||||
typedef NSUInteger NSNetServicesError;
|
||||
|
||||
enum {
|
||||
NSNetServiceNoAutoRename = 1 << 0
|
||||
|
@ -140,7 +141,7 @@ GS_EXPORT NSString * const NSNetServicesErrorDomain;
|
|||
- (id) initWithDomain: (NSString *) domain
|
||||
type: (NSString *) type
|
||||
name: (NSString *) name
|
||||
port: (int) port;
|
||||
port: (NSInteger) port;
|
||||
|
||||
- (void) removeFromRunLoop: (NSRunLoop *) aRunLoop
|
||||
forMode: (NSString *) mode;
|
||||
|
|
|
@ -73,11 +73,12 @@ extern "C" {
|
|||
}
|
||||
</example>
|
||||
*/
|
||||
typedef enum {
|
||||
enum {
|
||||
NSPostWhenIdle = 1,
|
||||
NSPostASAP = 2,
|
||||
NSPostNow = 3
|
||||
} NSPostingStyle;
|
||||
};
|
||||
typedef NSUInteger NSPostingStyle;
|
||||
|
||||
/**
|
||||
* Enumeration of possible ways to combine notifications when dealing with
|
||||
|
@ -90,11 +91,12 @@ typedef enum {
|
|||
}
|
||||
</example>
|
||||
*/
|
||||
typedef enum {
|
||||
enum {
|
||||
NSNotificationNoCoalescing = 0,
|
||||
NSNotificationCoalescingOnName = 1,
|
||||
NSNotificationCoalescingOnSender = 2,
|
||||
} NSNotificationCoalescing;
|
||||
};
|
||||
typedef NSUInteger NSNotificationCoalescing;
|
||||
|
||||
/*
|
||||
* NSNotificationQueue class
|
||||
|
@ -121,14 +123,14 @@ struct _NSNotificationQueueList;
|
|||
/* Inserting and Removing Notifications From a Queue */
|
||||
|
||||
- (void) dequeueNotificationsMatching: (NSNotification*)notification
|
||||
coalesceMask: (unsigned int)coalesceMask;
|
||||
coalesceMask: (NSUInteger)coalesceMask;
|
||||
|
||||
- (void) enqueueNotification: (NSNotification*)notification
|
||||
postingStyle: (NSPostingStyle)postingStyle;
|
||||
|
||||
- (void) enqueueNotification: (NSNotification*)notification
|
||||
postingStyle: (NSPostingStyle)postingStyle
|
||||
coalesceMask: (unsigned int)coalesceMask
|
||||
coalesceMask: (NSUInteger)coalesceMask
|
||||
forModes: (NSArray*)modes;
|
||||
|
||||
@end
|
||||
|
|
|
@ -34,14 +34,31 @@
|
|||
|
||||
/* These typedefs must be in place before GSObjCRuntime.h is imported.
|
||||
*/
|
||||
|
||||
|
||||
#define GS_64BIT_OLD 1 // Temporarily disable new OSX 10.5 64bit API
|
||||
|
||||
|
||||
#if defined(GS_64BIT_OLD)
|
||||
|
||||
typedef int NSInteger;
|
||||
typedef unsigned int NSUInteger;
|
||||
typedef float CGFloat;
|
||||
|
||||
#else /* GS_64BIT_OLD */
|
||||
|
||||
typedef intptr_t NSInteger;
|
||||
typedef uintptr_t NSUInteger;
|
||||
#if GS_SIZEOF_VOIDP == 8
|
||||
typedef double CGFloat;
|
||||
#if GS_SIZEOF_VOIDP == 8
|
||||
#define CGFLOAT_IS_DBL 1
|
||||
typedef double CGFloat;
|
||||
#else
|
||||
typedef float CGFloat;
|
||||
typedef float CGFloat;
|
||||
#endif
|
||||
|
||||
#endif /* GS_64BIT_OLD */
|
||||
|
||||
|
||||
#define NSINTEGER_DEFINED 1
|
||||
|
||||
#import <GNUstepBase/GSObjCRuntime.h>
|
||||
|
|
|
@ -68,7 +68,7 @@ extern "C" {
|
|||
- (BOOL) isKindOfClass: (Class)aClass; /** See [NSObject-isKindOfClass:] */
|
||||
- (BOOL) isMemberOfClass: (Class)aClass;/** See [NSObject-isMemberOfClass:] */
|
||||
- (BOOL) isProxy; /** See [NSObject-isProxy] */
|
||||
- (unsigned) hash; /** See [NSObject-hash] */
|
||||
- (NSUInteger) hash; /** See [NSObject-hash] */
|
||||
- (id) self; /** See [NSObject-self] */
|
||||
- (id) performSelector: (SEL)aSelector; /** See [NSObject-performSelector:] */
|
||||
/** See [NSObject-performSelector:withObject:] */
|
||||
|
@ -85,7 +85,7 @@ extern "C" {
|
|||
- (id) retain; /** See [NSObject-retain] */
|
||||
- (id) autorelease /** See [NSObject-autorelease] */;
|
||||
- (oneway void) release; /** See [NSObject-release] */
|
||||
- (unsigned) retainCount; /** See [NSObject-retainCount] */
|
||||
- (NSUInteger) retainCount; /** See [NSObject-retainCount] */
|
||||
- (NSZone*) zone; /** See [NSObject-zone] */
|
||||
- (NSString*) description; /** See [NSObject-description] */
|
||||
@end
|
||||
|
@ -195,9 +195,9 @@ extern "C" {
|
|||
+ (BOOL) isSubclassOfClass: (Class)aClass;
|
||||
+ (id) new;
|
||||
+ (void) poseAsClass: (Class)aClassObject;
|
||||
+ (id) setVersion: (int)aVersion;
|
||||
+ (id) setVersion: (NSInteger)aVersion;
|
||||
+ (Class) superclass;
|
||||
+ (int) version;
|
||||
+ (NSInteger) version;
|
||||
|
||||
- (id) autorelease;
|
||||
- (id) awakeAfterUsingCoder: (NSCoder*)aDecoder;
|
||||
|
@ -210,7 +210,7 @@ extern "C" {
|
|||
- (NSString*) description;
|
||||
- (void) doesNotRecognizeSelector: (SEL)aSelector;
|
||||
- (void) forwardInvocation: (NSInvocation*)anInvocation;
|
||||
- (unsigned) hash;
|
||||
- (NSUInteger) hash;
|
||||
- (id) init;
|
||||
- (BOOL) isEqual: anObject;
|
||||
- (BOOL) isKindOfClass: (Class)aClass;
|
||||
|
@ -230,7 +230,7 @@ extern "C" {
|
|||
- (id) replacementObjectForCoder: (NSCoder*)anEncoder;
|
||||
- (BOOL) respondsToSelector: (SEL)aSelector;
|
||||
- (id) retain;
|
||||
- (unsigned) retainCount;
|
||||
- (NSUInteger) retainCount;
|
||||
- (id) self;
|
||||
- (Class) superclass;
|
||||
- (NSZone*) zone;
|
||||
|
@ -244,7 +244,7 @@ extern "C" {
|
|||
* This function is used by the [NSObject+allocWithZone:] method.
|
||||
*/
|
||||
GS_EXPORT NSObject *
|
||||
NSAllocateObject(Class aClass, unsigned extraBytes, NSZone *zone);
|
||||
NSAllocateObject(Class aClass, NSUInteger extraBytes, NSZone *zone);
|
||||
|
||||
/**
|
||||
* Used to release the memory used by an object.<br />
|
||||
|
@ -262,7 +262,7 @@ NSDeallocateObject(NSObject *anObject);
|
|||
* [(NSCopying)-copyWithZone:] method.
|
||||
*/
|
||||
GS_EXPORT NSObject *
|
||||
NSCopyObject(NSObject *anObject, unsigned extraBytes, NSZone *zone);
|
||||
NSCopyObject(NSObject *anObject, NSUInteger extraBytes, NSZone *zone);
|
||||
|
||||
/**
|
||||
* Returns a flag to indicate whether anObject should be retained or
|
||||
|
@ -276,7 +276,7 @@ NSShouldRetainWithZone(NSObject *anObject, NSZone *requestedZone);
|
|||
GS_EXPORT BOOL
|
||||
NSDecrementExtraRefCountWasZero(id anObject);
|
||||
|
||||
GS_EXPORT unsigned
|
||||
GS_EXPORT NSUInteger
|
||||
NSExtraRefCount(id anObject);
|
||||
|
||||
GS_EXPORT void
|
||||
|
|
|
@ -107,40 +107,7 @@ GS_EXPORT NSString *NSHomeDirectory(void);
|
|||
GS_EXPORT NSString *NSHomeDirectoryForUser(NSString *loginName);
|
||||
|
||||
#if OS_API_VERSION(GS_API_MACOSX, GS_API_LATEST)
|
||||
/**
|
||||
* Enumeration of possible requested directory type specifiers for
|
||||
* NSSearchPathForDirectoriesInDomains() function. On a traditional
|
||||
* GNUstep filesystem layout these correspond to the subdirectories
|
||||
* that may be found in the various domains, such as "Library"
|
||||
* and "Applications". In a different filesystem layout these
|
||||
* directories might be located anywhere on disk.
|
||||
<example>
|
||||
{
|
||||
NSApplicationDirectory,
|
||||
NSDemoApplicationDirectory,
|
||||
NSDeveloperApplicationDirectory,
|
||||
NSAdminApplicationDirectory,
|
||||
NSLibraryDirectory,
|
||||
NSDeveloperDirectory,
|
||||
NSUserDirectory,
|
||||
NSDocumentationDirectory,
|
||||
NSDocumentDirectory,
|
||||
NSCoreServiceDirectory,
|
||||
NSDesktopDirectory,
|
||||
NSCachesDirectory,
|
||||
NSApplicationSupportDirectory
|
||||
NSAllApplicationsDirectory,
|
||||
NSAllLibrariesDirectory,
|
||||
GSLibrariesDirectory,
|
||||
GSToolsDirectory,
|
||||
GSAdminToolsDirectory,
|
||||
GSFontsDirectory,
|
||||
GSFrameworksDirectory,
|
||||
GSWebApplicationsDirectory
|
||||
}
|
||||
</example>
|
||||
*/
|
||||
typedef enum
|
||||
enum
|
||||
{
|
||||
NSApplicationDirectory = 1, /** Applications */
|
||||
NSDemoApplicationDirectory, /** Demos */
|
||||
|
@ -178,21 +145,56 @@ typedef enum
|
|||
GSFrameworksDirectory, /** frameworks */
|
||||
GSWebApplicationsDirectory, /** web applications (GSWeb or SOPE) */
|
||||
GSAdminToolsDirectory /** admin non-gui programs */
|
||||
} NSSearchPathDirectory;
|
||||
|
||||
};
|
||||
/**
|
||||
* Mask type for NSSearchPathForDirectoriesInDomains() function. A bitwise OR
|
||||
* of one or more of <code>NSUserDomainMask, NSLocalDomainMask,
|
||||
* NSNetworkDomainMask, NSSystemDomainMask, NSAllDomainsMask</code>.
|
||||
* Enumeration of possible requested directory type specifiers for
|
||||
* NSSearchPathForDirectoriesInDomains() function. On a traditional
|
||||
* GNUstep filesystem layout these correspond to the subdirectories
|
||||
* that may be found in the various domains, such as "Library"
|
||||
* and "Applications". In a different filesystem layout these
|
||||
* directories might be located anywhere on disk.
|
||||
<example>
|
||||
{
|
||||
NSApplicationDirectory,
|
||||
NSDemoApplicationDirectory,
|
||||
NSDeveloperApplicationDirectory,
|
||||
NSAdminApplicationDirectory,
|
||||
NSLibraryDirectory,
|
||||
NSDeveloperDirectory,
|
||||
NSUserDirectory,
|
||||
NSDocumentationDirectory,
|
||||
NSDocumentDirectory,
|
||||
NSCoreServiceDirectory,
|
||||
NSDesktopDirectory,
|
||||
NSCachesDirectory,
|
||||
NSApplicationSupportDirectory
|
||||
NSAllApplicationsDirectory,
|
||||
NSAllLibrariesDirectory,
|
||||
GSLibrariesDirectory,
|
||||
GSToolsDirectory,
|
||||
GSAdminToolsDirectory,
|
||||
GSFontsDirectory,
|
||||
GSFrameworksDirectory,
|
||||
GSWebApplicationsDirectory
|
||||
}
|
||||
</example>
|
||||
*/
|
||||
typedef enum
|
||||
typedef NSUInteger NSSearchPathDirectory;
|
||||
|
||||
enum
|
||||
{
|
||||
NSUserDomainMask = 1, /** The user's personal items */
|
||||
NSLocalDomainMask = 2, /** Local for all users on the machine */
|
||||
NSNetworkDomainMask = 4, /** Public for all users on network */
|
||||
NSSystemDomainMask = 8, /** Standard GNUstep items */
|
||||
NSAllDomainsMask = 0x0ffff, /** all domains */
|
||||
} NSSearchPathDomainMask;
|
||||
};
|
||||
/**
|
||||
* Mask type for NSSearchPathForDirectoriesInDomains() function. A bitwise OR
|
||||
* of one or more of <code>NSUserDomainMask, NSLocalDomainMask,
|
||||
* NSNetworkDomainMask, NSSystemDomainMask, NSAllDomainsMask</code>.
|
||||
*/
|
||||
typedef NSUInteger NSSearchPathDomainMask;
|
||||
|
||||
/**
|
||||
* Returns an array of search paths to look at for resources.<br/ >
|
||||
|
|
|
@ -91,7 +91,7 @@ extern "C" {
|
|||
/**
|
||||
* NSMachPort compatibility method.
|
||||
*/
|
||||
+ (NSPort*) portWithMachPort: (int)machPort;
|
||||
+ (NSPort*) portWithMachPort: (NSInteger)machPort;
|
||||
|
||||
/**
|
||||
* Returns the object that received messages will be passed off to.
|
||||
|
@ -112,12 +112,12 @@ extern "C" {
|
|||
/**
|
||||
* NSMachPort compatibility method.
|
||||
*/
|
||||
- (id) initWithMachPort: (int)machPort;
|
||||
- (id) initWithMachPort: (NSInteger)machPort;
|
||||
|
||||
/**
|
||||
* NSMachPort compatibility.
|
||||
*/
|
||||
- (int) machPort;
|
||||
- (NSInteger) machPort;
|
||||
|
||||
/**
|
||||
* Mark port as invalid, deregister with listeners and cease further network
|
||||
|
@ -151,16 +151,16 @@ extern "C" {
|
|||
* Returns amount of space used for header info at beginning of messages.
|
||||
* Subclasses should override (this implementation returns 0).
|
||||
*/
|
||||
- (unsigned) reservedSpaceLength;
|
||||
- (NSUInteger) reservedSpaceLength;
|
||||
|
||||
/**
|
||||
* Internal method for sending message, for use by subclasses.
|
||||
*/
|
||||
- (BOOL) sendBeforeDate: (NSDate*)when
|
||||
msgid: (int)msgid
|
||||
msgid: (NSInteger)msgid
|
||||
components: (NSMutableArray*)components
|
||||
from: (NSPort*)receivingPort
|
||||
reserved: (unsigned)length;
|
||||
reserved: (NSUInteger)length;
|
||||
|
||||
/**
|
||||
* Internal method for sending message, for use by subclasses.
|
||||
|
@ -168,7 +168,7 @@ extern "C" {
|
|||
- (BOOL) sendBeforeDate: (NSDate*)when
|
||||
components: (NSMutableArray*)components
|
||||
from: (NSPort*)receivingPort
|
||||
reserved: (unsigned)length;
|
||||
reserved: (NSUInteger)length;
|
||||
#endif
|
||||
@end
|
||||
|
||||
|
|
|
@ -141,7 +141,7 @@ enum {
|
|||
* <item>GSCygwinOperatingSystem - cygwin unix-like environment</item>
|
||||
* </list>
|
||||
*/
|
||||
- (unsigned int) operatingSystem;
|
||||
- (NSUInteger) operatingSystem;
|
||||
|
||||
/**
|
||||
* Return a human readable string representing the operating system type.<br />
|
||||
|
|
|
@ -39,46 +39,47 @@ extern "C" {
|
|||
|
||||
@class NSData, NSString;
|
||||
|
||||
enum {
|
||||
NSPropertyListImmutable = 0,
|
||||
NSPropertyListMutableContainers,
|
||||
NSPropertyListMutableContainersAndLeaves
|
||||
};
|
||||
/**
|
||||
* Describes the mutability to use when generating objects during
|
||||
* deserialisation of a property list.
|
||||
*/
|
||||
typedef enum {
|
||||
NSPropertyListImmutable = 0,
|
||||
/** <strong>NSPropertyListImmutable</strong>
|
||||
* <example>
|
||||
* <strong>NSPropertyListImmutable</strong>
|
||||
* all objects in created list are immutable
|
||||
*/
|
||||
NSPropertyListMutableContainers,
|
||||
/** <strong>NSPropertyListMutableContainers</strong>
|
||||
* dictionaries and arrays are mutable
|
||||
*/
|
||||
NSPropertyListMutableContainersAndLeaves
|
||||
/** <strong>NSPropertyListMutableContainersAndLeaves</strong>
|
||||
* <strong>NSPropertyListMutableContainers</strong>
|
||||
* dictionaries, arrays, strings and data objects are mutable
|
||||
* </example>
|
||||
*/
|
||||
} NSPropertyListMutabilityOptions;
|
||||
typedef NSUInteger NSPropertyListMutabilityOptions;
|
||||
|
||||
/**
|
||||
* Specifies the serialisation format for a serialised property list.
|
||||
*/
|
||||
typedef enum {
|
||||
enum {
|
||||
NSPropertyListOpenStepFormat = 1,
|
||||
/** <strong>NSPropertyListOpenStepFormat</strong>
|
||||
* the most human-readable format */
|
||||
NSPropertyListXMLFormat_v1_0 = 100,
|
||||
/** <strong>NSPropertyListXMLFormat_v1_0</strong>
|
||||
* portable and readable */
|
||||
NSPropertyListBinaryFormat_v1_0 = 200,
|
||||
/** <strong>NSPropertyListBinaryFormat_v1_0</strong>
|
||||
* the standard format on macos-x */
|
||||
|
||||
NSPropertyListGNUstepFormat = 1000,
|
||||
/** <strong>NSPropertyListGNUstepFormat</strong>
|
||||
* extension of OpenStep format */
|
||||
NSPropertyListGNUstepBinaryFormat,
|
||||
/** <strong>NSPropertyListGNUstepBinaryFormat</strong>
|
||||
* efficient, hardware independent */
|
||||
} NSPropertyListFormat;
|
||||
};
|
||||
/**
|
||||
* Specifies the serialisation format for a serialised property list.
|
||||
* <example>
|
||||
* <strong>NSPropertyListOpenStepFormat</strong>
|
||||
* the most human-readable format
|
||||
* <strong>NSPropertyListXMLFormat_v1_0</strong>
|
||||
* portable and readable
|
||||
* <strong>NSPropertyListBinaryFormat_v1_0</strong>
|
||||
* the standard format on macos-x
|
||||
* <strong>NSPropertyListGNUstepFormat</strong>
|
||||
* extension of OpenStep format
|
||||
* <strong>NSPropertyListGNUstepBinaryFormat</strong>
|
||||
* efficient, hardware independent
|
||||
* </example>
|
||||
*/
|
||||
typedef NSUInteger NSPropertyListFormat;
|
||||
|
||||
/**
|
||||
* <p>The NSPropertyListSerialization class provides facilities for
|
||||
|
|
|
@ -35,9 +35,9 @@ extern "C" {
|
|||
@interface NSProxy <NSObject>
|
||||
{
|
||||
@public
|
||||
Class isa;
|
||||
Class isa;
|
||||
@private
|
||||
unsigned int _retain_count;
|
||||
NSUInteger _retain_count;
|
||||
}
|
||||
|
||||
+ (id) alloc;
|
||||
|
@ -55,7 +55,7 @@ extern "C" {
|
|||
+ (void) release;
|
||||
+ (BOOL) respondsToSelector: (SEL)aSelector;
|
||||
+ (id) retain;
|
||||
+ (unsigned int) retainCount;
|
||||
+ (NSUInteger) retainCount;
|
||||
|
||||
- (id) autorelease;
|
||||
- (Class) class;
|
||||
|
@ -63,7 +63,7 @@ extern "C" {
|
|||
- (void) dealloc;
|
||||
- (NSString*) description;
|
||||
- (void) forwardInvocation: (NSInvocation*)anInvocation;
|
||||
- (unsigned int) hash;
|
||||
- (NSUInteger) hash;
|
||||
- (id) init;
|
||||
- (BOOL) isEqual: (id)anObject;
|
||||
- (BOOL) isKindOfClass: (Class)aClass;
|
||||
|
@ -73,7 +73,7 @@ extern "C" {
|
|||
- (void) release;
|
||||
- (BOOL) respondsToSelector: (SEL)aSelector;
|
||||
- (id) retain;
|
||||
- (unsigned int) retainCount;
|
||||
- (NSUInteger) retainCount;
|
||||
- (id) self;
|
||||
- (Class) superclass;
|
||||
- (NSZone*) zone;
|
||||
|
|
|
@ -88,7 +88,7 @@ GS_EXPORT NSString * const NSDefaultRunLoopMode;
|
|||
- (void) performSelector: (SEL)aSelector
|
||||
target: (id)target
|
||||
argument: (id)argument
|
||||
order: (unsigned int)order
|
||||
order: (NSUInteger)order
|
||||
modes: (NSArray*)modes;
|
||||
|
||||
- (void) removePort: (NSPort*)port
|
||||
|
|
|
@ -44,7 +44,7 @@ extern "C" {
|
|||
NSCharacterSet *_charactersToBeSkipped;
|
||||
BOOL (*_skipImp)(NSCharacterSet*, SEL, unichar);
|
||||
NSDictionary *_locale;
|
||||
unsigned int _scanLocation;
|
||||
NSUInteger _scanLocation;
|
||||
unichar _decimal;
|
||||
BOOL _caseSensitive;
|
||||
BOOL _isUnicode;
|
||||
|
@ -65,8 +65,8 @@ extern "C" {
|
|||
/*
|
||||
* Configuring an NSScanner
|
||||
*/
|
||||
- (unsigned) scanLocation;
|
||||
- (void) setScanLocation: (unsigned int)anIndex;
|
||||
- (NSUInteger) scanLocation;
|
||||
- (void) setScanLocation: (NSUInteger)anIndex;
|
||||
|
||||
- (BOOL) caseSensitive;
|
||||
- (void) setCaseSensitive: (BOOL)flag;
|
||||
|
|
|
@ -46,14 +46,14 @@ extern "C" {
|
|||
+ (id) setWithObjects: (id)firstObject, ...;
|
||||
#if OS_API_VERSION(GS_API_MACOSX, GS_API_LATEST)
|
||||
+ (id) setWithObjects: (id*)objects
|
||||
count: (unsigned)count;
|
||||
count: (NSUInteger)count;
|
||||
#endif
|
||||
+ (id) setWithSet: (NSSet*)aSet;
|
||||
|
||||
- (NSArray*) allObjects;
|
||||
- (id) anyObject;
|
||||
- (BOOL) containsObject: (id)anObject;
|
||||
- (unsigned) count;
|
||||
- (NSUInteger) count;
|
||||
- (NSString*) description;
|
||||
- (NSString*) descriptionWithLocale: (NSDictionary*)locale;
|
||||
|
||||
|
@ -61,7 +61,7 @@ extern "C" {
|
|||
- (id) initWithArray: (NSArray*)other;
|
||||
- (id) initWithObjects: (id)firstObject, ...;
|
||||
- (id) initWithObjects: (id*)objects
|
||||
count: (unsigned)count;
|
||||
count: (NSUInteger)count;
|
||||
- (id) initWithSet: (NSSet*)other;
|
||||
- (id) initWithSet: (NSSet*)other copyItems: (BOOL)flag;
|
||||
|
||||
|
@ -87,11 +87,11 @@ extern "C" {
|
|||
|
||||
@interface NSMutableSet: NSSet
|
||||
|
||||
+ (id) setWithCapacity: (unsigned)numItems;
|
||||
+ (id) setWithCapacity: (NSUInteger)numItems;
|
||||
|
||||
- (void) addObject: (id)anObject;
|
||||
- (void) addObjectsFromArray: (NSArray*)array;
|
||||
- (id) initWithCapacity: (unsigned)numItems;
|
||||
- (id) initWithCapacity: (NSUInteger)numItems;
|
||||
- (void) intersectSet: (NSSet*)other;
|
||||
- (void) minusSet: (NSSet*)other;
|
||||
- (void) removeAllObjects;
|
||||
|
@ -104,7 +104,7 @@ extern "C" {
|
|||
|
||||
@interface NSCountedSet : NSMutableSet
|
||||
|
||||
- (unsigned int) countForObject: (id)anObject;
|
||||
- (NSUInteger) countForObject: (id)anObject;
|
||||
|
||||
@end
|
||||
|
||||
|
@ -125,7 +125,7 @@ extern "C" {
|
|||
* been added once - and are therefore simply wasting space.
|
||||
* </p>
|
||||
*/
|
||||
- (void) purge: (int)level;
|
||||
- (void) purge: (NSInteger)level;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
|
@ -175,13 +175,13 @@ id GSUnique(id anObject);
|
|||
* set by removing any objec whose count is less than or equal to that given.
|
||||
*
|
||||
*/
|
||||
void GSUPurge(unsigned count);
|
||||
void GSUPurge(NSUInteger count);
|
||||
|
||||
/*
|
||||
* GSUSet() can be used to artificially set the count for a particular object
|
||||
* Setting the count to zero will remove the object from the global set.
|
||||
*/
|
||||
id GSUSet(id anObject, unsigned count);
|
||||
id GSUSet(id anObject, NSUInteger count);
|
||||
|
||||
#endif /* GS_API_NONE */
|
||||
|
||||
|
|
|
@ -109,7 +109,7 @@ GS_EXPORT NSString *const NSGrammarUserDescription;
|
|||
- (NSRange) spellServer: (NSSpellServer *)sender
|
||||
findMisspelledWordInString: (NSString *)stringToCheck
|
||||
language: (NSString *)language
|
||||
wordCount: (int *)wordCount
|
||||
wordCount: (NSInteger *)wordCount
|
||||
countOnly: (BOOL)countOnly;
|
||||
|
||||
/**
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef enum {
|
||||
enum {
|
||||
NSStreamStatusNotOpen = 0,
|
||||
NSStreamStatusOpening = 1,
|
||||
NSStreamStatusOpen = 2,
|
||||
|
@ -42,16 +42,18 @@ typedef enum {
|
|||
NSStreamStatusAtEnd = 5,
|
||||
NSStreamStatusClosed = 6,
|
||||
NSStreamStatusError = 7
|
||||
} NSStreamStatus;
|
||||
};
|
||||
typedef NSUInteger NSStreamStatus;
|
||||
|
||||
typedef enum {
|
||||
enum {
|
||||
NSStreamEventNone = 0,
|
||||
NSStreamEventOpenCompleted = 1,
|
||||
NSStreamEventHasBytesAvailable = 2,
|
||||
NSStreamEventHasSpaceAvailable = 4,
|
||||
NSStreamEventErrorOccurred = 8,
|
||||
NSStreamEventEndEncountered = 16
|
||||
} NSStreamEvent;
|
||||
};
|
||||
typedef NSUInteger NSStreamEvent;
|
||||
|
||||
@class NSError;
|
||||
@class NSHost;
|
||||
|
@ -70,7 +72,7 @@ typedef enum {
|
|||
* object for a socket connection with the specified port on host.
|
||||
*/
|
||||
+ (void) getStreamsToHost: (NSHost *)host
|
||||
port: (int)port
|
||||
port: (NSInteger)port
|
||||
inputStream: (NSInputStream **)inputStream
|
||||
outputStream: (NSOutputStream **)outputStream;
|
||||
|
||||
|
@ -162,7 +164,7 @@ typedef enum {
|
|||
* Returns a pointer to the read buffer in buffer and, by reference, the number
|
||||
* of bytes available in len.
|
||||
*/
|
||||
- (BOOL) getBuffer: (uint8_t **)buffer length: (unsigned int *)len;
|
||||
- (BOOL) getBuffer: (uint8_t **)buffer length: (NSUInteger *)len;
|
||||
|
||||
/**
|
||||
* Returns YES if the receiver has bytes available to read.
|
||||
|
@ -185,7 +187,7 @@ typedef enum {
|
|||
/**
|
||||
* Reads up to len bytes into buffer, returning the actual number of bytes read.
|
||||
*/
|
||||
- (int) read: (uint8_t *)buffer maxLength: (unsigned int)len;
|
||||
- (NSInteger) read: (uint8_t *)buffer maxLength: (NSUInteger)len;
|
||||
|
||||
@end
|
||||
|
||||
|
@ -199,7 +201,7 @@ typedef enum {
|
|||
* Creates and returns an initialized NSOutputStream object
|
||||
* that can write to buffer, up to a maximum of capacity bytes.
|
||||
*/
|
||||
+ (id) outputStreamToBuffer: (uint8_t *)buffer capacity: (unsigned int)capacity;
|
||||
+ (id) outputStreamToBuffer: (uint8_t *)buffer capacity: (NSUInteger)capacity;
|
||||
|
||||
/**
|
||||
* Creates and returns an initialized NSOutputStream object
|
||||
|
@ -224,7 +226,7 @@ typedef enum {
|
|||
* Returns an initialized NSOutputStream object that can write to buffer,
|
||||
* up to a maximum of capacity bytes.
|
||||
*/
|
||||
- (id) initToBuffer: (uint8_t *)buffer capacity: (unsigned int)capacity;
|
||||
- (id) initToBuffer: (uint8_t *)buffer capacity: (NSUInteger)capacity;
|
||||
|
||||
/**
|
||||
* Returns an initialized NSOutputStream object for writing to the file
|
||||
|
@ -243,7 +245,7 @@ typedef enum {
|
|||
* Writes the contents of buffer, up to a maximum of len bytes,
|
||||
* to the receiver.
|
||||
*/
|
||||
- (int) write: (const uint8_t *)buffer maxLength: (unsigned int)len;
|
||||
- (NSInteger) write: (const uint8_t *)buffer maxLength: (NSUInteger)len;
|
||||
|
||||
@end
|
||||
|
||||
|
@ -280,7 +282,7 @@ typedef enum {
|
|||
/**
|
||||
* Createe a ip (ipv6) server stream
|
||||
*/
|
||||
+ (id) serverStreamToAddr: (NSString*)addr port: (int)port;
|
||||
+ (id) serverStreamToAddr: (NSString*)addr port: (NSInteger)port;
|
||||
|
||||
/**
|
||||
* Create a local (unix domain or named pipe) server stream
|
||||
|
@ -299,7 +301,7 @@ typedef enum {
|
|||
/**
|
||||
* the designated initializer for a ip (ipv6) server stream
|
||||
*/
|
||||
- (id) initToAddr: (NSString*)addr port: (int)port;
|
||||
- (id) initToAddr: (NSString*)addr port: (NSInteger)port;
|
||||
|
||||
/**
|
||||
* the designated initializer for a local (unix domain or named pipe)
|
||||
|
|
|
@ -240,13 +240,13 @@ typedef NSUInteger NSStringEncodingConversionOptions;
|
|||
|
||||
+ (id) string;
|
||||
+ (id) stringWithCharacters: (const unichar*)chars
|
||||
length: (unsigned int)length;
|
||||
length: (NSUInteger)length;
|
||||
#if OS_API_VERSION(100400,GS_API_LATEST) && GS_API_VERSION(010200,GS_API_LATEST)
|
||||
+ (id) stringWithCString: (const char*)byteString
|
||||
encoding: (NSStringEncoding)encoding;
|
||||
#endif
|
||||
+ (id) stringWithCString: (const char*)byteString
|
||||
length: (unsigned int)length;
|
||||
length: (NSUInteger)length;
|
||||
+ (id) stringWithCString: (const char*)byteString;
|
||||
+ (id) stringWithFormat: (NSString*)format,...;
|
||||
+ (id) stringWithContentsOfFile:(NSString *)path;
|
||||
|
@ -255,10 +255,10 @@ typedef NSUInteger NSStringEncodingConversionOptions;
|
|||
- (id) init;
|
||||
#if OS_API_VERSION(100400,GS_API_LATEST) && GS_API_VERSION(010200,GS_API_LATEST)
|
||||
- (id) initWithBytes: (const void*)bytes
|
||||
length: (unsigned int)length
|
||||
length: (NSUInteger)length
|
||||
encoding: (NSStringEncoding)encoding;
|
||||
- (id) initWithBytesNoCopy: (void*)bytes
|
||||
length: (unsigned int)length
|
||||
length: (NSUInteger)length
|
||||
encoding: (NSStringEncoding)encoding
|
||||
freeWhenDone: (BOOL)flag;
|
||||
#endif
|
||||
|
@ -271,15 +271,15 @@ typedef NSUInteger NSStringEncodingConversionOptions;
|
|||
error: (NSError**)error;
|
||||
#endif
|
||||
- (id) initWithCharactersNoCopy: (unichar*)chars
|
||||
length: (unsigned int)length
|
||||
length: (NSUInteger)length
|
||||
freeWhenDone: (BOOL)flag;
|
||||
- (id) initWithCharacters: (const unichar*)chars
|
||||
length: (unsigned int)length;
|
||||
length: (NSUInteger)length;
|
||||
- (id) initWithCStringNoCopy: (char*)byteString
|
||||
length: (unsigned int)length
|
||||
length: (NSUInteger)length
|
||||
freeWhenDone: (BOOL)flag;
|
||||
- (id) initWithCString: (const char*)byteString
|
||||
length: (unsigned int)length;
|
||||
length: (NSUInteger)length;
|
||||
- (id) initWithCString: (const char*)byteString;
|
||||
- (id) initWithString: (NSString*)string;
|
||||
- (id) initWithFormat: (NSString*)format, ...;
|
||||
|
@ -291,10 +291,10 @@ typedef NSUInteger NSStringEncodingConversionOptions;
|
|||
- (id) init;
|
||||
|
||||
// Getting a String's Length
|
||||
- (unsigned int) length;
|
||||
- (NSUInteger) length;
|
||||
|
||||
// Accessing Characters
|
||||
- (unichar) characterAtIndex: (unsigned int)index;
|
||||
- (unichar) characterAtIndex: (NSUInteger)index;
|
||||
- (void) getCharacters: (unichar*)buffer;
|
||||
- (void) getCharacters: (unichar*)buffer
|
||||
range: (NSRange)aRange;
|
||||
|
@ -305,26 +305,26 @@ typedef NSUInteger NSStringEncodingConversionOptions;
|
|||
|
||||
// Dividing Strings into Substrings
|
||||
- (NSArray*) componentsSeparatedByString: (NSString*)separator;
|
||||
- (NSString*) substringFromIndex: (unsigned int)index;
|
||||
- (NSString*) substringFromIndex: (NSUInteger)index;
|
||||
- (NSString*) substringFromRange: (NSRange)aRange;
|
||||
- (NSString*) substringToIndex: (unsigned int)index;
|
||||
- (NSString*) substringToIndex: (NSUInteger)index;
|
||||
|
||||
// Finding Ranges of Characters and Substrings
|
||||
- (NSRange) rangeOfCharacterFromSet: (NSCharacterSet*)aSet;
|
||||
- (NSRange) rangeOfCharacterFromSet: (NSCharacterSet*)aSet
|
||||
options: (unsigned int)mask;
|
||||
options: (NSUInteger)mask;
|
||||
- (NSRange) rangeOfCharacterFromSet: (NSCharacterSet*)aSet
|
||||
options: (unsigned int)mask
|
||||
options: (NSUInteger)mask
|
||||
range: (NSRange)aRange;
|
||||
- (NSRange) rangeOfString: (NSString*)string;
|
||||
- (NSRange) rangeOfString: (NSString*)string
|
||||
options: (unsigned int)mask;
|
||||
options: (NSUInteger)mask;
|
||||
- (NSRange) rangeOfString: (NSString*)aString
|
||||
options: (unsigned int)mask
|
||||
options: (NSUInteger)mask
|
||||
range: (NSRange)aRange;
|
||||
|
||||
// Determining Composed Character Sequences
|
||||
- (NSRange) rangeOfComposedCharacterSequenceAtIndex: (unsigned int)anIndex;
|
||||
- (NSRange) rangeOfComposedCharacterSequenceAtIndex: (NSUInteger)anIndex;
|
||||
|
||||
// Converting String Contents into a Property List
|
||||
- (id)propertyList;
|
||||
|
@ -333,19 +333,19 @@ typedef NSUInteger NSStringEncodingConversionOptions;
|
|||
// Identifying and Comparing Strings
|
||||
- (NSComparisonResult) compare: (NSString*)aString;
|
||||
- (NSComparisonResult) compare: (NSString*)aString
|
||||
options: (unsigned int)mask;
|
||||
options: (NSUInteger)mask;
|
||||
- (NSComparisonResult) compare: (NSString*)aString
|
||||
options: (unsigned int)mask
|
||||
options: (NSUInteger)mask
|
||||
range: (NSRange)aRange;
|
||||
- (BOOL) hasPrefix: (NSString*)aString;
|
||||
- (BOOL) hasSuffix: (NSString*)aString;
|
||||
- (BOOL) isEqual: (id)anObject;
|
||||
- (BOOL) isEqualToString: (NSString*)aString;
|
||||
- (unsigned int) hash;
|
||||
- (NSUInteger) hash;
|
||||
|
||||
// Getting a Shared Prefix
|
||||
- (NSString*) commonPrefixWithString: (NSString*)aString
|
||||
options: (unsigned int)mask;
|
||||
options: (NSUInteger)mask;
|
||||
|
||||
// Changing Case
|
||||
- (NSString*) capitalizedString;
|
||||
|
@ -359,21 +359,21 @@ typedef NSUInteger NSStringEncodingConversionOptions;
|
|||
#if OS_API_VERSION(100400,GS_API_LATEST) && GS_API_VERSION(010200,GS_API_LATEST)
|
||||
- (const char*) cStringUsingEncoding: (NSStringEncoding)encoding;
|
||||
- (BOOL) getCString: (char*)buffer
|
||||
maxLength: (unsigned int)maxLength
|
||||
maxLength: (NSUInteger)maxLength
|
||||
encoding: (NSStringEncoding)encoding;
|
||||
- (id) initWithCString: (const char*)byteString
|
||||
encoding: (NSStringEncoding)encoding;
|
||||
- (unsigned) lengthOfBytesUsingEncoding: (NSStringEncoding)encoding;
|
||||
- (unsigned) maximumLengthOfBytesUsingEncoding: (NSStringEncoding)encoding;
|
||||
- (NSUInteger) lengthOfBytesUsingEncoding: (NSStringEncoding)encoding;
|
||||
- (NSUInteger) maximumLengthOfBytesUsingEncoding: (NSStringEncoding)encoding;
|
||||
#endif
|
||||
|
||||
#endif
|
||||
- (unsigned int) cStringLength;
|
||||
- (NSUInteger) cStringLength;
|
||||
- (void) getCString: (char*)buffer;
|
||||
- (void) getCString: (char*)buffer
|
||||
maxLength: (unsigned int)maxLength;
|
||||
maxLength: (NSUInteger)maxLength;
|
||||
- (void) getCString: (char*)buffer
|
||||
maxLength: (unsigned int)maxLength
|
||||
maxLength: (NSUInteger)maxLength
|
||||
range: (NSRange)aRange
|
||||
remainingRange: (NSRange*)leftoverRange;
|
||||
|
||||
|
@ -401,10 +401,10 @@ typedef NSUInteger NSStringEncodingConversionOptions;
|
|||
* completions. Returns 0 if no match found, else a positive number that is
|
||||
* only accurate if outputArray was non-nil.
|
||||
*/
|
||||
- (unsigned int) completePathIntoString: (NSString**)outputName
|
||||
caseSensitive: (BOOL)flag
|
||||
matchesIntoArray: (NSArray**)outputArray
|
||||
filterTypes: (NSArray*)filterTypes;
|
||||
- (NSUInteger) completePathIntoString: (NSString**)outputName
|
||||
caseSensitive: (BOOL)flag
|
||||
matchesIntoArray: (NSArray**)outputArray
|
||||
filterTypes: (NSArray*)filterTypes;
|
||||
|
||||
/**
|
||||
* Converts the receiver to a C string path expressed in the character
|
||||
|
@ -432,7 +432,7 @@ typedef NSUInteger NSStringEncodingConversionOptions;
|
|||
* perform the conversion.
|
||||
*/
|
||||
- (BOOL) getFileSystemRepresentation: (GSNativeChar*)buffer
|
||||
maxLength: (unsigned int)size;
|
||||
maxLength: (NSUInteger)size;
|
||||
|
||||
/**
|
||||
* Returns a string containing the last path component of the receiver.<br />
|
||||
|
@ -661,7 +661,7 @@ typedef NSUInteger NSStringEncodingConversionOptions;
|
|||
- (NSString*) substringWithRange: (NSRange)aRange;
|
||||
- (NSComparisonResult) caseInsensitiveCompare: (NSString*)aString;
|
||||
- (NSComparisonResult) compare: (NSString*)string
|
||||
options: (unsigned int)mask
|
||||
options: (NSUInteger)mask
|
||||
range: (NSRange)compareRange
|
||||
locale: (NSDictionary*)dict;
|
||||
- (NSComparisonResult) localizedCompare: (NSString *)string;
|
||||
|
@ -672,16 +672,16 @@ typedef NSUInteger NSStringEncodingConversionOptions;
|
|||
- (double) doubleValue;
|
||||
+ (NSStringEncoding*) availableStringEncodings;
|
||||
+ (NSString*) localizedNameOfStringEncoding: (NSStringEncoding)encoding;
|
||||
- (void) getLineStart: (unsigned int *)startIndex
|
||||
end: (unsigned int *)lineEndIndex
|
||||
contentsEnd: (unsigned int *)contentsEndIndex
|
||||
- (void) getLineStart: (NSUInteger *)startIndex
|
||||
end: (NSUInteger *)lineEndIndex
|
||||
contentsEnd: (NSUInteger *)contentsEndIndex
|
||||
forRange: (NSRange)aRange;
|
||||
- (NSRange) lineRangeForRange: (NSRange)aRange;
|
||||
- (const char*) lossyCString;
|
||||
- (NSString*) stringByAddingPercentEscapesUsingEncoding: (NSStringEncoding)e;
|
||||
- (NSString*) stringByPaddingToLength: (unsigned int)newLength
|
||||
- (NSString*) stringByPaddingToLength: (NSUInteger)newLength
|
||||
withString: (NSString*)padString
|
||||
startingAtIndex: (unsigned int)padIndex;
|
||||
startingAtIndex: (NSUInteger)padIndex;
|
||||
- (NSString*) stringByReplacingPercentEscapesUsingEncoding: (NSStringEncoding)e;
|
||||
- (NSString*) stringByTrimmingCharactersInSet: (NSCharacterSet*)aSet;
|
||||
- (const char *)UTF8String;
|
||||
|
@ -723,27 +723,27 @@ typedef NSUInteger NSStringEncodingConversionOptions;
|
|||
// Creating Temporary Strings
|
||||
+ (id) string;
|
||||
+ (id) stringWithCharacters: (const unichar*)characters
|
||||
length: (unsigned int)length;
|
||||
length: (NSUInteger)length;
|
||||
+ (id) stringWithCString: (const char*)byteString
|
||||
length: (unsigned int)length;
|
||||
length: (NSUInteger)length;
|
||||
+ (id) stringWithCString: (const char*)byteString;
|
||||
+ (id) stringWithFormat: (NSString*)format,...;
|
||||
+ (id) stringWithContentsOfFile: (NSString*)path;
|
||||
+ (NSMutableString*) stringWithCapacity: (unsigned int)capacity;
|
||||
+ (NSMutableString*) stringWithCapacity: (NSUInteger)capacity;
|
||||
|
||||
// Initializing Newly Allocated Strings
|
||||
- (id) initWithCapacity: (unsigned int)capacity;
|
||||
- (id) initWithCapacity: (NSUInteger)capacity;
|
||||
|
||||
// Modify A String
|
||||
- (void) appendFormat: (NSString*)format, ...;
|
||||
- (void) appendString: (NSString*)aString;
|
||||
- (void) deleteCharactersInRange: (NSRange)range;
|
||||
- (void) insertString: (NSString*)aString atIndex: (unsigned int)loc;
|
||||
- (void) insertString: (NSString*)aString atIndex: (NSUInteger)loc;
|
||||
- (void) replaceCharactersInRange: (NSRange)range
|
||||
withString: (NSString*)aString;
|
||||
- (unsigned int) replaceOccurrencesOfString: (NSString*)replace
|
||||
- (NSUInteger) replaceOccurrencesOfString: (NSString*)replace
|
||||
withString: (NSString*)by
|
||||
options: (unsigned int)opts
|
||||
options: (NSUInteger)opts
|
||||
range: (NSRange)searchRange;
|
||||
- (void) setString: (NSString*)aString;
|
||||
|
||||
|
|
|
@ -56,7 +56,7 @@ extern "C" {
|
|||
id _arg;
|
||||
SEL _selector;
|
||||
NSString *_name;
|
||||
unsigned _stackSize;
|
||||
NSUInteger _stackSize;
|
||||
BOOL _cancelled;
|
||||
BOOL _active;
|
||||
BOOL _finished;
|
||||
|
@ -190,11 +190,11 @@ extern "C" {
|
|||
|
||||
/** Sets the size of the receiver's stack.
|
||||
*/
|
||||
- (void) setStackSize: (unsigned)stackSize;
|
||||
- (void) setStackSize: (NSUInteger)stackSize;
|
||||
|
||||
/** Returns the size of the receiver's stack.
|
||||
*/
|
||||
- (unsigned) stackSize;
|
||||
- (NSUInteger) stackSize;
|
||||
|
||||
/** Starts the receiver executing.
|
||||
*/
|
||||
|
|
|
@ -39,7 +39,7 @@ extern "C" {
|
|||
|
||||
//Creating and Initializing an NSTimeZone
|
||||
+ (NSTimeZone*) localTimeZone;
|
||||
+ (NSTimeZone*) timeZoneForSecondsFromGMT: (int)seconds;
|
||||
+ (NSTimeZone*) timeZoneForSecondsFromGMT: (NSInteger)seconds;
|
||||
+ (NSTimeZone*) timeZoneWithName: (NSString*)aTimeZoneName;
|
||||
|
||||
//Managing Time Zones
|
||||
|
@ -72,8 +72,8 @@ extern "C" {
|
|||
- (BOOL) isDaylightSavingTimeForDate: (NSDate*)aDate;
|
||||
- (BOOL) isEqualToTimeZone: (NSTimeZone*)aTimeZone;
|
||||
- (NSString*) name;
|
||||
- (int) secondsFromGMT;
|
||||
- (int) secondsFromGMTForDate: (NSDate*)aDate;
|
||||
- (NSInteger) secondsFromGMT;
|
||||
- (NSInteger) secondsFromGMTForDate: (NSDate*)aDate;
|
||||
#endif
|
||||
|
||||
#if OS_API_VERSION(100500,GS_API_LATEST)
|
||||
|
@ -118,7 +118,7 @@ GS_EXPORT NSString * const NSSystemTimeZoneDidChangeNotification;
|
|||
@interface NSTimeZoneDetail : NSTimeZone
|
||||
- (BOOL) isDaylightSavingTimeZone;
|
||||
- (NSString*) timeZoneAbbreviation;
|
||||
- (int) timeZoneSecondsFromGMT;
|
||||
- (NSInteger) timeZoneSecondsFromGMT;
|
||||
@end
|
||||
#endif
|
||||
|
||||
|
|
|
@ -116,7 +116,7 @@ extern "C" {
|
|||
*/
|
||||
- (id) initWithProtectionSpace: (NSURLProtectionSpace *)space
|
||||
proposedCredential: (NSURLCredential *)credential
|
||||
previousFailureCount: (int)previousFailureCount
|
||||
previousFailureCount: (NSInteger)previousFailureCount
|
||||
failureResponse: (NSURLResponse *)response
|
||||
error: (NSError *)error
|
||||
sender: (id<NSURLAuthenticationChallengeSender>)sender;
|
||||
|
@ -124,7 +124,7 @@ extern "C" {
|
|||
/**
|
||||
* Returns the count of failed authentication attempts.
|
||||
*/
|
||||
- (int) previousFailureCount;
|
||||
- (NSInteger) previousFailureCount;
|
||||
|
||||
/**
|
||||
* Returns a proposed credential to answer the challenge.<br />
|
||||
|
|
|
@ -137,32 +137,32 @@ typedef enum
|
|||
* Returns the current size (butes) of the data stored in the on-disk
|
||||
* cache.
|
||||
*/
|
||||
- (unsigned) currentDiskUsage;
|
||||
- (NSUInteger) currentDiskUsage;
|
||||
|
||||
/**
|
||||
* Returns the current size (butes) of the data stored in the in-memory
|
||||
* cache.
|
||||
*/
|
||||
- (unsigned) currentMemoryUsage;
|
||||
- (NSUInteger) currentMemoryUsage;
|
||||
|
||||
/**
|
||||
* Returns the disk capacity (in bytes) of the cache.
|
||||
*/
|
||||
- (unsigned) diskCapacity;
|
||||
- (NSUInteger) diskCapacity;
|
||||
|
||||
/**
|
||||
* Returns the receiver initialised with the specified capacities
|
||||
* (in bytes) and using the specified location on disk for persistent
|
||||
* storage.
|
||||
*/
|
||||
- (id) initWithMemoryCapacity: (unsigned)memoryCapacity
|
||||
diskCapacity: (unsigned)diskCapacity
|
||||
- (id) initWithMemoryCapacity: (NSUInteger)memoryCapacity
|
||||
diskCapacity: (NSUInteger)diskCapacity
|
||||
diskPath: (NSString *)path;
|
||||
|
||||
/**
|
||||
* Returns the memory capacity (in bytes) of the cache.
|
||||
*/
|
||||
- (unsigned) memoryCapacity;
|
||||
- (NSUInteger) memoryCapacity;
|
||||
|
||||
/**
|
||||
* Empties the cache.
|
||||
|
@ -178,12 +178,12 @@ typedef enum
|
|||
/**
|
||||
* Sets the disk capacity (in bytes) truncating cache contents if necessary.
|
||||
*/
|
||||
- (void) setDiskCapacity: (unsigned)diskCapacity;
|
||||
- (void) setDiskCapacity: (NSUInteger)diskCapacity;
|
||||
|
||||
/**
|
||||
* Sets the memory capacity (in bytes) truncating cache contents if necessary.
|
||||
*/
|
||||
- (void) setMemoryCapacity: (unsigned)memoryCapacity;
|
||||
- (void) setMemoryCapacity: (NSUInteger)memoryCapacity;
|
||||
|
||||
/**
|
||||
* Stores cachedResponse in the cache, keyed on request.<br />
|
||||
|
|
|
@ -168,7 +168,7 @@ extern "C" {
|
|||
* Called when some data has been received.
|
||||
*/
|
||||
- (void) download: (NSURLDownload *)download
|
||||
didReceiveDataOfLength: (unsigned)length;
|
||||
didReceiveDataOfLength: (NSUInteger)length;
|
||||
|
||||
/**
|
||||
* Called when a response is received.<br />
|
||||
|
|
|
@ -128,13 +128,14 @@ GS_EXPORT NSString * const GSHTTPPropertyPasswordKey;
|
|||
}
|
||||
</example>
|
||||
*/
|
||||
typedef enum
|
||||
enum
|
||||
{
|
||||
NSURLHandleNotLoaded = 0,
|
||||
NSURLHandleLoadSucceeded,
|
||||
NSURLHandleLoadInProgress,
|
||||
NSURLHandleLoadFailed
|
||||
} NSURLHandleStatus;
|
||||
};
|
||||
typedef NSUInteger NSURLHandleStatus;
|
||||
|
||||
/**
|
||||
* A protocol to which clients of a handle must conform in order to
|
||||
|
|
|
@ -80,7 +80,7 @@ extern NSString * const NSURLAuthenticationMethodHTTPDigest;
|
|||
* within the host, for others it may be nil.
|
||||
*/
|
||||
- (id) initWithHost: (NSString *)host
|
||||
port: (int)port
|
||||
port: (NSInteger)port
|
||||
protocol: (NSString *)protocol
|
||||
realm: (NSString *)realm
|
||||
authenticationMethod: (NSString *)authenticationMethod;
|
||||
|
@ -91,7 +91,7 @@ authenticationMethod: (NSString *)authenticationMethod;
|
|||
* host and a protocol.
|
||||
*/
|
||||
- (id) initWithProxyHost: (NSString *)host
|
||||
port: (int)port
|
||||
port: (NSInteger)port
|
||||
type: (NSString *)type
|
||||
realm: (NSString *)realm
|
||||
authenticationMethod: (NSString *)authenticationMethod;
|
||||
|
@ -105,7 +105,7 @@ authenticationMethod: (NSString *)authenticationMethod;
|
|||
/**
|
||||
* Returns the port set for this receiver or zero if none was set.
|
||||
*/
|
||||
- (int) port;
|
||||
- (NSInteger) port;
|
||||
|
||||
/**
|
||||
* Returns the protocol of the receiver or nil if it is a proxy.
|
||||
|
|
|
@ -41,6 +41,13 @@ extern "C" {
|
|||
@class NSString;
|
||||
@class NSURL;
|
||||
|
||||
enum
|
||||
{
|
||||
NSURLRequestUseProtocolCachePolicy,
|
||||
NSURLRequestReloadIgnoringCacheData,
|
||||
NSURLRequestReturnCacheDataElseLoad,
|
||||
NSURLRequestReturnCacheDataDontLoad,
|
||||
};
|
||||
/**
|
||||
* <deflist>
|
||||
* <term>NSURLRequestUseProtocolCachePolicy</term>
|
||||
|
@ -67,13 +74,7 @@ extern "C" {
|
|||
* </desc>
|
||||
* </deflist>
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
NSURLRequestUseProtocolCachePolicy,
|
||||
NSURLRequestReloadIgnoringCacheData,
|
||||
NSURLRequestReturnCacheDataElseLoad,
|
||||
NSURLRequestReturnCacheDataDontLoad,
|
||||
} NSURLRequestCachePolicy;
|
||||
typedef NSUInteger NSURLRequestCachePolicy;
|
||||
|
||||
|
||||
/**
|
||||
|
|
|
@ -63,7 +63,7 @@ extern "C" {
|
|||
*/
|
||||
- (id) initWithURL: (NSURL *)URL
|
||||
MIMEType: (NSString *)MIMEType
|
||||
expectedContentLength: (int)length
|
||||
expectedContentLength: (NSInteger)length
|
||||
textEncodingName: (NSString *)name;
|
||||
|
||||
/**
|
||||
|
@ -107,7 +107,7 @@ extern "C" {
|
|||
/**
|
||||
* Returns a string representation of a status code.
|
||||
*/
|
||||
+ (NSString *) localizedStringForStatusCode: (int)statusCode;
|
||||
+ (NSString *) localizedStringForStatusCode: (NSInteger)statusCode;
|
||||
|
||||
/**
|
||||
* Returns a dictionary containing all the HTTP header fields.
|
||||
|
@ -117,7 +117,7 @@ extern "C" {
|
|||
/**
|
||||
* Returns the HTTP status code for the response.
|
||||
*/
|
||||
- (int) statusCode;
|
||||
- (NSInteger) statusCode;
|
||||
|
||||
@end
|
||||
|
||||
|
|
|
@ -106,12 +106,12 @@ GS_EXPORT NSString* const NSUndoManagerWillUndoChangeNotification;
|
|||
- (void) enableUndoRegistration;
|
||||
- (void) endUndoGrouping;
|
||||
- (void) forwardInvocation: (NSInvocation*)anInvocation;
|
||||
- (int) groupingLevel;
|
||||
- (NSInteger) groupingLevel;
|
||||
- (BOOL) groupsByEvent;
|
||||
- (BOOL) isRedoing;
|
||||
- (BOOL) isUndoing;
|
||||
- (BOOL) isUndoRegistrationEnabled;
|
||||
- (unsigned int) levelsOfUndo;
|
||||
- (NSUInteger) levelsOfUndo;
|
||||
- (id) prepareWithInvocationTarget: (id)target;
|
||||
- (void) redo;
|
||||
- (NSString*) redoActionName;
|
||||
|
@ -125,7 +125,7 @@ GS_EXPORT NSString* const NSUndoManagerWillUndoChangeNotification;
|
|||
- (NSArray*) runLoopModes;
|
||||
- (void) setActionName: (NSString*)name;
|
||||
- (void) setGroupsByEvent: (BOOL)flag;
|
||||
- (void) setLevelsOfUndo: (unsigned)num;
|
||||
- (void) setLevelsOfUndo: (NSUInteger)num;
|
||||
- (void) setRunLoopModes: (NSArray*)newModes;
|
||||
- (void) undo;
|
||||
- (NSString*) undoActionName;
|
||||
|
|
|
@ -331,7 +331,7 @@ GS_EXPORT NSString* const GSLocale;
|
|||
* and returns its integer value or 0 if it is not representable
|
||||
* as an integer.
|
||||
*/
|
||||
- (int) integerForKey: (NSString*)defaultName;
|
||||
- (NSInteger) integerForKey: (NSString*)defaultName;
|
||||
|
||||
/**
|
||||
* Looks up a value for a specified default using.
|
||||
|
@ -381,7 +381,7 @@ GS_EXPORT NSString* const GSLocale;
|
|||
* Calls -setObject:forKey: to make the change by storing an intege
|
||||
* [NSNumber] instance.
|
||||
*/
|
||||
- (void) setInteger: (int)value forKey: (NSString*)defaultName;
|
||||
- (void) setInteger: (NSInteger)value forKey: (NSString*)defaultName;
|
||||
|
||||
/**
|
||||
* Sets a copy of an object value for defaultName in the
|
||||
|
|
|
@ -322,6 +322,29 @@ extern "C" {
|
|||
* Returns whether receiver and otherNumber represent the same numerical value.
|
||||
*/
|
||||
- (BOOL) isEqualToNumber: (NSNumber*)otherNumber;
|
||||
|
||||
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_5, GS_API_LATEST)
|
||||
/** Return a number intialised with NSInteger.
|
||||
*/
|
||||
+ (NSNumber*) numberWithInteger: (NSInteger)value;
|
||||
/** Return a number intialised with NSUInteger.
|
||||
*/
|
||||
+ (NSNumber*) numberWithUnsignedInteger: (NSUInteger)value;
|
||||
/** Initialise the receiver with NSInteger content.
|
||||
*/
|
||||
- (id) initWithInteger: (NSInteger)value;
|
||||
/** Initialise the receiver with NSUInteger content.
|
||||
*/
|
||||
- (id) initWithUnsignedInteger: (NSUInteger)value;
|
||||
/** Return the contents of the receiver as NSInteger.
|
||||
*/
|
||||
- (NSInteger) integerValue;
|
||||
/** Return the contents of the receiver as NSUInteger.
|
||||
*/
|
||||
- (NSUInteger) unsignedIntegerValue;
|
||||
#endif
|
||||
|
||||
@end
|
||||
|
||||
#if OS_API_VERSION(GS_API_NONE, GS_API_NONE)
|
||||
|
|
|
@ -154,12 +154,12 @@ GS_EXPORT NSString* const NSXMLParserErrorDomain;
|
|||
/**
|
||||
* Returns the current column number of the document being parsed.
|
||||
*/
|
||||
- (int) columnNumber;
|
||||
- (NSInteger) columnNumber;
|
||||
|
||||
/**
|
||||
* Returns the current line number of the document being parsed.
|
||||
*/
|
||||
- (int) lineNumber;
|
||||
- (NSInteger) lineNumber;
|
||||
|
||||
/**
|
||||
* Returns the public identifier of the external entity in the
|
||||
|
@ -308,7 +308,7 @@ GS_EXPORT NSString* const NSXMLParserErrorDomain;
|
|||
/*
|
||||
* Provide the same error codes as MacOS-X, even if we don't use them all.
|
||||
*/
|
||||
typedef enum {
|
||||
enum {
|
||||
NSXMLParserInternalError = 1,
|
||||
NSXMLParserOutOfMemoryError = 2,
|
||||
NSXMLParserDocumentStartError = 3,
|
||||
|
@ -402,7 +402,8 @@ typedef enum {
|
|||
NSXMLParserURIFragmentError = 92,
|
||||
NSXMLParserNoDTDError = 94,
|
||||
NSXMLParserDelegateAbortedParseError = 512
|
||||
} NSXMLParserError;
|
||||
};
|
||||
typedef NSUInteger NSXMLParserError;
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
|
|
|
@ -101,7 +101,7 @@ struct _NSZone
|
|||
};
|
||||
|
||||
GS_EXPORT NSZone*
|
||||
NSCreateZone (size_t start, size_t gran, BOOL canFree);
|
||||
NSCreateZone (NSUInteger start, NSUInteger gran, BOOL canFree);
|
||||
|
||||
GS_EXPORT NSZone*
|
||||
NSDefaultMallocZone (void);
|
||||
|
@ -117,7 +117,7 @@ NSZoneFromPointer (void *ptr);
|
|||
* default zone, in which case NULL is returned.
|
||||
*/
|
||||
GS_EXPORT void*
|
||||
NSZoneMalloc (NSZone *zone, size_t size);
|
||||
NSZoneMalloc (NSZone *zone, NSUInteger size);
|
||||
|
||||
/**
|
||||
* Allocates and returns cleared memory for elems items of size bytes, in the
|
||||
|
@ -127,7 +127,7 @@ NSZoneMalloc (NSZone *zone, size_t size);
|
|||
* default zone, in which case NULL is returned.
|
||||
*/
|
||||
GS_EXPORT void*
|
||||
NSZoneCalloc (NSZone *zone, size_t elems, size_t bytes);
|
||||
NSZoneCalloc (NSZone *zone, NSUInteger elems, NSUInteger bytes);
|
||||
|
||||
/**
|
||||
* Reallocates the chunk of memory in zone pointed to by ptr to a new one of
|
||||
|
@ -137,7 +137,7 @@ NSZoneCalloc (NSZone *zone, size_t elems, size_t bytes);
|
|||
* default zone, in which case NULL is returned.
|
||||
*/
|
||||
GS_EXPORT void*
|
||||
NSZoneRealloc (NSZone *zone, void *ptr, size_t size);
|
||||
NSZoneRealloc (NSZone *zone, void *ptr, NSUInteger size);
|
||||
|
||||
/**
|
||||
* Return memory for an entire zone to system. In fact, this will not be done
|
||||
|
@ -221,7 +221,7 @@ NSZoneStats (NSZone *zone);
|
|||
* Try to do some logging if possible.
|
||||
*/
|
||||
void*
|
||||
GSOutOfMemory(size_t size, BOOL retry);
|
||||
GSOutOfMemory(NSUInteger size, BOOL retry);
|
||||
|
||||
/**
|
||||
* Returns the default zone used for memory allocation, created at startup.
|
||||
|
|
|
@ -80,14 +80,14 @@ static Class gcClass = 0;
|
|||
return result;
|
||||
}
|
||||
|
||||
- (unsigned int) count
|
||||
- (NSUInteger) count
|
||||
{
|
||||
return _count;
|
||||
}
|
||||
|
||||
- (void) dealloc
|
||||
{
|
||||
unsigned int c = _count;
|
||||
NSUInteger c = _count;
|
||||
|
||||
[GCObject gcObjectWillBeDeallocated: (GCObject*)self];
|
||||
if ([GCObject gcIsCollecting])
|
||||
|
@ -114,7 +114,7 @@ static Class gcClass = 0;
|
|||
|
||||
- (void) gcDecrementRefCountOfContainedObjects
|
||||
{
|
||||
unsigned int c = _count;
|
||||
NSUInteger c = _count;
|
||||
|
||||
gc.flags.visited = 0;
|
||||
while (c-- > 0)
|
||||
|
@ -134,7 +134,7 @@ static Class gcClass = 0;
|
|||
}
|
||||
else
|
||||
{
|
||||
unsigned int c = _count;
|
||||
NSUInteger c = _count;
|
||||
|
||||
gc.flags.visited = 1;
|
||||
while (c-- > 0)
|
||||
|
@ -149,7 +149,7 @@ static Class gcClass = 0;
|
|||
}
|
||||
}
|
||||
|
||||
- (id) initWithObjects: (id*)objects count: (unsigned int)count
|
||||
- (id) initWithObjects: (id*)objects count: (NSUInteger)count
|
||||
{
|
||||
_contents = NSZoneMalloc([self zone], count * (sizeof(id) + sizeof(BOOL)));
|
||||
_isGCObject = (BOOL*)&_contents[count];
|
||||
|
@ -174,7 +174,7 @@ static Class gcClass = 0;
|
|||
|
||||
- (id) initWithArray: (NSArray*)anotherArray
|
||||
{
|
||||
unsigned int count = [anotherArray count];
|
||||
NSUInteger count = [anotherArray count];
|
||||
|
||||
_contents = NSZoneMalloc([self zone], count * (sizeof(id) + sizeof(BOOL)));
|
||||
_isGCObject = (BOOL*)&_contents[count];
|
||||
|
@ -208,7 +208,7 @@ static Class gcClass = 0;
|
|||
return [[GCMutableArray allocWithZone: zone] initWithArray: self];
|
||||
}
|
||||
|
||||
- (id) objectAtIndex: (unsigned int)index
|
||||
- (id) objectAtIndex: (NSUInteger)index
|
||||
{
|
||||
if (index >= _count)
|
||||
{
|
||||
|
@ -272,7 +272,7 @@ static Class gcClass = 0;
|
|||
|
||||
- (id) initWithArray: (NSArray*)anotherArray
|
||||
{
|
||||
unsigned int count = [anotherArray count];
|
||||
NSUInteger count = [anotherArray count];
|
||||
|
||||
self = [self initWithCapacity: count];
|
||||
if (self != nil)
|
||||
|
@ -287,7 +287,7 @@ static Class gcClass = 0;
|
|||
return self;
|
||||
}
|
||||
|
||||
- (id) initWithCapacity: (unsigned int)aNumItems
|
||||
- (id) initWithCapacity: (NSUInteger)aNumItems
|
||||
{
|
||||
if (aNumItems < 1)
|
||||
{
|
||||
|
@ -301,7 +301,7 @@ static Class gcClass = 0;
|
|||
return self;
|
||||
}
|
||||
|
||||
- (id) initWithObjects: (id *)objects count: (unsigned int)count
|
||||
- (id) initWithObjects: (id *)objects count: (NSUInteger)count
|
||||
{
|
||||
self = [self initWithCapacity: count];
|
||||
if (self != nil)
|
||||
|
@ -325,9 +325,9 @@ static Class gcClass = 0;
|
|||
return self;
|
||||
}
|
||||
|
||||
- (void) insertObject: (id)anObject atIndex: (unsigned int)index
|
||||
- (void) insertObject: (id)anObject atIndex: (NSUInteger)index
|
||||
{
|
||||
unsigned int i;
|
||||
NSUInteger i;
|
||||
|
||||
if (anObject == nil)
|
||||
{
|
||||
|
@ -381,14 +381,14 @@ static Class gcClass = 0;
|
|||
[self removeObjectsInRange: NSMakeRange(0, _count)];
|
||||
}
|
||||
|
||||
- (void) removeObjectAtIndex: (unsigned int)index
|
||||
- (void) removeObjectAtIndex: (NSUInteger)index
|
||||
{
|
||||
[self removeObjectsInRange: NSMakeRange(index, 1)];
|
||||
}
|
||||
|
||||
- (void) removeObjectsInRange: (NSRange)range
|
||||
{
|
||||
unsigned int i;
|
||||
NSUInteger i;
|
||||
|
||||
if (NSMaxRange(range) > _count)
|
||||
{
|
||||
|
@ -413,7 +413,7 @@ static Class gcClass = 0;
|
|||
_count -= range.length;
|
||||
}
|
||||
|
||||
- (void) replaceObjectAtIndex: (unsigned int)index withObject: (id)anObject
|
||||
- (void) replaceObjectAtIndex: (NSUInteger)index withObject: (id)anObject
|
||||
{
|
||||
if (anObject == nil)
|
||||
{
|
||||
|
|
|
@ -170,7 +170,7 @@ static Class gcClass = 0;
|
|||
return [[GCDictionary allocWithZone: zone] initWithDictionary: self];
|
||||
}
|
||||
|
||||
- (unsigned int) count
|
||||
- (NSUInteger) count
|
||||
{
|
||||
return NSCountMapTable(_map);
|
||||
}
|
||||
|
@ -239,7 +239,7 @@ static Class gcClass = 0;
|
|||
{
|
||||
id keys = [dictionary keyEnumerator];
|
||||
id key;
|
||||
unsigned int size = ([dictionary count] * 4) / 3;
|
||||
NSUInteger size = ([dictionary count] * 4) / 3;
|
||||
NSZone *z = NSDefaultMallocZone();
|
||||
|
||||
_map = NSCreateMapTableWithZone(GCInfoMapKeyCallBacks,
|
||||
|
@ -266,9 +266,9 @@ static Class gcClass = 0;
|
|||
|
||||
- (id) initWithObjects: (id*)objects
|
||||
forKeys: (id*)keys
|
||||
count: (unsigned int)count
|
||||
count: (NSUInteger)count
|
||||
{
|
||||
unsigned int size = (count * 4) / 3;
|
||||
NSUInteger size = (count * 4) / 3;
|
||||
NSZone *z = NSDefaultMallocZone();
|
||||
|
||||
_map = NSCreateMapTableWithZone(GCInfoMapKeyCallBacks,
|
||||
|
@ -368,9 +368,9 @@ static Class gcClass = 0;
|
|||
return [self initWithCapacity: 0];
|
||||
}
|
||||
|
||||
- (id) initWithCapacity: (unsigned int)aNumItems
|
||||
- (id) initWithCapacity: (NSUInteger)aNumItems
|
||||
{
|
||||
unsigned int size = (aNumItems * 4) / 3;
|
||||
NSUInteger size = (aNumItems * 4) / 3;
|
||||
|
||||
_map = NSCreateMapTableWithZone(GCInfoMapKeyCallBacks,
|
||||
GCInfoValueCallBacks, size, [self zone]);
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
|
||||
@implementation NSArray (GSCategories)
|
||||
|
||||
- (unsigned) insertionPosition: (id)item
|
||||
- (NSUInteger) insertionPosition: (id)item
|
||||
usingFunction: (NSComparisonResult (*)(id, id, void *))sorter
|
||||
context: (void *)context
|
||||
{
|
||||
|
@ -91,7 +91,7 @@
|
|||
return index;
|
||||
}
|
||||
|
||||
- (unsigned) insertionPosition: (id)item
|
||||
- (NSUInteger) insertionPosition: (id)item
|
||||
usingSelector: (SEL)comp
|
||||
{
|
||||
unsigned count = [self count];
|
||||
|
@ -178,10 +178,10 @@
|
|||
* last day of the year is a monday tuesday or wednesday, these days are
|
||||
* part of week 1 of the next year.
|
||||
*/
|
||||
- (int) weekOfYear
|
||||
- (NSInteger) weekOfYear
|
||||
{
|
||||
int dayOfWeek = [self dayOfWeek];
|
||||
int dayOfYear;
|
||||
NSInteger dayOfWeek = [self dayOfWeek];
|
||||
NSInteger dayOfYear;
|
||||
|
||||
/*
|
||||
* Whether a week is considered to be in a year or not depends on its
|
||||
|
@ -825,7 +825,7 @@ static void MD5Transform (uint32_t buf[4], uint32_t const in[16])
|
|||
/*
|
||||
* The header is a line of the form 'begin mode filename'
|
||||
*/
|
||||
sprintf((char*)buf, "begin %03o ", mode);
|
||||
sprintf((char*)buf, "begin %03o ", (int)mode);
|
||||
[encoded appendBytes: buf length: strlen((const char*)buf)];
|
||||
[encoded appendData: [name dataUsingEncoding: NSASCIIStringEncoding]];
|
||||
[encoded appendBytes: "\n" length: 1];
|
||||
|
@ -1172,7 +1172,7 @@ strerror_r(int eno, char *buf, int len)
|
|||
if (length > 0)
|
||||
{
|
||||
unsigned start = 0;
|
||||
unichar (*caiImp)(NSString*, SEL, unsigned int);
|
||||
unichar (*caiImp)(NSString*, SEL, NSUInteger);
|
||||
SEL caiSel = @selector(characterAtIndex:);
|
||||
|
||||
caiImp = (unichar (*)())[self methodForSelector: caiSel];
|
||||
|
@ -1199,7 +1199,7 @@ strerror_r(int eno, char *buf, int len)
|
|||
if (length > 0)
|
||||
{
|
||||
unsigned end = length;
|
||||
unichar (*caiImp)(NSString*, SEL, unsigned int);
|
||||
unichar (*caiImp)(NSString*, SEL, NSUInteger);
|
||||
SEL caiSel = @selector(characterAtIndex:);
|
||||
|
||||
caiImp = (unichar (*)())[self methodForSelector: caiSel];
|
||||
|
@ -1231,7 +1231,7 @@ strerror_r(int eno, char *buf, int len)
|
|||
{
|
||||
unsigned start = 0;
|
||||
unsigned end = length;
|
||||
unichar (*caiImp)(NSString*, SEL, unsigned int);
|
||||
unichar (*caiImp)(NSString*, SEL, NSUInteger);
|
||||
SEL caiSel = @selector(characterAtIndex:);
|
||||
|
||||
caiImp = (unichar (*)())[self methodForSelector: caiSel];
|
||||
|
@ -1385,7 +1385,7 @@ strerror_r(int eno, char *buf, int len)
|
|||
if (length > 0)
|
||||
{
|
||||
unsigned start = 0;
|
||||
unichar (*caiImp)(NSString*, SEL, unsigned int);
|
||||
unichar (*caiImp)(NSString*, SEL, NSUInteger);
|
||||
SEL caiSel = @selector(characterAtIndex:);
|
||||
|
||||
caiImp = (unichar (*)())[self methodForSelector: caiSel];
|
||||
|
@ -1410,7 +1410,7 @@ strerror_r(int eno, char *buf, int len)
|
|||
if (length > 0)
|
||||
{
|
||||
unsigned end = length;
|
||||
unichar (*caiImp)(NSString*, SEL, unsigned int);
|
||||
unichar (*caiImp)(NSString*, SEL, NSUInteger);
|
||||
SEL caiSel = @selector(characterAtIndex:);
|
||||
|
||||
caiImp = (unichar (*)())[self methodForSelector: caiSel];
|
||||
|
|
|
@ -389,7 +389,7 @@ wordData(NSString *word)
|
|||
* Return YES on success, NO if there is an error.
|
||||
*/
|
||||
- (BOOL) decodeData: (const void*)sData
|
||||
length: (unsigned)length
|
||||
length: (NSUInteger)length
|
||||
intoData: (NSMutableData*)dData
|
||||
{
|
||||
unsigned size = [dData length];
|
||||
|
@ -417,7 +417,7 @@ wordData(NSString *word)
|
|||
@end
|
||||
@implementation GSMimeBase64DecoderContext
|
||||
- (BOOL) decodeData: (const void*)sData
|
||||
length: (unsigned)length
|
||||
length: (NSUInteger)length
|
||||
intoData: (NSMutableData*)dData
|
||||
{
|
||||
unsigned size = [dData length];
|
||||
|
@ -517,7 +517,7 @@ wordData(NSString *word)
|
|||
@end
|
||||
@implementation GSMimeQuotedDecoderContext
|
||||
- (BOOL) decodeData: (const void*)sData
|
||||
length: (unsigned)length
|
||||
length: (NSUInteger)length
|
||||
intoData: (NSMutableData*)dData
|
||||
{
|
||||
unsigned size = [dData length];
|
||||
|
@ -618,7 +618,7 @@ wordData(NSString *word)
|
|||
|
||||
@implementation GSMimeUUCodingContext
|
||||
- (BOOL) decodeData: (const void*)sData
|
||||
length: (unsigned)length
|
||||
length: (NSUInteger)length
|
||||
intoData: (NSMutableData*)dData
|
||||
{
|
||||
[super decodeData: sData length: length intoData: dData];
|
||||
|
@ -3676,7 +3676,7 @@ appendString(NSMutableData *m, unsigned offset, unsigned fold,
|
|||
|
||||
|
||||
@interface GSMimeDocument (Private)
|
||||
- (unsigned) _indexOfHeaderNamed: (NSString*)name;
|
||||
- (NSUInteger) _indexOfHeaderNamed: (NSString*)name;
|
||||
@end
|
||||
|
||||
/**
|
||||
|
@ -5743,7 +5743,7 @@ appendString(NSMutableData *m, unsigned offset, unsigned fold,
|
|||
* NB. The supplied name <em>must</em> be lowercase.<br />
|
||||
* This method is for internal use
|
||||
*/
|
||||
- (unsigned) _indexOfHeaderNamed: (NSString*)name
|
||||
- (NSUInteger) _indexOfHeaderNamed: (NSString*)name
|
||||
{
|
||||
unsigned count = [headers count];
|
||||
unsigned index;
|
||||
|
|
|
@ -225,7 +225,7 @@ static NSMapTable *attrNames = 0;
|
|||
}
|
||||
}
|
||||
|
||||
+ (int) typeFromDescription: (NSString*)desc
|
||||
+ (NSInteger) typeFromDescription: (NSString*)desc
|
||||
{
|
||||
NSMapEnumerator enumerator;
|
||||
NSString *val;
|
||||
|
@ -236,22 +236,22 @@ static NSMapTable *attrNames = 0;
|
|||
{
|
||||
if ([desc isEqual: val] == YES)
|
||||
{
|
||||
return (int)(intptr_t)key;
|
||||
return (NSInteger)(intptr_t)key;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
+ (NSString*) descriptionFromType: (int)type
|
||||
+ (NSString*) descriptionFromType: (NSInteger)type
|
||||
{
|
||||
NSString *desc = (NSString*)NSMapGet(attrNames, (void*)(intptr_t)type);
|
||||
|
||||
return desc;
|
||||
}
|
||||
|
||||
- (int) type
|
||||
- (NSInteger) type
|
||||
{
|
||||
return (int)((xmlAttrPtr)(lib))->atype;
|
||||
return (NSInteger)((xmlAttrPtr)(lib))->atype;
|
||||
}
|
||||
|
||||
- (NSString*) typeDescription
|
||||
|
@ -400,9 +400,9 @@ static NSMapTable *attrNames = 0;
|
|||
return UTF8Str(((xmlDocPtr)(lib))->encoding);
|
||||
}
|
||||
|
||||
- (unsigned) hash
|
||||
- (NSUInteger) hash
|
||||
{
|
||||
return (((unsigned)(uintptr_t)lib) >> 3);
|
||||
return (((NSUInteger)(intptr_t)lib) >> 3);
|
||||
}
|
||||
|
||||
- (id) init
|
||||
|
@ -553,7 +553,7 @@ static NSMapTable *nsNames = 0;
|
|||
/**
|
||||
* Return the string representation of the specified numeric type.
|
||||
*/
|
||||
+ (NSString*) descriptionFromType: (int)type
|
||||
+ (NSString*) descriptionFromType: (NSInteger)type
|
||||
{
|
||||
NSString *desc = (NSString*)NSMapGet(nsNames, (void*)(intptr_t)type);
|
||||
|
||||
|
@ -582,7 +582,7 @@ static NSMapTable *nsNames = 0;
|
|||
* <item>XML_LOCAL_NAMESPACE</item>
|
||||
* </list>
|
||||
*/
|
||||
+ (int) typeFromDescription: (NSString*)desc
|
||||
+ (NSInteger) typeFromDescription: (NSString*)desc
|
||||
{
|
||||
NSMapEnumerator enumerator;
|
||||
NSString *val;
|
||||
|
@ -593,7 +593,7 @@ static NSMapTable *nsNames = 0;
|
|||
{
|
||||
if ([desc isEqual: val] == YES)
|
||||
{
|
||||
return (int)(intptr_t)key;
|
||||
return (NSInteger)(intptr_t)key;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
|
@ -610,9 +610,9 @@ static NSMapTable *nsNames = 0;
|
|||
[super dealloc];
|
||||
}
|
||||
|
||||
- (unsigned) hash
|
||||
- (NSUInteger) hash
|
||||
{
|
||||
return (((unsigned)(uintptr_t)lib) >> 3);
|
||||
return (((NSUInteger)(intptr_t)lib) >> 3);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -676,9 +676,9 @@ static NSMapTable *nsNames = 0;
|
|||
/**
|
||||
* Return type of namespace
|
||||
*/
|
||||
- (int) type
|
||||
- (NSInteger) type
|
||||
{
|
||||
return (int)((xmlNsPtr)(lib))->type;
|
||||
return (NSInteger)((xmlNsPtr)(lib))->type;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -731,7 +731,7 @@ static NSMapTable *nodeNames = 0;
|
|||
/**
|
||||
* Return the string constant value for the node type given.
|
||||
*/
|
||||
+ (NSString*) descriptionFromType: (int)type
|
||||
+ (NSString*) descriptionFromType: (NSInteger)type
|
||||
{
|
||||
NSString *desc = (NSString*)NSMapGet(nodeNames, (void*)(intptr_t)type);
|
||||
|
||||
|
@ -810,7 +810,7 @@ static NSMapTable *nodeNames = 0;
|
|||
* <item>XML_ENTITY_DECL</item>
|
||||
* </list>
|
||||
*/
|
||||
+ (int) typeFromDescription: (NSString*)desc
|
||||
+ (NSInteger) typeFromDescription: (NSString*)desc
|
||||
{
|
||||
NSMapEnumerator enumerator;
|
||||
NSString *val;
|
||||
|
@ -821,7 +821,7 @@ static NSMapTable *nodeNames = 0;
|
|||
{
|
||||
if ([desc isEqual: val] == YES)
|
||||
{
|
||||
return (int)(intptr_t)key;
|
||||
return (NSInteger)(intptr_t)key;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
|
@ -894,11 +894,11 @@ static NSMapTable *nodeNames = 0;
|
|||
{
|
||||
return UTF8Str(ptr->content);
|
||||
}
|
||||
if ((int)ptr->type == XML_TEXT_NODE)
|
||||
if ((NSInteger)ptr->type == XML_TEXT_NODE)
|
||||
{
|
||||
return @"";
|
||||
}
|
||||
else if ((int)ptr->type == XML_ELEMENT_NODE)
|
||||
else if ((NSInteger)ptr->type == XML_ELEMENT_NODE)
|
||||
{
|
||||
ptr = ptr->children;
|
||||
if (ptr != NULL)
|
||||
|
@ -1070,9 +1070,9 @@ static NSMapTable *nodeNames = 0;
|
|||
}
|
||||
}
|
||||
|
||||
- (unsigned) hash
|
||||
- (NSUInteger) hash
|
||||
{
|
||||
return (((unsigned)(uintptr_t)lib) >> 3);
|
||||
return (((NSUInteger)(intptr_t)lib) >> 3);
|
||||
}
|
||||
|
||||
- (id) init
|
||||
|
@ -1089,7 +1089,7 @@ static NSMapTable *nodeNames = 0;
|
|||
*/
|
||||
- (BOOL) isElement
|
||||
{
|
||||
if ((int)((xmlNodePtr)(lib))->type == XML_ELEMENT_NODE)
|
||||
if ((NSInteger)((xmlNodePtr)(lib))->type == XML_ELEMENT_NODE)
|
||||
{
|
||||
return YES;
|
||||
}
|
||||
|
@ -1116,7 +1116,7 @@ static NSMapTable *nodeNames = 0;
|
|||
*/
|
||||
- (BOOL) isText
|
||||
{
|
||||
if ((int)((xmlNodePtr)(lib))->type == XML_TEXT_NODE)
|
||||
if ((NSInteger)((xmlNodePtr)(lib))->type == XML_TEXT_NODE)
|
||||
{
|
||||
return YES;
|
||||
}
|
||||
|
@ -1531,9 +1531,9 @@ static NSMapTable *nodeNames = 0;
|
|||
* use this method and compare the return value with a value you previously
|
||||
* obtained using the +typeFromDescription: method.
|
||||
*/
|
||||
- (int) type
|
||||
- (NSInteger) type
|
||||
{
|
||||
return (int)((xmlNodePtr)(lib))->type;
|
||||
return (NSInteger)((xmlNodePtr)(lib))->type;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1847,7 +1847,7 @@ static NSString *endMarker = @"At end of incremental parse";
|
|||
/**
|
||||
* If executed during a parse operation, returns the current column number.
|
||||
*/
|
||||
- (int) columnNumber
|
||||
- (NSInteger) columnNumber
|
||||
{
|
||||
return xmlSAX2GetColumnNumber(lib);
|
||||
}
|
||||
|
@ -1891,7 +1891,7 @@ static NSString *endMarker = @"At end of incremental parse";
|
|||
/**
|
||||
* Return error code for last parse operation.
|
||||
*/
|
||||
- (int) errNo
|
||||
- (NSInteger) errNo
|
||||
{
|
||||
return ((xmlParserCtxtPtr)lib)->errNo;
|
||||
}
|
||||
|
@ -2057,7 +2057,7 @@ static NSString *endMarker = @"At end of incremental parse";
|
|||
/**
|
||||
* If executed during a parse operation, returns the current line number.
|
||||
*/
|
||||
- (int) lineNumber
|
||||
- (NSInteger) lineNumber
|
||||
{
|
||||
return xmlSAX2GetLineNumber(lib);
|
||||
}
|
||||
|
@ -3043,7 +3043,7 @@ fatalErrorFunction(void *ctx, const unsigned char *msg, ...)
|
|||
/**
|
||||
* Called to detemrine if the document is standalone.
|
||||
*/
|
||||
- (int) isStandalone
|
||||
- (NSInteger) isStandalone
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
@ -3166,7 +3166,7 @@ fatalErrorFunction(void *ctx, const unsigned char *msg, ...)
|
|||
* An entity definition has been parsed.
|
||||
*/
|
||||
- (void) entityDecl: (NSString*)name
|
||||
type: (int)type
|
||||
type: (NSInteger)type
|
||||
public: (NSString*)publicId
|
||||
system: (NSString*)systemId
|
||||
content: (NSString*)content
|
||||
|
@ -3178,8 +3178,8 @@ fatalErrorFunction(void *ctx, const unsigned char *msg, ...)
|
|||
*/
|
||||
- (void) attributeDecl: (NSString*)nameElement
|
||||
name: (NSString*)name
|
||||
type: (int)type
|
||||
typeDefValue: (int)defType
|
||||
type: (NSInteger)type
|
||||
typeDefValue: (NSInteger)defType
|
||||
defaultValue: (NSString*)value
|
||||
{
|
||||
}
|
||||
|
@ -3188,7 +3188,7 @@ fatalErrorFunction(void *ctx, const unsigned char *msg, ...)
|
|||
* An element definition has been parsed.
|
||||
*/
|
||||
- (void) elementDecl: (NSString*)name
|
||||
type: (int)type
|
||||
type: (NSInteger)type
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -3246,8 +3246,8 @@ fatalErrorFunction(void *ctx, const unsigned char *msg, ...)
|
|||
* Called when a warning message needs to be output.
|
||||
*/
|
||||
- (void) warning: (NSString*)e
|
||||
colNumber: (int)colNumber
|
||||
lineNumber: (int)lineNumber
|
||||
colNumber: (NSInteger)colNumber
|
||||
lineNumber: (NSInteger)lineNumber
|
||||
{
|
||||
e = [NSString stringWithFormat: @"at line: %d column: %d ... %@",
|
||||
lineNumber, colNumber, e];
|
||||
|
@ -3258,8 +3258,8 @@ fatalErrorFunction(void *ctx, const unsigned char *msg, ...)
|
|||
* Called when an error message needs to be output.
|
||||
*/
|
||||
- (void) error: (NSString*)e
|
||||
colNumber: (int)colNumber
|
||||
lineNumber: (int)lineNumber
|
||||
colNumber: (NSInteger)colNumber
|
||||
lineNumber: (NSInteger)lineNumber
|
||||
{
|
||||
e = [NSString stringWithFormat: @"at line: %d column: %d ... %@",
|
||||
lineNumber, colNumber, e];
|
||||
|
@ -3270,8 +3270,8 @@ fatalErrorFunction(void *ctx, const unsigned char *msg, ...)
|
|||
* Called when a fatal error message needs to be output.
|
||||
*/
|
||||
- (void) fatalError: (NSString*)e
|
||||
colNumber: (int)colNumber
|
||||
lineNumber: (int)lineNumber
|
||||
colNumber: (NSInteger)colNumber
|
||||
lineNumber: (NSInteger)lineNumber
|
||||
{
|
||||
e = [NSString stringWithFormat: @"at line: %d column: %d ... %@",
|
||||
lineNumber, colNumber, e];
|
||||
|
@ -3281,7 +3281,7 @@ fatalErrorFunction(void *ctx, const unsigned char *msg, ...)
|
|||
/**
|
||||
* Called to find out whether there is an internal subset.
|
||||
*/
|
||||
- (int) hasInternalSubset
|
||||
- (NSInteger) hasInternalSubset
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -3299,7 +3299,7 @@ fatalErrorFunction(void *ctx, const unsigned char *msg, ...)
|
|||
/**
|
||||
* Called to find out whether there is an external subset.
|
||||
*/
|
||||
- (int) hasExternalSubset
|
||||
- (NSInteger) hasExternalSubset
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -3688,7 +3688,7 @@ fatalErrorFunction(void *ctx, const unsigned char *msg, ...)
|
|||
/**
|
||||
* Returns the number of nodes in the receiver.
|
||||
*/
|
||||
- (unsigned int) count
|
||||
- (NSUInteger) count
|
||||
{
|
||||
if (xmlXPathNodeSetIsEmpty (((xmlXPathObject*)_lib)->nodesetval))
|
||||
{
|
||||
|
@ -3700,7 +3700,7 @@ fatalErrorFunction(void *ctx, const unsigned char *msg, ...)
|
|||
/**
|
||||
* Deprecated
|
||||
*/
|
||||
- (unsigned int) length
|
||||
- (NSUInteger) length
|
||||
{
|
||||
if (xmlXPathNodeSetIsEmpty (((xmlXPathObject*)_lib)->nodesetval))
|
||||
{
|
||||
|
@ -3714,7 +3714,7 @@ fatalErrorFunction(void *ctx, const unsigned char *msg, ...)
|
|||
* Returns the node from the receiver at the specified index, or nil
|
||||
* if no such node exists.
|
||||
*/
|
||||
- (GSXMLNode *) nodeAtIndex: (unsigned)index
|
||||
- (GSXMLNode *) nodeAtIndex: (NSUInteger)index
|
||||
{
|
||||
if (xmlXPathNodeSetIsEmpty (((xmlXPathObject*)_lib)->nodesetval))
|
||||
{
|
||||
|
@ -3726,7 +3726,7 @@ fatalErrorFunction(void *ctx, const unsigned char *msg, ...)
|
|||
GSXMLNode *n;
|
||||
|
||||
node = xmlXPathNodeSetItem (((xmlXPathObject*)_lib)->nodesetval,
|
||||
(int)index);
|
||||
(NSInteger)index);
|
||||
n = [GSXMLNode alloc];
|
||||
n = [n _initFrom: node parent: self];
|
||||
return AUTORELEASE(n);
|
||||
|
@ -4441,43 +4441,43 @@ static BOOL warned = NO; if (warned == NO) { warned = YES; NSLog(@"WARNING, use
|
|||
*/
|
||||
@interface NSArray (GSXMLRPC)
|
||||
- (void) appendToXMLRPC: (NSMutableString*)str
|
||||
indent: (unsigned)indent
|
||||
indent: (NSUInteger)indent
|
||||
for: (GSXMLRPC*)rpc;
|
||||
@end
|
||||
|
||||
@interface NSData (GSXMLRPC)
|
||||
- (void) appendToXMLRPC: (NSMutableString*)str
|
||||
indent: (unsigned)indent
|
||||
indent: (NSUInteger)indent
|
||||
for: (GSXMLRPC*)rpc;
|
||||
@end
|
||||
|
||||
@interface NSDate (GSXMLRPC)
|
||||
- (void) appendToXMLRPC: (NSMutableString*)str
|
||||
indent: (unsigned)indent
|
||||
indent: (NSUInteger)indent
|
||||
for: (GSXMLRPC*)rpc;
|
||||
@end
|
||||
|
||||
@interface NSDictionary (GSXMLRPC)
|
||||
- (void) appendToXMLRPC: (NSMutableString*)str
|
||||
indent: (unsigned)indent
|
||||
indent: (NSUInteger)indent
|
||||
for: (GSXMLRPC*)rpc;
|
||||
@end
|
||||
|
||||
@interface NSObject (GSXMLRPC)
|
||||
- (void) appendToXMLRPC: (NSMutableString*)str
|
||||
indent: (unsigned)indent
|
||||
indent: (NSUInteger)indent
|
||||
for: (GSXMLRPC*)rpc;
|
||||
@end
|
||||
|
||||
@interface NSNumber (GSXMLRPC)
|
||||
- (void) appendToXMLRPC: (NSMutableString*)str
|
||||
indent: (unsigned)indent
|
||||
indent: (NSUInteger)indent
|
||||
for: (GSXMLRPC*)rpc;
|
||||
@end
|
||||
|
||||
@interface NSString (GSXMLRPC)
|
||||
- (void) appendToXMLRPC: (NSMutableString*)str
|
||||
indent: (unsigned)indent
|
||||
indent: (NSUInteger)indent
|
||||
for: (GSXMLRPC*)rpc;
|
||||
@end
|
||||
|
||||
|
@ -4528,7 +4528,7 @@ static void indentation(unsigned level, NSMutableString *str)
|
|||
|
||||
@implementation NSArray (GSXMLRPC)
|
||||
- (void) appendToXMLRPC: (NSMutableString*)str
|
||||
indent: (unsigned)indent
|
||||
indent: (NSUInteger)indent
|
||||
for: (GSXMLRPC*)rpc
|
||||
{
|
||||
unsigned i;
|
||||
|
@ -4564,7 +4564,7 @@ static void indentation(unsigned level, NSMutableString *str)
|
|||
|
||||
@implementation NSData (GSXMLRPC)
|
||||
- (void) appendToXMLRPC: (NSMutableString*)str
|
||||
indent: (unsigned)indent
|
||||
indent: (NSUInteger)indent
|
||||
for: (GSXMLRPC*)rpc
|
||||
{
|
||||
NSData *d;
|
||||
|
@ -4581,7 +4581,7 @@ static void indentation(unsigned level, NSMutableString *str)
|
|||
|
||||
@implementation NSDate (GSXMLRPC)
|
||||
- (void) appendToXMLRPC: (NSMutableString*)str
|
||||
indent: (unsigned)indent
|
||||
indent: (NSUInteger)indent
|
||||
for: (GSXMLRPC*)rpc
|
||||
{
|
||||
NSString *s;
|
||||
|
@ -4597,7 +4597,7 @@ static void indentation(unsigned level, NSMutableString *str)
|
|||
|
||||
@implementation NSDictionary (GSXMLRPC)
|
||||
- (void) appendToXMLRPC: (NSMutableString*)str
|
||||
indent: (unsigned)indent
|
||||
indent: (NSUInteger)indent
|
||||
for: (GSXMLRPC*)rpc
|
||||
{
|
||||
NSEnumerator *kEnum = [self keyEnumerator];
|
||||
|
@ -4638,7 +4638,7 @@ static void indentation(unsigned level, NSMutableString *str)
|
|||
|
||||
@implementation NSNumber (GSXMLRPC)
|
||||
- (void) appendToXMLRPC: (NSMutableString*)str
|
||||
indent: (unsigned)indent
|
||||
indent: (NSUInteger)indent
|
||||
for: (GSXMLRPC*)rpc
|
||||
{
|
||||
const char *t = [self objCType];
|
||||
|
@ -4674,7 +4674,7 @@ static void indentation(unsigned level, NSMutableString *str)
|
|||
|
||||
@implementation NSObject (GSXMLRPC)
|
||||
- (void) appendToXMLRPC: (NSMutableString*)str
|
||||
indent: (unsigned)indent
|
||||
indent: (NSUInteger)indent
|
||||
for: (GSXMLRPC*)rpc
|
||||
{
|
||||
[[self description] appendToXMLRPC: str indent: indent for: rpc];
|
||||
|
@ -4683,7 +4683,7 @@ static void indentation(unsigned level, NSMutableString *str)
|
|||
|
||||
@implementation NSString (GSXMLRPC)
|
||||
- (void) appendToXMLRPC: (NSMutableString*)str
|
||||
indent: (unsigned)indent
|
||||
indent: (NSUInteger)indent
|
||||
for: (GSXMLRPC*)rpc
|
||||
{
|
||||
BOOL compact = [rpc compact];
|
||||
|
@ -4990,7 +4990,7 @@ static void indentation(unsigned level, NSMutableString *str)
|
|||
return str;
|
||||
}
|
||||
|
||||
- (NSString*) buildResponseWithFaultCode: (int)code andString: (NSString*)s
|
||||
- (NSString*) buildResponseWithFaultCode: (NSInteger)code andString: (NSString*)s
|
||||
{
|
||||
NSMutableString *str = [NSMutableString stringWithCapacity: 1024];
|
||||
NSDictionary *fault;
|
||||
|
@ -5140,7 +5140,7 @@ static void indentation(unsigned level, NSMutableString *str)
|
|||
|
||||
- (id) makeMethodCall: (NSString*)method
|
||||
params: (NSArray*)params
|
||||
timeout: (int)seconds
|
||||
timeout: (NSInteger)seconds
|
||||
{
|
||||
NS_DURING
|
||||
{
|
||||
|
@ -5322,7 +5322,7 @@ static void indentation(unsigned level, NSMutableString *str)
|
|||
|
||||
- (BOOL) sendMethodCall: (NSString*)method
|
||||
params: (NSArray*)params
|
||||
timeout: (int)seconds
|
||||
timeout: (NSInteger)seconds
|
||||
{
|
||||
NSData *data;
|
||||
|
||||
|
|
|
@ -182,7 +182,7 @@
|
|||
return NO;
|
||||
}
|
||||
|
||||
- (unsigned) hash
|
||||
- (NSUInteger) hash
|
||||
{
|
||||
#if TYPE_ORDER == 0
|
||||
return [data hash];
|
||||
|
@ -199,7 +199,7 @@
|
|||
hash += val.c[i];
|
||||
return hash;
|
||||
#elif TYPE_ORDER == 2
|
||||
return (unsigned)(uintptr_t)data;
|
||||
return (NSUInteger)(uintptr_t)data;
|
||||
#elif TYPE_ORDER == 3
|
||||
return (data.length ^ data.location);
|
||||
#elif TYPE_ORDER == 4
|
||||
|
|
|
@ -110,7 +110,7 @@ static NSString* NotificationKey = @"NSFileHandleNotificationKey";
|
|||
* Encapsulates low level read operation to get data from the operating
|
||||
* system.
|
||||
*/
|
||||
- (int) read: (void*)buf length: (int)len
|
||||
- (NSInteger) read: (void*)buf length: (NSUInteger)len
|
||||
{
|
||||
#if USE_ZLIB
|
||||
if (gzDescriptor != 0)
|
||||
|
@ -134,7 +134,7 @@ static NSString* NotificationKey = @"NSFileHandleNotificationKey";
|
|||
* Encapsulates low level write operation to send data to the operating
|
||||
* system.
|
||||
*/
|
||||
- (int) write: (const void*)buf length: (int)len
|
||||
- (NSInteger) write: (const void*)buf length: (NSUInteger)len
|
||||
{
|
||||
#if USE_ZLIB
|
||||
if (gzDescriptor != 0)
|
||||
|
|
|
@ -233,11 +233,11 @@ typedef enum {
|
|||
NSData *_d; // Only valid after initWithCoder:
|
||||
}
|
||||
- (const void*) bytes;
|
||||
- (unsigned) count;
|
||||
- (NSUInteger) count;
|
||||
- (void) encodeWithCoder: (NSCoder*)aCoder;
|
||||
- (id) initWithCoder: (NSCoder*)aCoder;
|
||||
- (id) initWithObjCType: (const char*)t count: (int)c at: (const void*)a;
|
||||
- (unsigned) size;
|
||||
- (id) initWithObjCType: (const char*)t count: (NSInteger)c at: (const void*)a;
|
||||
- (NSUInteger) size;
|
||||
- (const char*) type;
|
||||
@end
|
||||
|
||||
|
@ -508,9 +508,9 @@ GSPrivateUnloadModule(FILE *errorStream,
|
|||
unsigned size;
|
||||
void *buffer;
|
||||
}
|
||||
+ (GSCodeBuffer*) memoryWithSize: (unsigned)_size;
|
||||
+ (GSCodeBuffer*) memoryWithSize: (NSUInteger)_size;
|
||||
- (void*) buffer;
|
||||
- (id) initWithSize: (unsigned)_size;
|
||||
- (id) initWithSize: (NSUInteger)_size;
|
||||
- (void) protect;
|
||||
@end
|
||||
|
||||
|
|
|
@ -90,8 +90,8 @@ SOCKIVARS
|
|||
* Set the socket addres from string information.
|
||||
*/
|
||||
- (BOOL) _setSocketAddress: (NSString*)address
|
||||
port: (int)port
|
||||
family: (int)family;
|
||||
port: (NSInteger)port
|
||||
family: (NSInteger)family;
|
||||
|
||||
/* Return the socket
|
||||
*/
|
||||
|
@ -110,15 +110,15 @@ SOCKIVARS
|
|||
@interface GSSocketInputStream (AddedBehaviors)
|
||||
- (struct sockaddr*) _address;
|
||||
- (void) _setAddress: (struct sockaddr*)address;
|
||||
- (int) _read: (uint8_t *)buffer maxLength: (unsigned int)len;
|
||||
- (NSInteger) _read: (uint8_t *)buffer maxLength: (NSUInteger)len;
|
||||
- (void) _setClosing: (BOOL)passive;
|
||||
- (void) _setHandler: (id)h;
|
||||
- (void) _setPassive: (BOOL)passive;
|
||||
- (void) _setSibling: (GSSocketStream*)sibling;
|
||||
- (void) _setSock: (SOCKET)sock;
|
||||
- (BOOL) _setSocketAddress: (NSString*)address
|
||||
port: (int)port
|
||||
family: (int)family;
|
||||
port: (NSInteger)port
|
||||
family: (NSInteger)family;
|
||||
- (SOCKET) _sock;
|
||||
@end
|
||||
|
||||
|
@ -127,7 +127,7 @@ SOCKIVARS
|
|||
/**
|
||||
* the designated initializer
|
||||
*/
|
||||
- (id) initToAddr: (NSString*)addr port: (int)port;
|
||||
- (id) initToAddr: (NSString*)addr port: (NSInteger)port;
|
||||
|
||||
@end
|
||||
|
||||
|
@ -137,7 +137,7 @@ SOCKIVARS
|
|||
/**
|
||||
* the designated initializer
|
||||
*/
|
||||
- (id) initToAddr: (NSString*)addr port: (int)port;
|
||||
- (id) initToAddr: (NSString*)addr port: (NSInteger)port;
|
||||
|
||||
@end
|
||||
|
||||
|
@ -158,10 +158,10 @@ SOCKIVARS
|
|||
- (void) _setSibling: (GSSocketStream*)sibling;
|
||||
- (void) _setSock: (SOCKET)sock;
|
||||
- (BOOL) _setSocketAddress: (NSString*)address
|
||||
port: (int)port
|
||||
family: (int)family;
|
||||
port: (NSInteger)port
|
||||
family: (NSInteger)family;
|
||||
- (SOCKET) _sock;
|
||||
- (int) _write: (const uint8_t *)buffer maxLength: (unsigned int)len;
|
||||
- (NSInteger) _write: (const uint8_t *)buffer maxLength: (NSUInteger)len;
|
||||
@end
|
||||
|
||||
@interface GSInetOutputStream : GSSocketOutputStream
|
||||
|
@ -169,7 +169,7 @@ SOCKIVARS
|
|||
/**
|
||||
* the designated initializer
|
||||
*/
|
||||
- (id) initToAddr: (NSString*)addr port: (int)port;
|
||||
- (id) initToAddr: (NSString*)addr port: (NSInteger)port;
|
||||
|
||||
@end
|
||||
|
||||
|
@ -178,7 +178,7 @@ SOCKIVARS
|
|||
/**
|
||||
* the designated initializer
|
||||
*/
|
||||
- (id) initToAddr: (NSString*)addr port: (int)port;
|
||||
- (id) initToAddr: (NSString*)addr port: (NSInteger)port;
|
||||
|
||||
@end
|
||||
|
||||
|
@ -214,8 +214,8 @@ SOCKIVARS
|
|||
- (void) _setSibling: (GSSocketStream*)sibling;
|
||||
- (void) _setSock: (SOCKET)sock;
|
||||
- (BOOL) _setSocketAddress: (NSString*)address
|
||||
port: (int)port
|
||||
family: (int)family;
|
||||
port: (NSInteger)port
|
||||
family: (NSInteger)family;
|
||||
- (SOCKET) _sock;
|
||||
@end
|
||||
|
||||
|
|
|
@ -103,9 +103,9 @@ GSPrivateSockaddrLength(struct sockaddr *addr)
|
|||
- (void) bye; /* Close down the handled session. */
|
||||
- (BOOL) handshake; /* A handshake/hello is in progress. */
|
||||
- (void) hello; /* Start up the session handshake. */
|
||||
- (int) read: (uint8_t *)buffer maxLength: (unsigned int)len;
|
||||
- (NSInteger) read: (uint8_t *)buffer maxLength: (NSUInteger)len;
|
||||
- (void) stream: (NSStream*)stream handleEvent: (NSStreamEvent)event;
|
||||
- (int) write: (const uint8_t *)buffer maxLength: (unsigned int)len;
|
||||
- (NSInteger) write: (const uint8_t *)buffer maxLength: (NSUInteger)len;
|
||||
@end
|
||||
|
||||
|
||||
|
@ -150,7 +150,7 @@ GSPrivateSockaddrLength(struct sockaddr *addr)
|
|||
return ostream;
|
||||
}
|
||||
|
||||
- (int) read: (uint8_t *)buffer maxLength: (unsigned int)len
|
||||
- (NSInteger) read: (uint8_t *)buffer maxLength: (NSUInteger)len
|
||||
{
|
||||
[self subclassResponsibility: _cmd];
|
||||
return 0;
|
||||
|
@ -161,7 +161,7 @@ GSPrivateSockaddrLength(struct sockaddr *addr)
|
|||
[self subclassResponsibility: _cmd];
|
||||
}
|
||||
|
||||
- (int) write: (const uint8_t *)buffer maxLength: (unsigned int)len
|
||||
- (NSInteger) write: (const uint8_t *)buffer maxLength: (NSUInteger)len
|
||||
{
|
||||
[self subclassResponsibility: _cmd];
|
||||
return 0;
|
||||
|
@ -524,7 +524,7 @@ static gnutls_anon_client_credentials_t anoncred;
|
|||
return ostream;
|
||||
}
|
||||
|
||||
- (int) read: (uint8_t *)buffer maxLength: (unsigned int)len
|
||||
- (NSInteger) read: (uint8_t *)buffer maxLength: (NSUInteger)len
|
||||
{
|
||||
return gnutls_record_recv (session, buffer, len);
|
||||
}
|
||||
|
@ -576,7 +576,7 @@ static gnutls_anon_client_credentials_t anoncred;
|
|||
}
|
||||
}
|
||||
|
||||
- (int) write: (const uint8_t *)buffer maxLength: (unsigned int)len
|
||||
- (NSInteger) write: (const uint8_t *)buffer maxLength: (NSUInteger)len
|
||||
{
|
||||
return gnutls_record_send (session, buffer, len);
|
||||
}
|
||||
|
@ -797,7 +797,7 @@ static NSString * const GSSOCKSAckConn = @"GSSOCKSAckConn";
|
|||
address = [[NSString alloc] initWithUTF8String:
|
||||
(char*)inet_ntoa(addr->sin_addr)];
|
||||
port = [[NSString alloc] initWithFormat: @"%d",
|
||||
(int)GSSwapBigI16ToHost(addr->sin_port)];
|
||||
(NSInteger)GSSwapBigI16ToHost(addr->sin_port)];
|
||||
|
||||
/* Now reconfigure the streams so they will actually connect
|
||||
* to the socks proxy server.
|
||||
|
@ -812,7 +812,7 @@ static NSString * const GSSOCKSAckConn = @"GSSOCKSAckConn";
|
|||
return self;
|
||||
}
|
||||
|
||||
- (int) read: (uint8_t *)buffer maxLength: (unsigned int)len
|
||||
- (NSInteger) read: (uint8_t *)buffer maxLength: (NSUInteger)len
|
||||
{
|
||||
return [istream _read: buffer maxLength: len];
|
||||
}
|
||||
|
@ -1202,7 +1202,7 @@ static NSString * const GSSOCKSAckConn = @"GSSOCKSAckConn";
|
|||
}
|
||||
}
|
||||
|
||||
- (int) write: (const uint8_t *)buffer maxLength: (unsigned int)len
|
||||
- (NSInteger) write: (const uint8_t *)buffer maxLength: (NSUInteger)len
|
||||
{
|
||||
return [ostream _write: buffer maxLength: len];
|
||||
}
|
||||
|
@ -1402,7 +1402,7 @@ setNonBlocking(SOCKET fd)
|
|||
return result;
|
||||
}
|
||||
|
||||
- (int) _read: (uint8_t *)buffer maxLength: (unsigned int)len
|
||||
- (NSInteger) _read: (uint8_t *)buffer maxLength: (NSUInteger)len
|
||||
{
|
||||
[self subclassResponsibility: _cmd];
|
||||
return -1;
|
||||
|
@ -1432,8 +1432,8 @@ setNonBlocking(SOCKET fd)
|
|||
}
|
||||
|
||||
- (BOOL) _setSocketAddress: (NSString*)address
|
||||
port: (int)port
|
||||
family: (int)family
|
||||
port: (NSInteger)port
|
||||
family: (NSInteger)family
|
||||
{
|
||||
uint16_t p = (uint16_t)port;
|
||||
|
||||
|
@ -1578,7 +1578,7 @@ setNonBlocking(SOCKET fd)
|
|||
return _sock;
|
||||
}
|
||||
|
||||
- (int) _write: (const uint8_t *)buffer maxLength: (unsigned int)len
|
||||
- (NSInteger) _write: (const uint8_t *)buffer maxLength: (NSUInteger)len
|
||||
{
|
||||
[self subclassResponsibility: _cmd];
|
||||
return -1;
|
||||
|
@ -1745,7 +1745,7 @@ setNonBlocking(SOCKET fd)
|
|||
_sock = INVALID_SOCKET;
|
||||
}
|
||||
|
||||
- (int) read: (uint8_t *)buffer maxLength: (unsigned int)len
|
||||
- (NSInteger) read: (uint8_t *)buffer maxLength: (NSUInteger)len
|
||||
{
|
||||
if (buffer == 0)
|
||||
{
|
||||
|
@ -1764,7 +1764,7 @@ setNonBlocking(SOCKET fd)
|
|||
return [_handler read: buffer maxLength: len];
|
||||
}
|
||||
|
||||
- (int) _read: (uint8_t *)buffer maxLength: (unsigned int)len
|
||||
- (NSInteger) _read: (uint8_t *)buffer maxLength: (NSUInteger)len
|
||||
{
|
||||
int readLen;
|
||||
|
||||
|
@ -2010,7 +2010,7 @@ setNonBlocking(SOCKET fd)
|
|||
}
|
||||
}
|
||||
|
||||
- (int) _write: (const uint8_t *)buffer maxLength: (unsigned int)len
|
||||
- (NSInteger) _write: (const uint8_t *)buffer maxLength: (NSUInteger)len
|
||||
{
|
||||
int writeLen;
|
||||
|
||||
|
@ -2218,7 +2218,7 @@ setNonBlocking(SOCKET fd)
|
|||
_sock = INVALID_SOCKET;
|
||||
}
|
||||
|
||||
- (int) write: (const uint8_t *)buffer maxLength: (unsigned int)len
|
||||
- (NSInteger) write: (const uint8_t *)buffer maxLength: (NSUInteger)len
|
||||
{
|
||||
if (buffer == 0)
|
||||
{
|
||||
|
@ -2599,7 +2599,7 @@ setNonBlocking(SOCKET fd)
|
|||
|
||||
@implementation GSInetInputStream
|
||||
|
||||
- (id) initToAddr: (NSString*)addr port: (int)port
|
||||
- (id) initToAddr: (NSString*)addr port: (NSInteger)port
|
||||
{
|
||||
if ((self = [super init]) != nil)
|
||||
{
|
||||
|
@ -2616,7 +2616,7 @@ setNonBlocking(SOCKET fd)
|
|||
@implementation GSInet6InputStream
|
||||
#if defined(AF_INET6)
|
||||
|
||||
- (id) initToAddr: (NSString*)addr port: (int)port
|
||||
- (id) initToAddr: (NSString*)addr port: (NSInteger)port
|
||||
{
|
||||
if ((self = [super init]) != nil)
|
||||
{
|
||||
|
@ -2629,7 +2629,7 @@ setNonBlocking(SOCKET fd)
|
|||
}
|
||||
|
||||
#else
|
||||
- (id) initToAddr: (NSString*)addr port: (int)port
|
||||
- (id) initToAddr: (NSString*)addr port: (NSInteger)port
|
||||
{
|
||||
RELEASE(self);
|
||||
return nil;
|
||||
|
@ -2639,7 +2639,7 @@ setNonBlocking(SOCKET fd)
|
|||
|
||||
@implementation GSInetOutputStream
|
||||
|
||||
- (id) initToAddr: (NSString*)addr port: (int)port
|
||||
- (id) initToAddr: (NSString*)addr port: (NSInteger)port
|
||||
{
|
||||
if ((self = [super init]) != nil)
|
||||
{
|
||||
|
@ -2656,7 +2656,7 @@ setNonBlocking(SOCKET fd)
|
|||
@implementation GSInet6OutputStream
|
||||
#if defined(AF_INET6)
|
||||
|
||||
- (id) initToAddr: (NSString*)addr port: (int)port
|
||||
- (id) initToAddr: (NSString*)addr port: (NSInteger)port
|
||||
{
|
||||
if ((self = [super init]) != nil)
|
||||
{
|
||||
|
@ -2669,7 +2669,7 @@ setNonBlocking(SOCKET fd)
|
|||
}
|
||||
|
||||
#else
|
||||
- (id) initToAddr: (NSString*)addr port: (int)port
|
||||
- (id) initToAddr: (NSString*)addr port: (NSInteger)port
|
||||
{
|
||||
RELEASE(self);
|
||||
return nil;
|
||||
|
@ -2689,7 +2689,7 @@ setNonBlocking(SOCKET fd)
|
|||
return [GSInetOutputStream class];
|
||||
}
|
||||
|
||||
- (id) initToAddr: (NSString*)addr port: (int)port
|
||||
- (id) initToAddr: (NSString*)addr port: (NSInteger)port
|
||||
{
|
||||
if ((self = [super init]) != nil)
|
||||
{
|
||||
|
@ -2719,7 +2719,7 @@ setNonBlocking(SOCKET fd)
|
|||
return [GSInet6OutputStream class];
|
||||
}
|
||||
|
||||
- (id) initToAddr: (NSString*)addr port: (int)port
|
||||
- (id) initToAddr: (NSString*)addr port: (NSInteger)port
|
||||
{
|
||||
if ([super init] != nil)
|
||||
{
|
||||
|
@ -2735,7 +2735,7 @@ setNonBlocking(SOCKET fd)
|
|||
return self;
|
||||
}
|
||||
#else
|
||||
- (id) initToAddr: (NSString*)addr port: (int)port
|
||||
- (id) initToAddr: (NSString*)addr port: (NSInteger)port
|
||||
{
|
||||
RELEASE(self);
|
||||
return nil;
|
||||
|
|
|
@ -114,7 +114,7 @@ IVARS
|
|||
|
||||
/** Reset events in mask to allow them to be sent again.
|
||||
*/
|
||||
- (void) _resetEvents: (int)mask;
|
||||
- (void) _resetEvents: (NSUInteger)mask;
|
||||
|
||||
/**
|
||||
* Place the stream in all the scheduled runloops.
|
||||
|
|
|
@ -347,7 +347,7 @@ static RunLoopEventType typeForStream(NSStream *aStream)
|
|||
return;
|
||||
}
|
||||
|
||||
- (void) _resetEvents: (int)mask
|
||||
- (void) _resetEvents: (NSUInteger)mask
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -408,7 +408,7 @@ static RunLoopEventType typeForStream(NSStream *aStream)
|
|||
_currentStatus = NSStreamStatusError;
|
||||
}
|
||||
|
||||
- (void) _resetEvents: (int)mask
|
||||
- (void) _resetEvents: (NSUInteger)mask
|
||||
{
|
||||
_events &= ~mask;
|
||||
}
|
||||
|
@ -708,7 +708,7 @@ static RunLoopEventType typeForStream(NSStream *aStream)
|
|||
[super dealloc];
|
||||
}
|
||||
|
||||
- (int) read: (uint8_t *)buffer maxLength: (unsigned int)len
|
||||
- (NSInteger) read: (uint8_t *)buffer maxLength: (NSUInteger)len
|
||||
{
|
||||
unsigned long dataSize;
|
||||
unsigned long copySize;
|
||||
|
@ -753,7 +753,7 @@ static RunLoopEventType typeForStream(NSStream *aStream)
|
|||
return copySize;
|
||||
}
|
||||
|
||||
- (BOOL) getBuffer: (uint8_t **)buffer length: (unsigned int *)len
|
||||
- (BOOL) getBuffer: (uint8_t **)buffer length: (NSUInteger *)len
|
||||
{
|
||||
unsigned long dataSize = [_data length];
|
||||
|
||||
|
@ -793,7 +793,7 @@ static RunLoopEventType typeForStream(NSStream *aStream)
|
|||
|
||||
@implementation GSBufferOutputStream
|
||||
|
||||
- (id) initToBuffer: (uint8_t *)buffer capacity: (unsigned int)capacity
|
||||
- (id) initToBuffer: (uint8_t *)buffer capacity: (NSUInteger)capacity
|
||||
{
|
||||
if ((self = [super init]) != nil)
|
||||
{
|
||||
|
@ -804,7 +804,7 @@ static RunLoopEventType typeForStream(NSStream *aStream)
|
|||
return self;
|
||||
}
|
||||
|
||||
- (int) write: (const uint8_t *)buffer maxLength: (unsigned int)len
|
||||
- (NSInteger) write: (const uint8_t *)buffer maxLength: (NSUInteger)len
|
||||
{
|
||||
if (buffer == 0)
|
||||
{
|
||||
|
@ -876,7 +876,7 @@ static RunLoopEventType typeForStream(NSStream *aStream)
|
|||
[super dealloc];
|
||||
}
|
||||
|
||||
- (int) write: (const uint8_t *)buffer maxLength: (unsigned int)len
|
||||
- (NSInteger) write: (const uint8_t *)buffer maxLength: (NSUInteger)len
|
||||
{
|
||||
if (buffer == 0)
|
||||
{
|
||||
|
@ -946,7 +946,7 @@ static RunLoopEventType typeForStream(NSStream *aStream)
|
|||
class_ivar_set_gcinvisible (self, "delegate", YES);
|
||||
}
|
||||
|
||||
+ (id) serverStreamToAddr: (NSString*)addr port: (int)port
|
||||
+ (id) serverStreamToAddr: (NSString*)addr port: (NSInteger)port
|
||||
{
|
||||
GSServerStream *s;
|
||||
|
||||
|
@ -962,7 +962,7 @@ static RunLoopEventType typeForStream(NSStream *aStream)
|
|||
return AUTORELEASE([[GSLocalServerStream alloc] initToAddr: addr]);
|
||||
}
|
||||
|
||||
- (id) initToAddr: (NSString*)addr port: (int)port
|
||||
- (id) initToAddr: (NSString*)addr port: (NSInteger)port
|
||||
{
|
||||
RELEASE(self);
|
||||
// try inet first, then inet6
|
||||
|
|
|
@ -343,7 +343,7 @@ static void getCString_u(GSStr self, char *buffer, unsigned int maxLength,
|
|||
return self; // placeholders never get released.
|
||||
}
|
||||
|
||||
- (unichar) characterAtIndex: (unsigned)index
|
||||
- (unichar) characterAtIndex: (NSUInteger)index
|
||||
{
|
||||
[NSException raise: NSInternalInconsistencyException
|
||||
format: @"attempt to use uninitialised string"];
|
||||
|
@ -367,7 +367,7 @@ static void getCString_u(GSStr self, char *buffer, unsigned int maxLength,
|
|||
* Remove any BOM and perform byte swapping if required.
|
||||
*/
|
||||
static void
|
||||
fixBOM(unsigned char **bytes, unsigned *length, BOOL *shouldFree,
|
||||
fixBOM(unsigned char **bytes, NSUInteger*length, BOOL *shouldFree,
|
||||
NSStringEncoding encoding)
|
||||
{
|
||||
unsigned char *b = *bytes;
|
||||
|
@ -459,7 +459,7 @@ fixBOM(unsigned char **bytes, unsigned *length, BOOL *shouldFree,
|
|||
}
|
||||
|
||||
- (id) initWithBytes: (const void*)bytes
|
||||
length: (unsigned int)length
|
||||
length: (NSUInteger)length
|
||||
encoding: (NSStringEncoding)encoding
|
||||
{
|
||||
void *chars = 0;
|
||||
|
@ -499,7 +499,7 @@ fixBOM(unsigned char **bytes, unsigned *length, BOOL *shouldFree,
|
|||
}
|
||||
|
||||
- (id) initWithBytesNoCopy: (void*)bytes
|
||||
length: (unsigned int)length
|
||||
length: (NSUInteger)length
|
||||
encoding: (NSStringEncoding)encoding
|
||||
freeWhenDone: (BOOL)flag
|
||||
{
|
||||
|
@ -656,7 +656,7 @@ fixBOM(unsigned char **bytes, unsigned *length, BOOL *shouldFree,
|
|||
}
|
||||
|
||||
- (id) initWithCharacters: (const unichar*)chars
|
||||
length: (unsigned)length
|
||||
length: (NSUInteger)length
|
||||
{
|
||||
return [self initWithBytes: (const void*)chars
|
||||
length: length * sizeof(unichar)
|
||||
|
@ -664,7 +664,7 @@ fixBOM(unsigned char **bytes, unsigned *length, BOOL *shouldFree,
|
|||
}
|
||||
|
||||
- (id) initWithCharactersNoCopy: (unichar*)chars
|
||||
length: (unsigned)length
|
||||
length: (NSUInteger)length
|
||||
freeWhenDone: (BOOL)flag
|
||||
{
|
||||
return [self initWithBytesNoCopy: (void*)chars
|
||||
|
@ -674,7 +674,7 @@ fixBOM(unsigned char **bytes, unsigned *length, BOOL *shouldFree,
|
|||
}
|
||||
|
||||
- (id) initWithCString: (const char*)chars
|
||||
length: (unsigned)length
|
||||
length: (NSUInteger)length
|
||||
{
|
||||
return [self initWithBytes: (const void*)chars
|
||||
length: length
|
||||
|
@ -682,7 +682,7 @@ fixBOM(unsigned char **bytes, unsigned *length, BOOL *shouldFree,
|
|||
}
|
||||
|
||||
- (id) initWithCStringNoCopy: (char*)chars
|
||||
length: (unsigned)length
|
||||
length: (NSUInteger)length
|
||||
freeWhenDone: (BOOL)flag
|
||||
{
|
||||
return [self initWithBytesNoCopy: (void*)chars
|
||||
|
@ -841,7 +841,7 @@ fixBOM(unsigned char **bytes, unsigned *length, BOOL *shouldFree,
|
|||
return (id)me;
|
||||
}
|
||||
|
||||
- (unsigned) length
|
||||
- (NSUInteger) length
|
||||
{
|
||||
[NSException raise: NSInternalInconsistencyException
|
||||
format: @"attempt to use uninitialised string"];
|
||||
|
@ -2736,7 +2736,7 @@ transmute(GSStr self, NSString *aString)
|
|||
}
|
||||
|
||||
- (id) initWithBytes: (const void*)chars
|
||||
length: (unsigned int)length
|
||||
length: (NSUInteger)length
|
||||
encoding: (NSStringEncoding)encoding
|
||||
{
|
||||
if (length > 0)
|
||||
|
@ -2753,7 +2753,7 @@ transmute(GSStr self, NSString *aString)
|
|||
}
|
||||
|
||||
- (id) initWithBytesNoCopy: (void*)chars
|
||||
length: (unsigned int)length
|
||||
length: (NSUInteger)length
|
||||
encoding: (NSStringEncoding)encoding
|
||||
freeWhenDone: (BOOL)flag
|
||||
{
|
||||
|
@ -2767,7 +2767,7 @@ transmute(GSStr self, NSString *aString)
|
|||
}
|
||||
|
||||
- (id) initWithCharacters: (const unichar*)chars
|
||||
length: (unsigned int)length
|
||||
length: (NSUInteger)length
|
||||
{
|
||||
return [self initWithBytes: chars
|
||||
length: length * sizeof(unichar)
|
||||
|
@ -2775,7 +2775,7 @@ transmute(GSStr self, NSString *aString)
|
|||
}
|
||||
|
||||
- (id) initWithCharactersNoCopy: (unichar*)chars
|
||||
length: (unsigned int)length
|
||||
length: (NSUInteger)length
|
||||
freeWhenDone: (BOOL)flag
|
||||
{
|
||||
return [self initWithBytesNoCopy: chars
|
||||
|
@ -2800,7 +2800,7 @@ transmute(GSStr self, NSString *aString)
|
|||
}
|
||||
|
||||
- (id) initWithCString: (const char*)chars
|
||||
length: (unsigned int)length
|
||||
length: (NSUInteger)length
|
||||
{
|
||||
return [self initWithBytes: chars
|
||||
length: length
|
||||
|
@ -2808,7 +2808,7 @@ transmute(GSStr self, NSString *aString)
|
|||
}
|
||||
|
||||
- (id) initWithCStringNoCopy: (char*)chars
|
||||
length: (unsigned int)length
|
||||
length: (NSUInteger)length
|
||||
freeWhenDone: (BOOL)flag
|
||||
{
|
||||
return [self initWithBytesNoCopy: chars
|
||||
|
@ -2843,13 +2843,13 @@ transmute(GSStr self, NSString *aString)
|
|||
return canBeConvertedToEncoding_c((GSStr)self, enc);
|
||||
}
|
||||
|
||||
- (unichar) characterAtIndex: (unsigned int)index
|
||||
- (unichar) characterAtIndex: (NSUInteger)index
|
||||
{
|
||||
return characterAtIndex_c((GSStr)self, index);
|
||||
}
|
||||
|
||||
- (NSComparisonResult) compare: (NSString*)aString
|
||||
options: (unsigned int)mask
|
||||
options: (NSUInteger)mask
|
||||
range: (NSRange)aRange
|
||||
{
|
||||
GS_RANGE_CHECK(aRange, _count);
|
||||
|
@ -2874,7 +2874,7 @@ transmute(GSStr self, NSString *aString)
|
|||
return cString_c((GSStr)self, encoding);
|
||||
}
|
||||
|
||||
- (unsigned int) cStringLength
|
||||
- (NSUInteger) cStringLength
|
||||
{
|
||||
return cStringLength_c((GSStr)self, externalEncoding);
|
||||
}
|
||||
|
@ -2937,20 +2937,20 @@ transmute(GSStr self, NSString *aString)
|
|||
}
|
||||
|
||||
- (void) getCString: (char*)buffer
|
||||
maxLength: (unsigned int)maxLength
|
||||
maxLength: (NSUInteger)maxLength
|
||||
{
|
||||
getCString_c((GSStr)self, buffer, maxLength, (NSRange){0, _count}, 0);
|
||||
}
|
||||
|
||||
- (BOOL) getCString: (char*)buffer
|
||||
maxLength: (unsigned int)maxLength
|
||||
maxLength: (NSUInteger)maxLength
|
||||
encoding: (NSStringEncoding)encoding
|
||||
{
|
||||
return getCStringE_c((GSStr)self, buffer, maxLength, encoding);
|
||||
}
|
||||
|
||||
- (void) getCString: (char*)buffer
|
||||
maxLength: (unsigned int)maxLength
|
||||
maxLength: (NSUInteger)maxLength
|
||||
range: (NSRange)aRange
|
||||
remainingRange: (NSRange*)leftoverRange
|
||||
{
|
||||
|
@ -2958,7 +2958,7 @@ transmute(GSStr self, NSString *aString)
|
|||
getCString_c((GSStr)self, buffer, maxLength, aRange, leftoverRange);
|
||||
}
|
||||
|
||||
- (unsigned) hash
|
||||
- (NSUInteger) hash
|
||||
{
|
||||
if (self->_flags.hash == 0)
|
||||
{
|
||||
|
@ -2967,7 +2967,7 @@ transmute(GSStr self, NSString *aString)
|
|||
return self->_flags.hash;
|
||||
}
|
||||
|
||||
- (int) intValue
|
||||
- (NSInteger) intValue
|
||||
{
|
||||
return intValue_c((GSStr)self);
|
||||
}
|
||||
|
@ -2982,12 +2982,12 @@ transmute(GSStr self, NSString *aString)
|
|||
return isEqual_c((GSStr)self, anObject);
|
||||
}
|
||||
|
||||
- (unsigned int) length
|
||||
- (NSUInteger) length
|
||||
{
|
||||
return _count;
|
||||
}
|
||||
|
||||
- (unsigned int) lengthOfBytesUsingEncoding: (NSStringEncoding)encoding
|
||||
- (NSUInteger) lengthOfBytesUsingEncoding: (NSStringEncoding)encoding
|
||||
{
|
||||
return cStringLength_c((GSStr)self, encoding);
|
||||
}
|
||||
|
@ -3020,13 +3020,13 @@ transmute(GSStr self, NSString *aString)
|
|||
return obj;
|
||||
}
|
||||
|
||||
- (NSRange) rangeOfComposedCharacterSequenceAtIndex: (unsigned)anIndex
|
||||
- (NSRange) rangeOfComposedCharacterSequenceAtIndex: (NSUInteger)anIndex
|
||||
{
|
||||
return rangeOfSequence_c((GSStr)self, anIndex);
|
||||
}
|
||||
|
||||
- (NSRange) rangeOfCharacterFromSet: (NSCharacterSet*)aSet
|
||||
options: (unsigned)mask
|
||||
options: (NSUInteger)mask
|
||||
range: (NSRange)aRange
|
||||
{
|
||||
GS_RANGE_CHECK(aRange, _count);
|
||||
|
@ -3034,7 +3034,7 @@ transmute(GSStr self, NSString *aString)
|
|||
}
|
||||
|
||||
- (NSRange) rangeOfString: (NSString*)aString
|
||||
options: (unsigned)mask
|
||||
options: (NSUInteger)mask
|
||||
range: (NSRange)aRange
|
||||
{
|
||||
GS_RANGE_CHECK(aRange, _count);
|
||||
|
@ -3067,7 +3067,7 @@ transmute(GSStr self, NSString *aString)
|
|||
}
|
||||
|
||||
// private method for Unicode level 3 implementation
|
||||
- (int) _baseLength
|
||||
- (NSInteger) _baseLength
|
||||
{
|
||||
return _count;
|
||||
}
|
||||
|
@ -3173,13 +3173,13 @@ agree, create a new GSCInlineString otherwise.
|
|||
return canBeConvertedToEncoding_u((GSStr)self, enc);
|
||||
}
|
||||
|
||||
- (unichar) characterAtIndex: (unsigned int)index
|
||||
- (unichar) characterAtIndex: (NSUInteger)index
|
||||
{
|
||||
return characterAtIndex_u((GSStr)self, index);
|
||||
}
|
||||
|
||||
- (NSComparisonResult) compare: (NSString*)aString
|
||||
options: (unsigned int)mask
|
||||
options: (NSUInteger)mask
|
||||
range: (NSRange)aRange
|
||||
{
|
||||
GS_RANGE_CHECK(aRange, _count);
|
||||
|
@ -3204,7 +3204,7 @@ agree, create a new GSCInlineString otherwise.
|
|||
return cString_u((GSStr)self, encoding);
|
||||
}
|
||||
|
||||
- (unsigned int) cStringLength
|
||||
- (NSUInteger) cStringLength
|
||||
{
|
||||
return cStringLength_u((GSStr)self, externalEncoding);
|
||||
}
|
||||
|
@ -3268,19 +3268,19 @@ agree, create a new GSCInlineString otherwise.
|
|||
}
|
||||
|
||||
- (void) getCString: (char*)buffer
|
||||
maxLength: (unsigned int)maxLength
|
||||
maxLength: (NSUInteger)maxLength
|
||||
{
|
||||
getCString_u((GSStr)self, buffer, maxLength, (NSRange){0, _count}, 0);
|
||||
}
|
||||
|
||||
- (BOOL) getCString: (char*)buffer
|
||||
maxLength: (unsigned int)maxLength
|
||||
maxLength: (NSUInteger)maxLength
|
||||
encoding: (NSStringEncoding)encoding
|
||||
{
|
||||
return getCStringE_u((GSStr)self, buffer, maxLength, encoding);
|
||||
}
|
||||
- (void) getCString: (char*)buffer
|
||||
maxLength: (unsigned int)maxLength
|
||||
maxLength: (NSUInteger)maxLength
|
||||
range: (NSRange)aRange
|
||||
remainingRange: (NSRange*)leftoverRange
|
||||
{
|
||||
|
@ -3289,7 +3289,7 @@ agree, create a new GSCInlineString otherwise.
|
|||
getCString_u((GSStr)self, buffer, maxLength, aRange, leftoverRange);
|
||||
}
|
||||
|
||||
- (unsigned) hash
|
||||
- (NSUInteger) hash
|
||||
{
|
||||
if (self->_flags.hash == 0)
|
||||
{
|
||||
|
@ -3298,7 +3298,7 @@ agree, create a new GSCInlineString otherwise.
|
|||
return self->_flags.hash;
|
||||
}
|
||||
|
||||
- (int) intValue
|
||||
- (NSInteger) intValue
|
||||
{
|
||||
return intValue_u((GSStr)self);
|
||||
}
|
||||
|
@ -3313,12 +3313,12 @@ agree, create a new GSCInlineString otherwise.
|
|||
return isEqual_u((GSStr)self, anObject);
|
||||
}
|
||||
|
||||
- (unsigned int) length
|
||||
- (NSUInteger) length
|
||||
{
|
||||
return _count;
|
||||
}
|
||||
|
||||
- (unsigned int) lengthOfBytesUsingEncoding: (NSStringEncoding)encoding
|
||||
- (NSUInteger) lengthOfBytesUsingEncoding: (NSStringEncoding)encoding
|
||||
{
|
||||
return cStringLength_u((GSStr)self, encoding);
|
||||
}
|
||||
|
@ -3351,13 +3351,13 @@ agree, create a new GSCInlineString otherwise.
|
|||
return obj;
|
||||
}
|
||||
|
||||
- (NSRange) rangeOfComposedCharacterSequenceAtIndex: (unsigned)anIndex
|
||||
- (NSRange) rangeOfComposedCharacterSequenceAtIndex: (NSUInteger)anIndex
|
||||
{
|
||||
return rangeOfSequence_u((GSStr)self, anIndex);
|
||||
}
|
||||
|
||||
- (NSRange) rangeOfCharacterFromSet: (NSCharacterSet*)aSet
|
||||
options: (unsigned)mask
|
||||
options: (NSUInteger)mask
|
||||
range: (NSRange)aRange
|
||||
{
|
||||
GS_RANGE_CHECK(aRange, _count);
|
||||
|
@ -3365,7 +3365,7 @@ agree, create a new GSCInlineString otherwise.
|
|||
}
|
||||
|
||||
- (NSRange) rangeOfString: (NSString*)aString
|
||||
options: (unsigned)mask
|
||||
options: (NSUInteger)mask
|
||||
range: (NSRange)aRange
|
||||
{
|
||||
GS_RANGE_CHECK(aRange, _count);
|
||||
|
@ -3398,7 +3398,7 @@ agree, create a new GSCInlineString otherwise.
|
|||
}
|
||||
|
||||
// private method for Unicode level 3 implementation
|
||||
- (int) _baseLength
|
||||
- (NSInteger) _baseLength
|
||||
{
|
||||
unsigned int count = 0;
|
||||
unsigned int blen = 0;
|
||||
|
@ -3571,7 +3571,7 @@ agree, create a new GSUnicodeInlineString otherwise.
|
|||
return canBeConvertedToEncoding_c((GSStr)self, enc);
|
||||
}
|
||||
|
||||
- (unichar) characterAtIndex: (unsigned int)index
|
||||
- (unichar) characterAtIndex: (NSUInteger)index
|
||||
{
|
||||
if (_flags.wide == 1)
|
||||
return characterAtIndex_u((GSStr)self, index);
|
||||
|
@ -3580,7 +3580,7 @@ agree, create a new GSUnicodeInlineString otherwise.
|
|||
}
|
||||
|
||||
- (NSComparisonResult) compare: (NSString*)aString
|
||||
options: (unsigned int)mask
|
||||
options: (NSUInteger)mask
|
||||
range: (NSRange)aRange
|
||||
{
|
||||
GS_RANGE_CHECK(aRange, _count);
|
||||
|
@ -3647,7 +3647,7 @@ agree, create a new GSUnicodeInlineString otherwise.
|
|||
return cString_c((GSStr)self, encoding);
|
||||
}
|
||||
|
||||
- (unsigned int) cStringLength
|
||||
- (NSUInteger) cStringLength
|
||||
{
|
||||
if (_flags.wide == 1)
|
||||
return cStringLength_u((GSStr)self, externalEncoding);
|
||||
|
@ -3773,7 +3773,7 @@ NSAssert(_flags.free == 1 && _zone != 0, NSInternalInconsistencyException);
|
|||
}
|
||||
|
||||
- (void) getCString: (char*)buffer
|
||||
maxLength: (unsigned int)maxLength
|
||||
maxLength: (NSUInteger)maxLength
|
||||
{
|
||||
if (_flags.wide == 1)
|
||||
getCString_u((GSStr)self, buffer, maxLength, (NSRange){0, _count}, 0);
|
||||
|
@ -3782,7 +3782,7 @@ NSAssert(_flags.free == 1 && _zone != 0, NSInternalInconsistencyException);
|
|||
}
|
||||
|
||||
- (BOOL) getCString: (char*)buffer
|
||||
maxLength: (unsigned int)maxLength
|
||||
maxLength: (NSUInteger)maxLength
|
||||
encoding: (NSStringEncoding)encoding
|
||||
{
|
||||
if (_flags.wide == 1)
|
||||
|
@ -3792,7 +3792,7 @@ NSAssert(_flags.free == 1 && _zone != 0, NSInternalInconsistencyException);
|
|||
}
|
||||
|
||||
- (void) getCString: (char*)buffer
|
||||
maxLength: (unsigned int)maxLength
|
||||
maxLength: (NSUInteger)maxLength
|
||||
range: (NSRange)aRange
|
||||
remainingRange: (NSRange*)leftoverRange
|
||||
{
|
||||
|
@ -3807,7 +3807,7 @@ NSAssert(_flags.free == 1 && _zone != 0, NSInternalInconsistencyException);
|
|||
}
|
||||
}
|
||||
|
||||
- (unsigned) hash
|
||||
- (NSUInteger) hash
|
||||
{
|
||||
if (self->_flags.hash == 0)
|
||||
{
|
||||
|
@ -3822,7 +3822,7 @@ NSAssert(_flags.free == 1 && _zone != 0, NSInternalInconsistencyException);
|
|||
}
|
||||
|
||||
- (id) initWithBytes: (const void*)bytes
|
||||
length: (unsigned int)length
|
||||
length: (NSUInteger)length
|
||||
encoding: (NSStringEncoding)encoding
|
||||
{
|
||||
unsigned char *chars = 0;
|
||||
|
@ -3978,7 +3978,7 @@ NSAssert(_flags.free == 1 && _zone != 0, NSInternalInconsistencyException);
|
|||
}
|
||||
|
||||
- (id) initWithBytesNoCopy: (void*)bytes
|
||||
length: (unsigned int)length
|
||||
length: (NSUInteger)length
|
||||
encoding: (NSStringEncoding)encoding
|
||||
freeWhenDone: (BOOL)flag
|
||||
{
|
||||
|
@ -3992,7 +3992,7 @@ NSAssert(_flags.free == 1 && _zone != 0, NSInternalInconsistencyException);
|
|||
return self;
|
||||
}
|
||||
|
||||
- (id) initWithCapacity: (unsigned)capacity
|
||||
- (id) initWithCapacity: (NSUInteger)capacity
|
||||
{
|
||||
if (capacity < 2)
|
||||
{
|
||||
|
@ -4012,7 +4012,7 @@ NSAssert(_flags.free == 1 && _zone != 0, NSInternalInconsistencyException);
|
|||
}
|
||||
|
||||
- (id) initWithCharactersNoCopy: (unichar*)chars
|
||||
length: (unsigned int)length
|
||||
length: (NSUInteger)length
|
||||
freeWhenDone: (BOOL)flag
|
||||
{
|
||||
return [self initWithBytesNoCopy: (void*)chars
|
||||
|
@ -4022,7 +4022,7 @@ NSAssert(_flags.free == 1 && _zone != 0, NSInternalInconsistencyException);
|
|||
}
|
||||
|
||||
- (id) initWithCStringNoCopy: (char*)chars
|
||||
length: (unsigned int)length
|
||||
length: (NSUInteger)length
|
||||
freeWhenDone: (BOOL)flag
|
||||
{
|
||||
return [self initWithBytesNoCopy: (void*)chars
|
||||
|
@ -4061,7 +4061,7 @@ NSAssert(_flags.free == 1 && _zone != 0, NSInternalInconsistencyException);
|
|||
return self;
|
||||
}
|
||||
|
||||
- (int) intValue
|
||||
- (NSInteger) intValue
|
||||
{
|
||||
if (_flags.wide == 1)
|
||||
return intValue_u((GSStr)self);
|
||||
|
@ -4085,12 +4085,12 @@ NSAssert(_flags.free == 1 && _zone != 0, NSInternalInconsistencyException);
|
|||
return isEqual_c((GSStr)self, anObject);
|
||||
}
|
||||
|
||||
- (unsigned int) length
|
||||
- (NSUInteger) length
|
||||
{
|
||||
return _count;
|
||||
}
|
||||
|
||||
- (unsigned int) lengthOfBytesUsingEncoding: (NSStringEncoding)encoding
|
||||
- (NSUInteger) lengthOfBytesUsingEncoding: (NSStringEncoding)encoding
|
||||
{
|
||||
if (_flags.wide == 1)
|
||||
return cStringLength_u((GSStr)self, encoding);
|
||||
|
@ -4161,7 +4161,7 @@ NSAssert(_flags.free == 1 && _zone != 0, NSInternalInconsistencyException);
|
|||
return obj;
|
||||
}
|
||||
|
||||
- (NSRange) rangeOfComposedCharacterSequenceAtIndex: (unsigned)anIndex
|
||||
- (NSRange) rangeOfComposedCharacterSequenceAtIndex: (NSUInteger)anIndex
|
||||
{
|
||||
if (_flags.wide == 1)
|
||||
return rangeOfSequence_u((GSStr)self, anIndex);
|
||||
|
@ -4170,7 +4170,7 @@ NSAssert(_flags.free == 1 && _zone != 0, NSInternalInconsistencyException);
|
|||
}
|
||||
|
||||
- (NSRange) rangeOfCharacterFromSet: (NSCharacterSet*)aSet
|
||||
options: (unsigned)mask
|
||||
options: (NSUInteger)mask
|
||||
range: (NSRange)aRange
|
||||
{
|
||||
GS_RANGE_CHECK(aRange, _count);
|
||||
|
@ -4181,7 +4181,7 @@ NSAssert(_flags.free == 1 && _zone != 0, NSInternalInconsistencyException);
|
|||
}
|
||||
|
||||
- (NSRange) rangeOfString: (NSString*)aString
|
||||
options: (unsigned)mask
|
||||
options: (NSUInteger)mask
|
||||
range: (NSRange)aRange
|
||||
{
|
||||
GS_RANGE_CHECK(aRange, _count);
|
||||
|
@ -4237,7 +4237,7 @@ NSAssert(_flags.free == 1 && _zone != 0, NSInternalInconsistencyException);
|
|||
}
|
||||
else if (offset > 0)
|
||||
{
|
||||
makeHole((GSStr)self, NSMaxRange(aRange), (unsigned int)offset);
|
||||
makeHole((GSStr)self, NSMaxRange(aRange), (NSUInteger)offset);
|
||||
}
|
||||
|
||||
if (length > 0)
|
||||
|
@ -4320,7 +4320,7 @@ NSAssert(_flags.free == 1 && _zone != 0, NSInternalInconsistencyException);
|
|||
other = transmute((GSStr)self, aString);
|
||||
if (_count < len)
|
||||
{
|
||||
makeHole((GSStr)self, _count, (unsigned int)(len - _count));
|
||||
makeHole((GSStr)self, _count, (NSUInteger)(len - _count));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -4466,7 +4466,7 @@ NSAssert(_flags.free == 1 && _zone != 0, NSInternalInconsistencyException);
|
|||
}
|
||||
|
||||
// private method for Unicode level 3 implementation
|
||||
- (int) _baseLength
|
||||
- (NSInteger) _baseLength
|
||||
{
|
||||
if (_flags.wide == 1)
|
||||
{
|
||||
|
@ -4503,13 +4503,13 @@ NSAssert(_flags.free == 1 && _zone != 0, NSInternalInconsistencyException);
|
|||
return [_parent canBeConvertedToEncoding: enc];
|
||||
}
|
||||
|
||||
- (unichar) characterAtIndex: (unsigned int)index
|
||||
- (unichar) characterAtIndex: (NSUInteger)index
|
||||
{
|
||||
return [_parent characterAtIndex: index];
|
||||
}
|
||||
|
||||
- (NSComparisonResult) compare: (NSString*)aString
|
||||
options: (unsigned int)mask
|
||||
options: (NSUInteger)mask
|
||||
range: (NSRange)aRange
|
||||
{
|
||||
return [_parent compare: aString options: mask range: aRange];
|
||||
|
@ -4525,7 +4525,7 @@ NSAssert(_flags.free == 1 && _zone != 0, NSInternalInconsistencyException);
|
|||
return [_parent cStringUsingEncoding];
|
||||
}
|
||||
|
||||
- (unsigned int) cStringLength
|
||||
- (NSUInteger) cStringLength
|
||||
{
|
||||
return [_parent cStringLength];
|
||||
}
|
||||
|
@ -4583,20 +4583,20 @@ NSAssert(_flags.free == 1 && _zone != 0, NSInternalInconsistencyException);
|
|||
}
|
||||
|
||||
- (void) getCString: (char*)buffer
|
||||
maxLength: (unsigned int)maxLength
|
||||
maxLength: (NSUInteger)maxLength
|
||||
{
|
||||
[_parent getCString: buffer maxLength: maxLength];
|
||||
}
|
||||
|
||||
- (BOOL) getCString: (char*)buffer
|
||||
maxLength: (unsigned int)maxLength
|
||||
maxLength: (NSUInteger)maxLength
|
||||
encoding: (NSStringEncoding)encoding
|
||||
{
|
||||
return [_parent getCString: buffer maxLength: maxLength encoding: encoding];
|
||||
}
|
||||
|
||||
- (void) getCString: (char*)buffer
|
||||
maxLength: (unsigned int)maxLength
|
||||
maxLength: (NSUInteger)maxLength
|
||||
range: (NSRange)aRange
|
||||
remainingRange: (NSRange*)leftoverRange
|
||||
{
|
||||
|
@ -4606,7 +4606,7 @@ NSAssert(_flags.free == 1 && _zone != 0, NSInternalInconsistencyException);
|
|||
remainingRange: leftoverRange];
|
||||
}
|
||||
|
||||
- (unsigned) hash
|
||||
- (NSUInteger) hash
|
||||
{
|
||||
return [_parent hash];
|
||||
}
|
||||
|
@ -4627,12 +4627,12 @@ NSAssert(_flags.free == 1 && _zone != 0, NSInternalInconsistencyException);
|
|||
return [_parent isEqualToString: anObject];
|
||||
}
|
||||
|
||||
- (unsigned int) length
|
||||
- (NSUInteger) length
|
||||
{
|
||||
return [_parent length];
|
||||
}
|
||||
|
||||
- (unsigned int) lengthOfBytesUsingEncoding
|
||||
- (NSUInteger) lengthOfBytesUsingEncoding
|
||||
{
|
||||
return [_parent lengthOfBytesUsingEncoding];
|
||||
}
|
||||
|
@ -4642,18 +4642,18 @@ NSAssert(_flags.free == 1 && _zone != 0, NSInternalInconsistencyException);
|
|||
return [_parent lossyCString];
|
||||
}
|
||||
|
||||
- (unsigned int) maximumLengthOfBytesUsingEncoding
|
||||
- (NSUInteger) maximumLengthOfBytesUsingEncoding
|
||||
{
|
||||
return [_parent maximumLengthOfBytesUsingEncoding];
|
||||
}
|
||||
|
||||
- (NSRange) rangeOfComposedCharacterSequenceAtIndex: (unsigned)anIndex
|
||||
- (NSRange) rangeOfComposedCharacterSequenceAtIndex: (NSUInteger)anIndex
|
||||
{
|
||||
return [_parent rangeOfComposedCharacterSequenceAtIndex: anIndex];
|
||||
}
|
||||
|
||||
- (NSRange) rangeOfCharacterFromSet: (NSCharacterSet*)aSet
|
||||
options: (unsigned)mask
|
||||
options: (NSUInteger)mask
|
||||
range: (NSRange)aRange
|
||||
{
|
||||
GS_RANGE_CHECK(aRange, ((GSStr)_parent)->_count);
|
||||
|
@ -4661,7 +4661,7 @@ NSAssert(_flags.free == 1 && _zone != 0, NSInternalInconsistencyException);
|
|||
}
|
||||
|
||||
- (NSRange) rangeOfString: (NSString*)aString
|
||||
options: (unsigned)mask
|
||||
options: (NSUInteger)mask
|
||||
range: (NSRange)aRange
|
||||
{
|
||||
GS_RANGE_CHECK(aRange, ((GSStr)_parent)->_count);
|
||||
|
@ -4699,7 +4699,7 @@ NSAssert(_flags.free == 1 && _zone != 0, NSInternalInconsistencyException);
|
|||
return canBeConvertedToEncoding_c((GSStr)_parent, enc);
|
||||
}
|
||||
|
||||
- (unichar) characterAtIndex: (unsigned int)index
|
||||
- (unichar) characterAtIndex: (NSUInteger)index
|
||||
{
|
||||
if (((GSStr)_parent)->_flags.wide == 1)
|
||||
return characterAtIndex_u((GSStr)_parent, index);
|
||||
|
@ -4708,7 +4708,7 @@ NSAssert(_flags.free == 1 && _zone != 0, NSInternalInconsistencyException);
|
|||
}
|
||||
|
||||
- (NSComparisonResult) compare: (NSString*)aString
|
||||
options: (unsigned int)mask
|
||||
options: (NSUInteger)mask
|
||||
range: (NSRange)aRange
|
||||
{
|
||||
GS_RANGE_CHECK(aRange, ((GSStr)_parent)->_count);
|
||||
|
@ -4742,7 +4742,7 @@ NSAssert(_flags.free == 1 && _zone != 0, NSInternalInconsistencyException);
|
|||
return cString_c((GSStr)_parent, encoding);
|
||||
}
|
||||
|
||||
- (unsigned int) cStringLength
|
||||
- (NSUInteger) cStringLength
|
||||
{
|
||||
if (((GSStr)_parent)->_flags.wide == 1)
|
||||
return cStringLength_u((GSStr)_parent, externalEncoding);
|
||||
|
@ -4799,7 +4799,7 @@ NSAssert(_flags.free == 1 && _zone != 0, NSInternalInconsistencyException);
|
|||
}
|
||||
}
|
||||
|
||||
- (unsigned) hash
|
||||
- (NSUInteger) hash
|
||||
{
|
||||
if (((GSStr)_parent)->_flags.hash == 0)
|
||||
{
|
||||
|
@ -4824,12 +4824,12 @@ NSAssert(_flags.free == 1 && _zone != 0, NSInternalInconsistencyException);
|
|||
return isEqual_c((GSStr)_parent, anObject);
|
||||
}
|
||||
|
||||
- (unsigned int) length
|
||||
- (NSUInteger) length
|
||||
{
|
||||
return ((GSStr)_parent)->_count;
|
||||
}
|
||||
|
||||
- (unsigned int) lengthOfBytesUsingEncoding: (NSStringEncoding)encoding
|
||||
- (NSUInteger) lengthOfBytesUsingEncoding: (NSStringEncoding)encoding
|
||||
{
|
||||
if (((GSStr)_parent)->_flags.wide == 1)
|
||||
return cStringLength_u((GSStr)_parent, encoding);
|
||||
|
@ -4845,12 +4845,12 @@ NSAssert(_flags.free == 1 && _zone != 0, NSInternalInconsistencyException);
|
|||
return lossyCString_c((GSStr)_parent);
|
||||
}
|
||||
|
||||
- (unsigned int) maximumLengthOfBytesUsingEncoding
|
||||
- (NSUInteger) maximumLengthOfBytesUsingEncoding
|
||||
{
|
||||
return [_parent maximumLengthOfBytesUsingEncoding];
|
||||
}
|
||||
|
||||
- (NSRange) rangeOfComposedCharacterSequenceAtIndex: (unsigned)anIndex
|
||||
- (NSRange) rangeOfComposedCharacterSequenceAtIndex: (NSUInteger)anIndex
|
||||
{
|
||||
if (((GSStr)_parent)->_flags.wide == 1)
|
||||
return rangeOfSequence_u((GSStr)_parent, anIndex);
|
||||
|
@ -4859,7 +4859,7 @@ NSAssert(_flags.free == 1 && _zone != 0, NSInternalInconsistencyException);
|
|||
}
|
||||
|
||||
- (NSRange) rangeOfCharacterFromSet: (NSCharacterSet*)aSet
|
||||
options: (unsigned)mask
|
||||
options: (NSUInteger)mask
|
||||
range: (NSRange)aRange
|
||||
{
|
||||
GS_RANGE_CHECK(aRange, ((GSStr)_parent)->_count);
|
||||
|
@ -4870,7 +4870,7 @@ NSAssert(_flags.free == 1 && _zone != 0, NSInternalInconsistencyException);
|
|||
}
|
||||
|
||||
- (NSRange) rangeOfString: (NSString*)aString
|
||||
options: (unsigned)mask
|
||||
options: (NSUInteger)mask
|
||||
range: (NSRange)aRange
|
||||
{
|
||||
GS_RANGE_CHECK(aRange, ((GSStr)_parent)->_count);
|
||||
|
@ -4930,7 +4930,7 @@ NSAssert(_flags.free == 1 && _zone != 0, NSInternalInconsistencyException);
|
|||
#define _self ((GSStr)self)
|
||||
|
||||
- (id) initWithBytes: (const void*)bytes
|
||||
length: (unsigned int)length
|
||||
length: (NSUInteger)length
|
||||
encoding: (NSStringEncoding)encoding
|
||||
{
|
||||
[NSException raise: NSGenericException
|
||||
|
@ -4939,7 +4939,7 @@ NSAssert(_flags.free == 1 && _zone != 0, NSInternalInconsistencyException);
|
|||
}
|
||||
|
||||
- (id) initWithBytesNoCopy: (void*)bytes
|
||||
length: (unsigned int)length
|
||||
length: (NSUInteger)length
|
||||
encoding: (NSStringEncoding)encoding
|
||||
freeWhenDone: (BOOL)flag
|
||||
{
|
||||
|
@ -4998,7 +4998,7 @@ NSAssert(_flags.free == 1 && _zone != 0, NSInternalInconsistencyException);
|
|||
* Return a 28-bit hash value for the string contents - this
|
||||
* MUST match the algorithm used by the NSString base class.
|
||||
*/
|
||||
- (unsigned) hash
|
||||
- (NSUInteger) hash
|
||||
{
|
||||
unsigned ret = 0;
|
||||
unsigned len = _self->_count;
|
||||
|
|
|
@ -65,7 +65,7 @@
|
|||
|
||||
@interface NSURLResponse (Private)
|
||||
- (void) _setHeaders: (id)headers;
|
||||
- (void) _setStatusCode: (int)code text: (NSString*)text;
|
||||
- (void) _setStatusCode: (NSInteger)code text: (NSString*)text;
|
||||
- (void) _setValue: (NSString *)value forHTTPHeaderField: (NSString *)field;
|
||||
- (NSString*) _valueForHTTPHeaderField: (NSString*)field;
|
||||
@end
|
||||
|
|
|
@ -55,7 +55,7 @@
|
|||
|
||||
*/
|
||||
|
||||
static const float pi = 3.1415926535897932384626434;
|
||||
static const CGFloat pi = 3.1415926535897932384626434;
|
||||
|
||||
#if 0
|
||||
#define valid(o) NSAssert((o->_isIdentity && o->A==1.0 && o->B==0.0 && o->C==0.0 && o->D==1.0) || (o->_isFlipY && o->A==1.0 && o->B==0.0 && o->C==0.0 && o->D==-1.0) || !(o->_isIdentity||o->_isFlipY), NSInternalInconsistencyException)
|
||||
|
@ -227,8 +227,8 @@ static NSAffineTransformStruct identityTransform = {
|
|||
*/
|
||||
- (void) invert
|
||||
{
|
||||
float newA, newB, newC, newD, newTX, newTY;
|
||||
float det;
|
||||
CGFloat newA, newB, newC, newD, newTX, newTY;
|
||||
CGFloat det;
|
||||
|
||||
if (_isIdentity)
|
||||
{
|
||||
|
@ -345,7 +345,7 @@ static NSAffineTransformStruct identityTransform = {
|
|||
* with the transformation matrix of the receiver are rotated counter-clockwise
|
||||
* by the number of degrees specified by angle.
|
||||
*/
|
||||
- (void) rotateByDegrees: (float)angle
|
||||
- (void) rotateByDegrees: (CGFloat)angle
|
||||
{
|
||||
[self rotateByRadians: pi * angle / 180];
|
||||
}
|
||||
|
@ -355,12 +355,12 @@ static NSAffineTransformStruct identityTransform = {
|
|||
* with the transformation matrix of the receiver are rotated counter-clockwise
|
||||
* by the number of radians specified by angle.
|
||||
*/
|
||||
- (void) rotateByRadians: (float)angleRad
|
||||
- (void) rotateByRadians: (CGFloat)angleRad
|
||||
{
|
||||
if (angleRad != 0.0)
|
||||
{
|
||||
float sine;
|
||||
float cosine;
|
||||
CGFloat sine;
|
||||
CGFloat cosine;
|
||||
NSAffineTransformStruct rotm;
|
||||
|
||||
sine = sin (angleRad);
|
||||
|
@ -381,7 +381,7 @@ static NSAffineTransformStruct identityTransform = {
|
|||
* Scales the transformation matrix of the reciever by the factor specified
|
||||
* by scale.
|
||||
*/
|
||||
- (void) scaleBy: (float)scale
|
||||
- (void) scaleBy: (CGFloat)scale
|
||||
{
|
||||
NSAffineTransformStruct scam = identityTransform;
|
||||
|
||||
|
@ -397,7 +397,7 @@ static NSAffineTransformStruct identityTransform = {
|
|||
* Scales the X axis of the receiver's transformation matrix
|
||||
* by scaleX and the Y axis of the transformation matrix by scaleY.
|
||||
*/
|
||||
- (void) scaleXBy: (float)scaleX yBy: (float)scaleY
|
||||
- (void) scaleXBy: (CGFloat)scaleX yBy: (CGFloat)scaleY
|
||||
{
|
||||
if (_isIdentity && scaleX == 1.0)
|
||||
{
|
||||
|
@ -537,7 +537,7 @@ static NSAffineTransformStruct identityTransform = {
|
|||
* Points transformed by the reciever's matrix after this operation will
|
||||
* be shifted in position based on the specified translation.
|
||||
*/
|
||||
- (void) translateXBy: (float)tranX yBy: (float)tranY
|
||||
- (void) translateXBy: (CGFloat)tranX yBy: (CGFloat)tranY
|
||||
{
|
||||
if (_isIdentity)
|
||||
{
|
||||
|
@ -579,9 +579,9 @@ static NSAffineTransformStruct identityTransform = {
|
|||
{
|
||||
NSAffineTransformStruct replace;
|
||||
|
||||
[aCoder decodeArrayOfObjCType: @encode(float)
|
||||
[aCoder decodeArrayOfObjCType: @encode(CGFloat)
|
||||
count: 6
|
||||
at: (float*)&replace];
|
||||
at: (CGFloat*)&replace];
|
||||
[self setTransformStruct: replace];
|
||||
return self;
|
||||
}
|
||||
|
@ -591,9 +591,9 @@ static NSAffineTransformStruct identityTransform = {
|
|||
NSAffineTransformStruct replace;
|
||||
|
||||
replace = [self transformStruct];
|
||||
[aCoder encodeArrayOfObjCType: @encode(float)
|
||||
[aCoder encodeArrayOfObjCType: @encode(CGFloat)
|
||||
count: 6
|
||||
at: (float*)&replace];
|
||||
at: (CGFloat*)&replace];
|
||||
}
|
||||
|
||||
@end /* NSAffineTransform */
|
||||
|
|
|
@ -237,9 +237,10 @@ static Class NSMutableDataMallocClass;
|
|||
}
|
||||
|
||||
- (void) encodeArrayOfObjCType: (const char*)type
|
||||
count: (unsigned)count
|
||||
count: (NSUInteger)count
|
||||
at: (const void*)buf
|
||||
{
|
||||
unsigned c = count;
|
||||
unsigned i;
|
||||
unsigned offset = 0;
|
||||
unsigned size = objc_sizeof_type(type);
|
||||
|
@ -272,9 +273,9 @@ static Class NSMutableDataMallocClass;
|
|||
if (_initialPass == NO)
|
||||
{
|
||||
(*_tagImp)(_dst, tagSel, _GSC_ARY_B);
|
||||
(*_serImp)(_dst, serSel, &count, @encode(unsigned), nil);
|
||||
(*_serImp)(_dst, serSel, &c, @encode(unsigned), nil);
|
||||
}
|
||||
for (i = 0; i < count; i++)
|
||||
for (i = 0; i < c; i++)
|
||||
{
|
||||
(*_eValImp)(self, eValSel, type, (char*)buf + offset);
|
||||
offset += size;
|
||||
|
@ -283,10 +284,10 @@ static Class NSMutableDataMallocClass;
|
|||
else if (_initialPass == NO)
|
||||
{
|
||||
(*_tagImp)(_dst, tagSel, _GSC_ARY_B);
|
||||
(*_serImp)(_dst, serSel, &count, @encode(unsigned), nil);
|
||||
(*_serImp)(_dst, serSel, &c, @encode(unsigned), nil);
|
||||
|
||||
(*_tagImp)(_dst, tagSel, info);
|
||||
for (i = 0; i < count; i++)
|
||||
for (i = 0; i < c; i++)
|
||||
{
|
||||
(*_serImp)(_dst, serSel, (char*)buf + offset, type, nil);
|
||||
offset += size;
|
||||
|
@ -305,7 +306,7 @@ static Class NSMutableDataMallocClass;
|
|||
|
||||
case _C_ARY_B:
|
||||
{
|
||||
int count = atoi(++type);
|
||||
unsigned count = atoi(++type);
|
||||
|
||||
while (isdigit(*type))
|
||||
{
|
||||
|
|
|
@ -269,7 +269,7 @@ static SEL rlSel;
|
|||
* Returns an autoreleased array containing the specified
|
||||
* objects, preserving order.
|
||||
*/
|
||||
+ (id) arrayWithObjects: (id*)objects count: (unsigned)count
|
||||
+ (id) arrayWithObjects: (id*)objects count: (NSUInteger)count
|
||||
{
|
||||
return AUTORELEASE([[self allocWithZone: NSDefaultMallocZone()]
|
||||
initWithObjects: objects count: count]);
|
||||
|
@ -380,7 +380,7 @@ static SEL rlSel;
|
|||
/** <override-subclass />
|
||||
* Returns the number of elements contained in the receiver.
|
||||
*/
|
||||
- (unsigned) count
|
||||
- (NSUInteger) count
|
||||
{
|
||||
[self subclassResponsibility: _cmd];
|
||||
return 0;
|
||||
|
@ -467,7 +467,7 @@ static SEL rlSel;
|
|||
/**
|
||||
* Returns the same value as -count
|
||||
*/
|
||||
- (unsigned) hash
|
||||
- (NSUInteger) hash
|
||||
{
|
||||
return [self count];
|
||||
}
|
||||
|
@ -476,7 +476,7 @@ static SEL rlSel;
|
|||
* Returns the index of the specified object in the receiver, or
|
||||
* NSNotFound if the object is not present.
|
||||
*/
|
||||
- (unsigned) indexOfObjectIdenticalTo: (id)anObject
|
||||
- (NSUInteger) indexOfObjectIdenticalTo: (id)anObject
|
||||
{
|
||||
unsigned c = [self count];
|
||||
|
||||
|
@ -496,7 +496,7 @@ static SEL rlSel;
|
|||
* Returns the index of the specified object in the range of the receiver,
|
||||
* or NSNotFound if the object is not present.
|
||||
*/
|
||||
- (unsigned) indexOfObjectIdenticalTo: anObject inRange: (NSRange)aRange
|
||||
- (NSUInteger) indexOfObjectIdenticalTo: anObject inRange: (NSRange)aRange
|
||||
{
|
||||
unsigned i, e = aRange.location + aRange.length, c = [self count];
|
||||
IMP get = [self methodForSelector: oaiSel];
|
||||
|
@ -514,7 +514,7 @@ static SEL rlSel;
|
|||
* which is equal to anObject (using anObject's [NSObject-isEqual:] method).
|
||||
* Returns NSNotFound on failure.
|
||||
*/
|
||||
- (unsigned) indexOfObject: (id)anObject
|
||||
- (NSUInteger) indexOfObject: (id)anObject
|
||||
{
|
||||
unsigned c = [self count];
|
||||
|
||||
|
@ -537,7 +537,7 @@ static SEL rlSel;
|
|||
* which is equal to anObject (using anObject's [NSObject-isEqual:] method).
|
||||
* Returns NSNotFound on failure.
|
||||
*/
|
||||
- (unsigned) indexOfObject: (id)anObject inRange: (NSRange)aRange
|
||||
- (NSUInteger) indexOfObject: (id)anObject inRange: (NSRange)aRange
|
||||
{
|
||||
unsigned i, e = aRange.location + aRange.length, c = [self count];
|
||||
IMP get = [self methodForSelector: oaiSel];
|
||||
|
@ -835,7 +835,7 @@ static SEL rlSel;
|
|||
* and needs to be re-implemented in subclasses in order to have all
|
||||
* other initialisers work.
|
||||
*/
|
||||
- (id) initWithObjects: (id*)objects count: (unsigned)count
|
||||
- (id) initWithObjects: (id*)objects count: (NSUInteger)count
|
||||
{
|
||||
self = [self init];
|
||||
return self;
|
||||
|
@ -870,7 +870,7 @@ static SEL rlSel;
|
|||
* Returns the object at the specified index.
|
||||
* Raises an exception of the index is beyond the array.
|
||||
*/
|
||||
- (id) objectAtIndex: (unsigned)index
|
||||
- (id) objectAtIndex: (NSUInteger)index
|
||||
{
|
||||
[self subclassResponsibility: _cmd];
|
||||
return nil;
|
||||
|
@ -1224,7 +1224,7 @@ compare(id elem1, id elem2, void* context)
|
|||
* they appear in the receiver.
|
||||
*/
|
||||
- (NSString*) descriptionWithLocale: (NSDictionary*)locale
|
||||
indent: (unsigned int)level
|
||||
indent: (NSUInteger)level
|
||||
{
|
||||
NSString *result = nil;
|
||||
|
||||
|
@ -1633,7 +1633,7 @@ compare(id elem1, id elem2, void* context)
|
|||
* and needs to be re-implemented in subclasses in order to have all
|
||||
* other initialisers work.
|
||||
*/
|
||||
- (id) initWithCapacity: (unsigned)numItems
|
||||
- (id) initWithCapacity: (NSUInteger)numItems
|
||||
{
|
||||
self = [self init];
|
||||
return self;
|
||||
|
@ -1652,8 +1652,8 @@ compare(id elem1, id elem2, void* context)
|
|||
* Swaps the positions of two objects in the array. Raises an exception
|
||||
* if either array index is out of bounds.
|
||||
*/
|
||||
- (void) exchangeObjectAtIndex: (unsigned int)i1
|
||||
withObjectAtIndex: (unsigned int)i2
|
||||
- (void) exchangeObjectAtIndex: (NSUInteger)i1
|
||||
withObjectAtIndex: (NSUInteger)i2
|
||||
{
|
||||
id tmp = [self objectAtIndex: i1];
|
||||
|
||||
|
@ -1668,7 +1668,7 @@ compare(id elem1, id elem2, void* context)
|
|||
* Raises an exception if given an array index which is too large.<br />
|
||||
* The object is retained by the array.
|
||||
*/
|
||||
- (void) replaceObjectAtIndex: (unsigned)index withObject: (id)anObject
|
||||
- (void) replaceObjectAtIndex: (NSUInteger)index withObject: (id)anObject
|
||||
{
|
||||
[self subclassResponsibility: _cmd];
|
||||
}
|
||||
|
@ -1727,7 +1727,7 @@ compare(id elem1, id elem2, void* context)
|
|||
* The size of the array increases by one.<br />
|
||||
* The object is retained by the array.
|
||||
*/
|
||||
- (void) insertObject: anObject atIndex: (unsigned)index
|
||||
- (void) insertObject: anObject atIndex: (NSUInteger)index
|
||||
{
|
||||
[self subclassResponsibility: _cmd];
|
||||
}
|
||||
|
@ -1756,7 +1756,7 @@ compare(id elem1, id elem2, void* context)
|
|||
* The size of the array decreases by one.<br />
|
||||
* Raises an exception if given an array index which is too large.<br />
|
||||
*/
|
||||
- (void) removeObjectAtIndex: (unsigned)index
|
||||
- (void) removeObjectAtIndex: (NSUInteger)index
|
||||
{
|
||||
[self subclassResponsibility: _cmd];
|
||||
}
|
||||
|
@ -1765,7 +1765,7 @@ compare(id elem1, id elem2, void* context)
|
|||
* Creates an autoreleased mutable array able to store at least numItems.
|
||||
* See the -initWithCapacity: method.
|
||||
*/
|
||||
+ (id) arrayWithCapacity: (unsigned)numItems
|
||||
+ (id) arrayWithCapacity: (NSUInteger)numItems
|
||||
{
|
||||
return AUTORELEASE([[self allocWithZone: NSDefaultMallocZone()]
|
||||
initWithCapacity: numItems]);
|
||||
|
@ -1774,7 +1774,7 @@ compare(id elem1, id elem2, void* context)
|
|||
/**
|
||||
* Override our superclass's designated initializer to go our's
|
||||
*/
|
||||
- (id) initWithObjects: (id*)objects count: (unsigned)count
|
||||
- (id) initWithObjects: (id*)objects count: (NSUInteger)count
|
||||
{
|
||||
self = [self initWithCapacity: count];
|
||||
if (count > 0)
|
||||
|
@ -2037,8 +2037,8 @@ compare(id elem1, id elem2, void* context)
|
|||
*/
|
||||
- (void) removeObjectsAtIndexes: (NSIndexSet *)indexes
|
||||
{
|
||||
unsigned count = [indexes count];
|
||||
unsigned indexArray[count];
|
||||
NSUInteger count = [indexes count];
|
||||
NSUInteger indexArray[count];
|
||||
|
||||
[indexes getIndexes: indexArray
|
||||
maxCount: count
|
||||
|
@ -2054,15 +2054,15 @@ compare(id elem1, id elem2, void* context)
|
|||
* removed in such a way that the removal is <em>safe</em> irrespective
|
||||
* of the order in which they are specified in the indices array.
|
||||
*/
|
||||
- (void) removeObjectsFromIndices: (unsigned*)indices
|
||||
numIndices: (unsigned)count
|
||||
- (void) removeObjectsFromIndices: (NSUInteger*)indices
|
||||
numIndices: (NSUInteger)count
|
||||
{
|
||||
if (count > 0)
|
||||
{
|
||||
unsigned to = 0;
|
||||
unsigned from = 0;
|
||||
unsigned i;
|
||||
GS_BEGINITEMBUF(sorted, count, unsigned int);
|
||||
GS_BEGINITEMBUF(sorted, count, NSUInteger);
|
||||
|
||||
while (from < count)
|
||||
{
|
||||
|
|
|
@ -89,7 +89,7 @@ static NSString *dict_key = @"NSAssertionHandler";
|
|||
*/
|
||||
- (void) handleFailureInFunction: (NSString*)functionName
|
||||
file: (NSString*)fileName
|
||||
lineNumber: (int)line
|
||||
lineNumber: (NSInteger)line
|
||||
description: (NSString*)format,...
|
||||
{
|
||||
id message;
|
||||
|
@ -116,7 +116,7 @@ static NSString *dict_key = @"NSAssertionHandler";
|
|||
- (void) handleFailureInMethod: (SEL) aSelector
|
||||
object: object
|
||||
file: (NSString *) fileName
|
||||
lineNumber: (int) line
|
||||
lineNumber: (NSInteger) line
|
||||
description: (NSString *) format,...
|
||||
{
|
||||
id message;
|
||||
|
|
|
@ -163,7 +163,7 @@ static Class GSMutableAttributedStringClass;
|
|||
{
|
||||
attrs = [self attributesAtIndex: index effectiveRange: &r];
|
||||
index = NSMaxRange(r);
|
||||
[aCoder encodeValueOfObjCType: @encode(unsigned int) at: &index];
|
||||
[aCoder encodeValueOfObjCType: @encode(unsigned) at: &index];
|
||||
[aCoder encodeObject: attrs];
|
||||
}
|
||||
}
|
||||
|
@ -191,7 +191,7 @@ static Class GSMutableAttributedStringClass;
|
|||
unsigned index;
|
||||
NSDictionary *attrs;
|
||||
|
||||
[aDecoder decodeValueOfObjCType: @encode(unsigned int) at: &index];
|
||||
[aDecoder decodeValueOfObjCType: @encode(unsigned) at: &index];
|
||||
attrs = [aDecoder decodeObject];
|
||||
if (index == length)
|
||||
{
|
||||
|
@ -208,7 +208,7 @@ static Class GSMutableAttributedStringClass;
|
|||
[m setAttributes: attrs range: r];
|
||||
while (index < length)
|
||||
{
|
||||
[aDecoder decodeValueOfObjCType: @encode(unsigned int)
|
||||
[aDecoder decodeValueOfObjCType: @encode(unsigned)
|
||||
at: &index];
|
||||
attrs = [aDecoder decodeObject];
|
||||
r = NSMakeRange(last, index - last);
|
||||
|
@ -306,7 +306,7 @@ static Class GSMutableAttributedStringClass;
|
|||
/**
|
||||
* Return length of the underlying string.
|
||||
*/
|
||||
- (unsigned int) length
|
||||
- (NSUInteger) length
|
||||
{
|
||||
return [[self string] length];
|
||||
}
|
||||
|
@ -327,7 +327,7 @@ static Class GSMutableAttributedStringClass;
|
|||
* and values still hold. This may not be the maximum range, depending
|
||||
* on the implementation.
|
||||
*/
|
||||
- (NSDictionary*) attributesAtIndex: (unsigned int)index
|
||||
- (NSDictionary*) attributesAtIndex: (NSUInteger)index
|
||||
effectiveRange: (NSRange*)aRange
|
||||
{
|
||||
[self subclassResponsibility: _cmd];/* Primitive method! */
|
||||
|
@ -339,7 +339,7 @@ static Class GSMutableAttributedStringClass;
|
|||
* is non-nil, this gets filled with the range over which the attribute-value
|
||||
* set is the same as at index, clipped to rangeLimit.
|
||||
*/
|
||||
- (NSDictionary*) attributesAtIndex: (unsigned int)index
|
||||
- (NSDictionary*) attributesAtIndex: (NSUInteger)index
|
||||
longestEffectiveRange: (NSRange*)aRange
|
||||
inRange: (NSRange)rangeLimit
|
||||
{
|
||||
|
@ -394,7 +394,7 @@ static Class GSMutableAttributedStringClass;
|
|||
* may not be the maximum range, depending on the implementation.
|
||||
*/
|
||||
- (id) attribute: (NSString*)attributeName
|
||||
atIndex: (unsigned int)index
|
||||
atIndex: (NSUInteger)index
|
||||
effectiveRange: (NSRange*)aRange
|
||||
{
|
||||
NSDictionary *tmpDictionary;
|
||||
|
@ -424,7 +424,7 @@ static Class GSMutableAttributedStringClass;
|
|||
* applies, clipped to rangeLimit.
|
||||
*/
|
||||
- (id) attribute: (NSString*)attributeName
|
||||
atIndex: (unsigned int)index
|
||||
atIndex: (NSUInteger)index
|
||||
longestEffectiveRange: (NSRange*)aRange
|
||||
inRange: (NSRange)rangeLimit
|
||||
{
|
||||
|
@ -639,7 +639,7 @@ static Class GSMutableAttributedStringClass;
|
|||
unsigned index;
|
||||
NSDictionary *attrs;
|
||||
|
||||
[aDecoder decodeValueOfObjCType: @encode(unsigned int) at: &index];
|
||||
[aDecoder decodeValueOfObjCType: @encode(unsigned) at: &index];
|
||||
attrs = [aDecoder decodeObject];
|
||||
if (index == length)
|
||||
{
|
||||
|
@ -654,7 +654,7 @@ static Class GSMutableAttributedStringClass;
|
|||
[self setAttributes: attrs range: r];
|
||||
while (index < length)
|
||||
{
|
||||
[aDecoder decodeValueOfObjCType: @encode(unsigned int)
|
||||
[aDecoder decodeValueOfObjCType: @encode(unsigned)
|
||||
at: &index];
|
||||
attrs = [aDecoder decodeObject];
|
||||
r = NSMakeRange(last, index - last);
|
||||
|
@ -865,7 +865,7 @@ static Class GSMutableAttributedStringClass;
|
|||
* Inserts attributed string within this one, preserving attributes.
|
||||
*/
|
||||
- (void) insertAttributedString: (NSAttributedString*)attributedString
|
||||
atIndex: (unsigned int)index
|
||||
atIndex: (NSUInteger)index
|
||||
{
|
||||
[self replaceCharactersInRange: NSMakeRange(index,0)
|
||||
withAttributedString: attributedString];
|
||||
|
@ -979,12 +979,12 @@ static Class GSMutableAttributedStringClass;
|
|||
GSNOSUPERDEALLOC;
|
||||
}
|
||||
|
||||
- (unsigned int) length
|
||||
- (NSUInteger) length
|
||||
{
|
||||
return [[_owner string] length];
|
||||
}
|
||||
|
||||
- (unichar) characterAtIndex: (unsigned int)index
|
||||
- (unichar) characterAtIndex: (NSUInteger)index
|
||||
{
|
||||
return [[_owner string] characterAtIndex: index];
|
||||
}
|
||||
|
@ -1004,7 +1004,7 @@ static Class GSMutableAttributedStringClass;
|
|||
return [[_owner string] cString];
|
||||
}
|
||||
|
||||
- (unsigned int) cStringLength
|
||||
- (NSUInteger) cStringLength
|
||||
{
|
||||
return [[_owner string] cStringLength];
|
||||
}
|
||||
|
@ -1019,7 +1019,7 @@ static Class GSMutableAttributedStringClass;
|
|||
return [[_owner string] smallestEncoding];
|
||||
}
|
||||
|
||||
- (int) _baseLength
|
||||
- (NSInteger) _baseLength
|
||||
{
|
||||
return [[_owner string] _baseLength];
|
||||
}
|
||||
|
|
|
@ -148,8 +148,8 @@ abbrev(NSTimeZone *tz, NSDate *d)
|
|||
}
|
||||
}
|
||||
|
||||
static inline unsigned int
|
||||
lastDayOfGregorianMonth(unsigned month, unsigned year)
|
||||
static inline NSUInteger
|
||||
lastDayOfGregorianMonth(NSUInteger month, NSUInteger year)
|
||||
{
|
||||
switch (month)
|
||||
{
|
||||
|
@ -167,8 +167,8 @@ lastDayOfGregorianMonth(unsigned month, unsigned year)
|
|||
}
|
||||
}
|
||||
|
||||
static inline unsigned
|
||||
absoluteGregorianDay(unsigned day, unsigned month, unsigned year)
|
||||
static inline NSUInteger
|
||||
absoluteGregorianDay(NSUInteger day, NSUInteger month, NSUInteger year)
|
||||
{
|
||||
if (month > 1)
|
||||
{
|
||||
|
@ -198,12 +198,12 @@ dayOfCommonEra(NSTimeInterval when)
|
|||
when /= 86400.0;
|
||||
// Offset by Gregorian reference
|
||||
when += GREGORIAN_REFERENCE;
|
||||
r = (int)when;
|
||||
r = (NSInteger)when;
|
||||
return r;
|
||||
}
|
||||
|
||||
static void
|
||||
gregorianDateFromAbsolute(int abs, int *day, int *month, int *year)
|
||||
gregorianDateFromAbsolute(NSInteger abs, int *day, int *month, int *year)
|
||||
{
|
||||
// Search forward year by year from approximate year
|
||||
*year = abs/366;
|
||||
|
@ -259,7 +259,7 @@ GSBreakTime(NSTimeInterval when, int *year, int *month, int *day,
|
|||
// Offset by Gregorian reference
|
||||
a += GREGORIAN_REFERENCE;
|
||||
// result is the day of common era.
|
||||
dayOfEra = (int)a;
|
||||
dayOfEra = (NSInteger)a;
|
||||
|
||||
// Calculate year, month, and day
|
||||
gregorianDateFromAbsolute(dayOfEra, day, month, year);
|
||||
|
@ -269,17 +269,17 @@ GSBreakTime(NSTimeInterval when, int *year, int *month, int *day,
|
|||
d *= 86400;
|
||||
a = abs(d - when);
|
||||
b = a / 3600;
|
||||
*hour = (int)b;
|
||||
*hour = (NSInteger)b;
|
||||
h = *hour;
|
||||
h = h * 3600;
|
||||
b = a - h;
|
||||
b = b / 60;
|
||||
*minute = (int)b;
|
||||
*minute = (NSInteger)b;
|
||||
m = *minute;
|
||||
m = m * 60;
|
||||
c = a - h - m;
|
||||
*second = (int)c;
|
||||
*mil = (int)((a - h - m - c) * 1000.0 + 0.5);
|
||||
*second = (NSInteger)c;
|
||||
*mil = (NSInteger)((a - h - m - c) * 1000.0 + 0.5);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -391,12 +391,12 @@ GSTimeNow(void)
|
|||
* Creates and returns an NSCalendarDate from the specified values
|
||||
* by calling -initWithYear:month:day:hour:minute:second:timeZone:
|
||||
*/
|
||||
+ (id) dateWithYear: (int)year
|
||||
month: (unsigned int)month
|
||||
day: (unsigned int)day
|
||||
hour: (unsigned int)hour
|
||||
minute: (unsigned int)minute
|
||||
second: (unsigned int)second
|
||||
+ (id) dateWithYear: (NSInteger)year
|
||||
month: (NSUInteger)month
|
||||
day: (NSUInteger)day
|
||||
hour: (NSUInteger)hour
|
||||
minute: (NSUInteger)minute
|
||||
second: (NSUInteger)second
|
||||
timeZone: (NSTimeZone *)aTimeZone
|
||||
{
|
||||
NSCalendarDate *d = [[self alloc] initWithYear: year
|
||||
|
@ -769,14 +769,14 @@ static inline int getDigits(const char *from, char *to, int limit, BOOL *error)
|
|||
[fd setLength:
|
||||
(formatLen + sLen - 2) * sizeof(unichar)];
|
||||
format = (unichar*)[fd mutableBytes];
|
||||
for (i = formatLen-1; i > (int)pos; i--)
|
||||
for (i = formatLen-1; i > (NSInteger)pos; i--)
|
||||
{
|
||||
format[i+sLen-2] = format[i];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (i = pos+1; i < (int)formatLen; i++)
|
||||
for (i = pos+1; i < (NSInteger)formatLen; i++)
|
||||
{
|
||||
format[i+sLen-2] = format[i];
|
||||
}
|
||||
|
@ -1422,12 +1422,12 @@ static inline int getDigits(const char *from, char *to, int limit, BOOL *error)
|
|||
* </item>
|
||||
* </list>
|
||||
*/
|
||||
- (id) initWithYear: (int)year
|
||||
month: (unsigned int)month
|
||||
day: (unsigned int)day
|
||||
hour: (unsigned int)hour
|
||||
minute: (unsigned int)minute
|
||||
second: (unsigned int)second
|
||||
- (id) initWithYear: (NSInteger)year
|
||||
month: (NSUInteger)month
|
||||
day: (NSUInteger)day
|
||||
hour: (NSUInteger)hour
|
||||
minute: (NSUInteger)minute
|
||||
second: (NSUInteger)second
|
||||
timeZone: (NSTimeZone *)aTimeZone
|
||||
{
|
||||
unsigned int c;
|
||||
|
@ -1533,7 +1533,7 @@ static inline int getDigits(const char *from, char *to, int limit, BOOL *error)
|
|||
* Return the day number (ie number of days since the start of) in the
|
||||
* 'common' era of the receiving date. The era starts at 1 A.D.
|
||||
*/
|
||||
- (int) dayOfCommonEra
|
||||
- (NSInteger) dayOfCommonEra
|
||||
{
|
||||
NSTimeInterval when;
|
||||
|
||||
|
@ -1544,7 +1544,7 @@ static inline int getDigits(const char *from, char *to, int limit, BOOL *error)
|
|||
/**
|
||||
* Return the month (1 to 31) of the receiving date.
|
||||
*/
|
||||
- (int) dayOfMonth
|
||||
- (NSInteger) dayOfMonth
|
||||
{
|
||||
int m, d, y;
|
||||
NSTimeInterval when;
|
||||
|
@ -1567,7 +1567,7 @@ static inline int getDigits(const char *from, char *to, int limit, BOOL *error)
|
|||
* <item>6 is saturday</item>
|
||||
* </list>
|
||||
*/
|
||||
- (int) dayOfWeek
|
||||
- (NSInteger) dayOfWeek
|
||||
{
|
||||
int d;
|
||||
NSTimeInterval when;
|
||||
|
@ -1588,7 +1588,7 @@ static inline int getDigits(const char *from, char *to, int limit, BOOL *error)
|
|||
/**
|
||||
* Return the day of the year (1 to 366) of the receiving date.
|
||||
*/
|
||||
- (int) dayOfYear
|
||||
- (NSInteger) dayOfYear
|
||||
{
|
||||
int m, d, y, days, i;
|
||||
NSTimeInterval when;
|
||||
|
@ -1605,7 +1605,7 @@ static inline int getDigits(const char *from, char *to, int limit, BOOL *error)
|
|||
/**
|
||||
* Return the hour of the day (0 to 23) of the receiving date.
|
||||
*/
|
||||
- (int) hourOfDay
|
||||
- (NSInteger) hourOfDay
|
||||
{
|
||||
int h;
|
||||
double a, d;
|
||||
|
@ -1617,7 +1617,7 @@ static inline int getDigits(const char *from, char *to, int limit, BOOL *error)
|
|||
d *= 86400;
|
||||
a = abs(d - (_seconds_since_ref + offset(_time_zone, self)));
|
||||
a = a / 3600;
|
||||
h = (int)a;
|
||||
h = (NSInteger)a;
|
||||
|
||||
// There is a small chance of getting
|
||||
// it right at the stroke of midnight
|
||||
|
@ -1630,7 +1630,7 @@ static inline int getDigits(const char *from, char *to, int limit, BOOL *error)
|
|||
/**
|
||||
* Return the minute of the hour (0 to 59) of the receiving date.
|
||||
*/
|
||||
- (int) minuteOfHour
|
||||
- (NSInteger) minuteOfHour
|
||||
{
|
||||
int h, m;
|
||||
double a, b, d;
|
||||
|
@ -1642,11 +1642,11 @@ static inline int getDigits(const char *from, char *to, int limit, BOOL *error)
|
|||
d *= 86400;
|
||||
a = abs(d - (_seconds_since_ref + offset(_time_zone, self)));
|
||||
b = a / 3600;
|
||||
h = (int)b;
|
||||
h = (NSInteger)b;
|
||||
h = h * 3600;
|
||||
b = a - h;
|
||||
b = b / 60;
|
||||
m = (int)b;
|
||||
m = (NSInteger)b;
|
||||
|
||||
return m;
|
||||
}
|
||||
|
@ -1654,7 +1654,7 @@ static inline int getDigits(const char *from, char *to, int limit, BOOL *error)
|
|||
/**
|
||||
* Return the month of the year (1 to 12) of the receiving date.
|
||||
*/
|
||||
- (int) monthOfYear
|
||||
- (NSInteger) monthOfYear
|
||||
{
|
||||
int m, d, y;
|
||||
NSTimeInterval when;
|
||||
|
@ -1668,7 +1668,7 @@ static inline int getDigits(const char *from, char *to, int limit, BOOL *error)
|
|||
/**
|
||||
* Return the second of the minute (0 to 59) of the receiving date.
|
||||
*/
|
||||
- (int) secondOfMinute
|
||||
- (NSInteger) secondOfMinute
|
||||
{
|
||||
int h, m, s;
|
||||
double a, b, c, d;
|
||||
|
@ -1680,14 +1680,14 @@ static inline int getDigits(const char *from, char *to, int limit, BOOL *error)
|
|||
d *= 86400;
|
||||
a = abs(d - (_seconds_since_ref + offset(_time_zone, self)));
|
||||
b = a / 3600;
|
||||
h = (int)b;
|
||||
h = (NSInteger)b;
|
||||
h = h * 3600;
|
||||
b = a - h;
|
||||
b = b / 60;
|
||||
m = (int)b;
|
||||
m = (NSInteger)b;
|
||||
m = m * 60;
|
||||
c = a - h - m;
|
||||
s = (int)c;
|
||||
s = (NSInteger)c;
|
||||
|
||||
return s;
|
||||
}
|
||||
|
@ -1696,7 +1696,7 @@ static inline int getDigits(const char *from, char *to, int limit, BOOL *error)
|
|||
* Return the year of the 'common' era of the receiving date.
|
||||
* The era starts at 1 A.D.
|
||||
*/
|
||||
- (int) yearOfCommonEra
|
||||
- (NSInteger) yearOfCommonEra
|
||||
{
|
||||
int m, d, y;
|
||||
NSTimeInterval when;
|
||||
|
@ -1712,12 +1712,12 @@ static inline int getDigits(const char *from, char *to, int limit, BOOL *error)
|
|||
* Its use is deprecated ... it simply calls
|
||||
* -dateByAddingYears:months:days:hours:minutes:seconds:
|
||||
*/
|
||||
- (NSCalendarDate*) addYear: (int)year
|
||||
month: (int)month
|
||||
day: (int)day
|
||||
hour: (int)hour
|
||||
minute: (int)minute
|
||||
second: (int)second
|
||||
- (NSCalendarDate*) addYear: (NSInteger)year
|
||||
month: (NSInteger)month
|
||||
day: (NSInteger)day
|
||||
hour: (NSInteger)hour
|
||||
minute: (NSInteger)minute
|
||||
second: (NSInteger)second
|
||||
{
|
||||
return [self dateByAddingYears: year
|
||||
months: month
|
||||
|
@ -1989,7 +1989,7 @@ static void Grow(DescriptionInfo *info, unsigned size)
|
|||
s = fabs(s);
|
||||
s -= floor(s);
|
||||
s *= 1000.0;
|
||||
v = (int)(s + 0.5);
|
||||
v = (NSInteger)(s + 0.5);
|
||||
}
|
||||
Grow(info, 3);
|
||||
info->t[info->offset+2] = (v%10) + '0';
|
||||
|
@ -2402,7 +2402,7 @@ static void Grow(DescriptionInfo *info, unsigned size)
|
|||
/**
|
||||
* Returns the number of the last day of the month in the specified year.
|
||||
*/
|
||||
- (int) lastDayOfGregorianMonth: (int)month year: (int)year
|
||||
- (NSInteger) lastDayOfGregorianMonth: (NSInteger)month year: (NSInteger)year
|
||||
{
|
||||
return lastDayOfGregorianMonth(month, year);
|
||||
}
|
||||
|
@ -2411,7 +2411,9 @@ static void Grow(DescriptionInfo *info, unsigned size)
|
|||
* Returns the number of days since the start of the era for the specified
|
||||
* day, month, and year.
|
||||
*/
|
||||
- (int) absoluteGregorianDay: (int)day month: (int)month year: (int)year
|
||||
- (NSInteger) absoluteGregorianDay: (NSInteger)day
|
||||
month: (NSInteger)month
|
||||
year: (NSInteger)year
|
||||
{
|
||||
return absoluteGregorianDay(day, month, year);
|
||||
}
|
||||
|
@ -2420,12 +2422,17 @@ static void Grow(DescriptionInfo *info, unsigned size)
|
|||
* Given a day number since the start of the era, returns the date as a
|
||||
* day, month, and year.
|
||||
*/
|
||||
- (void) gregorianDateFromAbsolute: (int)d
|
||||
day: (int *)day
|
||||
month: (int *)month
|
||||
year: (int *)year
|
||||
- (void) gregorianDateFromAbsolute: (NSInteger)d
|
||||
day: (NSInteger *)day
|
||||
month: (NSInteger *)month
|
||||
year: (NSInteger *)year
|
||||
{
|
||||
gregorianDateFromAbsolute(d, day, month, year);
|
||||
int dd, mm, yy;
|
||||
|
||||
gregorianDateFromAbsolute(d, &dd, &mm, &yy);
|
||||
*day = dd;
|
||||
*month = mm;
|
||||
*year = yy;
|
||||
}
|
||||
|
||||
@end
|
||||
|
@ -2446,12 +2453,12 @@ static void Grow(DescriptionInfo *info, unsigned size)
|
|||
* savings time changes so that it preserves expected clock time.
|
||||
* </p>
|
||||
*/
|
||||
- (NSCalendarDate*) dateByAddingYears: (int)years
|
||||
months: (int)months
|
||||
days: (int)days
|
||||
hours: (int)hours
|
||||
minutes: (int)minutes
|
||||
seconds: (int)seconds
|
||||
- (NSCalendarDate*) dateByAddingYears: (NSInteger)years
|
||||
months: (NSInteger)months
|
||||
days: (NSInteger)days
|
||||
hours: (NSInteger)hours
|
||||
minutes: (NSInteger)minutes
|
||||
seconds: (NSInteger)seconds
|
||||
{
|
||||
NSCalendarDate *c;
|
||||
NSTimeInterval s;
|
||||
|
@ -2603,12 +2610,12 @@ static void Grow(DescriptionInfo *info, unsigned size)
|
|||
* hours is null, then the value returned in minutes will be increased
|
||||
* by 60.
|
||||
*/
|
||||
- (void) years: (int*)years
|
||||
months: (int*)months
|
||||
days: (int*)days
|
||||
hours: (int*)hours
|
||||
minutes: (int*)minutes
|
||||
seconds: (int*)seconds
|
||||
- (void) years: (NSInteger*)years
|
||||
months: (NSInteger*)months
|
||||
days: (NSInteger*)days
|
||||
hours: (NSInteger*)hours
|
||||
minutes: (NSInteger*)minutes
|
||||
seconds: (NSInteger*)seconds
|
||||
sinceDate: (NSDate*)date
|
||||
{
|
||||
NSCalendarDate *start;
|
||||
|
|
|
@ -74,7 +74,7 @@
|
|||
// Encoding Data
|
||||
|
||||
- (void) encodeArrayOfObjCType: (const char*)type
|
||||
count: (unsigned)count
|
||||
count: (NSUInteger)count
|
||||
at: (const void*)array
|
||||
{
|
||||
unsigned i;
|
||||
|
@ -99,7 +99,7 @@
|
|||
[self encodeObject: anObject];
|
||||
}
|
||||
|
||||
- (void) encodeBytes: (void*)d length: (unsigned)l
|
||||
- (void) encodeBytes: (void*)d length: (NSUInteger)l
|
||||
{
|
||||
const char *type = @encode(unsigned char);
|
||||
const unsigned char *where = (const unsigned char*)d;
|
||||
|
@ -169,7 +169,7 @@
|
|||
// Decoding Data
|
||||
|
||||
- (void) decodeArrayOfObjCType: (const char*)type
|
||||
count: (unsigned)count
|
||||
count: (NSUInteger)count
|
||||
at: (void*)address
|
||||
{
|
||||
unsigned i;
|
||||
|
@ -185,9 +185,9 @@
|
|||
}
|
||||
}
|
||||
|
||||
- (void*) decodeBytesWithReturnedLength: (unsigned*)l
|
||||
- (void*) decodeBytesWithReturnedLength: (NSUInteger*)l
|
||||
{
|
||||
unsigned count;
|
||||
unsigned int count;
|
||||
const char *type = @encode(unsigned char);
|
||||
unsigned char *where;
|
||||
unsigned char *array;
|
||||
|
@ -196,8 +196,8 @@
|
|||
imp = [self methodForSelector: @selector(decodeValueOfObjCType:at:)];
|
||||
|
||||
(*imp)(self, @selector(decodeValueOfObjCType:at:),
|
||||
@encode(unsigned), &count);
|
||||
*l = count;
|
||||
@encode(unsigned int), &count);
|
||||
*l = (NSUInteger)count;
|
||||
array = NSZoneMalloc(NSDefaultMallocZone(), count);
|
||||
where = array;
|
||||
while (count-- > 0)
|
||||
|
@ -291,7 +291,7 @@
|
|||
|
||||
// Getting a Version
|
||||
|
||||
- (unsigned int) systemVersion
|
||||
- (unsigned) systemVersion
|
||||
{
|
||||
return (((GNUSTEP_BASE_MAJOR_VERSION * 100)
|
||||
+ GNUSTEP_BASE_MINOR_VERSION) * 100) + GNUSTEP_BASE_SUBMINOR_VERSION;
|
||||
|
@ -318,7 +318,7 @@
|
|||
}
|
||||
|
||||
- (const uint8_t*) decodeBytesForKey: (NSString*)aKey
|
||||
returnedLength: (unsigned*)alength
|
||||
returnedLength: (NSUInteger*)alength
|
||||
{
|
||||
[self subclassResponsibility: _cmd];
|
||||
return 0;
|
||||
|
@ -372,7 +372,7 @@
|
|||
}
|
||||
|
||||
- (void) encodeBytes: (const uint8_t*)aPointer
|
||||
length: (unsigned)length
|
||||
length: (NSUInteger)length
|
||||
forKey: (NSString*)aKey
|
||||
{
|
||||
[self subclassResponsibility: _cmd];
|
||||
|
@ -429,7 +429,7 @@
|
|||
{
|
||||
return _a;
|
||||
}
|
||||
- (unsigned) count
|
||||
- (NSUInteger) count
|
||||
{
|
||||
return _c;
|
||||
}
|
||||
|
@ -465,7 +465,7 @@
|
|||
return self;
|
||||
}
|
||||
|
||||
- (id) initWithObjCType: (const char*)t count: (int)c at: (const void*)a
|
||||
- (id) initWithObjCType: (const char*)t count: (NSInteger)c at: (const void*)a
|
||||
{
|
||||
_t[0] = *t;
|
||||
_t[1] = '\0';
|
||||
|
@ -489,7 +489,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
- (unsigned) size
|
||||
- (NSUInteger) size
|
||||
{
|
||||
return _s;
|
||||
}
|
||||
|
|
|
@ -101,7 +101,7 @@ pointerFunctionsHash(PFInfo *PF, void *item)
|
|||
{
|
||||
if (PF->hashFunction != 0)
|
||||
return (*PF->hashFunction)(item, PF->sizeFunction);
|
||||
return (NSUInteger)item;
|
||||
return (NSUInteger)(uintptr_t)item;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -117,7 +117,7 @@ equalString(const void *item1, const void *item2,
|
|||
static NSUInteger
|
||||
hashDirect(const void *item, NSUInteger (*size)(const void *item))
|
||||
{
|
||||
return (NSUInteger)item;
|
||||
return (NSUInteger)(uintptr_t)item;
|
||||
}
|
||||
|
||||
static NSUInteger
|
||||
|
@ -142,7 +142,7 @@ hashMemory(const void *item, NSUInteger (*size)(const void *item))
|
|||
static NSUInteger
|
||||
hashShifted(const void *item, NSUInteger (*size)(const void *item))
|
||||
{
|
||||
return ((NSUInteger)item) >> 2;
|
||||
return ((NSUInteger)(uintptr_t)item) >> 2;
|
||||
}
|
||||
|
||||
static NSUInteger
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
#include "GNUstepBase/preface.h"
|
||||
#include "Foundation/NSObject.h"
|
||||
|
||||
NSObject *NSCopyObject(NSObject *anObject, unsigned extraBytes, NSZone *zone)
|
||||
NSObject *NSCopyObject(NSObject *anObject, NSUInteger extraBytes, NSZone *zone)
|
||||
{
|
||||
id copy = NSAllocateObject(((id)anObject)->class_pointer, extraBytes, zone);
|
||||
memcpy(copy, anObject,
|
||||
|
|
|
@ -97,7 +97,7 @@ static Class NSCountedSet_concrete_class;
|
|||
* specified object (as determined by the [-isEqual:] method) has
|
||||
* been added to the set and not removed from it.
|
||||
*/
|
||||
- (unsigned int) countForObject: (id)anObject
|
||||
- (NSUInteger) countForObject: (id)anObject
|
||||
{
|
||||
[self subclassResponsibility: _cmd];
|
||||
return 0;
|
||||
|
@ -209,7 +209,7 @@ static Class NSCountedSet_concrete_class;
|
|||
return self;
|
||||
}
|
||||
|
||||
- (void) purge: (int)level
|
||||
- (void) purge: (NSInteger)level
|
||||
{
|
||||
if (level > 0)
|
||||
{
|
||||
|
@ -232,7 +232,7 @@ static Class NSCountedSet_concrete_class;
|
|||
{
|
||||
unsigned c = (*cImp)(self, @selector(countForObject:), obj);
|
||||
|
||||
if (c <= (unsigned int)level)
|
||||
if (c <= (NSUInteger)level)
|
||||
{
|
||||
while (c-- > 0)
|
||||
{
|
||||
|
@ -270,7 +270,7 @@ static Class NSCountedSet_concrete_class;
|
|||
* purge the set even when uniquing is turned off.
|
||||
*/
|
||||
void
|
||||
GSUPurge(unsigned count)
|
||||
GSUPurge(NSUInteger count)
|
||||
{
|
||||
if (uniqueLock != nil)
|
||||
{
|
||||
|
@ -292,10 +292,10 @@ GSUPurge(unsigned count)
|
|||
* alter the set even when uniquing is turned off.
|
||||
*/
|
||||
id
|
||||
GSUSet(id anObject, unsigned count)
|
||||
GSUSet(id anObject, NSUInteger count)
|
||||
{
|
||||
id found;
|
||||
unsigned i;
|
||||
NSUInteger i;
|
||||
|
||||
if (uniqueLock != nil)
|
||||
{
|
||||
|
|
117
Source/NSData.m
117
Source/NSData.m
|
@ -276,7 +276,7 @@ failure:
|
|||
*/
|
||||
@interface NSDataStatic : NSData
|
||||
{
|
||||
unsigned length;
|
||||
NSUInteger length;
|
||||
void *bytes;
|
||||
}
|
||||
@end
|
||||
|
@ -290,14 +290,14 @@ failure:
|
|||
|
||||
@interface NSMutableDataMalloc : NSMutableData
|
||||
{
|
||||
unsigned length;
|
||||
NSUInteger length;
|
||||
void *bytes;
|
||||
NSZone *zone;
|
||||
unsigned capacity;
|
||||
unsigned growth;
|
||||
NSUInteger capacity;
|
||||
NSUInteger growth;
|
||||
}
|
||||
/* Increase capacity to at least the specified minimum value. */
|
||||
- (void) _grow: (unsigned int)minimum;
|
||||
- (void) _grow: (NSUInteger)minimum;
|
||||
@end
|
||||
|
||||
#ifdef HAVE_MMAP
|
||||
|
@ -310,14 +310,14 @@ failure:
|
|||
{
|
||||
int shmid;
|
||||
}
|
||||
- (id) initWithShmID: (int)anId length: (unsigned int)bufferSize;
|
||||
- (id) initWithShmID: (int)anId length: (NSUInteger)bufferSize;
|
||||
@end
|
||||
|
||||
@interface NSMutableDataShared : NSMutableDataMalloc
|
||||
{
|
||||
int shmid;
|
||||
}
|
||||
- (id) initWithShmID: (int)anId length: (unsigned int)bufferSize;
|
||||
- (id) initWithShmID: (int)anId length: (NSUInteger)bufferSize;
|
||||
@end
|
||||
#endif
|
||||
|
||||
|
@ -381,7 +381,7 @@ failure:
|
|||
* and with the specified length. Invokes -initWithBytes:length:
|
||||
*/
|
||||
+ (id) dataWithBytes: (const void*)bytes
|
||||
length: (unsigned int)length
|
||||
length: (NSUInteger)length
|
||||
{
|
||||
NSData *d;
|
||||
|
||||
|
@ -396,7 +396,7 @@ failure:
|
|||
* -initWithBytesNoCopy:length:freeWhenDone: with YES
|
||||
*/
|
||||
+ (id) dataWithBytesNoCopy: (void*)bytes
|
||||
length: (unsigned int)length
|
||||
length: (NSUInteger)length
|
||||
{
|
||||
NSData *d;
|
||||
|
||||
|
@ -411,7 +411,7 @@ failure:
|
|||
* -initWithBytesNoCopy:length:freeWhenDone:
|
||||
*/
|
||||
+ (id) dataWithBytesNoCopy: (void*)aBuffer
|
||||
length: (unsigned int)bufferSize
|
||||
length: (NSUInteger)bufferSize
|
||||
freeWhenDone: (BOOL)shouldFree
|
||||
{
|
||||
NSData *d;
|
||||
|
@ -509,7 +509,7 @@ failure:
|
|||
* to initialise the receiver. Returns the result.
|
||||
*/
|
||||
- (id) initWithBytes: (const void*)aBuffer
|
||||
length: (unsigned int)bufferSize
|
||||
length: (NSUInteger)bufferSize
|
||||
{
|
||||
void *ptr = 0;
|
||||
|
||||
|
@ -538,7 +538,7 @@ failure:
|
|||
* be the receiver).
|
||||
*/
|
||||
- (id) initWithBytesNoCopy: (void*)aBuffer
|
||||
length: (unsigned int)bufferSize
|
||||
length: (NSUInteger)bufferSize
|
||||
{
|
||||
return [self initWithBytesNoCopy: aBuffer
|
||||
length: bufferSize
|
||||
|
@ -556,7 +556,7 @@ failure:
|
|||
* leaks or crashes.
|
||||
*/
|
||||
- (id) initWithBytesNoCopy: (void*)aBuffer
|
||||
length: (unsigned int)bufferSize
|
||||
length: (NSUInteger)bufferSize
|
||||
freeWhenDone: (BOOL)shouldFree
|
||||
{
|
||||
[self subclassResponsibility: _cmd];
|
||||
|
@ -680,7 +680,7 @@ failure:
|
|||
* If length is greater than the size of the receiver, only the available
|
||||
* bytes are copied.
|
||||
*/
|
||||
- (void) getBytes: (void*)buffer length: (unsigned int)length
|
||||
- (void) getBytes: (void*)buffer length: (NSUInteger)length
|
||||
{
|
||||
NSUInteger l = [self length];
|
||||
|
||||
|
@ -736,7 +736,7 @@ failure:
|
|||
return [NSData dataWithBytesNoCopy: buffer length: aRange.length];
|
||||
}
|
||||
|
||||
- (unsigned int) hash
|
||||
- (NSUInteger) hash
|
||||
{
|
||||
unsigned char buf[64];
|
||||
unsigned l = [self length];
|
||||
|
@ -780,7 +780,7 @@ failure:
|
|||
*/
|
||||
- (BOOL) isEqualToData: (NSData*)other
|
||||
{
|
||||
unsigned int len;
|
||||
NSUInteger len;
|
||||
if (other == self)
|
||||
{
|
||||
return YES;
|
||||
|
@ -795,7 +795,7 @@ failure:
|
|||
/** <override-subclass>
|
||||
* Returns the number of bytes of data encapsulated by the receiver.
|
||||
*/
|
||||
- (unsigned int) length
|
||||
- (NSUInteger) length
|
||||
{
|
||||
/* This is left to concrete subclasses to implement. */
|
||||
[self subclassResponsibility: _cmd];
|
||||
|
@ -815,7 +815,7 @@ failure:
|
|||
- (BOOL) writeToFile: (NSString*)path atomically: (BOOL)useAuxiliaryFile
|
||||
{
|
||||
#if defined(__MINGW32__)
|
||||
unsigned int length = [path length];
|
||||
NSUInteger length = [path length];
|
||||
unichar wthePath[length + 100];
|
||||
unichar wtheRealPath[length + 100];
|
||||
#else
|
||||
|
@ -1570,7 +1570,7 @@ failure:
|
|||
/**
|
||||
* New instance with given shared memory ID.
|
||||
*/
|
||||
+ (id) dataWithShmID: (int)anID length: (unsigned int)length
|
||||
+ (id) dataWithShmID: (int)anID length: (NSUInteger)length
|
||||
{
|
||||
#ifdef HAVE_SHMCTL
|
||||
NSDataShared *d;
|
||||
|
@ -1587,7 +1587,7 @@ failure:
|
|||
/**
|
||||
* New instance with given bytes in shared memory.
|
||||
*/
|
||||
+ (id) dataWithSharedBytes: (const void*)bytes length: (unsigned int)length
|
||||
+ (id) dataWithSharedBytes: (const void*)bytes length: (NSUInteger)length
|
||||
{
|
||||
NSData *d;
|
||||
|
||||
|
@ -1601,7 +1601,7 @@ failure:
|
|||
return AUTORELEASE(d);
|
||||
}
|
||||
|
||||
+ (id) dataWithStaticBytes: (const void*)bytes length: (unsigned int)length
|
||||
+ (id) dataWithStaticBytes: (const void*)bytes length: (NSUInteger)length
|
||||
{
|
||||
NSDataStatic *d;
|
||||
|
||||
|
@ -1693,7 +1693,7 @@ failure:
|
|||
}
|
||||
|
||||
+ (id) dataWithBytes: (const void*)bytes
|
||||
length: (unsigned int)length
|
||||
length: (NSUInteger)length
|
||||
{
|
||||
NSData *d;
|
||||
|
||||
|
@ -1703,7 +1703,7 @@ failure:
|
|||
}
|
||||
|
||||
+ (id) dataWithBytesNoCopy: (void*)bytes
|
||||
length: (unsigned int)length
|
||||
length: (NSUInteger)length
|
||||
{
|
||||
NSData *d;
|
||||
|
||||
|
@ -1716,7 +1716,7 @@ failure:
|
|||
* New instance with buffer of given numBytes with length of valid data set
|
||||
* to zero. Note that capacity will be automatically increased as necessary.
|
||||
*/
|
||||
+ (id) dataWithCapacity: (unsigned int)numBytes
|
||||
+ (id) dataWithCapacity: (NSUInteger)numBytes
|
||||
{
|
||||
NSMutableData *d;
|
||||
|
||||
|
@ -1769,7 +1769,7 @@ failure:
|
|||
* valid data is set to zero. Note that buffer will be automatically
|
||||
* increased as necessary.
|
||||
*/
|
||||
+ (id) dataWithLength: (unsigned int)length
|
||||
+ (id) dataWithLength: (NSUInteger)length
|
||||
{
|
||||
NSMutableData *d;
|
||||
|
||||
|
@ -1821,7 +1821,7 @@ failure:
|
|||
* data is initially set to zero.
|
||||
* <init/>
|
||||
*/
|
||||
- (id) initWithCapacity: (unsigned int)capacity
|
||||
- (id) initWithCapacity: (NSUInteger)capacity
|
||||
{
|
||||
[self subclassResponsibility: _cmd];
|
||||
return nil;
|
||||
|
@ -1829,18 +1829,20 @@ failure:
|
|||
|
||||
- (id) initWithCoder: (NSCoder*)aCoder
|
||||
{
|
||||
unsigned l;
|
||||
|
||||
if ([aCoder allowsKeyedCoding])
|
||||
{
|
||||
const uint8_t *data;
|
||||
NSUInteger l;
|
||||
|
||||
|
||||
data = [aCoder decodeBytesForKey: @"NS.data"
|
||||
returnedLength: &l];
|
||||
returnedLength: &l];
|
||||
self = [self initWithBytes: data length: l];
|
||||
}
|
||||
else
|
||||
{
|
||||
unsigned l;
|
||||
|
||||
[aCoder decodeValueOfObjCType: @encode(unsigned int) at: &l];
|
||||
if (l)
|
||||
{
|
||||
|
@ -1857,7 +1859,8 @@ failure:
|
|||
|
||||
if (b == 0)
|
||||
{
|
||||
NSLog(@"[NSDataMalloc -initWithCoder:] unable to get %lu bytes", l);
|
||||
NSLog(@"[NSDataMalloc -initWithCoder:] unable to get %u bytes",
|
||||
l);
|
||||
RELEASE(self);
|
||||
return nil;
|
||||
}
|
||||
|
@ -1876,7 +1879,7 @@ failure:
|
|||
* Initialize with buffer of capacity equal to length, and with the length
|
||||
* of valid data set to length. Data is set to zero.
|
||||
*/
|
||||
- (id) initWithLength: (unsigned int)length
|
||||
- (id) initWithLength: (NSUInteger)length
|
||||
{
|
||||
[self subclassResponsibility: _cmd];
|
||||
return nil;
|
||||
|
@ -1887,7 +1890,7 @@ failure:
|
|||
* Increases buffer length by given number of bytes, filling the new space
|
||||
* with zeros.
|
||||
*/
|
||||
- (void) increaseLengthBy: (unsigned int)extraLength
|
||||
- (void) increaseLengthBy: (NSUInteger)extraLength
|
||||
{
|
||||
[self setLength: [self length]+extraLength];
|
||||
}
|
||||
|
@ -1903,7 +1906,7 @@ failure:
|
|||
* if you write a subclass of NSMutableData.
|
||||
* </p>
|
||||
*/
|
||||
- (void) setLength: (unsigned int)size
|
||||
- (void) setLength: (NSUInteger)size
|
||||
{
|
||||
[self subclassResponsibility: _cmd];
|
||||
}
|
||||
|
@ -1939,7 +1942,7 @@ failure:
|
|||
* necessary.
|
||||
*/
|
||||
- (void) appendBytes: (const void*)aBuffer
|
||||
length: (unsigned int)bufferSize
|
||||
length: (NSUInteger)bufferSize
|
||||
{
|
||||
unsigned oldLength = [self length];
|
||||
void* buffer;
|
||||
|
@ -1996,7 +1999,7 @@ failure:
|
|||
*/
|
||||
- (void) replaceBytesInRange: (NSRange)aRange
|
||||
withBytes: (const void*)bytes
|
||||
length: (unsigned int)length
|
||||
length: (NSUInteger)length
|
||||
{
|
||||
unsigned size = [self length];
|
||||
unsigned end = NSMaxRange(aRange);
|
||||
|
@ -2316,7 +2319,7 @@ failure:
|
|||
/**
|
||||
* New instance with given shared memory ID.
|
||||
*/
|
||||
+ (id) dataWithShmID: (int)anID length: (unsigned int)length
|
||||
+ (id) dataWithShmID: (int)anID length: (NSUInteger)length
|
||||
{
|
||||
#ifdef HAVE_SHMCTL
|
||||
NSDataShared *d;
|
||||
|
@ -2333,7 +2336,7 @@ failure:
|
|||
/**
|
||||
* New instance with given bytes in shared memory.
|
||||
*/
|
||||
+ (id) dataWithSharedBytes: (const void*)bytes length: (unsigned int)length
|
||||
+ (id) dataWithSharedBytes: (const void*)bytes length: (NSUInteger)length
|
||||
{
|
||||
NSData *d;
|
||||
|
||||
|
@ -2350,7 +2353,7 @@ failure:
|
|||
/**
|
||||
* Returns current capacity of data buffer.
|
||||
*/
|
||||
- (unsigned int) capacity
|
||||
- (NSUInteger) capacity
|
||||
{
|
||||
[self subclassResponsibility: _cmd];
|
||||
return 0;
|
||||
|
@ -2360,7 +2363,7 @@ failure:
|
|||
* Sets current capacity of data buffer. Unlike [-setLength:], this will
|
||||
* shrink the buffer if requested.
|
||||
*/
|
||||
- (id) setCapacity: (unsigned int)newCapacity
|
||||
- (id) setCapacity: (NSUInteger)newCapacity
|
||||
{
|
||||
[self subclassResponsibility: _cmd];
|
||||
return nil;
|
||||
|
@ -2467,7 +2470,7 @@ failure:
|
|||
}
|
||||
|
||||
- (id) initWithBytesNoCopy: (void*)aBuffer
|
||||
length: (unsigned int)bufferSize
|
||||
length: (NSUInteger)bufferSize
|
||||
freeWhenDone: (BOOL)shouldFree
|
||||
{
|
||||
bytes = aBuffer;
|
||||
|
@ -2494,7 +2497,7 @@ failure:
|
|||
memcpy(buffer, bytes + aRange.location, aRange.length);
|
||||
}
|
||||
|
||||
- (unsigned int) length
|
||||
- (NSUInteger) length
|
||||
{
|
||||
return length;
|
||||
}
|
||||
|
@ -2893,7 +2896,7 @@ getBytes(void* dst, void* src, unsigned len, unsigned limit, unsigned *pos)
|
|||
}
|
||||
|
||||
- (id) initWithBytesNoCopy: (void*)aBuffer
|
||||
length: (unsigned int)bufferSize
|
||||
length: (NSUInteger)bufferSize
|
||||
freeWhenDone: (BOOL)shouldFree
|
||||
{
|
||||
if (shouldFree == NO)
|
||||
|
@ -3026,7 +3029,7 @@ getBytes(void* dst, void* src, unsigned len, unsigned limit, unsigned *pos)
|
|||
[super dealloc];
|
||||
}
|
||||
|
||||
- (id) initWithBytes: (const void*)aBuffer length: (unsigned int)bufferSize
|
||||
- (id) initWithBytes: (const void*)aBuffer length: (NSUInteger)bufferSize
|
||||
{
|
||||
shmid = -1;
|
||||
if (aBuffer && bufferSize)
|
||||
|
@ -3056,7 +3059,7 @@ getBytes(void* dst, void* src, unsigned len, unsigned limit, unsigned *pos)
|
|||
return self;
|
||||
}
|
||||
|
||||
- (id) initWithShmID: (int)anId length: (unsigned int)bufferSize
|
||||
- (id) initWithShmID: (int)anId length: (NSUInteger)bufferSize
|
||||
{
|
||||
struct shmid_ds buf;
|
||||
|
||||
|
@ -3141,7 +3144,7 @@ getBytes(void* dst, void* src, unsigned len, unsigned limit, unsigned *pos)
|
|||
[super dealloc];
|
||||
}
|
||||
|
||||
- (id) initWithBytes: (const void*)aBuffer length: (unsigned int)bufferSize
|
||||
- (id) initWithBytes: (const void*)aBuffer length: (NSUInteger)bufferSize
|
||||
{
|
||||
self = [self initWithCapacity: bufferSize];
|
||||
if (self)
|
||||
|
@ -3156,7 +3159,7 @@ getBytes(void* dst, void* src, unsigned len, unsigned limit, unsigned *pos)
|
|||
}
|
||||
|
||||
- (id) initWithBytesNoCopy: (void*)aBuffer
|
||||
length: (unsigned int)bufferSize
|
||||
length: (NSUInteger)bufferSize
|
||||
freeWhenDone: (BOOL)shouldFree
|
||||
{
|
||||
if (aBuffer == 0)
|
||||
|
@ -3192,7 +3195,7 @@ getBytes(void* dst, void* src, unsigned len, unsigned limit, unsigned *pos)
|
|||
* Initialize with buffer capable of holding size bytes.
|
||||
* <init/>
|
||||
*/
|
||||
- (id) initWithCapacity: (unsigned int)size
|
||||
- (id) initWithCapacity: (NSUInteger)size
|
||||
{
|
||||
#if GS_WITH_GC
|
||||
zone = GSAtomicMallocZone();
|
||||
|
@ -3225,7 +3228,7 @@ getBytes(void* dst, void* src, unsigned len, unsigned limit, unsigned *pos)
|
|||
* Initialize with buffer capable of holding size bytes. Buffer is zeroed
|
||||
* out.
|
||||
*/
|
||||
- (id) initWithLength: (unsigned int)size
|
||||
- (id) initWithLength: (NSUInteger)size
|
||||
{
|
||||
self = [self initWithCapacity: size];
|
||||
if (self)
|
||||
|
@ -3256,7 +3259,7 @@ getBytes(void* dst, void* src, unsigned len, unsigned limit, unsigned *pos)
|
|||
}
|
||||
|
||||
- (void) appendBytes: (const void*)aBuffer
|
||||
length: (unsigned int)bufferSize
|
||||
length: (NSUInteger)bufferSize
|
||||
{
|
||||
unsigned oldLength = length;
|
||||
unsigned minimum = length + bufferSize;
|
||||
|
@ -3269,12 +3272,12 @@ getBytes(void* dst, void* src, unsigned len, unsigned limit, unsigned *pos)
|
|||
length = minimum;
|
||||
}
|
||||
|
||||
- (unsigned int) capacity
|
||||
- (NSUInteger) capacity
|
||||
{
|
||||
return capacity;
|
||||
}
|
||||
|
||||
- (void) _grow: (unsigned int)minimum
|
||||
- (void) _grow: (NSUInteger)minimum
|
||||
{
|
||||
if (minimum > capacity)
|
||||
{
|
||||
|
@ -3600,7 +3603,7 @@ getBytes(void* dst, void* src, unsigned len, unsigned limit, unsigned *pos)
|
|||
}
|
||||
}
|
||||
|
||||
- (id) setCapacity: (unsigned int)size
|
||||
- (id) setCapacity: (NSUInteger)size
|
||||
{
|
||||
if (size != capacity)
|
||||
{
|
||||
|
@ -3669,7 +3672,7 @@ getBytes(void* dst, void* src, unsigned len, unsigned limit, unsigned *pos)
|
|||
memcpy(bytes, [data bytes], length);
|
||||
}
|
||||
|
||||
- (void) setLength: (unsigned int)size
|
||||
- (void) setLength: (NSUInteger)size
|
||||
{
|
||||
if (size > capacity)
|
||||
{
|
||||
|
@ -3724,7 +3727,7 @@ getBytes(void* dst, void* src, unsigned len, unsigned limit, unsigned *pos)
|
|||
[super dealloc];
|
||||
}
|
||||
|
||||
- (id) initWithBytes: (const void*)aBuffer length: (unsigned int)bufferSize
|
||||
- (id) initWithBytes: (const void*)aBuffer length: (NSUInteger)bufferSize
|
||||
{
|
||||
self = [self initWithCapacity: bufferSize];
|
||||
if (self)
|
||||
|
@ -3736,7 +3739,7 @@ getBytes(void* dst, void* src, unsigned len, unsigned limit, unsigned *pos)
|
|||
return self;
|
||||
}
|
||||
|
||||
- (id) initWithCapacity: (unsigned int)bufferSize
|
||||
- (id) initWithCapacity: (NSUInteger)bufferSize
|
||||
{
|
||||
shmid = shmget(IPC_PRIVATE, bufferSize, IPC_CREAT|VM_ACCESS);
|
||||
if (shmid == -1) /* Created memory? */
|
||||
|
@ -3764,7 +3767,7 @@ getBytes(void* dst, void* src, unsigned len, unsigned limit, unsigned *pos)
|
|||
return self;
|
||||
}
|
||||
|
||||
- (id) initWithShmID: (int)anId length: (unsigned int)bufferSize
|
||||
- (id) initWithShmID: (int)anId length: (NSUInteger)bufferSize
|
||||
{
|
||||
struct shmid_ds buf;
|
||||
|
||||
|
@ -3798,7 +3801,7 @@ getBytes(void* dst, void* src, unsigned len, unsigned limit, unsigned *pos)
|
|||
return self;
|
||||
}
|
||||
|
||||
- (id) setCapacity: (unsigned int)size
|
||||
- (id) setCapacity: (NSUInteger)size
|
||||
{
|
||||
if (size != capacity)
|
||||
{
|
||||
|
|
|
@ -918,7 +918,7 @@ recover(int sig)
|
|||
}
|
||||
|
||||
void *
|
||||
NSFrameAddress(int offset)
|
||||
NSFrameAddress(NSUInteger offset)
|
||||
{
|
||||
jbuf_type *env;
|
||||
|
||||
|
@ -978,7 +978,7 @@ NSFrameAddress(int offset)
|
|||
return env->addr;
|
||||
}
|
||||
|
||||
unsigned NSCountFrames(void)
|
||||
NSUInteger NSCountFrames(void)
|
||||
{
|
||||
jbuf_type *env;
|
||||
|
||||
|
@ -1038,11 +1038,11 @@ done:
|
|||
signal(SIGBUS, env->bus);
|
||||
}
|
||||
|
||||
return (unsigned)(uintptr_t)env->addr;
|
||||
return (uintptr_t)env->addr;
|
||||
}
|
||||
|
||||
void *
|
||||
NSReturnAddress(int offset)
|
||||
NSReturnAddress(NSUInteger offset)
|
||||
{
|
||||
jbuf_type *env;
|
||||
|
||||
|
|
|
@ -378,7 +378,7 @@ GSDecimalNormalize(GSDecimal *n1, GSDecimal *n2, NSRoundingMode mode)
|
|||
l = MIN(NSDecimalMaxDigit - n1->length, n1->exponent - n2->exponent);
|
||||
for (i = 0; i < l; i++)
|
||||
{
|
||||
n1->cMantissa[(int)n1->length] = 0;
|
||||
n1->cMantissa[(NSInteger)n1->length] = 0;
|
||||
n1->length++;
|
||||
}
|
||||
n1->exponent = n2->exponent;
|
||||
|
@ -751,7 +751,7 @@ NSDecimalDivide(NSDecimal *result, const NSDecimal *l, const NSDecimal *rr,
|
|||
}
|
||||
|
||||
NSCalculationError
|
||||
NSDecimalPower(NSDecimal *result, const NSDecimal *n, unsigned power, NSRoundingMode mode)
|
||||
NSDecimalPower(NSDecimal *result, const NSDecimal *n, NSUInteger power, NSRoundingMode mode)
|
||||
{
|
||||
NSCalculationError error = NSCalculationNoError;
|
||||
unsigned int e = power;
|
||||
|
@ -1320,7 +1320,7 @@ NSDecimalCompare(const NSDecimal *leftOperand, const NSDecimal *rightOperand)
|
|||
}
|
||||
|
||||
void
|
||||
NSDecimalRound(NSDecimal *result, const NSDecimal *number, int scale,
|
||||
NSDecimalRound(NSDecimal *result, const NSDecimal *number, NSInteger scale,
|
||||
NSRoundingMode mode)
|
||||
{
|
||||
NSDecimalCopy(result, number);
|
||||
|
@ -1565,7 +1565,7 @@ GSSimpleDivide(NSDecimal *result, const NSDecimal *l, const NSDecimal *r,
|
|||
if (n1.exponent)
|
||||
{
|
||||
// Put back zeros removed by compacting
|
||||
n1.cMantissa[(int)n1.length] = 0;
|
||||
n1.cMantissa[(NSInteger)n1.length] = 0;
|
||||
n1.length++;
|
||||
n1.exponent--;
|
||||
}
|
||||
|
@ -1577,7 +1577,7 @@ GSSimpleDivide(NSDecimal *result, const NSDecimal *l, const NSDecimal *r,
|
|||
if (n1.length || l->cMantissa[used])
|
||||
{
|
||||
// only add 0 if there is already something
|
||||
n1.cMantissa[(int)n1.length] = l->cMantissa[used];
|
||||
n1.cMantissa[(NSInteger)n1.length] = l->cMantissa[used];
|
||||
n1.length++;
|
||||
}
|
||||
used++;
|
||||
|
@ -1591,7 +1591,7 @@ GSSimpleDivide(NSDecimal *result, const NSDecimal *l, const NSDecimal *r,
|
|||
break;
|
||||
}
|
||||
// Borrow one digit
|
||||
n1.cMantissa[(int)n1.length] = 0;
|
||||
n1.cMantissa[(NSInteger)n1.length] = 0;
|
||||
n1.length++;
|
||||
result->exponent--;
|
||||
}
|
||||
|
|
|
@ -476,7 +476,7 @@ static NSDecimalNumber *one;
|
|||
return [self initWithBytes: &d objCType: "d"];
|
||||
}
|
||||
|
||||
- (id) initWithInt: (signed int)value
|
||||
- (id) initWithInt: (int)value
|
||||
{
|
||||
if (value < 0)
|
||||
{
|
||||
|
@ -547,7 +547,7 @@ static NSDecimalNumber *one;
|
|||
isNegative: NO];
|
||||
}
|
||||
|
||||
- (id) initWithUnsignedInt: (unsigned int)value
|
||||
- (id) initWithUnsignedInt: (NSUInteger)value
|
||||
{
|
||||
return [self initWithMantissa: value
|
||||
exponent: 0
|
||||
|
@ -769,13 +769,13 @@ static NSDecimalNumber *one;
|
|||
return [NSDecimalNumber decimalNumberWithDecimal: result];
|
||||
}
|
||||
|
||||
- (NSDecimalNumber*) decimalNumberByRaisingToPower: (unsigned)power
|
||||
- (NSDecimalNumber*) decimalNumberByRaisingToPower: (NSUInteger)power
|
||||
{
|
||||
return [self decimalNumberByRaisingToPower: power
|
||||
withBehavior: [isa defaultBehavior]];
|
||||
}
|
||||
|
||||
- (NSDecimalNumber*) decimalNumberByRaisingToPower: (unsigned)power
|
||||
- (NSDecimalNumber*) decimalNumberByRaisingToPower: (NSUInteger)power
|
||||
withBehavior: (id <NSDecimalNumberBehaviors>)behavior
|
||||
{
|
||||
NSDecimal result;
|
||||
|
|
|
@ -174,7 +174,7 @@ static SEL appSel;
|
|||
*/
|
||||
- (id) initWithObjects: (id*)objects
|
||||
forKeys: (id*)keys
|
||||
count: (unsigned)count
|
||||
count: (NSUInteger)count
|
||||
{
|
||||
self = [self init];
|
||||
return self;
|
||||
|
@ -184,7 +184,7 @@ static SEL appSel;
|
|||
* Returns an unsigned integer which is the number of elements
|
||||
* stored in the dictionary.
|
||||
*/
|
||||
- (unsigned) count
|
||||
- (NSUInteger) count
|
||||
{
|
||||
[self subclassResponsibility: _cmd];
|
||||
return 0;
|
||||
|
@ -405,13 +405,13 @@ static SEL appSel;
|
|||
*/
|
||||
+ (id) dictionaryWithObjects: (id*)objects
|
||||
forKeys: (id*)keys
|
||||
count: (unsigned)count
|
||||
count: (NSUInteger)count
|
||||
{
|
||||
return AUTORELEASE([[self allocWithZone: NSDefaultMallocZone()]
|
||||
initWithObjects: objects forKeys: keys count: count]);
|
||||
}
|
||||
|
||||
- (unsigned) hash
|
||||
- (NSUInteger) hash
|
||||
{
|
||||
return [self count];
|
||||
}
|
||||
|
@ -877,7 +877,7 @@ compareIt(id o1, id o2, void* context)
|
|||
struct foo *f = (struct foo*)context;
|
||||
o1 = (*f->i)(f->d, @selector(objectForKey:), o1);
|
||||
o2 = (*f->i)(f->d, @selector(objectForKey:), o2);
|
||||
return (int)(intptr_t)[o1 performSelector: f->s withObject: o2];
|
||||
return (NSInteger)(intptr_t)[o1 performSelector: f->s withObject: o2];
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1081,7 +1081,7 @@ compareIt(id o1, id o2, void* context)
|
|||
* items are listed is undefined.
|
||||
*/
|
||||
- (NSString*) descriptionWithLocale: (NSDictionary*)locale
|
||||
indent: (unsigned int)level
|
||||
indent: (NSUInteger)level
|
||||
{
|
||||
NSMutableString *result = nil;
|
||||
|
||||
|
@ -1185,7 +1185,7 @@ compareIt(id o1, id o2, void* context)
|
|||
* and needs to be re-implemented in subclasses in order to have all
|
||||
* other initialisers work.
|
||||
*/
|
||||
- (id) initWithCapacity: (unsigned)numItems
|
||||
- (id) initWithCapacity: (NSUInteger)numItems
|
||||
{
|
||||
self = [self init];
|
||||
return self;
|
||||
|
@ -1218,7 +1218,7 @@ compareIt(id o1, id o2, void* context)
|
|||
* added, this can avoid the reallocate-and-copy process if the size of the
|
||||
* ultimate contents is known in advance.
|
||||
*/
|
||||
+ (id) dictionaryWithCapacity: (unsigned)numItems
|
||||
+ (id) dictionaryWithCapacity: (NSUInteger)numItems
|
||||
{
|
||||
return AUTORELEASE([[self allocWithZone: NSDefaultMallocZone()]
|
||||
initWithCapacity: numItems]);
|
||||
|
@ -1233,7 +1233,7 @@ compareIt(id o1, id o2, void* context)
|
|||
*/
|
||||
- (id) initWithObjects: (id*)objects
|
||||
forKeys: (id*)keys
|
||||
count: (unsigned)count
|
||||
count: (NSUInteger)count
|
||||
{
|
||||
self = [self initWithCapacity: count];
|
||||
if (self != nil)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
Copyright (C) 1998-2003 Free Software Foundation, Inc.
|
||||
Copyright (C) 1998-2009 Free Software Foundation, Inc.
|
||||
|
||||
Written by: Richard Frith-Macdonald <richard@brainstorm.co.uk>
|
||||
Created: October 1998
|
||||
|
@ -55,7 +55,7 @@
|
|||
object: (NSString*)object
|
||||
userInfo: (NSData*)info
|
||||
selector: (NSString*)aSelector
|
||||
to: (NSUInteger)observer;
|
||||
to: (uint64_t)observer;
|
||||
@end
|
||||
|
||||
/**
|
||||
|
@ -339,12 +339,12 @@ static NSDistributedNotificationCenter *netCenter = nil;
|
|||
NS_DURING
|
||||
{
|
||||
[self _connect];
|
||||
[(id<GDNCProtocol>)_remote addObserver: (NSUInteger)anObserver
|
||||
selector: NSStringFromSelector(aSelector)
|
||||
name: notificationName
|
||||
object: anObject
|
||||
suspensionBehavior: suspensionBehavior
|
||||
for: (id<GDNCClient>)self];
|
||||
[(id<GDNCProtocol>)_remote addObserver: (uint64_t)anObserver
|
||||
selector: NSStringFromSelector(aSelector)
|
||||
name: notificationName
|
||||
object: anObject
|
||||
suspensionBehavior: suspensionBehavior
|
||||
for: (id<GDNCClient>)self];
|
||||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
|
@ -465,10 +465,10 @@ static NSDistributedNotificationCenter *netCenter = nil;
|
|||
NS_DURING
|
||||
{
|
||||
[self _connect];
|
||||
[(id<GDNCProtocol>)_remote removeObserver: (NSUInteger)anObserver
|
||||
name: notificationName
|
||||
object: anObject
|
||||
for: (id<GDNCClient>)self];
|
||||
[(id<GDNCProtocol>)_remote removeObserver: (uint64_t)anObserver
|
||||
name: notificationName
|
||||
object: anObject
|
||||
for: (id<GDNCClient>)self];
|
||||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
|
@ -519,7 +519,7 @@ static NSDistributedNotificationCenter *netCenter = nil;
|
|||
* in the source where the '@protocol()' directive is used.
|
||||
*/
|
||||
@interface NSDistributedNotificationCenterDummy : NSObject <GDNCProtocol>
|
||||
- (void) addObserver: (NSUInteger)anObserver
|
||||
- (void) addObserver: (uint64_t)anObserver
|
||||
selector: (NSString*)aSelector
|
||||
name: (NSString*)notificationname
|
||||
object: (NSString*)anObject
|
||||
|
@ -531,7 +531,7 @@ static NSDistributedNotificationCenter *netCenter = nil;
|
|||
deliverImmediately: (BOOL)deliverImmediately
|
||||
for: (id<GDNCClient>)client;
|
||||
- (void) registerClient: (id<GDNCClient>)client;
|
||||
- (void) removeObserver: (NSUInteger)anObserver
|
||||
- (void) removeObserver: (uint64_t)anObserver
|
||||
name: (NSString*)notificationname
|
||||
object: (NSString*)anObject
|
||||
for: (id<GDNCClient>)client;
|
||||
|
@ -541,7 +541,7 @@ static NSDistributedNotificationCenter *netCenter = nil;
|
|||
@end
|
||||
|
||||
@implementation NSDistributedNotificationCenterDummy
|
||||
- (void) addObserver: (NSUInteger)anObserver
|
||||
- (void) addObserver: (uint64_t)anObserver
|
||||
selector: (NSString*)aSelector
|
||||
name: (NSString*)notificationname
|
||||
object: (NSString*)anObject
|
||||
|
@ -559,7 +559,7 @@ static NSDistributedNotificationCenter *netCenter = nil;
|
|||
- (void) registerClient: (id<GDNCClient>)client
|
||||
{
|
||||
}
|
||||
- (void) removeObserver: (NSUInteger)anObserver
|
||||
- (void) removeObserver: (uint64_t)anObserver
|
||||
name: (NSString*)notificationname
|
||||
object: (NSString*)anObject
|
||||
for: (id<GDNCClient>)client
|
||||
|
@ -804,7 +804,7 @@ static NSDistributedNotificationCenter *netCenter = nil;
|
|||
object: (NSString*)object
|
||||
userInfo: (NSData*)info
|
||||
selector: (NSString*)aSelector
|
||||
to: (NSUInteger)observer
|
||||
to: (uint64_t)observer
|
||||
{
|
||||
id userInfo;
|
||||
NSNotification *notification;
|
||||
|
|
|
@ -50,7 +50,7 @@ NSString* const NSCocoaErrorDomain = @"NSCocoaErrorDomain";
|
|||
@implementation NSError
|
||||
|
||||
+ (id) errorWithDomain: (NSString*)aDomain
|
||||
code: (int)aCode
|
||||
code: (NSInteger)aCode
|
||||
userInfo: (NSDictionary*)aDictionary
|
||||
{
|
||||
NSError *e = [self allocWithZone: NSDefaultMallocZone()];
|
||||
|
@ -59,7 +59,7 @@ NSString* const NSCocoaErrorDomain = @"NSCocoaErrorDomain";
|
|||
return AUTORELEASE(e);
|
||||
}
|
||||
|
||||
- (int) code
|
||||
- (NSInteger) code
|
||||
{
|
||||
return _code;
|
||||
}
|
||||
|
@ -133,7 +133,7 @@ NSString* const NSCocoaErrorDomain = @"NSCocoaErrorDomain";
|
|||
}
|
||||
|
||||
- (id) initWithDomain: (NSString*)aDomain
|
||||
code: (int)aCode
|
||||
code: (NSInteger)aCode
|
||||
userInfo: (NSDictionary*)aDictionary
|
||||
{
|
||||
if (aDomain == nil)
|
||||
|
|
|
@ -42,8 +42,6 @@
|
|||
#include <stdio.h>
|
||||
|
||||
|
||||
static NSUncaughtExceptionHandler *_NSUncaughtExceptionHandler;
|
||||
|
||||
#define _e_info (((id*)_reserved)[0])
|
||||
#define _e_stack (((id*)_reserved)[1])
|
||||
|
||||
|
@ -60,8 +58,8 @@ typedef struct { @defs(NSThread) } *TInfo;
|
|||
- (NSString*) description;
|
||||
- (NSEnumerator*) enumerator;
|
||||
- (NSMutableArray*) frames;
|
||||
- (id) frameAt: (unsigned)index;
|
||||
- (unsigned) frameCount;
|
||||
- (id) frameAt: (NSUInteger)index;
|
||||
- (NSUInteger) frameCount;
|
||||
- (id) initWithAddresses: (NSArray*)stack;
|
||||
- (NSEnumerator*) reverseEnumerator;
|
||||
|
||||
|
@ -152,8 +150,8 @@ GSPrivateBaseAddress(void *addr, void **base)
|
|||
address: (void*)address
|
||||
file: (NSString*)file
|
||||
function: (NSString*)function
|
||||
line: (int)lineNo;
|
||||
- (int) lineNumber;
|
||||
line: (NSInteger)lineNo;
|
||||
- (NSInteger) lineNumber;
|
||||
- (GSBinaryFileInfo*) module;
|
||||
|
||||
@end
|
||||
|
@ -216,7 +214,7 @@ GSPrivateBaseAddress(void *addr, void **base)
|
|||
address: (void*)address
|
||||
file: (NSString*)file
|
||||
function: (NSString*)function
|
||||
line: (int)lineNo
|
||||
line: (NSInteger)lineNo
|
||||
{
|
||||
_module = RETAIN(module);
|
||||
_address = address;
|
||||
|
@ -227,7 +225,7 @@ GSPrivateBaseAddress(void *addr, void **base)
|
|||
return self;
|
||||
}
|
||||
|
||||
- (int) lineNumber
|
||||
- (NSInteger) lineNumber
|
||||
{
|
||||
return _lineNo;
|
||||
}
|
||||
|
@ -552,12 +550,12 @@ GSListModules()
|
|||
return [frames objectEnumerator];
|
||||
}
|
||||
|
||||
- (id) frameAt: (unsigned)index
|
||||
- (id) frameAt: (NSUInteger)index
|
||||
{
|
||||
return [frames objectAtIndex: index];
|
||||
}
|
||||
|
||||
- (unsigned) frameCount
|
||||
- (NSUInteger) frameCount
|
||||
{
|
||||
return [frames count];
|
||||
}
|
||||
|
@ -724,6 +722,10 @@ _NSFoundationUncaughtExceptionHandler (NSException *exception)
|
|||
_terminate();
|
||||
}
|
||||
|
||||
static NSUncaughtExceptionHandler *_NSUncaughtExceptionHandler
|
||||
= _NSFoundationUncaughtExceptionHandler;
|
||||
|
||||
#if defined(_NATIVE_OBJC_EXCEPTIONS) && defined(HAVE_UNEXPECTED)
|
||||
static void
|
||||
callUncaughtHandler(id value)
|
||||
{
|
||||
|
@ -733,6 +735,8 @@ callUncaughtHandler(id value)
|
|||
}
|
||||
_NSFoundationUncaughtExceptionHandler(value);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@implementation NSException
|
||||
|
||||
|
|
|
@ -2015,7 +2015,7 @@ static NSStringEncoding defaultEncoding;
|
|||
(const GSNativeChar*)[path cStringUsingEncoding: defaultEncoding];
|
||||
}
|
||||
- (NSString*) stringWithFileSystemRepresentation: (const GSNativeChar*)string
|
||||
length: (unsigned int)len
|
||||
length: (NSUInteger)len
|
||||
{
|
||||
return AUTORELEASE([[NSString allocWithZone: NSDefaultMallocZone()]
|
||||
initWithBytes: string length: len encoding: defaultEncoding]);
|
||||
|
@ -2450,7 +2450,7 @@ static inline void gsedRelease(GSEnumeratedDirectory X)
|
|||
* Return the file posix permissions attribute (or NSNotFound if
|
||||
* the attribute is not present in the dictionary).
|
||||
*/
|
||||
- (unsigned long) filePosixPermissions
|
||||
- (NSUInteger) filePosixPermissions
|
||||
{
|
||||
NSNumber *n = [self objectForKey: NSFilePosixPermissions];
|
||||
|
||||
|
@ -2458,14 +2458,14 @@ static inline void gsedRelease(GSEnumeratedDirectory X)
|
|||
{
|
||||
return NSNotFound;
|
||||
}
|
||||
return [n unsignedLongValue];
|
||||
return [n unsignedIntegerValue];
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the file system number attribute (or NSNotFound if
|
||||
* the attribute is not present in the dictionary).
|
||||
*/
|
||||
- (unsigned long) fileSystemNumber
|
||||
- (NSUInteger) fileSystemNumber
|
||||
{
|
||||
NSNumber *n = [self objectForKey: NSFileSystemNumber];
|
||||
|
||||
|
@ -2473,14 +2473,14 @@ static inline void gsedRelease(GSEnumeratedDirectory X)
|
|||
{
|
||||
return NSNotFound;
|
||||
}
|
||||
return [n unsignedLongValue];
|
||||
return [n unsignedIntegerValue];
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the file system file identification number attribute
|
||||
* or NSNotFound if the attribute is not present in the dictionary).
|
||||
*/
|
||||
- (unsigned long) fileSystemFileNumber
|
||||
- (NSUInteger) fileSystemFileNumber
|
||||
{
|
||||
NSNumber *n = [self objectForKey: NSFileSystemFileNumber];
|
||||
|
||||
|
@ -2488,7 +2488,7 @@ static inline void gsedRelease(GSEnumeratedDirectory X)
|
|||
{
|
||||
return NSNotFound;
|
||||
}
|
||||
return [n unsignedLongValue];
|
||||
return [n unsignedIntegerValue];
|
||||
}
|
||||
@end
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@ static Class NSScannerClass = 0;
|
|||
static SEL scanFloatSel;
|
||||
static SEL scanStringSel;
|
||||
static SEL scannerSel;
|
||||
static BOOL (*scanFloatImp)(NSScanner*, SEL, float*);
|
||||
static BOOL (*scanFloatImp)(NSScanner*, SEL, CGFloat*);
|
||||
static BOOL (*scanStringImp)(NSScanner*, SEL, NSString*, NSString**);
|
||||
static id (*scannerImp)(Class, SEL, NSString*);
|
||||
|
||||
|
@ -60,10 +60,17 @@ setupCache(void)
|
|||
{
|
||||
NSStringClass = [NSString class];
|
||||
NSScannerClass = [NSScanner class];
|
||||
scanFloatSel = @selector(scanFloat:);
|
||||
if (sizeof(CGFloat) == sizeof(double))
|
||||
{
|
||||
scanFloatSel = @selector(scanDouble:);
|
||||
}
|
||||
else
|
||||
{
|
||||
scanFloatSel = @selector(scanFloat:);
|
||||
}
|
||||
scanStringSel = @selector(scanString:intoString:);
|
||||
scannerSel = @selector(scannerWithString:);
|
||||
scanFloatImp = (BOOL (*)(NSScanner*, SEL, float*))
|
||||
scanFloatImp = (BOOL (*)(NSScanner*, SEL, CGFloat*))
|
||||
[NSScannerClass instanceMethodForSelector: scanFloatSel];
|
||||
scanStringImp = (BOOL (*)(NSScanner*, SEL, NSString*, NSString**))
|
||||
[NSScannerClass instanceMethodForSelector: scanStringSel];
|
||||
|
@ -101,7 +108,7 @@ void
|
|||
NSDivideRect(NSRect aRect,
|
||||
NSRect *slice,
|
||||
NSRect *remainder,
|
||||
float amount,
|
||||
CGFloat amount,
|
||||
NSRectEdge edge)
|
||||
{
|
||||
static NSRect sRect;
|
||||
|
|
|
@ -164,9 +164,9 @@ typedef struct {
|
|||
return [this->_properties objectForKey: NSHTTPCookieValue];
|
||||
}
|
||||
|
||||
- (unsigned) version
|
||||
- (NSUInteger) version
|
||||
{
|
||||
return [[this->_properties objectForKey: NSHTTPCookieVersion] intValue];
|
||||
return [[this->_properties objectForKey: NSHTTPCookieVersion] integerValue];
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
@ -23,14 +23,15 @@
|
|||
|
||||
*/
|
||||
|
||||
#include <Foundation/NSByteOrder.h>
|
||||
#include <Foundation/NSData.h>
|
||||
#include <Foundation/NSException.h>
|
||||
#include <Foundation/NSHashTable.h>
|
||||
#include <Foundation/NSIndexPath.h>
|
||||
#include <Foundation/NSKeyedArchiver.h>
|
||||
#include <Foundation/NSLock.h>
|
||||
#include <Foundation/NSZone.h>
|
||||
#include "Foundation/NSObject.h"
|
||||
#include "Foundation/NSByteOrder.h"
|
||||
#include "Foundation/NSData.h"
|
||||
#include "Foundation/NSException.h"
|
||||
#include "Foundation/NSHashTable.h"
|
||||
#include "Foundation/NSIndexPath.h"
|
||||
#include "Foundation/NSKeyedArchiver.h"
|
||||
#include "Foundation/NSLock.h"
|
||||
#include "Foundation/NSZone.h"
|
||||
#include "GNUstepBase/GSLock.h"
|
||||
|
||||
static NSLock *lock = nil;
|
||||
|
@ -50,12 +51,12 @@ static NSIndexPath *dummy = nil;
|
|||
return [super allocWithZone: aZone];
|
||||
}
|
||||
|
||||
+ (id) indexPathWithIndex: (unsigned)anIndex
|
||||
+ (id) indexPathWithIndex: (NSUInteger)anIndex
|
||||
{
|
||||
return [self indexPathWithIndexes: &anIndex length: 1];
|
||||
}
|
||||
|
||||
+ (id) indexPathWithIndexes: (unsigned*)indexes length: (unsigned)length
|
||||
+ (id) indexPathWithIndexes: (NSUInteger*)indexes length: (NSUInteger)length
|
||||
{
|
||||
id o = [self allocWithZone: NSDefaultMallocZone()];
|
||||
|
||||
|
@ -80,10 +81,10 @@ static NSIndexPath *dummy = nil;
|
|||
{
|
||||
if (other != self)
|
||||
{
|
||||
unsigned olength = other->_length;
|
||||
unsigned *oindexes = other->_indexes;
|
||||
unsigned end = (_length > olength) ? _length : olength;
|
||||
unsigned pos;
|
||||
NSUInteger olength = other->_length;
|
||||
NSUInteger *oindexes = other->_indexes;
|
||||
NSUInteger end = (_length > olength) ? _length : olength;
|
||||
NSUInteger pos;
|
||||
|
||||
for (pos = 0; pos < end; pos++)
|
||||
{
|
||||
|
@ -133,7 +134,7 @@ static NSIndexPath *dummy = nil;
|
|||
- (NSString*) description
|
||||
{
|
||||
NSMutableString *m = [[super description] mutableCopy];
|
||||
unsigned i;
|
||||
NSUInteger i;
|
||||
|
||||
[m appendFormat: @"%u indexes [", _length];
|
||||
for (i = 0; i < _length; i++)
|
||||
|
@ -152,19 +153,19 @@ static NSIndexPath *dummy = nil;
|
|||
{
|
||||
if ([aCoder allowsKeyedCoding] == YES)
|
||||
{
|
||||
[aCoder encodeInt: (int)_length forKey: @"NSIndexPathLength"];
|
||||
[aCoder encodeInt: (NSInteger)_length forKey: @"NSIndexPathLength"];
|
||||
if (_length == 1)
|
||||
{
|
||||
[aCoder encodeInt: (int)_indexes[0] forKey: @"NSIndexPathValue"];
|
||||
[aCoder encodeInt: (NSInteger)_indexes[0] forKey: @"NSIndexPathValue"];
|
||||
}
|
||||
else if (_length > 1)
|
||||
{
|
||||
NSMutableData *m;
|
||||
unsigned *buf;
|
||||
unsigned i;
|
||||
NSUInteger *buf;
|
||||
NSUInteger i;
|
||||
|
||||
m = [NSMutableData new];
|
||||
[m setLength: _length * sizeof(unsigned)];
|
||||
[m setLength: _length * sizeof(NSUInteger)];
|
||||
buf = [m mutableBytes];
|
||||
for (i = 0; i < _length; i++)
|
||||
{
|
||||
|
@ -176,27 +177,27 @@ static NSIndexPath *dummy = nil;
|
|||
}
|
||||
else
|
||||
{
|
||||
[aCoder encodeValueOfObjCType: @encode(unsigned) at: &_length];
|
||||
[aCoder encodeValueOfObjCType: @encode(NSUInteger) at: &_length];
|
||||
if (_length > 0)
|
||||
{
|
||||
[aCoder encodeArrayOfObjCType: @encode(unsigned)
|
||||
[aCoder encodeArrayOfObjCType: @encode(NSUInteger)
|
||||
count: _length
|
||||
at: _indexes];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
- (void) getIndexes: (unsigned*)aBuffer
|
||||
- (void) getIndexes: (NSUInteger*)aBuffer
|
||||
{
|
||||
memcpy(aBuffer, _indexes, _length * sizeof(unsigned));
|
||||
memcpy(aBuffer, _indexes, _length * sizeof(NSUInteger));
|
||||
}
|
||||
|
||||
- (unsigned) hash
|
||||
- (NSUInteger) hash
|
||||
{
|
||||
return _hash;
|
||||
}
|
||||
|
||||
- (unsigned) indexAtPosition: (unsigned)position
|
||||
- (NSUInteger) indexAtPosition: (NSUInteger)position
|
||||
{
|
||||
if (position >= _length)
|
||||
{
|
||||
|
@ -208,9 +209,9 @@ static NSIndexPath *dummy = nil;
|
|||
/**
|
||||
* Return path formed by adding the index to the receiver.
|
||||
*/
|
||||
- (NSIndexPath *) indexPathByAddingIndex: (unsigned)anIndex
|
||||
- (NSIndexPath *) indexPathByAddingIndex: (NSUInteger)anIndex
|
||||
{
|
||||
unsigned buffer[_length + 1];
|
||||
NSUInteger buffer[_length + 1];
|
||||
|
||||
[self getIndexes: buffer];
|
||||
buffer[_length] = anIndex;
|
||||
|
@ -233,81 +234,83 @@ static NSIndexPath *dummy = nil;
|
|||
{
|
||||
if ([aCoder allowsKeyedCoding] == YES)
|
||||
{
|
||||
unsigned length;
|
||||
unsigned index;
|
||||
NSUInteger length;
|
||||
NSUInteger index;
|
||||
|
||||
length = (unsigned)[aCoder decodeIntForKey: @"NSIndexPathLength"];
|
||||
length = [aCoder decodeIntegerForKey: @"NSIndexPathLength"];
|
||||
if (length == 1)
|
||||
{
|
||||
index = (unsigned)[aCoder decodeIntForKey: @"NSIndexPathValue"];
|
||||
index = [aCoder decodeIntegerForKey: @"NSIndexPathValue"];
|
||||
self = [self initWithIndex: index];
|
||||
}
|
||||
else if (length > 1)
|
||||
{
|
||||
// FIXME ... not MacOS-X
|
||||
NSMutableData *d = [aCoder decodeObjectForKey: @"NSIndexPathData"];
|
||||
unsigned l = [d length];
|
||||
unsigned s = l / length;
|
||||
unsigned i;
|
||||
NSUInteger l = [d length];
|
||||
NSUInteger s = l / length;
|
||||
NSUInteger i;
|
||||
void *src = [d mutableBytes];
|
||||
NSUInteger *dst;
|
||||
|
||||
if (s == sizeof(unsigned))
|
||||
if (s == sizeof(NSUInteger))
|
||||
{
|
||||
unsigned *ptr = (unsigned*)[d mutableBytes];
|
||||
|
||||
for (i = 0; i < _length; i++)
|
||||
{
|
||||
ptr[i] = NSSwapBigIntToHost(ptr[i]);
|
||||
}
|
||||
self = [self initWithIndexes: ptr length: length];
|
||||
}
|
||||
dst = (NSUInteger*)src;
|
||||
}
|
||||
else
|
||||
{
|
||||
unsigned *buf;
|
||||
dst = (NSUInteger*)NSZoneMalloc(NSDefaultMallocZone(),
|
||||
length * sizeof(NSUInteger));
|
||||
}
|
||||
|
||||
buf = (unsigned*)NSZoneMalloc(NSDefaultMallocZone(),
|
||||
length * sizeof(unsigned));
|
||||
if (s == sizeof(long))
|
||||
{
|
||||
long *ptr = (long*)[d mutableBytes];
|
||||
if (s == sizeof(long))
|
||||
{
|
||||
long *ptr = (long*)src;
|
||||
|
||||
for (i = 0; i < _length; i++)
|
||||
{
|
||||
buf[i] = (unsigned)NSSwapBigLongToHost(ptr[i]);
|
||||
}
|
||||
}
|
||||
else if (s == sizeof(short))
|
||||
{
|
||||
short *ptr = (short*)[d mutableBytes];
|
||||
for (i = 0; i < _length; i++)
|
||||
{
|
||||
dst[i] = (NSUInteger)NSSwapBigLongToHost(ptr[i]);
|
||||
}
|
||||
}
|
||||
else if (s == sizeof(short))
|
||||
{
|
||||
short *ptr = (short*)src;
|
||||
|
||||
for (i = 0; i < _length; i++)
|
||||
{
|
||||
buf[i] = (unsigned)NSSwapBigShortToHost(ptr[i]);
|
||||
}
|
||||
}
|
||||
else if (s == sizeof(long long))
|
||||
{
|
||||
long long *ptr = (long long*)[d mutableBytes];
|
||||
for (i = 0; i < _length; i++)
|
||||
{
|
||||
dst[i] = (NSUInteger)NSSwapBigShortToHost(ptr[i]);
|
||||
}
|
||||
}
|
||||
else if (s == sizeof(long long))
|
||||
{
|
||||
long long *ptr = (long long*)src;
|
||||
|
||||
for (i = 0; i < _length; i++)
|
||||
{
|
||||
buf[i] = (unsigned)NSSwapBigLongLongToHost(ptr[i]);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
[NSException raise: NSGenericException format:
|
||||
@"Unable to decode unsigned integers of size %u", s];
|
||||
}
|
||||
self = [self initWithIndexes: buf length: length];
|
||||
NSZoneFree(NSDefaultMallocZone(), buf);
|
||||
for (i = 0; i < _length; i++)
|
||||
{
|
||||
dst[i] = (NSUInteger)NSSwapBigLongLongToHost(ptr[i]);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((void*)dst != src)
|
||||
{
|
||||
NSZoneFree(NSDefaultMallocZone(), dst);
|
||||
}
|
||||
[NSException raise: NSGenericException format:
|
||||
@"Unable to decode unsigned integers of size %u", s];
|
||||
}
|
||||
self = [self initWithIndexes: dst length: length];
|
||||
if ((void*)dst != src)
|
||||
{
|
||||
NSZoneFree(NSDefaultMallocZone(), dst);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
unsigned length;
|
||||
NSUInteger length;
|
||||
|
||||
[aCoder decodeValueOfObjCType: @encode(unsigned) at: &length];
|
||||
[aCoder decodeValueOfObjCType: @encode(NSUInteger) at: &length];
|
||||
if (length == 0)
|
||||
{
|
||||
RELEASE(self);
|
||||
|
@ -315,15 +318,15 @@ static NSIndexPath *dummy = nil;
|
|||
}
|
||||
else
|
||||
{
|
||||
unsigned buf[16];
|
||||
unsigned *indexes = buf;
|
||||
NSUInteger buf[16];
|
||||
NSUInteger *indexes = buf;
|
||||
|
||||
if (length > 16)
|
||||
{
|
||||
indexes = NSZoneMalloc(NSDefaultMallocZone(),
|
||||
length * sizeof(unsigned));
|
||||
length * sizeof(NSUInteger));
|
||||
}
|
||||
[aCoder decodeArrayOfObjCType: @encode(unsigned)
|
||||
[aCoder decodeArrayOfObjCType: @encode(NSUInteger)
|
||||
count: length
|
||||
at: indexes];
|
||||
self = [self initWithIndexes: indexes length: length];
|
||||
|
@ -336,7 +339,7 @@ static NSIndexPath *dummy = nil;
|
|||
return self;
|
||||
}
|
||||
|
||||
- (id) initWithIndex: (unsigned)anIndex
|
||||
- (id) initWithIndex: (NSUInteger)anIndex
|
||||
{
|
||||
return [self initWithIndexes: &anIndex length: 1];
|
||||
}
|
||||
|
@ -345,11 +348,11 @@ static NSIndexPath *dummy = nil;
|
|||
* Initialise the receiver to contain the specified indexes.<br />
|
||||
* May return an existing index path.
|
||||
*/
|
||||
- (id) initWithIndexes: (unsigned*)indexes length: (unsigned)length
|
||||
- (id) initWithIndexes: (NSUInteger*)indexes length: (NSUInteger)length
|
||||
{
|
||||
NSIndexPath *found;
|
||||
unsigned h = 0;
|
||||
unsigned i;
|
||||
NSUInteger h = 0;
|
||||
NSUInteger i;
|
||||
|
||||
if (_length != 0)
|
||||
{
|
||||
|
@ -377,8 +380,8 @@ static NSIndexPath *dummy = nil;
|
|||
_hash = dummy->_hash;
|
||||
_length = dummy->_length;
|
||||
_indexes = NSZoneMalloc(NSDefaultMallocZone(),
|
||||
_length * sizeof(unsigned));
|
||||
memcpy(_indexes, dummy->_indexes, _length * sizeof(unsigned));
|
||||
_length * sizeof(NSUInteger));
|
||||
memcpy(_indexes, dummy->_indexes, _length * sizeof(NSUInteger));
|
||||
NSHashInsert(shared, self);
|
||||
}
|
||||
else
|
||||
|
@ -406,8 +409,8 @@ static NSIndexPath *dummy = nil;
|
|||
}
|
||||
else
|
||||
{
|
||||
unsigned *oindexes = ((NSIndexPath*)other)->_indexes;
|
||||
unsigned pos = _length;
|
||||
NSUInteger *oindexes = ((NSIndexPath*)other)->_indexes;
|
||||
NSUInteger pos = _length;
|
||||
|
||||
while (pos-- > 0)
|
||||
{
|
||||
|
@ -420,7 +423,7 @@ static NSIndexPath *dummy = nil;
|
|||
return YES;
|
||||
}
|
||||
|
||||
- (unsigned) length
|
||||
- (NSUInteger) length
|
||||
{
|
||||
return _length;
|
||||
}
|
||||
|
|
|
@ -44,9 +44,9 @@ static void sanity(GSIArray array)
|
|||
{
|
||||
if (array != 0)
|
||||
{
|
||||
unsigned c = GSIArrayCount(array);
|
||||
unsigned i;
|
||||
unsigned last = 0;
|
||||
NSUInteger c = GSIArrayCount(array);
|
||||
NSUInteger i;
|
||||
NSUInteger last = 0;
|
||||
|
||||
for (i = 0; i < c; i++)
|
||||
{
|
||||
|
@ -70,11 +70,11 @@ static void sanity(GSIArray array)
|
|||
* index greater than the argument (or a position beyond the end of the
|
||||
* array).
|
||||
*/
|
||||
static unsigned posForIndex(GSIArray array, unsigned index)
|
||||
static NSUInteger posForIndex(GSIArray array, NSUInteger index)
|
||||
{
|
||||
unsigned int upper = GSIArrayCount(array);
|
||||
unsigned int lower = 0;
|
||||
unsigned int pos;
|
||||
NSUInteger upper = GSIArrayCount(array);
|
||||
NSUInteger lower = 0;
|
||||
NSUInteger pos;
|
||||
|
||||
/*
|
||||
* Binary search for an item equal to the one to be inserted.
|
||||
|
@ -116,7 +116,7 @@ static unsigned posForIndex(GSIArray array, unsigned index)
|
|||
return AUTORELEASE(o);
|
||||
}
|
||||
|
||||
+ (id) indexSetWithIndex: (unsigned int)anIndex
|
||||
+ (id) indexSetWithIndex: (NSUInteger)anIndex
|
||||
{
|
||||
id o = [self allocWithZone: NSDefaultMallocZone()];
|
||||
|
||||
|
@ -132,9 +132,9 @@ static unsigned posForIndex(GSIArray array, unsigned index)
|
|||
return AUTORELEASE(o);
|
||||
}
|
||||
|
||||
- (BOOL) containsIndex: (unsigned int)anIndex
|
||||
- (BOOL) containsIndex: (NSUInteger)anIndex
|
||||
{
|
||||
unsigned pos;
|
||||
NSUInteger pos;
|
||||
NSRange r;
|
||||
|
||||
if (_array == 0 || GSIArrayCount(_array) == 0
|
||||
|
@ -148,11 +148,11 @@ static unsigned posForIndex(GSIArray array, unsigned index)
|
|||
|
||||
- (BOOL) containsIndexes: (NSIndexSet*)aSet
|
||||
{
|
||||
unsigned count = _other ? GSIArrayCount(_other) : 0;
|
||||
NSUInteger count = _other ? GSIArrayCount(_other) : 0;
|
||||
|
||||
if (count > 0)
|
||||
{
|
||||
unsigned i;
|
||||
NSUInteger i;
|
||||
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
|
@ -169,7 +169,7 @@ static unsigned posForIndex(GSIArray array, unsigned index)
|
|||
|
||||
- (BOOL) containsIndexesInRange: (NSRange)aRange
|
||||
{
|
||||
unsigned pos;
|
||||
NSUInteger pos;
|
||||
NSRange r;
|
||||
|
||||
if (NSNotFound - aRange.length < aRange.location)
|
||||
|
@ -210,7 +210,7 @@ static unsigned posForIndex(GSIArray array, unsigned index)
|
|||
}
|
||||
}
|
||||
|
||||
- (unsigned int) count
|
||||
- (NSUInteger) count
|
||||
{
|
||||
if (_array == 0 || GSIArrayCount(_array) == 0)
|
||||
{
|
||||
|
@ -218,9 +218,9 @@ static unsigned posForIndex(GSIArray array, unsigned index)
|
|||
}
|
||||
else
|
||||
{
|
||||
unsigned count = GSIArrayCount(_array);
|
||||
unsigned total = 0;
|
||||
unsigned i = 0;
|
||||
NSUInteger count = GSIArrayCount(_array);
|
||||
NSUInteger total = 0;
|
||||
NSUInteger i = 0;
|
||||
|
||||
while (i < count)
|
||||
{
|
||||
|
@ -239,9 +239,9 @@ static unsigned posForIndex(GSIArray array, unsigned index)
|
|||
}
|
||||
else
|
||||
{
|
||||
unsigned count = GSIArrayCount(_array);
|
||||
unsigned total = 0;
|
||||
unsigned i = 0;
|
||||
NSUInteger count = GSIArrayCount(_array);
|
||||
NSUInteger total = 0;
|
||||
NSUInteger i = 0;
|
||||
|
||||
while (i < count)
|
||||
{
|
||||
|
@ -269,8 +269,8 @@ static unsigned posForIndex(GSIArray array, unsigned index)
|
|||
- (NSString*) description
|
||||
{
|
||||
NSMutableString *m;
|
||||
unsigned c = (_array == 0) ? 0 : GSIArrayCount(_array);
|
||||
unsigned i;
|
||||
NSUInteger c = (_array == 0) ? 0 : GSIArrayCount(_array);
|
||||
NSUInteger i;
|
||||
|
||||
if (c == 0)
|
||||
{
|
||||
|
@ -299,7 +299,7 @@ static unsigned posForIndex(GSIArray array, unsigned index)
|
|||
|
||||
- (void) encodeWithCoder: (NSCoder*)aCoder
|
||||
{
|
||||
unsigned rangeCount = 0;
|
||||
NSUInteger rangeCount = 0;
|
||||
|
||||
if (_array != 0)
|
||||
{
|
||||
|
@ -312,7 +312,7 @@ static unsigned posForIndex(GSIArray array, unsigned index)
|
|||
}
|
||||
else
|
||||
{
|
||||
[aCoder encodeValueOfObjCType: @encode(unsigned int)
|
||||
[aCoder encodeValueOfObjCType: @encode(NSUInteger)
|
||||
at: &rangeCount];
|
||||
}
|
||||
|
||||
|
@ -332,21 +332,21 @@ static unsigned posForIndex(GSIArray array, unsigned index)
|
|||
}
|
||||
else
|
||||
{
|
||||
[aCoder encodeValueOfObjCType: @encode(unsigned int)
|
||||
[aCoder encodeValueOfObjCType: @encode(NSUInteger)
|
||||
at: &r.location];
|
||||
[aCoder encodeValueOfObjCType: @encode(unsigned int)
|
||||
[aCoder encodeValueOfObjCType: @encode(NSUInteger)
|
||||
at: &r.length];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
NSMutableData *m = [NSMutableData dataWithCapacity: rangeCount*2];
|
||||
unsigned i;
|
||||
NSUInteger i;
|
||||
|
||||
for (i = 0; i < rangeCount; i++)
|
||||
{
|
||||
NSRange r;
|
||||
unsigned v;
|
||||
NSUInteger v;
|
||||
uint8_t b;
|
||||
|
||||
r = GSIArrayItemAtIndex(_array, i).ext;
|
||||
|
@ -392,7 +392,7 @@ static unsigned posForIndex(GSIArray array, unsigned index)
|
|||
}
|
||||
}
|
||||
|
||||
- (unsigned int) firstIndex
|
||||
- (NSUInteger) firstIndex
|
||||
{
|
||||
if (_array == 0 || GSIArrayCount(_array) == 0)
|
||||
{
|
||||
|
@ -401,12 +401,12 @@ static unsigned posForIndex(GSIArray array, unsigned index)
|
|||
return GSIArrayItemAtIndex(_array, 0).ext.location;
|
||||
}
|
||||
|
||||
- (unsigned int) getIndexes: (unsigned int*)aBuffer
|
||||
maxCount: (unsigned int)aCount
|
||||
inIndexRange: (NSRangePointer)aRange
|
||||
- (NSUInteger) getIndexes: (NSUInteger*)aBuffer
|
||||
maxCount: (NSUInteger)aCount
|
||||
inIndexRange: (NSRangePointer)aRange
|
||||
{
|
||||
unsigned pos;
|
||||
unsigned i = 0;
|
||||
NSUInteger pos;
|
||||
NSUInteger i = 0;
|
||||
NSRange r;
|
||||
NSRange fullRange;
|
||||
|
||||
|
@ -439,7 +439,7 @@ static unsigned posForIndex(GSIArray array, unsigned index)
|
|||
r = GSIArrayItemAtIndex(_array, pos).ext;
|
||||
if (aRange->location < r.location)
|
||||
{
|
||||
unsigned skip = r.location - aRange->location;
|
||||
NSUInteger skip = r.location - aRange->location;
|
||||
|
||||
if (skip > aRange->length)
|
||||
{
|
||||
|
@ -465,14 +465,14 @@ static unsigned posForIndex(GSIArray array, unsigned index)
|
|||
return i;
|
||||
}
|
||||
|
||||
- (unsigned int) hash
|
||||
- (NSUInteger) hash
|
||||
{
|
||||
return [self count];
|
||||
}
|
||||
|
||||
- (unsigned int) indexGreaterThanIndex: (unsigned int)anIndex
|
||||
- (NSUInteger) indexGreaterThanIndex: (NSUInteger)anIndex
|
||||
{
|
||||
unsigned pos;
|
||||
NSUInteger pos;
|
||||
NSRange r;
|
||||
|
||||
if (anIndex++ == NSNotFound)
|
||||
|
@ -492,9 +492,9 @@ static unsigned posForIndex(GSIArray array, unsigned index)
|
|||
return r.location;
|
||||
}
|
||||
|
||||
- (unsigned int) indexGreaterThanOrEqualToIndex: (unsigned int)anIndex
|
||||
- (NSUInteger) indexGreaterThanOrEqualToIndex: (NSUInteger)anIndex
|
||||
{
|
||||
unsigned pos;
|
||||
NSUInteger pos;
|
||||
NSRange r;
|
||||
|
||||
if (anIndex == NSNotFound)
|
||||
|
@ -514,9 +514,9 @@ static unsigned posForIndex(GSIArray array, unsigned index)
|
|||
return r.location;
|
||||
}
|
||||
|
||||
- (unsigned int) indexLessThanIndex: (unsigned int)anIndex
|
||||
- (NSUInteger) indexLessThanIndex: (NSUInteger)anIndex
|
||||
{
|
||||
unsigned pos;
|
||||
NSUInteger pos;
|
||||
NSRange r;
|
||||
|
||||
if (anIndex-- == 0)
|
||||
|
@ -541,9 +541,9 @@ static unsigned posForIndex(GSIArray array, unsigned index)
|
|||
return NSMaxRange(r) - 1;
|
||||
}
|
||||
|
||||
- (unsigned int) indexLessThanOrEqualToIndex: (unsigned int)anIndex
|
||||
- (NSUInteger) indexLessThanOrEqualToIndex: (NSUInteger)anIndex
|
||||
{
|
||||
unsigned pos;
|
||||
NSUInteger pos;
|
||||
NSRange r;
|
||||
|
||||
if (_array == 0 || GSIArrayCount(_array) == 0
|
||||
|
@ -571,7 +571,7 @@ static unsigned posForIndex(GSIArray array, unsigned index)
|
|||
|
||||
- (id) initWithCoder: (NSCoder*)aCoder
|
||||
{
|
||||
unsigned rangeCount = 0;
|
||||
NSUInteger rangeCount = 0;
|
||||
|
||||
if ([aCoder allowsKeyedCoding])
|
||||
{
|
||||
|
@ -582,7 +582,7 @@ static unsigned posForIndex(GSIArray array, unsigned index)
|
|||
}
|
||||
else
|
||||
{
|
||||
[aCoder decodeValueOfObjCType: @encode(unsigned int)
|
||||
[aCoder decodeValueOfObjCType: @encode(NSUInteger)
|
||||
at: &rangeCount];
|
||||
}
|
||||
|
||||
|
@ -592,8 +592,8 @@ static unsigned posForIndex(GSIArray array, unsigned index)
|
|||
}
|
||||
else if (rangeCount == 1)
|
||||
{
|
||||
unsigned len = 0;
|
||||
unsigned loc = 0;
|
||||
NSUInteger len = 0;
|
||||
NSUInteger loc = 0;
|
||||
|
||||
if ([aCoder allowsKeyedCoding])
|
||||
{
|
||||
|
@ -608,9 +608,9 @@ static unsigned posForIndex(GSIArray array, unsigned index)
|
|||
}
|
||||
else
|
||||
{
|
||||
[aCoder decodeValueOfObjCType: @encode(unsigned int)
|
||||
[aCoder decodeValueOfObjCType: @encode(NSUInteger)
|
||||
at: &loc];
|
||||
[aCoder decodeValueOfObjCType: @encode(unsigned int)
|
||||
[aCoder decodeValueOfObjCType: @encode(NSUInteger)
|
||||
at: &len];
|
||||
}
|
||||
self = [self initWithIndexesInRange: NSMakeRange(loc, len)];
|
||||
|
@ -620,8 +620,8 @@ static unsigned posForIndex(GSIArray array, unsigned index)
|
|||
NSMutableIndexSet *other = [NSMutableIndexSet new];
|
||||
NSData *data = nil;
|
||||
const uint8_t *bytes;
|
||||
unsigned length;
|
||||
unsigned index = 0;
|
||||
NSUInteger length;
|
||||
NSUInteger index = 0;
|
||||
|
||||
if ([aCoder allowsKeyedCoding])
|
||||
{
|
||||
|
@ -639,9 +639,9 @@ static unsigned posForIndex(GSIArray array, unsigned index)
|
|||
while (index < length)
|
||||
{
|
||||
NSRange range;
|
||||
unsigned offset;
|
||||
unsigned value;
|
||||
unsigned next;
|
||||
NSUInteger offset;
|
||||
NSUInteger value;
|
||||
NSUInteger next;
|
||||
|
||||
for (offset = 0; index + offset < length; offset++)
|
||||
{
|
||||
|
@ -697,7 +697,7 @@ static unsigned posForIndex(GSIArray array, unsigned index)
|
|||
return self;
|
||||
}
|
||||
|
||||
- (id) initWithIndex: (unsigned int)anIndex
|
||||
- (id) initWithIndex: (NSUInteger)anIndex
|
||||
{
|
||||
if (anIndex == NSNotFound)
|
||||
{
|
||||
|
@ -742,11 +742,11 @@ static unsigned posForIndex(GSIArray array, unsigned index)
|
|||
}
|
||||
else
|
||||
{
|
||||
unsigned count = _other ? GSIArrayCount(_other) : 0;
|
||||
NSUInteger count = _other ? GSIArrayCount(_other) : 0;
|
||||
|
||||
if (count > 0)
|
||||
{
|
||||
unsigned i;
|
||||
NSUInteger i;
|
||||
|
||||
#if GS_WITH_GC
|
||||
_data = (GSIArray)NSAllocateCollectable(sizeof(GSIArray_t),
|
||||
|
@ -767,8 +767,8 @@ static unsigned posForIndex(GSIArray array, unsigned index)
|
|||
|
||||
- (BOOL) intersectsIndexesInRange: (NSRange)aRange
|
||||
{
|
||||
unsigned p1;
|
||||
unsigned p2;
|
||||
NSUInteger p1;
|
||||
NSUInteger p2;
|
||||
|
||||
if (NSNotFound - aRange.length < aRange.location)
|
||||
{
|
||||
|
@ -813,7 +813,7 @@ static unsigned posForIndex(GSIArray array, unsigned index)
|
|||
|
||||
- (BOOL) isEqualToIndexSet: (NSIndexSet*)aSet
|
||||
{
|
||||
unsigned count = _other ? GSIArrayCount(_other) : 0;
|
||||
NSUInteger count = _other ? GSIArrayCount(_other) : 0;
|
||||
|
||||
if (count != (_array ? GSIArrayCount(_array) : 0))
|
||||
{
|
||||
|
@ -821,7 +821,7 @@ static unsigned posForIndex(GSIArray array, unsigned index)
|
|||
}
|
||||
if (count > 0)
|
||||
{
|
||||
unsigned i;
|
||||
NSUInteger i;
|
||||
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
|
@ -837,7 +837,7 @@ static unsigned posForIndex(GSIArray array, unsigned index)
|
|||
return YES;
|
||||
}
|
||||
|
||||
- (unsigned int) lastIndex
|
||||
- (NSUInteger) lastIndex
|
||||
{
|
||||
if (_array == 0 || GSIArrayCount(_array) == 0)
|
||||
{
|
||||
|
@ -861,18 +861,18 @@ static unsigned posForIndex(GSIArray array, unsigned index)
|
|||
#undef _other
|
||||
#define _other ((GSIArray)(((NSMutableIndexSet*)aSet)->_data))
|
||||
|
||||
- (void) addIndex: (unsigned int)anIndex
|
||||
- (void) addIndex: (NSUInteger)anIndex
|
||||
{
|
||||
[self addIndexesInRange: NSMakeRange(anIndex, 1)];
|
||||
}
|
||||
|
||||
- (void) addIndexes: (NSIndexSet*)aSet
|
||||
{
|
||||
unsigned count = _other ? GSIArrayCount(_other) : 0;
|
||||
NSUInteger count = _other ? GSIArrayCount(_other) : 0;
|
||||
|
||||
if (count > 0)
|
||||
{
|
||||
unsigned i;
|
||||
NSUInteger i;
|
||||
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
|
@ -885,7 +885,7 @@ static unsigned posForIndex(GSIArray array, unsigned index)
|
|||
|
||||
- (void) addIndexesInRange: (NSRange)aRange
|
||||
{
|
||||
unsigned pos;
|
||||
NSUInteger pos;
|
||||
|
||||
if (NSNotFound - aRange.length < aRange.location)
|
||||
{
|
||||
|
@ -991,18 +991,18 @@ static unsigned posForIndex(GSIArray array, unsigned index)
|
|||
}
|
||||
}
|
||||
|
||||
- (void) removeIndex: (unsigned int)anIndex
|
||||
- (void) removeIndex: (NSUInteger)anIndex
|
||||
{
|
||||
[self removeIndexesInRange: NSMakeRange(anIndex, 1)];
|
||||
}
|
||||
|
||||
- (void) removeIndexes: (NSIndexSet*)aSet
|
||||
{
|
||||
unsigned count = _other ? GSIArrayCount(_other) : 0;
|
||||
NSUInteger count = _other ? GSIArrayCount(_other) : 0;
|
||||
|
||||
if (count > 0)
|
||||
{
|
||||
unsigned i;
|
||||
NSUInteger i;
|
||||
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
|
@ -1015,7 +1015,7 @@ static unsigned posForIndex(GSIArray array, unsigned index)
|
|||
|
||||
- (void) removeIndexesInRange: (NSRange)aRange
|
||||
{
|
||||
unsigned pos;
|
||||
NSUInteger pos;
|
||||
NSRange r;
|
||||
|
||||
if (NSNotFound - aRange.length < aRange.location)
|
||||
|
@ -1126,12 +1126,12 @@ static unsigned posForIndex(GSIArray array, unsigned index)
|
|||
SANITY();
|
||||
}
|
||||
|
||||
- (void) shiftIndexesStartingAtIndex: (unsigned int)anIndex by: (int)amount
|
||||
- (void) shiftIndexesStartingAtIndex: (NSUInteger)anIndex by: (NSInteger)amount
|
||||
{
|
||||
if (amount != 0 && _array != 0 && GSIArrayCount(_array) > 0)
|
||||
{
|
||||
unsigned c;
|
||||
unsigned pos;
|
||||
NSUInteger c;
|
||||
NSUInteger pos;
|
||||
|
||||
if (amount > 0)
|
||||
{
|
||||
|
@ -1238,9 +1238,9 @@ static unsigned posForIndex(GSIArray array, unsigned index)
|
|||
@implementation NSIndexSet (NSCharacterSet)
|
||||
/* Extra method to let NSCharacterSet play with index sets more efficiently.
|
||||
*/
|
||||
- (unsigned int) _gapGreaterThanIndex: (unsigned int)anIndex
|
||||
- (NSUInteger) _gapGreaterThanIndex: (NSUInteger)anIndex
|
||||
{
|
||||
unsigned pos;
|
||||
NSUInteger pos;
|
||||
NSRange r;
|
||||
|
||||
if (anIndex++ == NSNotFound)
|
||||
|
@ -1290,7 +1290,7 @@ static unsigned posForIndex(GSIArray array, unsigned index)
|
|||
[super dealloc];
|
||||
}
|
||||
|
||||
- (id) _initWithBytes: (const void*)bytes length: (unsigned)length
|
||||
- (id) _initWithBytes: (const void*)bytes length: (NSUInteger)length
|
||||
{
|
||||
NSAssert(length % sizeof(NSRange) == 0, NSInvalidArgumentException);
|
||||
length /= sizeof(NSRange);
|
||||
|
|
|
@ -62,7 +62,7 @@
|
|||
|
||||
@implementation GSCodeBuffer
|
||||
|
||||
+ (GSCodeBuffer*) memoryWithSize: (unsigned)_size
|
||||
+ (GSCodeBuffer*) memoryWithSize: (NSUInteger)_size
|
||||
{
|
||||
return [[[self alloc] initWithSize: _size] autorelease];
|
||||
}
|
||||
|
@ -87,7 +87,7 @@
|
|||
[super dealloc];
|
||||
}
|
||||
|
||||
- (id) initWithSize: (unsigned)_size
|
||||
- (id) initWithSize: (NSUInteger)_size
|
||||
{
|
||||
#if defined(HAVE_MMAP)
|
||||
#if defined(HAVE_MPROTECT)
|
||||
|
@ -365,9 +365,9 @@ _arg_addr(NSInvocation *inv, int index)
|
|||
* so the actual method arguments start at index 2.
|
||||
*/
|
||||
- (void) getArgument: (void*)buffer
|
||||
atIndex: (int)index
|
||||
atIndex: (NSInteger)index
|
||||
{
|
||||
if ((unsigned)index >= _numArgs)
|
||||
if ((NSUInteger)index >= _numArgs)
|
||||
{
|
||||
[NSException raise: NSInvalidArgumentException
|
||||
format: @"bad invocation argument index"];
|
||||
|
@ -439,9 +439,9 @@ _arg_addr(NSInvocation *inv, int index)
|
|||
* receiver is retained by it.
|
||||
*/
|
||||
- (void) setArgument: (void*)buffer
|
||||
atIndex: (int)index
|
||||
atIndex: (NSInteger)index
|
||||
{
|
||||
if ((unsigned)index >= _numArgs)
|
||||
if ((NSUInteger)index >= _numArgs)
|
||||
{
|
||||
[NSException raise: NSInvalidArgumentException
|
||||
format: @"bad invocation argument index"];
|
||||
|
@ -999,19 +999,19 @@ _arg_addr(NSInvocation *inv, int index)
|
|||
CASE_TYPE(_C_SEL, SEL);
|
||||
CASE_TYPE(_C_LNG, long);
|
||||
CASE_TYPE(_C_ULNG, unsigned long);
|
||||
CASE_TYPE(_C_INT, int);
|
||||
CASE_TYPE(_C_UINT, unsigned int);
|
||||
CASE_TYPE(_C_INT, NSInteger);
|
||||
CASE_TYPE(_C_UINT, NSUInteger);
|
||||
case _C_SHT:
|
||||
*(short*)datum = (short)va_arg(ap, int);
|
||||
*(short*)datum = (short)va_arg(ap, NSInteger);
|
||||
break;
|
||||
case _C_USHT:
|
||||
*(unsigned short*)datum = (unsigned short)va_arg(ap, int);
|
||||
*(unsigned short*)datum = (unsigned short)va_arg(ap, NSInteger);
|
||||
break;
|
||||
case _C_CHR:
|
||||
*(char*)datum = (char)va_arg(ap, int);
|
||||
*(char*)datum = (char)va_arg(ap, NSInteger);
|
||||
break;
|
||||
case _C_UCHR:
|
||||
*(unsigned char*)datum = (unsigned char)va_arg(ap, int);
|
||||
*(unsigned char*)datum = (unsigned char)va_arg(ap, NSInteger);
|
||||
break;
|
||||
case _C_FLT:
|
||||
*(float*)datum = (float)va_arg(ap, double);
|
||||
|
@ -1025,7 +1025,7 @@ _arg_addr(NSInvocation *inv, int index)
|
|||
/* FIXME: This only appears on sparc and ppc machines so far.
|
||||
structures appear to be aligned on word boundaries.
|
||||
Hopefully there is a more general way to figure this out */
|
||||
size = (size<sizeof(int))?4:size;
|
||||
size = (size<sizeof(NSInteger))?4:size;
|
||||
#endif
|
||||
#endif
|
||||
NSLog(@"Unsafe handling of type of %d argument.", i-1);
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue