mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-21 04:32:03 +00:00
Many coding changes
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@6845 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
6238bbb2c5
commit
d5f4801280
28 changed files with 2439 additions and 2292 deletions
33
ChangeLog
33
ChangeLog
|
@ -1,3 +1,36 @@
|
||||||
|
2000-06-30 Richard Frith-Macdonald <rfm@gnu.org>
|
||||||
|
|
||||||
|
Coding/decoding modifications to make system more in line with
|
||||||
|
OPENSTEP/MacOS-X. Tidyup of global string constants. Advanced
|
||||||
|
development of DO rewrite.
|
||||||
|
* Headers/gnustep/base/DistributedObjects.h: removed obsolete info
|
||||||
|
* Headers/gnustep/base/GSConnection.h: improved and tidied
|
||||||
|
* Headers/gnustep/base/GSPortCoder.h: private method for connection
|
||||||
|
* Headers/gnustep/base/NSArchiver.h: remove libobjects compatibility
|
||||||
|
* Headers/gnustep/base/NSCoder.h: added libobjects compatibility
|
||||||
|
* Headers/gnustep/base/NSException.h: tidied
|
||||||
|
* Headers/gnustep/base/NSPortMessage.h: private method for connections
|
||||||
|
* Headers/gnustep/base/NSRunLoop.h: tidied string constants.
|
||||||
|
* Headers/gnustep/unicode/decomp.h: tidied to avoid compiler warning.
|
||||||
|
* Source/GSConnection.m: largely implemented (untested)
|
||||||
|
* Source/GSPortCoder.m: more efficient data coding
|
||||||
|
* Source/NSArchiver.m: moved global constants to externs.m
|
||||||
|
* Source/NSAttributedString.m: don't call super coding methods.
|
||||||
|
* Source/NSCoder.m: add libobjects compatibility
|
||||||
|
* Source/NSConnection.m: tidied a few bugs
|
||||||
|
* Source/NSDistantObject.m: don't call super coding methods.
|
||||||
|
* Source/NSGAttributedString.m: don't call super coding methods.
|
||||||
|
* Source/NSHost.m: don't call super coding methods.
|
||||||
|
* Source/NSNotification.m: don't call super coding methods.
|
||||||
|
* Source/NSObject.m: tidied a little
|
||||||
|
* Source/NSPort.m: moved global constants to externs.m
|
||||||
|
* Source/NSPortMessage.m: new access method for connections.
|
||||||
|
* Source/NSRunLoop.m: moved global constants to externs.m
|
||||||
|
* Source/NSTimeZone.m: don't call super coding methods.
|
||||||
|
* Source/NSURL.m: don't call super coding methods.
|
||||||
|
* Source/NSUnarchiver.m: tidied.
|
||||||
|
* Source/externs.m: Tdied and added new global constants.
|
||||||
|
|
||||||
2000-06-28 Adam Fedor <fedor@gnu.org>
|
2000-06-28 Adam Fedor <fedor@gnu.org>
|
||||||
|
|
||||||
Extension to force process args to be forwarded by the user.
|
Extension to force process args to be forwarded by the user.
|
||||||
|
|
|
@ -76,6 +76,8 @@ enum {
|
||||||
- (NSDistantObject*) localForObject: (id)object;
|
- (NSDistantObject*) localForObject: (id)object;
|
||||||
- (NSDistantObject*) localForTarget: (unsigned)target;
|
- (NSDistantObject*) localForTarget: (unsigned)target;
|
||||||
- (NSDistantObject*) proxyForTarget: (unsigned)target;
|
- (NSDistantObject*) proxyForTarget: (unsigned)target;
|
||||||
|
+ (void) removeLocalObject: (id)object;
|
||||||
|
- (void) removeLocalObject: (id)object;
|
||||||
- (void) retainTarget: (unsigned)target;
|
- (void) retainTarget: (unsigned)target;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
|
|
@ -34,6 +34,7 @@
|
||||||
|
|
||||||
@class NSDistantObject;
|
@class NSDistantObject;
|
||||||
@class NSPort;
|
@class NSPort;
|
||||||
|
@class NSPortNameServer;
|
||||||
@class NSData;
|
@class NSData;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -49,6 +50,7 @@ GS_EXPORT NSString *NSConnectionLocalCount; /* Objects sent out */
|
||||||
GS_EXPORT NSString *NSConnectionProxyCount; /* Objects received */
|
GS_EXPORT NSString *NSConnectionProxyCount; /* Objects received */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* NSConnection class interface.
|
* NSConnection class interface.
|
||||||
*
|
*
|
||||||
|
@ -57,24 +59,29 @@ GS_EXPORT NSString *NSConnectionProxyCount; /* Objects received */
|
||||||
@interface NSConnection : NSObject
|
@interface NSConnection : NSObject
|
||||||
{
|
{
|
||||||
@private
|
@private
|
||||||
BOOL is_valid;
|
BOOL _isValid;
|
||||||
BOOL independent_queueing;
|
BOOL _independentQueueing;
|
||||||
unsigned request_depth;
|
BOOL _authenticateIn;
|
||||||
NSPort *receive_port;
|
BOOL _authenticateOut;
|
||||||
NSPort *send_port;
|
NSPort *_receivePort;
|
||||||
unsigned message_count;
|
NSPort *_sendPort;
|
||||||
unsigned req_out_count;
|
unsigned _requestDepth;
|
||||||
unsigned req_in_count;
|
unsigned _messageCount;
|
||||||
unsigned rep_out_count;
|
unsigned _reqOutCount;
|
||||||
unsigned rep_in_count;
|
unsigned _reqInCount;
|
||||||
NSMapTable *local_objects;
|
unsigned _repOutCount;
|
||||||
NSMapTable *local_targets;
|
unsigned _repInCount;
|
||||||
NSMapTable *remote_proxies;
|
NSMapTable *_localObjects;
|
||||||
NSTimeInterval reply_timeout;
|
NSMapTable *_localTargets;
|
||||||
NSTimeInterval request_timeout;
|
NSMapTable *_remoteProxies;
|
||||||
id delegate;
|
NSMapTable *_replyMap;
|
||||||
NSMutableArray *request_modes;
|
NSTimeInterval _replyTimeout;
|
||||||
NSMutableArray *run_loops;
|
NSTimeInterval _requestTimeout;
|
||||||
|
NSMutableArray *_requestModes;
|
||||||
|
NSMutableArray *_runLoops;
|
||||||
|
NSMutableArray *_requestQueue;
|
||||||
|
id _delegate;
|
||||||
|
NSRecursiveLock *_refGate;
|
||||||
}
|
}
|
||||||
|
|
||||||
+ (NSArray*) allConnections;
|
+ (NSArray*) allConnections;
|
||||||
|
@ -106,6 +113,7 @@ GS_EXPORT NSString *NSConnectionProxyCount; /* Objects received */
|
||||||
- (BOOL) multipleThreadsEnabled;
|
- (BOOL) multipleThreadsEnabled;
|
||||||
- (NSPort*) receivePort;
|
- (NSPort*) receivePort;
|
||||||
- (BOOL) registerName: (NSString*)name;
|
- (BOOL) registerName: (NSString*)name;
|
||||||
|
- (BOOL) registerName: (NSString*)name withNameServer: (NSPortNameServer*)svr;
|
||||||
- (NSArray*) remoteObjects;
|
- (NSArray*) remoteObjects;
|
||||||
- (void) removeRequestMode: (NSString*)mode;
|
- (void) removeRequestMode: (NSString*)mode;
|
||||||
- (void) removeRunLoop: (NSRunLoop *)runloop;
|
- (void) removeRunLoop: (NSRunLoop *)runloop;
|
||||||
|
@ -134,67 +142,6 @@ GS_EXPORT NSString *NSConnectionProxyCount; /* Objects received */
|
||||||
|
|
||||||
- (void) gcFinalize;
|
- (void) gcFinalize;
|
||||||
|
|
||||||
/* Registering your server object on the network.
|
|
||||||
These methods create a new connection object that must be "run" in order
|
|
||||||
to start handling requests from clients.
|
|
||||||
These method names may change when we get the capability to register
|
|
||||||
ports with names after the ports have been created. */
|
|
||||||
/* I want the second method name to clearly indicate that we're not
|
|
||||||
connecting to a pre-existing registration name, we're registering a
|
|
||||||
new name, and this method will fail if that name has already been
|
|
||||||
registered. This is why I don't like "newWithRegisteredName:" ---
|
|
||||||
it's unclear if we're connecting to another NSConnection that already
|
|
||||||
registered with that name. */
|
|
||||||
+ (NSConnection*) newWithRootObject: anObj;
|
|
||||||
+ (NSConnection*) newRegisteringAtName: (NSString*)n
|
|
||||||
withRootObject: anObj;
|
|
||||||
+ (NSConnection*) newRegisteringAtName: (NSString*)n
|
|
||||||
atPort: (int)portn
|
|
||||||
withRootObject: anObj;
|
|
||||||
|
|
||||||
/* Get a proxy to a remote server object.
|
|
||||||
A new connection is created if necessary. */
|
|
||||||
+ (NSDistantObject*) rootProxyAtName: (NSString*)name
|
|
||||||
onHost: (NSString*)host;
|
|
||||||
+ (NSDistantObject*) rootProxyAtName: (NSString*)name;
|
|
||||||
+ (NSDistantObject*) rootProxyAtPort: (NSPort*)anOutPort;
|
|
||||||
+ (NSDistantObject*) rootProxyAtPort: (NSPort*)anOutPort
|
|
||||||
withInPort: (NSPort*)anInPort;
|
|
||||||
|
|
||||||
/* This is the designated initializer for the NSConnection class.
|
|
||||||
You don't need to call it yourself. */
|
|
||||||
+ (NSConnection*) newForInPort: (NSPort*)anInPort
|
|
||||||
outPort: (NSPort*)anOutPort
|
|
||||||
ancestorConnection: (NSConnection*)ancestor;
|
|
||||||
|
|
||||||
/* Make a connection object start listening for incoming requests. After
|
|
||||||
after DATE. */
|
|
||||||
- (void) runConnectionUntilDate: date;
|
|
||||||
|
|
||||||
/* Same as above, but never time out. */
|
|
||||||
- (void) runConnection;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* For getting the root object of a connection or port */
|
|
||||||
+ rootObjectForInPort: (NSPort*)aPort;
|
|
||||||
|
|
||||||
/* Used for setting the root object of a connection that we
|
|
||||||
created without one, or changing the root object of a connection
|
|
||||||
that already has one. */
|
|
||||||
+ (void) setRootObject: anObj forInPort: (NSPort*)aPort;
|
|
||||||
|
|
||||||
/* Only subclassers and power-users need worry about these */
|
|
||||||
- (void) addProxy: (NSDistantObject*)aProxy;
|
|
||||||
- (id) includesProxyForTarget: (gsu32)target;
|
|
||||||
- (void) removeProxy: (NSDistantObject*)aProxy;
|
|
||||||
|
|
||||||
// It seems to be a non pure-OPENSTEP definition...
|
|
||||||
//
|
|
||||||
// new def :
|
|
||||||
- (void) addLocalObject: anObj;
|
|
||||||
- (id) includesLocalObject: anObj;
|
|
||||||
- (void) removeLocalObject: anObj;
|
|
||||||
- (retval_t) forwardForProxy: (NSDistantObject*)object
|
- (retval_t) forwardForProxy: (NSDistantObject*)object
|
||||||
selector: (SEL)sel
|
selector: (SEL)sel
|
||||||
argFrame: (arglist_t)frame;
|
argFrame: (arglist_t)frame;
|
||||||
|
@ -205,23 +152,23 @@ GS_EXPORT NSString *NSConnectionProxyCount; /* Objects received */
|
||||||
GS_EXPORT NSString *ConnectionBecameInvalidNotification;
|
GS_EXPORT NSString *ConnectionBecameInvalidNotification;
|
||||||
|
|
||||||
@interface Object (NSConnectionDelegate)
|
@interface Object (NSConnectionDelegate)
|
||||||
- (BOOL) connection: (NSConnection*)parent
|
|
||||||
shouldMakeNewConnection: (NSConnection*)newConnection;
|
|
||||||
/*
|
/*
|
||||||
* This method may be used to ask a delegates permission to create
|
* This method may be used to ask a delegates permission to create
|
||||||
* a new connection from the old one.
|
* a new connection from the old one.
|
||||||
* This method should be implemented in preference to the
|
* This method should be implemented in preference to the
|
||||||
* [makeNewConnection:sender:] which is obsolete.
|
* [makeNewConnection:sender:] which is obsolete.
|
||||||
*/
|
*/
|
||||||
- (BOOL) makeNewConnection: (NSConnection*)newConnection
|
- (BOOL) connection: (NSConnection*)parent
|
||||||
sender: (NSConnection*)parent;
|
shouldMakeNewConnection: (NSConnection*)newConnection;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This is the old way of doing the same thing as
|
* This is the old way of doing the same thing as
|
||||||
* [connection:shouldMakeNewConnection:]
|
* [connection:shouldMakeNewConnection:]
|
||||||
* It is obsolete - don't use it.
|
* It is obsolete - don't use it.
|
||||||
*/
|
*/
|
||||||
- (NSConnection*) connection: (NSConnection*)ancestorConn
|
- (BOOL) makeNewConnection: (NSConnection*)newConnection
|
||||||
didConnect: (NSConnection*)newConn;
|
sender: (NSConnection*)parent;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If the delegate responds to this method, it will be used to ask the
|
* If the delegate responds to this method, it will be used to ask the
|
||||||
* delegate's permission to establish a new connection from the old one.
|
* delegate's permission to establish a new connection from the old one.
|
||||||
|
@ -230,6 +177,14 @@ GS_EXPORT NSString *ConnectionBecameInvalidNotification;
|
||||||
* This is a GNUstep extension
|
* This is a GNUstep extension
|
||||||
* Normally return newConn.
|
* Normally return newConn.
|
||||||
*/
|
*/
|
||||||
|
- (NSConnection*) connection: (NSConnection*)ancestorConn
|
||||||
|
didConnect: (NSConnection*)newConn;
|
||||||
|
|
||||||
|
|
||||||
|
- (BOOL) authenticateComponents: (NSArray*)components
|
||||||
|
withData: (NSData*)authenticationData;
|
||||||
|
- (NSData*) authenticationDataForComponents: (NSArray*)components;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@interface Object (NSPortCoder)
|
@interface Object (NSPortCoder)
|
||||||
|
@ -254,11 +209,6 @@ GS_EXPORT NSString *ConnectionBecameInvalidNotification;
|
||||||
* To force bycopy, an object should return itsself.
|
* To force bycopy, an object should return itsself.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
- (BOOL) authenticateComponents: (NSArray*)components
|
|
||||||
withData: (NSData*)authenticationData;
|
|
||||||
- (NSData*) authenticationDataForComponents: (NSArray*)components;
|
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
#define CONNECTION_DEFAULT_TIMEOUT 15.0 /* in seconds */
|
#define CONNECTION_DEFAULT_TIMEOUT 15.0 /* in seconds */
|
||||||
|
@ -268,6 +218,7 @@ GS_EXPORT NSString *ConnectionBecameInvalidNotification;
|
||||||
*/
|
*/
|
||||||
GS_EXPORT NSString *NSConnectionReplyMode;
|
GS_EXPORT NSString *NSConnectionReplyMode;
|
||||||
GS_EXPORT NSString *NSConnectionDidDieNotification;
|
GS_EXPORT NSString *NSConnectionDidDieNotification;
|
||||||
GS_EXPORT NSString *NSConnectionDidInitializeNotification; /* OPENSTEP*/
|
GS_EXPORT NSString *NSConnectionDidInitializeNotification; /* OPENSTEP */
|
||||||
|
GS_EXPORT NSString *NSFailedAuthenticationException; /* MacOS-X */
|
||||||
|
|
||||||
#endif /* __NSConnection_h_GNUSTEP_BASE_INCLUDE */
|
#endif /* __NSConnection_h_GNUSTEP_BASE_INCLUDE */
|
||||||
|
|
|
@ -95,7 +95,7 @@
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@interface NSPortCoder (Private)
|
@interface NSPortCoder (Private)
|
||||||
- (NSArray*) _components;
|
- (NSMutableArray*) _components;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -130,21 +130,6 @@
|
||||||
classes: (unsigned)classCount
|
classes: (unsigned)classCount
|
||||||
objects: (unsigned)objectCount
|
objects: (unsigned)objectCount
|
||||||
pointers: (unsigned)pointerCount;
|
pointers: (unsigned)pointerCount;
|
||||||
|
|
||||||
/* libObjects compatibility */
|
|
||||||
- (void) encodeArrayOfObjCType: (const char*) type
|
|
||||||
count: (unsigned)count
|
|
||||||
at: (const void*)buf
|
|
||||||
withName: (id)name;
|
|
||||||
- (void) encodeIndent;
|
|
||||||
- (void) encodeValueOfCType: (const char*) type
|
|
||||||
at: (const void*)buf
|
|
||||||
withName: (id)name;
|
|
||||||
- (void) encodeValueOfObjCType: (const char*) type
|
|
||||||
at: (const void*)buf
|
|
||||||
withName: (id)name;
|
|
||||||
- (void) encodeObject: (id)anObject
|
|
||||||
withName: (id)name;
|
|
||||||
@end
|
@end
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -250,26 +235,11 @@
|
||||||
classes: (unsigned*)classCount
|
classes: (unsigned*)classCount
|
||||||
objects: (unsigned*)objectCount
|
objects: (unsigned*)objectCount
|
||||||
pointers: (unsigned*)pointerCount;
|
pointers: (unsigned*)pointerCount;
|
||||||
|
|
||||||
/* Compatibility with libObjects */
|
|
||||||
- (void) decodeArrayOfObjCType: (const char*) type
|
|
||||||
count: (unsigned)count
|
|
||||||
at: (void*)buf
|
|
||||||
withName: (id*)name;
|
|
||||||
- (void) decodeIndent;
|
|
||||||
- (void) decodeValueOfCType: (const char*) type
|
|
||||||
at: (void*)buf
|
|
||||||
withName: (id*)name;
|
|
||||||
- (void) decodeValueOfObjCType: (const char*) type
|
|
||||||
at: (void*)buf
|
|
||||||
withName: (id*)name;
|
|
||||||
- (void) decodeObjectAt: (id*)anObject
|
|
||||||
withName: (id*)name;
|
|
||||||
@end
|
@end
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* Exceptions */
|
/* Exceptions */
|
||||||
GS_EXPORT NSString *NSInconsistentArchiveException;
|
GS_EXPORT NSString* const NSInconsistentArchiveException;
|
||||||
|
|
||||||
#endif /* __NSArchiver_h_GNUSTEP_BASE_INCLUDE */
|
#endif /* __NSArchiver_h_GNUSTEP_BASE_INCLUDE */
|
||||||
|
|
|
@ -88,9 +88,34 @@
|
||||||
|
|
||||||
#ifndef NO_GNUSTEP
|
#ifndef NO_GNUSTEP
|
||||||
|
|
||||||
#include <base/Coding.h>
|
@interface NSCoder (GNUstep)
|
||||||
#include <Foundation/NSCoder.h>
|
/* Compatibility with libObjects */
|
||||||
@interface NSCoder (GNU) <Encoding, Decoding>
|
- (void) decodeArrayOfObjCType: (const char*)type
|
||||||
|
count: (unsigned)count
|
||||||
|
at: (void*)buf
|
||||||
|
withName: (id*)name;
|
||||||
|
- (void) decodeIndent;
|
||||||
|
- (void) decodeObjectAt: (id*)anObject
|
||||||
|
withName: (id*)name;
|
||||||
|
- (void) decodeValueOfCType: (const char*)type
|
||||||
|
at: (void*)buf
|
||||||
|
withName: (id*)name;
|
||||||
|
- (void) decodeValueOfObjCType: (const char*)type
|
||||||
|
at: (void*)buf
|
||||||
|
withName: (id*)name;
|
||||||
|
- (void) encodeArrayOfObjCType: (const char*)type
|
||||||
|
count: (unsigned)count
|
||||||
|
at: (const void*)buf
|
||||||
|
withName: (id)name;
|
||||||
|
- (void) encodeIndent;
|
||||||
|
- (void) encodeObject: (id)anObject
|
||||||
|
withName: (id)name;
|
||||||
|
- (void) encodeValueOfCType: (const char*)type
|
||||||
|
at: (const void*)buf
|
||||||
|
withName: (id)name;
|
||||||
|
- (void) encodeValueOfObjCType: (const char*)type
|
||||||
|
at: (const void*)buf
|
||||||
|
withName: (id)name;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
#endif /* NO_GNUSTEP */
|
#endif /* NO_GNUSTEP */
|
||||||
|
|
|
@ -59,13 +59,12 @@
|
||||||
@end
|
@end
|
||||||
|
|
||||||
/* Common exceptions */
|
/* Common exceptions */
|
||||||
GS_EXPORT NSString *NSInconsistentArchiveException;
|
GS_EXPORT NSString* const NSGenericException;
|
||||||
GS_EXPORT NSString *NSGenericException;
|
GS_EXPORT NSString* const NSInternalInconsistencyException;
|
||||||
GS_EXPORT NSString *NSInternalInconsistencyException;
|
GS_EXPORT NSString* const NSInvalidArgumentException;
|
||||||
GS_EXPORT NSString *NSInvalidArgumentException;
|
GS_EXPORT NSString* const NSMallocException;
|
||||||
GS_EXPORT NSString *NSMallocException;
|
GS_EXPORT NSString* const NSRangeException;
|
||||||
GS_EXPORT NSString *NSRangeException;
|
GS_EXPORT NSString* const NSCharacterConversionException;
|
||||||
GS_EXPORT NSString *NSCharacterConversionException;
|
|
||||||
|
|
||||||
/* Exception handler definitions */
|
/* Exception handler definitions */
|
||||||
typedef struct _NSHandler
|
typedef struct _NSHandler
|
||||||
|
|
|
@ -44,11 +44,12 @@
|
||||||
- (NSPort*) receivePort;
|
- (NSPort*) receivePort;
|
||||||
- (void) setMsgid: (unsigned)anId;
|
- (void) setMsgid: (unsigned)anId;
|
||||||
- (unsigned) msgid;
|
- (unsigned) msgid;
|
||||||
|
|
||||||
#ifndef NO_GNUSTEP
|
|
||||||
- (void) addComponent: (id)aComponent;
|
|
||||||
#endif
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
#ifndef NO_GNUSTEP
|
||||||
|
@interface NSPortMessage (private)
|
||||||
|
- (NSMutableArray*) _components;
|
||||||
|
@end
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
@class NSTimer, NSDate, NSPort;
|
@class NSTimer, NSDate, NSPort;
|
||||||
|
|
||||||
/* Mode strings. */
|
/* Mode strings. */
|
||||||
GS_EXPORT id NSDefaultRunLoopMode;
|
GS_EXPORT NSString* const NSDefaultRunLoopMode;
|
||||||
|
|
||||||
@interface NSRunLoop : NSObject <GCFinalization>
|
@interface NSRunLoop : NSObject <GCFinalization>
|
||||||
{
|
{
|
||||||
|
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -399,10 +399,27 @@ typeCheck(char t1, char t2)
|
||||||
|
|
||||||
- (NSData*) decodeDataObject
|
- (NSData*) decodeDataObject
|
||||||
{
|
{
|
||||||
unsigned pos;
|
int pos;
|
||||||
|
|
||||||
[self decodeValueOfObjCType: @encode(unsigned) at: &pos];
|
[self decodeValueOfObjCType: @encode(int) at: &pos];
|
||||||
return [_comp objectAtIndex: pos];
|
if (pos >= 0)
|
||||||
|
{
|
||||||
|
return [_comp objectAtIndex: pos];
|
||||||
|
}
|
||||||
|
else if (pos == -1)
|
||||||
|
{
|
||||||
|
return nil;
|
||||||
|
}
|
||||||
|
else if (pos == -2)
|
||||||
|
{
|
||||||
|
return [NSData data];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
[NSException raise: NSInternalInconsistencyException
|
||||||
|
format: @"Bad tag (%d) decoding data object", pos];
|
||||||
|
return nil;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSPort*) decodePortObject
|
- (NSPort*) decodePortObject
|
||||||
|
@ -1121,10 +1138,22 @@ typeCheck(char t1, char t2)
|
||||||
*/
|
*/
|
||||||
- (void) encodeDataObject: (NSData*)anObject
|
- (void) encodeDataObject: (NSData*)anObject
|
||||||
{
|
{
|
||||||
unsigned pos = [_comp count];
|
int pos;
|
||||||
|
|
||||||
[_comp addObject: anObject];
|
if (anObject == nil)
|
||||||
[self encodeValueOfObjCType: @encode(unsigned) at: &pos];
|
{
|
||||||
|
pos = -1;
|
||||||
|
}
|
||||||
|
else if ([anObject length] == 0)
|
||||||
|
{
|
||||||
|
pos = -2;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
pos = (int)[_comp count];
|
||||||
|
[_comp addObject: anObject];
|
||||||
|
}
|
||||||
|
[self encodeValueOfObjCType: @encode(int) at: &pos];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) encodeObject: (id)anObject
|
- (void) encodeObject: (id)anObject
|
||||||
|
@ -1641,7 +1670,7 @@ typeCheck(char t1, char t2)
|
||||||
|
|
||||||
@implementation GSPortCoder (Private)
|
@implementation GSPortCoder (Private)
|
||||||
|
|
||||||
- (NSArray*) _components
|
- (NSMutableArray*) _components
|
||||||
{
|
{
|
||||||
return _comp;
|
return _comp;
|
||||||
}
|
}
|
||||||
|
|
|
@ -952,42 +952,5 @@ static SEL eValSel = @selector(encodeValueOfObjCType:at:);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* libObjects compatibility */
|
|
||||||
|
|
||||||
- (void) encodeArrayOfObjCType: (const char*) type
|
|
||||||
count: (unsigned)count
|
|
||||||
at: (const void*)buf
|
|
||||||
withName: (id)name
|
|
||||||
{
|
|
||||||
(*_eObjImp)(self, eObjSel, name);
|
|
||||||
[self encodeArrayOfObjCType: type count: count at: buf];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void) encodeIndent
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void) encodeValueOfCType: (const char*) type
|
|
||||||
at: (const void*)buf
|
|
||||||
withName: (id)name
|
|
||||||
{
|
|
||||||
(*_eObjImp)(self, eObjSel, name);
|
|
||||||
(*_eValImp)(self, eValSel, type, buf);
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void) encodeValueOfObjCType: (const char*) type
|
|
||||||
at: (const void*)buf
|
|
||||||
withName: (id)name
|
|
||||||
{
|
|
||||||
(*_eObjImp)(self, eObjSel, name);
|
|
||||||
(*_eValImp)(self, eValSel, type, buf);
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void) encodeObject: (id)anObject
|
|
||||||
withName: (id)name
|
|
||||||
{
|
|
||||||
(*_eObjImp)(self, eObjSel, name);
|
|
||||||
(*_eObjImp)(self, eObjSel, anObject);
|
|
||||||
}
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
|
|
@ -138,15 +138,15 @@ static Class NSMutableAttributedString_concrete_class;
|
||||||
return NSAllocateObject(self, 0, z);
|
return NSAllocateObject(self, 0, z);
|
||||||
}
|
}
|
||||||
|
|
||||||
//NSCoding protocol
|
- (void) encodeWithCoder: (NSCoder*)aCoder
|
||||||
- (void) encodeWithCoder: (NSCoder*)anEncoder
|
|
||||||
{
|
{
|
||||||
[super encodeWithCoder: anEncoder];
|
[self subclassResponsibility: _cmd];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (id) initWithCoder: (NSCoder*)aDecoder
|
- (id) initWithCoder: (NSCoder*)aDecoder
|
||||||
{
|
{
|
||||||
return [super initWithCoder: aDecoder];
|
[self subclassResponsibility: _cmd];
|
||||||
|
return nil;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (Class) classForPortCoder
|
- (Class) classForPortCoder
|
||||||
|
|
|
@ -276,6 +276,88 @@
|
||||||
va_end(ap);
|
va_end(ap);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (void) decodeArrayOfObjCType: (const char*)type
|
||||||
|
count: (unsigned)count
|
||||||
|
at: (void*)buf
|
||||||
|
withName: (id*)name
|
||||||
|
{
|
||||||
|
if (name)
|
||||||
|
{
|
||||||
|
*name = [self decodeObject];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
(void)[self decodeObject];
|
||||||
|
}
|
||||||
|
[self decodeArrayOfObjCType: type count: count at: buf];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void) decodeIndent
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void) decodeObjectAt: (id*)anObject
|
||||||
|
withName: (id*)name
|
||||||
|
{
|
||||||
|
[self decodeValueOfObjCType: @encode(id) at: anObject withName: name];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void) decodeValueOfCType: (const char*)type
|
||||||
|
at: (void*)buf
|
||||||
|
withName: (id*)name
|
||||||
|
{
|
||||||
|
[self decodeValueOfObjCType: type at: buf withName: name];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void) decodeValueOfObjCType: (const char*)type
|
||||||
|
at: (void*)buf
|
||||||
|
withName: (id*)name
|
||||||
|
{
|
||||||
|
if (name != 0)
|
||||||
|
{
|
||||||
|
*name = [self decodeObject];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
(void)[self decodeObject];
|
||||||
|
}
|
||||||
|
[self decodeValueOfObjCType: type at: buf];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void) encodeArrayOfObjCType: (const char*)type
|
||||||
|
count: (unsigned)count
|
||||||
|
at: (const void*)buf
|
||||||
|
withName: (id)name
|
||||||
|
{
|
||||||
|
[self encodeObject: name];
|
||||||
|
[self encodeArrayOfObjCType: type count: count at: buf];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void) encodeIndent
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void) encodeValueOfCType: (const char*)type
|
||||||
|
at: (const void*)buf
|
||||||
|
withName: (id)name
|
||||||
|
{
|
||||||
|
[self encodeValueOfObjCType: type at: buf withName: name];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void) encodeValueOfObjCType: (const char*)type
|
||||||
|
at: (const void*)buf
|
||||||
|
withName: (id)name
|
||||||
|
{
|
||||||
|
[self encodeObject: name];
|
||||||
|
[self encodeValueOfObjCType: type at: buf];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void) encodeObjectAt: (id*)anObject
|
||||||
|
withName: (id)name
|
||||||
|
{
|
||||||
|
[self encodeValueOfObjCType: @encode(id) at: anObject withName: name];
|
||||||
|
}
|
||||||
|
|
||||||
// Managing Zones
|
// Managing Zones
|
||||||
|
|
||||||
- (NSZone*) objectZone
|
- (NSZone*) objectZone
|
||||||
|
|
|
@ -52,20 +52,6 @@
|
||||||
#include <Foundation/NSPortNameServer.h>
|
#include <Foundation/NSPortNameServer.h>
|
||||||
#include <Foundation/NSNotification.h>
|
#include <Foundation/NSNotification.h>
|
||||||
|
|
||||||
NSString* NSConnectionReplyMode = @"NSConnectionReplyMode";
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Keys for the NSDictionary returned by [NSConnection -statistics]
|
|
||||||
*/
|
|
||||||
/* These in OPENSTEP 4.2 */
|
|
||||||
NSString *NSConnectionRepliesReceived = @"NSConnectionRepliesReceived";
|
|
||||||
NSString *NSConnectionRepliesSent = @"NSConnectionRepliesSent";
|
|
||||||
NSString *NSConnectionRequestsReceived = @"NSConnectionRequestsReceived";
|
|
||||||
NSString *NSConnectionRequestsSent = @"NSConnectionRequestsSent";
|
|
||||||
/* These Are GNUstep extras */
|
|
||||||
NSString *NSConnectionLocalCount = @"NSConnectionLocalCount";
|
|
||||||
NSString *NSConnectionProxyCount = @"NSConnectionProxyCount";
|
|
||||||
|
|
||||||
@interface NSDistantObject (NSConnection)
|
@interface NSDistantObject (NSConnection)
|
||||||
- (id) localForProxy;
|
- (id) localForProxy;
|
||||||
- (void) setProxyTarget: (unsigned)target;
|
- (void) setProxyTarget: (unsigned)target;
|
||||||
|
@ -2394,12 +2380,3 @@ static int messages_received_count;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
|
||||||
/* Notification Strings. */
|
|
||||||
|
|
||||||
NSString *NSConnectionDidDieNotification
|
|
||||||
= @"NSConnectionDidDieNotification";
|
|
||||||
|
|
||||||
NSString *NSConnectionDidInitializeNotification
|
|
||||||
= @"NSConnectionDidInitializeNotification";
|
|
||||||
|
|
||||||
|
|
|
@ -211,13 +211,11 @@ enum
|
||||||
NSLog(@"Sending a proxy, will be remote 0x%x connection 0x%x\n",
|
NSLog(@"Sending a proxy, will be remote 0x%x connection 0x%x\n",
|
||||||
proxy_target, (gsaddr)_connection);
|
proxy_target, (gsaddr)_connection);
|
||||||
|
|
||||||
[aRmc encodeValueOfCType: @encode(typeof(proxy_tag))
|
[aRmc encodeValueOfObjCType: @encode(typeof(proxy_tag))
|
||||||
at: &proxy_tag
|
at: &proxy_tag];
|
||||||
withName: @"Proxy is local for sender"];
|
|
||||||
|
|
||||||
[aRmc encodeValueOfCType: @encode(typeof(proxy_target))
|
[aRmc encodeValueOfObjCType: @encode(typeof(proxy_target))
|
||||||
at: &proxy_target
|
at: &proxy_target];
|
||||||
withName: @"Proxy target"];
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -230,13 +228,11 @@ enum
|
||||||
NSLog(@"Sending a proxy, will be local 0x%x connection 0x%x\n",
|
NSLog(@"Sending a proxy, will be local 0x%x connection 0x%x\n",
|
||||||
proxy_target, (gsaddr)_connection);
|
proxy_target, (gsaddr)_connection);
|
||||||
|
|
||||||
[aRmc encodeValueOfCType: @encode(typeof(proxy_tag))
|
[aRmc encodeValueOfObjCType: @encode(typeof(proxy_tag))
|
||||||
at: &proxy_tag
|
at: &proxy_tag];
|
||||||
withName: @"Proxy is local for receiver"];
|
|
||||||
|
|
||||||
[aRmc encodeValueOfCType: @encode(typeof(proxy_target))
|
[aRmc encodeValueOfObjCType: @encode(typeof(proxy_target))
|
||||||
at: &proxy_target
|
at: &proxy_target];
|
||||||
withName: @"Proxy target"];
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -275,20 +271,16 @@ enum
|
||||||
* It's remote here, so we need to tell other side where to form
|
* It's remote here, so we need to tell other side where to form
|
||||||
* triangle connection to
|
* triangle connection to
|
||||||
*/
|
*/
|
||||||
[aRmc encodeValueOfCType: @encode(typeof(proxy_tag))
|
[aRmc encodeValueOfObjCType: @encode(typeof(proxy_tag))
|
||||||
at: &proxy_tag
|
at: &proxy_tag];
|
||||||
withName: @"Proxy remote for both sender and receiver"];
|
|
||||||
|
|
||||||
[aRmc encodeValueOfCType: @encode(typeof(localProxy->_handle))
|
[aRmc encodeValueOfObjCType: @encode(typeof(localProxy->_handle))
|
||||||
at: &localProxy->_handle
|
at: &localProxy->_handle];
|
||||||
withName: @"Intermediary target"];
|
|
||||||
|
|
||||||
[aRmc encodeValueOfCType: @encode(typeof(proxy_target))
|
[aRmc encodeValueOfObjCType: @encode(typeof(proxy_target))
|
||||||
at: &proxy_target
|
at: &proxy_target];
|
||||||
withName: @"Original target"];
|
|
||||||
|
|
||||||
[aRmc encodeBycopyObject: proxy_connection_out_port
|
[aRmc encodeBycopyObject: proxy_connection_out_port];
|
||||||
withName: @"Original port"];
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -319,9 +311,8 @@ enum
|
||||||
NSAssert(decoder_connection, NSInternalInconsistencyException);
|
NSAssert(decoder_connection, NSInternalInconsistencyException);
|
||||||
|
|
||||||
/* First get the tag, so we know what values need to be decoded. */
|
/* First get the tag, so we know what values need to be decoded. */
|
||||||
[aCoder decodeValueOfCType: @encode(typeof(proxy_tag))
|
[aCoder decodeValueOfObjCType: @encode(typeof(proxy_tag))
|
||||||
at: &proxy_tag
|
at: &proxy_tag];
|
||||||
withName: NULL];
|
|
||||||
|
|
||||||
switch (proxy_tag)
|
switch (proxy_tag)
|
||||||
{
|
{
|
||||||
|
@ -332,9 +323,8 @@ enum
|
||||||
* Lookup the target handle to ensure that it exists here.
|
* Lookup the target handle to ensure that it exists here.
|
||||||
* Return a retained copy of the local target object.
|
* Return a retained copy of the local target object.
|
||||||
*/
|
*/
|
||||||
[aCoder decodeValueOfCType: @encode(typeof(target))
|
[aCoder decodeValueOfObjCType: @encode(typeof(target))
|
||||||
at: &target
|
at: &target];
|
||||||
withName: NULL];
|
|
||||||
|
|
||||||
if (debug_proxy)
|
if (debug_proxy)
|
||||||
NSLog(@"Receiving a proxy for local object 0x%x "
|
NSLog(@"Receiving a proxy for local object 0x%x "
|
||||||
|
@ -369,9 +359,8 @@ enum
|
||||||
* return the proxy object we already created for this target, or
|
* return the proxy object we already created for this target, or
|
||||||
* create a new proxy object if necessary.
|
* create a new proxy object if necessary.
|
||||||
*/
|
*/
|
||||||
[aCoder decodeValueOfCType: @encode(typeof(target))
|
[aCoder decodeValueOfObjCType: @encode(typeof(target))
|
||||||
at: &target
|
at: &target];
|
||||||
withName: NULL];
|
|
||||||
if (debug_proxy)
|
if (debug_proxy)
|
||||||
NSLog(@"Receiving a proxy, was local 0x%x connection 0x%x\n",
|
NSLog(@"Receiving a proxy, was local 0x%x connection 0x%x\n",
|
||||||
target, (gsaddr)decoder_connection);
|
target, (gsaddr)decoder_connection);
|
||||||
|
@ -408,9 +397,8 @@ enum
|
||||||
* time we will have obtained our own proxy for the original
|
* time we will have obtained our own proxy for the original
|
||||||
* object ...
|
* object ...
|
||||||
*/
|
*/
|
||||||
[aCoder decodeValueOfCType: @encode(typeof(intermediary))
|
[aCoder decodeValueOfObjCType: @encode(typeof(intermediary))
|
||||||
at: &intermediary
|
at: &intermediary];
|
||||||
withName: NULL];
|
|
||||||
[NSDistantObject proxyWithTarget: intermediary
|
[NSDistantObject proxyWithTarget: intermediary
|
||||||
connection: decoder_connection];
|
connection: decoder_connection];
|
||||||
|
|
||||||
|
@ -419,12 +407,11 @@ enum
|
||||||
* and (if necessary) get the originating process to retain the
|
* and (if necessary) get the originating process to retain the
|
||||||
* object for us.
|
* object for us.
|
||||||
*/
|
*/
|
||||||
[aCoder decodeValueOfCType: @encode(typeof(target))
|
[aCoder decodeValueOfObjCType: @encode(typeof(target))
|
||||||
at: &target
|
at: &target];
|
||||||
withName: NULL];
|
|
||||||
|
|
||||||
[aCoder decodeObjectAt: &proxy_connection_out_port
|
[aCoder decodeValueOfObjCType: @encode(id)
|
||||||
withName: NULL];
|
at: &proxy_connection_out_port];
|
||||||
|
|
||||||
NSAssert(proxy_connection_out_port, NSInternalInconsistencyException);
|
NSAssert(proxy_connection_out_port, NSInternalInconsistencyException);
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -100,14 +100,12 @@
|
||||||
|
|
||||||
- (void) encodeWithCoder: (NSCoder*)aCoder
|
- (void) encodeWithCoder: (NSCoder*)aCoder
|
||||||
{
|
{
|
||||||
[super encodeWithCoder: aCoder];
|
|
||||||
[aCoder encodeValueOfObjCType: @encode(unsigned) at: &loc];
|
[aCoder encodeValueOfObjCType: @encode(unsigned) at: &loc];
|
||||||
[aCoder encodeValueOfObjCType: @encode(id) at: &attrs];
|
[aCoder encodeValueOfObjCType: @encode(id) at: &attrs];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (id) initWithCoder: (NSCoder*)aCoder
|
- (id) initWithCoder: (NSCoder*)aCoder
|
||||||
{
|
{
|
||||||
self = [super initWithCoder: aCoder];
|
|
||||||
[aCoder decodeValueOfObjCType: @encode(unsigned) at: &loc];
|
[aCoder decodeValueOfObjCType: @encode(unsigned) at: &loc];
|
||||||
[aCoder decodeValueOfObjCType: @encode(id) at: &attrs];
|
[aCoder decodeValueOfObjCType: @encode(id) at: &attrs];
|
||||||
return self;
|
return self;
|
||||||
|
@ -298,14 +296,12 @@ _attributesAtIndexEffectiveRange(
|
||||||
|
|
||||||
- (void) encodeWithCoder: (NSCoder*)aCoder
|
- (void) encodeWithCoder: (NSCoder*)aCoder
|
||||||
{
|
{
|
||||||
[super encodeWithCoder: aCoder];
|
|
||||||
[aCoder encodeValueOfObjCType: @encode(id) at: &_textChars];
|
[aCoder encodeValueOfObjCType: @encode(id) at: &_textChars];
|
||||||
[aCoder encodeValueOfObjCType: @encode(id) at: &_infoArray];
|
[aCoder encodeValueOfObjCType: @encode(id) at: &_infoArray];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (id) initWithCoder: (NSCoder*)aCoder
|
- (id) initWithCoder: (NSCoder*)aCoder
|
||||||
{
|
{
|
||||||
self = [super initWithCoder: aCoder];
|
|
||||||
[aCoder decodeValueOfObjCType: @encode(id) at: &_textChars];
|
[aCoder decodeValueOfObjCType: @encode(id) at: &_textChars];
|
||||||
[aCoder decodeValueOfObjCType: @encode(id) at: &_infoArray];
|
[aCoder decodeValueOfObjCType: @encode(id) at: &_infoArray];
|
||||||
return self;
|
return self;
|
||||||
|
@ -407,14 +403,12 @@ _attributesAtIndexEffectiveRange(
|
||||||
|
|
||||||
- (void) encodeWithCoder: (NSCoder*)aCoder
|
- (void) encodeWithCoder: (NSCoder*)aCoder
|
||||||
{
|
{
|
||||||
[super encodeWithCoder: aCoder];
|
|
||||||
[aCoder encodeValueOfObjCType: @encode(id) at: &_textChars];
|
[aCoder encodeValueOfObjCType: @encode(id) at: &_textChars];
|
||||||
[aCoder encodeValueOfObjCType: @encode(id) at: &_infoArray];
|
[aCoder encodeValueOfObjCType: @encode(id) at: &_infoArray];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (id) initWithCoder: (NSCoder*)aCoder
|
- (id) initWithCoder: (NSCoder*)aCoder
|
||||||
{
|
{
|
||||||
self = [super initWithCoder: aCoder];
|
|
||||||
[aCoder decodeValueOfObjCType: @encode(id) at: &_textChars];
|
[aCoder decodeValueOfObjCType: @encode(id) at: &_textChars];
|
||||||
[aCoder decodeValueOfObjCType: @encode(id) at: &_infoArray];
|
[aCoder decodeValueOfObjCType: @encode(id) at: &_infoArray];
|
||||||
return self;
|
return self;
|
||||||
|
|
|
@ -279,7 +279,6 @@ static NSString *myHost = nil;
|
||||||
|
|
||||||
- (void) encodeWithCoder: (NSCoder*)aCoder
|
- (void) encodeWithCoder: (NSCoder*)aCoder
|
||||||
{
|
{
|
||||||
[super encodeWithCoder: aCoder];
|
|
||||||
[aCoder encodeObject: [self address]];
|
[aCoder encodeObject: [self address]];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -288,7 +287,6 @@ static NSString *myHost = nil;
|
||||||
NSString *address;
|
NSString *address;
|
||||||
NSHost *host;
|
NSHost *host;
|
||||||
|
|
||||||
self = [super initWithCoder: aCoder];
|
|
||||||
address = [aCoder decodeObject];
|
address = [aCoder decodeObject];
|
||||||
host = RETAIN([NSHost hostWithAddress: address]);
|
host = RETAIN([NSHost hostWithAddress: address]);
|
||||||
RELEASE(self);
|
RELEASE(self);
|
||||||
|
|
|
@ -104,7 +104,6 @@
|
||||||
*/
|
*/
|
||||||
- (void) encodeWithCoder: (NSCoder*)aCoder
|
- (void) encodeWithCoder: (NSCoder*)aCoder
|
||||||
{
|
{
|
||||||
[super encodeWithCoder: aCoder];
|
|
||||||
[aCoder encodeValueOfObjCType: @encode(id) at: &_name];
|
[aCoder encodeValueOfObjCType: @encode(id) at: &_name];
|
||||||
[aCoder encodeValueOfObjCType: @encode(id) at: &_object];
|
[aCoder encodeValueOfObjCType: @encode(id) at: &_object];
|
||||||
[aCoder encodeValueOfObjCType: @encode(id) at: &_info];
|
[aCoder encodeValueOfObjCType: @encode(id) at: &_info];
|
||||||
|
@ -112,7 +111,6 @@
|
||||||
|
|
||||||
- (id) initWithCoder: (NSCoder*)aCoder
|
- (id) initWithCoder: (NSCoder*)aCoder
|
||||||
{
|
{
|
||||||
[super initWithCoder: aCoder];
|
|
||||||
[aCoder decodeValueOfObjCType: @encode(id) at: &_name];
|
[aCoder decodeValueOfObjCType: @encode(id) at: &_name];
|
||||||
[aCoder decodeValueOfObjCType: @encode(id) at: &_object];
|
[aCoder decodeValueOfObjCType: @encode(id) at: &_object];
|
||||||
[aCoder decodeValueOfObjCType: @encode(id) at: &_info];
|
[aCoder decodeValueOfObjCType: @encode(id) at: &_info];
|
||||||
|
|
|
@ -677,10 +677,10 @@ static BOOL deallocNotifications = NO;
|
||||||
return YES;
|
return YES;
|
||||||
}
|
}
|
||||||
|
|
||||||
- free
|
- (id) free
|
||||||
{
|
{
|
||||||
[NSException raise: NSGenericException
|
[NSException raise: NSGenericException
|
||||||
format: @"Use `dealloc' instead of `free' for %@.", self];
|
format: @"Use `dealloc' instead of `free' for %@.", self];
|
||||||
return nil;
|
return nil;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -761,19 +761,19 @@ static BOOL deallocNotifications = NO;
|
||||||
|
|
||||||
+ (NSMethodSignature*) instanceMethodSignatureForSelector: (SEL)aSelector
|
+ (NSMethodSignature*) instanceMethodSignatureForSelector: (SEL)aSelector
|
||||||
{
|
{
|
||||||
struct objc_method* mth = class_get_instance_method(self, aSelector);
|
struct objc_method* mth = class_get_instance_method(self, aSelector);
|
||||||
return mth ? [NSMethodSignature signatureWithObjCTypes:mth->method_types]
|
return mth ? [NSMethodSignature signatureWithObjCTypes:mth->method_types]
|
||||||
: nil;
|
: nil;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSMethodSignature*) methodSignatureForSelector: (SEL)aSelector
|
- (NSMethodSignature*) methodSignatureForSelector: (SEL)aSelector
|
||||||
{
|
{
|
||||||
struct objc_method* mth =
|
struct objc_method* mth =
|
||||||
(object_is_instance(self) ?
|
(object_is_instance(self) ?
|
||||||
class_get_instance_method(self->isa, aSelector)
|
class_get_instance_method(self->isa, aSelector)
|
||||||
: class_get_class_method(self->isa, aSelector));
|
: class_get_class_method(self->isa, aSelector));
|
||||||
return mth ? [NSMethodSignature signatureWithObjCTypes:mth->method_types]
|
return mth ? [NSMethodSignature signatureWithObjCTypes:mth->method_types]
|
||||||
: nil;
|
: nil;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSString*) description
|
- (NSString*) description
|
||||||
|
@ -873,7 +873,7 @@ static BOOL deallocNotifications = NO;
|
||||||
|
|
||||||
- (Class) classForPortCoder
|
- (Class) classForPortCoder
|
||||||
{
|
{
|
||||||
return [self classForCoder];
|
return [self classForCoder];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (id) replacementObjectForArchiver: (NSArchiver*)anArchiver
|
- (id) replacementObjectForArchiver: (NSArchiver*)anArchiver
|
||||||
|
@ -940,7 +940,7 @@ static BOOL deallocNotifications = NO;
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
+ autorelease
|
+ (id) autorelease
|
||||||
{
|
{
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
@ -960,7 +960,7 @@ static BOOL deallocNotifications = NO;
|
||||||
return (unsigned)self;
|
return (unsigned)self;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (BOOL) isEqual: anObject
|
- (BOOL) isEqual: (id)anObject
|
||||||
{
|
{
|
||||||
return (self == anObject);
|
return (self == anObject);
|
||||||
}
|
}
|
||||||
|
@ -1001,7 +1001,7 @@ static BOOL deallocNotifications = NO;
|
||||||
return NO;
|
return NO;
|
||||||
}
|
}
|
||||||
|
|
||||||
- performSelector: (SEL)aSelector
|
- (id) performSelector: (SEL)aSelector
|
||||||
{
|
{
|
||||||
IMP msg;
|
IMP msg;
|
||||||
|
|
||||||
|
@ -1022,7 +1022,7 @@ static BOOL deallocNotifications = NO;
|
||||||
return (*msg)(self, aSelector);
|
return (*msg)(self, aSelector);
|
||||||
}
|
}
|
||||||
|
|
||||||
- performSelector: (SEL)aSelector withObject: anObject
|
- (id) performSelector: (SEL)aSelector withObject: (id) anObject
|
||||||
{
|
{
|
||||||
IMP msg;
|
IMP msg;
|
||||||
|
|
||||||
|
@ -1044,7 +1044,9 @@ static BOOL deallocNotifications = NO;
|
||||||
return (*msg)(self, aSelector, anObject);
|
return (*msg)(self, aSelector, anObject);
|
||||||
}
|
}
|
||||||
|
|
||||||
- performSelector: (SEL)aSelector withObject: object1 withObject: object2
|
- (id) performSelector: (SEL)aSelector
|
||||||
|
withObject: (id) object1
|
||||||
|
withObject: (id) object2
|
||||||
{
|
{
|
||||||
IMP msg;
|
IMP msg;
|
||||||
|
|
||||||
|
@ -1106,7 +1108,7 @@ static BOOL deallocNotifications = NO;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
- retain
|
- (id) retain
|
||||||
{
|
{
|
||||||
#if GS_WITH_GC == 0
|
#if GS_WITH_GC == 0
|
||||||
NSIncrementExtraRefCount(self);
|
NSIncrementExtraRefCount(self);
|
||||||
|
@ -1114,7 +1116,7 @@ static BOOL deallocNotifications = NO;
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
+ retain
|
+ (id) retain
|
||||||
{
|
{
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
@ -1133,14 +1135,14 @@ static BOOL deallocNotifications = NO;
|
||||||
return UINT_MAX;
|
return UINT_MAX;
|
||||||
}
|
}
|
||||||
|
|
||||||
- self
|
- (id) self
|
||||||
{
|
{
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSZone *)zone
|
- (NSZone*) zone
|
||||||
{
|
{
|
||||||
return fastZone(self);
|
return fastZone(self);
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) encodeWithCoder: (NSCoder*)aCoder
|
- (void) encodeWithCoder: (NSCoder*)aCoder
|
||||||
|
@ -1148,17 +1150,17 @@ static BOOL deallocNotifications = NO;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
- initWithCoder: (NSCoder*)aDecoder
|
- (id) initWithCoder: (NSCoder*)aDecoder
|
||||||
{
|
{
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
+ (int)version
|
+ (int) version
|
||||||
{
|
{
|
||||||
return class_get_version(self);
|
return class_get_version(self);
|
||||||
}
|
}
|
||||||
|
|
||||||
+ setVersion:(int)aVersion
|
+ (id) setVersion: (int)aVersion
|
||||||
{
|
{
|
||||||
if (aVersion < 0)
|
if (aVersion < 0)
|
||||||
[NSException raise: NSInvalidArgumentException
|
[NSException raise: NSInvalidArgumentException
|
||||||
|
@ -1175,7 +1177,7 @@ static BOOL deallocNotifications = NO;
|
||||||
|
|
||||||
/* NEXTSTEP Object class compatibility */
|
/* NEXTSTEP Object class compatibility */
|
||||||
|
|
||||||
- error:(const char *)aString, ...
|
- error: (const char *)aString, ...
|
||||||
{
|
{
|
||||||
#define FMT "error: %s (%s)\n%s\n"
|
#define FMT "error: %s (%s)\n%s\n"
|
||||||
char fmt[(strlen((char*)FMT)+strlen((char*)object_get_class_name(self))
|
char fmt[(strlen((char*)FMT)+strlen((char*)object_get_class_name(self))
|
||||||
|
@ -1198,42 +1200,42 @@ static BOOL deallocNotifications = NO;
|
||||||
return object_get_class_name(self);
|
return object_get_class_name(self);
|
||||||
}
|
}
|
||||||
|
|
||||||
- (BOOL)isKindOf:(Class)aClassObject
|
- (BOOL) isKindOf: (Class)aClassObject
|
||||||
{
|
{
|
||||||
return [self isKindOfClass:aClassObject];
|
return [self isKindOfClass: aClassObject];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (BOOL)isMemberOf:(Class)aClassObject
|
- (BOOL) isMemberOf: (Class)aClassObject
|
||||||
{
|
{
|
||||||
return [self isMemberOfClass:aClassObject];
|
return [self isMemberOfClass: aClassObject];
|
||||||
}
|
}
|
||||||
|
|
||||||
+ (BOOL)instancesRespondTo:(SEL)aSel
|
+ (BOOL) instancesRespondTo: (SEL)aSel
|
||||||
{
|
{
|
||||||
return [self instancesRespondToSelector:aSel];
|
return [self instancesRespondToSelector: aSel];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (BOOL)respondsTo:(SEL)aSel
|
- (BOOL) respondsTo: (SEL)aSel
|
||||||
{
|
{
|
||||||
return [self respondsToSelector:aSel];
|
return [self respondsToSelector: aSel];
|
||||||
}
|
}
|
||||||
|
|
||||||
+ (BOOL) conformsTo: (Protocol*)aProtocol
|
+ (BOOL) conformsTo: (Protocol*)aProtocol
|
||||||
{
|
{
|
||||||
return [self conformsToProtocol:aProtocol];
|
return [self conformsToProtocol: aProtocol];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (BOOL) conformsTo: (Protocol*)aProtocol
|
- (BOOL) conformsTo: (Protocol*)aProtocol
|
||||||
{
|
{
|
||||||
return [self conformsToProtocol:aProtocol];
|
return [self conformsToProtocol: aProtocol];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (retval_t)performv:(SEL)aSel :(arglist_t)argFrame
|
- (retval_t) performv: (SEL)aSel :(arglist_t)argFrame
|
||||||
{
|
{
|
||||||
return objc_msg_sendv(self, aSel, argFrame);
|
return objc_msg_sendv(self, aSel, argFrame);
|
||||||
}
|
}
|
||||||
|
|
||||||
+ (IMP) instanceMethodFor:(SEL)aSel
|
+ (IMP) instanceMethodFor: (SEL)aSel
|
||||||
{
|
{
|
||||||
return [self instanceMethodForSelector:aSel];
|
return [self instanceMethodForSelector:aSel];
|
||||||
}
|
}
|
||||||
|
@ -1246,18 +1248,18 @@ static BOOL deallocNotifications = NO;
|
||||||
: nil;
|
: nil;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (IMP) methodFor:(SEL)aSel
|
- (IMP) methodFor: (SEL)aSel
|
||||||
{
|
{
|
||||||
return [self methodForSelector:aSel];
|
return [self methodForSelector: aSel];
|
||||||
}
|
}
|
||||||
|
|
||||||
+ poseAs:(Class)aClassObject
|
+ (id) poseAs: (Class)aClassObject
|
||||||
{
|
{
|
||||||
[self poseAsClass:aClassObject];
|
[self poseAsClass: aClassObject];
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
- notImplemented:(SEL)aSel
|
- (id) notImplemented: (SEL)aSel
|
||||||
{
|
{
|
||||||
[NSException
|
[NSException
|
||||||
raise: NSGenericException
|
raise: NSGenericException
|
||||||
|
@ -1265,7 +1267,7 @@ static BOOL deallocNotifications = NO;
|
||||||
return nil;
|
return nil;
|
||||||
}
|
}
|
||||||
|
|
||||||
- doesNotRecognize:(SEL)aSel
|
- (id) doesNotRecognize: (SEL)aSel
|
||||||
{
|
{
|
||||||
[NSException raise: NSGenericException
|
[NSException raise: NSGenericException
|
||||||
format: @"%s does not recognize %s",
|
format: @"%s does not recognize %s",
|
||||||
|
@ -1273,12 +1275,12 @@ static BOOL deallocNotifications = NO;
|
||||||
return nil;
|
return nil;
|
||||||
}
|
}
|
||||||
|
|
||||||
- perform: (SEL)sel with: anObject
|
- (id) perform: (SEL)sel with: (id)anObject
|
||||||
{
|
{
|
||||||
return [self performSelector:sel withObject:anObject];
|
return [self performSelector:sel withObject:anObject];
|
||||||
}
|
}
|
||||||
|
|
||||||
- perform: (SEL)sel with: anObject with: anotherObject
|
- (id) perform: (SEL)sel with: (id)anObject with: (id)anotherObject
|
||||||
{
|
{
|
||||||
return [self performSelector:sel withObject:anObject
|
return [self performSelector:sel withObject:anObject
|
||||||
withObject:anotherObject];
|
withObject:anotherObject];
|
||||||
|
@ -1399,19 +1401,19 @@ static BOOL deallocNotifications = NO;
|
||||||
// before doing their own archiving. These methods are private, in
|
// before doing their own archiving. These methods are private, in
|
||||||
// the sense that they should only be called from subclasses.
|
// the sense that they should only be called from subclasses.
|
||||||
|
|
||||||
- read: (TypedStream*)aStream
|
- (id) read: (TypedStream*)aStream
|
||||||
{
|
{
|
||||||
// [super read: aStream];
|
// [super read: aStream];
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
- write: (TypedStream*)aStream
|
- (id) write: (TypedStream*)aStream
|
||||||
{
|
{
|
||||||
// [super write: aStream];
|
// [super write: aStream];
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
- awake
|
- (id) awake
|
||||||
{
|
{
|
||||||
// [super awake];
|
// [super awake];
|
||||||
return self;
|
return self;
|
||||||
|
|
|
@ -31,12 +31,6 @@
|
||||||
#include <Foundation/NSRunLoop.h>
|
#include <Foundation/NSRunLoop.h>
|
||||||
#include <Foundation/NSAutoreleasePool.h>
|
#include <Foundation/NSAutoreleasePool.h>
|
||||||
|
|
||||||
NSString* NSPortDidBecomeInvalidNotification
|
|
||||||
= @"NSPortDidBecomeInvalidNotification";
|
|
||||||
|
|
||||||
NSString *NSPortTimeoutException
|
|
||||||
= @"NSPortTimeoutException";
|
|
||||||
|
|
||||||
@implementation NSPort
|
@implementation NSPort
|
||||||
|
|
||||||
+ (NSPort*) port
|
+ (NSPort*) port
|
||||||
|
|
|
@ -75,14 +75,6 @@
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) addComponent: (id)aComponent
|
|
||||||
{
|
|
||||||
NSAssert([aComponent isKindOfClass: [NSData class]]
|
|
||||||
|| [aComponent isKindOfClass: [NSPort class]],
|
|
||||||
NSInvalidArgumentException);
|
|
||||||
[_components addObject: aComponent];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (NSArray*) components
|
- (NSArray*) components
|
||||||
{
|
{
|
||||||
return AUTORELEASE([_components copy]);
|
return AUTORELEASE([_components copy]);
|
||||||
|
@ -117,3 +109,10 @@
|
||||||
}
|
}
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
@implementation NSPortMessage (Private)
|
||||||
|
- (NSMutableArray*) _components
|
||||||
|
{
|
||||||
|
return _components;
|
||||||
|
}
|
||||||
|
@end
|
||||||
|
|
||||||
|
|
|
@ -1315,11 +1315,6 @@ const NSMapTableValueCallBacks ArrayMapValueCallBacks =
|
||||||
[self runUntilDate: date forMode: _current_mode];
|
[self runUntilDate: date forMode: _current_mode];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* NSRunLoop mode strings. */
|
|
||||||
|
|
||||||
id NSDefaultRunLoopMode = @"NSDefaultRunLoopMode";
|
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -332,7 +332,6 @@ decode (const void *ptr)
|
||||||
|
|
||||||
- (void) encodeWithCoder: (NSCoder*)aCoder
|
- (void) encodeWithCoder: (NSCoder*)aCoder
|
||||||
{
|
{
|
||||||
[super encodeWithCoder: aCoder];
|
|
||||||
if (self == localTimeZone)
|
if (self == localTimeZone)
|
||||||
[aCoder encodeObject: @"NSLocalTimeZone"];
|
[aCoder encodeObject: @"NSLocalTimeZone"];
|
||||||
else
|
else
|
||||||
|
@ -348,9 +347,8 @@ decode (const void *ptr)
|
||||||
return [NSTimeZone timeZoneWithName: name];
|
return [NSTimeZone timeZoneWithName: name];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (id) initWithDecoder: (NSCoder*)aDecoder
|
- (id) initWithCoder: (NSCoder*)aDecoder
|
||||||
{
|
{
|
||||||
self = [super initWithCoder: aDecoder];
|
|
||||||
[aDecoder decodeValueOfObjCType: @encode(id) at: &name];
|
[aDecoder decodeValueOfObjCType: @encode(id) at: &name];
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
@ -452,15 +450,13 @@ static NSMapTable *absolutes = 0;
|
||||||
[super dealloc];
|
[super dealloc];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) encodeWithCoder: aCoder
|
- (void) encodeWithCoder: (NSCoder*)aCoder
|
||||||
{
|
{
|
||||||
[super encodeWithCoder: aCoder];
|
|
||||||
[aCoder encodeObject: name];
|
[aCoder encodeObject: name];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (id) initWithCoder: aDecoder
|
- (id) initWithCoder: (NSCoder*)aDecoder
|
||||||
{
|
{
|
||||||
self = [super initWithCoder: aDecoder];
|
|
||||||
[aDecoder decodeValueOfObjCType: @encode(id) at: &name];
|
[aDecoder decodeValueOfObjCType: @encode(id) at: &name];
|
||||||
offset = [name intValue];
|
offset = [name intValue];
|
||||||
detail = [[NSConcreteTimeZoneDetail alloc]
|
detail = [[NSConcreteTimeZoneDetail alloc]
|
||||||
|
@ -509,17 +505,15 @@ static NSMapTable *absolutes = 0;
|
||||||
[super dealloc];
|
[super dealloc];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) encodeWithCoder: aCoder
|
- (void) encodeWithCoder: (NSCoder*)aCoder
|
||||||
{
|
{
|
||||||
[super encodeWithCoder: aCoder];
|
|
||||||
[aCoder encodeObject: abbrev];
|
[aCoder encodeObject: abbrev];
|
||||||
[aCoder encodeValueOfObjCType: @encode(int) at: &offset];
|
[aCoder encodeValueOfObjCType: @encode(int) at: &offset];
|
||||||
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &is_dst];
|
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &is_dst];
|
||||||
}
|
}
|
||||||
|
|
||||||
- initWithCoder: aDecoder
|
- (id) initWithCoder: (NSCoder*)aDecoder
|
||||||
{
|
{
|
||||||
self = [super initWithCoder: aDecoder];
|
|
||||||
[aDecoder decodeValueOfObjCType: @encode(id) at: &abbrev];
|
[aDecoder decodeValueOfObjCType: @encode(id) at: &abbrev];
|
||||||
[aDecoder decodeValueOfObjCType: @encode(int) at: &offset];
|
[aDecoder decodeValueOfObjCType: @encode(int) at: &offset];
|
||||||
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &is_dst];
|
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &is_dst];
|
||||||
|
|
|
@ -163,7 +163,6 @@ NSString* NSURLPartKey_query = @"query";
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
- (void) encodeWithCoder: (NSCoder*)aCoder
|
- (void) encodeWithCoder: (NSCoder*)aCoder
|
||||||
{
|
{
|
||||||
[super encodeWithCoder: aCoder];
|
|
||||||
[aCoder encodeObject: _urlString];
|
[aCoder encodeObject: _urlString];
|
||||||
[aCoder encodeObject: _baseURL];
|
[aCoder encodeObject: _baseURL];
|
||||||
//FIXME? _clients ?
|
//FIXME? _clients ?
|
||||||
|
@ -172,7 +171,6 @@ NSString* NSURLPartKey_query = @"query";
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
- (id) initWithCoder: (NSCoder*)aCoder
|
- (id) initWithCoder: (NSCoder*)aCoder
|
||||||
{
|
{
|
||||||
self = [super initWithCoder: aCoder];
|
|
||||||
[aCoder decodeValueOfObjCType: @encode(id) at: &_urlString];
|
[aCoder decodeValueOfObjCType: @encode(id) at: &_urlString];
|
||||||
[aCoder decodeValueOfObjCType: @encode(id) at: &_baseURL];
|
[aCoder decodeValueOfObjCType: @encode(id) at: &_baseURL];
|
||||||
//FIXME? _clients ?
|
//FIXME? _clients ?
|
||||||
|
|
|
@ -1297,70 +1297,5 @@ mapClassName(NSUnarchiverObjectInfo *info)
|
||||||
return YES;
|
return YES;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* libObjects compatibility */
|
|
||||||
|
|
||||||
- (void) decodeArrayOfObjCType: (const char*) type
|
|
||||||
count: (unsigned)count
|
|
||||||
at: (void*)buf
|
|
||||||
withName: (id*)name
|
|
||||||
{
|
|
||||||
if (name)
|
|
||||||
{
|
|
||||||
*name = [self decodeObject];
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
(void)[self decodeObject];
|
|
||||||
}
|
|
||||||
[self decodeArrayOfObjCType: type count: count at: buf];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void) decodeIndent
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void) decodeValueOfCType: (const char*) type
|
|
||||||
at: (void*)buf
|
|
||||||
withName: (id*)name
|
|
||||||
{
|
|
||||||
if (name)
|
|
||||||
{
|
|
||||||
*name = [self decodeObject];
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
(void)[self decodeObject];
|
|
||||||
}
|
|
||||||
(*dValImp)(self, dValSel, type, buf);
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void) decodeValueOfObjCType: (const char*) type
|
|
||||||
at: (void*)buf
|
|
||||||
withName: (id*)name
|
|
||||||
{
|
|
||||||
if (name)
|
|
||||||
{
|
|
||||||
*name = [self decodeObject];
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
(void)[self decodeObject];
|
|
||||||
}
|
|
||||||
(*dValImp)(self, dValSel, type, buf);
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void) decodeObjectAt: (id*)anObject
|
|
||||||
withName: (id*)name
|
|
||||||
{
|
|
||||||
if (name)
|
|
||||||
{
|
|
||||||
*name = [self decodeObject];
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
(void)[self decodeObject];
|
|
||||||
}
|
|
||||||
(*dValImp)(self, dValSel, @encode(id), (void*)anObject);
|
|
||||||
}
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
|
256
Source/externs.m
256
Source/externs.m
|
@ -35,55 +35,73 @@
|
||||||
creating the potential for deadlock. */
|
creating the potential for deadlock. */
|
||||||
NSRecursiveLock *gnustep_global_lock = nil;
|
NSRecursiveLock *gnustep_global_lock = nil;
|
||||||
|
|
||||||
/* Connection Notification Strings. */
|
/*
|
||||||
|
* Connection Notification Strings.
|
||||||
|
*/
|
||||||
|
NSString* const NSConnectionDidDieNotification
|
||||||
|
= @"NSConnectionDidDieNotification";
|
||||||
|
NSString* const NSConnectionDidInitializeNotification
|
||||||
|
= @"NSConnectionDidInitializeNotification";
|
||||||
|
|
||||||
NSString *ConnectionBecameInvalidNotification =
|
/*
|
||||||
@"ConnectionBecameInvalidNotification";
|
* NSThread Notifications
|
||||||
|
*/
|
||||||
NSString *ConnectionWasCreatedNotification =
|
NSString* const NSWillBecomeMultiThreadedNotification
|
||||||
@"ConnectionWasCreatedNotification";
|
|
||||||
|
|
||||||
/* NSThread Notifications */
|
|
||||||
NSString *NSWillBecomeMultiThreadedNotification
|
|
||||||
= @"NSWillBecomeMultiThreadedNotification";
|
= @"NSWillBecomeMultiThreadedNotification";
|
||||||
NSString *NSThreadWillExitNotification
|
NSString* const NSThreadWillExitNotification
|
||||||
= @"NSThreadWillExitNotification";
|
= @"NSThreadWillExitNotification";
|
||||||
|
|
||||||
/* Port Notifications */
|
/*
|
||||||
NSString *PortBecameInvalidNotification = @"PortBecameInvalidNotification";
|
* Port Notifications
|
||||||
|
*/
|
||||||
NSString *InPortClientBecameInvalidNotification =
|
NSString* const PortBecameInvalidNotification =
|
||||||
|
@"PortBecameInvalidNotification";
|
||||||
|
NSString* const InPortClientBecameInvalidNotification =
|
||||||
@"InPortClientBecameInvalidNotification";
|
@"InPortClientBecameInvalidNotification";
|
||||||
|
NSString* const InPortAcceptedClientNotification =
|
||||||
NSString *InPortAcceptedClientNotification =
|
|
||||||
@"InPortAcceptedClientNotification";
|
@"InPortAcceptedClientNotification";
|
||||||
|
|
||||||
/* RunLoop modes */
|
NSString* const NSPortDidBecomeInvalidNotification
|
||||||
NSString *RunLoopConnectionReplyMode = @"RunLoopConnectionReplyMode";
|
= @"NSPortDidBecomeInvalidNotification";
|
||||||
|
|
||||||
|
|
||||||
|
/* RunLoop modes */
|
||||||
|
NSString* const NSDefaultRunLoopMode
|
||||||
|
= @"NSDefaultRunLoopMode";
|
||||||
|
NSString* const NSConnectionReplyMode
|
||||||
|
= @"NSConnectionReplyMode";
|
||||||
|
|
||||||
/* RunLoop mode strings. */
|
|
||||||
id RunLoopDefaultMode = @"RunLoopDefaultMode";
|
|
||||||
|
|
||||||
/* Exceptions */
|
/* Exceptions */
|
||||||
NSString *NSInconsistentArchiveException = @"NSInconsistentArchiveException";
|
NSString* const NSCharacterConversionException
|
||||||
NSString *NSGenericException = @"NSGenericException";
|
= @"NSCharacterConversionException";
|
||||||
NSString *NSInternalInconsistencyException =
|
NSString* const NSFailedAuthenticationException
|
||||||
@"NSInternalInconsistencyException";
|
= @"NSFailedAuthenticationException";
|
||||||
NSString *NSInvalidArgumentException = @"NSInvalidArgumentException";
|
NSString* const NSGenericException
|
||||||
NSString *NSMallocException = @"NSMallocException";
|
= @"NSGenericException";
|
||||||
NSString *NSRangeException = @"NSRangeException";
|
NSString* const NSInconsistentArchiveException
|
||||||
NSString *NSCharacterConversionException = @"NSCharacterConversionException";
|
= @"NSInconsistentArchiveException";
|
||||||
|
NSString* const NSInternalInconsistencyException
|
||||||
|
= @"NSInternalInconsistencyException";
|
||||||
|
NSString* const NSInvalidArgumentException
|
||||||
|
= @"NSInvalidArgumentException";
|
||||||
|
NSString* const NSMallocException
|
||||||
|
= @"NSMallocException";
|
||||||
|
NSString* const NSPortTimeoutException
|
||||||
|
= @"NSPortTimeoutException";
|
||||||
|
NSString* const NSRangeException
|
||||||
|
= @"NSRangeException";
|
||||||
|
|
||||||
/* Exception handler */
|
/* Exception handler */
|
||||||
NSUncaughtExceptionHandler *_NSUncaughtExceptionHandler;
|
NSUncaughtExceptionHandler *_NSUncaughtExceptionHandler;
|
||||||
|
|
||||||
/* NSBundle */
|
/* NSBundle */
|
||||||
NSString* NSBundleDidLoadNotification = @"NSBundleDidLoadNotification";
|
NSString* const NSBundleDidLoadNotification = @"NSBundleDidLoadNotification";
|
||||||
NSString* NSShowNonLocalizedStrings = @"NSShowNonLocalizedStrings";
|
NSString* const NSShowNonLocalizedStrings = @"NSShowNonLocalizedStrings";
|
||||||
NSString* NSLoadedClasses = @"NSLoadedClasses";
|
NSString* const NSLoadedClasses = @"NSLoadedClasses";
|
||||||
|
|
||||||
/* Stream */
|
/* Stream */
|
||||||
NSString* StreamException = @"StreamException";
|
NSString* const StreamException = @"StreamException";
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* File attributes names
|
* File attributes names
|
||||||
|
@ -91,71 +109,141 @@ NSString* StreamException = @"StreamException";
|
||||||
|
|
||||||
/* File Attributes */
|
/* File Attributes */
|
||||||
|
|
||||||
NSString* const NSFileDeviceIdentifier = @"NSFileDeviceIdentifier";
|
NSString* const NSFileDeviceIdentifier
|
||||||
NSString* const NSFileGroupOwnerAccountName = @"NSFileGroupOwnerAccountName";
|
= @"NSFileDeviceIdentifier";
|
||||||
NSString* const NSFileGroupOwnerAccountNumber = @"NSFileGroupOwnerAccountNumber";
|
NSString* const NSFileGroupOwnerAccountName
|
||||||
NSString* const NSFileModificationDate = @"NSFileModificationDate";
|
= @"NSFileGroupOwnerAccountName";
|
||||||
NSString* const NSFileOwnerAccountName = @"NSFileOwnerAccountName";
|
NSString* const NSFileGroupOwnerAccountNumber
|
||||||
NSString* const NSFileOwnerAccountNumber = @"NSFileOwnerAccountNumber";
|
= @"NSFileGroupOwnerAccountNumber";
|
||||||
NSString* const NSFilePosixPermissions = @"NSFilePosixPermissions";
|
NSString* const NSFileModificationDate
|
||||||
NSString* const NSFileReferenceCount = @"NSFileReferenceCount";
|
= @"NSFileModificationDate";
|
||||||
NSString* const NSFileSize = @"NSFileSize";
|
NSString* const NSFileOwnerAccountName
|
||||||
NSString* const NSFileSystemFileNumber = @"NSFileSystemFileNumber";
|
= @"NSFileOwnerAccountName";
|
||||||
NSString* const NSFileSystemNumber = @"NSFileSystemNumber";
|
NSString* const NSFileOwnerAccountNumber
|
||||||
NSString* const NSFileType = @"NSFileType";
|
= @"NSFileOwnerAccountNumber";
|
||||||
|
NSString* const NSFilePosixPermissions
|
||||||
|
= @"NSFilePosixPermissions";
|
||||||
|
NSString* const NSFileReferenceCount
|
||||||
|
= @"NSFileReferenceCount";
|
||||||
|
NSString* const NSFileSize
|
||||||
|
= @"NSFileSize";
|
||||||
|
NSString* const NSFileSystemFileNumber
|
||||||
|
= @"NSFileSystemFileNumber";
|
||||||
|
NSString* const NSFileSystemNumber
|
||||||
|
= @"NSFileSystemNumber";
|
||||||
|
NSString* const NSFileType
|
||||||
|
= @"NSFileType";
|
||||||
|
|
||||||
/* File Types */
|
/* File Types */
|
||||||
|
|
||||||
NSString* const NSFileTypeDirectory = @"NSFileTypeDirectory";
|
NSString* const NSFileTypeDirectory
|
||||||
NSString* const NSFileTypeRegular = @"NSFileTypeRegular";
|
= @"NSFileTypeDirectory";
|
||||||
NSString* const NSFileTypeSymbolicLink = @"NSFileTypeSymbolicLink";
|
NSString* const NSFileTypeRegular
|
||||||
NSString* const NSFileTypeSocket = @"NSFileTypeSocket";
|
= @"NSFileTypeRegular";
|
||||||
NSString* const NSFileTypeFifo = @"NSFileTypeFifo";
|
NSString* const NSFileTypeSymbolicLink
|
||||||
NSString* const NSFileTypeCharacterSpecial = @"NSFileTypeCharacterSpecial";
|
= @"NSFileTypeSymbolicLink";
|
||||||
NSString* const NSFileTypeBlockSpecial = @"NSFileTypeBlockSpecial";
|
NSString* const NSFileTypeSocket
|
||||||
NSString* const NSFileTypeUnknown = @"NSFileTypeUnknown";
|
= @"NSFileTypeSocket";
|
||||||
|
NSString* const NSFileTypeFifo
|
||||||
|
= @"NSFileTypeFifo";
|
||||||
|
NSString* const NSFileTypeCharacterSpecial
|
||||||
|
= @"NSFileTypeCharacterSpecial";
|
||||||
|
NSString* const NSFileTypeBlockSpecial
|
||||||
|
= @"NSFileTypeBlockSpecial";
|
||||||
|
NSString* const NSFileTypeUnknown
|
||||||
|
= @"NSFileTypeUnknown";
|
||||||
|
|
||||||
/* FileSystem Attributes */
|
/* FileSystem Attributes */
|
||||||
|
|
||||||
NSString* const NSFileSystemSize = @"NSFileSystemSize";
|
NSString* const NSFileSystemSize
|
||||||
NSString* const NSFileSystemFreeSize = @"NSFileSystemFreeSize";
|
= @"NSFileSystemSize";
|
||||||
NSString* const NSFileSystemNodes = @"NSFileSystemNodes";
|
NSString* const NSFileSystemFreeSize
|
||||||
NSString* const NSFileSystemFreeNodes = @"NSFileSystemFreeNodes";
|
= @"NSFileSystemFreeSize";
|
||||||
|
NSString* const NSFileSystemNodes
|
||||||
|
= @"NSFileSystemNodes";
|
||||||
|
NSString* const NSFileSystemFreeNodes
|
||||||
|
= @"NSFileSystemFreeNodes";
|
||||||
|
|
||||||
/* Standard domains */
|
/* Standard domains */
|
||||||
NSString* const NSArgumentDomain = @"NSArgumentDomain";
|
NSString* const NSArgumentDomain
|
||||||
NSString* const NSGlobalDomain = @"NSGlobalDomain";
|
= @"NSArgumentDomain";
|
||||||
NSString* const NSRegistrationDomain = @"NSRegistrationDomain";
|
NSString* const NSGlobalDomain
|
||||||
|
= @"NSGlobalDomain";
|
||||||
|
NSString* const NSRegistrationDomain
|
||||||
|
= @"NSRegistrationDomain";
|
||||||
|
|
||||||
/* Public notification */
|
/* Public notification */
|
||||||
NSString* const NSUserDefaultsDidChangeNotification = @"NSUserDefaultsDidChangeNotification";
|
NSString* const NSUserDefaultsDidChangeNotification
|
||||||
|
= @"NSUserDefaultsDidChangeNotification";
|
||||||
|
|
||||||
/* Keys for language-dependent information */
|
/* Keys for language-dependent information */
|
||||||
NSString* const NSWeekDayNameArray = @"NSWeekDayNameArray";
|
NSString* const NSWeekDayNameArray
|
||||||
NSString* const NSShortWeekDayNameArray = @"NSShortWeekDayNameArray";
|
= @"NSWeekDayNameArray";
|
||||||
NSString* const NSMonthNameArray = @"NSMonthNameArray";
|
NSString* const NSShortWeekDayNameArray
|
||||||
NSString* const NSShortMonthNameArray = @"NSShortMonthNameArray";
|
= @"NSShortWeekDayNameArray";
|
||||||
NSString* const NSTimeFormatString = @"NSTimeFormatString";
|
NSString* const NSMonthNameArray
|
||||||
NSString* const NSDateFormatString = @"NSDateFormatString";
|
= @"NSMonthNameArray";
|
||||||
NSString* const NSTimeDateFormatString = @"NSTimeDateFormatString";
|
NSString* const NSShortMonthNameArray
|
||||||
NSString* const NSShortTimeDateFormatString = @"NSShortTimeDateFormatString";
|
= @"NSShortMonthNameArray";
|
||||||
NSString* const NSCurrencySymbol = @"NSCurrencySymbol";
|
NSString* const NSTimeFormatString
|
||||||
NSString* const NSDecimalSeparator = @"NSDecimalSeparator";
|
= @"NSTimeFormatString";
|
||||||
NSString* const NSThousandsSeparator = @"NSThousandsSeparator";
|
NSString* const NSDateFormatString
|
||||||
NSString* const NSInternationalCurrencyString = @"NSInternationalCurrencyString";
|
= @"NSDateFormatString";
|
||||||
NSString* const NSCurrencyString = @"NSCurrencyString";
|
NSString* const NSTimeDateFormatString
|
||||||
NSString* const NSDecimalDigits = @"NSDecimalDigits";
|
= @"NSTimeDateFormatString";
|
||||||
NSString* const NSAMPMDesignation = @"NSAMPMDesignation";
|
NSString* const NSShortTimeDateFormatString
|
||||||
|
= @"NSShortTimeDateFormatString";
|
||||||
|
NSString* const NSCurrencySymbol
|
||||||
|
= @"NSCurrencySymbol";
|
||||||
|
NSString* const NSDecimalSeparator
|
||||||
|
= @"NSDecimalSeparator";
|
||||||
|
NSString* const NSThousandsSeparator
|
||||||
|
= @"NSThousandsSeparator";
|
||||||
|
NSString* const NSInternationalCurrencyString
|
||||||
|
= @"NSInternationalCurrencyString";
|
||||||
|
NSString* const NSCurrencyString
|
||||||
|
= @"NSCurrencyString";
|
||||||
|
NSString* const NSDecimalDigits
|
||||||
|
= @"NSDecimalDigits";
|
||||||
|
NSString* const NSAMPMDesignation
|
||||||
|
= @"NSAMPMDesignation";
|
||||||
|
|
||||||
NSString* const NSHourNameDesignations = @"NSHourNameDesignations";
|
NSString* const NSHourNameDesignations
|
||||||
NSString* const NSYearMonthWeekDesignations = @"NSYearMonthWeekDesignations";
|
= @"NSHourNameDesignations";
|
||||||
NSString* const NSEarlierTimeDesignations = @"NSEarlierTimeDesignations";
|
NSString* const NSYearMonthWeekDesignations
|
||||||
NSString* const NSLaterTimeDesignations = @"NSLaterTimeDesignations";
|
= @"NSYearMonthWeekDesignations";
|
||||||
NSString* const NSThisDayDesignations = @"NSThisDayDesignations";
|
NSString* const NSEarlierTimeDesignations
|
||||||
NSString* const NSNextDayDesignations = @"NSNextDayDesignations";
|
= @"NSEarlierTimeDesignations";
|
||||||
NSString* const NSNextNextDayDesignations = @"NSNextNextDayDesignations";
|
NSString* const NSLaterTimeDesignations
|
||||||
NSString* const NSPriorDayDesignations = @"NSPriorDayDesignations";
|
= @"NSLaterTimeDesignations";
|
||||||
NSString* const NSDateTimeOrdering = @"NSDateTimeOrdering";
|
NSString* const NSThisDayDesignations
|
||||||
|
= @"NSThisDayDesignations";
|
||||||
|
NSString* const NSNextDayDesignations
|
||||||
|
= @"NSNextDayDesignations";
|
||||||
|
NSString* const NSNextNextDayDesignations
|
||||||
|
= @"NSNextNextDayDesignations";
|
||||||
|
NSString* const NSPriorDayDesignations
|
||||||
|
= @"NSPriorDayDesignations";
|
||||||
|
NSString* const NSDateTimeOrdering
|
||||||
|
= @"NSDateTimeOrdering";
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Keys for the NSDictionary returned by [NSConnection -statistics]
|
||||||
|
*/
|
||||||
|
/* These in OPENSTEP 4.2 */
|
||||||
|
NSString* const NSConnectionRepliesReceived
|
||||||
|
= @"NSConnectionRepliesReceived";
|
||||||
|
NSString* const NSConnectionRepliesSent
|
||||||
|
= @"NSConnectionRepliesSent";
|
||||||
|
NSString* const NSConnectionRequestsReceived
|
||||||
|
= @"NSConnectionRequestsReceived";
|
||||||
|
NSString* const NSConnectionRequestsSent
|
||||||
|
= @"NSConnectionRequestsSent";
|
||||||
|
/* These Are GNUstep extras */
|
||||||
|
NSString* const NSConnectionLocalCount
|
||||||
|
= @"NSConnectionLocalCount";
|
||||||
|
NSString* const NSConnectionProxyCount
|
||||||
|
= @"NSConnectionProxyCount";
|
||||||
|
|
||||||
/* Standard MapTable callbacks */
|
/* Standard MapTable callbacks */
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue